1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="abe5d4eb-f0aa-5c28-9c6f-bd43c6241ef2")}catch(e){}}(); 3import{$ as K_,A as dm,B as Ju,C as Fr,D as Jh,E as j_,F as ep,G as hm,H as tp,I as B_,J as F_,K as U_,L as pm,M as G_,N as z_,O as fm,P as H_,Q as $_,R as ip,S as mm,T as W_,U as gm,V as np,W as q_,X as Uc,Y as Y_,Z as X_,_ as Ll,a as Zu,aa as Z_,b as il,ba as Q_,c as Wh,ca as rp,d as M_,da as Gc,e as Xn,ea as ed,f as R_,fa as J_,g as qh,ga as e0,h as Yh,ha as t0,i as sm,ia as op,j as ns,ja as ym,k as L_,ka as i0,l as D_,la as n0,m as Xh,ma as Yi,n as N_,o as Kh,p as Zh,pa as ap,q as nl,qa as r0,r as rl,s as zi,t as Qu,u as V_,v as ba,w as Qh,x as lm,y as cm,z as um}from"./chunk-FZQKIFV4.js";import{a as Xi,b as $h,c as is,d as k_,e as A_}from"./chunk-7CATO6ZD.js";import{a as Dr,b as Nr}from"./chunk-TXDY4RPP.js";import{a as Ku}from"./chunk-ZBP4GDFC.js";import{e as I_}from"./chunk-5HA3EBXJ.js";import{a as Fc}from"./chunk-66KCVM5C.js";import{d as P_}from"./chunk-MYRREWHV.js";import"./chunk-KYRBCJOC.js";import{a as zh,b as Hh}from"./chunk-JAVMB36G.js";import{a as Rl}from"./chunk-RIHVVWEY.js";import{a as Gh}from"./chunk-RYPSEP4C.js";import{c as Fh,g as Bc,i as Yn,j as nr,k as Uh}from"./chunk-JARC4VEB.js";import"./chunk-HXMI2QMR.js";import{a as O_}from"./chunk-C6EGUEMF.js";import{b as ca,c as b_,d as S_,e as w_,f as E_,g as x_}from"./chunk-ZSJH7VOY.js";import{a as Ml,d as C_}from"./chunk-GZ4P5PE3.js";import{a as T_}from"./chunk-J53KV4IX.js";import{a as tl}from"./chunk-D5VEOIAR.js";import"./chunk-MYR5NO42.js";import{a as Lr}from"./chunk-CZ6C6B4U.js";import"./chunk-M2WDRAPI.js";import"./chunk-RERHSW3W.js";import"./chunk-ZB6PSQYY.js";import"./chunk-G6V4EC3J.js";import"./chunk-LYWBHDNF.js";import"./chunk-D2NYEW4J.js";import{a as So}from"./chunk-WEAOJ7WD.js";import"./chunk-ILB5B4RS.js";import"./chunk-G7QIRMNQ.js";import"./chunk-W7VYE7BD.js";import{a as g_}from"./chunk-RVGQBOW4.js";import"./chunk-35O4R4YN.js";import{a as p_,b as f_}from"./chunk-5TE65YMQ.js";import"./chunk-H4EFSOVA.js";import"./chunk-RZCIXBDP.js";import"./chunk-6TEJOYNN.js";import"./chunk-BXEAVBW5.js";import"./chunk-WCSLZPNH.js";import{a as y_}from"./chunk-LVL7DOC5.js";import"./chunk-R2JMUQ77.js";import{v as v_,w as Bh}from"./chunk-ITQWMIEL.js";import"./chunk-5YM3O5I6.js";import"./chunk-ZZG5IPKY.js";import"./chunk-2SRUAFBD.js";import{P as Lh,a as c_,fa as h_}from"./chunk-KRNZR6YH.js";import{a as Nh,b as Vh}from"./chunk-VKKAQZP5.js";import"./chunk-26TGM6QC.js";import{a as el}from"./chunk-PWTDXLFQ.js";import{b as Dh}from"./chunk-NU27DJEQ.js";import{a as d_}from"./chunk-6MIUUXBY.js";import"./chunk-IDEEGTYH.js";import{f as jc}from"./chunk-JU73QFWT.js";import{a as jh}from"./chunk-N3LX3THL.js";import"./chunk-FEYFR4YX.js";import{a as Vc}from"./chunk-E6YGJNAQ.js";import"./chunk-VZCLJPEW.js";import"./chunk-P4U5MZI6.js";import{a as __}from"./chunk-6FL5NH35.js";import"./chunk-KYKGDHNG.js";import"./chunk-CGOHAIKO.js";import{a as m_}from"./chunk-J6TAHOQ5.js";import"./chunk-ZNBR7H42.js";import{a as u_}from"./chunk-2B2LYKQP.js";import"./chunk-LG75LMIH.js";import"./chunk-XLFNES36.js";import{a as Rh,b as Nc}from"./chunk-MTX4XYDT.js";import{$a as t_,A as Xf,Aa as e_,B as Kf,C as Oc,Fb as Lc,Fd as ts,Gb as om,Gd as Xu,Hd as kh,Ib as ei,Id as a_,Kb as r_,Lb as es,Ld as Do,Md as co,Nd as _a,W as Xv,X as Kv,Xd as Ah,Y as Zv,Yd as s_,Zd as Po,_d as Js,a as Qt,aa as Mc,ab as ZE,b as cr,be as Ji,c as wv,ce as Or,d as Zs,db as i_,ea as nm,eb as QE,fa as Rc,ia as rm,j as vn,jb as n_,je as Dc,k as ya,kb as JE,ke as am,l as Za,m as Qa,n as Na,od as la,re as Mh,se as l_,vd as Ih,wd as o_,ya as Qv,z as Cr,za as Jv}from"./chunk-EHJF6UKK.js";import{A as Av,B as YE,E as Mv,F as XE,G as Rv,H as KE,U as En,V as lo,Y as Qs,Z as xh,a as Iv,ba as Ac,c as WE,ca as im,d as aa,e as Cc,f as mh,g as kv,y as Zf,z as qE}from"./chunk-7XEC5R2G.js";import{c as Tr,d as Os,k as zo,n as Co,q as Pv,r as La}from"./chunk-OV4F6N7I.js";import"./chunk-J5NV6OCA.js";import{b as br,c as jn,d as Ja,e as Th,f as Ch,g as Oh,h as Ph,i as Bn,j as Fn,k as Oo}from"./chunk-PF63PJ47.js";import{$b as em,Bb as Pc,Cb as Ic,D as dh,Db as vr,Eb as Rr,Fb as Nv,G as hh,Gb as Vv,Hb as jv,Ib as kc,Jb as Bv,Lb as Fv,M as ph,O as fh,Pb as Uv,Qb as Gv,Sb as vh,Ub as zv,_b as _h,ac as Hv,c as Da,d as ma,dc as $v,ec as bh,fb as Lv,fc as tm,g as so,h as Yf,ib as Qf,j as ga,jb as Dv,jc as Sh,kb as gh,kc as Wv,lc as wh,mb as Jf,mc as Eh,q as qu,t as ch,tc as qv,uc as Yv,vc as _r,wb as qn,xb as Ho,y as uh,yb as yh,zb as sa}from"./chunk-4MUTHA5V.js";import{C as Ov,D as hi,g as Ya,h as Ev,i as xc,k as an,l as ui,m as Xa,n as Ka,o as Tc,p as xv,q as ah,r as ir,s as sh,t as Tv,v as lh,x as Cv,y as Ci}from"./chunk-W7MJW6UT.js";import{$a as eh,$c as hn,Ab as th,Bb as An,Ca as Rt,D as nv,Da as ct,E as $a,F as _o,Fb as Sc,G as Il,Gb as wc,Gc as li,H as $u,I as sn,Ia as Kr,Ib as Ce,Ic as Ys,J as Kd,Ja as Bt,Jb as ut,Jc as Xs,K as rv,Ka as pv,L as vc,La as _c,Lc as Ze,M as ov,Md as Ks,Nc as Le,O as av,Oc as rh,P as On,Pb as fv,Pc as Wu,Qc as Al,R as zr,Rb as To,T as sv,Tb as qf,Tc as f
3n,U as $s,Ua as Wa,Ub as mv,Uc as mn,Ud as xt,V as Ti,Va as $e,Vc as gn,Vd as oh,W as Ws,Wa as We,Wb as $t,Wc as yv,Wd as bo,X as lv,Xb as gv,Xc as vv,Y as Zd,Yc as mi,Z as qs,Za as qa,Zb as Mn,Zc as lt,Zd as mt,_c as _i,ad as _v,bb as ao,cb as bc,da as cv,db as Zr,eb as oa,ec as at,f as Yt,fa as uv,fb as Mi,fc as Ei,fd as Wn,ga as Ri,gd as Ft,h as yr,ha as ra,hc as ke,hd as Lo,ia as fa,ic as Li,id as bv,ja as Qd,jc as Di,ma as Pt,n as yc,na as Jd,oa as Go,oc as kl,od as qi,pd as Qi,q as Hu,qa as dv,qd as Ec,r as pa,ra as Ki,rc as ih,rd as Sv,sa as Mr,sc as nh,tc as be,uc as Oe,ud as Vi,v as Xd,vc as tt,w as tv,wc as ti,x as oi,xa as Zt,xc as ii,y as Vn,ya as hv,yc as Qr,z as iv,zc as _t}from"./chunk-7RQO36LL.js";import{a as va,b as Yu}from"./chunk-IGDKMAHN.js";import"./chunk-2EFPAZRG.js";import"./chunk-XHJ7RZ2T.js";import"./chunk-DMQT3QOG.js";import"./chunk-43G5BLPL.js";import"./chunk-GCEDPD4V.js";import"./chunk-YUF7ANVY.js";import{a as Ke,b as st,f as Yd,h as $E,j as oo,m as kt}from"./chunk-7Q6MBNO6.js";var s0=$E((exports,module)=>{module.exports=function(i){var r={};function e(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return i[t].call(n.exports,n,n.exports,e),n.l=!0,n.exports;}return e.m=i,e.c=r,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o});},e.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},e.t=function(t,n){if(1&n&&(t=e(t)),8&n||4&n&&typeof t=="object"&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&typeof t!="string")for(var _ in t)e.d(o,_,function(E){return t[E];}.bind(null,_));return o;},e.n=function(t){var n=t&&t.__esModule?function(){return t.default;}:function(){return t;};return e.d(n,"a",n),n;},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n);},e.p="",e(e.s=374);}([function(i,r,e){(function(t){t=typeof window<"u"?window:t!==void 0?t:typeof self<"u"?self:{},i.exports=t;}).call(this,e(27));},function(i,t,e){"use strict";e.d(t,"g",function(){return o;}),e.d(t,"e",function(){return _;}),e.d(t,"k",function(){return E;}),e.d(t,"j",function(){return x;}),e.d(t,"i",function(){return h;}),e.d(t,"b",function(){return p;}),e.d(t,"f",function(){return c;}),e.d(t,"c",function(){return d;}),e.d(t,"h",function(){return m;}),e.d(t,"d",function(){return a;}),e.d(t,"a",function(){return s;});var t=e(0),n=function(l){return l.toString(2).length;},o=function(l,g,f){return(function(v,S){for(var w="";S--;)w+=v;return w;}(f=f===void 0?" ":f,g)+l.toString()).slice(-g);},_=function(l){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(l):l&&l.buffer instanceof ArrayBuffer;},E=function(l){return l instanceof Uint8Array?l:(Array.isArray(l)||_(l)||l instanceof ArrayBuffer||(l=typeof l!="number"||typeof l=="number"&&l!=l?0:[l]),new Uint8Array(l&&l.buffer||l,l&&l.byteOffset||0,l&&l.byteLength||0));},x=function(l){l=E(l);for(var g="",f=0;f<l.length;f++)g+=o(l[f].toString(16),2,"0");return g;},h=function(l){l=E(l);for(var g="",f=0;f<l.length;f++)g+=o(l[f].toString(2),8,"0");return g;},y=e.n(t).a.BigInt||Number,b=[y("0x1"),y("0x100"),y("0x10000"),y("0x1000000"),y("0x100000000"),y("0x10000000000"),y("0x1000000000000"),y("0x100000000000000"),y("0x10000000000000000")],p=(e=new Uint16Array([65484]),(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength))[0]===255||e[0],function(l,S){var S=S===void 0?{}:S,f=S.signed,f=f!==void 0&&f,S=S.le,v=S!==void 0&&S,S=(l=E(l),v?"reduce":"reduceRight"),S=(l[S]||Array.prototype[S]).call(l,function(w,C,I){return I=v?I:Math.abs(I+1-l.length),w+y(C)*b[I];},y(0));return f&&(f=b[l.length]/y(2)-y(1))<(S=y(S))&&(S=(S=S-f-f)-y(2)),Number(S);}),c=function(l,g){for(var g=(g===void 0?{}:g).le,f=g!==void 0&&g,v=(l=y(l=typeof l!="bigint"&&typeof l!="number"||typeof l=="number"&&l!=l?0:l),g=l,Math.ceil(n(g)/8)),S=new Uint8Array(new ArrayBuffer(v)),w=0;w<v;w++){var C=f?w:Math.abs(w+1-S.length);S[C]=Number(l/b[w]&y(255)),l<0&&(S[C]=Math.abs(~S[C]),S[C]-=w===0?1:2);}return S;},d=function(l){if(!l)return"";l=Array.prototype.slice.call(l),l=String.fromCharCode.apply(null,E(l));try{return decodeURIComponent(escape(l));}catch{}return l;},m=function(l,g){if(typeof(l=typeof l!="string"&&l&&typeof l.toString=="function"?l.toString():l)!="string")return new Uint8Array();g||(l=unescape(encodeURIComponent(l)));for(var f=new Uint8Array(l.length),v=0;v<l.length;v++)f[v]=l.charCodeAt(v);return f;},a=function(){for(var l=arguments.length,g=new Array(l),f=0;f<l;f++)g[f]=arguments[f];if((g=g.filter(function(C){return C&&(C.byteLength||C.length)&&typeof C!="string";})).length<=1)return E(g[0]);var v=g.reduce(function(C,I,O){return C+(I.byteLength||I.length);},0),S=new Uint8Array(v),w=0;return g.forEach(function(C){C=E(C),S.set(C,w),w+=C.byteLength;}),S;},s=function(l,g,C){var C=C===void 0?{}:C,S=C.offset,v=S===void 0?0:S,S=C.mask,w=S===void 0?[]:S,C=(l=E(l),(g=E(g)).every||Array.prototype.every);return g.length&&l.length-v>=g.length&&C.call(g,function(I,O){return I===(w[O]?w[O]&l[v+O]:l[v+O]);});};},function(i,r,e){"use strict";function t(me){if(me===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me;}function n(me,xe){me.prototype=Object.create(xe.prototype),(me.prototype.constructor=me).__proto__=xe;}e.r(r),e.d(r,"GSCache",function(){return vd;}),e.d(r,"Animation",function(){return vs;}),e.d(r,"Timeline",function(){return Ur;}),e.d(r,"Tween",function(){return tr;}),e.d(r,"PropTween",function(){return _s;}),e.d(r,"gsap",function(){return Zi;}),e.d(r,"Power0",function(){return El;}),e.d(r,"Power1",function(){return ku;}),e.d(r,"Power2",function(){return Au;}),e.d(r,"Power3",function(){return Ed;}),e.d(r,"Power4",function(){return bs;}),e.d(r,"Linear",function(){return xd;}),e.d(r,"Quad",function(){return Td;}),e.d(r,"Cubic",function(){return lf;}),e.d(r,"Quart",function(){return Mu;}),e.d(r,"Quint",function(){return ic;}),e.d(r,"Strong",function(){return nc;}),e.d(r,"Elastic",function(){return Cd;}),e.d(r,"Back",function(){return rc;}),e.d(r,"SteppedEase",function(){return cf;}),e.d(r,"Bounce",function(){return Od;}),e.d(r,"Sine",function(){return Pd;}),e.d(r,"Expo",function(){return oc;}),e.d(r,"Circ",function(){return ac;}),e.d(r,"TweenMax",function(){return tr;}),e.d(r,"TweenLite",function(){return tr;}),e.d(r,"TimelineMax",function(){return Ur;}),e.d(r,"TimelineLite",function(){return Ur;}),e.d(r,"default",function(){return Zi;}),e.d(r,"wrap",function(){return mu;}),e.d(r,"wrapYoyo",function(){return gu;}),e.d(r,"distribute",function(){return yl;}),e.d(r,"random",function(){return qr;}),e.d(r,"snap",function(){return Wl;}),e.d(r,"normalize",function(){return Xo;}),e.d(r,"getUnit",function(){return Vo;}),e.d(r,"clamp",function(){return fr;}),e.d(r,"splitColor",function(){return vl;}),e.d(r,"toArray",function(){return po;}),e.d(r,"selector",function(){return Wt;}),e.d(r,"mapRange",function(){return yu;}),e.d(r,"pipe",function(){return fs;}),e.d(r,"unitize",function(){return Ds;}),e.d(r,"interpolate",function(){return Yl;}),e.d(r,"shuffle",function(){return $l;}),e.d(r,"_getProperty",function(){return fu;}),e.d(r,"_numExp",function(){return ln;}),e.d(r,"_numWithUnitExp",function(){return ji;}),e.d(r,"_isString",function(){return si;}),e.d(r,"_isUndefined",function(){return gi;}),e.d(r,"_renderComplexString",function(){return Jl;}),e.d(r,"_relExp",function(){return Ui;}),e.d(r,"_setDefaults",function(){return to;}),e.d(r,"_removeLinkedListItem",function(){return Mo;}),e.d(r,"_forEachName",function(){return Yo;}),e.d(r,"_sortPropTweensByPriority",function(){return Ou;}),e.d(r,"_colorStringFilter",function(){return vu;}),e.d(r,"_replaceRandom",function(){return ql;}),e.d(r,"_checkPlugin",function(){return wu;}),e.d(r,"_plugins",function(){return xi;}),e.d(r,"_ticker",function(){return jo;}),e.d(r,"_config",function(){return qe;}),e.d(r,"_roundModifier",function(){return da;}),e.d(r,"_round",function(){return Gl;}),e.d(r,"_missingPlugin",function(){return or;}),e.d(r,"_getSetter",function(){return Sl;}),e.d(r,"_getCache",function(){return Er;}),e.d(r,"_colorExp",function(){return Ba;}),e.d(r,"_parseRelative",function(){return ps;});function o(me){return typeof me=="number";}function _(me){return me!==!1;}function E(){return typeof window<"u";}function x(me){return ci(me)||si(me);}function h(me){return($n=a(me,Pn))&&Zi;}function y(me,xe){return!xe&&console.warn(me);}function b(me,xe){return me&&(Pn[me]=xe)&&$n&&($n[me]=xe)||Pn;}function p(){return 0;}function c(me){var xe,Ie,Me=me[0];
3if(Oi(Me)||ci(Me)||(me=[me]),!(xe=(Me._gsap||{}).harness)){for(Ie=ho.length;Ie--&&!ho[Ie].targetTest(Me););xe=ho[Ie];}for(Ie=me.length;Ie--;)me[Ie]&&(me[Ie]._gsap||(me[Ie]._gsap=new vd(me[Ie],xe)))||me.splice(Ie,1);return me;}function d(me,xe,Ie,Me){yn.length&&!le&&zl(),me.render(xe,Ie,Me||le&&xe<0&&(me._initted||me._startAt)),yn.length&&!le&&zl();}function m(me){return me;}function a(me,xe){for(var Ie in xe)me[Ie]=xe[Ie];return me;}function s(me,xe){for(var Ie in xe)Ie!=="__proto__"&&Ie!=="constructor"&&Ie!=="prototype"&&(me[Ie]=Oi(xe[Ie])?s(me[Ie]||(me[Ie]={}),xe[Ie]):xe[Ie]);return me;}function l(me,xe){var Ie,Me={};for(Ie in me)Ie in xe||(Me[Ie]=me[Ie]);return Me;}function g(me){var xe,Ie=me.parent||fe,Me=me.keyframes?(xe=Fi(me.keyframes),function(Ne,ze){for(var Je in ze)Je in Ne||Je==="duration"&&xe||Je==="ease"||(Ne[Je]=ze[Je]);}):to;if(_(me.inherit))for(;Ie;)Me(me,Ie.vars.defaults),Ie=Ie.parent||Ie._dp;return me;}function f(me,xe,Ie,Me,Ne){Ie===void 0&&(Ie="_first");var ze,Je=me[Me=Me===void 0?"_last":Me];if(Ne)for(ze=xe[Ne];Je&&Je[Ne]>ze;)Je=Je._prev;Je?(xe._next=Je._next,Je._next=xe):(xe._next=me[Ie],me[Ie]=xe),xe._next?xe._next._prev=xe:me[Me]=xe,xe._prev=Je,xe.parent=xe._dp=me;}function v(me,xe){me.parent&&(!xe||me.parent.autoRemoveChildren)&&me.parent.remove&&me.parent.remove(me),me._act=0;}function S(me,xe,Ie,Me){me._startAt&&(le?me._startAt.revert(wr):me.vars.immediateRender&&!me.vars.autoRevert||me._startAt.render(xe,!0,Me));}function w(me){return!me||me._ts&&w(me.parent);}function C(me){return me._repeat?I(me._tTime,me=me.duration()+me._rDelay)*me:0;}function I(me,xe){return xe=Math.floor(me/=xe),me&&xe===me?xe-1:xe;}function O(me,xe){return(me-xe._start)*xe._ts+(0<=xe._ts?0:xe._dirty?xe.totalDuration():xe._tDur);}function M(me,xe){var Ie;if((xe._time||!xe._dur&&xe._initted||xe._start<me._time&&(xe._dur||!xe.add))&&(Ie=O(me.rawTime(),xe),(!xe._dur||Z(0,xe.totalDuration(),Ie)-xe._tTime>gt)&&xe.render(Ie,!0)),Ia(me,xe)._dp&&me._initted&&me._time>=me._dur&&me._ts){if(me._dur<me.duration())for(Ie=me;Ie._dp;)0<=Ie.rawTime()&&Ie.totalTime(Ie._tTime),Ie=Ie._dp;me._zTime=-gt;}}function N(me,xe,Ie,Me){return xe.parent&&v(xe),xe._start=ar((o(Ie)?Ie:Ie||me!==fe?V(me,Ie,xe):me._time)+xe._delay),xe._end=ar(xe._start+(xe.totalDuration()/Math.abs(xe.timeScale())||0)),f(me,xe,"_first","_last",me._sort?"_start":0),z(xe)||(me._recent=xe),Me||M(me,xe),me._ts<0&&Ls(me,me._tTime),me;}function G(me,xe){(Pn.ScrollTrigger||or("scrollTrigger",xe))&&Pn.ScrollTrigger.create(xe,me);}function H(me,xe,Ie,Me,Ne){return _l(me,xe,Ne),me._initted?!Ie&&me._pt&&!le&&(me._dur&&me.vars.lazy!==!1||!me._dur&&me.vars.lazy)&&ee!==jo.frame?(yn.push(me),me._lazy=[Ne,Me]):void 0:1;}function B(me){return(me=me.parent)&&me._ts&&me._initted&&!me._lock&&(me.rawTime()<0||B(me));}function z(me){return(me=me.data)==="isFromStart"||me==="isStart";}function te(me,ze,Ie,Me){var Ne=me._repeat,ze=ar(ze)||0,Je=me._tTime/me._tDur;return Je&&!Me&&(me._time*=ze/me._dur),me._dur=ze,me._tDur=Ne?Ne<0?1e10:ar(ze*(Ne+1)+me._rDelay*Ne):ze,0<Je&&!Me&&Ls(me,me._tTime=me._tDur*Je),me.parent&&Hl(me),Ie||Ia(me.parent,me),me;}function K(me){return me instanceof Ur?Ia(me):te(me,me._dur);}function V(me,xe,Ie){var Me,Ne,ze,Je=me.labels,ft=me._recent||af,Xe=me.duration()>=bt?ft.endTime(!1):me._dur;return si(xe)&&(isNaN(xe)||xe in Je)?(Ne=xe.charAt(0),ze=xe.substr(-1)==="%",Me=xe.indexOf("="),Ne==="<"||Ne===">"?(0<=Me&&(xe=xe.replace(/=/,"")),(Ne==="<"?ft._start:ft.endTime(0<=ft._repeat))+(parseFloat(xe.substr(1))||0)*(ze?(Me<0?ft:Ie).totalDuration()/100:1)):Me<0?(xe in Je||(Je[xe]=Xe),Je[xe]):(Ne=parseFloat(xe.charAt(Me-1)+xe.substr(Me+1)),ze&&Ie&&(Ne=Ne/100*(Fi(Ie)?Ie[0]:Ie).totalDuration()),1<Me?V(me,xe.substr(0,Me-1),Ie)+Ne:Xe+Ne)):xe==null?Xe:+xe;}function U(me,xe,Ie){var Me,Ne,ze=o(xe[1]),Je=(ze?2:1)+(me<2?0:1),ft=xe[Je];if(ze&&(ft.duration=xe[1]),ft.parent=Ie,me){for(Me=ft,Ne=Ie;Ne&&!("immediateRender"in Me);)Me=Ne.vars.defaults||{},Ne=_(Ne.vars.inherit)&&Ne.parent;ft.immediateRender=_(Me.immediateRender),me<2?ft.runBackwards=1:ft.startAt=xe[Je-1];}return new tr(xe[0],ft,xe[1+Je]);}function Z(me,xe,Ie){return Ie<me?me:xe<Ie?xe:Ie;}function re(me,xe,Ie){return ka(Ie,function(Me){return me[~~xe(Me)
3];});}function ue(me,xe,Ie){var Me,Ne,ze,Je=me.labels,ft=bt;for(Me in Je)(Ne=Je[Me]-xe)<0==!!Ie&&Ne&&ft>(Ne=Math.abs(Ne))&&(ze=Me,ft=Ne);return ze;}function q(me,xe,Ie){var Me=me.vars,Ne=Me[xe],ze=se,Je=me._ctx;if(Ne)return xe=Me[xe+"Params"],Me=Me.callbackScope||me,Ie&&yn.length&&zl(),Je&&(se=Je),me=xe?Ne.apply(Me,xe):Ne.call(Me),se=ze,me;}function J(me){return v(me),me.scrollTrigger&&me.scrollTrigger.kill(!!le),me.progress()<1&&q(me,"onInterrupt"),me;}function oe(me){if(me)if(me=!me.name&&me.default||me,E()||me.headless){var xe=me.name,Ie=ci(me),Ie=xe&&!Ie&&me.init?function(){this._props=[];}:me,Me={init:p,render:Fa,add:Su,kill:Cu,modifier:ec,rawVars:0},Ne={targetTest:0,get:0,getSetter:Sl,aliases:{},register:0};if(Ns(),me!==Ie){if(xi[xe])return;to(Ie,to(l(me,Me),Ne)),a(Ie.prototype,a(Me,l(me,Ne))),xi[Ie.prop=xe]=Ie,me.targetTest&&(ho.push(Ie),pn[xe]=1),xe=(xe==="css"?"CSS":xe.charAt(0).toUpperCase()+xe.substr(1))+"Plugin";}b(xe,Ie),me.register&&me.register(Zi,Ie,_s);}else ms.push(me);}function Q(me,xe,Ie){return(6*(me+=me<0?1:1<me?-1:0)<1?xe+(Ie-xe)*me*6:me<.5?Ie:3*me<2?xe+(Ie-xe)*(2/3-me)*6:xe)*In+.5|0;}function F(me,xe,Ie){var Me,Ne,ze,Je,ft="",Xe=(me+ft).match(Ba),Tt=xe?"hsla(":"rgba(",St=0;if(!Xe)return me;if(Xe=Xe.map(function(Xt){return(Xt=vl(Xt,xe,1))&&Tt+(xe?Xt[0]+","+Xt[1]+"%,"+Xt[2]+"%,"+Xt[3]:Xt.join(","))+")";}),Ie&&(ze=Xl(me),(Me=Ie.c).join(ft)!==ze.c.join(ft)))for(Je=(Ne=me.replace(Ba,"1").split(ji)).length-1;St<Je;St++)ft+=Ne[St]+(~Me.indexOf(St)?Xe.shift()||Tt+"0,0,0,0)":(ze.length?ze:Xe.length?Xe:Ie).shift());if(!Ne)for(Je=(Ne=me.split(Ba)).length-1;St<Je;St++)ft+=Ne[St]+Xe[St];return ft+Ne[Je];}function X(me,xe){for(var Ie,Me=me._first;Me;)Me instanceof Ur?X(Me,xe):!Me.vars.yoyoEase||Me._yoyo&&Me._repeat||Me._yoyo===xe||(Me.timeline?X(Me.timeline,xe):(Ie=Me._ease,Me._ease=Me._yEase,Me._yEase=Ie,Me._yoyo=xe)),Me=Me._next;}function Y(me,xe,Ie,Me){var Ne,ze={easeIn:xe,easeOut:Ie=Ie===void 0?function(Je){return 1-xe(1-Je);}:Ie,easeInOut:Me=Me===void 0?function(Je){return Je<.5?xe(2*Je)/2:1-xe(2*(1-Je))/2;}:Me};Yo(me,function(Je){for(var ft in _n[Je]=Pn[Je]=ze,_n[Ne=Je.toLowerCase()]=Ie,ze)_n[Ne+(ft==="easeIn"?".in":ft==="easeOut"?".out":".inOut")]=_n[Je+"."+ft]=ze[ft];});}function j(me){return function(xe){return xe<.5?(1-me(1-2*xe))/2:.5+me(2*(xe-.5))/2;};}function D(me,xe,Je){function Me(Xe){return Xe===1?1:Ne*Math.pow(2,-10*Xe)*tn((Xe-ze)*ft)+1;}var Ne=1<=xe?xe:1,ze=(ft=(Je||(me?.3:.45))/(xe<1?xe:1))/Ot*(Math.asin(1/Ne)||0),Je=me==="out"?Me:me==="in"?function(Xe){return 1-Me(1-Xe);}:j(Me),ft=Ot/ft;return Je.config=function(Xe,Tt){return D(me,Xe,Tt);},Je;}function $(me,xe){function Ie(Ne){return Ne?--Ne*Ne*((xe+1)*Ne+xe)+1:0;}xe===void 0&&(xe=1.70158);var Me=me==="out"?Ie:me==="in"?function(Ne){return 1-Ie(1-Ne);}:j(Ie);return Me.config=function(Ne){return $(me,Ne);},Me;}var ne,le,se,fe,ge,he,_e,Re,ee,W,ae,de,ye,Se,De,Ue,Be,nt,it,ot,ht,Et,At,Nt,Ut,bi,Ge,qe={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},yt={duration:.5,overwrite:!1,delay:0},bt=1e8,gt=1/bt,Ot=2*Math.PI,Mt=Ot/4,Lt=0,Kt=Math.sqrt,Dt=Math.cos,tn=Math.sin,si=function(me){return typeof me=="string";},ci=function(me){return typeof me=="function";},gi=function(me){return me===void 0;},Oi=function(me){return typeof me=="object";},Pi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Fi=Array.isArray,wn=/(?:-?\.?\d|\.)+/gi,ln=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ji=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ii=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ui=/[+-]=-?[.\d]+/,nn=/[^,'"\[\]\s]+/gi,un=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Pn={},$n={},or=function(me,xe){return console.warn("Invalid property",me,"set to",xe,"Missing plugin? gsap.registerPlugin()");},Wr={suppressEvents:!0,isStart:!0,kill:!1},wr={suppressEvents:!0,kill:!1},kr={suppressEvents:!0},pn={},yn=[],hr={},xi={},Pa={},Un=30,ho=[],pr="",Er=function(me){return me._gsap||c(po(me))[0]._gsap;},fu=function(me,xe,Ie){return(Ie=me[xe])&&ci(Ie)?me[xe]():gi(Ie)&&me.getAttribute&&me.getAttribute(xe)||Ie;},Yo=function(me,xe){return(me=me.split(",")).forEach(xe)||me;},Gl=function(me){return Math.round(1e5*me)/1e5||0;},ar=function(me){return Math.round(1e7*me)/1e7||0;},ps=function(me,Me){var Ie=Me.charAt(0),Me=parseFloat(Me.substr(2));return me=parseFloat(me),Ie==="+"?me+Me:Ie==="-"?me-Me:Ie==="*"?me*Me:me/Me;},zl=function(){var me,xe,Ie=yn.length,Me=yn.slice(0);for(hr={},me=yn.length=0;me<Ie;me++)(xe=Me[me])&&xe._lazy&&(xe.render(xe._lazy[0],xe._lazy[1],!0)._lazy=0);},er=function(me){var xe=parseFloat(me);return(xe||xe===0)&&(me+"").match(nn).length<2?xe:si(me)?me.trim():me;},to=function(me,xe){for(var Ie in xe)Ie in me||(me[Ie]=xe[Ie]);return me;},Mo=function(me,xe,Ie,Me){Ie===void 0&&(Ie="_first"),Me===void 0&&(Me="_last");var Ne=xe._prev,ze=xe._next;Ne?Ne._next=ze:me[Ie]===xe&&(me[Ie]=ze),ze?ze._prev=Ne:me[Me]===xe&&(me[Me]=Ne),xe._next=xe._prev=xe.parent=null;},Ia=function(me,xe){if(me&&(!xe||xe._end>me._dur||xe._start<0))for(var Ie=me;Ie;)Ie._dirty=1,Ie=Ie.parent;return me;},Hl=function(me){return me._end=ar(me._start+(me._tDur/Math.abs(me._ts||me._rts||gt)||0));},Ls=function(me,xe){var Ie=me._dp;return Ie&&Ie.smoothChildTiming&&me._ts&&(me._start=ar(Ie._time-(0<me._ts?xe/me._ts:((me._dirty?me.totalDuration():me._tDur)-xe)/-me._ts)),Hl(me),Ie._dirty||Ia(Ie,me)),me;},af={_start:0,endTime:p,totalDuration:p},ka=function(me,xe){return me||me===0?xe(me):xe;},Vo=function(me,xe){return si(me)&&(xe=un.exec(me))?xe[1]:"";},fr=function(me,xe,Ie){return ka(Ie,function(Me){return Z(me,xe,Me);});},Kn=[].slice,md=function(me,xe){return me&&Oi(me)&&"length"in me&&(!xe&&!me.length||me.length-1
3in me&&Oi(me[0]))&&!me.nodeType&&me!==ge;},po=function(me,xe,Ie){return se&&!xe&&se.selector?se.selector(me):!si(me)||Ie||!he&&Ns()?Fi(me)?(Me=Ie,Ne===void 0&&(Ne=[]),me.forEach(function(ze){return si(ze)&&!Me||md(ze,1)?Ne.push.apply(Ne,po(ze)):Ne.push(ze);})||Ne):md(me)?Kn.call(me,0):me?[me]:[]:Kn.call((xe||_e).querySelectorAll(me),0);var Me,Ne;},Wt=function(me){return me=po(me)[0]||y("Invalid scope")||{},function(xe){var Ie=me.current||me.nativeElement||me;return po(xe,Ie.querySelectorAll?Ie:Ie===me?y("Invalid scope")||_e.createElement("div"):me);};},$l=function(me){return me.sort(function(){return .5-Math.random();});},yl=function(Je){if(ci(Je))return Je;var xe=Oi(Je)?Je:{each:Je},Ie=Ko(xe.ease),Me=xe.from||0,Ne=parseFloat(xe.base)||0,ze={},Je=0<Me&&Me<1,ft=isNaN(Me)||Je,Xe=xe.axis,Tt=Me,St=Me;return si(Me)?Tt=St={center:.5,edges:.5,end:1}[Me]||0:!Je&&ft&&(Tt=Me[0],St=Me[1]),function(Xt,pi,vi){var ki,ai,qt,fi,di,ni,Hi,rt,ri=(vi||xe).length,on=ze[ri];if(!on){if(!(rt=xe.grid==="auto"?0:(xe.grid||[1,bt])[1])){for(ni=-bt;ni<(ni=vi[rt++].getBoundingClientRect().left)&&rt<ri;);rt<ri&&rt--;}for(on=ze[ri]=[],ki=ft?Math.min(rt,ri)*Tt-.5:Me%rt,ai=rt===bt?0:ft?ri*St/rt-.5:Me/rt|0,Hi=bt,di=ni=0;di<ri;di++)fi=di%rt-ki,qt=ai-(di/rt|0),on[di]=fi=Xe?Math.abs(Xe==="y"?qt:fi):Kt(fi*fi+qt*qt),ni<fi&&(ni=fi),fi<Hi&&(Hi=fi);Me==="random"&&$l(on),on.max=ni-Hi,on.min=Hi,on.v=ri=(parseFloat(xe.amount)||parseFloat(xe.each)*(ri<rt?ri-1:Xe?Xe==="y"?ri/rt:rt:Math.max(rt,ri/rt))||0)*(Me==="edges"?-1:1),on.b=ri<0?Ne-ri:Ne,on.u=Vo(xe.amount||xe.each)||0,Ie=Ie&&ri<0?bu(Ie):Ie;}return ri=(on[Xt]-on.min)/on.max||0,ar(on.b+(Ie?Ie(ri):ri)*on.v)+on.u;};},da=function(me){var xe=Math.pow(10,((me+"").split(".")[1]||"").length);return function(Ie){var Me=ar(Math.round(parseFloat(Ie)/me)*me*xe);return(Me-Me%1)/xe+(o(Ie)?0:Vo(Ie));};},Wl=function(me,xe){var Ie,Me,Ne=Fi(me);return!Ne&&Oi(me)&&(Ie=Ne=me.radius||bt,me.values?(me=po(me.values),(Me=!o(me[0]))&&(Ie*=Ie)):me=da(me.increment)),ka(xe,Ne?ci(me)?function(ze){return Me=me(ze),Math.abs(Me-ze)<=Ie?Me:ze;}:function(ze){for(var Je,ft,Xe=parseFloat(Me?ze.x:ze),Tt=parseFloat(Me?ze.y:0),St=bt,Xt=0,pi=me.length;pi--;)(Je=Me?(Je=me[pi].x-Xe)*Je+(ft=me[pi].y-Tt)*ft:Math.abs(me[pi]-Xe))<St&&(St=Je,Xt=pi);return Xt=!Ie||St<=Ie?me[Xt]:ze,Me||Xt===ze||o(ze)?Xt:Xt+Vo(ze);}:da(me));},qr=function(me,xe,Ie,Me){return ka(Fi(me)?!xe:Ie===!0?!!(Ie=0):!Me,function(){return Fi(me)?me[~~(Math.random()*me.length)]:(Ie=Ie||1e-5)&&(Me=Ie<1?Math.pow(10,(Ie+"").length-2):1)&&Math.floor(Math.round((me-Ie/2+Math.random()*(xe-me+.99*Ie))/Ie)*Ie*Me)/Me;});},fs=function(){for(var me=arguments.length,xe=new Array(me),Ie=0;Ie<me;Ie++)xe[Ie]=arguments[Ie];return function(Me){return xe.reduce(function(Ne,ze){return ze(Ne);},Me);};},Ds=function(me,xe){return function(Ie){return me(parseFloat(Ie))+(xe||Vo(Ie));};},Xo=function(me,xe,Ie){return yu(me,xe,0,1,Ie);},mu=function me(xe,Ie,Me){var Ne=Ie-xe;return Fi(xe)?re(xe,me(0,xe.length),Ie):ka(Me,function(ze){return(Ne+(ze-xe)%Ne)%Ne+xe;});},gu=function me(xe,Ie,Me){var Ne=Ie-xe,ze=2*Ne;return Fi(xe)?re(xe,me(0,xe.length-1),Ie):ka(Me,function(Je){return xe+(Ne<(Je=(ze+(Je-xe)%ze)%ze||0)?ze-Je:Je);});},ql=function(me){for(var xe,Ie,Me,Ne,ze=0,Je="";~(xe=me.indexOf("random(",ze));)Me=me.indexOf(")",xe),Ne=me.charAt(xe+7)==="[",Ie=me.substr(xe+7,Me-xe-7).match(Ne?nn:wn),Je+=me.substr(ze,xe-ze)+qr(Ne?Ie:+Ie[0],Ne?0:+Ie[1],+Ie[2]||1e-5),ze=Me+1;return Je+me.substr(ze,me.length-ze);},yu=function(me,xe,Ie,Me,Ne){var ze=xe-me,Je=Me-Ie;return ka(Ne,function(ft){return Ie+((ft-me)/ze*Je||0);});},Yl=function me(xe,Ie,Me,Ne){var ze=isNaN(xe+Ie)?0:function(vi){return(1-vi)*xe+vi*Ie;};if(!ze){var Je,ft,Xe,Tt,St,Xt=si(xe),pi={};if(Me===!0&&(Ne=1)&&(Me=null),Xt)xe={p:xe},Ie={p:Ie};else if(Fi(xe)&&!Fi(Ie)){for(Xe=[],Tt=xe.length,St=Tt-2,ft=1;ft<Tt;ft++)Xe.push(me(xe[ft-1],xe[ft]));Tt--,ze=function(vi){vi*=Tt;var ki=Math.min(St,~~vi);return Xe[ki](vi-ki);},Me=Ie;}else Ne||(xe=a(Fi(xe)?[]:{},xe));if(!Xe){for(Je in Ie)Su.call(pi,xe,Je,"get",Ie[Je]);ze=function(vi){return Fa(vi,pi)||(Xt?xe.p:xe);};}}return ka(Me,ze);},ms=[],In=255,gs={aqua:[0,In,In],lime:[0,In,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,In],navy:[0,0,128],white:[In,In,In],olive:[128,128,0],yellow:[In,In,0],orange:[In,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[In,0,0],pink:[In,192,203],cyan:[0,In,In],transparent:[In,In,In,0]},vl=function(me,xe,Ie){var Me,Ne,ze,Je,ft,Xe,Tt,St=me?o(me)?[me>>16,me>>8&In,me&In]:0:gs.black;if(!St){if(me.substr(-1)===","&&(me=me.substr(0,me.length-1)),gs[me])St=gs[me];else if(me.charAt(0)==="#"){if((me=me.length<6?"#"+(Me=me.charAt(1))+Me+(Ne=me.charAt(2))+Ne+(ze=me.charAt(3))+ze+(me.length===5?me.charAt(4)+me.charAt(4):""):me).length===9)return[(St=parseInt(me.substr(1,6),16))>>16,St>>8&In,St&In,parseInt(me.substr(7),16)/255];St=[(me=parseInt(me.substr(1),16))>>16,me>>8&In,me&In];}else if(me.substr(0,3)==="hsl"){if(St=Tt=me.match(wn),xe){if(~me.indexOf("="))return St=me.match(ln),Ie&&St.length<4&&(St[3]=1),St;}else Je=+St[0]%360/360,ft=+St[1]/100,Me=2*(Xe=+St[2]/100)-(Ne=Xe<=.5?Xe*(ft+1):Xe+ft-Xe*ft),3<St.length&&(St[3]*=1),St[0]=Q(Je+1/3,Me,Ne),St[1]=Q(Je,Me,Ne),St[2]=Q(Je-1/3,Me,Ne);}else St=me.match(wn)||gs.transparent;St=St.map(Number);}return xe&&!Tt&&(Me=St[0]/In,Ne=St[1]/In,ze=St[2]/In,Xe=((me=Math.max(Me,Ne,ze))+(xe=Math.min(Me,Ne,ze)))/2,me===xe?Je=ft=0:(Tt=me-xe,ft=.5<Xe?Tt/(2-me-xe):Tt/(me+xe),Je=me===Me?(Ne-ze)/Tt+(Ne<ze?6:0):me===Ne?(ze-Me)/Tt+2:(Me-Ne)/Tt+4,Je*=60),St[0]=~~(Je+.5),St[1]=~~(100*ft+.5),St[2]=~~(100*Xe+.5)),Ie&&St.length<4&&(St[3]=1),St;},Xl=function(me){var xe=[],Ie=[],Me=-1;
3return me.split(Ba).forEach(function(Ne){Ne=Ne.match(ji)||[],xe.push.apply(xe,Ne),Ie.push(Me+=Ne.length+1);}),xe.c=Ie,xe;},Ba=function(){var me,xe="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(me in gs)xe+="|"+me+"\\b";return new RegExp(xe+")","gi");}(),gd=/hsl[a]?\(/,vu=function(me){var xe=me.join(" ");if(Ba.lastIndex=0,Ba.test(xe))return xe=gd.test(xe),me[1]=F(me[1],xe),me[0]=F(me[0],xe,Xl(me[1])),!0;},jo=(Be=Date.now,nt=500,it=33,ot=Be(),ht=ot,At=Et=1e3/240,Ut={time:0,frame:0,tick:function(){Zl(!0);},deltaRatio:function(me){return De/(1e3/(me||60));},wake:function(){Re&&(!he&&E()&&(ge=he=window,_e=ge.document||{},Pn.gsap=Zi,(ge.gsapVersions||(ge.gsapVersions=[])).push(Zi.version),h($n||ge.GreenSockGlobals||!ge.gsap&&ge||{}),ms.forEach(oe)),Se=typeof requestAnimationFrame<"u"&&requestAnimationFrame,de&&Ut.sleep(),ye=Se||function(me){return setTimeout(me,At-1e3*Ut.time+1|0);},ae=1,Zl(2));},sleep:function(){(Se?cancelAnimationFrame:clearTimeout)(de),ae=0,ye=p;},lagSmoothing:function(me,xe){nt=me||1/0,it=Math.min(xe||33,nt);},fps:function(me){Et=1e3/(me||240),At=1e3*Ut.time+Et;},add:function(me,xe,Ie){var Me=xe?function(Ne,ze,Je,ft){me(Ne,ze,Je,ft),Ut.remove(Me);}:me;return Ut.remove(me),Nt[Ie?"unshift":"push"](Me),Ns(),Me;},remove:function(me,xe){~(xe=Nt.indexOf(me))&&Nt.splice(xe,1)&&xe<=Ue&&Ue--;},_listeners:Nt=[]}),Ns=function(){return!ae&&jo.wake();},_n={},yd=/^[\d.\-M][\d.\-,\s]/,_u=/["']/g,Kl=function(me){for(var xe,Ie,Me,Ne={},ze=me.substr(1,me.length-3).split(":"),Je=ze[0],ft=1,Xe=ze.length;ft<Xe;ft++)Ie=ze[ft],xe=ft!==Xe-1?Ie.lastIndexOf(","):Ie.length,Me=Ie.substr(0,xe),Ne[Je]=isNaN(Me)?Me.replace(_u,"").trim():+Me,Je=Ie.substr(xe+1).trim();return Ne;},sf=function(me){var xe=me.indexOf("(")+1,Ie=me.indexOf(")"),Me=me.indexOf("(",xe);return me.substring(xe,~Me&&Me<Ie?me.indexOf(")",Ie+1):Ie);},bu=function(me){return function(xe){return 1-me(1-xe);};},Ko=function(me,xe){return me&&(ci(me)?me:_n[me]||(Ie=((me=me)+"").split("("),(Me=_n[Ie[0]])&&1<Ie.length&&Me.config?Me.config.apply(null,~me.indexOf("{")?[Kl(Ie[1])]:sf(me).split(",").map(er)):_n._CE&&yd.test(me)?_n._CE("",me):Me))||xe;var Ie,Me;};function Zl(me){var xe,Ie,Me,Ne=Be()-ht,ze=me===!0;if((nt<Ne||Ne<0)&&(ot+=Ne-it),(0<(Ne=(Ie=(ht+=Ne)-ot)-At)||ze)&&(Me=++Ut.frame,De=Ie-1e3*Ut.time,Ut.time=Ie/=1e3,At+=Ne+(Et<=Ne?4:Et-Ne),xe=1),ze||(de=ye(Zl)),xe)for(Ue=0;Ue<Nt.length;Ue++)Nt[Ue](Ie,De,Me,me);}function ys(me){return me<Ge?bi*me*me:me<.7272727272727273?bi*Math.pow(me-1.5/2.75,2)+.75:me<.9090909090909092?bi*(me-=2.25/2.75)*me+.9375:bi*Math.pow(me-2.625/2.75,2)+.984375;}Yo("Linear,Quad,Cubic,Quart,Quint,Strong",function(me,xe){var Ie=xe<5?xe+1:xe;Y(me+",Power"+(Ie-1),xe?function(Me){return Math.pow(Me,Ie);}:function(Me){return Me;},function(Me){return 1-Math.pow(1-Me,Ie);},function(Me){return Me<.5?Math.pow(2*Me,Ie)/2:1-Math.pow(2*(1-Me),Ie)/2;});}),_n.Linear.easeNone=_n.none=_n.Linear.easeIn,Y("Elastic",D("in"),D("out"),D()),bi=7.5625,Ge=1/2.75,Y("Bounce",function(me){return 1-ys(1-me);},ys),Y("Expo",function(me){return me?Math.pow(2,10*(me-1)):0;}),Y("Circ",function(me){return-(Kt(1-me*me)-1);}),Y("Sine",function(me){return me===1?1:1-Dt(me*Mt);}),Y("Back",$("in"),$("out"),$()),_n.SteppedEase=_n.steps=Pn.SteppedEase={config:function(me,xe){var Ie=1/(me=me===void 0?1:me),Me=me+(xe?0:1),Ne=xe?1:0,ze=1-gt;return function(Je){return((Me*Z(0,ze,Je)|0)+Ne)*Ie;};}},yt.ease=_n["quad.out"],Yo("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(me){return pr+=me+","+me+"Params,";});function Bo(me,xe,Ie){return me.setAttribute(xe,Ie);}function Vs(me,xe,Ie,Me){Me.mSet(me,xe,Me.m.call(Me.tween,Ie,Me.mt),Me);}function Yr(me){(wl[me]||Sd).map(function(xe){return xe();});}function Gn(){var me=Date.now(),xe=[];2<me-tc&&(Yr("matchMediaInit"),Qo.forEach(function(Ie){var Me,Ne,ze,Je,ft=Ie.queries,Xe=Ie.conditions;for(Ne in ft)(Me=ge.matchMedia(ft[Ne]).matches)&&(ze=1),Me!==Xe[Ne]&&(Xe[Ne]=Me,Je=1);Je&&(Ie.revert(),ze&&xe.push(Ie));}),Yr("matchMediaRevert"),xe.forEach(function(Ie){return Ie.onMatch(Ie,function(Me){return Ie.add(null,Me);});}),tc=me,Yr("matchMedia"));}function Aa(me,xe){return{name:me,rawVars:1,init:function(Ie,Me,Ne){Ne._onInit=function(ze){var Je,ft;if(si(Me)&&(Je={},Yo(Me,function(ki){return Je[ki]=1;}),Me=Je),xe){for(ft in Je={},Me)Je[ft]=xe(Me[ft]);
3Me=Je;}var Xe,Tt,St,Xt=ze,pi=Me,vi=Xt._targets;for(Xe in pi)for(Tt=vi.length;Tt--;)(St=(St=Xt._ptLookup[Tt][Xe])&&St.d)&&(St=St._pt?dn(St,Xe):St)&&St.modifier&&St.modifier(pi[Xe],Xt,vi[Tt],Xe);};}};}var ha,js,vd=function(me,xe){this.id=Lt++,(me._gsap=this).target=me,this.harness=xe,this.get=xe?xe.get:fu,this.set=xe?xe.getSetter:Sl;},vs=function(){function me(Ie){this.vars=Ie,this._delay=+Ie.delay||0,(this._repeat=Ie.repeat===1/0?-2:Ie.repeat||0)&&(this._rDelay=Ie.repeatDelay||0,this._yoyo=!!Ie.yoyo||!!Ie.yoyoEase),this._ts=1,te(this,+Ie.duration,1,1),this.data=Ie.data,se&&(this._ctx=se).data.push(this),ae||jo.wake();}var xe=me.prototype;return xe.delay=function(Ie){return Ie||Ie===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+Ie-this._delay),this._delay=Ie,this):this._delay;},xe.duration=function(Ie){return arguments.length?this.totalDuration(0<this._repeat?Ie+(Ie+this._rDelay)*this._repeat:Ie):this.totalDuration()&&this._dur;},xe.totalDuration=function(Ie){return arguments.length?(this._dirty=0,te(this,this._repeat<0?Ie:(Ie-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur;},xe.totalTime=function(Ie,Me){if(Ns(),!arguments.length)return this._tTime;var Ne=this._dp;if(Ne&&Ne.smoothChildTiming&&this._ts){for(Ls(this,Ie),Ne._dp&&!Ne.parent&&M(Ne,this);Ne&&Ne.parent;)Ne.parent._time!==Ne._start+(0<=Ne._ts?Ne._tTime/Ne._ts:(Ne.totalDuration()-Ne._tTime)/-Ne._ts)&&Ne.totalTime(Ne._tTime,!0),Ne=Ne.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&Ie<this._tDur||this._ts<0&&0<Ie||!this._tDur&&!Ie)&&N(this._dp,this,this._start-this._delay);}return(this._tTime!==Ie||!this._dur&&!Me||this._initted&&Math.abs(this._zTime)===gt||!Ie&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=Ie),d(this,Ie,Me)),this;},xe.time=function(Ie,Me){return arguments.length?this.totalTime(Math.min(this.totalDuration(),Ie+C(this))%(this._dur+this._rDelay)||(Ie?this._dur:0),Me):this._time;},xe.totalProgress=function(Ie,Me){return arguments.length?this.totalTime(this.totalDuration()*Ie,Me):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<this.rawTime()?1:0;},xe.progress=function(Ie,Me){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?Ie:1-Ie)+C(this),Me):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0;},xe.iteration=function(Ie,Me){var Ne=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(Ie-1)*Ne,Me):this._repeat?I(this._tTime,Ne)+1:1;},xe.timeScale=function(Ie,Me){if(!arguments.length)return this._rts===-gt?0:this._rts;if(this._rts===Ie)return this;for(var Ne=this.parent&&this._ts?O(this.parent._time,this):this._tTime,Ie=(this._rts=+Ie||0,this._ts=this._ps||Ie===-gt?0:this._rts,this.totalTime(Z(-Math.abs(this._delay),this._tDur,Ne),Me!==!1),Hl(this),this),ze=Ie.parent;ze&&ze.parent;)ze._dirty=1,ze.totalDuration(),ze=ze.parent;return Ie;},xe.paused=function(Ie){return arguments.length?(this._ps!==Ie&&((this._ps=Ie)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ns(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==gt&&(this._tTime-=gt)))),this):this._ps;},xe.startTime=function(Ie){var Me;return arguments.length?(this._start=Ie,!(Me=this.parent||this._dp)||!Me._sort&&this.parent||N(Me,this,Ie-this._delay),this):this._start;},xe.endTime=function(Ie){return this._start+(_(Ie)?this.totalDuration():this.duration())/Math.abs(this._ts||1);},xe.rawTime=function(Ie){var Me=this.parent||this._dp;return Me?Ie&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?O(Me.rawTime(Ie),this):this._tTime:this._tTime;},xe.revert=function(Ie){var Me=le;return le=Ie=Ie===void 0?kr:Ie,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(Ie),this.totalTime(-.01,Ie.suppressEvents)),this.data!=="nested"&&Ie.kill!==!1&&this.kill(),le=Me,this;},xe.globalTime=function(Ie){for(var Me=this,Ne=arguments.length?Ie:Me.rawTime();Me;)Ne=Me._start+Ne/(Math.abs(Me._ts)||1),Me=Me._dp;return!this.parent&&this._sat?this._sat.globalTime(Ie):Ne;},xe.repeat=function(Ie){return arguments.length?(this._repeat=Ie===1/0?-2:Ie,K(this)):this._repeat===-2?1/0:this._repeat;},xe.repeatDelay=function(Ie){var Me;return arguments.length?(Me=this._time,this._rDelay=Ie,K(this),Me?this.time(Me):this):this._rDelay;},xe.yoyo=function(Ie){return arguments.length?(this._yoyo=Ie,this):this._yoyo;},xe.seek=function(Ie,Me){return this.totalTime(V(this,Ie),_(Me));},xe.restart=function(Ie,Me){return this.play().totalTime(Ie?-this._delay:0,_(Me));},xe.play=function(Ie,Me){return Ie!=null&&this.seek(Ie,Me),this.reversed(!1).paused(!1);},xe.reverse=function(Ie,Me){return Ie!=null&&this.seek(Ie||this.totalDuration(),Me),this.reversed(!0).paused(!1);},xe.pause=function(Ie,Me){return Ie!=null&&this.seek(Ie,Me),this.paused(!0);},xe.resume=function(){return this.paused(!1);},xe.reversed=function(Ie){return arguments.length?(!!Ie!==this.reversed()&&this.timeScale(-this._rts||(Ie?-gt:0)),this):this._rts<0;},xe.invalidate=function(){return this._initted=this._act=0,this._zTime=-gt,this;},xe.isActive=function(){var Ie=this.parent||this._dp,Me=this._start;return!(Ie&&!(this._ts&&this._initted&&Ie.isActive()&&(Ie=Ie.rawTime(!0))>=Me&&Ie<this.endTime(!0)-gt));},xe.eventCallback=function(Ie,Me,Ne){var ze=this.vars;return 1<arguments.length?(Me?(ze[Ie]=Me,Ne&&(ze[Ie+"Params"]=Ne),Ie==="onUpdate"&&(this._onUpdate=Me)):delete ze[Ie],this):ze[Ie];},xe.then=function(Ie){var Me=this;return new Promise(function(Ne){function ze(){var ft=Me.then;Me.then=null,ci(Je)&&(Je=Je(Me))&&(Je.then||Je===Me)&&(Me.then=ft),Ne(Je),Me.then=ft;}var Je=ci(Ie)?Ie:m;Me._initted&&Me.totalProgress()===1&&0<=Me._ts||!Me._tTime&&Me._ts<0?ze():Me._prom=ze;});},xe.kill=function(){J(this);},me;}(),Ur=(to(vs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-gt,_prom
vendor: 4,137 bytes, line 3
3:0,_ps:!1,_rts:1}),function(me){function xe(Me,Ne){var ze;return(ze=me.call(this,Me=Me===void 0?{}:Me)||this).labels={},ze.smoothChildTiming=!!Me.smoothChildTiming,ze.autoRemoveChildren=!!Me.autoRemoveChildren,ze._sort=_(Me.sortChildren),fe&&N(Me.parent||fe,t(ze),Ne),Me.reversed&&ze.reverse(),Me.paused&&ze.paused(!0),Me.scrollTrigger&&G(t(ze),Me.scrollTrigger),ze;}n(xe,me);var Ie=xe.prototype;return Ie.to=function(Me,Ne,ze){return U(0,arguments,this),this;},Ie.from=function(Me,Ne,ze){return U(1,arguments,this),this;},Ie.fromTo=function(Me,Ne,ze,Je){return U(2,arguments,this),this;},Ie.set=function(Me,Ne,ze){return Ne.duration=0,Ne.parent=this,g(Ne).repeatDelay||(Ne.repeat=0),Ne.immediateRender=!!Ne.immediateRender,new tr(Me,Ne,V(this,ze),1),this;},Ie.call=function(Me,Ne,ze){return N(this,tr.delayedCall(0,Me,Ne),ze);},Ie.staggerTo=function(Me,Ne,ze,Je,ft,Xe,Tt){return ze.duration=Ne,ze.stagger=ze.stagger||Je,ze.onComplete=Xe,ze.onCompleteParams=Tt,ze.parent=this,new tr(Me,ze,V(this,ft)),this;},Ie.staggerFrom=function(Me,Ne,ze,Je,ft,Xe,Tt){return ze.runBackwards=1,g(ze).immediateRender=_(ze.immediateRender),this.staggerTo(Me,Ne,ze,Je,ft,Xe,Tt);},Ie.staggerFromTo=function(Me,Ne,ze,Je,ft,Xe,Tt,St){return Je.startAt=ze,g(Je).immediateRender=_(Je.immediateRender),this.staggerTo(Me,Ne,Je,ft,Xe,Tt,St);},Ie.render=function(Me,Ne,ze){var Je,ft,Xe,Tt,St,Xt,pi,vi,ki,ai,qt=this._time,fi=this._dirty?this.totalDuration():this._tDur,di=this._dur,ni=Me<=0?0:ar(Me),Hi=this._zTime<0!=Me<0&&(this._initted||!di);if((ni=this!==fe&&fi<ni&&0<=Me?fi:ni)!==this._tTime||ze||Hi){if(qt!==this._time&&di&&(ni+=this._time-qt,Me+=this._time-qt),Je=ni,vi=this._start,St=!(pi=this._ts),Hi&&(di||(qt=this._zTime),!Me&&Ne||(this._zTime=Me)),this._repeat){if(Hi=this._yoyo,Tt=di+this._rDelay,this._repeat<-1&&Me<0)return this.totalTime(100*Tt+Me,Ne,ze);if(Je=ar(ni%Tt),ni===fi?(Xe=this._repeat,Je=di):((Xe=~~(ni/Tt))&&Xe===ni/Tt&&(Je=di,Xe--),di<Je&&(Je=di)),ki=I(this._tTime,Tt),Hi&&1&Xe&&(Je=di-Je,ai=1),Xe!==(ki=!qt&&this._tTime&&ki!==Xe&&this._tTime-ki*Tt-this._dur<=0?Xe:ki)&&!this._lock){var rt=Hi&&1&ki,Hi=rt===(Hi&&1&Xe),qt=(rt=Xe<ki?!rt:rt)?0:ni%di?di:ni;if(this._lock=1,this.render(qt||(ai?0:ar(Xe*Tt)),Ne,!di)._lock=0,this._tTime=ni,!Ne&&this.parent&&q(this,"onRepeat"),this.vars.repeatRefresh&&!ai&&(this.invalidate()._lock=1),qt&&qt!==this._time||St!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(di=this._dur,fi=this._tDur,Hi&&(this._lock=2,this.render(qt=rt?di:-1e-4,!0),this.vars.repeatRefresh&&!ai&&this.invalidate()),this._lock=0,!this._ts&&!St)return this;X(this,ai);}}if(this._hasPause&&!this._forcing&&this._lock<2&&(Xt=function(ur,xn,Tn){var Cn;if(xn<Tn)for(Cn=ur._first;Cn&&Cn._start<=Tn;){if(Cn.data==="isPause"&&Cn._start>xn)return Cn;Cn=Cn._next;}else for(Cn=ur._last;Cn&&Cn._start>=Tn;){if(Cn.data==="isPause"&&Cn._start<xn)return Cn;Cn=Cn._prev;}}(this,ar(qt),ar(Je)))&&(ni-=Je-(Je=Xt._start)),this._tTime=ni,this._time=Je,this._act=!pi,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=Me,qt=0),!qt&&Je&&!Ne&&!Xe&&(q(this,"onStart"),this._tTime!==ni))return this;if(qt<=Je&&0<=Me)for(ri=this._first;ri;){if(ft=ri._next,(ri._act||Je>=ri._start)&&ri._ts&&Xt!==ri){if(ri.parent!==this)return this.render(Me,Ne,ze);if(ri.render(0<ri._ts?(Je-ri._start)*ri._ts:(ri._dirty?ri.totalDuration():ri._tDur)+(Je-ri._start)*ri._ts,Ne,ze),Je!==this._time||!this._ts&&!St){Xt=0,ft&&(ni+=this._zTime=-gt);break;}}ri=ft;}else for(var ri=this._last,on=Me<0?Me:Je;ri;){if(ft=ri._prev,(ri._act||on<=ri._end)&&ri._ts&&Xt!==ri){if(ri.parent!==this)return this.render(Me,Ne,ze);if(ri.render(0<ri._ts?(on-ri._start)*ri._ts:(ri._dirty?ri.totalDuration():ri._tDur)+(on-ri._start)*ri._ts,Ne,ze||le&&(ri._initted||ri._startAt)),Je!==this._time||!this._ts&&!St){Xt=0,ft&&(ni+=this._zTime=on?-gt:gt);break;}}ri=ft;}if(Xt&&!Ne&&(this.pause(),Xt.render(qt<=Je?0:-gt)._zTime=qt<=Je?1:-1,this._ts))return this._start=vi,Hl(this),this.render(Me,Ne,ze);this._onUpdate&&!Ne&&q(this,"onUpdate",!0),!(ni===fi&&this._tTime>=this.totalDuration()||!ni&&qt)||vi!==this._start&&Math.abs(pi)===Math.abs(this._ts
3)||this._lock||(!Me&&di||!(ni===fi&&0<this._ts||!ni&&this._ts<0)||v(this,1),Ne||Me<0&&!qt||!ni&&!qt&&fi||(q(this,ni===fi&&0<=Me?"onComplete":"onReverseComplete",!0),!this._prom||ni<fi&&0<this.timeScale()||this._prom()));}return this;},Ie.add=function(Me,Ne){var ze=this;if(o(Ne)||(Ne=V(this,Ne,Me)),!(Me instanceof vs)){if(Fi(Me))return Me.forEach(function(Je){return ze.add(Je,Ne);}),this;if(si(Me))return this.addLabel(Me,Ne);if(!ci(Me))return this;Me=tr.delayedCall(0,Me);}return this!==Me?N(this,Me,Ne):this;},Ie.getChildren=function(Me,Ne,ze,Je){Me===void 0&&(Me=!0),Ne===void 0&&(Ne=!0),ze===void 0&&(ze=!0),Je===void 0&&(Je=-bt);for(var ft=[],Xe=this._first;Xe;)Xe._start>=Je&&(Xe instanceof tr?Ne&&ft.push(Xe):(ze&&ft.push(Xe),Me&&ft.push.apply(ft,Xe.getChildren(!0,Ne,ze)))),Xe=Xe._next;return ft;},Ie.getById=function(Me){for(var Ne=this.getChildren(1,1,1),ze=Ne.length;ze--;)if(Ne[ze].vars.id===Me)return Ne[ze];},Ie.remove=function(Me){return si(Me)?this.removeLabel(Me):ci(Me)?this.killTweensOf(Me):(Mo(this,Me),Me===this._recent&&(this._recent=this._last),Ia(this));},Ie.totalTime=function(Me,Ne){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ar(jo.time-(0<this._ts?Me/this._ts:(this.totalDuration()-Me)/-this._ts))),me.prototype.totalTime.call(this,Me,Ne),this._forcing=0,this):this._tTime;},Ie.addLabel=function(Me,Ne){return this.labels[Me]=V(this,Ne),this;},Ie.removeLabel=function(Me){return delete this.labels[Me],this;},Ie.addPause=function(Me,Ne,ze){return Ne=tr.delayedCall(0,Ne||p,ze),Ne.data="isPause",this._hasPause=1,N(this,Ne,V(this,Me));},Ie.removePause=function(Me){var Ne=this._first;for(Me=V(this,Me);Ne;)Ne._start===Me&&Ne.data==="isPause"&&v(Ne),Ne=Ne._next;},Ie.killTweensOf=function(Me,Ne,ze){for(var Je=this.getTweensOf(Me,ze),ft=Je.length;ft--;)ha!==Je[ft]&&Je[ft].kill(Me,Ne);return this;},Ie.getTweensOf=function(Me,Ne){for(var ze,Je=[],ft=po(Me),Xe=this._first,Tt=o(Ne);Xe;)Xe instanceof tr?function(St,Xt){for(var pi=Xt.length,vi=0;St.indexOf(Xt[vi])<0&&++vi<pi;);return vi<pi;}(Xe._targets,ft)&&(Tt?(!ha||Xe._initted&&Xe._ts)&&Xe.globalTime(0)<=Ne&&Xe.globalTime(Xe.totalDuration())>Ne:!Ne||Xe.isActive())&&Je.push(Xe):(ze=Xe.getTweensOf(ft,Ne)).length&&Je.push.apply(Je,ze),Xe=Xe._next;return Je;},Ie.tweenTo=function(Xt,Ne){Ne=Ne||{};var ze,Je=this,ft=V(Je,Xt),Xt=Ne,Xe=Xt.startAt,Tt=Xt.onStart,St=Xt.onStartParams,Xt=Xt.immediateRender,pi=tr.to(Je,to({ease:Ne.ease||"none",lazy:!1,immediateRender:!1,time:ft,overwrite:"auto",duration:Ne.duration||Math.abs((ft-(Xe&&"time"in Xe?Xe.time:Je._time))/Je.timeScale())||gt,onStart:function(){var vi;Je.pause(),ze||(vi=Ne.duration||Math.abs((ft-(Xe&&"time"in Xe?Xe.time:Je._time))/Je.timeScale()),pi._dur!==vi&&te(pi,vi,0,1).render(pi._time,!0,!0),ze=1),Tt&&Tt.apply(pi,St||[]);}},Ne));return Xt?pi.render(0):pi;},Ie.tweenFromTo=function(Me,Ne,ze){return this.tweenTo(Ne,to({startAt:{time:V(this,Me)}},ze));},Ie.recent=function(){return this._recent;},Ie.nextLabel=function(Me){return Me===void 0&&(Me=this._time),ue(this,V(this,Me));},Ie.previousLabel=function(Me){return Me===void 0&&(Me=this._time),ue(this,V(this,Me),1);},Ie.currentLabel=function(Me){return arguments.length?this.seek(Me,!0):this.previousLabel(this._time+gt);},Ie.shiftChildren=function(Me,Ne,ze){ze===void 0&&(ze=0);for(var Je,ft=this._first,Xe=this.labels;ft;)ft._start>=ze&&(ft._start+=Me,ft._end+=Me),ft=ft._next;if(Ne)for(Je in Xe)Xe[Je]>=ze&&(Xe[Je]+=Me);return Ia(this);},Ie.invalidate=function(Me){var Ne=this._first;for(this._lock=0;Ne;)Ne.invalidate(Me),Ne=Ne._next;return me.prototype.invalidate.call(this,Me);},Ie.clear=function(Me){Me===void 0&&(Me=!0);for(var Ne,ze=this._first;ze;)Ne=ze._next,this.remove(ze),ze=Ne;return this._dp&&(this._time=this._tTime=this._pTime=0),Me&&(this.labels={}),Ia(this);},Ie.totalDuration=function(Me){var Ne,ze,Je,ft=0,Xe=this,Tt=Xe._last,St=bt;if(arguments.length)return Xe.timeScale((Xe._repeat<0?Xe.duration():Xe.totalDuration())/(Xe.reversed()?-Me:Me));if(Xe._dirty){for(Je=Xe.parent;Tt;)Ne=Tt._prev,Tt._dirty&&Tt.totalDuration(),St<(ze=Tt._start)&&Xe._sort&&Tt._ts&&!Xe._lock?(Xe._lock=1,N(Xe,Tt,ze-Tt._delay,1)._lock=0):St=ze,ze<0&&Tt._ts&&(ft-=ze,(!Je&&!Xe._dp||Je&&Je.smoothChildTiming)&&(Xe._start+=ze/Xe._ts,Xe._time-=ze,Xe._tTime-=ze),Xe.shiftChildren(-ze,!1,-1/0),St=0),Tt._end>ft&&Tt._ts&&(ft=Tt._end),Tt=Ne;te(Xe,Xe===fe&&Xe._time>ft?Xe._time:ft,1,1),Xe._dirty=0;}return Xe._tDur;},xe.updateRoot=function(Me){if(fe._ts&&(d(fe,O(Me,fe)),ee=jo.frame),jo.frame>=Un){Un+=qe.autoSleep||120;var Ne=fe._first;if((!Ne||!Ne._ts)&&qe.autoSleep&&jo._listeners.length<2){for(;Ne&&!Ne._ts;)Ne=Ne._next;Ne||jo.sleep();}}},xe;}(vs)),Su=(to(Ur.prototype,{_lock:0,_hasPause:0,_forcing:0}),function(me,xe,vi,Me,Xt,pi,Je,ft,Xe,Tt){ci(Me)&&(Me=Me(Xt||0,me,pi));var St,Xt=me[xe],pi=vi!=="get"?vi:ci(Xt)?Xe?me[xe.indexOf("set")||!ci(me["get"+xe.substr(3)])?xe:"get"+xe.substr(3)](Xe):me[xe]():Xt,vi=ci(Xt)?Xe?xu:bd:Ql;if(!si(Me)||(Me=~Me.indexOf("random(")?ql(Me):Me).charAt(1)!=="="||!(St=ps(pi,Me)+(Vo(pi)||0))&&St!==0||(Me=St),!Tt||pi!==Me||js)return isNaN(pi*Me)||Me===""?(Xt||xe in me||or(xe,Me),function(ki,ai,qt,fi,di,ni,Hi){var rt,ri,on,ur,xn,Tn=new _s(this._pt,ki,ai,0,1,Jl,null,di),Cn=0,Vr=0;for(Tn.b=qt,Tn.e=fi,qt+="",(di=~(fi+="").indexOf("random("))&&(fi=ql(fi)),ni&&(ni(ni=[qt,fi],ki,ai),qt=ni[0],fi=ni[1]),rt=qt.match(Ii)||[];ur=Ii.exec(fi);)on=ur[0],ur=fi.substring(Cn,ur.index),ri?ri=(ri+1)%5:ur.substr(-5)==="rgba("&&(ri=1),on!==rt[Vr++]&&(xn=parseFloat(rt[Vr-1])||0,Tn._pt={_next:Tn._pt,p:ur||Vr===1?ur:",",s:xn,
3c:on.charAt(1)==="="?ps(xn,on)-xn:parseFloat(on)-xn,m:ri&&ri<4?Math.round:0},Cn=Ii.lastIndex);return Tn.c=Cn<fi.length?fi.substring(Cn,fi.length):"",Tn.fp=Hi,(Ui.test(fi)||di)&&(Tn.e=0),this._pt=Tn;}.call(this,me,xe,pi,Me,vi,ft||qe.stringFilter,Xe)):(St=new _s(this._pt,me,xe,+pi||0,Me-(pi||0),typeof Xt=="boolean"?Zo:Tu,0,vi),Xe&&(St.fp=Xe),Je&&St.modifier(Je,this,me),this._pt=St);}),wu=function(me,xe,Ie,Me,Ne,ze){var Je,ft,Xe,Tt;if(xi[me]&&(Je=new xi[me]()).init(Ne,Je.rawVars?xe[me]:function(St,Xt,pi,vi,ki){if(ci(St)&&(St=bl(St,ki,Xt,pi,vi)),!Oi(St)||St.style&&St.nodeType||Fi(St)||Pi(St))return si(St)?bl(St,ki,Xt,pi,vi):St;var ai,qt={};for(ai in St)qt[ai]=bl(St[ai],ki,Xt,pi,vi);return qt;}(xe[me],Me,Ne,ze,Ie),Ie,Me,ze)!==!1&&(Ie._pt=ft=new _s(Ie._pt,Ne,me,0,1,Je.render,Je,0,Je.priority),Ie!==W))for(Xe=Ie._ptLookup[Ie._targets.indexOf(Ne)],Tt=Je._props.length;Tt--;)Xe[Je._props[Tt]]=ft;return Je;},_l=function me(xe,Ie,Me){var Ne,ze,Je,ft,Xe,Tt,St,Xt,pi,vi,ki,ai,qt,fi=xe.vars,di=fi.ease,ni=fi.startAt,Hi=fi.immediateRender,rt=fi.lazy,ri=fi.onUpdate,on=fi.runBackwards,ur=fi.yoyoEase,xn=fi.keyframes,Tn=fi.autoRevert,Cn=xe._dur,Vr=xe._startAt,fo=xe._targets,Jo=xe.parent,Eo=Jo&&Jo.data==="nested"?Jo.vars.targets:fo,ea=xe._overwrite==="auto"&&!ne,Ro=xe.timeline;if(xe._ease=Ko(di=!Ro||xn&&di?di:"none",yt.ease),xe._yEase=ur?bu(Ko(ur===!0?di:ur,yt.ease)):0,ur&&xe._yoyo&&!xe._repeat&&(ur=xe._yEase,xe._yEase=xe._ease,xe._ease=ur),xe._from=!Ro&&!!fi.runBackwards,!Ro||xn&&!fi.stagger){if(ai=(Xt=fo[0]?Er(fo[0]).harness:0)&&fi[Xt.prop],Ne=l(fi,pn),Vr&&(Vr._zTime<0&&Vr.progress(1),Ie<0&&on&&Hi&&!Tn?Vr.render(-1,!0):Vr.revert(on&&Cn?wr:Wr),Vr._lazy=0),ni){if(v(xe._startAt=tr.set(fo,to({data:"isStart",overwrite:!1,parent:Jo,immediateRender:!0,lazy:!Vr&&_(rt),startAt:null,delay:0,onUpdate:ri&&function(){return q(xe,"onUpdate");},stagger:0},ni))),xe._startAt._dp=0,xe._startAt._sat=xe,Ie<0&&(le||!Hi&&!Tn)&&xe._startAt.revert(wr),Hi&&Cn&&Ie<=0&&Me<=0)return void(Ie&&(xe._zTime=Ie));}else if(on&&Cn&&!Vr)if(Je=to({overwrite:!1,data:"isFromStart",lazy:(Hi=Ie?!1:Hi)&&!Vr&&_(rt),immediateRender:Hi,stagger:0,parent:Jo},Ne),ai&&(Je[Xt.prop]=ai),v(xe._startAt=tr.set(fo,Je)),xe._startAt._dp=0,xe._startAt._sat=xe,Ie<0&&(le?xe._startAt.revert(wr):xe._startAt.render(-1,!0)),xe._zTime=Ie,Hi){if(!Ie)return;}else me(xe._startAt,gt,gt);for(xe._pt=xe._ptCache=0,rt=Cn&&_(rt)||rt&&!Cn,ze=0;ze<fo.length;ze++){if(St=(Xe=fo[ze])._gsap||c(fo)[ze]._gsap,xe._ptLookup[ze]=vi={},hr[St.id]&&yn.length&&zl(),ki=Eo===fo?ze:Eo.indexOf(Xe),Xt&&(pi=new Xt()).init(Xe,ai||Ne,xe,ki,Eo)!==!1&&(xe._pt=ft=new _s(xe._pt,Xe,pi.name,0,1,pi.render,pi,0,pi.priority),pi._props.forEach(function(sc){vi[sc]=ft;}),pi.priority&&(Tt=1)),!Xt||ai)for(Je in Ne)xi[Je]&&(pi=wu(Je,Ne,xe,ki,Xe,Eo))?pi.priority&&(Tt=1):vi[Je]=ft=Su.call(xe,Xe,Je,"get",Ne[Je],ki,Eo,0,fi.stringFilter);xe._op&&xe._op[ze]&&xe.kill(Xe,xe._op[ze]),ea&&xe._pt&&(ha=xe,fe.killTweensOf(Xe,vi,xe.globalTime(Ie)),qt=!xe.parent,ha=0),xe._pt&&rt&&(hr[St.id]=1);}Tt&&Ou(xe),xe._onInit&&xe._onInit(xe);}xe._onUpdate=ri,xe._initted=(!xe._op||xe._pt)&&!qt,xn&&Ie<=0&&Ro.render(bt,!0,!0);},bl=function(me,xe,Ie,Me,Ne){return ci(me)?me.call(xe,Ie,Me,Ne):si(me)&&~me.indexOf("random(")?ql(me):me;},Eu=pr+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_d={},tr=(Yo(Eu+",id,stagger,delay,duration,paused,scrollTrigger",function(me){return _d[me]=1;}),function(me){function xe(Me,Ne,ze,xn){typeof Ne=="number"&&(ze.duration=Ne,Ne=ze,ze=null);var ft,Xe,Tt,St,Xt,pi,vi,ki,ai,xn=(ft=me.call(this,xn?Ne:g(Ne))||this).vars,qt=xn.duration,fi=xn.delay,di=xn.immediateRender,ni=xn.stagger,Hi=xn.overwrite,rt=xn.keyframes,ri=xn.defaults,on=xn.scrollTrigger,ur=xn.yoyoEase,xn=Ne.parent||fe,Tn=(Fi(Me)||Pi(Me)?o(Me[0]):"length"in Ne)?[Me]:po(Me);if(ft._targets=Tn.length?c(Tn):y("GSAP target "+Me+" not found. https://gsap.com",!qe.nullTargetWarn)||[],ft._ptLookup=[],ft._overwrite=Hi,rt||ni||x(qt)||x(fi)){if(Ne=ft.vars,(Xe=ft.timeline=new Ur({data:"nested",defaults:ri||{},targets:xn&&xn.data==="nested"?xn.vars.targets:Tn})).kill(),Xe.parent=Xe._dp=t(ft),Xe._start=0,ni||x(qt)||x(fi)){if(Xt=Tn.length,ki=ni&&yl(ni),Oi(ni))for(pi in ni)~Eu.indexOf(pi)&&((ai=ai||{})[pi]=ni[pi]);for(Tt=0;Tt<Xt;Tt++)(St=l(Ne,_d)).stagger=0,ur&&(St.yoyoEase=ur),ai&&a(St,ai),vi=Tn[Tt],St.duration=+bl(qt,t(ft),Tt,vi,Tn),St.delay=(+bl(fi,t(ft),Tt,vi,Tn)||0)-ft._delay,!ni&&Xt===1&&St.delay&&(ft._delay=fi=St.delay,ft._start+=fi,St.delay=0),Xe.to(vi,St,ki?ki(Tt,vi,Tn):0),Xe._ease=_n.none;Xe.duration()?qt=fi=0:ft.timeline=0;}else if(rt){g(to(Xe.vars.defaults,{ease:"none"})),Xe._ease=Ko(rt.ease||Ne.ease||"none");var Cn,Vr,fo,Jo=0;if(Fi(rt))rt.forEach(function(Eo){return Xe.to(Tn,Eo,">");}),Xe.duration();else{for(pi in St={},rt)pi!=="ease"&&pi!=="easeEach"&&function(Eo,ea,Ro,sc){var Fs,Us,xl=ea.ease||sc||"power1.inOut";if(Fi(ea))Us=Ro[Eo]||(Ro[Eo]=[]),ea.forEach(function(Id,Ru){return Us.push({t:Ru/(ea.length-1)*100,v:Id,e:xl});});else for(Fs in ea)Us=Ro[Fs]||(Ro[Fs]=[]),Fs!=="ease"&&Us.push({t:parseFloat(Eo),v:ea[Fs],e:xl});}(pi,rt[pi],St,rt.easeEach);for(pi in St)for(Cn=St[pi].sort(function(Eo,ea){return Eo.t-ea.t;}),Tt=Jo=0;Tt<Cn.length;Tt++)(fo={ease:(Vr=Cn[Tt]).e,duration:(Vr.t-(Tt?Cn[Tt-1].t:0))/100*qt})[pi]=Vr.v,Xe.to(Tn,fo,Jo),Jo+=fo.duration;Xe.duration()<qt&&Xe.to({},{duration:qt-Xe.duration()});}}qt||ft.duration(qt=Xe.duration());}else ft.timeline=0;return Hi!==!0||ne||(ha=t(ft),fe.killTweensOf(Tn),ha=0),N(xn,t(ft),ze),Ne.reversed&&ft.reverse(),Ne.paused&&ft.paused(!0),(di||!qt&&!rt&&ft._start===ar(xn._time)&&_(di)&&w(t(ft))&&xn.data!=="nested")&&(ft._tTime=-gt,ft.render(Math.max(0,-fi)||0)),on&&G(t(ft),on),ft;}n(xe,me);var Ie=xe.prototype;return Ie.render=function(Me,Ne,ze){var Je,ft,Xe,Tt=this._time,St=this._tDur,Xt=this._dur,pi=Me<0,vi=St-gt<Me&&!pi?St:Me<gt?0:Me;if(Xt){if(vi!==this._tTime||!Me||ze||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=pi){if(ni=vi,di=this.timeline,this._repeat){if(qt=Xt+this._rDelay,this._repeat<-1&&pi)return this.totalTime(100*qt+Me,Ne,ze);if(ni=ar(vi%qt),vi===St?(Hi=this._repeat,ni=Xt):((Hi=~~(vi/qt))&&Hi===ar(vi/qt)&&(ni=Xt,Hi--),Xt<ni&&(ni=Xt)),(ft=this._yoyo&&1&Hi)&&(fi=this._yEase,ni=Xt-ni),ri=I(this._tTime,qt),ni===Tt&&!ze&&this._initted&&Hi===ri)return this._tTime=vi,this;Hi!==ri&&(di&&this._yEase&&X(di,ft),this.vars.repeatRefresh&&!ft&&!this._lock&&this._time!==qt&&this._initted&&(this._lock=ze=1,this.render(ar(qt*Hi),!0).invalidate()._lock=0));}if(!this._initted){if(H(this,pi?Me:ni,ze,Ne,vi))return this._tTime=0,this;if(!(Tt===this._time||ze&&this.vars.repeatRefresh&&Hi!==ri))return this;if(Xt!==this._dur)return this.render(Me,Ne,ze);}if(this._tTime=vi,this._time=ni,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=Xe=(fi||this._ease)(ni/Xt),this._from&&(this.ratio=Xe=1-Xe),ni&&!Tt&&!Ne&&!Hi&&(q(this,"onStart"),this._tTime!==vi))return this;for(Je=this._pt;Je;)Je.r(Xe,Je.d),Je=Je._next;di&&di.render(Me<0?Me:di._dur*di._ease(ni/this._dur),Ne,ze)||this._startAt&&(this._zTime=Me),this._onUpdate&&!Ne&&(pi&&S(this,Me,0,ze),q(this,"onUpdate")),this._repeat&&Hi!==ri&&this.vars.onRepeat&&!Ne&&this.parent&&q(this,"onRepeat"),vi!==this._tDur&&vi||this._tTime!==vi||(pi&&!this._onUpdate&&S(this,Me,0,!0),!Me&&Xt||!(vi===this._tDur&&0<this._ts||!vi&&this._ts<0)||v(this,1),Ne||pi&&!Tt||!(vi||Tt||ft)||(q(this,vi===St?"onComplete":"onReverseComplete",!0),!this._prom||vi<St&&0<this.timeScale()||this._prom()));}}else{var ki,ai,qt=this,fi=Me,di=Ne,ni=ze,Hi=qt.ratio,rt=fi<0||!fi&&(!qt._start&&B(qt)&&(qt._initted||!z
3(qt))||(qt._ts<0||qt._dp._ts<0)&&!z(qt))?0:1,ri=qt._rDelay,Xt=0;if(ri&&qt._repeat&&(Xt=Z(0,qt._tDur,fi),ai=I(Xt,ri),qt._yoyo&&1&ai&&(rt=1-rt),ai!==I(qt._tTime,ri)&&(Hi=1-rt,qt.vars.repeatRefresh&&qt._initted&&qt.invalidate())),rt!==Hi||le||ni||qt._zTime===gt||!fi&&qt._zTime){if(qt._initted||!H(qt,fi,ni,di,Xt)){for(ai=qt._zTime,qt._zTime=fi||(di?gt:0),di=di||fi&&!ai,qt.ratio=rt,qt._from&&(rt=1-rt),qt._time=0,qt._tTime=Xt,ki=qt._pt;ki;)ki.r(rt,ki.d),ki=ki._next;fi<0&&S(qt,fi,0,!0),qt._onUpdate&&!di&&q(qt,"onUpdate"),Xt&&qt._repeat&&!di&&qt.parent&&q(qt,"onRepeat"),(fi>=qt._tDur||fi<0)&&qt.ratio===rt&&(rt&&v(qt,1),di||le||(q(qt,rt?"onComplete":"onReverseComplete",!0),qt._prom&&qt._prom()));}}else qt._zTime||(qt._zTime=fi);}return this;},Ie.targets=function(){return this._targets;},Ie.invalidate=function(Me){return Me&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(Me),me.prototype.invalidate.call(this,Me);},Ie.resetTo=function(Me,Ne,ze,Je,ft){ae||jo.wake(),this._ts||this.play();var Xe,Tt=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||_l(this,Tt),Xe=this._ease(Tt/this._dur),function(St,Xt,pi,vi,ki,ai,qt,fi){var di,ni,Hi,rt,ri=(St._pt&&St._ptCache||(St._ptCache={}))[Xt];if(!ri)for(ri=St._ptCache[Xt]=[],Hi=St._ptLookup,rt=St._targets.length;rt--;){if((di=Hi[rt][Xt])&&di.d&&di.d._pt)for(di=di.d._pt;di&&di.p!==Xt&&di.fp!==Xt;)di=di._next;if(!di)return js=1,St.vars[Xt]="+=0",_l(St,qt),js=0,fi?y(Xt+" not eligible for reset"):1;ri.push(di);}for(rt=ri.length;rt--;)(di=(ni=ri[rt])._pt||ni).s=!vi&&vi!==0||ki?di.s+(vi||0)+ai*di.c:vi,di.c=pi-di.s,ni.e&&(ni.e=Gl(pi)+Vo(ni.e)),ni.b&&(ni.b=di.s+Vo(ni.b));}(this,Me,Ne,ze,Je,Xe,Tt,ft)?this.resetTo(Me,Ne,ze,Je,1):(Ls(this,0),this.parent||f(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0));},Ie.kill=function(Me,Ne){if(Ne===void 0&&(Ne="all"),!(Me||Ne&&Ne!=="all"))return this._lazy=this._pt=0,this.parent?J(this):this;if(this.timeline)ai=this.timeline.totalDuration(),this.timeline.killTweensOf(Me,Ne,ha&&ha.vars.overwrite!==!0)._first||J(this),this.parent&&ai!==this.timeline.totalDuration()&&te(this,this._dur*this.timeline._tDur/ai,0,1);else{var ze,Je,ft,Xe,Tt,St,Xt,pi=this._targets,vi=Me?po(Me):pi,ki=this._ptLookup,ai=this._pt;if((!Ne||Ne==="all")&&function(qt,fi){for(var di=qt.length,ni=di===fi.length;ni&&di--&&qt[di]===fi[di];);return di<0;}(pi,vi))return Ne==="all"&&(this._pt=0),J(this);for(ze=this._op=this._op||[],Ne!=="all"&&(si(Ne)&&(Tt={},Yo(Ne,function(qt){return Tt[qt]=1;}),Ne=Tt),Ne=function(ri,fi){var di,ni,Hi,rt,ri=ri[0]?Er(ri[0]).harness:0,on=ri&&ri.aliases;if(!on)return fi;for(ni in di=a({},fi),on)if((ni in di))for(Hi=(rt=on[ni].split(",")).length;Hi--;)di[rt[Hi]]=di[ni];return di;}(pi,Ne)),Xt=pi.length;Xt--;)if(~vi.indexOf(pi[Xt]))for(Tt in Je=ki[Xt],Ne==="all"?(ze[Xt]=Ne,Xe=Je,ft={}):(ft=ze[Xt]=ze[Xt]||{},Xe=Ne),Xe)(St=Je&&Je[Tt])&&("kill"in St.d&&St.d.kill(Tt)!==!0||Mo(this,St,"_pt"),delete Je[Tt]),ft!=="all"&&(ft[Tt]=1);this._initted&&!this._pt&&ai&&J(this);}return this;},xe.to=function(Me,Ne){return new xe(Me,Ne,arguments[2]);},xe.from=function(Me,Ne){return U(1,arguments);},xe.delayedCall=function(Me,Ne,ze,Je){return new xe(Ne,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:Me,onComplete:Ne,onReverseComplete:Ne,onCompleteParams:ze,onReverseCompleteParams:ze,callbackScope:Je});},xe.fromTo=function(Me,Ne,ze){return U(2,arguments);},xe.set=function(Me,Ne){return Ne.duration=0,Ne.repeatDelay||(Ne.repeat=0),new xe(Me,Ne);},xe.killTweensOf=function(Me,Ne,ze){return fe.killTweensOf(Me,Ne,ze);},xe;}(vs)),Ql=(to(tr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Yo("staggerTo,staggerFrom,staggerFromTo",function(me){tr[me]=function(){var xe=new Ur(),Ie=Kn.call(arguments,0);return Ie.splice(me==="staggerFromTo"?5:4,0,0),xe[me].apply(xe,Ie);};}),function(me,xe,Ie){return me[xe]=Ie;}),bd=function(me,xe,Ie){return me[xe](Ie);},xu=function(me,xe,Ie,Me){return me[xe](Me.fp,Ie);},Sl=function(me,xe){return ci(me[xe])?bd:gi(me[xe])&&me.setAttribute?Bo:Ql;},Tu=function(me,xe){return xe.set(xe.t,xe.p,Math.round(1e6*(xe.s+xe.c*me))/1e6,xe);},Zo=function(me,xe){return xe.set(xe.t,xe.p,!!(xe.s+xe.c*me),xe);},Jl=function(me,xe){var Ie=xe._pt,Me="";if(!me&&xe.b)Me=xe.b;else if(me===1&&xe.e)Me=xe.e;else{for(;Ie;)Me=Ie.p+(Ie.m?Ie.m(Ie.s+Ie.c*me):Math.round(1e4*(Ie.s+Ie.c*me))/1e4)+Me,Ie
3=Ie._next;Me+=xe.c;}xe.set(xe.t,xe.p,Me,xe);},Fa=function(me,xe){for(var Ie=xe._pt;Ie;)Ie.r(me,Ie.d),Ie=Ie._next;},ec=function(me,xe,Ie,Me){for(var Ne,ze=this._pt;ze;)Ne=ze._next,ze.p===Me&&ze.modifier(me,xe,Ie),ze=Ne;},Cu=function(me){for(var xe,Ie,Me=this._pt;Me;)Ie=Me._next,Me.p===me&&!Me.op||Me.op===me?Mo(this,Me,"_pt"):Me.dep||(xe=1),Me=Ie;return!xe;},Ou=function(me){for(var xe,Ie,Me,Ne,ze=me._pt;ze;){for(xe=ze._next,Ie=Me;Ie&&Ie.pr>ze.pr;)Ie=Ie._next;(ze._prev=Ie?Ie._prev:Ne)?ze._prev._next=ze:Me=ze,(ze._next=Ie)?Ie._prev=ze:Ne=ze,ze=xe;}me._pt=Me;},_s=function(){function me(xe,Ie,Me,Ne,ze,Je,ft,Xe,Tt){this.t=Ie,this.s=Ne,this.c=ze,this.p=Me,this.r=Je||Tu,this.d=ft||this,this.set=Xe||Ql,this.pr=Tt||0,(this._next=xe)&&(xe._prev=this);}return me.prototype.modifier=function(xe,Ie,Me){this.mSet=this.mSet||this.set,this.set=Vs,this.m=xe,this.mt=Me,this.tween=Ie;},me;}(),Qo=(Yo(pr+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(me){return pn[me]=1;}),Pn.TweenMax=Pn.TweenLite=tr,Pn.TimelineLite=Pn.TimelineMax=Ur,fe=new Ur({sortChildren:!1,defaults:yt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),qe.stringFilter=vu,[]),wl={},Sd=[],tc=0,wd=0,Pu=function(){function me(Ie,Me){this.selector=Me&&Wt(Me),this.data=[],this._r=[],this.isReverted=!1,this.id=wd++,Ie&&this.add(Ie);}var xe=me.prototype;return xe.add=function(Ie,Me,Ne){ci(Ie)&&(Ne=Me,Me=Ie,Ie=ci);function ze(){var ft,Xe=se,Tt=Je.selector;return Xe&&Xe!==Je&&Xe.data.push(Je),Ne&&(Je.selector=Wt(Ne)),se=Je,ft=Me.apply(Je,arguments),ci(ft)&&Je._r.push(ft),se=Xe,Je.selector=Tt,Je.isReverted=!1,ft;}var Je=this;return Je.last=ze,Ie===ci?ze(Je,function(ft){return Je.add(null,ft);}):Ie?Je[Ie]=ze:ze;},xe.ignore=function(Ie){var Me=se;se=null,Ie(this),se=Me;},xe.getTweens=function(){var Ie=[];return this.data.forEach(function(Me){return Me instanceof me?Ie.push.apply(Ie,Me.getTweens()):Me instanceof tr&&!(Me.parent&&Me.parent.data==="nested")&&Ie.push(Me);}),Ie;},xe.clear=function(){this._r.length=this.data.length=0;},xe.kill=function(Ie,Me){var Ne=this;if(Ie){for(var ze,Je=Ne.getTweens(),ft=Ne.data.length;ft--;)(ze=Ne.data[ft]).data==="isFlip"&&(ze.revert(),ze.getChildren(!0,!0,!1).forEach(function(Tt){return Je.splice(Je.indexOf(Tt),1);}));for(Je.map(function(Tt){return{g:Tt._dur||Tt._delay||Tt._sat&&!Tt._sat.vars.immediateRender?Tt.globalTime(0):-1/0,t:Tt};}).sort(function(Tt,St){return St.g-Tt.g||-1/0;}).forEach(function(Tt){return Tt.t.revert(Ie);}),ft=Ne.data.length;ft--;)(ze=Ne.data[ft])instanceof Ur?ze.data!=="nested"&&(ze.scrollTrigger&&ze.scrollTrigger.revert(),ze.kill()):ze instanceof tr||!ze.revert||ze.revert(Ie);Ne._r.forEach(function(Tt){return Tt(Ie,Ne);}),Ne.isReverted=!0;}else this.data.forEach(function(Tt){return Tt.kill&&Tt.kill();});if(this.clear(),Me)for(var Xe=Qo.length;Xe--;)Qo[Xe].id===this.id&&Qo.splice(Xe,1);},xe.revert=function(Ie){this.kill(Ie||{});},me;}(),Iu=function(){function me(Ie){this.contexts=[],this.scope=Ie,se&&se.data.push(this);}var xe=me.prototype;return xe.add=function(Ie,Me,Ne){Oi(Ie)||(Ie={matches:Ie});var ze,Je,ft,Xe=new Pu(0,Ne||this.scope),Tt=Xe.conditions={};for(Je in se&&!Xe.selector&&(Xe.selector=se.selector),this.contexts.push(Xe),Me=Xe.add("onMatch",Me),Xe.queries=Ie)Je==="all"?ft=1:(ze=ge.matchMedia(Ie[Je]))&&(Qo.indexOf(Xe)<0&&Qo.push(Xe),(Tt[Je]=ze.matches)&&(ft=1),ze.addListener?ze.addListener(Gn):ze.addEventListener("change",Gn));return ft&&Me(Xe,function(St){return Xe.add(null,St);}),this;},xe.revert=function(Ie){this.kill(Ie||{});}
3,xe.kill=function(Ie){this.contexts.forEach(function(Me){return Me.kill(Ie,!0);});},me;}(),Bs={registerPlugin:function(){for(var me=arguments.length,xe=new Array(me),Ie=0;Ie<me;Ie++)xe[Ie]=arguments[Ie];xe.forEach(oe);},timeline:function(me){return new Ur(me);},getTweensOf:function(me,xe){return fe.getTweensOf(me,xe);},getProperty:function(me,xe,Ie,Me){si(me)&&(me=po(me)[0]);var Ne=Er(me||{}).get,ze=Ie?m:er;return Ie==="native"&&(Ie=""),me&&(xe?ze((xi[xe]&&xi[xe].get||Ne)(me,xe,Ie,Me)):function(Je,ft,Xe){return ze((xi[Je]&&xi[Je].get||Ne)(me,Je,ft,Xe));});},quickSetter:function(me,xe,Ie){var Me,Ne;if(1<(me=po(me)).length)return Me=me.map(function(Tt){return Zi.quickSetter(Tt,xe,Ie);}),Ne=Me.length,function(Tt){for(var St=Ne;St--;)Me[St](Tt);};me=me[0]||{};var ze=xi[xe],Je=Er(me),ft=Je.harness&&(Je.harness.aliases||{})[xe]||xe,Xe=ze?function(Tt){var St=new ze();W._pt=0,St.init(me,Ie?Tt+Ie:Tt,W,0,[me]),St.render(1,St),W._pt&&Fa(1,W);}:Je.set(me,ft);return ze?Xe:function(Tt){return Xe(me,ft,Ie?Tt+Ie:Tt,Je,1);};},quickTo:function(me,xe,Ie){function Me(ze,Je,ft){return Ne.resetTo(xe,ze,Je,ft);}var Ne=Zi.to(me,a(((me={})[xe]="+=0.1",me.paused=!0,me),Ie||{}));return Me.tween=Ne,Me;},isTweening:function(me){return 0<fe.getTweensOf(me,!0).length;},defaults:function(me){return me&&me.ease&&(me.ease=Ko(me.ease,yt.ease)),s(yt,me||{});},config:function(me){return s(qe,me||{});},registerEffect:function(ze){var xe=ze.name,Ie=ze.effect,Me=ze.plugins,Ne=ze.defaults,ze=ze.extendTimeline;(Me||"").split(",").forEach(function(Je){return Je&&!xi[Je]&&!Pn[Je]&&y(xe+" effect requires "+Je+" plugin.");}),Pa[xe]=function(Je,ft,Xe){return Ie(po(Je),to(ft||{},Ne),Xe);},ze&&(Ur.prototype[xe]=function(Je,ft,Xe){return this.add(Pa[xe](Je,Oi(ft)?ft:(Xe=ft)&&{},this),Xe);});},registerEase:function(me,xe){_n[me]=Ko(xe);},parseEase:function(me,xe){return arguments.length?Ko(me,xe):_n;},getById:function(me){return fe.getById(me);},exportRoot:function(me,xe){var Ie,Me,Ne=new Ur(me=me===void 0?{}:me);for(Ne.smoothChildTiming=_(me.smoothChildTiming),fe.remove(Ne),Ne._dp=0,Ne._time=Ne._tTime=fe._time,Ie=fe._first;Ie;)Me=Ie._next,!xe&&!Ie._dur&&Ie instanceof tr&&Ie.vars.onComplete===Ie._targets[0]||N(Ne,Ie,Ie._start-Ie._delay),Ie=Me;return N(fe,Ne,0),Ne;},context:function(me,xe){return me?new Pu(me,xe):se;},matchMedia:function(me){return new Iu(me);},matchMediaRefresh:function(){return Qo.forEach(function(me){var xe,Ie,Me=me.conditions;for(Ie in Me)Me[Ie]&&(Me[Ie]=!1,xe=1);xe&&me.revert();})||Gn();},addEventListener:function(me,xe){me=wl[me]||(wl[me]=[]),~me.indexOf(xe)||me.push(xe);},removeEventListener:function(me,xe){me=wl[me],xe=me&&me.indexOf(xe),0<=xe&&me.splice(xe,1);},utils:{wrap:mu,wrapYoyo:gu,distribute:yl,random:qr,snap:Wl,normalize:Xo,getUnit:Vo,clamp:fr,splitColor:vl,toArray:po,selector:Wt,mapRange:yu,pipe:fs,unitize:Ds,interpolate:Yl,shuffle:$l},install:h,effects:Pa,ticker:jo,updateRoot:Ur.updateRoot,plugins:xi,globalTimeline:fe,core:{PropTween:_s,globals:b,Tween:tr,Timeline:Ur,Animation:vs,getCache:Er,_removeLinkedListItem:Mo,reverting:function(){return le;},context:function(me){return me&&se&&(se.data.push(me),me._ctx=se),se;},suppressOverwrites:function(me){return ne=me;}}},dn=(Yo("to,from,fromTo,delayedCall,set,killTweensOf",function(me){return Bs[me]=tr[me];}),jo.add(Ur.updateRoot),W=Bs.to({},{duration:0}),function(me,xe){for(var Ie=me._pt;Ie&&Ie.p!==xe&&Ie.op!==xe&&Ie.fp!==xe;)Ie=Ie._next;return Ie;}),Zi=Bs.registerPlugin({name:"attr",init:function(me,xe,Ie,Me,Ne){var ze,Je,ft;for(ze in this.tween=Ie,xe)ft=me.getAttribute(ze)||"",(Je=this.add(me,"setAttribute",(ft||0)+"",xe[ze],Me,Ne,0,0,ze)).op=ze,Je.b=ft,this._props.push(ze);},render:function(me,xe){for(var Ie=xe._pt;Ie;)le?Ie.set(Ie.t,Ie.p,Ie.b,Ie):Ie.r(me,Ie.d),Ie=Ie._next;}},{name:"endArray",init:function(me,xe){for(var Ie=xe.length;Ie--;)this.add(me,Ie,me[Ie]||0,xe[Ie],0,0,0,0,0,1);}},Aa("roundProps",da),Aa("modifiers"),Aa("snap",Wl))||Bs,El=(tr.version=Ur.version=Zi.version="3.12.5",Re=1,E()&&Ns(),_n.Power0),ku=_n.Power1,Au=_n.Power2,Ed=_n.Power3,bs=_n.Power4,xd=_n.Linear,Td=_n.Quad,lf=_n.Cubic,Mu=_n.Quart,ic=_n.Quint,nc=_n.Strong,Cd=_n.Elastic,rc=_n.Back,cf=_n.SteppedEase,Od=_n.Bounce,Pd=_n.Sine,oc=_n.Expo,ac=_n.Circ;},function(i,r,e){(function(n){var n=n!==void 0?n:typeof window<"u"?window:{},o=e(229),_=typeof document<"u"?document:(_=n["__GLOBAL_DOCUMENT_CACHE@4"])||(n["__GLOBAL_DOCUMENT_CACHE@4"]=o);i.exports=_;}).call(this,e(27));},function(i,r,e){var t=e(42);i.exports=function(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,t(n,o);},i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,e){"use strict";(function(t){function n(){n=function(){return g;};var l,g={},f=Object.prototype,v=f.hasOwnProperty,S=Object.defineProperty||function(Y,j,D){Y[j]=D.value;},Z=typeof Symbol=="function"?Symbol:{},w=Z.iterator||"@@iterator",C=Z.asyncIterator||"@@asyncIterator",I=Z.toStringTag||"@@toStringTag";function O(Y,j,D){return Object.defineProperty(Y,j,{value:D,enumerable:!0,configurable:!0,writable:!0}),Y[j];}try{O({},"");}catch{O=function(j,D,$){return j[D]=$;};}function M(Y,ge,D,he){var ne,le,se,fe,ge=ge&&ge.prototype instanceof K?ge:K,ge=Object.create(ge.prototype),he=new F(he||[]);return S(ge,"_invoke",{value:(ne=Y,le=D,se=he,fe=G,function(_e,Re){if(fe===B)throw Error("Generator is already running");if(fe===z){if(_e==="throw")throw Re;return{value:l,done:!0};}for(se.method=_e,se.arg=Re;;){var ee=se.delegate;if(ee&&(ee=function W(ae,de){var ye=de.method,Se=ae.iterator[ye];return Se===l?(de.delegate=null,ye==="throw"&&ae.iterator.return&&
3(de.method="return",de.arg=l,W(ae,de),de.method==="throw")||ye!=="return"&&(de.method="throw",de.arg=new TypeError("The iterator does not provide a '"+ye+"' method")),te):(ye=N(Se,ae.iterator,de.arg),ye.type==="throw"?(de.method="throw",de.arg=ye.arg,de.delegate=null,te):(Se=ye.arg,Se?Se.done?(de[ae.resultName]=Se.value,de.next=ae.nextLoc,de.method!=="return"&&(de.method="next",de.arg=l),de.delegate=null,te):Se:(de.method="throw",de.arg=new TypeError("iterator result is not an object"),de.delegate=null,te)));}(ee,se),ee)){if(ee===te)continue;return ee;}if(se.method==="next")se.sent=se._sent=se.arg;else if(se.method==="throw"){if(fe===G)throw fe=z,se.arg;se.dispatchException(se.arg);}else se.method==="return"&&se.abrupt("return",se.arg);if(fe=B,ee=N(ne,le,se),ee.type==="normal"){if(fe=se.done?z:H,ee.arg===te)continue;return{value:ee.arg,done:se.done};}ee.type==="throw"&&(fe=z,se.method="throw",se.arg=ee.arg);}})}),ge;}function N(Y,j,D){try{return{type:"normal",arg:Y.call(j,D)};}catch($){return{type:"throw",arg:$};}}g.wrap=M;var G="suspendedStart",H="suspendedYield",B="executing",z="completed",te={};function K(){}function V(){}function U(){}var Z={},re=(O(Z,w,function(){return this;}),Object.getPrototypeOf),re=re&&re(re(X([]))),ue=(re&&re!==f&&v.call(re,w)&&(Z=re),U.prototype=K.prototype=Object.create(Z));
3function q(Y){["next","throw","return"].forEach(function(j){O(Y,j,function(D){return this._invoke(j,D);});});}function J(Y,j){var D;S(this,"_invoke",{value:function($,ne){function le(){return new j(function(se,fe){(function ge(ae,_e,Re,ee){var W,ae=N(Y[ae],Y,_e);if(ae.type!=="throw")return(_e=(W=ae.arg).value)&&o(_e)=="object"&&v.call(_e,"__await")?j.resolve(_e.__await).then(function(de){ge("next",de,Re,ee);},function(de){ge("throw",de,Re,ee);}):j.resolve(_e).then(function(de){W.value=de,Re(W);},function(de){return ge("throw",de,Re,ee);});ee(ae.arg);})($,ne,se,fe);});}return D=D?D.then(le,le):le();}});}function oe(Y){var j={tryLoc:Y[0]};1 in Y&&(j.catchLoc=Y[1]),2 in Y&&(j.finallyLoc=Y[2],j.afterLoc=Y[3]),this.tryEntries.push(j);}function Q(Y){var j=Y.completion||{};j.type="normal",delete j.arg,Y.completion=j;}function F(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(oe,this),this.reset(!0);}function X(Y){if(Y||Y===""){var j,D=Y[w];if(D)return D.call(Y);if(typeof Y.next=="function")return Y;if(!isNaN(Y.length))return j=-1,(D=function $(){for(;++j<Y.length;)if(v.call(Y,j))return $.value=Y[j],$.done=!1,$;return $.value=l,$.done=!0,$;}).next=D;}throw new TypeError(o(Y)+" is not iterable");}return S(ue,"constructor",{value:V.prototype=U,configurable:!0}),S(U,"constructor",{value:V,configurable:!0}),V.displayName=O(U,I,"GeneratorFunction"),g.isGeneratorFunction=function(Y){return Y=typeof Y=="function"&&Y.constructor,!!Y&&(Y===V||(Y.displayName||Y.name)==="GeneratorFunction");},g.mark=function(Y){return Object.setPrototypeOf?Object.setPrototypeOf(Y,U):(Y.__proto__=U,O(Y,I,"GeneratorFunction")),Y.prototype=Object.create(ue),Y;},g.awrap=function(Y){return{__await:Y};},q(J.prototype),O(J.prototype,C,function(){return this;}),g.AsyncIterator=J,g.async=function(Y,j,D,$,ne){ne===void 0&&(ne=Promise);var le=new J(M(Y,j,D,$),ne);return g.isGeneratorFunction(j)?le:le.next().then(function(se){return se.done?se.value:le.next();});},q(ue),O(ue,I,"Generator"),O(ue,w,function(){return this;}),O(ue,"toString",function(){return"[object Generator]";}),g.keys=function(Y){var j,D=Object(Y),$=[];for(j in D)$.push(j);return $.reverse(),function ne(){for(;$.length;){var le=$.pop();if(le in D)return ne.value=le,ne.done=!1,ne;}return ne.done=!0,ne;};},g.values=X,F.prototype={constructor:F,reset:function(Y){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Q),!Y)for(var j in this)j.charAt(0)==="t"&&v.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=l);},stop:function(){this.done=!0;var Y=this.tryEntries[0].completion;if(Y.type==="throw")throw Y.arg;return this.rval;},dispatchException:function(Y){if(this.done)throw Y;var j=this;function D(ge,he){return le.type="throw",le.arg=Y,j.next=ge,he&&(j.method="next",j.arg=l),!!he;}for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$],le=ne.completion;if(ne.tryLoc==="root")return D("end");if(ne.tryLoc<=this.prev){var se=v.call(ne,"catchLoc"),fe=v.call(ne,"finallyLoc");if(se&&fe){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}else if(se){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);}else{if(!fe)throw Error("try statement without catch or finally");if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}}}},abrupt:function(Y,j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.tryLoc<=this.prev&&v.call($,"finallyLoc")&&this.prev<$.finallyLoc){var ne=$;break;}}var le=(ne=ne&&(Y==="break"||Y==="continue")&&ne.tryLoc<=j&&j<=ne.finallyLoc?null:ne)?ne.completion:{};return le.type=Y,le.arg=j,ne?(this.method="next",this.next=ne.finallyLoc,te):this.complete(le);},complete:function(Y,j){if(Y.type==="throw")throw Y.arg;return Y.type==="break"||Y.type==="continue"?this.next=Y.arg:Y.type==="return"?(this.rval=this.arg=Y.arg,this.method="return",this.next="end"):Y.type==="normal"&&j&&(this.next=j),te;},finish:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j];if(D.finallyLoc===Y)return this.complete(D.completion,D.afterLoc),Q(D),te;}},catch:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D,$,ne=this.tryEntries[j];if(ne.tryLoc===Y)return(D=ne.completion).type==="throw"&&($=D.arg,Q(ne)),$;}throw Error("illegal catch attempt");},delegateYield:function(Y,j,D){return this.delegate={iterator:X(Y),resultName:j,nextLoc:D},this.method==="next"&&(this.arg=l),te;}},g;}function o(l){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g;}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g;})(l);}function _(l,g){return function(f){if(Array.isArray(f))return f;}(l)||function(f,v){var S=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(S!=null){var w,C,I,O,M=[],N=!0,G=!1;try{if(I=(S=S.call(f)).next,v===0){if(Object(S)!==S)return;N=!1;}else for(;!(N=(w=I.call(S)).done)&&(M.push(w.value),M.length!==v);N=!0);}catch(H){G=!0,C=H;}
3finally{try{if(!N&&S.return!=null&&(O=S.return(),Object(O)!==O))return;}finally{if(G)throw C;}}return M;}}(l,g)||x(l,g)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function E(l){return function(g){if(Array.isArray(g))return h(g);}(l)||function(g){if(typeof Symbol<"u"&&g[Symbol.iterator]!=null||g["@@iterator"]!=null)return Array.from(g);}(l)||x(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(l,g){if(l){if(typeof l=="string")return h(l,g);var f={}.toString.call(l).slice(8,-1);return(f=f==="Object"&&l.constructor?l.constructor.name:f)==="Map"||f==="Set"?Array.from(l):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?h(l,g):void 0;}}function h(l,g){(g==null||g>l.length)&&(g=l.length);for(var f=0,v=Array(g);f<g;f++)v[f]=l[f];return v;}function y(l,g){for(var f=0;f<g.length;f++){var v=g[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,function(S){return S=function(w,C){if(o(w)!="object"||!w)return w;var I=w[Symbol.toPrimitive];if(I===void 0)return(C==="string"?String:Number)(w);if(I=I.call(w,C||"default"),o(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.");}(S,"string"),o(S)=="symbol"?S:S+"";}(v.key),v);}}var b=this&&this.__awaiter||function(l,g,f,v){return new(f=f||Promise)(function(S,w){function C(M){try{O(v.next(M));}catch(N){w(N);}}function I(M){try{O(v.throw(M));}catch(N){w(N);}}function O(M){var N;M.done?S(M.value):((N=M.value)instanceof f?N:new f(function(G){G(N);})).then(C,I);}O((v=v.apply(l,g||[])).next());});},p=(Object.defineProperty(r,"__esModule",{value:!0}),e(34)),c=e(117),d=["rgb","rgba","hsl","hsla","calc","lch","lab","hwb","color-mix","color-contrast"],m=["cm","mm","Q","in","pc","pt","px"],a=["scale","opacity"],s=function(){function l(){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");}return g=l,v=[{key:"removeAtIndex",value:function(S,w){return w.slice(0,S).concat(w.slice(S+1,w.length));}},{key:"validateAccessString",value:function(S){return S.split("/").reduce(function(w,C){return C=C.split("-"),2<=C.length?w&&Number.isInteger(Number(C[1])):w&&1<=C.length;},!0);}},{key:"deepGet",value:function(S,w){return p.ResourceManager.deepGet(S,w);}},{key:"sortDescendingTimeOffset",value:function(S){S.sort(function(w,C){return C.timeOffset-w.timeOffset;});}},{key:"attachVDMState",value:function(S,w){return Object.assign(S,{vdmState:void 0,setVDMState:function(C){this.vdmState=C;},getVDMState:function(){return this.vdmState;}}),S.vdmState=w,S;}},{key:"getExtension",value:function(S){return S.split(".").pop().split(/\#|\?/)[0].toLowerCase();}},{key:"round",value:function(S,w){return Number(S.toFixed(w));}},{key:"scale",value:function(S,w){function C(I,O){return I*O;}return typeof S=="number"?S<=0?S:C(S,w):typeof S=="string"?C(Number(S),w):Array.isArray(S)?S.map(function(I){return l.scale(I,w);}):0;}},{key:"isNumericString",value:function(S){return typeof S=="string"&&!isNaN(S)&&!isNaN(parseFloat(S));}},{key:"findMatchingParenthesisIndex",value:function(S){for(var w=0,C=0;C<S.length;C++)if(S[C]==="(")w++;else if(S[C]===")"&&--w===0)return C;return l.error("No matching closing parenthesis found in '".concat(S,"'.")),S.length;}},{key:"scaleWithFormat",value:function(S,w,C){return C&&a.includes(C)?S:typeof S=="number"?S*w:l.scaleCSSValues(S,w);}},{key:"scaleCSSValues",value:function(S,w){for(var C,I="",O="",M=0;M<S.length;M++)(function(N){var G,H,B,z=S[N];z==="("?(G=O.trim(),O="",H=l.findMatchingParenthesisIndex(S.substring(N)),B=S.substring(N+1,N+H),d.some(function(te){return G.includes(te);})||(B=l.scaleCSSValues(B,w)),I+="".concat(G,"(").concat(B,")"),M=N+=H):z===" "||z===","||z==="/"?(O.trim()!==""&&m.some(function(te){return O.trim().endsWith(te);})||l.isNumericString(O.trim())?(B=O.match(/^(-?\d*\.?\d+)([a-zA-Z]*)$/),I+=B?"".concat(Number(B[1])*w).concat(B[2]).concat(z):O+z):I+=O+z,O="",M=N):(O+=z,M=N);})(M);return O.trim()!==""&&m.some(function(N){return O.endsWith(N);})||l.isNumericString(O)?(C=O.match(/^(-?\d*\.?\d+)([a-zA-Z]*)$/),I+=C?"".concat(Number(C[1])*w).concat(C[2]):O):I+=O,I;}},{key:"toEven",value:function(S){return S%2==1?S+1:S;}},{key:"replaceAssetUrl",value:function(S){return S.replace(t.env.CDN_URL,t.env.S3_ASSETS_BUCKET);}},{key:"randomStr",value:function(){var S="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",w=(0<arguments.length&&arguments[0]!==void 0?arguments[0]:16)||36;return Array(w).join().split(",").map(function(){return S.charAt(Math.floor(Math.random()*S.length));}).join("");}},{key:"clamp",value:function(S,w,C){return w!==void 0&&C!==void 0?Math.min(Math.max(S,w),C):w!==void 0?Math.max(S,w):C!==void 0?Math.min(S,C):S;}},{key:"isFirefox",value:function(){return 0<=navigator.userAgent.
5search("Firefox");}},{key:"debug",value:function(S){var w,C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:[],I=new Date();l.useDebug&&(w=console).log.apply(w,["[".concat(I.toISOString(),"][debug] ").concat(S)].concat(E(C)));}},{key:"warn",value:function(S){var w,C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:[],I=new Date();l.useDebug&&(w=console).warn.apply(w,["[".concat(I.toISOString(),"][debug] ").concat(S)].concat(E(C)));}},{key:"error",value:function(S){var w=new Date();console.error("[".concat(w.toISOString(),"][error] ").concat(S));}},{key:"range",value:function(S){var w=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;return E(Array(S).keys()).map(function(C){return C+w;});}},{key:"selectUrl",value:function(S,w,C,I){return S?I||w||C:I||C;}},{key:"aluCalc",value:function(S,w,C){var I,O,M;if(typeof w=="string"){var N=w.match(/[a-zA-Z%]+$/);if((I=N?N[0]:I)&&I!=="px"&&I!=="%")return void l.error("ALU error invalid param unit: ".concat(w));if(w=parseFloat(w),isNaN(w))return void l.error("ALU error param is not a number: ".concat(w));}if(typeof C=="string"){if(N=C.match(/[a-zA-Z%]+$/),(O=N?N[0]:O)&&O!=="px"&&O!=="%")return void l.error("ALU error invalid param unit: ".concat(C));if(C=parseFloat(C),isNaN(C))return void l.error("ALU error param is not a number: ".concat(w));}if(!I||!O||I===O){switch(S){case"+":M=w+C;break;case"-":M=w-C;break;case"*":M=w*C;break;case"/":M=w/C;break;default:return void l.error("ALU error: op bad syntax. ".concat(S));}return I&&(M+=I),M;}l.error("ALU error: params are not the same unit. ".concat(I," !== ").concat(O));}}
5,{key:"slideIndexFromTime",value:function(S,w){if(S===0)return 0;var C,I=[],O=function(N,G){var H,B=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!B){if(Array.isArray(N)||(B=x(N))||G&&N&&typeof N.length=="number")return B&&(N=B),H=0,{s:G=function(){},n:function(){return H>=N.length?{done:!0}:{done:!1,value:N[H++]};},e:function(V){throw V;},f:G};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 6In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var z,te=!0,K=!1;return{s:function(){B=B.call(N);},n:function(){var V=B.next();return te=V.done,V;},e:function(V){K=!0,z=V;},f:function(){try{te||B.return==null||B.return();}finally{if(K)throw z;}}};}(w);try{for(O.s();!(C=O.n()).done;){var M=C.value;I.push(["startTime"in M?M.startTime:M.StartTime,"endTime"in M?M.endTime:M.EndTime]);}}catch(N){O.e(N);}finally{O.f();}return w=_(l.intervalBinarySearch(I,S),2),S=w[0],w[1],S;}},{key:"flattenObject",value:function(S){var w,C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"",I={};for(w in S)if(S.hasOwnProperty(w))if(o(S[w])!=="object"||Array.isArray(S[w])){if(typeof S[w]!="string"&&Array.isArray(S[w]))for(var O=0;O<S[w].length;O++){var M=l.flattenObject(S[w],C+w+".");Object.assign(I,M);}else I[C+w]=S[w];}else{var N=l.flattenObject(S[w],C+w+".");Object.assign(I,N);}return I;}},{key:"parseCssAngleToRadians",value:function(S){if(S=S.match(/([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?/),!S)throw new Error("Invalid CSS angle format");var w=parseFloat(S[1]),C=S[2];switch(C){case"deg":return w*Math.PI/180;case"rad":return w;case"grad":return w*Math.PI/200;case"turn":return 2*w*Math.PI;default:return l.error("Unsupported angle unit: ".concat(C)),0;}}},{key:"getRandomInt",value:function(S,w){return S=Math.ceil(S),w=Math.floor(w),Math.floor(Math.random()*(w-S+1)+S);}},{key:"disposeAudioPlayer",value:function(S){if(S){S.VDM_EVENT_LISTENERS&&Object.entries(S.VDM_EVENT_LISTENERS).forEach(function(M){var M=_(M,2),O=M[0],M=M[1];M&&S.removeEventListener(O,M);}),S.pause(),S.currentTime=0,S.dataset.disposed="true",S.src="";for(var w=S.getElementsByTagName("source"),C=0;C<w.length;C++)w[C].src="";S.load(),S.parentNode&&S.parentNode.removeChild(S);}return null;}},{key:"getBufferedPercent",value:function(S){if(S){if("bufferedPercent"in S&&typeof S.bufferedPercent=="function")return S.bufferedPercent();var w;if(S instanceof HTMLMediaElement)return w=S.buffered,S=S.duration,w.length===0||S===0?0:w.end(w.length-1)/S;l.debug("Error with getting buffer percent - Unknown playerInstance type");}return 0;}},{key:"mapToObject",value:function(S){return Array.from(S.entries()).reduce(function(w,O){var O=_(O,2),I=O[0],O=O[1];return w[I]=O,w;},{});}},{key:"isTouchDevice",value:function(){return window.matchMedia&&window.matchMedia("(any-pointer: coarse)").matches;}},{key:"isTouchEvent",value:function(S){return"touches"in S;}},{key:"mouseEventToClientX",value:function(S){if(S.type==="mousedown"||S.type==="mousemove")return S.clientX;if(S.type==="touchstart"||S.type==="touchmove")return S.touches[0].clientX;throw new Error("Invalid event type '".concat(S.type,"', should not happen"));}},{key:"mouseEventToClientY",value:function(S){if(S.type==="mousedown"||S.type==="mousemove")return S.clientY;if(S.type==="touchstart"||S.type==="touchmove")return S.touches[0].clientY;throw new Error("Invalid event type '".concat(S.type,"', should not happen"));}},{key:"isMobileDevice",value:function(){return /Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);}},{key:"isRangeInTimeRanges",value:function(S,w,C){for(var I=0;I<C.length;I++){var O=C.start(I),M=C.end(I);if(O<=S&&w<=M)return!0;}return!1;}},{key:"formatTimeHHMMSS",value:function(O){var w=Math.floor(O/3600),C=Math.floor(O%3600/60),I=Math.floor(O%60),O=Math.floor(O%1*1e3);return"".concat(String(w).padStart(2,"0"),":").concat(String(C).padStart(2,"0"),":").concat(String(I).padStart(2,"0"),".").concat(String(O).padStart(3,"0"));}},{key:"shortGUID",value:function(){return Date.now().toString(36).slice(-2)+Math.random().toString(36).substring(2,6);}},{key:"getMediaType",value:function(S){return S=S.split(".").pop().toLowerCase(),[".mp4",".webm",".avi",".mov",".mkv"].includes(".".concat(S))?"video":[".mp3",".wav",".ogg",".flac",".aac"].includes(".".concat(S))?"audio":"unknown";}},{key:"isValidSegmentationData",value:function(S){return!!Array.isArray(S)&&S.every(function(w){return w&&typeof w.start=="number"&&typeof w.end=="number"&&typeof w.text=="string"&&Array.isArray(w.words)&&w.words.every(function(C){return C&&typeof C.start=="number"&&typeof C.end=="number"&&typeof C.word=="str
6ing";});});}},{key:"cloneDeep",value:function(S){return c(S);}},{key:"isLocalUrl",value:function(S){return!(S.startsWith("https://")||S.startsWith("http://"));}}],(f=null)&&y(g.prototype,f),v&&y(g,v),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,f,v;}();(r.default=s).useDebug=!1,s.isRendering=!1,s.useHotfix=!1,s.imageSizeCache=new Map(),s.fetchJson=function(l,g){return b(void 0,void 0,void 0,n().mark(function f(){var v,S;return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.prev=0,w.next=3,fetch(l);case 3:return v=w.sent,w.next=6,v.json();case 6:return v=w.sent,S=v.json,w.abrupt("return",S);case 11:if(w.prev=11,w.t0=w.catch(0),w.t0)return s.debug("".concat(g,": ").concat(w.t0)),w.abrupt("return",w.t0.message);w.next=16;break;case 16:case"end":return w.stop();}},f,null,[[0,11]]);}));},s.fetchWithHeaders=function(l,g){return b(void 0,void 0,void 0,n().mark(function f(){var v,S,w,C,I,O;return n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return v=new Headers(),l.headers&&Object.entries(l.headers).forEach(function(N){return v.append.apply(v,E(N));}),l.body&&(S=(l.method||"GET")==="GET"?void 0:JSON.stringify(l.body)),w={method:l.method||"GET",headers:v,body:S},C=new Request(l.url),I=function(N){return b(void 0,void 0,void 0,n().mark(function G(){return n().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(N.ok){H.next=2;break;}throw N.statusText;case 2:return H.next=4,N.json();case 4:return H.abrupt("return",H.sent);case 5:case"end":return H.stop();}},G);}));},M.next=8,fetch(C,w);case 8:if(O=M.sent,g)return M.abrupt("return",g(O));M.next=13;break;case 13:return M.abrupt("return",I(O));case 14:case"end":return M.stop();}},f);}));},s.intervalBinarySearch=function(l,g){for(var f=0,v=l.length-1;f<=v;){var S=Math.floor((f+v)/2),w=l[S][0],C=l[S][1];if(w<=g&&g<C)return[S,l[S]];g<w?v=S-1:f=S+1;}return[void 0,void 0];},s.promisePoll=function(l,g){function f(w){return b(void 0,void 0,void 0,n().mark(function C(){var I,O;return n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return I=performance.now(),M.next=3,l(S);case 3:if(O=M.sent,s.debug("Result in promisePoll : ".concat(O)),O)return M.abrupt("return",w());M.next=7;break;case 7:O=Math.max(v-(performance.now()-I),0),setTimeout(function(){return f(w);},O);case 9:case"end":return M.stop();}},C);}));}var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:200,S=!1;return setTimeout(function(){return S=!0;},g),new Promise(f);},s.hasVDOMBuilder=function(l){return typeof l.buildVDOM=="function";},s.snapShot=function(l){return s.cloneDeep(l);},s.surpass=function(l){for(var g=0,f=Object.entries(l);g<f.length;g++){var S=_(f[g],2),v=S[0],S=S[1];S&&HTMLElement&&S instanceof HTMLElement&&delete l[v];}return l;},s.zipLongest=function(){for(var l=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,g=arguments.length,f=new Array(1<g?g-1:0),v=1;v<g;v++)f[v-1]=arguments[v];var S=Math.max.apply(Math,E(f.map(function(w){return w.length;})));return Array.from({length:S},function(w,C){return f.map(function(I){return I.length-1>=C?I[C]:l;});});},s.zip=function(){for(var l=arguments.length,g=new Array(l),f=0;f<l;f++)g[f]=arguments[f];var v=Math.min.apply(Math,E(g.map(function(S){return S.length;})));return Array.from({length:v},function(S,w){return g.map(function(C){return C[w];});});},s.isBoolean=function(l){return typeof l=="boolean";},s.isNumber=function(l){return typeof l=="number";},s.isEmptyObject=function(l){return l&&Object.keys(l).length===0&&l.constructor===Object;};}).call(this,e(115));},function(i,r){i.exports=function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;},i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r){function e(y){if(!y||typeof y!="object"||(h=y.which||y.keyCode||y.charCode)&&(y=h),typeof y=="number")return E[y];var h=String(y),y=t[h.toLowerCase()];return y||((y=n[h.toLowerCase()])?y:h.length===1?h.charCodeAt(0):void 0);}e.isEventKey=function(x,h){if(x&&typeof x=="object"){if(x=x.which||x.keyCode||x.charCode,x!=null){if(typeof h=="string"){var y=t[h.toLowerCase()];if(y||(y=n[h.toLowerCase()]))return y===x;}else if(typeof h=="number")return h===x;}return!1;}};for(var t=(r=i.exports=e).code=r.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=r.aliases={windows:91,"\u21E7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},o=97;o<123;o++)t[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)t[o-48]=o;for(o=1;o<13;o++)t["f"+o]=o+111;for(o=0;o<10;o++)t["numpad "+o]=o+96;var _,E=r.names=r.title={};for(o in t)E[t[o]]=o;for(_ in n)t[_]=n[_];},function(i,t,e){"use strict";e.d(t,"i",function(){return x;}),e.d(t,"h",function(){return h;}),e.d(t,"d",function(){return y;}),e.d(t,"f",function(){return b;}),e.d(t,"e",function(){return p;}),e.d(t,"c",function(){return c;}),e.d(t,"g",function(){return d;}),e.d(t,"a",function(){return m;}),e.d(t,"b",function(){return a;});var t=e(0),n=e.n(t),o={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},_=["video","audio","text"],E=["Video","Audio","Text"],x=function(s){return s&&s.replace(/avc1\.(\d+)\.(\d+)/i,function(l,g,f){return"avc1."+("00"+Number(g).toString(16)).slice(-2)+"00"+("00"+Number(f).toString(16)).slice(-2);});},h=function(l){var l=(l=l===void 0?"":l).split(","),g=[];return l.forEach(function(f){var v;f=f.trim(),_.forEach(function(S){var w,C=o[S].exec(f.toLowerCase());!C||C.length<=1||(v=S,C=f.substring(0,C[1].length),w=f.replace(C,""),g.push({type:C,details:w,mediaType:S}));}),v||g.push({type:f,details:"",mediaType:"unknown"});}),g;},y=function(s,l){if(s.mediaGroups.AUDIO&&l){var g=s.mediaGroups.AUDIO[l];if(g){for(var f in g)if(f=g[f],f.default&&f.playlists)return h(f.playlists[0].attributes.CODECS);}}return null;},b=function(s){return o.audio.test((s=s===void 0?"":s).trim().toLowerCase());},p=function(s){var l,g,f;if(s&&typeof s=="string")return l=s.toLowerCase().split(",").map(function(v){return x(v.trim());}),g="video",l.length===1&&b(l[0])?g="audio":l.length===1&&(f=l[0],o.text.test((f=f===void 0?"":f).trim().toLowerCase()))&&
6(g="application"),f="mp4",l.every(function(v){return o.mp4.test(v);})?f="mp4":l.every(function(v){return o.webm.test(v);})?f="webm":l.every(function(v){return o.ogg.test(v);})&&(f="ogg"),g+"/"+f+';codecs="'+s+'"';},c=function(s){return s===void 0&&(s=""),n.a.MediaSource&&n.a.MediaSource.isTypeSupported&&n.a.MediaSource.isTypeSupported(p(s))||!1;},d=function(s){return(s=s===void 0?"":s).toLowerCase().split(",").every(function(l){l=l.trim();for(var g=0;g<E.length;g++)if(o["muxer"+E[g]].test(l))return!0;return!1;});},m="mp4a.40.2",a="avc1.4d400d";},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0}),r.IntrinsicFunction=void 0;var o=_(10),_=function(){return E=function y(){for(var b=arguments.length,p=new Array(b),c=0;c<b;c++)p[c]=arguments[c];var d=this,m=y;if(!(d instanceof m))throw new TypeError("Cannot call a class as a function");p&&this.strictArgsCheck.apply(this,p)||o.default.error("Strictly unmatched args for declared function"),this._args=p;},(x=[{key:"evalArgs",value:function(){this._args==null&&o.default.error("Arguments passed are undefined");try{this._evaluatedArgs=this._args.map(function(y){return y&&o.default.isIntrinsicFunction(y)?y.eval():o.default.isPrimitive(y)||o.default.isObject(y)?y:null;});}catch(y){throw y.message=`Error while evaluating args! 7`+y.message,y;}}},{key:"eval",value:function(){return this.evalArgs(),this._eval();}},{key:"args",get:function(){return this._args;},set:function(y){this._args=y;}},{key:"evaluatedArgs",get:function(){return this._evaluatedArgs;}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.IntrinsicFunction=_;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function _(){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");}return E=_,h=[{key:"forAll",value:function(y){return y.reduce(function(b,p){return b&&p;},!(1<arguments.length&&arguments[1]!==void 0)||arguments[1]);}},{key:"isTrueExists",value:function(y){return y.reduce(function(b,p){return b||p;},1<arguments.length&&arguments[1]!==void 0&&arguments[1]);}},{key:"error",value:function(y){throw new Error(y);}},{key:"hasOwnProperty",value:function(y,b){return y?.hasOwnProperty(b);}}],(x=null)&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();(r.default=o).isPrimitive=function(_){return["string","number","boolean"].includes(t(_));},o.isObject=function(_){return t(_)==="object";},o.isIntrinsicFunction=function(_){return _.eval!==void 0;},o.pairwise=function(_,E){for(var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:1,h=[],y=0;y<_.length-x;y++)h.push(E(_[y],_[y+x]));return h;};},function(i,r){function e(){return i.exports=e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var o,_=arguments[n];for(o in _)!{}.hasOwnProperty.call(_,o)||(t[o]=_[o]);}return t;},i.exports.__esModule=!0,i.exports.default=i.exports,e.apply(null,arguments);}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(){n=function(){return c;};var p,c={},d=Object.prototype,m=d.hasOwnProperty,a=Object.defineProperty||function(q,J,oe){q[J]=oe.value;},B=typeof Symbol=="function"?Symbol:{},s=B.iterator||"@@iterator",l=B.asyncIterator||"@@asyncIterator",g=B.toStringTag||"@@toStringTag";function f(q,J,oe){return Object.defineProperty(q,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}),q[J];}try{f({},"");}catch{f=function(J,oe,Q){return J[oe]=Q;};}function v(q,D,oe,$){var F,X,Y,j,D=D&&D.prototype instanceof N?D:N,D=Object.create(D.prototype),$=new re($||[]);return a(D,"_invoke",{value:(F=q,X=oe,Y=$,j=w,function(ne,le){if(j===I)throw Error("Generator is already running");if(j===O){if(ne==="throw")throw le;return{value:p,done:!0};}for(Y.method=ne,Y.arg=le;;){var se=Y.delegate;if(se&&(se=function fe(ge,he){var _e=he.method,Re=ge.iterator[_e];return Re===p?(he.delegate=null,_e==="throw"&&ge.iterator.return&&
7(he.method="return",he.arg=p,fe(ge,he),he.method==="throw")||_e!=="return"&&(he.method="throw",he.arg=new TypeError("The iterator does not provide a '"+_e+"' method")),M):(_e=S(Re,ge.iterator,he.arg),_e.type==="throw"?(he.method="throw",he.arg=_e.arg,he.delegate=null,M):(Re=_e.arg,Re?Re.done?(he[ge.resultName]=Re.value,he.next=ge.nextLoc,he.method!=="return"&&(he.method="next",he.arg=p),he.delegate=null,M):Re:(he.method="throw",he.arg=new TypeError("iterator result is not an object"),he.delegate=null,M)));}(se,Y),se)){if(se===M)continue;return se;}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(j===w)throw j=O,Y.arg;Y.dispatchException(Y.arg);}else Y.method==="return"&&Y.abrupt("return",Y.arg);if(j=I,se=S(F,X,Y),se.type==="normal"){if(j=Y.done?O:C,se.arg===M)continue;return{value:se.arg,done:Y.done};}se.type==="throw"&&(j=O,Y.method="throw",Y.arg=se.arg);}})}),D;}function S(q,J,oe){try{return{type:"normal",arg:q.call(J,oe)};}catch(Q){return{type:"throw",arg:Q};}}c.wrap=v;var w="suspendedStart",C="suspendedYield",I="executing",O="completed",M={};function N(){}function G(){}function H(){}var B={},z=(f(B,s,function(){return this;}),Object.getPrototypeOf),z=z&&z(z(ue([]))),te=(z&&z!==d&&m.call(z,s)&&(B=z),H.prototype=N.prototype=Object.create(B));function K(q){["next","throw","return"].forEach(function(J){f(q,J,function(oe){return this._invoke(J,oe);});});}function V(q,J){var oe;a(this,"_invoke",{value:function(Q,F){function X(){return new J(function(Y,j){(function D(ge,ne,le,se){var fe,ge=S(q[ge],q,ne);if(ge.type!=="throw")return(ne=(fe=ge.arg).value)&&t(ne)=="object"&&m.call(ne,"__await")?J.resolve(ne.__await).then(function(he){D("next",he,le,se);},function(he){D("throw",he,le,se);}):J.resolve(ne).then(function(he){fe.value=he,le(fe);},function(he){return D("throw",he,le,se);});se(ge.arg);})(Q,F,Y,j);});}return oe=oe?oe.then(X,X):X();}});}function U(q){var J={tryLoc:q[0]};1 in q&&(J.catchLoc=q[1]),2 in q&&(J.finallyLoc=q[2],J.afterLoc=q[3]),this.tryEntries.push(J);}function Z(q){var J=q.completion||{};J.type="normal",delete J.arg,q.completion=J;}function re(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(U,this),this.reset(!0);}function ue(q){if(q||q===""){var J,oe=q[s];if(oe)return oe.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length))return J=-1,(oe=function Q(){for(;++J<q.length;)if(m.call(q,J))return Q.value=q[J],Q.done=!1,Q;return Q.value=p,Q.done=!0,Q;}).next=oe;}throw new TypeError(t(q)+" is not iterable");}return a(te,"constructor",{value:G.prototype=H,configurable:!0}),a(H,"constructor",{value:G,configurable:!0}
7),G.displayName=f(H,g,"GeneratorFunction"),c.isGeneratorFunction=function(q){return q=typeof q=="function"&&q.constructor,!!q&&(q===G||(q.displayName||q.name)==="GeneratorFunction");},c.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,H):(q.__proto__=H,f(q,g,"GeneratorFunction")),q.prototype=Object.create(te),q;},c.awrap=function(q){return{__await:q};},K(V.prototype),f(V.prototype,l,function(){return this;}),c.AsyncIterator=V,c.async=function(q,J,oe,Q,F){F===void 0&&(F=Promise);var X=new V(v(q,J,oe,Q),F);return c.isGeneratorFunction(J)?X:X.next().then(function(Y){return Y.done?Y.value:X.next();});},K(te),f(te,g,"Generator"),f(te,s,function(){return this;}),f(te,"toString",function(){return"[object Generator]";}),c.keys=function(q){var J,oe=Object(q),Q=[];for(J in oe)Q.push(J);return Q.reverse(),function F(){for(;Q.length;){var X=Q.pop();if(X in oe)return F.value=X,F.done=!1,F;}return F.done=!0,F;};},c.values=ue,re.prototype={constructor:re,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,this.tryEntries.forEach(Z),!q)for(var J in this)J.charAt(0)==="t"&&m.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=p);},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval;},dispatchException:function(q){if(this.done)throw q;var J=this;function oe(D,$){return X.type="throw",X.arg=q,J.next=D,$&&(J.method="next",J.arg=p),!!$;}for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q],X=F.completion;if(F.tryLoc==="root")return oe("end");if(F.tryLoc<=this.prev){var Y=m.call(F,"catchLoc"),j=m.call(F,"finallyLoc");if(Y&&j){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}else if(Y){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);}else{if(!j)throw Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}}}},abrupt:function(q,J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.tryLoc<=this.prev&&m.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var F=Q;break;}}var X=(F=F&&(q==="break"||q==="continue")&&F.tryLoc<=J&&J<=F.finallyLoc?null:F)?F.completion:{};return X.type=q,X.arg=J,F?(this.method="next",this.next=F.finallyLoc,M):this.complete(X);},complete:function(q,J){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&J&&(this.next=J),M;},finish:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J];if(oe.finallyLoc===q)return this.complete(oe.completion,oe.afterLoc),Z(oe),M;}},catch:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe,Q,F=this.tryEntries[J];if(F.tryLoc===q)return(oe=F.completion).type==="throw"&&(Q=oe.arg,Z(F)),Q;}throw Error("illegal catch attempt");},delegateYield:function(q,J,oe){return this.delegate={iterator:ue(q),resultName:J,nextLoc:oe},this.method==="next"&&(this.arg=p),M;}},c;}function o(p,c){var d,m=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!m){if(Array.isArray(p)||(m=function(g,f){if(g){if(typeof g=="string")return _(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?_(g,f):void 0;}}(p))||c&&p&&typeof p.length=="number")return m&&(p=m),d=0,{s:c=function(){},n:function(){return d>=p.length?{done:!0}:{done:!1,value:p[d++]};},e:function(g){throw g;},f:c};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a,s=!0,l=!1;return{s:function(){m=m.call(p);},n:function(){var g=m.next();return s=g.done,g;},e:function(g){l=!0,a=g;},f:function(){try{s||m.return==null||m.return();}finally{if(l)throw a;}}};}function _(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function E(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}var x=this&&this.__awaiter||function(p,c,d,m){return new(d=d||Promise)(function(a,s){function l(v){try{f(m.next(v));}catch(S){s(S);}}function g(v){try{f(m.throw(v));}catch(S){s(S);}}function f(v){var S;
8v.done?a(v.value):((S=v.value)instanceof d?S:new d(function(w){w(S);})).then(l,g);}f((m=m.apply(p,c||[])).next());});},h=(Object.defineProperty(r,"__esModule",{value:!0}),r.MediaPlayerCache=r.PRIMARY_URL_ID=void 0,b(5)),y=b(227),b=(r.PRIMARY_URL_ID="id-primary",function(){function p(){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");this._disposed=!1,this._useVideoPlayersAudio=!0,this._players=[],this._playerPromises=new Map(),p.initUserEngagementOnce();}return c=p,m=[{key:"initUserEngagementOnce",value:function(){var a;p.userEngagementInitialized||(p.userEngagementInitialized=!0,a=function(s){p.isUserEngaged=!0,window.removeEventListener("touchstart",a),window.removeEventListener("click",a);},window.addEventListener("touchstart",a),window.addEventListener("click",a));}},{key:"getInstance",value:function(a){if(a)return p.instances.has(a)||p.instances.set(a,new p()),p.instances.get(a);throw new Error("MediaPlayerCache.getInstance requires a containerId");}},{key:"disposeInstance",value:function(a){var s=p.instances.get(a);s&&(s._disposed=!0,s.clear(),p.instances.delete(a));}}],(d=[{key:"players",get:function(){return this._players;}},{key:"setVolumeGlobally",value:function(a){if(Array.isArray(this._players)){var s,l=o(this._players);try{for(l.s();!(s=l.n()).done;)s.value.loaderObj.loader.volume=a;}catch(g){l.e(g);}finally{l.f();}}}},{key:"useVideoPlayersAudio",get:function(){return this._useVideoPlayersAudio;},set:function(a){var s,l=o(this._players);try{for(l.s();!(s=l.n()).done;){var g=s.value;a===!1&&g.loaderObj.loader.disconnectAudioNodes(),g.player.muted(!0);}}catch(f){l.e(f);}finally{l.f();}this._useVideoPlayersAudio=a;}},{key:"playersSize",value:function(){return this._players.length;}},{key:"getPlayer",value:function(a,s,l,g){var f=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4];return x(this,void 0,void 0,n().mark(function v(){var S,w,C,I;return n().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:S="".concat(a,"-").concat(s),w=0;case 2:if(!(w<this._players.length)){O.next=9;break;}if(this._players[w].src===s&&this._players[w].loaderObj.opts.urlId===a)return h.default.debug("[".concat(this.constructor.name,"] Found equal video player ").concat(S)),O.abrupt("return",this._players[w]);O.next=6;break;case 6:w++,O.next=2;break;case 9:if(C=this._playerPromises.get(S))return O.next=13,C;O.next=17;break;case 13:return C=O.sent,O.abrupt("return",C);case 17:return h.default.debug("[".concat(this.constructor.name,"] Creating video player ").concat(S)),I=this.createPlayer(a,s,l,g,f),this._playerPromises.set(S,I),O.next=22,I;case 22:return I=O.sent,this._playerPromises.delete(S),O.abrupt("return",I);case 25:case"end":return O.stop();}},v,this);}));}},{key:"createPlayer",value:function(a,s,l,g){var f=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4];return x(this,void 0,void 0,n().mark(function v(){var S,w,C,I,O,M,N,G,H=this;return n().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return(S=document.createElement("video")).id="vjs_bigvu_".concat(h.default.shortGUID()),w=void 0,S.setAttribute("playsinline","playsinline"),S.setAttribute("hidden","true"),S.crossOrigin="anonymous",document.body.appendChild(S),B.prev=7,C=new y.VideoMediaLoader(S),I={urlId:a,volume:g,preload:f?"auto":"none",currentTime:l,event:f?"canplay":"loadstart",url:s,useGainVolume:p.useGainVolume},B.next=14,C.load(I);case 14:if(O=B.sent,(M=document.getElementById(S.id))==null)throw new Error("Element not found");B.next=18;break;case 18:if(G=function(){return x(H,void 0,void 0,n().mark(function z(){var te;return n().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:w.playingCallback&&w.playingCallback((te=w.playingCallback)==null?void 0:te.guid);case 1:case"end":return K.stop();}},z);}));},(N=function(){return x(H,void 0,void 0,n().mark(function z(){var te;return n().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:w.waitingCallback&&w.waitingCallback((te=w.waitingCallback)==null?void 0:te.guid);case 1:case"end":return K.stop();}},z);}));}).guid="VDM_PLAYER_WAITING",G.guid="VDM_PLAYER_PLAYING",O.on("waiting",N),O.on("playing",G),O.on("seeking",function(){w.seeking=!0;}),O.on("seeked",function(){w.seeking=!1;}),w={player:O,urlId:a,loaded:f,loaderObj:{opts:I,loader:C},src:s,element:M,width:S.videoWidth,height:S.videoHeight,frameTimes:[],seeking:!1},this._players.push(w),!this._disposed){B.next=34;break;}console.warn("Player created after disposal, cleaning up");try{O.dispose();}catch{}throw M!=null&&M.parentElement&&M.parentElement.remove(),this._players=this._players.filter(function(z){return z!==w;}),new Error("MediaPlayerCache disposed during getPlayer");case 34:p.isSafari||document.body.removeChild(M.parentElement),B.next=44;break;case 37:throw B.prev=37,B.t0=B.catch(7),h.default.debug("[".concat(this.constructor.name,"] Error loading Video: urlId:").concat(a," ").concat(s)),h.default.debug(B.t0),C&&C.disconnectAudioNodes(),w=void 0,B.t0;case 44:return h.default.debug("[".concat(this.constructor.name,"] Total players atm: ").concat(this._players.length)),B.abrupt("return",w);case 46:case"end":return B.stop();}},v,this,[[7,37]]);}));}},{key:"clear",value:function(){function a(){}function s(){}
8a.guid="VDM_PLAYER_WAITING",s.guid="VDM_PLAYER_PLAYING";var l,g=o(this._players);try{for(g.s();!(l=g.n()).done;){var f=l.value;f.player.off("waiting",a),f.player.off("playing",s),f.player.off("seeking",s),f.player.off("seeked",s),f.loaderObj.loader.disconnectAudioNodes(),f.player.dispose();}}catch(v){g.e(v);}finally{g.f();}this._players=[];}}])&&E(c.prototype,d),m&&E(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}());(r.MediaPlayerCache=b).instances=new Map(),b.userEngagementInitialized=!1,b.isSafari=!1,b.startMediaMuted=!1,b.isUserEngaged=!1,b.useGainVolume=!1;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.DRAW_VIDEO_BG_FPS=r.DRAW_VIDEO_FG_FPS=r.VIDEO_MAX_PRELOAD_TIME=r.VIDEO_FRAME_AMOUNT_THRESHOLD=r.GSAP_FPS=r.ROUND_PRECISION=r.STUDIO_TRANSFORM_ORIGIN=r.VDOM_NAME=r.GlobalConstants=r.DisplayPriority=void 0,(o=r.DisplayPriority||(r.DisplayPriority={}))[o.LAST_ORDER=0]="LAST_ORDER",o[o.MASTER_ORDER=1]="MASTER_ORDER",o[o.FIRST_ORDER=2]="FIRST_ORDER";var o=function(){function _(){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");}return E=_,h=[{key:"setStoryDuration",value:function(y){this._storyDuration=y;}},{key:"setStoryDimensions",value:function(y,b){this._storyWidth=y,this._storyHeight=b;}},{key:"setVDMContainerRect",value:function(y){this._vdmContainerRect=y;}},{key:"VDM_CONTAINER_WIDTH",get:function(){var y;return(y=this._vdmContainerRect)==null?void 0:y.width;}},{key:"VDM_CONTAINER_HEIGHT",get:function(){var y;return(y=this._vdmContainerRect)==null?void 0:y.height;}},{key:"VDM_CONTAINER_X",get:function(){var y;return(y=this._vdmContainerRect)==null?void 0:y.x;}},{key:"VDM_CONTAINER_Y",get:function(){var y;return(y=this._vdmContainerRect)==null?void 0:y.y;}},{key:"VDM_CONTAINER_RIGHT",get:function(){var y;return(y=this._vdmContainerRect)==null?void 0:y.right;}},{key:"STORY_DURATION",get:function(){return this._storyDuration;}}],(x=null)&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();(r.GlobalConstants=o).MASTER_ZINDEX="1000",o._storyWidth=0,o._storyHeight=0,o._storyDuration=0,r.VDOM_NAME="__VDOM",r.STUDIO_TRANSFORM_ORIGIN="left top",r.ROUND_PRECISION=3,r.GSAP_FPS=60,r.VIDEO_FRAME_AMOUNT_THRESHOLD=5,r.VIDEO_MAX_PRELOAD_TIME=2,r.DRAW_VIDEO_FG_FPS=30,r.DRAW_VIDEO_BG_FPS=10;},function(i,r,n){var n=n(77),t=typeof self=="object"&&self&&self.Object===Object&&self,n=n||t||Function("return this")();i.exports=n;},function(i,S,e){"use strict";e.d(S,"a",function(){return B;}),e.d(S,"b",function(){return V;}),e.d(S,"c",function(){return Re;}),e.d(S,"d",function(){return ee;});function t(W){return!!W&&typeof W=="object";}function n(){for(var W=arguments.length,ae=new Array(W),de=0;de<W;de++)ae[de]=arguments[de];return ae.reduce(function(ye,Se){return typeof Se=="object"&&Object.keys(Se).forEach(function(De){Array.isArray(ye[De])&&Array.isArray(Se[De])?ye[De]=ye[De].concat(Se[De]):t(ye[De])&&t(Se[De])?ye[De]=n(ye[De],Se[De]):ye[De]=Se[De];}),ye;},{});}function o(W){return Object.keys(W).map(function(ae){return W[ae];});}function _(W){if(!W.length)return[];for(var ae=[],de=0;de<W.length;de++)ae.push(W[de]);return ae;}function E(W,ae){for(var de=0;de<W.length;de++)if(ae(W[de]))return de;return-1;}function x(W){return W&&typeof W!="number"&&(W=parseInt(W,10)),isNaN(W)?null:W;}function h(W){var ae=W.baseUrl,de=(de=W.initialization)===void 0?{}
8:de,ye=W.sourceDuration,Se=(Se=W.indexRange)===void 0?"":Se,De=W.periodStart,Ue=W.presentationTime,Be=(Be=W.number)===void 0?0:Be,nt=W.duration;if(ae)return de=N({baseUrl:ae,source:de.sourceURL,range:de.range}),(ae=N({baseUrl:ae,source:ae,indexRange:Se})).map=de,nt?(Se=H(W)).length&&(ae.duration=Se[0].duration,ae.timeline=Se[0].timeline):ye&&(ae.duration=ye,ae.timeline=De),ae.presentationTime=Ue||De,ae.number=Be,[ae];throw new Error(M.NO_BASE_URL);}function y(W){var ae,de,ye=[];return ae=W,de=function(Se,De,Ue,Be){ye=ye.concat(Se.playlists||[]);},z.forEach(function(Se){for(var De in ae.mediaGroups[Se])for(var Ue in ae.mediaGroups[Se][De]){var Be=ae.mediaGroups[Se][De][Ue];de(Be,Se,De,Ue);}}),ye;}function b(de){var ae=de.playlist,de=de.mediaSequence;ae.mediaSequence=de,ae.segments.forEach(function(ye,Se){ye.number=ae.mediaSequence+Se;});}function p(W,ae){var de=V(W.sidx);return(ae=de&&ae[de]&&ae[de].sidx)&&B(W,ae,W.sidx.resolvedUri),W;}function c(W,ae){for(var de,ye,Se,De,Ue,Be,nt,it=W.type,ot=W.minimumUpdatePeriod,ht=ot===void 0?0:ot,Et=(ot=W.media)===void 0?"":ot,At=W.sourceDuration,Nt=(ot=W.timescale)===void 0?1:ot,Ut=(ot=W.startNumber)===void 0?1:ot,bi=W.periodStart,Ge=[],qe=-1,yt=0;yt<ae.length;yt++)for(var bt,gt=(Mt=ae[yt]).d,Ot=Mt.r||0,Mt=Mt.t||0,Mt=(qe<0&&(qe=Mt),Mt&&qe<Mt&&(qe=Mt),void 0),Lt=(Mt=Ot<0?(bt=yt+1)===ae.length?it==="dynamic"&&0<ht&&0<Et.indexOf("$Number$")?(ye=qe,nt=Be=Ue=De=Se=void 0,Se=(de=W).NOW,De=de.clientOffset,Ue=de.availabilityStartTime,Be=de.timescale,nt=de.periodStart,de=de.minimumUpdatePeriod,Math.ceil((((Se+De)/1e3+(de===void 0?0:de)-(Ue+(nt===void 0?0:nt)))*(Be===void 0?1:Be)-ye)/gt)):(At*Nt-qe)/gt:(ae[bt].t-qe)/gt:Ot+1,Ut+Ge.length+Mt),Kt=Ut+Ge.length;Kt<Lt;)Ge.push({number:Kt,duration:gt/Nt,time:qe,timeline:bi}),qe+=gt,Kt++;return Ge;}function d(W,ae){return W.replace(j,(de=ae,function(ye,Se,De,Ue){return ye==="$$"?"$":de[Se]===void 0?ye:(ye=""+de[Se],Se==="RepresentationID"||(Ue=De?parseInt(Ue,10):1)<=ye.length?ye:new Array(Ue-ye.length+1).join("0")+ye);}));var de;}function m(W,ae){var de={RepresentationID:W.id,Bandwidth:W.bandwidth||0},ye=(ye=W.initialization)===void 0?{sourceURL:"",range:""}:ye,Se=N({baseUrl:W.baseUrl,source:d(ye.sourceURL,de),range:ye.range});return ye=ae,((ae=W).duration||ye?ae.duration?H(ae):c(ae,ye):[{number:ae.startNumber||1,duration:ae.sourceDuration,time:0,timeline:ae.periodStart}]).map(function(De){de.Number=De.number,de.Time=De.time;var Ue=d(W.media||"",de),Be=W.timescale||1,nt=W.presentationTimeOffset||0,nt=W.periodStart+(De.time-nt)/Be;return{uri:Ue,timeline:De.timeline,duration:De.duration,resolvedUri:Object(v.a)(W.baseUrl||"",Ue),map:Se,number:De.number,presentationTime:nt};});}function a(W,ae){var de=W.duration,ye=(ye=W.segmentUrls)===void 0?[]:ye,Se=W.periodStart;if(!de&&!ae||de&&ae)throw new Error(M.SEGMENT_TIME_UNSPECIFIED);var De,Ue=ye.map(function(Be){return Be=Be,it=(nt=W).baseUrl,nt=nt.initialization,nt=N({baseUrl:it,source:(nt=nt===void 0?{}:nt).sourceURL,range:nt.range}),(it=N({baseUrl:it,source:Be.media,range:Be.mediaRange})).map=nt,it;var nt,it;});return de&&(De=H(W)),(De=ae?c(W,ae):De).map(function(Be,nt){var it,ot;if(Ue[nt])return nt=Ue[nt],it=W.timescale||1,ot=W.presentationTimeOffset||0,nt.timeline=Be.timeline,nt.duration=Be.duration,nt.number=Be.number,nt.presentationTime=Se+(Be.time-ot)/it,nt;}).filter(function(Be){return Be;});}function s(Ue){if(!(Ue=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(Ue)))return 0;var ae=(Ue=Ue.slice(1))[0],de=Ue[1],ye=Ue[2],Se=Ue[3],De=Ue[4],Ue=Ue[5];return 31536e3*parseFloat(ae||0)+2592e3*parseFloat(de||0)+86400*parseFloat(ye||0)+3600*parseFloat(Se||0)+60*parseFloat(De||0)+parseFloat(Ue||0);}function l(Se){var ae=$(Se,"SegmentTemplate")[0],de=$(Se,"SegmentList")[0],ye=de&&$(de,"SegmentURL").map(function(nt){return n({tag:"SegmentURL"},se(nt));}),Se=$(Se,"SegmentBase")[0],De=(De=de||ae)&&$(De,"SegmentTimeline")[0],Ue=(Ue=de||Se||ae)&&$(Ue,"Initialization")[0],Be=((ae=ae&&se(ae))&&Ue?ae.initialization=Ue&&se(Ue):ae&&ae.initialization&&(ae.initialization={sourceURL:ae.initialization}),{template:ae,segmentTimeline:De&&$(De,"S").map(function(nt){return se(nt);}),list:de&&n(se(de),{segmentUrls:ye,initialization:se(Ue)}),base:Se&&n(se(Se),{initialization:se(Ue)})});return Object.keys(Be).forEach(function(nt){Be[nt]||delete Be[nt];}),Be;}function g(W,ae,de){return function(it){var Se,De,Ue,nt=se(it),Be=ge(ae,$(it,"BaseURL")),ot=$(it,"Role")[0],ot={role:se(ot)},nt=n(W,nt,ot),ot=$(it,"Accessibility")[0],ot=(ot=se(ot)).schemeIdUri==="urn:scte:dash:cc:cea-608:2
8015"?(typeof ot.value!="string"?[]:ot.value.split(";")).map(function(ht){var Et,At,Nt;return /^CC\d=/.test(Nt=ht)?(At=(Et=ht.split("="))[0],Nt=Et[1]):/^CC\d$/.test(ht)&&(At=ht),{channel:At,language:Nt};}):ot.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"?(typeof ot.value!="string"?[]:ot.value.split(";")).map(function(ht){var Et,At,Nt={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};return /=/.test(ht)?(Et=(At=ht.split("="))[0],At=(At=At[1])===void 0?"":At,Nt.channel=Et,Nt.language=ht,At.split(",").forEach(function(Ge){var Ge=Ge.split(":"),bi=Ge[0],Ge=Ge[1];bi==="lang"?Nt.language=Ge:bi==="er"?Nt.easyReader=Number(Ge):bi==="war"?Nt.aspectRatio=Number(Ge):bi==="3D"&&(Nt["3D"]=Number(Ge));})):Nt.language=ht,Nt.channel&&(Nt.channel="SERVICE"+Nt.channel),Nt;}):void 0,ot=(ot&&(nt=n(nt,{captionServices:ot})),$(it,"Label")[0]),ot=(ot&&ot.childNodes.length&&(ot=ot.childNodes[0].nodeValue.trim(),nt=n(nt,{label:ot})),$(it,"ContentProtection").reduce(function(ht,Et){var At=se(Et),Nt=(At.schemeIdUri&&(At.schemeIdUri=At.schemeIdUri.toLowerCase()),fe[At.schemeIdUri]);return Nt&&(ht[Nt]={attributes:At},(At=$(Et,"cenc:pssh")[0])&&(Et=ne(At),ht[Nt].pssh=Et&&Object(C.a)(Et))),ht;},{})),ot=(Object.keys(ot).length&&(nt=n(nt,{contentProtection:ot})),l(it)),it=$(it,"Representation"),ot=n(de,ot);return O(it.map((Se=nt,De=Be,Ue=ot,function(ht){var Et=$(ht,"BaseURL"),Et=ge(De,Et),At=n(Se,se(ht)),Nt=l(ht);return Et.map(function(Ut){return{segmentInfo:n(Ue,Nt),attributes:n(At,{baseUrl:Ut})};});})));};}function f(W){if(W==="")throw new Error(M.DASH_EMPTY_MANIFEST);var ae,de,ye=new I.DOMParser();try{de=(ae=ye.parseFromString(W,"application/xml"))&&ae.documentElement.tagName==="MPD"?ae.documentElement:null;}catch{}if(!de||0<de.getElementsByTagName("parsererror").length)throw new Error(M.DASH_INVALID_XML);return de;}var v=e(23),S=e(0),w=e.n(S),C=e(44),I=e(100),O=function(W){return W.reduce(function(ae,de){return ae.concat(de);},[]);},M={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},N=function(ye){var Se=ye.baseUrl,Se=Se===void 0?"":Se,ae=ye.source,ae=ae===void 0?"":ae,de=ye.range,de=de===void 0?"":de,ye=ye.indexRange,ye=ye===void 0?"":ye,Se={uri:ae,resolvedUri:Object(v.a)(Se||"",ae)};return(de||ye)&&(ae=(de||ye).split("-"),de=w.a.BigInt?w.a.BigInt(ae[0]):parseInt(ae[0],10),ye=w.a.BigInt?w.a.BigInt(ae[1]):parseInt(ae[1],10),de<Number.MAX_SAFE_INTEGER&&typeof de=="bigint"&&(de=Number(de)),typeof(ae=typeof(ye=ye<Number.MAX_SAFE_INTEGER&&typeof ye=="bigint"?Number(ye):ye)=="bigint"||typeof de=="bigint"?w.a.BigInt(ye)-w.a.BigInt(de)+w.a.BigInt(1):ye-de+1)=="bigint"&&ae<Number.MAX_SAFE_INTEGER&&(ae=Number(ae)),Se.byterange={length:ae,offset:de}),Se;},G={static:function(Se){var De=Se.duration,ae=Se.timescale,ae=ae===void 0?1:ae,de=Se.sourceDuration,ye=Se.periodDuration,Se=x(Se.endNumber),De=De/ae;return typeof Se=="number"?{start:0,end:Se}:typeof ye=="number"?{start:0,end:ye/De}:{start:0,end:de/De};},dynamic:function(Se){var De=Se.NOW,Ue=Se.clientOffset,Be=Se.availabilityStartTime,ae=Se.timescale,ae=ae===void 0?1:ae,de=Se.duration,nt=Se.periodStart,nt=nt===void 0?0:nt,it=Se.minimumUpdatePeriod,it=it===void 0?0:it,ye=Se.timeShiftBufferDepth,ye=ye===void 0?1/0:ye,Se=x(Se.endNumber),De=(De+Ue)/1e3,Ue=Be+nt,Be=Math.ceil((De+it-Ue)*ae/de),nt=Math.floor((De-Ue-ye)*ae/de),it=Math.floor((De-Ue)*ae/de);return{start:Math.max(0,nt),end:typeof Se=="number"?Se:Math.min(Be,it)};}},H=function(W){var ae,de=W.type,ye=W.duration,Se=W.timescale,Se=Se===void 0?1:Se,De=W.periodDuration,Ue=W.sourceDuration,Be=G[de](W),Be=function(nt,it){for(var ot=[],ht=nt;ht<it;ht++)ot.push(ht);return ot;}(Be.start,Be.end).map((ae=W,function(nt){var it=ae.duration,ot=ae.timescale,ht=ae.periodStart,Et=ae.startNumber;return{number:(Et===void 0?1:Et)+nt,duration:it/(ot===void 0?1:ot),timeline:ht,time:nt*it};}));return de==="static"&&(Be[W=Be.length-1].duration=(typeof De=="number"?De:Ue)-ye/Se*W),Be;},B=function(W,ae,de){for(var ye=W.sidx.map||null,Se=W.sidx.duration,De=W.timeline||0,Ue=W.sidx.byterange,Ue=Ue.offset+Ue.length,Be=ae.timescale,nt=ae.references.filter(function(yt){return yt.referenceType!==1;}),it=[],ot=W.endList?"static":"dynamic",ht=W.sidx.timeline,Et=ht,At=W.mediaSequence||0,Nt=typeof ae.firstOffset=="bigint"?w.a.BigInt(Ue)+ae.firstOffset:Ue+ae.firstOffset,Ut=0;Ut<nt.length;Ut++){var Ge=ae.references[Ut],bi=Ge.referencedSize,Ge=Ge.subsegmentDuration,qe=void 0,qe=typeof Nt=="bigint"?Nt+w.a.BigInt(bi)-w.a.BigInt(1):Nt+bi-1,qe=h({baseUrl:de,timescale:Be,timeline:De,periodStart:ht,presentationTime:Et,number:At,duration:Ge,sourceDuration:Se,indexRange:Nt+"-"+qe,type:ot})[0];ye&&(qe.map=ye),it.push(qe),Nt+=typeof Nt=="bigint"?w.a.BigInt(bi):bi,Et+=Ge/Be,At++;}return W.segments=it,W;},z=["AUDIO","SUBTITLES"],te=function(W){return ae=function(de){return de.timeline;},o(W.reduce(function(de,ye){return ye.forEach(function(Se){de[ae(Se)]=Se;}),de;},{})).sort(function(de,ye){return de.timeline>ye.timeline?1:-1;});var ae;},K=function(Se){var ae,de,ye=Se.oldManifest,Se=Se.newManifest,De=ye.playlists.concat(y(ye)),Ue=Se.playlists.concat(y(Se));return Se.timelineStarts=te([ye.timelineStarts,Se.timelineStarts]),ye={oldPlaylists:De,newPlaylists:Ue,timelineStarts:Se.timelineStarts},ae=ye.oldPlaylists,De=ye.newPlaylists,de=ye.timelineStarts,De.forEach(function(Be){Be.discontinuitySequence=E(de,function(ht){return ht.t
8imeline===Be.timeline;});var nt,it,ot=function(ht,Et){for(var At=0;At<ht.length;At++)if(ht[At].attributes.NAME===Et)return ht[At];return null;}(ae,Be.attributes.NAME);ot&&!Be.sidx&&(nt=Be.segments[0],(it=E(ot.segments,function(ht){return Math.abs(ht.presentationTime-nt.presentationTime)<1/60;}))===-1?(b({playlist:Be,mediaSequence:ot.mediaSequence+ot.segments.length}),Be.segments[0].discontinuity=!0,Be.discontinuityStarts.unshift(0),(!ot.segments.length&&Be.timeline>ot.timeline||ot.segments.length&&Be.timeline>ot.segments[ot.segments.length-1].timeline)&&Be.discontinuitySequence--):(ot.segments[it].discontinuity&&!nt.discontinuity&&(nt.discontinuity=!0,Be.discontinuityStarts.unshift(0),Be.discontinuitySequence--),b({playlist:Be,mediaSequence:ot.segments[it].number})));}),Se;},V=function(W){return W&&W.uri+"-"+(W=W.byterange,ae=typeof W.offset=="bigint"||typeof W.length=="bigint"?w.a.BigInt(W.offset)+w.a.BigInt(W.length)-w.a.BigInt(1):W.offset+W.length-1,W.offset+"-"+ae);var ae;},U=function(W){return o(W.reduce(function(ae,de){var ye,Se=de.attributes.id+(de.attributes.lang||"");return ae[Se]?(de.segments&&(de.segments[0]&&(de.segments[0].discontinuity=!0),(ye=ae[Se].segments).push.apply(ye,de.segments)),de.attributes.contentProtection&&(ae[Se].attributes.contentProtection=de.attributes.contentProtection)):(ae[Se]=de,ae[Se].attributes.timelineStarts=[]),ae[Se].attributes.timelineStarts.push({start:de.attributes.periodStart,timeline:de.attributes.periodStart}),ae;},{})).map(function(ae){var de,ye;return ae.discontinuityStarts=(de=ae.segments||[],ye="discontinuity",de.reduce(function(Se,De,Ue){return De[ye]&&Se.push(Ue),Se;},[])),ae;});},Z=function(W,ae){if(ae===void 0&&(ae={}),Object.keys(ae).length)for(var de in W)W[de]=p(W[de],ae);return W;},re=function(Se,ae,de){ae===void 0&&(ae={}),de===void 0&&(de=!1);var ye,Se=Se.reduce(function(De,Ue){var Be,nt,it,ot,ht,Et,At=Ue.attributes.role&&Ue.attributes.role.value||"",Nt=Ue.attributes.lang||"",Ut=Ue.attributes.label||"main",bi=(De[Ut=Nt&&!Ue.attributes.label?Ue.attributes.lang+(At?" ("+At+")":""):Ut]||(De[Ut]={language:Nt,autoselect:!0,default:At==="main",playlists:[],uri:""}),p((Nt=de,nt=(Be=Ue).attributes,it=Ue.segments,ot=Ue.sidx,ht=Ue.mediaSequence,bi=Ue.discontinuitySequence,Be=Ue.discontinuityStarts,Et={attributes:((Et={NAME:nt.id,BANDWIDTH:nt.bandwidth,CODECS:nt.codecs})["PROGRAM-ID"]=1,Et),uri:"",endList:nt.type==="static",timeline:nt.periodStart,resolvedUri:"",targetDuration:nt.duration,discontinuitySequence:bi,discontinuityStarts:Be,timelineStarts:nt.timelineStarts,mediaSequence:ht,segments:it},nt.contentProtection&&(Et.contentProtection=nt.contentProtection),ot&&(Et.sidx=ot),Nt&&(Et.attributes.AUDIO="audio",Et.attributes.SUBTITLES="subs"),Et),ae));return De[Ut].playlists.push(bi),ye===void 0&&At==="main"&&((ye=Ue).default=!0),De;},{});return ye||(Se[Object.keys(Se)[0]].default=!0),Se;},ue=function(W,ae){return ae===void 0&&(ae={}),W.reduce(function(de,ye){var Se=ye.attributes.lang||"text";return de[Se]||(de[Se]={language:Se,default:!1,autoselect:!1,playlists:[],uri:""}),de[Se].playlists.push(p(function(ht){var Ue,Be=ht.attributes,nt=ht.segments,it=ht.mediaSequence,ot=ht.discontinuityStarts,ht=ht.discontinuitySequence;return nt===void 0&&(nt=[{uri:Be.baseUrl,timeline:Be.periodStart,resolvedUri:Be.baseUrl||"",duration:Be.sourceDuration,number:0}],Be.duration=Be.sourceDuration),(Ue={NAME:Be.id,BANDWIDTH:Be.bandwidth})["PROGRAM-ID"]=1,Be.codecs&&(Ue.CODECS=Be.codecs),{attributes:Ue,uri:"",endList:Be.type==="static",timeline:Be.periodStart,resolvedUri:Be.baseUrl||"",targetDuration:Be.duration,timelineStarts:Be.timelineStarts,discontinuityStarts:ot,discontinuitySequence:ht,mediaSequence:it,segments:nt};}(ye),ae)),de;},{});},q=function(W){return W.reduce(function(ae,de){return de&&de.forEach(function(ye){var Se=ye.channel,De=ye.language;ae[De]={autoselect:!1,default:!1,instreamId:Se,language:De},ye.hasOwnProperty("aspectRatio")&&(ae[De].aspectRatio=ye.aspectRatio),ye.hasOwnProperty("easyReader")&&(ae[De].easyReader=ye.easyReader),ye.hasOwnProperty("3D")&&(ae[De]["3D"]=ye["3D"]);}),ae;},{});},J=function(Se){var ae=Se.attributes,de=Se.segments,ye=Se.sidx,Se=Se.discontinuityStarts,De={attributes:((De={NAME:ae.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:ae.width,height:ae.height},CODECS:ae.codecs,BANDWIDTH:ae.bandwidth})["PROGRAM-ID"]=1,De),uri:"",endList:ae.type==="static",timeline:ae.periodStart,resolvedUri:"",targetDuration:ae.duration,discontinuityStarts:Se,timelineStarts:ae.timelineStarts,segments:de};return ae.frameRate&&(De.attributes["FRAME-RATE"]=ae.frameRate),ae.contentProtection&&(De.contentProtection=ae.contentProtection),ye&&(De.sidx=ye),De;},oe=function(W){return W=W.attributes,W.mimeType==="video/mp4"||W.mimeType==="video/webm"||W.contentType==="video";},Q=function(W){return W=W.attributes,W.mimeType==="audio/mp4"||W.mimeType==="audio/webm"||W.contentType==="audio";},F=function(W){return W=W.attributes,W.mimeType==="text/vtt"||W.contentType==="text";},X=function(W,ae){W.forEach(function(de){de.mediaSequence=0,de.discontinuitySequence=E(ae,function(ye){return ye.timeline===de.timeline;}
8),de.segments&&de.segments.forEach(function(ye,Se){ye.number=Se;});});},Y=function(W){return W?Object.keys(W).reduce(function(ae,de){return de=W[de],ae.concat(de.playlists);},[]):[];},j=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,D=function(De){var ae,de,ye,Se,Ue=De.attributes,De=De.segmentInfo,Ue=(De.template?(de=m,ae=n(Ue,De.template)):De.base?(de=h,ae=n(Ue,De.base)):De.list&&(de=a,ae=n(Ue,De.list)),{attributes:Ue});return de&&(de=de(ae,De.segmentTimeline),ae.duration?(ye=(Se=ae).duration,Se=Se.timescale,ae.duration=ye/(Se===void 0?1:Se)):de.length?ae.duration=de.reduce(function(Be,nt){return Math.max(Be,Math.ceil(nt.duration));},0):ae.duration=0,Ue.attributes=ae,Ue.segments=de,De.base&&ae.indexRange&&(Ue.sidx=de[0],Ue.segments=[])),Ue;},$=function(W,ae){return _(W.childNodes).filter(function(de){return de.tagName===ae;});},ne=function(W){return W.textContent.trim();},le={mediaPresentationDuration:s,availabilityStartTime:function(W){return /^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(W=W)&&(W+="Z"),Date.parse(W)/1e3;},minimumUpdatePeriod:s,suggestedPresentationDelay:s,type:function(W){return W;},timeShiftBufferDepth:s,start:s,width:function(W){return parseInt(W,10);},height:function(W){return parseInt(W,10);},bandwidth:function(W){return parseInt(W,10);},frameRate:function(W){return parseFloat(W.split("/").reduce(function(ae,de){return ae/de;}));},startNumber:function(W){return parseInt(W,10);},timescale:function(W){return parseInt(W,10);},presentationTimeOffset:function(W){return parseInt(W,10);},duration:function(W){var ae=parseInt(W,10);return isNaN(ae)?s(W):ae;},d:function(W){return parseInt(W,10);},t:function(W){return parseInt(W,10);},r:function(W){return parseInt(W,10);},DEFAULT:function(W){return W;}},se=function(W){return W&&W.attributes?_(W.attributes).reduce(function(ae,de){var ye=le[de.name]||le.DEFAULT;return ae[de.name]=ye(de.value),ae;},{}):{};},fe={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ge=function(W,ae){return ae.length?O(W.map(function(de){return ae.map(function(ye){return Object(v.a)(de,ne(ye));});})):W;},he=function(W,ae){return function(Be,ye){var Se=ge(ae,$(Be.node,"BaseURL")),De=n(W,{periodStart:Be.attributes.start}),Ue=(typeof Be.attributes.duration=="number"&&(De.periodDuration=Be.attributes.duration),$(Be.node,"AdaptationSet")),Be=l(Be.node);return O(Ue.map(g(De,Se,Be)));};},_e=function(ye){var ae=ye.attributes,de=ye.priorPeriodAttributes,ye=ye.mpdType;return typeof ae.start=="number"?ae.start:de&&typeof de.start=="number"&&typeof de.duration=="number"?de.start+de.duration:de||ye!=="static"?null:0;},Re=function(nt,Et){Et===void 0&&(Et={});var nt=function(Nt,Ge){var Ge=Ge=Ge===void 0?{}:Ge,gt=Ge.manifestUri,gt=gt===void 0?"":gt,bi=Ge.NOW,bi=bi===void 0?Date.now():bi,Ge=Ge.clientOffset,Ge=Ge===void 0?0:Ge,qe=$(Nt,"Period");if(!qe.length)throw new Error(M.INVALID_NUMBER_OF_PERIOD);var yt=$(Nt,"Location"),bt=se(Nt),gt=ge([gt],$(Nt,"BaseURL")),Ot=(bt.type=bt.type||"static",bt.sourceDuration=bt.mediaPresentationDuration||0,bt.NOW=bi,bt.clientOffset=Ge,yt.length&&(bt.locations=yt.map(ne)),[]);return qe.forEach(function(Mt,Dt){var Kt=se(Mt),Dt=Ot[Dt-1];Kt.start=_e({attributes:Kt,priorPeriodAttributes:Dt?Dt.attributes:null,mpdType:bt.type}),Ot.push({node:Mt,attributes:Kt});}),{locations:bt.locations,representationInfo:O(Ot.map(he(bt,gt)))};}(f(nt),Et),ye=nt.representationInfo.map(D),nt=(ye={dashPlaylists:ye,locations:nt.locations,sidxMapping:Et.sidxMapping,previousManifest:Et.previousManifest}).dashPlaylists,Et=ye.locations,de=(de=ye.sidxMapping)===void 0?{}:de,ye=ye.previousManifest;if(!nt.length)return{};var ot=(ht=nt[0].attributes).sourceDuration,Se=ht.type,At=ht.suggestedPresentationDelay,ht=ht.minimumUpdatePeriod,De=U(nt.filter(oe)).map(J),Ue=U(nt.filter(Q)),Be=U(nt.filter(F)),nt=nt.map(function(Nt){return Nt.attributes.captionServices;}).filter(Boolean),it={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:((it={AUDIO:{},VIDEO:{}})["CLOSED-CAPTIONS"]={},it.SUBTITLES={},it),uri:"",duration:ot,playlists:Z(De,de)},ot=(0<=ht&&(it.minimumUpdatePeriod=1e3*ht),Et&&(it.locations=Et),Se==="dynamic"&&(it.suggestedPresentationDelay=At),it.playlists.length===0),ht=Ue.length?re(Ue,de,ot):null,Et=Be.length?ue(Be,de):null,At=(Se=De.concat(Y(ht),Y(Et))).map(function(Nt){return Nt.timelineStarts;});return it.timelineStarts=te(At),X(Se,it.timelineStarts),ht&&(it.mediaGroups.AUDIO.audio=ht),Et&&(it.mediaGroups.SUBTITLES.subs=Et),nt.length&&(it.mediaGroups["CLOSED-CAPTIONS"].cc=q(nt)),ye?K({oldManifest:ye,newManifest:it}):it;},ee=function(W){if(W=f(W),!(W=$(W,"UTCTiming")[0]))return null;var ae=se(W);switch(ae.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":ae.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":ae.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":ae.method="DIRECT",ae.value=Date.parse(ae.value);break;default:throw new Error(M.UNSUPPORTED_UTC_TIMING_SCHEME);}return ae;};},function(i,r,e){var t=e(130),n=e(135);i.exports=function(o,_){return o=n(o,_),t(o)?o:void 0;};},function(i,r,e){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}
8Object.defineProperty(r,"__esModule",{value:!0}),r.isCondSatisfied=r.getRefVal=r.recursivelyGetResource=r.getResourceByRef=r.deepReplaceIterator=void 0;var n=e(5),o=e(34);function _(x,h,y){return{iterate:function(b){var p=this;return(b=h(b))!==null&&t(b)==="object"&&Object.keys(b).forEach(function(c){var d=x(c);c===d||Array.isArray(b)||(Object.defineProperty(b,d,Object.getOwnPropertyDescriptor(b,c)),delete b[c]),b[c=d]=p.iterate(b[c]),y&&y(b,c,b[c]);}),b;}};}function E(x,h,y){if((0,o.isAccessObject)(h)||(0,o.isAccessManipulator)(h)){var b=n.default.deepGet(x,h);if(b==null)throw new Error("[".concat(y,"]: couldn't find the resource ").concat(h," within the slide for given resource ").concat(JSON.stringify(x)));return b;}return h;}r.deepReplaceIterator=_,r.getResourceByRef=E,r.recursivelyGetResource=function(x,h,y){return _(function(b){return b;},function(b){try{return E(x,b,y);}catch{}}).iterate(h);},r.getRefVal=function(x,h,y,b){if(x!=null&&h!=null){if(x.has(h.ref))return x.get(h.ref).getValue(y.toString());n.default.warn("".concat(b,": parameters look up table doesn't contain parameter ").concat(h.ref));}else n.default.warn("".concat(b,": parameters look up table is not defined!"));},r.isCondSatisfied=function(x){try{var h=x.eval();return typeof h=="boolean"&&h;}catch(y){return n.default.debug("Error while evaluating ".concat(x,", error ").concat(y.message)),!1;}};},function(i,r,e){"use strict";e.d(r,"a",function(){return o;});var t=e(1),n=Object(t.k)([73,68,51]),o=function _(E,x){return x===void 0&&(x=0),(E=Object(t.k)(E)).length-x<10||!Object(t.a)(E,n,{offset:x})?x:_(E,x+=(E=E,(h=x)===void 0&&(h=0),y=(E=Object(t.k)(E))[h+5],E=E[h+6]<<21|E[h+7]<<14|E[h+8]<<7|E[h+9],(16&y)>>4?20+E:10+E));var h,y;};},function(i,r,e){"use strict";function t(_,E){return function(x){if(Array.isArray(x))return x;}(_)||function(x,h){var y=x==null?null:typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(y!=null){var b,p,c,d,m=[],a=!0,s=!1;try{if(c=(y=y.call(x)).next,h===0){if(Object(y)!==y)return;a=!1;}else for(;!(a=(b=c.call(y)).done)&&(m.push(b.value),m.length!==h);a=!0);}catch(l){s=!0,p=l;}finally{try{if(!a&&y.return!=null&&(d=y.return(),Object(d)!==d))return;}finally{if(s)throw p;}}return m;}}(_,E)||function(x,h){if(x){if(typeof x=="string")return n(x,h);var y={}.toString.call(x).slice(8,-1);return(y=y==="Object"&&x.constructor?x.constructor.name:y)==="Map"||y==="Set"?Array.from(x):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?n(x,h):void 0;}}(_,E)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(_,E){(E==null||E>_.length)&&(E=_.length);for(var x=0,h=Array(E);x<E;x++)h[x]=_[x];return h;}Object.defineProperty(r,"__esModule",{value:!0}),r.VDOMConstructor=void 0;var o=e(5);r.VDOMConstructor={builder:function(_){for(var E=this,x={},h=0,y=Object.entries(_);h<y.length;h++){var p=t(y[h],2),b=p[0],p=p[1];p?this.isObject(p)&&o.default.hasVDOMBuilder(p)?x[b]=p.vDom||void 0:this.isArray(p)?x[b]=p.map(function(c){return E.isObject(c)&&o.default.hasVDOMBuilder(c)?c.vDom:E.builder(c);}):x[b]=o.default.snapShot(p):x[b]=void 0;}return x;},isFunction:function(_){return Object.prototype.toString.call(_)==="[object Function]";},isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]";},isObject:function(_){return Object.prototype.toString.call(_)==="[object Object]";},isValue:function(_){return!this.isObject(_)&&!this.isArray(_);}};},function(i,r,w){"use strict";function t(I){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O;}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O;})(I);}function n(I,O){var M,N=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!N){if(Array.isArray(I)||(N=function(z,te){if(z){if(typeof z=="string")return o(z,te);var K={}.toString.call(z).slice(8,-1);return(K=K==="Object"&&z.constructor?z.constructor.name:K)==="Map"||K==="Set"?Array.from(z):K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K)?o(z,te):void 0;}}(I))||O&&I&&typeof I.length=="number")return N&&(I=N),M=0,{s:O=function(){},n:function(){return M>=I.length?{done:!0}
9:{done:!1,value:I[M++]};},e:function(z){throw z;},f:O};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var G,H=!0,B=!1;return{s:function(){N=N.call(I);},n:function(){var z=N.next();return H=z.done,z;},e:function(z){B=!0,G=z;},f:function(){try{H||N.return==null||N.return();}finally{if(B)throw G;}}};}function o(I,O){(O==null||O>I.length)&&(O=I.length);for(var M=0,N=Array(O);M<O;M++)N[M]=I[M];return N;}function _(I,O){if(!(I instanceof O))throw new TypeError("Cannot call a class as a function");}function E(I,O){for(var M=0;M<O.length;M++){var N=O[M];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(I,function(G){return G=function(H,B){if(t(H)!="object"||!H)return H;var z=H[Symbol.toPrimitive];if(z===void 0)return(B==="string"?String:Number)(H);if(z=z.call(H,B||"default"),t(z)!="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.");}(G,"string"),t(G)=="symbol"?G:G+"";}(N.key),N);}}function x(I,O,M){return O&&E(I.prototype,O),M&&E(I,M),Object.defineProperty(I,"prototype",{writable:!1}),I;}function h(I,G,M){G=b(G);var N=I,G=y()?Reflect.construct(G,M||[],b(I).constructor):G.apply(I,M);if(G&&(t(G)=="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(I=N,I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I;}function y(){try{var I=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(y=function(){return!!I;})();}function b(I){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(O){return O.__proto__||Object.getPrototypeOf(O);})(I);}function p(I,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(O&&O.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),O&&c(I,O);}function c(I,O){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(M,N){return M.__proto__=N,M;})(I,O);}Object.defineProperty(r,"__esModule",{value:!0}),r.VDMSlideMetaData=r.VDMBaseSlide=r.VDMSlideType=r.LegacyAudioTrack=void 0;var d=w(5),m=w(188),a=w(192),s=w(196),l=w(41),g=w(197),f=w(200),v=w(201),S=w(92),w=((w=r.LegacyAudioTrack||(r.LegacyAudioTrack={}))[w.MAINTRACK=0]="MAINTRACK",w[w.SLIDE=1]="SLIDE",w[w.MAINTRACK_MASTER_SLIDE_VOLUME_ADJUSTED=2]="MAINTRACK_MASTER_SLIDE_VOLUME_ADJUSTED",w[w.SLIDE_MASTER_MAINTRACK_VOLUME_ADJUSTED=3]="SLIDE_MASTER_MAINTRACK_VOLUME_ADJUSTED",w[w.SLIDE_VOLUME_ADJUSTED=4]="SLIDE_VOLUME_ADJUSTED",(w=r.VDMSlideType||(r.VDMSlideType={}))[w.VDMImageSlide=0]="VDMImageSlide",w[w.VDMTextSlide=1]="VDMTextSlide",w[w.VDMTweetSlide=2]="VDMTweetSlide",w[w.VDMTweetTextSlide=3]="VDMTweetTextSlide",w[w.VDMContextSlide=4]="VDMContextSlide",function(){function I(O,M,N,G){var H;return _(this,I),(H=h(this,I,[O,G])).TRANSITION_OFFSET_IN_SEC=.1,H.dynamicChanges=[],H._lowRes=G.lowRes,H.useHls=!1,G.useHls&&(H.useHls=G.useHls),H._type=M,H._metadata=new C(O.metadata),H.slideResources=Object.assign({},N),H.slideResources.duration=H._metadata.duration,H.slideResources.time=H._metadata.time,"index"in G&&(H.slideResources.index=G.index),"resources"in H._metadata&&(H.slideResources.slide=H._metadata.resources),H.setSupport(O),H.setMedia(O),H.setAnimationInfoAsResource(O),0<H._media.length&&(H.slideResources.media=H._media,H.slideResources.lowRes=H._lowRes),H._audio=O.audio,H;}return p(I,f.default),x(I,[{key:"setAnimationInfoAsResource",value:function(O){O&&O.animationInfo&&(this.slideResources.animationInfo=O.animationInfo);}},{key:"setDynamicChanges",value:function(O){this.dynamicChanges=O;}},{key:"setMedia",value:function(O){if(this._media=[],O.media&&0<O.media.length){this._media=O.media;for(var M=0;M<this._media.length;M++)this._media[M].type!=="video"||this.useHls||(this._media[M].hlsPlaylistUrl="");}}},{key:"setEffects",value:function(){var O,M=!(this.slideEffects=[]);if(this._metadata.transition!==void 0&&(O=m.default.createSlideTransitor(this._type,this._metadata.transition,this._metadata.duration,this._aspectRatio))&&(O=O.build())&&O.length&&(this.slideEffects=this.slideEffects.concat(O),M=!0),!this._metadata.position||(O=g.default.createEffe
10ct(this._metadata.position.fromTop,this._metadata.position.fromLeft,this._metadata.position.fromRight,this._metadata.position.fromBot,this._type))&&(this.slideEffects=this.slideEffects.concat(O.build())),!this._metadata.textTransition||this._metadata.transition!==l.SLIDE_TRANSITION.NoTransition&&this._metadata.transition!==l.SLIDE_TRANSITION.FadeIn||(O=new s.TextTransitor(this._metadata.textTransition,0,this._metadata.duration))&&(this.slideEffects=this.slideEffects.concat(O.build())),this._metadata.zoom&&this._metadata.zoom!==1&&!this._metadata.effects.some(function(U){return U.type==="zoomPan";})&&(O={type:"zoomPan",attributes:{fromVal:1,toVal:this._metadata.zoom}},this._metadata.effects.push(O)),0<this._metadata.effects.length){var N,G=n(this._metadata.effects);try{for(G.s();!(N=G.n()).done;){var H,B,z,te,K,V=N.value;V.type==="zoomPan"?(H=M?0:this.TRANSITION_OFFSET_IN_SEC,B={fromVal:"fromVal"in V.attributes?V.attributes.fromVal:1,toVal:"toVal"in V.attributes?V.attributes.toVal:1,offsetTime:"offsetTime"in V.attributes?V.attributes.offsetTime:H,duration:"duration"in V.attributes?V.attributes.duration:this._metadata.duration-H,ease:"ease"in V.attributes?V.attributes.ease:void 0},(z=a.default.createEffect(B,this._type))&&(this.slideEffects=this.slideEffects.concat(z.build()))):V.type==="rotate"?(te={effect:V,target:"DummyTextToIgnoreTargetMatch",srcId:"slide.text"},this.slideEffects=this.slideEffects.concat(te)):V.type==="transform"&&(K={effect:V,target:"DummyTextToIgnoreTargetMatch",srcId:"slide.text"},V.attributes.studioId&&(K.studioId=V.attributes.studioId,delete K.srcId),this.slideEffects=this.slideEffects.concat(K));}}catch(U){G.e(U);}finally{G.f();}}}},{key:"type",get:function(){return this._type;}},{key:"lowRes",get:function(){return this._lowRes;}},{key:"duration",get:function(){return d.default.round(this._metadata.duration,3);}},{key:"audio",get:function(){return this._audio;}},{key:"legacyAudio",get:function(){return this._metadata.audio;}},{key:"startTime",get:function(){return d.default.round(this._metadata.time,3);}},{key:"endTime",get:function(){return d.default.round(this._metadata.time+this._metadata.duration,3);}},{key:"media",get:function(){return this._media;}},{key:"updateStoryResources",value:function(O){if(O)for(var M in O)this.slideResources[M]=O[M];}},{key:"toVDMObject",value:function(){var O=this._metadata.time,M=O+this._metadata.duration,O=new v.SlideAdapterBuilder(O,M,this._metadata.templateIds,this._support),M=(O.setSlideResources(this.slideResources).setAspectRatio(this._aspectRatio).setMediaLayerPosition(this._metadata.position).createDynamicChanges(this.dynamicChanges).setTemplateId2paramsValues(this._templateId2paramsValues),this.setEffects(),this.slideEffects&&0<this.slideEffects.length&&O.setSlideEffects(this.slideEffects),O.build());return this._templateId2name2parameter=M.templateId2name2parameter,M.adapt();}}]);}()),C=(r.VDMBaseSlide=w,function(){function I(O){var M;return _(this,I),(M=h(this,I,[O]))._duration=O.duration,M._transition=O.transition||0,M._time=O.time,M._zoom=O.zoom||1,M._textPosition=O.textPosition||0,M._textTransition=O.textTransition||0,M._effects=O.effects||[],M._resources=O.resources||{},O.position&&(M._mediaPosition=O.position),M._audio=void 0,O.audio&&(M._audio=O.audio),M;}return p(I,S.default),x(I,[{key:"position",get:function(){return this._mediaPosition;}},{key:"zoom",get:function(){return this._zoom;},set:function(O){this._zoom=d.default.clamp(O,0,5);}},{key:"audio",get:function(){return this._audio;}},{key:"setAudio",value:function(O){this._audio=O;}},{key:"duration",get:function(){return this._duration;},set:function(O){this._duration=d.default.clamp(O,1);}},{key:"transition",get:function(){return this._transition;},set:function(O){this._transition=d.default.clamp(O,0,6);}},{key:"time",get:function(){return this._time;},set:function(O){this._time=d.default.clamp(O,0);}},{key:"addTemplateId",value:function(O){this._templateIds.indexOf(O)===-1&&this._templateIds.push(O);}},{key:"removeTemplateId",value:function(O){O=this._templateIds.indexOf(O),-1<O&&this._templateIds.splice(O,1);}},{key:"textPosition",get:function(){return this._textPosition;},set:function(O){this._textPosition=O;}},{key:"textTransition",get:function(){return this._textTransition;},set:function(O){this._textTransition=O;}},{key:"effects",get:function(){return this._effects;},set:function(O){this._effects=O;}},{key:"resources",get:function(){return this._resources;},set:function(O){this._resources=O;}}]);}());r.VDMSlideMetaData=C;},function(i,r,e){"use strict";function t(E,x){return function(h){if(Array.isArray(h))return h;}(E)||function(h,y){var b=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(b!=null){var p,c,d,m,a=[],s=!0,l=!1;try{if(d=(b=b.call(h)).next,y===0){if(Object(b)!==b)return;s=!1;}else for(;!(s=(p=d.call(b)).done)&&(a.push(p.value),a.length!==y);s=!0);}catch(g){l=!0,c=g;}
10finally{try{if(!s&&b.return!=null&&(m=b.return(),Object(m)!==m))return;}finally{if(l)throw c;}}return a;}}(E,x)||function(h,y){if(h){if(typeof h=="string")return n(h,y);var b={}.toString.call(h).slice(8,-1);return(b=b==="Object"&&h.constructor?h.constructor.name:b)==="Map"||b==="Set"?Array.from(h):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?n(h,y):void 0;}}(E,x)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(E,x){(x==null||x>E.length)&&(x=E.length);for(var h=0,y=Array(x);h<x;h++)y[h]=E[h];return y;}function o(E){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}Object.defineProperty(r,"__esModule",{value:!0}),r.isNames2Value=r.isParameterReference=r.isCommonParameterTypes=r.isRelativeValue=void 0;var _=e(50);r.isRelativeValue=function(E){return o(E)==="object"&&"horizontal"in E&&"square"in E&&"vertical"in E;},r.isCommonParameterTypes=function(E){return typeof E=="string"&&["string","number","array","object"].includes(E);},r.isParameterReference=function(E){return o(E)==="object"&&E!=null&&"ref"in E&&typeof E.ref=="string";},r.isNames2Value=function(E){return o(E)==="object"&&Array.from(Object.entries(E)).reduce(function(x,b){var b=t(b,2),y=b[0],b=b[1];return x&&typeof y=="string"&&(0,_.isVDMValue)(b);},!0);};},function(i,r,e){"use strict";e.r(r),function(t){for(var n,a=e(0),o=e.n(a),a=e(3),_=e.n(a),a=e(11),E=e.n(a),a=e(7),x=e.n(a),a=e(6),h=e.n(a),a=e(4),y=e.n(a),a=e(98),b=e.n(a),a=e(66),p=e.n(a),a=e(67),c=e.n(a),a=e(65),d=e.n(a),a=e(99),m=e.n(a),a=e(23),s=e(103),l=e(8),g=e(69),f=e(1),v=e(15),O=e(101),S=e.n(O),w=e(18),C=e(31),I=e(30),O=e(102),O=e.n(O),M={},N=function(k,R){return M[k]=M[k]||[],R&&(M[k]=M[k].concat(R)),M[k];},G=function(k,R){return R=N(k).indexOf(R),!(R<=-1)&&(M[k]=M[k].slice(),M[k].splice(R,1),!0);},H={prefixed:!0},B=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],z=B[0],te=0;te<B.length;te++)if(B[te][1]in _.a){n=B[te];break;}if(n){for(var K=0;K<n.length;K++)H[z[K]]=n[K];H.prefixed=n[0]!==z[0];}var V=[];function U(k){return oe(k)?Object.keys(k):[];}var Z=function k(R){function P(){for(var ie=arguments.length,pe=new Array(ie),Te=0;Te<ie;Te++)pe[Te]=arguments[Te];u("log",L,pe);}var u,T,A,L="info";return T=R,u=function(ie,je,Te){var Ae,je=A.levels[je],Fe=new RegExp("^("+je+")$");ie!=="log"&&Te.unshift(ie.toUpperCase()+":"),Te.unshift(T+":"),V&&(V.push([].concat(Te)),Ae=V.length-1e3,V.splice(0,0<Ae?Ae:0)),o.a.console&&(Ae=(Ae=o.a.console[ie])||ie!=="debug"?Ae:o.a.console.info||o.a.console.log)&&je&&Fe.test(ie)&&Ae[Array.isArray(Te)?"apply":"call"](o.a.console,Te);},(A=P).createLogger=function(ie){return k(R+": "+ie);},P.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:L},P.level=function(ie){if(typeof ie=="string"){if(!P.levels.hasOwnProperty(ie))throw new Error('"'+ie+'" in not a valid log level');L=ie;}return L;},(P.history=function(){return V?[].concat(V):[];}).filter=function(ie){return(V||[]).filter(function(pe){return new RegExp(".*"+ie+".*").test(pe[0]);});},P.history.clear=function(){V&&(V.length=0);},P.history.disable=function(){V!==null&&(V.length=0,V=null);},P.history.enable=function(){V===null&&(V=[]);},P.error=function(){for(var ie=arguments.length,pe=new Array(ie),Te=0;Te<ie;Te++)pe[Te]=arguments[Te];return u("error",L,pe);},P.warn=function(){for(var ie=arguments.length,pe=new Array(ie),Te=0;Te<ie;Te++)pe[Te]=arguments[Te];return u("warn",L,pe);},P.debug=function(){for(var ie=arguments.length,pe=new Array(ie),Te=0;Te<ie;Te++)pe[Te]=arguments[Te];return u("debug",L,pe);},P;}("VIDEOJS"),re=Z.createLogger,ue=Object.prototype.toString;
11function q(k,R){U(k).forEach(function(P){return R(k[P],P);});}function J(k){for(var R=arguments.length,P=new Array(1<R?R-1:0),u=1;u<R;u++)P[u-1]=arguments[u];return Object.assign?E.a.apply(void 0,[k].concat(P)):(P.forEach(function(T){T&&q(T,function(A,L){k[L]=A;});}),k);}function oe(k){return!!k&&typeof k=="object";}function Q(k){return oe(k)&&ue.call(k)==="[object Object]"&&k.constructor===Object;}function F(k,R){if(!k||!R||typeof o.a.getComputedStyle!="function")return"";var P;try{P=o.a.getComputedStyle(k);}catch{return"";}return P?P.getPropertyValue(R)||P[R]:"";}var X=o.a.navigator&&o.a.navigator.userAgent||"",me=/AppleWebKit\/([\d.]+)/i.exec(X),me=me?parseFloat(me.pop()):null,W=/iPod/i.test(X),ai=(ai=X.match(/OS (\d+)_/i))&&ai[1]?ai[1]:null,Y=/Android/i.test(X),j=function(){var k=X.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!k)return null;var R=k[1]&&parseFloat(k[1]),P=k[2]&&parseFloat(k[2]);return R&&P?parseFloat(k[1]+"."+k[2]):R||null;}(),D=Y&&j<5&&me<537,$=/Firefox/i.test(X),ne=/Edg/i.test(X),le=!ne&&(/Chrome/i.test(X)||/CriOS/i.test(X)),se=(me=X.match(/(Chrome|CriOS)\/(\d+)/))&&me[2]?parseFloat(me[2]):null,fe=me=!(me=(me=/MSIE\s(\d+)\.\d/.exec(X))&&parseFloat(me[1]))&&/Trident\/7.0/i.test(X)&&/rv:11.0/.test(X)?11:me,me=/Safari/i.test(X)&&!le&&!Y&&!ne,ge=/Windows/i.test(X),he=!!(ye()&&("ontouchstart"in o.a||o.a.navigator.maxTouchPoints||o.a.DocumentTouch&&o.a.document instanceof o.a.DocumentTouch)),cn=/iPad/i.test(X)||me&&he&&!/iPhone/i.test(X),_e=/iPhone/i.test(X)&&!cn,Re=_e||cn||W,ee=(me||Re)&&!le,W=Object.freeze({__proto__:null,IS_IPOD:W,IOS_VERSION:ai,IS_ANDROID:Y,ANDROID_VERSION:j,IS_NATIVE_ANDROID:D,IS_FIREFOX:$,IS_EDGE:ne,IS_CHROME:le,CHROME_VERSION:se,IE_VERSION:fe,IS_SAFARI:me,IS_WINDOWS:ge,TOUCH_ENABLED:he,IS_IPAD:cn,IS_IPHONE:_e,IS_IOS:Re,IS_ANY_SAFARI:ee});function ae(k){return typeof k=="string"&&!!k.trim();}function de(k){if(0<=k.indexOf(" "))throw new Error("class has illegal whitespace characters");}function ye(){return _.a===o.a.document;}function Se(k){return oe(k)&&k.nodeType===1;}function De(){try{return o.a.parent!==o.a.self;}catch{return!0;}}function Ue(k){return function(R,P){return ae(R)?(P=Se(P=ae(P)?_.a.querySelector(P):P)?P:_.a,P[k]&&P[k](R)):_.a[k](null);};}function Be(k,R,P,u){R===void 0&&(R={}),P===void 0&&(P={});var T=_.a.createElement(k=k===void 0?"div":k);return Object.getOwnPropertyNames(R).forEach(function(A){var L=R[A];A.indexOf("aria-")!==-1||A==="role"||A==="type"?(Z.warn(`Setting attributes in the second argument of createEl() 12has been deprecated. Use the third argument instead. 13createEl(type, properties, attributes). Attempting to set `+A+" to "+L+"."),T.setAttribute(A,L)):A==="textContent"?nt(T,L):T[A]===L&&A!=="tabIndex"||(T[A]=L);}),Object.getOwnPropertyNames(P).forEach(function(A){T.setAttribute(A,P[A]);}),u&&tn(T,u),T;}function nt(k,R){return k.textContent===void 0?k.innerText=R:k.textContent=R,k;}function it(k,R){R.firstChild?R.insertBefore(k,R.firstChild):R.appendChild(k);}
13function ot(k,R){return de(R),k.classList?k.classList.contains(R):new RegExp("(^|\\s)"+R+"($|\\s)").test(k.className);}function ht(k,R){return k.classList?k.classList.add(R):ot(k,R)||(k.className=(k.className+" "+R).trim()),k;}function Et(k,R){return k?(k.classList?k.classList.remove(R):(de(R),k.className=k.className.split(/\s+/).filter(function(P){return P!==R;}).join(" ")),k):(Z.warn("removeClass was called with an element that doesn't exist"),null);}function At(k,R,P){var u=ot(k,R);if((P=typeof(P=typeof P=="function"?P(k,R):P)!="boolean"?!u:P)!==u)return(P?ht:Et)(k,R),k;}function Nt(k,R){Object.getOwnPropertyNames(R).forEach(function(P){var u=R[P];u==null||u===!1?k.removeAttribute(P):k.setAttribute(P,u===!0?"":u);});}function Ut(k){var R={},P=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(k&&k.attributes&&0<k.attributes.length)for(var u=k.attributes,T=u.length-1;0<=T;T--){var A=u[T].name,L=u[T].value;typeof k[A]!="boolean"&&P.indexOf(","+A+",")===-1||(L=L!==null),R[A]=L;}return R;}function bi(k,R){return k.getAttribute(R);}function Ge(k,R,P){k.setAttribute(R,P);}function qe(k,R){k.removeAttribute(R);}function yt(){_.a.body.focus(),_.a.onselectstart=function(){return!1;};}function bt(){_.a.onselectstart=function(){return!0;};}function gt(k){var R,P;if(k&&k.getBoundingClientRect&&k.parentNode)return R=k.getBoundingClientRect(),P={},["bottom","height","left","right","top","width"].forEach(function(u){R[u]!==void 0&&(P[u]=R[u]);}),P.height||(P.height=parseFloat(F(k,"height"))),P.width||(P.width=parseFloat(F(k,"width"))),P;}function Ot(k){if(!k||!k.offsetParent)return{left:0,top:0,width:0,height:0};for(var R=k.offsetWidth,P=k.offsetHeight,u=0,T=0;k.offsetParent&&k!==_.a[H.fullscreenElement];)u+=k.offsetLeft,T+=k.offsetTop,k=k.offsetParent;return{left:u,top:T,width:R,height:P};}function Mt(ie,R){var P={x:0,y:0};if(Re)for(var u=ie;u&&u.nodeName.toLowerCase()!=="html";){var T,A=F(u,"transform");
13/^matrix/.test(A)?(T=A.slice(7,-1).split(/,\s/).map(Number),P.x+=T[4],P.y+=T[5]):/^matrix3d/.test(A)&&(T=A.slice(9,-1).split(/,\s/).map(Number),P.x+=T[12],P.y+=T[13]),u=u.parentNode;}var L={},je=Ot(R.target),ie=Ot(ie),pe=ie.width,Te=ie.height,Ae=R.offsetY-(ie.top-je.top),je=R.offsetX-(ie.left-je.left);return R.changedTouches&&(je=R.changedTouches[0].pageX-ie.left,Ae=R.changedTouches[0].pageY+ie.top,Re&&(je-=P.x,Ae-=P.y)),L.y=1-Math.max(0,Math.min(1,Ae/Te)),L.x=Math.max(0,Math.min(1,je/pe)),L;}function Lt(k){return oe(k)&&k.nodeType===3;}function Kt(k){for(;k.firstChild;)k.removeChild(k.firstChild);return k;}function Dt(k){return typeof k=="function"&&(k=k()),(Array.isArray(k)?k:[k]).map(function(R){return Se(R=typeof R=="function"?R():R)||Lt(R)?R:typeof R=="string"&&/\S/.test(R)?_.a.createTextNode(R):void 0;}).filter(function(R){return R;});}function tn(k,R){return Dt(R).forEach(function(P){return k.appendChild(P);}),k;}function si(k,R){return tn(Kt(k),R);}function ci(k){return k.button===void 0&&k.buttons===void 0||k.button===0&&k.buttons===void 0||k.type==="mouseup"&&k.button===0&&k.buttons===0||k.button===0&&k.buttons===1;}function gi(){if(Oi.options.autoSetup!==!1){var k=Array.prototype.slice.call(_.a.getElementsByTagName("video")),R=Array.prototype.slice.call(_.a.getElementsByTagName("audio")),P=Array.prototype.slice.call(_.a.getElementsByTagName("video-js")),u=k.concat(R,P);if(u&&0<u.length)for(var T=0,A=u.length;T<A;T++){var L=u[T];if(!L||!L.getAttribute){ji(1);break;}L.player===void 0&&L.getAttribute("data-setup")!==null&&Oi(L);}else ln||ji(1);}}var Oi,Pi=Ue("querySelector"),Fi=Ue("querySelectorAll"),wn=Object.freeze({__proto__:null,isReal:ye,isEl:Se,isInFrame:De,createEl:Be,textContent:nt,prepe
13ndTo:it,hasClass:ot,addClass:ht,removeClass:Et,toggleClass:At,setAttributes:Nt,getAttributes:Ut,getAttribute:bi,setAttribute:Ge,removeAttribute:qe,blockTextSelection:yt,unblockTextSelection:bt,getBoundingClientRect:gt,findPosition:Ot,getPointerPosition:Mt,isTextNode:Lt,emptyEl:Kt,normalizeContent:Dt,appendContent:tn,insertContent:si,isSingleLeftClick:ci,$:Pi,$$:Fi}),ln=!1;function ji(k,R){ye()&&(R&&(Oi=R),o.a.setTimeout(gi,k));}function Ii(){ln=!0,o.a.removeEventListener("load",Ii);}ye()&&(_.a.readyState==="complete"?Ii():o.a.addEventListener("load",Ii));function Ui(k){var R=_.a.createElement("style");return R.className=k,R;}function nn(k,R){k.styleSheet?k.styleSheet.cssText=R:k.textContent=R;}var un=3;o.a.WeakMap||(dn=function(){function k(){this.vdata="vdata"+Math.floor(o.a.performance&&o.a.performance.now()||Date.now()),this.data={};}var R=k.prototype;return R.set=function(P,u){var T=P[this.vdata]||un++;return P[this.vdata]||(P[this.vdata]=T),this.data[T]=u,this;},R.get=function(P){var u=P[this.vdata];if(u)return this.data[u];Z("We have no data for this element",P);},R.has=function(P){return P[this.vdata]in this.data;},R.delete=function(P){var u=P[this.vdata];u&&(delete this.data[u],delete P[this.vdata]);},k;}());var Pn,$n=new(o.a.WeakMap?WeakMap:dn)();function or(k,R){var P;$n.has(k)&&((P=$n.get(k)).handlers[R].length===0&&(delete P.handlers[R],k.removeEventListener?k.removeEventListener(R,P.dispatcher,!1):k.detachEvent&&k.detachEvent("on"+R,P.dispatcher)),Object.getOwnPropertyNames(P.handlers).length<=0&&(delete P.handlers,delete P.dispatcher,delete P.disabled),Object.getOwnPropertyNames(P).length===0&&$n.delete(k));}function Wr(k,R,P,u){P.forEach(function(T){k(R,T,u);});}function wr(k){if(!k.fixed_){if(!k||!k.isPropagationStopped||!k.isImmediatePropagationStopped){var R,P,u,T=k||o.a.event;for(R in k={},T)R==="layerX"||R==="layerY"||R==="keyLocation"||R==="webkitMovementX"||R==="webkitMovementY"||R==="path"||R==="returnValue"&&T.preventDefault||(k[R]=T[R]);k.target||(k.target=k.srcElement||_.a),k.relatedTarget||(k.relatedTarget=k.fromElement===k.target?k.toElement:k.fromElement),k.preventDefault=function(){T.preventDefault&&T.preventDefault(),k.returnValue=!1,T.returnValue=!1,k.defaultPrevented=!0;},k.defaultPrevented=!1,k.stopPropagation=function(){T.stopPropagation&&T.stopPropagation(),k.cancelBubble=!0,T.cancelBubble=!0,k.isPropagationStopped=A;},k.isPropagationStopped=L,k.stopImmediatePropagation=function(){T.stopImmediatePropagation&&T.stopImmediatePropagation(),k.isImmediatePropagationStopped=A,k.stopPropagation();},k.isImmediatePropagationStopped=L,k.clientX!==null&&k.clientX!==void 0&&(P=_.a.documentElement,u=_.a.body,k.pageX=k.clientX+(P&&P.scrollLeft||u&&u.scrollLeft||0)-(P&&P.clientLeft||u&&u.clientLeft||0),k.pageY=k.clientY+(P&&P.scrollTop||u&&u.scrollTop||0)-(P&&P.clientTop||u&&u.clientTop||0)),k.which=k.charCode||k.keyCode,k.button!==null&&k.button!==void 0&&(k.button=1&k.button?0:4&k.button?1:2&k.button?2:0);}k.fixed_=!0;}return k;function A(){return!0;}function L(){return!1;}}var kr=["touchstart","touchmove"];function pn(k,R,P){if(Array.isArray(R))return Wr(pn,k,R,P);$n.has(k)||$n.set(k,{});var u=$n.get(k);u.handlers||(u.handlers={}),u.handlers[R]||(u.handlers[R]=[]),P.guid||(P.guid=un++),u.handlers[R].push(P),u.dispatcher||(u.disabled=!1,u.dispatcher=function(T,A){if(!u.disabled){T=wr(T);var L=u.handlers[T.type];if(L)for(var ie=L.slice(0),pe=0,Te=ie.length;pe<Te&&!T.isImmediatePropagationStopped();pe++)try{ie[pe].call(k,T,A);}catch(Ae){Z.error(Ae);}}}),u.handlers[R].length===1&&(k.addEventListener?(P=!1,function(){if(typeof Pn!="boolean"){Pn=!1;try{var T=Object.defineProperty({},"passive",{get:function(){Pn=!0;}});o.a.addEventListener("test",null,T),o.a.removeEventListener("test",null,T);}catch{}}return Pn;}()&&-1<kr.indexOf(R)&&(P={passive:!0}),k.addEventListener(R,u.dispatcher,P)):k.attachEvent&&k.attachEvent("on"+R,u.dispatcher));}function yn(k,R,P){if($n.has(k)){var u=$n.get(k);if(u.handlers){if(Array.isArray(R))return Wr(yn,k,R,P);var T=function(pe,Te){u.handlers[Te]=[],or(pe,Te);};if(R===void 0)for(var A in u.handlers)Object.prototype.hasOwnProperty.call(u.handlers||{},A)&&T(k,A);else{var L=u.handlers[R];if(L)if(P){if(P.guid)for(var ie=0;ie<L.length;ie++)L[ie].guid===P.guid&&L.splice(ie--,1);or(k,R);}else T(k,R);}}}}function hr(k,R,P){var u=$n.has(k)?$n.get(k):{},T=k.parentNode||k.ownerDocument;
13return typeof R=="string"?R={type:R,target:k}:R.target||(R.target=k),R=wr(R),u.dispatcher&&u.dispatcher.call(k,R,P),T&&!R.isPropagationStopped()&&R.bubbles===!0?hr.call(null,T,R,P):!T&&!R.defaultPrevented&&R.target&&R.target[R.type]&&($n.has(R.target)||$n.set(R.target,{}),u=$n.get(R.target),R.target[R.type]&&(u.disabled=!0,typeof R.target[R.type]=="function"&&R.target[R.type](),u.disabled=!1)),!R.defaultPrevented;}function xi(k,R,P){if(Array.isArray(R))return Wr(xi,k,R,P);function u(){yn(k,R,u),P.apply(this,arguments);}u.guid=P.guid=P.guid||un++,pn(k,R,u);}function Pa(k,R,P){function u(){yn(k,R,u),P.apply(this,arguments);}u.guid=P.guid=P.guid||un++,pn(k,R,u);}function Un(k,R){var P=o.a.performance.now();return function(){var u=o.a.performance.now();R<=u-P&&(k.apply(void 0,arguments),P=u);};}function ho(k,R,P,u){function T(){var L=this,ie=arguments,pe=function(){pe=A=null,P||k.apply(L,ie);};!A&&P&&k.apply(L,ie),u.clearTimeout(A),A=u.setTimeout(pe,R);}var A;return u===void 0&&(u=o.a),T.cancel=function(){u.clearTimeout(A),A=null;},T;}function pr(){}function Er(k,R,P){if(!k||!k.nodeName&&!Mo(k))throw new Error("Invalid target for "+to(R)+"#"+P+"; must be a DOM node or evented object.");}function fu(k,R,P){if(!Ia(k))throw new Error("Invalid event type for "+to(R)+"#"+P+"; must be a non-empty string or array.");}function Yo(k,R,P){if(typeof k!="function")throw new Error("Invalid listener for "+to(R)+"#"+P+"; must be a function.");}function Gl(k,L,P){var u,T,A=L.length<3||L[0]===k||L[0]===k.eventBusEl_,L=A?(u=k.eventBusEl_,3<=L.length&&L.shift(),T=L[0],L[1]):(u=L[0],T=L[1],L[2]);return Er(u,k,P),fu(T,k,P),Yo(L,k,P),{isTargetingSelf:A,target:u,type:T,listener:L=er(k,L)};}function ar(k,R,P,u){Er(k,k,R),k.nodeName?zl[R](k,P,u):k[R](P,u);}var ps,zl=Object.freeze({__proto__:null,fixEvent:wr,on:pn,off:yn,trigger:hr,one:xi,any:Pa}),er=function(k,R,P){return R.guid||(R.guid=un++),k=R.bind(k),k.guid=P?P+"_"+R.guid:R.guid,k;},to=(pr.prototype.allowedEvents_={},pr.prototype.addEventListener=pr.prototype.on=function(k,R){var P=this.addEventListener;this.addEventListener=function(){},pn(this,k,R),this.addEventListener=P;},pr.prototype.removeEventListener=pr.prototype.off=function(k,R){yn(this,k,R);},pr.prototype.one=function(k,R){var P=this.addEventListener;this.addEventListener=function(){},xi(this,k,R),this.addEventListener=P;},pr.prototype.any=function(k,R){var P=this.addEventListener;this.addEventListener=function(){},Pa(this,k,R),this.addEventListener=P;},pr.prototype.dispatchEvent=pr.prototype.trigger=function(k){var R=k.type||k;k=wr(k=typeof k=="string"?{type:R}:k),this.allowedEvents_[R]&&this["on"+R]&&this["on"+R](k),hr(this,k);},pr.prototype.queueTrigger=function(k){var R=this,P=(ps=ps||new Map(),k.type||k),u=ps.get(this),T=(u||(u=new Map(),ps.set(this,u)),u.get(P)),T=(u.delete(P),o.a.clearTimeout(T),o.a.setTimeout(function(){u.delete(P),u.size===0&&(u=null,ps.delete(R)),R.trigger(k);},0));u.set(P,T);},function(k){return typeof k.name=="function"?k.name():typeof k.name=="string"?k.name:k.name_||(k.constructor&&k.constructor.name?k.constructor.name:typeof k);}),Mo=function(k){return k instanceof pr||!!k.eventBusEl_&&["on","one","off","trigger"].every(function(R){return typeof k[R]=="function";});},Ia=function(k){return typeof k=="string"&&/\S/.test(k)||Array.isArray(k)&&!!k.length;},Hl={on:function(){for(var k=this,R=arguments.length,P=new Array(R),u=0;u<R;u++)P[u]=arguments[u];var T,A=Gl(this,P,"on"),L=A.isTargetingSelf,ie=A.target,pe=A.type,Te=A.listener;ar(ie,"on",pe,Te),L||((T=function(){return k.off(ie,pe,Te);}).guid=Te.guid,(A=function(){return k.off("dispose",T);}).guid=Te.guid,ar(this,"on","dispose",T),ar(ie,"on","dispose",A));},one:function(){for(var k=this,R=arguments.length,P=new Array(R),u=0;u<R;u++)P[u]=arguments[u];var T=Gl(this,P,"one"),A=T.isTargetingSelf,L=T.target,ie=T.type,pe=T.listener;A?ar(L,"one",ie,pe):((T=function Te(){k.off(L,ie,Te);for(var Ae=arguments.length,je=new Array(Ae),Fe=0;Fe<Ae;Fe++)je[Fe]=arguments[Fe];pe.apply(null,je);}).guid=pe.guid,ar(L,"one",ie,T));},any:function(){for(var k=this,R=arguments.length,P=new Array(R),u=0;u<R;u++)P[u]=arguments[u];var T=Gl(this,P,"any"),A=T.isTargetingSelf,L=T.target,ie=T.type,pe=T.listener;A?ar(L,"any",ie,pe):((T=function Te(){k.off(L,ie,Te);for(var Ae=arguments.length,je=new Array(Ae),Fe=0;Fe<Ae;Fe++)je[Fe]=arguments[Fe];pe.apply(null,je);}).guid=pe.guid,ar(L,"any",ie,T));},off:function(k,R,P){!k||Ia(k)?yn(this.eventBusEl_,k,R):(R=R,Er(k=k,this,"off"),fu(R,this,"off"),Yo(P,this,"off"),P=er(this,P),this.off("dispose",P),k.nodeName?(yn(k,R,P),yn(k,"dispose",P)):Mo(k)&&(k.off(R,P),k.off("dispose",P)));},trigger:function(k,R){Er(this.eventBusEl_,this,"trigger");var P=k&&typeof k!="string"?k.type:k;if(!Ia(P)){if(P="Invalid event type for "+to(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.",!k)throw new Error(P);(this.log||Z).error(P);}return hr(this.eventBusEl_,k,R);}};function Ls(k,R){if(R=(R=R===void 0?{}:R).eventBusKey,R){if(!k[R].nodeName)throw new Error('The eventBusKey "'+R+'" does not refer to an element.');k.eventBusEl_=k[R];}else k.eventBusEl_=Be("span",{className:"vjs-event-bus"});J(k,Hl),k.eventedCallbacks&&k.eventedCallbacks.forEach(function(P){P();}),k.on("dispose",function(){k.off(),[k,k.el_,k.eventBusEl_].forEach(function(P){P&&$n.has(P)&&$n.delete(P);}),o.a.setTimeout(function(){k.eventBusEl_=null;},0);});}var af={state:{},setState:function(k){var R,P=this;return q(k=typeof k=="function"?k():k,function(u,T){P.state[T]!==u&&((R=R||{})[T]={from:P.state[T],to:u}),P.state[T]=u;}),R&&Mo(this)&&this.trigger({changes:R,type:"statechanged"}),R;}};function ka(k,R){J(k,af),k.state=J({},k.state,R),typeof k.handleStateChanged=="function"&&Mo(k)&&k.on("statechanged",k.handleStateChanged);}function Vo(k){return typeof k!="string"?k:k.replace(/./,function(R){return R.toLowerCase();});}function fr(k){return typeof k!="string"?k:k.replace(/./,function(R){return R.toUpperCase();});}function Kn(){for(var k={},R=arguments.length,P=new Array(R),u=0;u<R;u++)P[u]=arguments[u];return P.forEach(function(T){T&&q(T,function(A,L){Q(A)?(Q(k[L])||(k[L]={}),k[L]=Kn(k[L],A)):k[L]=A;});}),k;}var md=o.a.Map||function(){function k(){this.map_={};}var R=k.prototype;return R.has=function(P){return P in this.map_;},R.delete=function(P){var u=this.has(P);return delete this.map_[P],u;},R.set=function(P,u){return this.map_[P]=u,this;},R.forEach=function(P,u){for(var T in this.map_)P.call(u,this.map_[T],T,this);},k;}(),po=o.a.Set||function(){function k(){this.set_={};}var R=k.prototype;return R.has=function(P){return P in this.set_;},R.delete=function(P){var u=this.has(P);return delete this.set_[P],u;},R.add=function(P){return this.set_[P]=1,this;},R.forEach=function(P,u){for(var T in this.set_)P.call(u,T,T,this);},k;}(),Wt=function(){function k(P,u,T){var A=this;!P&&this.play?this.player_=P=this:this.player_=P,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Kn({},this.options_),u=this.options_=Kn(this.options_,u),this.id_=u.id||u.el&&u.el.id,this.id_||(P=P&&P.id&&P.id()||"no_player",this.id_=P+"_component_"+un++),this.name_=u.name||null,u.el?this.el_=u.el:u.createEl!==!1&&(this.el_=this.createEl()),u.className&&this.el_&&u.className.split(" ").forEach(function(L){return A.addClass(L);}),u.evented!==!1&&(Ls(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),ka(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new po(),this.setIntervalIds_=new po(),this.rafIds_=new po(),this.namedRafs_=new md(),(this.clearingTimersOnDispose_=!1)!==u.initChildren&&this.initChildren(),this.ready(T),u.reportTouchActivity!==!1&&this.enableTouchActivity();}var R=k.prototype;return R.dispose=function(P){if(P===void 0&&(P={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var u=this.children_.length-1;0<=u;u--)this.children_[u].dispose&&this.children_[u].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(P.restoreEl?this.el_.parentNode.replaceChild(P.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null;}},R.isDisposed=function(){return!!this.isDisposed_;},R.player=function(){return this.player_;},R.options=function(P){return P&&(this.options_=Kn(this.options_,P)),this.options_;},R.el=function(){return this.el_;},R.createEl=function(P,u,T){return Be(P,u,T);},R.localize=function(P,u,T){T===void 0&&(T=P);var ie=this.player_.language&&this.player_.language(),L=this.player_.languages&&this.player_.languages(),A=L&&L[ie],ie=ie&&ie.split("-")[0],L=L&&L[ie],ie=T;return A&&A[P]?ie=A[P]:L&&L[P]&&(ie=L[P]),ie=u?ie.replace(/\{(\d+)\}/g,function(pe,Te){return Te=u[Te-1],Te===void 0?pe:Te;}):ie;},R.handleLanguagechange=function(){},R.contentEl=function(){return this.contentEl_||this.el_;},R.id=function(){return this.id_;},R.name=function(){return this.name_;},R.children=function(){return this.children_;},R.getChildById=function(P){return this.childIndex_[P];},R.getChild=function(P){if(P)return this.childNameIndex_[P];},R.getDescendant=function(){for(var P=arguments.length,u=new Array(P),T=0;T<P;T++)u[T]=arguments[T];for(var u=u.reduce(function(pe,Te){return pe.concat(Te);},[]),A=this,L=0;L<u.length;L++)if(!(A=A.getChild(u[L]))||!A.getChild)return;return A;},R.addChild=function(P,u,T){if(u===void 0&&(u={}),T===void 0&&(T=this.children_.length),typeof P=="string"){var A=fr(P),L=u.componentClass||A,ie=(u.name=A,k.getComponent(L));if(!ie)throw new Error("Component "+L+" does not exist");if(typeof ie!="function")return null;L=new ie(this.player_||this,u);}else L=P;return L.parentComponent_&&L.parentComponent_.removeChild(L),this.children_.splice(T,0,L),L.parentComponent_=this,typeof L.id=="function"&&(this.childIndex_[L.id()]=L),(A=A||L.name&&fr(L.name()))&&(this.childNameIndex_[A]=L,this.childNameIndex_[Vo(A)]=L),typeof L.el=="function"&&L.el()&&(ie=null,this.children_[T+1]&&(this.children_[T+1].el_?ie=this.children_[T+1].el_:Se(this.children_[T+1])&&(ie=this.children_[T+1])),this.contentEl().insertBefore(L.el(),ie)),L;},R.removeChild=function(P){if((P=typeof P=="string"?this.getChild(P):P)&&this.children_){for(var u,T=!1,A=this.children_.length-1;0<=A;A--)if(this.children_[A]===P){T=!0,this.children_.splice(A,1);break;}T&&(P.parentComponent_=null,this.childIndex_[P.id()]=null,this.childNameIndex_[fr(P.name())]=null,this.childNameIndex_[Vo(P.name())]=null,(u=P.el())&&u.parentNode===this.contentEl()&&this.contentEl().removeChild(P.el()));}},R.initChildren=function(){var P,u,T,A=this,L=this.options_.children;L&&(P=this.options_,u=k.getComponent("Tech"),(T=Array.isArray(L)?L:Object.keys(L)).concat(Object.keys(this.options_).filter(function(ie){return!T.some(function(pe){return typeof pe
13=="string"?ie===pe:ie===pe.name;});})).map(function(Te){var pe,Te=typeof Te=="string"?L[pe=Te]||A.options_[pe]||{}:(pe=Te.name,Te);return{name:pe,opts:Te};}).filter(function(ie){return ie=k.getComponent(ie.opts.componentClass||fr(ie.name)),ie&&!u.isTech(ie);}).forEach(function(Te){var pe=Te.name,Te=Te.opts;(Te=P[pe]!==void 0?P[pe]:Te)!==!1&&((Te=Te===!0?{}:Te).playerOptions=A.options_.playerOptions,(Te=A.addChild(pe,Te))&&(A[pe]=Te));}));},R.buildCSSClass=function(){return"";},R.ready=function(P,u){u===void 0&&(u=!1),P&&(this.isReady_?u?P.call(this):this.setTimeout(P,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(P)));},R.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var P=this.readyQueue_;this.readyQueue_=[],P&&0<P.length&&P.forEach(function(u){u.call(this);},this),this.trigger("ready");},1);},R.$=function(P,u){return Pi(P,u||this.contentEl());},R.$$=function(P,u){return Fi(P,u||this.contentEl());},R.hasClass=function(P){return ot(this.el_,P);},R.addClass=function(P){ht(this.el_,P);},R.removeClass=function(P){Et(this.el_,P);},R.toggleClass=function(P,u){At(this.el_,P,u);},R.show=function(){this.removeClass("vjs-hidden");},R.hide=function(){this.addClass("vjs-hidden");},R.lockShowing=function(){this.addClass("vjs-lock-showing");},R.unlockShowing=function(){this.removeClass("vjs-lock-showing");},R.getAttribute=function(P){return bi(this.el_,P);},R.setAttribute=function(P,u){Ge(this.el_,P,u);},R.removeAttribute=function(P){qe(this.el_,P);},R.width=function(P,u){return this.dimension("width",P,u);},R.height=function(P,u){return this.dimension("height",P,u);},R.dimensions=function(P,u){this.width(P,!0),this.height(u);},R.dimension=function(P,u,T){if(u===void 0){if(!this.el_)return 0;var A=this.el_.style[P],L=A.indexOf("px");return parseInt(L!==-1?A.slice(0,L):this.el_["offset"+fr(P)],10);}(""+(u=u!==null&&u==u?u:0)).indexOf("%")!==-1||(""+u).indexOf("px")!==-1?this.el_.style[P]=u:this.el_.style[P]=u==="auto"?"":u+"px",T||this.trigger("componentresize");},R.currentDimension=function(P){var u=0;if(P!=="width"&&P!=="height")throw new Error("currentDimension only accepts width or height value");return u=F(this.el_,P),(u=parseFloat(u))!==0&&!isNaN(u)||(P="offset"+fr(P),u=this.el_[P]),u;},R.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")};},R.currentWidth=function(){return this.currentDimension("width");},R.currentHeight=function(){return this.currentDimension("height");},R.focus=function(){this.el_.focus();},R.blur=function(){this.el_.blur();},R.handleKeyDown=function(P){this.player_&&(x.a.isEventKey(P,"Tab")||P.stopPropagation(),this.player_.handleKeyDown(P));},R.handleKeyPress=function(P){this.handleKeyDown(P);},R.emitTapEvents=function(){function P(){u=!1;}var u,T=0,A=null;this.on("touchstart",function(L){L.touches.length===1&&(A={pageX:L.touches[0].pageX,pageY:L.touches[0].pageY},T=o.a.performance.now(),u=!0);}),this.on("touchmove",function(L){var ie;1<L.touches.length?u=!1:A&&(ie=L.touches[0].pageX-A.pageX,L=L.touches[0].pageY-A.pageY,10<Math.sqrt(ie*ie+L*L)&&(u=!1));}),this.on("touchleave",P),this.on("touchcancel",P),this.on("touchend",function(L){!(A=null)===u&&o.a.performance.now()-T<200&&(L.preventDefault(),this.trigger("tap"));});},R.enableTouchActivity=function(){var P,u,T;this.player()&&this.player().reportUserActivity&&(P=er(this.player(),this.player().reportUserActivity),this.on("touchstart",function(){P(),this.clearInterval(u),u=this.setInterval(P,250);}),T=function(A){P(),this.clearInterval(u);},this.on("touchmove",P),this.on("touchend",T),this.on("touchcancel",T));},R.setTimeout=function(P,u){var T,A=this;return P=er(this,P),this.clearTimersOnDispose_(),T=o.a.setTimeout(function(){A.setTimeoutIds_.has(T)&&A.setTimeoutIds_.delete(T),P();},u),this.setTimeoutIds_.add(T),T;},R.clearTimeout=function(P){return this.setTimeoutIds_.has(P)&&(this.setTimeoutIds_.delete(P),o.a.clearTimeout(P)),P;},R.setInterval=function(P,u){return P=er(this,P),this.clearTimersOnDispose_(),P=o.a.setInterval(P,u),this.setIntervalIds_.add(P),P;},R.clearInterval=function(P){return this.setIntervalIds_.has(P)&&(this.setIntervalIds_.delete(P),o.a.clearInterval(P)),P;},R.requestAnimationFrame=function(P){var u,T=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),P=er(this,P),u=o.a.requestAnimationFrame(function(){T.rafIds_.has(u)&&T.rafIds_.delete(u),P();}),this.rafIds_.add(u),u):this.setTimeout(P,1e3/60);},R.requestNamedAnimationFrame=function(P,u){var T,A=this;if(!this.namedRafs_.has(P))return this.clearTimersOnDispose_(),u=er(this,u),T=this.requestAnimationFrame(function(){u(),A.namedRafs_.has(P)&&A.namedRafs_.delete(P);}),this.namedRafs_.set(P,T),P;},R.cancelNamedAnimationFrame=function(P){this.namedRafs_.has(P)&&(this.cancelAnimationFrame(this.namedRafs_.get(P)),this.namedRafs_.delete(P));},R.cancelAnimationFrame=function(P){return this.supportsRaf_?(this.rafIds_.has(P)&&(this.rafIds_.delete(P),o.a.cancelAnimationFrame(P)),P):this.clearTimeout(P);},R.clearTimersOnDispose_=function(){var P=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
13h(function(u){var T=u[0],A=u[1];P[T].forEach(function(L,ie){return P[A](ie);});}),P.clearingTimersOnDispose_=!1;}));},k.registerComponent=function(P,u){if(typeof P!="string"||!P)throw new Error('Illegal component name, "'+P+'"; must be a non-empty string.');var T=k.getComponent("Tech"),T=T&&T.isTech(u),A=k===u||k.prototype.isPrototypeOf(u.prototype);if(T||!A)throw A=T?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+P+'"; '+A+".");if(P=fr(P),k.components_||(k.components_={}),T=k.getComponent("Player"),P==="Player"&&T&&T.players){var L=T.players,A=Object.keys(L);if(L&&0<A.length&&A.map(function(pe){return L[pe];}).every(Boolean))throw new Error("Can not register Player component after player has been created.");}return k.components_[P]=u,k.components_[Vo(P)]=u;},k.getComponent=function(P){if(P&&k.components_)return k.components_[P];},k;}();function $l(k,R,P,u){var T=u,A=P.length-1;if(typeof T!="number"||T<0||A<T)throw new Error("Failed to execute '"+k+"' on 'TimeRanges': The index provided ("+T+") is non-numeric or out of bounds (0-"+A+").");return P[u][R];}function yl(k){var R=k===void 0||k.length===0?{length:0,start:function(){throw new Error("This TimeRanges object is empty");},end:function(){throw new Error("This TimeRanges object is empty");}}:{length:k.length,start:$l.bind(null,"start",0,k),end:$l.bind(null,"end",1,k)};return o.a.Symbol&&o.a.Symbol.iterator&&(R[o.a.Symbol.iterator]=function(){return(k||[]).values();}),R;}function da(k,R){return Array.isArray(k)?yl(k):k===void 0||R===void 0?yl():yl([[k,R]]);}function Wl(k,R){var P,u,T=0;if(!R)return 0;k&&k.length||(k=da(0,0));for(var A=0;A<k.length;A++)P=k.start(A),T+=(u=R<(u=k.end(A))?R:u)-P;return T/R;}function qr(k){if(k instanceof qr)return k;typeof k=="number"?this.code=k:typeof k=="string"?this.message=k:oe(k)&&(typeof k.code=="number"&&(this.code=k.code),J(this,k)),this.message||(this.message=qr.defaultMessages[this.code]||"");}Wt.prototype.supportsRaf_=typeof o.a.requestAnimationFrame=="function"&&typeof o.a.cancelAnimationFrame=="function",Wt.registerComponent("Component",Wt),qr.prototype.code=0,qr.prototype.message="",qr.prototype.status=null,qr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],qr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var fs=0;fs<qr.errorTypes.length;fs++)qr[qr.errorTypes[fs]]=fs,qr.prototype[qr.errorTypes[fs]]=fs;function Ds(k){return k!=null&&typeof k.then=="function";}function Xo(k){Ds(k)&&k.then(null,function(R){});}function mu(k){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(R,P,u){return k[P]&&(R[P]=k[P]),R;},{cues:k.cues&&Array.prototype.map.call(k.cues,function(R){return{startTime:R.startTime,endTime:R.endTime,text:R.text,id:R.id};})});}var gu,ql=function(k){var R=k.$$("track"),P=Array.prototype.map.call(R,function(u){return u.track;});return Array.prototype.map.call(R,function(u){var T=mu(u.track);return u.src&&(T.src=u.src),T;}).concat(Array.prototype.filter.call(k.textTracks(),function(u){return P.indexOf(u)===-1;}).map(mu));},yu=function(k,R){return k.forEach(function(P){var u=R.addRemoteTextTrack(P).track;!P.src&&P.cues&&P.cues.forEach(function(T){return u.addCue(T);});}),R.textTracks();},Yl="vjs-modal-dialog",ms=function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.handleKeyDown_=function(L){return A.handleKeyDown(L);},A.close_=function(L){return A.close(L);},A.opened_=A.hasBeenOpened_=A.hasBeenFilled_=!1,A.closeable(!A.options_.uncloseable),A.content(A.options_.content),A.contentEl_=Be("div",{className:Yl+"-content"},{role:"document"}),A.descEl_=Be("p",{className:Yl+"-description vjs-control-text",id:A.el().getAttribute("aria-describedby")}
13),nt(A.descEl_,A.description()),A.el_.appendChild(A.descEl_),A.el_.appendChild(A.contentEl_),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"});},P.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,k.prototype.dispose.call(this);},P.buildCSSClass=function(){return Yl+" vjs-hidden "+k.prototype.buildCSSClass.call(this);},P.label=function(){return this.localize(this.options_.label||"Modal Window");},P.description=function(){var u=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(u+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),u;},P.open=function(){var u;this.opened_||(u=this.player(),this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!u.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&u.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=u.controls(),u.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0);},P.opened=function(u){return typeof u=="boolean"&&this[u?"open":"close"](),this.opened_;},P.close=function(){var u;this.opened_&&(u=this.player(),this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&u.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&u.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose());},P.closeable=function(u){var T,A;return typeof u=="boolean"&&(u=this.closeable_=!!u,T=this.getChild("closeButton"),u&&!T&&(A=this.contentEl_,this.contentEl_=this.el_,T=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=A,this.on(T,"close",this.close_)),!u&&T&&(this.off(T,"close",this.close_),this.removeChild(T),T.dispose())),this.closeable_;},P.fill=function(){this.fillWith(this.content());},P.fillWith=function(ie){var T=this.contentEl(),A=T.parentNode,L=T.nextSibling,ie=(this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,A.removeChild(T),this.empty(),si(T,ie),this.trigger("modalfill"),L?A.insertBefore(T,L):A.appendChild(T),this.getChild("closeButton"));ie&&A.appendChild(ie.el_);},P.empty=function(){this.trigger("beforemodalempty"),Kt(this.contentEl()),this.trigger("modalempty");},P.content=function(u){return u!==void 0&&(this.content_=u),this.content_;},P.conditionalFocus_=function(){var u=_.a.activeElement,T=this.player_.el_;this.previouslyActiveEl_=null,!T.contains(u)&&T!==u||(this.previouslyActiveEl_=u,this.focus());},P.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null);},P.handleKeyDown=function(u){if(u.stopPropagation(),x.a.isEventKey(u,"Escape")&&this.closeable())u.preventDefault(),this.close();else if(x.a.isEventKey(u,"Tab")){for(var T,A=this.focusableEls_(),L=this.el_.querySelector(":focus"),ie=0;ie<A.length;ie++)if(L===A[ie]){T=ie;break;}_.a.activeElement===this.el_&&(T=0),u.shiftKey&&T===0?(A[A.length-1].focus(),u.preventDefault()):u.shiftKey||T!==A.length-1||(A[0].focus(),u.preventDefault());}},P.focusableEls_=function(){var u=this.el_.querySelectorAll("*");return Array.prototype.filter.call(u,function(T){return(T instanceof o.a.HTMLAnchorElement||T instanceof o.a.HTMLAreaElement)&&T.hasAttribute("href")||(T instanceof o.a.HTMLInputElement||T instanceof o.a.HTMLSelectElement||T instanceof o.a.HTMLTextAreaElement||T instanceof o.a.HTMLButtonElement)&&!T.hasAttribute("disabled")||T instanceof o.a.HTMLIFrameElement||T instanceof o.a.HTMLObjectElement||T instanceof o.a.HTMLEmbedElement||T.hasAttribute("tabindex")&&T.getAttribute("tabindex")!==-1||T.hasAttribute("contenteditable");});},R;}
13(Wt),In=(ms.prototype.options_={pauseOnOpen:!0,temporary:!0},Wt.registerComponent("ModalDialog",ms),function(k){function R(u){var T;u===void 0&&(u=[]),(T=k.call(this)||this).tracks_=[],Object.defineProperty(h()(T),"length",{get:function(){return this.tracks_.length;}});for(var A=0;A<u.length;A++)T.addTrack(u[A]);return T;}y()(R,k);var P=R.prototype;return P.addTrack=function(u){var T=this,A=this.tracks_.length;""+A in this||Object.defineProperty(this,A,{get:function(){return this.tracks_[A];}}),this.tracks_.indexOf(u)===-1&&(this.tracks_.push(u),this.trigger({track:u,type:"addtrack",target:this})),u.labelchange_=function(){T.trigger({track:u,type:"labelchange",target:T});},Mo(u)&&u.addEventListener("labelchange",u.labelchange_);},P.removeTrack=function(u){for(var T,A=0,L=this.length;A<L;A++)if(this[A]===u){(T=this[A]).off&&T.off(),this.tracks_.splice(A,1);break;}T&&this.trigger({track:T,type:"removetrack",target:this});},P.getTrackById=function(u){for(var T=null,A=0,L=this.length;A<L;A++){var ie=this[A];if(ie.id===u){T=ie;break;}}return T;},R;}(pr));for(gu in In.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},In.prototype.allowedEvents_)In.prototype["on"+gu]=null;function gs(k,R){for(var P=0;P<k.length;P++)Object.keys(k[P]).length&&R.id!==k[P].id&&(k[P].enabled=!1);}function vl(k,R){for(var P=0;P<k.length;P++)Object.keys(k[P]).length&&R.id!==k[P].id&&(k[P].selected=!1);}function Xl(k){for(var R=["protocol","hostname","port","pathname","search","hash","host"],P=_.a.createElement("a"),u=(P.href=k,{}),T=0;T<R.length;T++)u[R[T]]=P[R[T]];return u.protocol==="http:"&&(u.host=u.host.replace(/:80$/,"")),u.protocol==="https:"&&(u.host=u.host.replace(/:443$/,"")),u.protocol||(u.protocol=o.a.location.protocol),u.host||(u.host=o.a.location.host),u;}function Ba(k){var R;return k.match(/^https?:\/\//)||((R=_.a.createElement("a")).href=k,k=R.href),k;}function gd(k,R){var P={uri:k};(k=Kl(k))&&(P.cors=k),(k=R.tech_.crossOrigin()==="use-credentials")&&(P.withCredentials=k),p()(P,er(this,function(u,T,A){if(u)return Z.error(u,T);R.loaded_=!0,typeof o.a.WebVTT!="function"?R.tech_&&R.tech_.any(["vttjsloaded","vttjserror"],function(L){if(L.type!=="vttjserror")return bu(A,R);Z.error("vttjs failed to load, stopping trying to process "+R.src);}):bu(A,R);}));}var ai=function(k){function R(u){for(var T,A=(u=u===void 0?[]:u).length-1;0<=A;A--)if(u[A].enabled){gs(u,u[A]);break;}return(T=k.call(this,u)||this).changing_=!1,T;}y()(R,k);var P=R.prototype;return P.addTrack=function(u){var T=this;u.enabled&&gs(this,u),k.prototype.addTrack.call(this,u),u.addEventListener&&(u.enabledChange_=function(){T.changing_||(T.changing_=!0,gs(T,u),T.changing_=!1,T.trigger("change"));},u.addEventListener("enabledchange",u.enabledChange_));},P.removeTrack=function(u){k.prototype.removeTrack.call(this,u),u.removeEventListener&&u.enabledChange_&&(u.removeEventListener("enabledchange",u.enabledChange_),u.enabledChange_=null);},R;}(In),me=function(k){function R(u){for(var T,A=(u=u===void 0?[]:u).length-1;0<=A;A--)if(u[A].selected){vl(u,u[A]);break;}return(T=k.call(this,u)||this).changing_=!1,Object.defineProperty(h()(T),"selectedIndex",{get:function(){for(var L=0;L<this.length;L++)if(this[L].selected)return L;return-1;},set:function(){}}),T;}y()(R,k);var P=R.prototype;return P.addTrack=function(u){var T=this;u.selected&&vl(this,u),k.prototype.addTrack.call(this,u),u.addEventListener&&(u.selectedChange_=function(){T.changing_||(T.changing_=!0,vl(T,u),T.changing_=!1,T.trigger("change"));},u.addEventListener("selectedchange",u.selectedChange_));},P.removeTrack=function(u){k.prototype.removeTrack.call(this,u),u.removeEventListener&&u.selectedChange_&&(u.removeEventListener("selectedchange",u.selectedChange_),u.selectedChange_=null);},R;}(In),cn=function(k){function R(){return k.apply(this,arguments)||this;}y()(R,k);var P=R.prototype;return P.addTrack=function(u){var T=this;k.prototype.addTrack.call(this,u),this.queueChange_||(this.queueChange_=function(){return T.queueTrigger("change");}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return T.trigger("selectedlanguagechange");}),u.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(u.kind)===-1&&u.addEventListener("modechange",this.triggerSelectedlanguagechange_);},P.removeTrack=function(u){k.prototype.removeTrack.call(this,u),u.removeEventListener&&(this.queueChange_&&u.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&u.removeEventListener("modechange",this.triggerSelectedlanguagechange_));},R;}(In),dn=function(){function k(P){P===void 0&&(P=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length;}});for(var u=0,T=P.length;u<T;u++)this.addTrackElement_(P[u]);}var R=k.prototype;return R.addTrackElement_=function(P){var u=this.trackElements_.length;""+u in this||Object.defineProperty(this,u,{get:function(){return this.trackElements_[u];}}
13),this.trackElements_.indexOf(P)===-1&&this.trackElements_.push(P);},R.getTrackElementByTrack_=function(P){for(var u,T=0,A=this.trackElements_.length;T<A;T++)if(P===this.trackElements_[T].track){u=this.trackElements_[T];break;}return u;},R.removeTrackElement_=function(P){for(var u=0,T=this.trackElements_.length;u<T;u++)if(P===this.trackElements_[u]){this.trackElements_[u].track&&typeof this.trackElements_[u].track.off=="function"&&this.trackElements_[u].track.off(),typeof this.trackElements_[u].off=="function"&&this.trackElements_[u].off(),this.trackElements_.splice(u,1);break;}},k;}(),vu=function(){function k(P){k.prototype.setCues_.call(this,P),Object.defineProperty(this,"length",{get:function(){return this.length_;}});}var R=k.prototype;return R.setCues_=function(P){function u(ie){""+ie in this||Object.defineProperty(this,""+ie,{get:function(){return this.cues_[ie];}});}var T=this.length||0,A=0,L=P.length;if(this.cues_=P,this.length_=P.length,T<L)for(A=T;A<L;A++)u.call(this,A);},R.getCueById=function(P){for(var u=null,T=0,A=this.length;T<A;T++){var L=this[T];if(L.id===P){u=L;break;}}return u;},k;}(),jo={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ns={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},_n={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},yd={disabled:"disabled",hidden:"hidden",showing:"showing"},ys=function(k){function R(P){P===void 0&&(P={}),u=k.call(this)||this;var u,T,A={id:P.id||"vjs_track_"+un++,kind:P.kind||"",language:P.language||""},L=P.label||"";for(T in A)(function(ie){Object.defineProperty(h()(u),ie,{get:function(){return A[ie];},set:function(){}});})(T);return Object.defineProperty(h()(u),"label",{get:function(){return L;},set:function(ie){ie!==L&&(L=ie,this.trigger("labelchange"));}}),u;}return y()(R,k),R;}(pr),_u=function(k){return typeof k=="string"&&(k=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(k),k)?k.pop().toLowerCase():"";},Kl=function(k,R){return R===void 0&&(R=o.a.location),k=Xl(k),(k.protocol===":"?R:k).protocol+k.host!==R.protocol+R.host;},sf=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Ba,getFileExtension:_u,isCrossOrigin:Kl}),bu=function(k,R){var P=new o.a.WebVTT.Parser(o.a,o.a.vttjs,o.a.WebVTT.StringDecoder()),u=[];P.oncue=function(T){R.addCue(T);},P.onparsingerror=function(T){u.push(T);},P.onflush=function(){R.trigger({type:"loadeddata",target:R});},P.parse(k),0<u.length&&(o.a.console&&o.a.console.groupCollapsed&&o.a.console.groupCollapsed("Text Track parsing errors for "+R.src),u.forEach(function(T){return Z.error(T);}),o.a.console&&o.a.console.groupEnd&&o.a.console.groupEnd()),P.flush();},Ko=function(k){function R(A){var T;if(!(A=A===void 0?{}:A).tech)throw new Error("A tech was not provided.");var A=Kn(A,{kind:_n[A.kind]||"subtitles",language:A.language||A.srclang||""}),L=yd[A.mode]||"disabled",ie=A.default,pe=(A.kind!=="metadata"&&A.kind!=="chapters"||(L="hidden"),(T=k.call(this,A)||this).tech_=A.tech,T.cues_=[],T.activeCues_=[],T.preload_=T.tech_.preloadTextTracks!==!1,new vu(T.cues_)),Te=new vu(T.activeCues_),Ae=!1;return T.timeupdateHandler=er(h()(T),function(je){je===void 0&&(je={}),this.tech_.isDisposed()||(this.tech_.isReady_&&(this.activeCues=this.activeCues,Ae&&(this.trigger("cuechange"),Ae=!1)),je.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)));}),T.tech_.one("dispose",function(){T.stopTracking();}),L!=="disabled"&&T.startTracking(),Object.defineProperties(h()(T),{default:{get:function(){return ie;},set:function(){}},mode:{get:function(){return L;},set:function(je){yd[je]&&L!==je&&(L=je,this.preload_||L==="disabled"||this.cues.length!==0||gd(this.src,this),this.stopTracking(),L!=="disabled"&&this.startTracking(),this.trigger("modechange"));}},cues:{get:function(){return this.loaded_?pe:null;},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(this.cues.length!==0){for(var je=this.tech_.currentTime(),Fe=[],He=0,Qe
13=this.cues.length;He<Qe;He++){var pt=this.cues[He];(pt.startTime<=je&&pt.endTime>=je||pt.startTime===pt.endTime&&pt.startTime<=je&&pt.startTime+.5>=je)&&Fe.push(pt);}if(Ae=!1,Fe.length!==this.activeCues_.length)Ae=!0;else for(var Vt=0;Vt<Fe.length;Vt++)this.activeCues_.indexOf(Fe[Vt])===-1&&(Ae=!0);this.activeCues_=Fe,Te.setCues_(this.activeCues_);}return Te;},set:function(){}}}),A.src?(T.src=A.src,T.preload_||(T.loaded_=!0),(T.preload_||A.kind!=="subtitles"&&A.kind!=="captions")&&gd(T.src,h()(T))):T.loaded_=!0,T;}y()(R,k);var P=R.prototype;return P.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler);},P.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler);},P.addCue=function(u){var T=u;if(T.constructor&&T.constructor.name!=="VTTCue"){for(var A in T=new o.a.vttjs.VTTCue(u.startTime,u.endTime,u.text),u)A in T||(T[A]=u[A]);T.id=u.id,T.originalCue_=u;}for(var L=this.tech_.textTracks(),ie=0;ie<L.length;ie++)L[ie]!==this&&L[ie].removeCue(T);this.cues_.push(T),this.cues.setCues_(this.cues_);},P.removeCue=function(u){for(var T=this.cues_.length;T--;){var A=this.cues_[T];if(A===u||A.originalCue_&&A.originalCue_===u){this.cues_.splice(T,1),this.cues.setCues_(this.cues_);break;}}},R;}(ys),Zl=(Ko.prototype.allowedEvents_={cuechange:"cuechange"},function(k){function R(u){var u=Kn(u=u===void 0?{}:u,{kind:Ns[u.kind]||""}),T=k.call(this,u)||this,A=!1;return Object.defineProperty(h()(T),"enabled",{get:function(){return A;},set:function(L){typeof L=="boolean"&&L!==A&&(A=L,this.trigger("enabledchange"));}}),u.enabled&&(T.enabled=u.enabled),T.loaded_=!0,T;}return y()(R,k),R;}(ys)),ys=function(k){function R(u){var u=Kn(u=u===void 0?{}:u,{kind:jo[u.kind]||""}),T=k.call(this,u)||this,A=!1;return Object.defineProperty(h()(T),"selected",{get:function(){return A;},set:function(L){typeof L=="boolean"&&L!==A&&(A=L,this.trigger("selectedchange"));}}),u.selected&&(T.selected=u.selected),T;}return y()(R,k),R;}(ys),Zi=function(k){function R(P){P===void 0&&(P={}),u=k.call(this)||this;var u,T,A=new Ko(P);return u.kind=A.kind,u.src=A.src,u.srclang=A.language,u.label=A.label,u.default=A.default,Object.defineProperties(h()(u),{readyState:{get:function(){return T;}},track:{get:function(){return A;}}}),T=0,A.addEventListener("loadeddata",function(){T=2,u.trigger({type:"load",target:h()(u)});}),u;}return y()(R,k),R;}(pr),Bo=(Zi.prototype.allowedEvents_={load:"load"},Zi.NONE=0,Zi.LOADING=1,Zi.LOADED=2,Zi.ERROR=3,{audio:{ListClass:ai,TrackClass:Zl,capitalName:"Audio"},video:{ListClass:me,TrackClass:ys,capitalName:"Video"},text:{ListClass:cn,TrackClass:Ko,capitalName:"Text"}}),Vs=(Object.keys(Bo).forEach(function(k){Bo[k].getterName=k+"Tracks",Bo[k].privateName=k+"Tracks_";}),{remoteText:{ListClass:cn,TrackClass:Ko,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:dn,TrackClass:Zi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}}),Yr=E()({},Bo,Vs);Vs.names=Object.keys(Vs),Bo.names=Object.keys(Bo),Yr.names=[].concat(Vs.names).concat(Bo.names);var Gn=function(k){function R(u,T){var A;return T===void 0&&(T=function(){}),(u=u===void 0?{}:u).reportTouchActivity=!1,(A=k.call(this,null,u,T)||this).onDurationChange_=function(L){return A.onDurationChange(L);},A.trackProgress_=function(L){return A.trackProgress(L);},A.trackCurrentTime_=function(L){return A.trackCurrentTime(L);},A.stopTrackingCurrentTime_=function(L){return A.stopTrackingCurrentTime(L);},A.disposeSourceHandler_=function(L){return A.disposeSourceHandler(L);},A.queuedHanders_=new Set(),A.hasStarted_=!1,A.on("playing",function(){this.hasStarted_=!0;}),A.on("loadstart",function(){this.hasStarted_=!1;}),Yr.names.forEach(function(L){L=Yr[L],u&&u[L.getterName]&&(A[L.privateName]=u[L.getterName]);}),A.featuresProgressEvents||A.manualProgressOn(),A.featuresTimeupdateEvents||A.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(L){u["native"+L+"Tracks"]===!1&&(A["featuresNative"+L+"Tracks"]=!1);}),u.nativeCaptions===!1||u.nativeTextTracks===!1?A.featuresNativeTextTracks=!1:u.nativeCaptions!==!0&&u.nativeTextTracks!==!0||(A.featuresNativeTextTracks=!0),A.featuresNativeTextTracks||A.emulateTextTracks(),A.preloadTextTracks=u.preloadTextTracks!==!1,A.autoRemoteTextTracks_=new Yr.text.ListClass(),A.initTrackListeners(),u.nativeControlsForTouch||A.emitTapEvents(),A.constructor&&(A.name_=A.constructor.name||"Unknown Tech"),A;}y()(R,k);var P=R.prototype;return P.triggerSourceset=function(u){var T=this;
13this.isReady_||this.one("ready",function(){return T.setTimeout(function(){return T.triggerSourceset(u);},1);}),this.trigger({src:u,type:"sourceset"});},P.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_);},P.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_);},P.trackProgress=function(u){this.stopTrackingProgress(),this.progressInterval=this.setInterval(er(this,function(){var T=this.bufferedPercent();this.bufferedPercent_!==T&&this.trigger("progress"),(this.bufferedPercent_=T)===1&&this.stopTrackingProgress();}),500);},P.onDurationChange=function(u){this.duration_=this.duration();},P.buffered=function(){return da(0,0);},P.bufferedPercent=function(){return Wl(this.buffered(),this.duration_);},P.stopTrackingProgress=function(){this.clearInterval(this.progressInterval);},P.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_);},P.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_);},P.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});},250);},P.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});},P.dispose=function(){this.clearTracks(Bo.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),k.prototype.dispose.call(this);},P.clearTracks=function(u){var T=this;(u=[].concat(u)).forEach(function(A){for(var L=T[A+"Tracks"]()||[],ie=L.length;ie--;){var pe=L[ie];A==="text"&&T.removeRemoteTextTrack(pe),L.removeTrack(pe);}});},P.cleanupAutoTextTracks=function(){for(var u=this.autoRemoteTextTracks_||[],T=u.length;T--;){var A=u[T];this.removeRemoteTextTrack(A);}},P.reset=function(){},P.crossOrigin=function(){},P.setCrossOrigin=function(){},P.error=function(u){return u!==void 0&&(this.error_=new qr(u),this.trigger("error")),this.error_;},P.played=function(){return this.hasStarted_?da(0,0):da();},P.play=function(){},P.setScrubbing=function(){},P.scrubbing=function(){},P.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});},P.initTrackListeners=function(){var u=this;Bo.names.forEach(function(T){function A(){u.trigger(T+"trackchange");}var L=Bo[T],ie=u[L.getterName]();ie.addEventListener("removetrack",A),ie.addEventListener("addtrack",A),u.on("dispose",function(){ie.removeEventListener("removetrack",A),ie.removeEventListener("addtrack",A);});});},P.addWebVttScript_=function(){var u,T=this;o.a.WebVTT||(_.a.body.contains(this.el())?!this.options_["vtt.js"]&&Q(c.a)&&0<Object.keys(c.a).length?this.trigger("vttjsloaded"):((u=_.a.createElement("script")).src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",u.onload=function(){T.trigger("vttjsloaded");},u.onerror=function(){T.trigger("vttjserror");},this.on("dispose",function(){u.onload=null,u.onerror=null;}),o.a.WebVTT=!0,this.el().parentNode.appendChild(u)):this.ready(this.addWebVttScript_));},P.emulateTextTracks=function(){function u(Ae){return ie.addTrack(Ae.track);}function T(Ae){return ie.removeTrack(Ae.track);}function A(){Te();for(var Ae=0;Ae<ie.length;Ae++){var je=ie[Ae];je.removeEventListener("cuechange",Te),je.mode==="showing"&&je.addEventListener("cuechange",Te);}}var L=this,ie=this.textTracks(),pe=this.remoteTextTracks(),Te=(pe.on("addtrack",u),pe.on("removetrack",T),this.addWebVttScript_(),function(){return L.trigger("texttrackchange");});A(),ie.addEventListener("change",A),ie.addEventListener("addtrack",A),ie.addEventListener("removetrack",A),this.on("dispose",function(){pe.off("addtrack",u),pe.off("removetrack",T),ie.removeEventListener("change",A),ie.removeEventListener("addtrack",A),ie.removeEventListener("removetrack",A);for(var Ae=0;Ae<ie.length;Ae++)ie[Ae].removeEventListener("cuechange",Te);});},P.addTextTrack=function(u,T,A){if(u)return u=u,T=T,A=A,ie===void 0&&(ie={}),pe=(L=this).textTracks(),ie.kind=u,T&&(ie.label=T),A&&(ie.language=A),ie.tech=L,u=new Yr.text.TrackClass(ie),pe.addTrack(u),u;throw new Error("TextTrack kind is required but was not provided");var L,ie,pe;},P.createRemoteTextTrack=function(u){return u=Kn(u,{tech:this}),new Vs.remoteTextEl.TrackClass(u);},P.addRemoteTextTrack=function(u,T){var A=this,L=this.createRemoteTextTrack(u=u===void 0?{}:u);return T!==!0&&T!==!1&&(Z.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),T=!0),this.remoteTextTrackEls().addTrackElement_(L),this.remoteTextTracks().addTrack(L.track),T!==!0&&this.ready(function(){return A.autoRemoteTextTracks_.addTrack(L.track);}),L;},P.removeRemoteTextTrack=function(u){var T=this.remoteTextTrackEls().getTrackElementByTrack_(u);this.remoteTextTrackEls().removeTrackElement_(T),this.remoteTextTracks().removeTrack(u),this.autoRemoteTextTracks_.removeTrack(u);},P.getVideoPlaybackQuality=function(){return{};},P.requestPictureInPicture=function(){var u=this.options_.Promise||o.a.Promise;if(u)return u.reject();},P.disablePictureInPicture=function(){return!0;},P.setDisablePictureInPicture=function(){},P.requestVideoFrameCallback=function(u){var T=this,A=un++;return!this.isReady_||this.paused()?(this.queuedHanders_.add(A),this.one("playing",function(){T.queuedH
13anders_.has(A)&&(T.queuedHanders_.delete(A),u());})):this.requestNamedAnimationFrame(A,u),A;},P.cancelVideoFrameCallback=function(u){this.queuedHanders_.has(u)?this.queuedHanders_.delete(u):this.cancelNamedAnimationFrame(u);},P.setPoster=function(){},P.playsinline=function(){},P.setPlaysinline=function(){},P.overrideNativeAudioTracks=function(){},P.overrideNativeVideoTracks=function(){},P.canPlayType=function(){return"";},R.canPlayType=function(){return"";},R.canPlaySource=function(u,T){return R.canPlayType(u.type);},R.isTech=function(u){return u.prototype instanceof R||u instanceof R||u===R;},R.registerTech=function(u,T){if(R.techs_||(R.techs_={}),!R.isTech(T))throw new Error("Tech "+u+" must be a Tech");if(!R.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(R.canPlaySource)return u=fr(u),R.techs_[u]=T,R.techs_[Vo(u)]=T,u!=="Tech"&&R.defaultTechOrder_.push(u),T;throw new Error("Techs must have a static canPlaySource method on them");},R.getTech=function(u){if(u)return R.techs_&&R.techs_[u]?R.techs_[u]:(u=fr(u),o.a&&o.a.videojs&&o.a.videojs[u]?(Z.warn("The "+u+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),o.a.videojs[u]):void 0);},R;}(Wt),Aa=(Yr.names.forEach(function(k){var R=Yr[k];Gn.prototype[R.getterName]=function(){return this[R.privateName]=this[R.privateName]||new R.ListClass(),this[R.privateName];};}),Gn.prototype.featuresVolumeControl=!0,Gn.prototype.featuresMuteControl=!0,Gn.prototype.featuresFullscreenResize=!1,Gn.prototype.featuresPlaybackRate=!1,Gn.prototype.featuresProgressEvents=!1,Gn.prototype.featuresSourceset=!1,Gn.prototype.featuresTimeupdateEvents=!1,Gn.prototype.featuresNativeTextTracks=!1,Gn.prototype.featuresVideoFrameCallback=!1,Gn.withSourceHandlers=function(k){k.registerSourceHandler=function(R,P){var u=(u=k.sourceHandlers)||(k.sourceHandlers=[]);P===void 0&&(P=u.length),u.splice(P,0,R);},k.canPlayType=function(R){for(var P,u=k.sourceHandlers||[],T=0;T<u.length;T++)if(P=u[T].canPlayType(R))return P;return"";},k.selectSourceHandler=function(R,P){for(var u=k.sourceHandlers||[],T=0;T<u.length;T++)if(u[T].canHandleSource(R,P))return u[T];return null;},k.canPlaySource=function(R,P){var u=k.selectSourceHandler(R,P);return u?u.canHandleSource(R,P):"";},["seekable","seeking","duration"].forEach(function(R){var P=this[R];typeof P=="function"&&(this[R]=function(){return this.sourceHandler_&&this.sourceHandler_[R]?this.sourceHandler_[R].apply(this.sourceHandler_,arguments):P.apply(this,arguments);});},k.prototype),k.prototype.setSource=function(R){var P=k.selectSourceHandler(R,this.options_);P||(k.nativeSourceHandler?P=k.nativeSourceHandler:Z.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),P!==k.nativeSourceHandler&&(this.currentSource_=R),this.sourceHandler_=P.handleSource(R,this,this.options_),this.one("dispose",this.disposeSourceHandler_);},k.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null);};},Wt.registerComponent("Tech",Gn),Gn.registerTech("Tech",Gn),Gn.defaultTechOrder_=[],{}),ha={},js={};function vd(k,R,P){k.setTimeout(function(){return function u(T,A,L,ie,pe,Te){T===void 0&&(T={}),A===void 0&&(A=[]),pe===void 0&&(pe=[]),Te===void 0&&(Te=!1);var Ae=A[0],je=A.slice(1);if(typeof Ae=="string")u(T,Aa[Ae],L,ie,pe,Te);else if(Ae){var Fe=bl(ie,Ae);if(!Fe.setSource)return pe.push(Fe),u(T,je,L,ie,pe,Te);Fe.setSource(J({},T),function(He,Qe){if(He)return u(T,je,L,ie,pe,Te);pe.push(Fe),u(Qe,T.type===Qe.type?je:Aa[Qe.type],L,ie,pe,Te);});}else je.length?u(T,je,L,ie,pe,Te):Te?L(T,pe):u(T,Aa["*"],L,ie,pe,!0);}(R,Aa[R.type],P,k);},1);}function vs(k,R,P,u){u===void 0&&(u=null);for(var T="call"+fr(P),T=k.reduce(_l(T),u),u=T===js,R=u?null:R[P](T),A=k,L=P,ie=R,pe=u,Te=A.length-1;0<=Te;Te--){var Ae=A[Te];Ae[L]&&Ae[L](pe,ie);}return R;}var Ur={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Su={setCurrentTime:1,setMuted:1,setVolume:1},wu={play:1,pause:1};function _l(k){return function(R,P){return R===js?js:P[k]?P[k](R):R;};}function bl(k,R){var P=ha[k.id()],u=null;if(P==null)u=R(k),ha[k.id()]=[[R,u]];else{for(var T=0;T<P.length;T++){var L=P[T],A=L[0],L=L[1];A===R&&(u=L);}u===null&&(u=R(k),P.push([R,u]));}return u;}function Eu(k){var R;
13return k=Array.isArray(k)?(R=[],k.forEach(function(P){P=Eu(P),Array.isArray(P)?R=R.concat(P):oe(P)&&R.push(P);}),R):typeof k=="string"&&k.trim()?[Ql({src:k})]:oe(k)&&typeof k.src=="string"&&k.src&&k.src.trim()?[Ql(k)]:[];}var _d={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},tr=function(k){return k=_u(k=k===void 0?"":k),_d[k.toLowerCase()]||"";};function Ql(k){var R;return k.type||(R=tr(k.src))&&(k.type=R),k;}var ai=function(k){function R(P,u,T){var A=Kn({createEl:!1},u),A=k.call(this,P,A,T)||this;if(u.playerOptions.sources&&u.playerOptions.sources.length!==0)P.src(u.playerOptions.sources);else for(var L=0,ie=u.playerOptions.techOrder;L<ie.length;L++){var pe=fr(ie[L]),Te=Gn.getTech(pe);if((Te=pe?Te:Wt.getComponent(pe))&&Te.isSupported()){P.loadTech_(pe);break;}}return A;}return y()(R,k),R;}(Wt),me=(Wt.registerComponent("MediaLoader",ai),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.options_.controlText&&A.controlText(A.options_.controlText),A.handleMouseOver_=function(L){return A.handleMouseOver(L);},A.handleMouseOut_=function(L){return A.handleMouseOut(L);},A.handleClick_=function(L){return A.handleClick(L);},A.handleKeyDown_=function(L){return A.handleKeyDown(L);},A.emitTapEvents(),A.enable(),A;}y()(R,k);var P=R.prototype;return P.createEl=function(u,T,A){return u===void 0&&(u="div"),T===void 0&&(T={}),A===void 0&&(A={}),T=J({className:this.buildCSSClass(),tabIndex:0},T),u==="button"&&Z.error("Creating a ClickableComponent with an HTML element of "+u+" is not supported; use a Button instead."),A=J({role:"button"},A),this.tabIndex_=T.tabIndex,u=Be(u,T,A),u.appendChild(Be("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(u),u;},P.dispose=function(){this.controlTextEl_=null,k.prototype.dispose.call(this);},P.createControlTextEl=function(u){return this.controlTextEl_=Be("span",{className:"vjs-control-text"},{"aria-live":"polite"}),u&&u.appendChild(this.controlTextEl_),this.controlText(this.controlText_,u),this.controlTextEl_;},P.controlText=function(u,T){if(T===void 0&&(T=this.el()),u===void 0)return this.controlText_||"Need Text";var A=this.localize(u);this.controlText_=u,nt(this.controlTextEl_,A),this.nonIconControl||this.player_.options_.noUITitleAttributes||T.setAttribute("title",A);},P.buildCSSClass=function(){return"vjs-control vjs-button "+k.prototype.buildCSSClass.call(this);},P.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),this.tabIndex_!==void 0&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_));},P.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),this.tabIndex_!==void 0&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_);},P.handleLanguagechange=function(){this.controlText(this.controlText_);},P.handleClick=function(u){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments);},P.handleKeyDown=function(u){x.a.isEventKey(u,"Space")||x.a.isEventKey(u,"Enter")?(u.preventDefault(),u.stopPropagation(),this.trigger("click")):k.prototype.handleKeyDown.call(this,u);},R;}(Wt)),cn=(Wt.registerComponent("ClickableComponent",me),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.update(),A.update_=function(L){return A.update(L);},u.on("posterchange",A.update_),A;}y()(R,k);var P=R.prototype;return P.dispose=function(){this.player().off("posterchange",this.update_),k.prototype.dispose.call(this);},P.createEl=function(){return Be("div",{className:"vjs-poster",tabIndex:-1});},P.update=function(u){var T=this.player().poster();this.setSrc(T),T?this.show():this.hide();},P.setSrc=function(u){u=u?'url("'+u+'")':"",this.el_.style.backgroundImage=u;},P.handleClick=function(u){var T;this.player_.controls()&&(T=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length,!this.player_.tech(!0)||(fe||ne)&&T||this.player_.tech(!0).focus(),this.player_.paused()?Xo(this.player_.play()):this.player_.pause());},R;}(me)),bd=(Wt.registerComponent("PosterImage",cn),{monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',
13script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'});function xu(k,R){var P;if(k.length===4)P=k[1]+k[1]+k[2]+k[2]+k[3]+k[3];else{if(k.length!==7)throw new Error("Invalid color code provided, "+k+"; must be formatted as e.g. #f0e or #f604e2.");P=k.slice(1);}return"rgba("+parseInt(P.slice(0,2),16)+","+parseInt(P.slice(2,4),16)+","+parseInt(P.slice(4,6),16)+","+R+")";}function Sl(k,R,P){try{k.style[R]=P;}catch{}}function Tu(k,L){k=k<0?0:k;var P=Math.floor(k%60),u=Math.floor(k/60%60),T=Math.floor(k/3600),A=Math.floor(L/60%60),L=Math.floor(L/3600);return(T=0<(T=!isNaN(k)&&k!==1/0?T:u=P="-")||0<L?T+":":"")+(u=((T||10<=A)&&u<10?"0"+u:u)+":")+(P=P<10?"0"+P:P);}var dn=function(k){function R(u,T,A){function L(pe){return ie.updateDisplay(pe);}var ie=k.call(this,u,T,A)||this;return u.on("loadstart",function(pe){return ie.toggleDisplay(pe);}),u.on("texttrackchange",L),u.on("loadedmetadata",function(pe){return ie.preselectTrack(pe);}),u.ready(er(h()(ie),function(){if(u.tech_&&u.tech_.featuresNativeTextTracks)this.hide();else{u.on("fullscreenchange",L),u.on("playerresize",L),o.a.addEventListener("orientationchange",L),u.on("dispose",function(){return o.a.removeEventListener("orientationchange",L);});for(var pe=this.options_.playerOptions.tracks||[],Te=0;Te<pe.length;Te++)this.player_.addRemoteTextTrack(pe[Te],!0);this.preselectTrack();}})),ie;}y()(R,k);var P=R.prototype;return P.preselectTrack=function(){for(var u,T,A,L={captions:1,subtitles:1},ie=this.player_.textTracks(),pe=this.player_.cache_.selectedLanguage,Te=0;Te<ie.length;Te++){var Ae=ie[Te];pe&&pe.enabled&&pe.language&&pe.language===Ae.language&&Ae.kind in L?A=Ae.kind!==pe.kind&&A||Ae:pe&&!pe.enabled?T=u=A=null:Ae.default&&(Ae.kind!=="descriptions"||u?Ae.kind in L&&!T&&(T=Ae):u=Ae);}A?A.mode="showing":T?T.mode="showing":u&&(u.mode="showing");},P.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show();},P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"});},P.clearDisplay=function(){typeof o.a.WebVTT=="function"&&o.a.WebVTT.processCues(o.a,[],this.el_);},P.updateDisplay=function(){var u=this.player_.textTracks(),T=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),T){for(var A=[],L=0;L<u.length;++L){var ie=u[L];ie.mode==="showing"&&A.push(ie);}this.updateForTrack(A);}else{for(var pe=null,Te=null,Ae=u.length;Ae--;){var je=u[Ae];je.mode==="showing"&&(je.kind==="descriptions"?pe=je:Te=je);}Te?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(Te)):pe&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(pe));}},P.updateDisplayState=function(u){for(var T=this.player_.textTrackSettings.getValues(),A=u.activeCues,L=A.length;L--;){var ie,pe=A[L];pe&&(pe=pe.displayState,T.color&&(pe.firstChild.style.color=T.color),T.textOpacity&&Sl(pe.firstChild,"color",xu(T.color||"#fff",T.textOpacity)),T.backgroundColor&&(pe.firstChild.style.backgroundColor=T.backgroundColor),T.backgroundOpacity&&Sl(pe.firstChild,"backgroundColor",xu(T.backgroundColor||"#000",T.backgroundOpacity)),T.windowColor&&(T.windowOpacity?Sl(pe,"backgroundColor",xu(T.windowColor,T.windowOpacity)):pe.style.backgroundColor=T.windowColor),T.edgeStyle&&(T.edgeStyle==="dropshadow"?pe.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":T.edgeStyle==="raised"?pe.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":T.edgeStyle==="depressed"?pe.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":T.edgeStyle==="uniform"&&(pe.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),T.fontPercent&&T.fontPercent!==1&&(ie=o.a.parseFloat(pe.style.fontSize),pe.style.fontSize=ie*T.fontPercent+"px",pe.style.height="auto",pe.style.top="auto"),T.fontFamily&&T.fontFamily!=="default"&&(T.fontFamily==="small-caps"?pe.firstChild.style.fontVariant="small-caps":pe.firstChild.style.fontFamily=bd[T.fontFamily]));}},P.updateForTrack=function(u){if(Array.isArray(u)||(u=[u]),typeof o.a.WebVTT=="function"&&!u.every(function(Fe){return!Fe.activeCues;})){for(var T=[],A=0;A<u.length;++A)for(var L=u[A],ie=0;ie<L.activeCues.length;++ie)T.push(L.activeCues[ie]);o.a.WebVTT.processCues(o.a,T,this.el_);for(var pe=0;pe<u.length;++pe){for(var Te=u[pe],Ae=0;Ae<Te.activeCues.length;++Ae){var je=Te.activeCues[Ae].displayState;ht(je,"vjs-text-track-cue"),ht(je,"vjs-text-track-cue-"+(Te.language||pe)),Te.language&&Ge(je,"lang",Te.language);}this.player_.textTrackSettings&&this.updateDisplayState(Te);}}},R;}(Wt),Zi=(Wt.registerComponent("TextTrackDisplay",dn),function(k){function R(){return k.apply(this,arguments)||this;}return y()(R,k),R.prototype.createEl=function(){var P=this.player_.isAudio(),P=this.localize(P?"Audio Player":"
13Video Player"),P=Be("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[P])}),u=k.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return u.appendChild(P),u;},R;}(Wt)),Zo=(Wt.registerComponent("LoadingSpinner",Zi),function(k){function R(){return k.apply(this,arguments)||this;}y()(R,k);var P=R.prototype;return P.createEl=function(u,T,A){return T===void 0&&(T={}),A===void 0&&(A={}),T=Be("button",T=J({className:this.buildCSSClass()},T),A=J({type:"button"},A)),T.appendChild(Be("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(T),T;},P.addChild=function(u,T){T===void 0&&(T={});var A=this.constructor.name;return Z.warn("Adding an actionable (user controllable) child to a Button ("+A+") is not supported; use a ClickableComponent instead."),Wt.prototype.addChild.call(this,u,T);},P.enable=function(){k.prototype.enable.call(this),this.el_.removeAttribute("disabled");},P.disable=function(){k.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled");},P.handleKeyDown=function(u){x.a.isEventKey(u,"Space")||x.a.isEventKey(u,"Enter")?u.stopPropagation():k.prototype.handleKeyDown.call(this,u);},R;}(me)),ai=(Wt.registerComponent("Button",Zo),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.mouseused_=!1,A.on("mousedown",function(L){return A.handleMouseDown(L);}),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-big-play-button";},P.handleClick=function(u){var T,A=this.player_.play();this.mouseused_&&u.clientX&&u.clientY?(u=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length,Xo(A),!this.player_.tech(!0)||(fe||ne)&&u||this.player_.tech(!0).focus()):(u=this.player_.getChild("controlBar"),(T=u&&u.getChild("playToggle"))?(u=function(){return T.focus();},Ds(A)?A.then(u,function(){}):this.setTimeout(u,1)):this.player_.tech(!0).focus());},P.handleKeyDown=function(u){this.mouseused_=!1,k.prototype.handleKeyDown.call(this,u);},P.handleMouseDown=function(u){this.mouseused_=!0;},R;}(Zo)),cn=(ai.prototype.controlText_="Play Video",Wt.registerComponent("BigPlayButton",ai),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.controlText(T&&T.controlText||u.localize("Close")),u;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-close-button "+k.prototype.buildCSSClass.call(this);},P.handleClick=function(u){this.trigger({type:"close",bubbles:!1});},P.handleKeyDown=function(u){x.a.isEventKey(u,"Esc")?(u.preventDefault(),u.stopPropagation(),this.trigger("click")):k.prototype.handleKeyDown.call(this,u);},R;}(Zo)),dn=(Wt.registerComponent("CloseButton",cn),function(k){function R(u,T){var A=k.call(this,u,T=T===void 0?{}:T)||this;return T.replay=T.replay===void 0||T.replay,A.on(u,"play",function(L){return A.handlePlay(L);}),A.on(u,"pause",function(L){return A.handlePause(L);}),T.replay&&A.on(u,"ended",function(L){return A.handleEnded(L);}),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-play-control "+k.prototype.buildCSSClass.call(this);},P.handleClick=function(u){this.player_.paused()?Xo(this.player_.play()):this.player_.pause();},P.handleSeeked=function(u){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(u):this.handlePlay(u);},P.handlePlay=function(u){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause");},P.handlePause=function(u){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play");},P.handleEnded=function(u){var T=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(A){return T.handleSeeked(A);});},R;}(Zo)),Jl=(dn.prototype.controlText_="Play",Wt.registerComponent("PlayToggle",dn),Tu);function Fa(k,R){return Jl(k,R=R===void 0?k:R);}function ec(k,R,P){return k=Number(k),Math.min(P,Math.max(R,isNaN(k)?R:k));}function Cu(k,R){return ec(k/R*100,0,100).toFixed(2)+"%";}var Zi=function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on(u,["timeupdate","ended"],function(L){return A.updateContent(L);}),A.updateTextNode_(),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u=this.buildCSSClass(),T=k.prototype.createEl.call(this,"div",{className:u+" vjs-time-control vjs-control"}),A=Be("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xA0"},{role:"presentation"});return T.appendChild(A),this.contentEl_=Be("span",{className:u+"-display"},{"aria-live":"off",role:"presentation"}),T.appendChild(this.contentEl_),T;},P.dispose=function(){this.contentEl_=null,this.textNode_=null,k.prototype.dispose.call(this);},P.updateTextNode_=function(u){var T=this;u=Fa(u=u===void 0?0:u),this.formattedTime_!==u&&(this.formattedTime_=u,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){var A;T.contentEl_&&((A=T.textNode_)&&T.contentEl_.firstChild!==A&&(A=null,Z.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),T.textNode_=_.a.createTextNode(T.formattedTime_),T.textNode_&&(A?T.contentEl_.replaceChild(T.textNode_,A):T.contentEl_.appendChild(T.textNode_)));}));},P.updateContent=function(u){},R;}(Wt),ai=(Zi.prototype.labelText_="Time",Zi.prototype.controlText_="Time",Wt.registerComponent("TimeDisplay",Zi),function(k){function R(){return k.apply(this,arguments)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-current-time";},P.updateContent=function(u){var T=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateTextNode_(T);},R;}(Zi)),cn=(ai.prototype.labelText_="Current Time",ai.prototype.controlText_="Current Time",Wt.registerComponent("CurrentTimeDisplay",ai),function(k){function R(u,T){function A(ie){return L.updateContent(ie);}var L=k.call(this,u,T)||this;return L.on(u,"durationchange",A),L.on(u,"loadstart",A),L.on(u,"loadedmetadata",A),L;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-duration";},P.updateContent=function(u){var T=this.player_.duration();this.updateTextNode_(T);},R;}(Zi)),dn=(cn.prototype.labelText_="Duration",cn.prototype.controlText_="Duration",Wt.registerComponent("DurationDisplay",cn),function(k){function R(){return k.apply(this,arguments)||this;}return y()(R,k),R.prototype.createEl=function(){var P=k.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),u=k.prototype.createEl.call(this,"div"),T=k.prototype.createEl.call(this,"span",{textContent:"/"});return u.appendChild(T),P.appendChild(u),P;},R;}(Wt)),ai=(Wt.registerComponent("TimeDivider",dn),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on(u,"durationchange",function(L){return A.updateContent(L);}),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-remaining-time";},P.createEl=function(){var u=k.prototype.createEl.call(this);return this.options_.displayNegative!==!1&&u.insertBefore(Be("span",{},{"aria-hidden":!0},"-"),this.contentEl_),u;},P.updateContent=function(u){var T;typeof this.player_.duration()=="number"&&(T=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(T));},R;}(Zi)),cn=(ai.prototype.labelText_="Remaining Time",ai.prototype.controlText_="Remaining Time",Wt.registerComponent("RemainingTimeDisplay",ai),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.updateShowing(),A.on(A.player(),"durationchange",function(L){return A.updateShowing(L);}),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u=k.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Be("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Be("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xA0"})),this.contentEl_.appendChild(_.a.createTextNode(this.localize("LIVE"))),u.a
13ppendChild(this.contentEl_),u;},P.dispose=function(){this.contentEl_=null,k.prototype.dispose.call(this);},P.updateShowing=function(u){this.player().duration()===1/0?this.show():this.hide();},R;}(Wt)),dn=(Wt.registerComponent("LiveDisplay",cn),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.updateLiveEdgeStatus(),A.player_.liveTracker&&(A.updateLiveEdgeStatusHandler_=function(L){return A.updateLiveEdgeStatus(L);},A.on(A.player_.liveTracker,"liveedgechange",A.updateLiveEdgeStatusHandler_)),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u=k.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Be("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),u.appendChild(this.textEl_),u;},P.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"));},P.handleClick=function(){this.player_.liveTracker.seekToLiveEdge();},P.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,k.prototype.dispose.call(this);},R;}(Zo)),Zi=(dn.prototype.controlText_="Seek to live, currently playing live",Wt.registerComponent("SeekToLive",dn),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.handleMouseDown_=function(L){return A.handleMouseDown(L);},A.handleMouseUp_=function(L){return A.handleMouseUp(L);},A.handleKeyDown_=function(L){return A.handleKeyDown(L);},A.handleClick_=function(L){return A.handleClick(L);},A.handleMouseMove_=function(L){return A.handleMouseMove(L);},A.update_=function(L){return A.update(L);},A.bar=A.getChild(A.options_.barName),A.vertical(!!A.options_.vertical),A.enable(),A;}y()(R,k);var P=R.prototype;return P.enabled=function(){return this.enabled_;},P.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0);},P.disable=function(){var u;this.enabled()&&(u=this.bar.el_.ownerDocument,this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(u,"mousemove",this.handleMouseMove_),this.off(u,"mouseup",this.handleMouseUp_),this.off(u,"touchmove",this.handleMouseMove_),this.off(u,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1);},P.createEl=function(u,T,A){return A===void 0&&(A={}),(T=T===void 0?{}:T).className=T.className+" vjs-slider",T=J({tabIndex:0},T),A=J({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},A),k.prototype.createEl.call(this,u,T,A);},P.handleMouseDown=function(u){var T=this.bar.el_.ownerDocument;u.type==="mousedown"&&u.preventDefault(),u.type!=="touchstart"||le||u.preventDefault(),yt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(T,"mousemove",this.handleMouseMove_),this.on(T,"mouseup",this.handleMouseUp_),this.on(T,"touchmove",this.handleMouseMove_),this.on(T,"touchend",this.handleMouseUp_),this.handleMouseMove(u,!0);},P.handleMouseMove=function(u){},P.handleMouseUp=function(){var u=this.bar.el_.ownerDocument;bt(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(u,"mousemove",this.handleMouseMove_),this.off(u,"mouseup",this.handleMouseUp_),this.off(u,"touchmove",this.handleMouseMove_),this.off(u,"touchend",this.handleMouseUp_),this.update();},P.update=function(){var u,T=this;if(this.el_&&this.bar)return u=this.getProgress(),u!==this.progress_&&(this.progress_=u,this.requestNamedAnimationFrame("Slider#update",function(){var A=T.vertical()?"height":"width";T.bar.el().style[A]=(100*u).toFixed(2)+"%";})),u;},P.getProgress=function(){return Number(ec(this.getPercent(),0,1).toFixed(4));},P.calculateDistance=function(u){return u=Mt(this.el_,u),this.vertical()?u.y:u.x;},P.handleKeyDown=function(u){x.a.isEventKey(u,"Left")||x.a.isEventKey(u,"Down")?(u.preventDefault(),u.stopPropagation(),this.stepBack()):x.a.isEventKey(u,"Right")||x.a.isEventKey(u,"Up")?(u.preventDefault(),u.stopPropagation(),this.stepForward()):k.prototype.handleKeyDown.call(this,u);},P.handleClick=function(u){u.stopPropagation(),u.preventDefault();},P.vertical=function(u){if(u===void 0)return this.vertical_||!1;this.vertical_=!!u,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal");},R;}(Wt)),ai=(Wt.registerComponent("Slider",Zi),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.partEls_=[],A.on(u,"progress",function(L){return A.update(L);}),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u=k.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),T=Be("span",{className:"vjs-control-text"}),A=Be("span",{textContent:this.localize("Loaded")}),L=_.a.createTextNode(": ");return this.percentageEl_=Be("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),u.appendChild(T),T.appendChild(A),T.appendChild(L),T.appendChild(this.percentageEl_),u;},P.dispose=function(){this.partEls_=null,this.percentageEl_=null,k.prototype.dispose.call(this);},P.update=function(u){var T=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var pe=T.player_.liveTracker,A=T.player_.buffered(),pe=pe&&pe.isLive()?pe.seekableEnd():T.player_.duration(),L=T.player_.bufferedEnd(),ie=T.partEls_,pe=Cu(L,pe);T.percent_!==pe&&(T.el_.style.width=pe,nt(T.percentageEl_,pe),T.percent_=pe);for(var Te=0;Te<A.length;Te++){var Ae=A.start(Te),je=A.end(Te),Fe=ie[Te];Fe||(Fe=T.el_.appendChild(Be()),ie[Te]=Fe),Fe.dataset.start===Ae&&Fe.dataset.end===je||(Fe.dataset.start=Ae,Fe.dataset.end=je,Fe.style.left=Cu(Ae,L),Fe.style.width=Cu(je-Ae,L));}for(var He=ie.length;He>A.length;He--)T.el_.removeChild(ie[He-1]);ie.length=A.length;});},R;}(Wt)),cn=(Wt.registerComponent("LoadProgressBar",ai),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.update=Un(er(h()(u),u.update),30),u;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"});},P.update=function(u,Te,A){var L,ie=Ot(this.el_),pe=gt(this.player_.el()),Te=u.width*Te;pe&&ie&&(L=u.left-pe.left+Te,Te=u.width-Te+(pe.right-u.right),L<(pe=ie.width/2)?pe+=pe-L:Te<pe&&(pe=Te),pe<0?pe=0:pe>ie.width&&(pe=ie.width),pe=Math.round(pe),this.el_.style.right="-"+pe+"px",this.write(A));},P.write=function(u){nt(this.el_,u);},P.updateTime=function(u,T,A,L){var ie=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var pe,Te,Ae=ie.player_.duration();Te=ie.player_.liveTracker&&ie.player_.liveTracker.isLive()?((Te=(pe=ie.player_.liveTracker.liveWindow())-T*pe)<1?"":"-")+Fa(Te,pe):Fa(A,Ae),ie.update(u,T,Te),L&&L();});},R;}(Wt)),dn=(Wt.registerComponent("TimeTooltip",cn),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.update=Un(er(h()(u),u.update),30),u;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"});},P.update=function(u,T){var A,L=this.getChild("timeTooltip");L&&(A=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),L.updateTime(u,T,A));},R;}(Wt)),ai=(dn.prototype.options_={children:[]},Re||Y||dn.prototype.options_.children.push("timeTooltip"),Wt.registerComponent("PlayProgressBar",dn),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.update=Un(er(h()(u),u.update),30),u;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"});},P.update=function(u,T){var A=this,L=T*this.player_.duration();this.getChild("timeTooltip").updateTime(u,T,L,function(){A.el_.style.left=u.width*T+"px";});},R;}(Wt)),cn=(ai.prototype.options_={children:["timeTooltip"]},Wt.registerComponent("MouseTimeDisplay",ai),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.setEventHandlers_(),u;}y()(R,k);var P=R.prototype;return P.setEventHandlers_=function(){var u=this;this.update_=er(this,this.update),this.update=Un(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(T){return u.enableInterval_(T);},this.disableIntervalHandler_=function(T){return u.disableInterval_(T);},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _.a&&"visibilityState"in _.a&&this.on(_.a,"visibilitychange",this.toggleVisibility_);},P.toggleVisibility_=function(u){_.a.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(u)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update());},P.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30));},P.disableInterval_=function(u){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&u&&u.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null);},P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")});},P.update=function(u){var T,A=this;if(_.a.visibilityState!=="hidden")return T=k.prototype.update.call(this),this.requestNamedAnimationFrame("SeekBar#update",function(){var L=A.player_.ended()?A.player_.duration():A.getCurrentTime_(),ie=A.player_.liveTracker,pe=A.player_.duration();
13ie&&ie.isLive()&&(pe=A.player_.liveTracker.liveCurrentTime()),A.percent_!==T&&(A.el_.setAttribute("aria-valuenow",(100*T).toFixed(2)),A.percent_=T),A.currentTime_===L&&A.duration_===pe||(A.el_.setAttribute("aria-valuetext",A.localize("progress bar timing: currentTime={1} duration={2}",[Fa(L,pe),Fa(pe,pe)],"{1} of {2}")),A.currentTime_=L,A.duration_=pe),A.bar&&A.bar.update(gt(A.el()),A.getProgress());}),T;},P.userSeek_=function(u){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(u);},P.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();},P.getPercent=function(){var u,T=this.getCurrentTime_(),A=this.player_.liveTracker;return A&&A.isLive()?(u=(T-A.seekableStart())/A.liveWindow(),A.atLiveEdge()&&(u=1)):u=T/this.player_.duration(),u;},P.handleMouseDown=function(u){ci(u)&&(u.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),k.prototype.handleMouseDown.call(this,u));},P.handleMouseMove=function(u,T){if(T===void 0&&(T=!1),ci(u)){if(T||this.player_.scrubbing()||this.player_.scrubbing(!0),T=this.calculateDistance(u),u=this.player_.liveTracker,u&&u.isLive()){if(.99<=T)return void u.seekToLiveEdge();var A,L=u.seekableStart(),ie=u.liveCurrentTime();if((A=(A=ie<=(A=L+T*u.liveWindow())?ie:A)<=L?L+.1:A)===1/0)return;}else(A=T*this.player_.duration())===this.player_.duration()&&(A-=.1);this.userSeek_(A);}},P.enable=function(){k.prototype.enable.call(this);var u=this.getChild("mouseTimeDisplay");u&&u.show();},P.disable=function(){k.prototype.disable.call(this);var u=this.getChild("mouseTimeDisplay");u&&u.hide();},P.handleMouseUp=function(u){k.prototype.handleMouseUp.call(this,u),u&&u.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Xo(this.player_.play()):this.update_();},P.stepForward=function(){this.userSeek_(this.player_.currentTime()+5);},P.stepBack=function(){this.userSeek_(this.player_.currentTime()-5);},P.handleAction=function(u){this.player_.paused()?this.player_.play():this.player_.pause();},P.handleKeyDown=function(u){var T,A=this.player_.liveTracker;x.a.isEventKey(u,"Space")||x.a.isEventKey(u,"Enter")?(u.preventDefault(),u.stopPropagation(),this.handleAction(u)):x.a.isEventKey(u,"Home")?(u.preventDefault(),u.stopPropagation(),this.userSeek_(0)):x.a.isEventKey(u,"End")?(u.preventDefault(),u.stopPropagation(),A&&A.isLive()?this.userSeek_(A.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(x()(u))?(u.preventDefault(),u.stopPropagation(),T=10*(x.a.codes[x()(u)]-x.a.codes[0])/100,A&&A.isLive()?this.userSeek_(A.seekableStart()+A.liveWindow()*T):this.userSeek_(this.player_.duration()*T)):x.a.isEventKey(u,"PgDn")?(u.preventDefault(),u.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):x.a.isEventKey(u,"PgUp")?(u.preventDefault(),u.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):k.prototype.handleKeyDown.call(this,u);},P.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _.a&&"visibilityState"in _.a&&this.off(_.a,"visibilitychange",this.toggleVisibility_),k.prototype.dispose.call(this);},R;}(Zi)),dn=(cn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Re||Y||cn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Wt.registerComponent("SeekBar",cn),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.handleMouseMove=Un(er(h()(A),A.handleMouseMove),30),A.throttledHandleMouseSeek=Un(er(h()(A),A.handleMouseSeek),30),A.handleMouseUpHandler_=function(L){return A.handleMouseUp(L);},A.handleMouseDownHandler_=function(L){return A.handleMouseDown(L);},A.enable(),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"});},P.handleMouseMove=function(u){var T,A,L,ie,pe=this.getChild("seekBar");pe&&(T=pe.getChild("playProgressBar"),A=pe.getChild("mouseTimeDisplay"),(T||A)&&(L=Ot(ie=pe.el()),ie=Mt(ie,u).x,ie=ec(ie,0,1),A&&A.update(L,ie),T&&T.update(L,pe.getProgress())));},P.handleMouseSeek=function(u){var T=this.getChild("seekBar");T&&T.handleMouseMove(u);},P.enabled=function(){return this.enabled_;},P.disable=function(){var u;
13this.children().forEach(function(T){return T.disable&&T.disable();}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing()&&(u=this.getChild("seekBar"),this.player_.scrubbing(!1),u.videoWasPlaying&&Xo(this.player_.play())));},P.enable=function(){this.children().forEach(function(u){return u.enable&&u.enable();}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0);},P.removeListenersAddedOnMousedownAndTouchstart=function(){var u=this.el_.ownerDocument;this.off(u,"mousemove",this.throttledHandleMouseSeek),this.off(u,"touchmove",this.throttledHandleMouseSeek),this.off(u,"mouseup",this.handleMouseUpHandler_),this.off(u,"touchend",this.handleMouseUpHandler_);},P.handleMouseDown=function(u){var T=this.el_.ownerDocument,A=this.getChild("seekBar");A&&A.handleMouseDown(u),this.on(T,"mousemove",this.throttledHandleMouseSeek),this.on(T,"touchmove",this.throttledHandleMouseSeek),this.on(T,"mouseup",this.handleMouseUpHandler_),this.on(T,"touchend",this.handleMouseUpHandler_);},P.handleMouseUp=function(u){var T=this.getChild("seekBar");T&&T.handleMouseUp(u),this.removeListenersAddedOnMousedownAndTouchstart();},R;}(Wt)),ai=(dn.prototype.options_={children:["seekBar"]},Wt.registerComponent("ProgressControl",dn),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on(u,["enterpictureinpicture","leavepictureinpicture"],function(L){return A.handlePictureInPictureChange(L);}),A.on(u,["disablepictureinpicturechanged","loadedmetadata"],function(L){return A.handlePictureInPictureEnabledChange(L);}),A.on(u,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){u.currentType().substring(0,5)==="audio"||u.audioPosterMode()||u.audioOnlyMode()?(u.isInPictureInPicture()&&u.exitPictureInPicture(),A.hide()):A.show();}),A.disable(),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-picture-in-picture-control "+k.prototype.buildCSSClass.call(this);},P.handlePictureInPictureEnabledChange=function(){_.a.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1?this.enable():this.disable();},P.handlePictureInPictureChange=function(u){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange();},P.handleClick=function(u){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture();},R;}(Zo)),cn=(ai.prototype.controlText_="Picture-in-Picture",Wt.registerComponent("PictureInPictureToggle",ai),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on(u,"fullscreenchange",function(L){return A.handleFullscreenChange(L);}),_.a[u.fsApi_.fullscreenEnabled]===!1&&A.disable(),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-fullscreen-control "+k.prototype.buildCSSClass.call(this);},P.handleFullscreenChange=function(u){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen");},P.handleClick=function(u){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen();},R;}(Zo)),dn=(cn.prototype.controlText_="Fullscreen",Wt.registerComponent("FullscreenToggle",cn),Wt.registerComponent("VolumeLevel",function(k){function R(){return k.apply(this,arguments)||this;}return y()(R,k),R.prototype.createEl=function(){var P=k.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return P.appendChild(k.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),P;},R;}(Wt)),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.update=Un(er(h()(u),u.update),30),u;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"});},P.update=function(u,T,A,L){if(!A){var A=gt(this.el_),pe=gt(this.player_.el()),T=u.width*T;if(!pe||!A)return;var ie=u.left-pe.left+T,T=u.width-T+(pe.right-u.right),pe=A.width/2;ie<pe?pe+=pe-ie:T<pe&&(pe=T),pe<0?pe=0:pe>A.width&&(pe=A.width),this.el_.style.right="-"+pe+"px";}this.write(L+"%");},P.write=function(u){nt(this.el_,u);},P.updateVolume=function(u,T,A,L,ie){var pe=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){pe.update(u,T,A,L.toFixed(0)),ie&&ie();});},R;}
13(Wt)),ai=(Wt.registerComponent("VolumeLevelTooltip",dn),function(k){function R(u,T){return u=k.call(this,u,T)||this,u.update=Un(er(h()(u),u.update),30),u;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"});},P.update=function(u,T,A){var L=this,ie=100*T;this.getChild("volumeLevelTooltip").updateVolume(u,T,A,ie,function(){A?L.el_.style.bottom=u.height*T+"px":L.el_.style.left=u.width*T+"px";});},R;}(Wt)),cn=(ai.prototype.options_={children:["volumeLevelTooltip"]},Wt.registerComponent("MouseVolumeLevelDisplay",ai),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on("slideractive",function(L){return A.updateLastVolume_(L);}),A.on(u,"volumechange",function(L){return A.updateARIAAttributes(L);}),u.ready(function(){return A.updateARIAAttributes();}),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"});},P.handleMouseDown=function(u){ci(u)&&k.prototype.handleMouseDown.call(this,u);},P.handleMouseMove=function(u){var T,A,L,ie=this.getChild("mouseVolumeLevelDisplay");ie&&(T=gt(L=this.el()),A=this.vertical(),L=Mt(L,u),L=A?L.y:L.x,L=ec(L,0,1),ie.update(T,L,A)),ci(u)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(u)));},P.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1);},P.getPercent=function(){return this.player_.muted()?0:this.player_.volume();},P.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1);},P.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1);},P.updateARIAAttributes=function(u){var T=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",T),this.el_.setAttribute("aria-valuetext",T+"%");},P.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume());},P.updateLastVolume_=function(){var u=this,T=this.player_.volume();this.one("sliderinactive",function(){u.player_.volume()===0&&u.player_.lastVolume_(T);});},R;}(Zi)),dn=(cn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Re||Y||cn.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),cn.prototype.playerEvent="volumechange",Wt.registerComponent("VolumeBar",cn),function(k){function R(u,T){var A,L,ie;return(T=T===void 0?{}:T).vertical=T.vertical||!1,T.volumeBar!==void 0&&!Q(T.volumeBar)||(T.volumeBar=T.volumeBar||{},T.volumeBar.vertical=T.vertical),A=k.call(this,u,T)||this,L=h()(A),(ie=u).tech_&&!ie.tech_.featuresVolumeControl&&L.addClass("vjs-hidden"),L.on(ie,"loadstart",function(){ie.tech_.featuresVolumeControl?L.removeClass("vjs-hidden"):L.addClass("vjs-hidden");}),A.throttledHandleMouseMove=Un(er(h()(A),A.handleMouseMove),30),A.handleMouseUpHandler_=function(pe){return A.handleMouseUp(pe);},A.on("mousedown",function(pe){return A.handleMouseDown(pe);}),A.on("touchstart",function(pe){return A.handleMouseDown(pe);}),A.on("mousemove",function(pe){return A.handleMouseMove(pe);}),A.on(A.volumeBar,["focus","slideractive"],function(){A.volumeBar.addClass("vjs-slider-active"),A.addClass("vjs-slider-active"),A.trigger("slideractive");}),A.on(A.volumeBar,["blur","sliderinactive"],function(){A.volumeBar.removeClass("vjs-slider-active"),A.removeClass("vjs-slider-active"),A.trigger("sliderinactive");}),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u="vjs-volume-horizontal";return this.options_.vertical&&(u="vjs-volume-vertical"),k.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+u});},P.handleMouseDown=function(u){var T=this.el_.ownerDocument;this.on(T,"mousemove",this.throttledHandleMouseMove),this.on(T,"touchmove",this.throttledHandleMouseMove),this.on(T,"mouseup",this.handleMouseUpHandler_),this.on(T,"touchend",this.handleMouseUpHandler_);},P.handleMouseUp=function(u){var T=this.el_.ownerDocument;this.off(T,"mousemove",this.throttledHandleMouseMove),this.off(T,"touchmove",this.throttledHandleMouseMove),this.off(T,"mouseup",this.handleMouseUpHandler_),this.off(T,"touchend",this.handleMouseUpHandler_);},P.handleMouseMove=function(u){this.volumeBar.handleMouseMove(u);},R;}(Wt)),ai=(dn.prototype.options_={children:["volumeBar"]}
13,Wt.registerComponent("VolumeControl",dn),function(k){function R(u,T){var A,L,ie=k.call(this,u,T)||this;return A=h()(ie),(L=u).tech_&&!L.tech_.featuresMuteControl&&A.addClass("vjs-hidden"),A.on(L,"loadstart",function(){L.tech_.featuresMuteControl?A.removeClass("vjs-hidden"):A.addClass("vjs-hidden");}),ie.on(u,["loadstart","volumechange"],function(pe){return ie.update(pe);}),ie;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-mute-control "+k.prototype.buildCSSClass.call(this);},P.handleClick=function(u){var T=this.player_.volume(),A=this.player_.lastVolume_();T===0?(this.player_.volume(A<.1?.1:A),this.player_.muted(!1)):this.player_.muted(!this.player_.muted());},P.update=function(u){this.updateIcon_(),this.updateControlText_();},P.updateIcon_=function(){var u=this.player_.volume(),T=3;Re&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),u===0||this.player_.muted()?T=0:u<.33?T=1:u<.67&&(T=2);for(var A=0;A<4;A++)Et(this.el_,"vjs-vol-"+A);ht(this.el_,"vjs-vol-"+T);},P.updateControlText_=function(){var u=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==u&&this.controlText(u);},R;}(Zo)),Zi=(ai.prototype.controlText_="Mute",Wt.registerComponent("MuteToggle",ai),function(k){function R(u,T){var A;return(T=T===void 0?{}:T).inline!==void 0?T.inline=T.inline:T.inline=!0,T.volumeControl!==void 0&&!Q(T.volumeControl)||(T.volumeControl=T.volumeControl||{},T.volumeControl.vertical=!T.inline),(A=k.call(this,u,T)||this).handleKeyPressHandler_=function(L){return A.handleKeyPress(L);},A.on(u,["loadstart"],function(L){return A.volumePanelState_(L);}),A.on(A.muteToggle,"keyup",function(L){return A.handleKeyPress(L);}),A.on(A.volumeControl,"keyup",function(L){return A.handleVolumeControlKeyUp(L);}),A.on("keydown",function(L){return A.handleKeyPress(L);}),A.on("mouseover",function(L){return A.handleMouseOver(L);}),A.on("mouseout",function(L){return A.handleMouseOut(L);}),A.on(A.volumeControl,["slideractive"],A.sliderActive_),A.on(A.volumeControl,["sliderinactive"],A.sliderInactive_),A;}y()(R,k);var P=R.prototype;return P.sliderActive_=function(){this.addClass("vjs-slider-active");},P.sliderInactive_=function(){this.removeClass("vjs-slider-active");},P.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only");},P.createEl=function(){var u="vjs-volume-panel-horizontal";return this.options_.inline||(u="vjs-volume-panel-vertical"),k.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+u});},P.dispose=function(){this.handleMouseOut(),k.prototype.dispose.call(this);},P.handleVolumeControlKeyUp=function(u){x.a.isEventKey(u,"Esc")&&this.muteToggle.focus();},P.handleMouseOver=function(u){this.addClass("vjs-hover"),pn(_.a,"keyup",this.handleKeyPressHandler_);},P.handleMouseOut=function(u){this.removeClass("vjs-hover"),yn(_.a,"keyup",this.handleKeyPressHandler_);},P.handleKeyPress=function(u){x.a.isEventKey(u,"Esc")&&this.handleMouseOut();},R;}(Wt)),Ou=(Zi.prototype.options_={children:["muteToggle","volumeControl"]},Wt.registerComponent("VolumePanel",Zi),function(k){function R(u,T){var A=k.call(this,u,T)||this;return T&&(A.menuButton_=T.menuButton),A.focusedChild_=-1,A.on("keydown",function(L){return A.handleKeyDown(L);}),A.boundHandleBlur_=function(L){return A.handleBlur(L);},A.boundHandleTapClick_=function(L){return A.handleTapClick(L);},A;}y()(R,k);var P=R.prototype;return P.addEventListenerForItem=function(u){u instanceof Wt&&(this.on(u,"blur",this.boundHandleBlur_),this.on(u,["tap","click"],this.boundHandleTapClick_));},P.removeEventListenerForItem=function(u){u instanceof Wt&&(this.off(u,"blur",this.boundHandleBlur_),this.off(u,["tap","click"],this.boundHandleTapClick_));},P.removeChild=function(u){typeof u=="string"&&(u=this.getChild(u)),this.removeEventListenerForItem(u),k.prototype.removeChild.call(this,u);},P.addItem=function(u){u=this.addChild(u),u&&this.addEventListenerForItem(u);},P.createEl=function(){var u=this.options_.contentElType||"ul",u=(this.contentEl_=Be(u,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),k.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"}));return u.appendChild(this.contentEl_),pn(u,"click",function(T){T.preventDefault(),T.stopImmediatePropagation();}),u;},P.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,k.prototype.dispose.call(this);},P.handleBlur=function(u){var T=u.relatedTarget||_.a.activeElement;this.children().some(function(A){return A.el()===T;})||(u=this.menuButton_)&&u.buttonPressed_&&T!==u.el().firstChild&&u.unpressButton();},P.handleTapClick=function(u){var T;this.menuButton_&&(this.menuButton_.unpressButton(),T=this.children(),Array.isArray(T)&&(T=T.filter(function(A){return A.el()===u.target;})[0])&&T.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus());},P.handleKeyDown=function(u){x.a.isEventKey(u,"Left")||x.a.isEventKey(u,"Down")?(u.preventDefault(),u.stopPropagation(),this.stepForward()):(x.a.isEventKey(u,"Right")||x.a.isEventKey(u,"Up"))&&(u.preventDefault(),u.stopPropagation(),this.stepBack());},P.stepForward=function(){var u=0;this.focusedChild_!==void 0&&(u=this.focusedChild_+1),this.focus(u);},P.stepBack=function(){var u=0;this.focusedChild_!==void 0&&(u=this.focusedChild_-1),this.focus(u);}
13,P.focus=function(u){u===void 0&&(u=0);var T=this.children().slice();T.length&&T[0].hasClass("vjs-menu-title")&&T.shift(),0<T.length&&(u<0?u=0:u>=T.length&&(u=T.length-1),T[this.focusedChild_=u].el_.focus());},R;}(Wt)),cn=(Wt.registerComponent("Menu",Ou),function(k){function R(ie,T){function A(pe){return L.handleClick(pe);}(L=k.call(this,ie,T=T===void 0?{}:T)||this).menuButton_=new Zo(ie,T),L.menuButton_.controlText(L.controlText_),L.menuButton_.el_.setAttribute("aria-haspopup","true");var L,ie=Zo.prototype.buildCSSClass();return L.menuButton_.el_.className=L.buildCSSClass()+" "+ie,L.menuButton_.removeClass("vjs-control"),L.addChild(L.menuButton_),L.update(),L.enabled_=!0,L.handleMenuKeyUp_=function(pe){return L.handleMenuKeyUp(pe);},L.on(L.menuButton_,"tap",A),L.on(L.menuButton_,"click",A),L.on(L.menuButton_,"keydown",function(pe){return L.handleKeyDown(pe);}),L.on(L.menuButton_,"mouseenter",function(){L.addClass("vjs-hover"),L.menu.show(),pn(_.a,"keyup",L.handleMenuKeyUp_);}),L.on("mouseleave",function(pe){return L.handleMouseLeave(pe);}),L.on("keydown",function(pe){return L.handleSubmenuKeyDown(pe);}),L;}y()(R,k);var P=R.prototype;return P.update=function(){var u=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=u,this.addChild(u),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"));},P.createMenu=function(){var u,T=new Ou(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(u=Be("li",{className:"vjs-menu-title",textContent:fr(this.options_.title),tabIndex:-1}),u=new Wt(this.player_,{el:u}),T.addItem(u)),this.items=this.createItems(),this.items)for(var A=0;A<this.items.length;A++)T.addItem(this.items[A]);return T;},P.createItems=function(){},P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{});},P.buildWrapperCSSClass=function(){var u="vjs-menu-button",T=(this.options_.inline===!0?u+="-inline":u+="-popup",Zo.prototype.buildCSSClass());return"vjs-menu-button "+u+" "+T+" "+k.prototype.buildCSSClass.call(this);},P.buildCSSClass=function(){var u="vjs-menu-button";return this.options_.inline===!0?u+="-inline":u+="-popup","vjs-menu-button "+u+" "+k.prototype.buildCSSClass.call(this);},P.controlText=function(u,T){return T===void 0&&(T=this.menuButton_.el()),this.menuButton_.controlText(u,T);},P.dispose=function(){this.handleMouseLeave(),k.prototype.dispose.call(this);},P.handleClick=function(u){this.buttonPressed_?this.unpressButton():this.pressButton();},P.handleMouseLeave=function(u){this.removeClass("vjs-hover"),yn(_.a,"keyup",this.handleMenuKeyUp_);},P.focus=function(){this.menuButton_.focus();},P.blur=function(){this.menuButton_.blur();},P.handleKeyDown=function(u){x.a.isEventKey(u,"Esc")||x.a.isEventKey(u,"Tab")?(this.buttonPressed_&&this.unpressButton(),x.a.isEventKey(u,"Tab")||(u.preventDefault(),this.menuButton_.focus())):!x.a.isEventKey(u,"Up")&&!x.a.isEventKey(u,"Down")||this.buttonPressed_||(u.preventDefault(),this.pressButton());},P.handleMenuKeyUp=function(u){(x.a.isEventKey(u,"Esc")||x.a.isEventKey(u,"Tab"))&&this.removeClass("vjs-hover");},P.handleSubmenuKeyPress=function(u){this.handleSubmenuKeyDown(u);},P.handleSubmenuKeyDown=function(u){(x.a.isEventKey(u,"Esc")||x.a.isEventKey(u,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),x.a.isEventKey(u,"Tab")||(u.preventDefault(),this.menuButton_.focus()));},P.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Re&&De()||this.menu.focus());},P.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"));},P.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable();},P.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable();},R;}(Wt)),dn=(Wt.registerComponent("MenuButton",cn),function(k){function R(A,u){var T=u.tracks,A=k.call(this,A,u)||this;if(A.items.length<=1&&A.hide(),!T)return h()(A);var L=er(h()(A),A.update);return T.addEventListener("removetrack",L),T.addEventListener("addtrack",L),T.addEventListener("labelchange",L),A.player_.on("ready",L),A.player_.on("dispose",function(){T.removeEventListener("removetrack",L),T.removeEventListener("addtrack",L),T.removeEventListener("labelchange",L);}),A;}return y()(R,k),R;}(cn)),_s=(Wt.registerComponent("TrackButton",dn),["Tab","Esc","Up","Down","Right","Left"]),ai=function(k){function R(u,T){return u=k.call(this,u,T)||this,u.selectable=T.selectable,u.isSelected_=T.selected||!1,u.multiSelectable=T.multiSelectable,u.selected(u.isSelected_),u.selectable?u.multiSelectable?u.el_.setAttribute("role","menuitemcheckbox"):u.el_.setAttribute("role","menuitemradio"):u.el_.setAttribute("role","menuitem"),u;}y()(R,k);var P=R.prototype;
13return P.createEl=function(u,T,A){return this.nonIconControl=!0,T=k.prototype.createEl.call(this,"li",J({className:"vjs-menu-item",tabIndex:-1},T),A),T.replaceChild(Be("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),T.querySelector(".vjs-icon-placeholder")),T;},P.handleKeyDown=function(u){_s.some(function(T){return x.a.isEventKey(u,T);})||k.prototype.handleKeyDown.call(this,u);},P.handleClick=function(u){this.selected(!0);},P.selected=function(u){this.selectable&&(u?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1));},R;}(me),Qo=(Wt.registerComponent("MenuItem",ai),function(k){function R(u,T){function A(){for(var je=arguments.length,Fe=new Array(je),He=0;He<je;He++)Fe[He]=arguments[He];ie.handleTracksChange.apply(h()(ie),Fe);}function L(){for(var je=arguments.length,Fe=new Array(je),He=0;He<je;He++)Fe[He]=arguments[He];ie.handleSelectedLanguageChange.apply(h()(ie),Fe);}var ie,pe,Te=T.track,Ae=u.textTracks();return T.label=Te.label||Te.language||"Unknown",T.selected=Te.mode==="showing",(ie=k.call(this,u,T)||this).track=Te,ie.kinds=(T.kinds||[T.kind||ie.track.kind]).filter(Boolean),u.on(["loadstart","texttrackchange"],A),Ae.addEventListener("change",A),Ae.addEventListener("selectedlanguagechange",L),ie.on("dispose",function(){u.off(["loadstart","texttrackchange"],A),Ae.removeEventListener("change",A),Ae.removeEventListener("selectedlanguagechange",L);}),Ae.onchange===void 0&&ie.on(["tap","click"],function(){if(typeof o.a.Event!="object")try{pe=new o.a.Event("change");}catch{}pe||(pe=_.a.createEvent("Event")).initEvent("change",!0,!0),Ae.dispatchEvent(pe);}),ie.handleTracksChange(),ie;}y()(R,k);var P=R.prototype;return P.handleClick=function(u){var T=this.track,A=this.player_.textTracks();if(k.prototype.handleClick.call(this,u),A)for(var L=0;L<A.length;L++){var ie=A[L];this.kinds.indexOf(ie.kind)!==-1&&(ie===T?ie.mode!=="showing"&&(ie.mode="showing"):ie.mode!=="disabled"&&(ie.mode="disabled"));}},P.handleTracksChange=function(u){var T=this.track.mode==="showing";T!==this.isSelected_&&this.selected(T);},P.handleSelectedLanguageChange=function(u){var T;this.track.mode!=="showing"||(T=this.player_.cache_.selectedLanguage)&&T.enabled&&T.language===this.track.language&&T.kind!==this.track.kind||(this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind});},P.dispose=function(){this.track=null,k.prototype.dispose.call(this);},R;}(ai)),wl=(Wt.registerComponent("TextTrackMenuItem",Qo),function(k){function R(u,T){return T.track={player:u,kind:T.kind,kinds:T.kinds,default:!1,mode:"disabled"},T.kinds||(T.kinds=[T.kind]),T.label?T.track.label=T.label:T.track.label=T.kinds.join(" and ")+" off",T.selectable=!0,T.multiSelectable=!1,k.call(this,u,T)||this;}y()(R,k);var P=R.prototype;return P.handleTracksChange=function(u){for(var T=this.player().textTracks(),A=!0,L=0,ie=T.length;L<ie;L++){var pe=T[L];if(-1<this.options_.kinds.indexOf(pe.kind)&&pe.mode==="showing"){A=!1;break;}}A!==this.isSelected_&&this.selected(A);},P.handleSelectedLanguageChange=function(u){for(var T=this.player().textTracks(),A=!0,L=0,ie=T.length;L<ie;L++){var pe=T[L];if(-1<["captions","descriptions","subtitles"].indexOf(pe.kind)&&pe.mode==="showing"){A=!1;break;}}A&&(this.player_.cache_.selectedLanguage={enabled:!1});},R;}(Qo)),Zi=(Wt.registerComponent("OffTextTrackMenuItem",wl),function(k){function R(P,u){return(u=u===void 0?{}:u).tracks=P.textTracks(),k.call(this,P,u)||this;}return y()(R,k),R.prototype.createItems=function(P,u){u===void 0&&(u=Qo),this.label_&&(T=this.label_+" off"),(P=P===void 0?[]:P).push(new wl(this.player_,{kinds:this.kinds_,kind:this.kind_,label:T})),this.hideThreshold_+=1;var T,A=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var L=0;L<A.length;L++){var ie,pe=A[L];-1<this.kinds_.indexOf(pe.kind)&&((ie=new u(this.player_,{track:pe,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1})).addClass("vjs-"+pe.kind+"-menu-item"),P.push(ie));}return P;},R;}(dn)),Sd=(Wt.registerComponent("TextTrackButton",Zi),function(k){function R(P,u){var T=u.track,A=u.cue,L=P.currentTime();return u.selectable=!0,u.multiSelectable=!1,u.label=A.text,u.selected=A.startTime<=L&&L<A.endTime,(L=k.call(this,P,u)||this).track=T,L.cue=A,L;}return y()(R,k),R.prototype.handleClick=function(P){k.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime);},R;}(ai)),me=(Wt.registerComponent("ChaptersTrackMenuItem",Sd),function(k){function R(u,T,A){var L=k.call(this,u,T,A)||this;
13return L.selectCurrentItem_=function(){L.items.forEach(function(ie){ie.selected(L.track_.activeCues[0]===ie.cue);});},L;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-chapters-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-chapters-button "+k.prototype.buildWrapperCSSClass.call(this);},P.update=function(u){u&&u.track&&u.track.kind!=="chapters"||((u=this.findChaptersTrack())!==this.track_?(this.setTrack(u),k.prototype.update.call(this)):(!this.items||u&&u.cues&&u.cues.length!==this.items.length)&&k.prototype.update.call(this));},P.setTrack=function(u){var T;this.track_!==u&&(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_&&((T=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&T.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null),this.track_=u,this.track_&&(this.track_.mode="hidden",(T=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&T.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)));}
13,P.findChaptersTrack=function(){for(var u=this.player_.textTracks()||[],T=u.length-1;0<=T;T--){var A=u[T];if(A.kind===this.kind_)return A;}},P.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(fr(this.kind_));},P.createMenu=function(){return this.options_.title=this.getMenuCaption(),k.prototype.createMenu.call(this);},P.createItems=function(){var u=[];if(this.track_){var T=this.track_.cues;if(T)for(var A=0,L=T.length;A<L;A++){var ie=T[A],ie=new Sd(this.player_,{track:this.track_,cue:ie});u.push(ie);}}return u;},R;}(Zi)),me=(me.prototype.kind_="chapters",me.prototype.controlText_="Chapters",Wt.registerComponent("ChaptersButton",me),function(k){function R(u,L,A){var L=k.call(this,u,L,A)||this,ie=u.textTracks(),pe=er(h()(L),L.handleTracksChange);return ie.addEventListener("change",pe),L.on("dispose",function(){ie.removeEventListener("change",pe);}),L;}y()(R,k);var P=R.prototype;return P.handleTracksChange=function(u){for(var T=this.player().textTracks(),A=!1,L=0,ie=T.length;L<ie;L++){var pe=T[L];if(pe.kind!==this.kind_&&pe.mode==="showing"){A=!0;break;}}A?this.disable():this.enable();},P.buildCSSClass=function(){return"vjs-descriptions-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+k.prototype.buildWrapperCSSClass.call(this);},R;}(Zi)),me=(me.prototype.kind_="descriptions",me.prototype.controlText_="Descriptions",Wt.registerComponent("DescriptionsButton",me),function(k){function R(u,T,A){return k.call(this,u,T,A)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-subtitles-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+k.prototype.buildWrapperCSSClass.call(this);},R;}(Zi)),tc=(me.prototype.kind_="subtitles",me.prototype.controlText_="Subtitles",Wt.registerComponent("SubtitlesButton",me),function(k){function R(P,u){return u.track={player:P,kind:u.kind,label:u.kind+" settings",selectable:!1,default:!1,mode:"disabled"},u.selectable=!1,u.name="CaptionSettingsMenuItem",(P=k.call(this,P,u)||this).addClass("vjs-texttrack-settings"),P.controlText(", opens "+u.kind+" settings dialog"),P;}return y()(R,k),R.prototype.handleClick=function(P){this.player().getChild("textTrackSettings").open();},R;}(Qo)),me=(Wt.registerComponent("CaptionSettingsMenuItem",tc),function(k){function R(u,T,A){return k.call(this,u,T,A)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-captions-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-captions-button "+k.prototype.buildWrapperCSSClass.call(this);},P.createItems=function(){var u=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(u.push(new tc(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),k.prototype.createItems.call(this,u);},R;}(Zi)),wd=(me.prototype.kind_="captions",me.prototype.controlText_="Captions",Wt.registerComponent("CaptionsButton",me),function(k){function R(){return k.apply(this,arguments)||this;}return y()(R,k),R.prototype.createEl=function(P,u,T){return P=k.prototype.createEl.call(this,P,u,T),u=P.querySelector(".vjs-menu-item-text"),this.options_.track.kind==="captions"&&(u.appendChild(Be("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(Be("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),P;},R;}(Qo)),me=(Wt.registerComponent("SubsCapsMenuItem",wd),function(k){function R(u,T){return(u=k.call(this,u,T=T===void 0?{}:T)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(u.player_.language_)&&(u.label_="captions"),u.menuButton_.controlText(fr(u.label_)),u;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-subs-caps-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+k.prototype.buildWrapperCSSClass.call(this);},P.createItems=function(){var u=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(u.pu
13sh(new tc(this.player_,{kind:this.label_})),this.hideThreshold_+=1),u=k.prototype.createItems.call(this,u,wd);},R;}(Zi)),Pu=(me.prototype.kinds_=["captions","subtitles"],me.prototype.controlText_="Subtitles",Wt.registerComponent("SubsCapsButton",me),function(k){function R(u,T){function A(){for(var Te=arguments.length,Ae=new Array(Te),je=0;je<Te;je++)Ae[je]=arguments[je];L.handleTracksChange.apply(h()(L),Ae);}var L,ie=T.track,pe=u.audioTracks();return T.label=ie.label||ie.language||"Unknown",T.selected=ie.enabled,(L=k.call(this,u,T)||this).track=ie,L.addClass("vjs-"+ie.kind+"-menu-item"),pe.addEventListener("change",A),L.on("dispose",function(){pe.removeEventListener("change",A);}),L;}y()(R,k);var P=R.prototype;return P.createEl=function(u,T,A){return u=k.prototype.createEl.call(this,u,T,A),T=u.querySelector(".vjs-menu-item-text"),this.options_.track.kind==="main-desc"&&(T.appendChild(Be("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),T.appendChild(Be("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),u;},P.handleClick=function(u){if(k.prototype.handleClick.call(this,u),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var T=this.player_.audioTracks(),A=0;A<T.length;A++){var L=T[A];L!==this.track&&(L.enabled=L===this.track);}},P.handleTracksChange=function(u){this.selected(this.track.enabled);},R;}(ai)),Zi=(Wt.registerComponent("AudioTrackMenuItem",Pu),function(k){function R(u,T){return(T=T===void 0?{}:T).tracks=u.audioTracks(),k.call(this,u,T)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-audio-button "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-audio-button "+k.prototype.buildWrapperCSSClass.call(this);},P.createItems=function(u){u===void 0&&(u=[]),this.hideThreshold_=1;for(var T=this.player_.audioTracks(),A=0;A<T.length;A++){var L=T[A];u.push(new Pu(this.player_,{track:L,selectable:!0,multiSelectable:!1}));}return u;},R;}(dn)),Iu=(Zi.prototype.controlText_="Audio Track",Wt.registerComponent("AudioTrackButton",Zi),function(k){function R(u,T){var A,L=T.rate,ie=parseFloat(L,10);return T.label=L,T.selected=ie===u.playbackRate(),T.selectable=!0,T.multiSelectable=!1,(A=k.call(this,u,T)||this).label=L,A.rate=ie,A.on(u,"ratechange",function(pe){return A.update(pe);}),A;}y()(R,k);var P=R.prototype;return P.handleClick=function(u){k.prototype.handleClick.call(this),this.player().playbackRate(this.rate);},P.update=function(u){this.selected(this.player().playbackRate()===this.rate);},R;}(ai)),me=(Iu.prototype.contentElType="button",Wt.registerComponent("PlaybackRateMenuItem",Iu),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.menuButton_.el_.setAttribute("aria-describedby",A.labelElId_),A.updateVisibility(),A.updateLabel(),A.on(u,"loadstart",function(L){return A.updateVisibility(L);}),A.on(u,"ratechange",function(L){return A.updateLabel(L);}),A.on(u,"playbackrateschange",function(L){return A.handlePlaybackRateschange(L);}),A;}y()(R,k);var P=R.prototype;return P.createEl=function(){var u=k.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Be("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),u.appendChild(this.labelEl_),u;},P.dispose=function(){this.labelEl_=null,k.prototype.dispose.call(this);},P.buildCSSClass=function(){return"vjs-playback-rate "+k.prototype.buildCSSClass.call(this);},P.buildWrapperCSSClass=function(){return"vjs-playback-rate "+k.prototype.buildWrapperCSSClass.call(this);},P.createItems=function(){for(var u=this.playbackRates(),T=[],A=u.length-1;0<=A;A--)T.push(new Iu(this.player(),{rate:u[A]+"x"}));return T;},P.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate());},P.handleClick=function(u){var A=this.player().playbackRate(),T=this.playbackRates(),A=(T.indexOf(A)+1)%T.length;this.player().playbackRate(T[A]);},P.handlePlaybackRateschange=function(u){this.update();},P.playbackRates=function(){var u=this.player();return u.playbackRates&&u.playbackRates()||[];},P.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length;},P.updateVisibility=function(u){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden");},P.updateLabel=function(u){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x");},R;}(cn)),dn=(me.prototype.controlText_="Playback Rate",Wt.registerComponent("PlaybackRateMenuButton",me),function(k){function R(){return k.apply(this,arguments)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-spacer "+k.prototype.buildCSSClass.call(this);},P.createEl=function(u,T,A){return u===void 0&&(u="div"),A===void 0&&(A={}),(T=T===void 0?{}:T).className||(T.className=this.buildCSSClass()),k.prototype.createEl.call(this,u,T,A);},R;}(Wt)),Zi=(Wt.registerComponent("Spacer",dn),function(k){function R(){return k.apply(this,arguments)||this;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-custom-control-spacer "+k.prototype.buildCSSClass.call(this);},P.createEl=function(){return k.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xA0"});},R;}(dn)),ai=(Wt.registerComponent("CustomControlSpacer",Zi),function(k){function R(){return k.apply(this,arguments)||this;}return y()(R,k),R.prototype.createEl=function(){return k.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"});},R;}(Wt)),cn=(ai.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in _.a&&ai.prototype.options_.children.splice(ai.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Wt.registerComponent("ControlBar",ai),function(k){function R(u,T){var A=k.call(this,u,T)||this;return A.on(u,"error",function(L){return A.open(L);}),A;}y()(R,k);var P=R.prototype;return P.buildCSSClass=function(){return"vjs-error-display "+k.prototype.buildCSSClass.call(this);},P.content=function(){var u=this.player().error();return u?this.localize(u.message):"";},R;}(ms)),Bs=(cn.prototype.options_=E()({}
13,ms.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Wt.registerComponent("ErrorDisplay",cn),"vjs-text-track-settings"),me=["#000","Black"],dn=["#00F","Blue"],Zi=["#0FF","Cyan"],ai=["#0F0","Green"],cn=["#F0F","Magenta"],Ie=["#F00","Red"],ac=["#FFF","White"],El=["#FF0","Yellow"],ku=["1","Opaque"],Au=["0.5","Semi-Transparent"],Ed=["0","Transparent"],bs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[me,ac,Ie,ai,dn,El,cn,Zi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ku,Au,Ed]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ac,me,Ie,ai,dn,El,cn,Zi]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(k){return k==="1.00"?null:Number(k);}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ku,Au]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Ed,Au,ku]}};function xd(k,R){if((k=R?R(k):k)&&k!=="none")return k;}bs.windowColor.options=bs.backgroundColor.options;function Td(k){var R,P,u,T=k.el();T.resetSourceWatch_||(R={},P=Je(k),u=function(A){return function(){for(var L=arguments.length,ie=new Array(L),pe=0;pe<L;pe++)ie[pe]=arguments[pe];var Te=A.apply(T,ie);return Me(k),Te;};},["append","appendChild","insertAdjacentHTML"].forEach(function(A){T[A]&&(R[A]=T[A],T[A]=u(R[A]));}),Object.defineProperty(T,"innerHTML",Kn(P,{set:u(P.set)})),T.resetSourceWatch_=function(){T.resetSourceWatch_=null,Object.keys(R).forEach(function(A){T[A]=R[A];}),Object.defineProperty(T,"innerHTML",P);},k.one("sourceset",T.resetSourceWatch_));}function lf(k){var R,P,u,T;k.featuresSourceset&&!(R=k.el()).resetSourceset_&&(P=ze([k.el(),o.a.HTMLMediaElement.prototype,ft],"src"),u=R.setAttribute,T=R.load,Object.defineProperty(R,"src",Kn(P,{set:function(A){return A=P.set.call(R,A),k.triggerSourceset(R.src),A;}})),R.setAttribute=function(A,L){return L=u.call(R,A,L),/src/i.test(A)&&k.triggerSourceset(R.src),L;},R.load=function(){var A=T.call(R);return Me(k)||(k.triggerSourceset(""),Td(k)),A;},R.currentSrc?k.triggerSourceset(R.currentSrc):Me(k)||Td(k),R.resetSourceset_=function(){R.resetSourceset_=null,R.load=T,R.setAttribute=u,Object.defineProperty(R,"src",P),R.resetSourceWatch_&&R.resetSourceWatch_();});}function Mu(k,R,P,u){function T(L){return Object.defineProperty(k,R,{value:L,enumerable:!0,writable:!0});}var A={configurable:!0,enumerable:!0,get:function(){var L=P();return T(L),L;}};return(u=u===void 0?!0:u)&&(A.set=T),Object.defineProperty(k,R,A);}function ic(k){return di.hasOwnProperty(k);}function nc(k){return ic(k)?di[k]:void 0;}function Cd(k,R){k[fi]=k[fi]||{},k[fi][R]=!0;}function rc(k,R,P){P=(P?"before":"")+"pluginsetup",k.trigger(P,R),k.trigger(P+":"+R.name,R);}function cf(k,R){function P(){rc(this,{name:k,plugin:R,instance:null},!0);var u=R.apply(this,arguments);return Cd(this,k),rc(this,{name:k,plugin:R,instance:u}),u;}return Object.keys(R).forEach(function(u){P[u]=R[u];}),P;}function Od(k,R){return R.prototype.name=k,function(){rc(this,{name:k,plugin:R,instance:null},!0);for(var P=arguments.length,u=new Array(P),T=0;T<P;T++)u[T]=arguments[T];var A=d()(R,[this].concat(u));return this[k]=function(){return A;},rc(this,A.getEventHash()),A;};}function Pd(k){return k.indexOf("#")===0?k.slice(1):k;}var oc,ac=function(k){function R(u,T){var A;return T.temporary=!1,(A=k.call(this,u,T)||this).updateDisplay=A.updateDisplay.bind(h()(A)),A.fill(),A.hasBeenOpened_=A.hasBeenFilled_=!0,A.endDialog=Be("p",{className:"vjs-control-text",textContent:A.localize("End of dialog window.")}),A.el().appendChild(A.endDialog),A.setDefaults(),T.persistTextTrackSettings===void 0&&(A.options_.persistTextTrackSettings=A.options_.playerOptions.persistTextTrackSettings),A.on(A.$(".vjs-done-button"),"click",function(){A.saveSettings(),A.close();}),A.on(A.$(".vjs-default-button"),"click",function(){A.setDefaults(),A.updateDisplay();}),q(bs,function(L){A.on(A.$(L.selector),"change",A.updateDisplay);}),A.options_.persistTextTrackSettings&&A.restoreSettings(),A;}y()(R,k);var P=R.prototype;return P.dispose=function(){this.endDialog=null,k.prototype.dispose.call(this);},P.createElSelect_=function(ie,T,A){var L=this,ie=(T===void 0&&(T=""),A===void 0&&(A="label"),bs[ie]),pe
13=ie.id.replace("%s",this.id_),Te=[T,pe].join(" ").trim();return["<"+A+' id="'+pe+'" class="'+(A==="label"?"vjs-label":"")+'">',this.localize(ie.label),"</"+A+">",'<select aria-labelledby="'+Te+'">'].concat(ie.options.map(function(Ae){var je=pe+"-"+Ae[1].replace(/\W+/g,"");return['<option id="'+je+'" value="'+Ae[0]+'" ','aria-labelledby="'+Te+" "+je+'">',L.localize(Ae[1]),"</option>"].join("");})).concat("</select>").join("");},P.createElFgColor_=function(){var u="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",u),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",u),"</span>","</fieldset>"].join("");},P.createElBgColor_=function(){var u="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",u),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",u),"</span>","</fieldset>"].join("");},P.createElWinColor_=function(){var u="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",u),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",u),"</span>","</fieldset>"].join("");},P.createElColors_=function(){return Be("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")});},P.createElFont_=function(){return Be("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")});},P.createElControls_=function(){var u=this.localize("restore all settings to the default values");return Be("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+u+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+u+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")});},P.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()];},P.label=function(){return this.localize("Caption Settings Dialog");},P.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.");},P.buildCSSClass=function(){return k.prototype.buildCSSClass.call(this)+" vjs-text-track-settings";},P.getValues=function(){var u,T,A,L=this;return T=function(ie,pe,Te){Ae=L.$(pe.selector),pe=pe.parser;var Ae=xd(Ae.options[Ae.options.selectedIndex].value,pe);return Ae!==void 0&&(ie[Te]=Ae),ie;},(A={})===void 0&&(A=0),U(u=bs).reduce(function(ie,pe){return T(ie,u[pe],pe);},A);},P.setValues=function(u){var T=this;q(bs,function(A,L){var ie=T.$(A.selector),pe=u[L],Te=A.parser;if(pe){for(var Ae=0;Ae<ie.options.length;Ae++)if(xd(ie.options[Ae].value,Te)===pe){ie.selectedIndex=Ae;break;}}});},P.setDefaults=function(){var u=this;q(bs,function(T){var A=T.hasOwnProperty("default")?T.default:0;u.$(T.selector).selectedIndex=A;});},P.restoreSettings=function(){var u;try{u=JSON.parse(o.a.localStorage.getItem(Bs));}catch(T){Z.warn(T);}u&&this.setValues(u);},P.saveSettings=function(){if(this.options_.persistTextTrackSettings){var u=this.getValues();try{Object.keys(u).length?o.a.localStorage.setItem(Bs,JSON.stringify(u)):o.a.localStorage.removeItem(Bs);}catch(T){Z.warn(T);}}},P.updateDisplay=function(){var u=this.player_.getChild("textTrackDisplay");u&&u.updateDisplay();},P.conditionalBlur_=function(){this.previouslyActiveEl_=null;var T=this.player_.controlBar,u=T&&T.subsCapsButton,T=T&&T.captionsButton;u?u.focus():T&&T.focus();},R;}(ms),me=(Wt.registerComponent("TextTrackSettings",ac),function(k){function R(u,T){var A=T.ResizeObserver||o.a.ResizeObserver,L=Kn({createEl:!(A=T.ResizeObserver===null?!1:A),reportTouchActivity:!1},T),ie=k.call(this,u,L)||this;return ie.ResizeObserver=T.ResizeObserver||o.a.ResizeObserver,ie.loadListener_=null,ie.resizeObserver_=null,ie.debouncedHandler_=ho(function(){ie.resizeHandler();},100,!1,h()(ie)),A?(ie.resizeObserver_=new ie.ResizeObserver(ie.debouncedHandler_),ie.resizeObserver_.observe(u.el())):(ie.loadListener_=function(){var pe,Te;ie.el_&&ie.el_.contentWindow&&(pe=ie.debouncedHandler_,Te=ie.unloadListener_=function(){yn(this,"resize",pe),yn(this,"unload",Te),Te=null;},pn(ie.el_.contentWindow,"unload",Te),pn(ie.el_.contentWindow,"resize",pe));},ie.one("load",ie.loadListener_)),ie;}y()(R,k);var P=R.prototype;return P.createEl=function(){return k.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"});},P.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize");},P.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,k.prototype.dispose.call(this);},R;}(Wt)),xe=(Wt.registerComponent("ResizeManager",me),{trackingThreshold:20,liveTolerance:15}),Ie=function(k){function R(u,A){var A=Kn(xe,A,{createEl:!1}),L=k.call(this,u,A)||this;return L.handleVisibilityChange_=function(ie){return L.handleVisibilityChange(ie);},L.trackLiveHandler_=function(){return L.trackLive_();},L.handlePlay_=function(ie){return L.handlePlay(ie);},L.handleFirstTimeupdate_=function(ie){return L.handleFirstTimeupdate(ie);},L.handleSeeked_=function(ie){return L.handleSeeked(ie);},L.seekToLiveEdge_=function(ie){return L.seekToLiveEdge(ie);},L.reset_(),L.on(L.player_,"durationchange",function(ie){return L.handleDurationchange(ie);}),L.on(L.player_,"canplay",function(){return L.toggleTracking();}),fe&&"hidden"in _.a&&"visibilityState"in _.a&&L.on(_.a,"visibilitychange",L.handleVisibilityChange_),L;}y()(R,k);var P=R.prototype;return P.handleVisibilityChange=function(){this.player_.duration()===1/0&&(_.a.hidden?this.stopTracking():this.startTracking());},P.trackLive_=function(){var u,T=this.player_.seekable();T&&T.length&&(T=Number(o.a.performance.now().toFixed(4)),u=this.lastTime_===-1?0:(T-this.lastTime_)/1e3,this.lastTime_=T,this.pastSeekEnd_=this.pastSeekEnd()+u,T=this.liveCurrentTime(),u=this.player_.currentTime(),u=this.player_.paused()||this.seekedBehindLive_||Math.abs(T-u)>this.options_.liveTolerance,(u=this.timeupdateSeen_&&T!==1/0?u:!1)!==this.behindLiveEdge_&&(this.behindLiveEdge_=u,this.trigger("liveedgechange")));},P.handleDurationchange=function(){this.toggleTracking();},P.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking());},P.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)));},P.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_);},P.handleSeeked=function(){var u=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&2<u,this.nextSeekedFromUser_=!1,this.trackLive_();},P.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_);},P.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_);},P.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0;},P.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"));},P.seekableEnd=function(){for(var u=this.player_.seekable(),T=[],A=u?u.length:0;A--;)T.push(u.end(A));return T.length?T.sort()[T.length-1]:1/0;},P.seekableStart=function(){for(var u=this.player_.seekable(),T=[],A=u?u.length:0;A--;)T.push(u.start(A));return T.length?T.sort()[0]:0;},P.liveWindow=function(){var u=this.liveCurrentTime();return u===1/0?0:u-this.seekableStart();},P.isLive=function(){return this.isTracking();},P.atLiveEdge=function(){return!this.behindLiveEdge();},P.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd();},P.pastSeekEnd=function(){var u=this.seekableEnd();return this.lastSeekEnd_!==-1&&u!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=u,this.pastSeekEnd_;},P.behindLiveEdge=function(){return this.behindLiveEdge_;},P.isTracking=function(){return typeof this.trackingInterval_=="number";},P.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()));},P.dispose=function(){this.off(_.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),k.prototype.dispose.call(this);},R;}(Wt),Me=(Wt.registerComponent("LiveTracker",Ie),function(k){var R=k.el();if(R.hasAttribute("src"))k.triggerSourceset(R.src);else{var P=k.$$("source"),u=[],R="";if(!P.length)return!1;for(var T=0;T<P.length;T++){var A=P[T].src;A&&u.indexOf(A)===-1&&u.push(A);}if(!u.length)return!1;u.length===1&&(R=u[0]),k.triggerSourceset(R);}return!0;}),Ne=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML;},set:function(k){for(var R=_.a.createElement(this.nodeName.toLowerCase()),P=(R.innerHTML=k,_.a.createDocumentFragment());R.childNodes.length;)P.appendChild(R.childNodes[0]);return this.innerText="",o.a.Element.prototype.appendChild.call(this,P),this.innerHTML;}}),ze=function(k,R){for(var P={},u=0;u<k.length&&!((P=Object.getOwnPropertyDescriptor(k[u],R))&&P.set&&P.get);u++);return P.enumerable=!0,P.configurable=!0,P;},Je=function(k){return ze([k.el(),o.a.HTMLMediaElement.prototype,o.a.Element.prototype,Ne],"innerHTML");},ft=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ba(o.a.Element.prototype.getAttribute.call(this,"src")):"";},set:function(k){return o.a.Element.prototype.setAttribute.call(this,"src",k),k;}}),Xe=function(k){function R(u,L){var A=k.call(this,u,L)||this,L=u.source,ie=!1;if(A.featuresVideoFrameCallback=A.featuresVideoFrameCallback&&A.el_.tagName==="VIDEO",L&&(A.el_.currentSrc!==L.src||u.tag&&u.tag.initNetworkState_===3)?A.setSource(L):A.handleLateInit_(A.el_),u.enableSourceset&&A.setupSourcesetHandling_(),A.isScrubbing_=!1,A.el_.hasChildNodes()){for(var pe=A.el_.childNodes,Te=pe.length,Ae=[];Te--;){var je=pe[Te];je.nodeName.toLowerCase()==="track"&&(A.featuresNativeTextTracks?(A.remoteTextTrackEls().addTrackElement_(je),A.remoteTextTracks().addTrack(je.track),A.textTracks().addTrack(je.track),ie||A.el_.hasAttribute("crossorigin")||!Kl(je.src)||(ie=!0)):Ae.push(je));}for(var Fe=0;Fe<Ae.length;Fe++)A.el_.removeChild(Ae[Fe]);}return A.proxyNativeTracks_(),A.featuresNativeTextTracks&&ie&&Z.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used. 14This may prevent text tracks from loading.`),A.restoreMetadataTracksInIOSNativePlayer_(),(he||_e||D)&&u.nativeControlsForTouch===!0&&A.setControls(!0),A.proxyWebkitFullscreen_(),A.triggerReady(),A;}y()(R,k);var P=R.prototype;return P.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),R.disposeMediaElement(this.el_),this.options_=null,k.prototype.dispose.call(this);},P.setupSourcesetHandling_=function(){lf(this);},P.restoreMetadataTracksInIOSNativePlayer_=function(){function u(){A=[];for(var ie=0;ie<L.length;ie++){var pe=L[ie];pe.kind==="metadata"&&A.push({track:pe,storedMode:pe.mode});}}function T(){for(var ie=0;ie<A.length;ie++){var pe=A[ie];pe.track.mode==="disabled"&&pe.track.mode!==pe.storedMode&&(pe.track.mode=pe.storedMode);}L.removeEventListener("change",T);}var A,L=this.textTracks();u(),L.addEventListener("change",u),this.on("dispose",function(){return L.removeEventListener("change",u);}),this.on("webkitbeginfullscreen",function(){L.removeEventListener("change",u),L.removeEventListener("change",T),L.addEventListener("change",T);}),this.on("webkitendfullscreen",function(){L.removeEventListener("change",u),L.addEventListener("change",u),L.removeEventListener("change",T);});},P.overrideNative_=function(u,T){var A,L=this;T===this["featuresNative"+u+"Tracks"]&&(this[(A=u.toLowerCase())+"TracksListeners_"]&&Object.keys(this[A+"TracksListeners_"]).forEac
14h(function(ie){L.el()[A+"Tracks"].removeEventListener(ie,L[A+"TracksListeners_"][ie]);}),this["featuresNative"+u+"Tracks"]=!T,this[A+"TracksListeners_"]=null,this.proxyNativeTracksForType_(A));},P.overrideNativeAudioTracks=function(u){this.overrideNative_("Audio",u);},P.overrideNativeVideoTracks=function(u){this.overrideNative_("Video",u);},P.proxyNativeTracksForType_=function(u){var T,A,L=this,ie=Bo[u],pe=this.el()[ie.getterName],Te=this[ie.getterName]();this["featuresNative"+ie.capitalName+"Tracks"]&&pe&&pe.addEventListener&&(A=function(){for(var Ae=[],je=0;je<Te.length;je++){for(var Fe=!1,He=0;He<pe.length;He++)if(pe[He]===Te[je]){Fe=!0;break;}Fe||Ae.push(Te[je]);}for(;Ae.length;)Te.removeTrack(Ae.shift());},this[ie.getterName+"Listeners_"]=T={change:function(Ae){var je={type:"change",target:Te,currentTarget:Te,srcElement:Te};Te.trigger(je),u==="text"&&L[Vs.remoteText.getterName]().trigger(je);},addtrack:function(Ae){Te.addTrack(Ae.track);},removetrack:function(Ae){Te.removeTrack(Ae.track);}},Object.keys(T).forEach(function(Ae){var je=T[Ae];pe.addEventListener(Ae,je),L.on("dispose",function(Fe){return pe.removeEventListener(Ae,je);});}),this.on("loadstart",A),this.on("dispose",function(Ae){return L.off("loadstart",A);}));},P.proxyNativeTracks_=function(){var u=this;Bo.names.forEach(function(T){u.proxyNativeTracksForType_(T);});},P.createEl=function(){for(var u,T=this.options_.tag,A=(T&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(T?(u=T.cloneNode(!0),T.parentNode&&T.parentNode.insertBefore(u,T),R.disposeMediaElement(T),T=u):(T=_.a.createElement("video"),u=Kn({},this.options_.tag&&Ut(this.options_.tag)),he&&this.options_.nativeControlsForTouch===!0||delete u.controls,Nt(T,J(u,{id:this.options_.techId,class:"vjs-tech"}))),T.playerId=this.options_.playerId),this.options_.preload!==void 0&&Ge(T,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(T.disablePictureInPicture=this.options_.disablePictureInPicture),["loop","muted","playsinline","autoplay"]),L=0;L<A.length;L++){var ie=A[L],pe=this.options_[ie];pe!==void 0&&(pe?Ge(T,ie,ie):qe(T,ie),T[ie]=pe);}return T;},P.handleLateInit_=function(u){var T,A,L,ie;u.networkState!==0&&u.networkState!==3&&(u.readyState===0?(T=!1,this.on("loadstart",A=function(){T=!0;}),this.on("loadedmetadata",L=function(){T||this.trigger("loadstart");}),this.ready(function(){this.off("loadstart",A),this.off("loadedmetadata",L),T||this.trigger("loadstart");})):((ie=["loadstart"]).push("loadedmetadata"),2<=u.readyState&&ie.push("loadeddata"),3<=u.readyState&&ie.push("canplay"),4<=u.readyState&&ie.push("canplaythrough"),this.ready(function(){ie.forEach(function(pe){this.trigger(pe);},this);})));},P.setScrubbing=function(u){this.isScrubbing_=u;},P.scrubbing=function(){return this.isScrubbing_;},P.setCurrentTime=function(u){try{this.isScrubbing_&&this.el_.fastSeek&&ee?this.el_.fastSeek(u):this.el_.currentTime=u;}catch(T){Z(T,"Video is not ready. (Video.js)");}},P.duration=function(){var u=this;return this.el_.duration===1/0&&Y&&le&&this.el_.currentTime===0?(this.on("timeupdate",function T(){0<u.el_.currentTime&&(u.el_.duration===1/0&&u.trigger("durationchange"),u.off("timeupdate",T));}),NaN):this.el_.duration||NaN;},P.width=function(){return this.el_.offsetWidth;},P.height=function(){return this.el_.offsetHeight;},P.proxyWebkitFullscreen_=function(){var u,T,A=this;"webkitDisplayingFullscreen"in this.el_&&(u=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1);},this.on("webkitbeginfullscreen",T=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",u),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}));}),this.on("dispose",function(){A.off("webkitbeginfullscreen",T),A.off("webkitendfullscreen",u);}));},P.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var u=o.a.navigator&&o.a.navigator.userAgent||"";if(/Android/.test(u)||!/Chrome|Mac OS X 10.5/.test(u))return!0;}return!1;},P.enterFullScreen=function(){var u=this.el_;if(u.paused&&u.networkState<=u.HAVE_METADATA)Xo(this.el_.play()),this.setTimeout(function(){u.pause();try{u.webkitEnterFullScreen();}catch(T){this.trigger("fullscreenerror",T);}},0);else try{u.webkitEnterFullScreen();}catch(T){this.trigger("fullscreenerror",T);}},P.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"));},P.requestPictureInPicture=function(){return this.el_.requestPictureInPicture();},P.requestVideoFrameCallback=function(u){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(u):k.prototype.requestVideoFrameCallback.call(this,u);},P.cancelVideoFrameCallback=function(u){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(u):k.prototype.cancelVideoFrameCallback.call(this,u);},P.src=function(u){if(u===void 0)return this.el_.src;this.setSrc(u);},P.reset=function(){R.resetMediaElement(this.el_);},P.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc;},P.setControls=function(u){this.el_.controls=!!u;},P.addTextTrack=function(u,T,A){return this.featuresNativeTextTracks?this.el_.addTextTrack(u,T,A):k.prototype.addTextTrack.call(this,u,T,A);},P.createRemoteTextTrack=function(u){if(!this.featuresNativeTextTracks)return k.prototype.createRemoteTextTrack.call(this,u);var T=_.a.createElement("track");return u.kind&&(T.kind=u.kind),u.label&&(T.label=u.label),(u.language||u.srclang)&&(T.srclang=u.language||u.srclang),u.default&&(T.default=u.default),u.id&&(T.id=u.id),u.src&&(T.src=u.src),T;},P.addRemoteTextTrack=function(u,T){return u=k.prototype.addRemoteTextTrack.call(this,u,T),this.featuresNativeTextTracks&&this.el().appendChild(u),u;},P.removeRemoteTextTrack=function(u){if(k.prototype.removeRemoteTextTrack.call(this,u),this.featuresNativeTextTracks)for(var T=this.$$("track"),A=T.length;A--;)u!==T[A]&&u!==T[A].track||this.el().removeChild(T[A]);},P.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var u={};return this.el().webkitDroppedFrameCount!==void 0&&this.el().webkitDecodedFrameCount!==void 0&&(u.droppedVideoFrames=this.el().webkitDroppedFrameCount,u.totalVideoFrames=this.el().webkitDecodedFrameCount),o.a.performance&&typeof o.a.performance.now=="function"?u.creationTime=o.a.performance.now():o.a.performance&&o.a.performance.timing&&typeof o.a.performance.timing.navigationStart=="number"&&(u.creationTime=o.a.Date.now()-o.a.performance.timing.navigationStart),u;},R;}(Gn),Tt=(Mu(Xe,"TEST_VID",function(){var k,R;if(ye())return k=_.a.createElement("video"),R=_.a.createElement("track"),R.kind="captions",R.srclang="en",R.label="English",k.appendChild(R),k;}),Xe.isSupported=function(){try{Xe.TEST_VID.volume=.5;}catch{return!1;}return!(!Xe.TEST_VID||!Xe.TEST_VID.canPlayType);},Xe.canPlayType=function(k){return Xe.TEST_VID.canPlayType(k);},Xe.canPlaySource=function(k,R){return Xe.canPlayType(k.type);},Xe.canControlVolume=function(){try{var k=Xe.TEST_VID.volume,R=(Xe.TEST_VID.volume=k/2+.1,k!==Xe.TEST_VID.volume);return R&&Re?(o.a.setTimeout(function(){Xe&&Xe.prototype&&(Xe.prototype.featuresVolumeControl=k!==Xe.TEST_VID.volume);}),!1):R;}catch{return!1;}},Xe.canMuteVolume=function(){try{var k=Xe.TEST_VID.muted;return Xe.TEST_VID.muted=!k,Xe.TEST_VID.muted?Ge(Xe.TEST_VID,"muted","muted"):qe(Xe.TEST_VID,"muted"),k!==Xe.TEST_VID.muted;}catch{return!1;}},Xe.canControlPlaybackRate=function(){if(Y&&le&&se<58)return!1;try{var k=Xe.TEST_VID.playbackRate;return Xe.TEST_VID.playbackRate=k/2+.1,k!==Xe.TEST_VID.playbackRate;}catch{return!1;}},Xe.canOverrideAttributes=function(){try{var k=function(){};Object.defineProperty(_.a.createElement("video"),"src",{get:k,set:k}),Object.defineProperty(_.a.createElement("audio"),"src",{get:k,set:k}),Object.defineProperty(_.a.createElement("video"),"innerHTML",{get:k,set:k}),Object.defineProperty(_.a.createElement("audio"),"innerHTML",{get:k,set:k});}catch{return!1;}return!0;},Xe.supportsNativeTextTracks=function(){return ee||Re&≤},Xe.supportsNativeVideoTracks=function(){return!(!Xe.TEST_VID||!Xe.TEST_VID.videoTracks);},Xe.supportsNativeAudioTracks=function(){return!(!Xe.TEST_VID||!Xe.TEST_VID.audioTracks);},Xe.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
14h(function(k){var R=k[0],P=k[1];Mu(Xe.prototype,R,function(){return Xe[P]();},!0);}),Xe.prototype.featuresVolumeControl=Xe.canControlVolume(),Xe.prototype.movingMediaElementInDOM=!Re,Xe.prototype.featuresFullscreenResize=!0,Xe.prototype.featuresProgressEvents=!0,Xe.prototype.featuresTimeupdateEvents=!0,Xe.prototype.featuresVideoFrameCallback=!(!Xe.TEST_VID||!Xe.TEST_VID.requestVideoFrameCallback),Xe.patchCanPlayType=function(){4<=j&&!$&&!le&&(oc=Xe.TEST_VID&&Xe.TEST_VID.constructor.prototype.canPlayType,Xe.TEST_VID.constructor.prototype.canPlayType=function(k){return k&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(k)?"maybe":oc.call(this,k);});},Xe.unpatchCanPlayType=function(){var k=Xe.TEST_VID.constructor.prototype.canPlayType;return oc&&(Xe.TEST_VID.constructor.prototype.canPlayType=oc),k;},Xe.patchCanPlayType(),Xe.disposeMediaElement=function(k){if(k){for(k.parentNode&&k.parentNode.removeChild(k);k.hasChildNodes();)k.removeChild(k.firstChild);if(k.removeAttribute("src"),typeof k.load=="function")try{k.load();}catch{}}},Xe.resetMediaElement=function(k){if(k){for(var R=k.querySelectorAll("source"),P=R.length;P--;)k.removeChild(R[P]);if(k.removeAttribute("src"),typeof k.load=="function")try{k.load();}catch{}}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(k){Xe.prototype[k]=function(){return this.el_[k]||this.el_.hasAttribute(k);};}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(k){Xe.prototype["set"+fr(k)]=function(R){(this.el_[k]=R)?this.el_.setAttribute(k,k):this.el_.removeAttribute(k);};}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(k){Xe.prototype[k]=function(){return this.el_[k];};}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(k){Xe.prototype["set"+fr(k)]=function(R){this.el_[k]=R;};}),["pause","load","play"].forEach(function(k){Xe.prototype[k]=function(){return this.el_[k]();};}),Gn.withSourceHandlers(Xe),Xe.nativeSourceHandler={},Xe.nativeSourceHandler.canPlayType=function(k){try{return Xe.TEST_VID.canPlayType(k);}catch{return"";}},Xe.nativeSourceHandler.canHandleSource=function(k,R){return k.type?Xe.nativeSourceHandler.canPlayType(k.type):k.src?(k=_u(k.src),Xe.nativeSourceHandler.canPlayType("video/"+k)):"";},Xe.nativeSourceHandler.handleSource=function(k,R,P){R.setSrc(k.src);},Xe.nativeSourceHandler.dispose=function(){},Xe.registerSourceHandler(Xe.nativeSourceHandler),Gn.registerTech("Html5",Xe),["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"]),St={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Xt=["tiny","xsmall","small","medium","large","xlarge","huge"],pi={},vi=(Xt.forEach(function(k){var R=k.charAt(0)==="x"?"x-"+k.substring(1):k;pi[k]="vjs-layout-"+R;}),{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0}),ki=function(k){function R(u,T,A){var L,ie;if(u.id=u.id||T.id||"vjs_video_"+un++,(T=J(R.getTagSettings(u),T)).initChildren=!1,T.createEl=!1,T.evented=!1,T.reportTouchActivity=!1,!T.language)if(typeof u.closest=="function"){var pe=u.closest("[lang]");pe&&pe.getAttribute&&(T.language=pe.getAttribute("lang"));}else for(var Te=u;Te&&Te.nodeType===1;){if(Ut(Te).hasOwnProperty("lang")){T.language=Te.getAttribute("lang");break;}Te=Te.parentNode;}if((L=k.call(this,null,T,A)||this).boundDocumentFullscreenChange_=function(Ae){return L.documentFullscreenChange_(Ae);},L.boundFullWindowOnEscKey_=function(Ae){return L.fullWindowOnEscKey(Ae);},L.boundUpdateStyleEl_=function(Ae){return L.updateStyleEl_(Ae);},L.boundApplyInitTime_=function(Ae){return L.applyInitTime_(Ae);},L.boundUpdateCurrentBreakpoint_=function(Ae){return L.updateCurrentBreakpoint_(Ae);},L.boundHandleTechClick_=function(Ae){return L.handleTechClick_(Ae);},L.boundHandleTechDoubleClick_=function(Ae){return L.handleTechDoubleClick_(Ae);},L.boundHandleTechTouchStart_=function(Ae){return L.handleTechTouchStart_(Ae);},L.boundHandleTechTouchMove_=function(Ae){return L.handleTechTouchMove_(Ae);},L.boundHandleTechTouchEnd_=function(Ae){return L.handleTechTouchEnd_(Ae);},L.boundHandleTechTap_=function(Ae){return L.handleTechTap_(Ae);},L.isFullscreen_=!1,L.log=re(L.id_),L.fsApi_=H,L.isPosterFromTech_=!1,L.queuedCallbacks_=[],L.isReady_=!1,L.hasStarted_=!1,L.userActive_=!1,L.debugEnabled_=!1,L.audioOnlyMode_=!1,L.audioPosterMode_=!1,L.audioOnlyCache_={playerHe
14ight:null,hiddenChildren:[]},!L.options_||!L.options_.techOrder||!L.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");return L.tag=u,L.tagAttributes=u&&Ut(u),L.language(L.options_.language),T.languages?(ie={},Object.getOwnPropertyNames(T.languages).forEach(function(Ae){ie[Ae.toLowerCase()]=T.languages[Ae];}),L.languages_=ie):L.languages_=R.prototype.options_.languages,L.resetCache_(),L.poster_=T.poster||"",L.controls_=!!T.controls,u.controls=!1,u.removeAttribute("controls"),L.changingSrc_=!1,L.playCallbacks_=[],L.playTerminatedQueue_=[],u.hasAttribute("autoplay")?L.autoplay(!0):L.autoplay(L.options_.autoplay),T.plugins&&Object.keys(T.plugins).forEach(function(Ae){if(typeof L[Ae]!="function")throw new Error('plugin "'+Ae+'" does not exist');}),L.scrubbing_=!1,L.el_=L.createEl(),Ls(h()(L),{eventBusKey:"el_"}),L.fsApi_.requestFullscreen&&(pn(_.a,L.fsApi_.fullscreenchange,L.boundDocumentFullscreenChange_),L.on(L.fsApi_.fullscreenchange,L.boundDocumentFullscreenChange_)),L.fluid_&&L.on(["playerreset","resize"],L.boundUpdateStyleEl_),pe=Kn(L.options_),T.plugins&&Object.keys(T.plugins).forEach(function(Ae){L[Ae](T.plugins[Ae]);}),T.debug&&L.debug(!0),L.options_.playerOptions=pe,L.middleware_=[],L.playbackRates(T.playbackRates),L.initChildren(),L.isAudio(u.nodeName.toLowerCase()==="audio"),L.controls()?L.addClass("vjs-controls-enabled"):L.addClass("vjs-controls-disabled"),L.el_.setAttribute("role","region"),L.isAudio()?L.el_.setAttribute("aria-label",L.localize("Audio Player")):L.el_.setAttribute("aria-label",L.localize("Video Player")),L.isAudio()&&L.addClass("vjs-audio"),L.flexNotSupported_()&&L.addClass("vjs-no-flex"),he&&L.addClass("vjs-touch-enabled"),Re||L.addClass("vjs-workinghover"),R.players[L.id_]=h()(L),A="7.21.6".split(".")[0],L.addClass("vjs-v"+A),L.userActive(!0),L.reportUserActivity(),L.one("play",function(Ae){return L.listenForUserActivity_(Ae);}),L.on("stageclick",function(Ae){return L.handleStageClick_(Ae);}),L.on("keydown",function(Ae){return L.handleKeyDown(Ae);}),L.on("languagechange",function(Ae){return L.handleLanguagechange(Ae);}),L.breakpoints(L.options_.breakpoints),L.responsive(L.options_.responsive),L.on("ready",function(){L.audioPosterMode(L.options_.audioPosterMode),L.audioOnlyMode(L.options_.audioOnlyMode);}),L;}y()(R,k);var P=R.prototype;return P.dispose=function(){var u=this;this.trigger("dispose"),this.off("dispose"),yn(_.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),yn(_.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),R.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),ha[this.id()]=null,Yr.names.forEach(function(T){T=Yr[T],T=u[T.getterName](),T&&T.off&&T.off();}),k.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl});},P.createEl=function(){var u,T,A,L=this.tag,ie=this.playerElIngest_=L.parentNode&&L.parentNode.hasAttribute&&L.parentNode.hasAttribute("data-vjs-player"),pe=this.tag.tagName.toLowerCase()==="video-js",Te=(ie?u=this.el_=L.parentNode:pe||(u=this.el_=k.prototype.createEl.call(this,"div")),Ut(L));if(pe){for(u=this.el_=L,L=this.tag=_.a.createElement("video");u.children.length;)L.appendChild(u.firstChild);ot(u,"video-js")||ht(u,"video-js"),u.appendChild(L),ie=this.playerElIngest_=u,Object.keys(u).forEach(function(He){try{L[He]=u[He];}catch{}});}L.setAttribute("tabindex","-1"),Te.tabindex="-1",(fe||le&&ge)&&(L.setAttribute("role","application"),Te.role="application"),L.removeAttribute("width"),L.removeAttribute("height"),"width"in Te&&delete Te.width,"height"in Te&&delete Te.height,Object.getOwnPropertyNames(Te).forEach(function(He){pe&&He==="class"||u.setAttribute(He,Te[He]),pe&&L.setAttribute(He,Te[He]);}),L.playerId=L.id,L.id+="_html5_api",L.className="vjs-tech",(L.player=u.player=this).addClass("vjs-paused"),o.a.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&(this.styleEl_=Ui("vjs-styles-dimensions"),T=Pi(".vjs-styles-defaults"),(A=Pi("head")).insertBefore(this.styleEl_,T?T.nextSibling:A.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var Ae=L.getElementsByTagName("a"),je=0;je<Ae.length;je++){var Fe=Ae.item(je);ht(Fe,"vjs-hidden"),Fe.setAttribute("hidden","hidden");}return L.initNetworkState_=L.networkState,L.parentNode&&!ie&&L.parentNode.insertBefore(u,L),it(L,u),this.children_.unshift(L),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=u;},P.crossOrigin=function(u){if(!u)return this.techGet_("crossOrigin");u!=="anonymous"&&u!=="use-credentials"?Z.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+u+'"'):this.techCall_("setCrossOrigin",u);},P.width=function(u){return this.dimension("width",u);},P.height=function(u){return this.dimension("height",u);},P.dimension=function(u,T){var A,L=u+"_";if(T===void 0)return this[L]||0;T===""||T==="auto"?(this[L]=void 0,this.updateStyleEl_()):(A=parseFloat(T),isNaN(A)?Z.error('Improper value "'+T+'" supplied for for '+u):(this[L]=A,this.updateStyleEl_()));},P.fluid=function(u){var T,A=this;if(u===void 0)return!!this.fluid_;this.fluid_=!!u,Mo(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),u?(this.addClass("vjs-fluid"),this.fill(!1),u=function(){A.on(["playerreset","resize"],A.boundUpdateStyleEl_);},Mo(T=this)?u():(T.eventedCallbacks||(T.eventedCallbacks=[]),T.eventedCallbacks.push(u))):this.removeClass("vjs-fluid"),this.updateStyleEl_();},P.fill=function(u){if(u===void 0)return!!this.fill_;this.fill_=!!u,u?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill");},P.aspectRatio=function(u){if(u===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(u))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=u,this.fluid(!0),this.updateStyleEl_();},P.updateStyleEl_=function(){var u,T,A,L;o.a.VIDEOJS_NO_DYNAMIC_STYLE===!0?(A=typeof this.width_=="number"?this.width_:this.options_.width,T=typeof this.height_=="number"?this.height_:this.options_.height,(u=this.tech_&&this.tech_.el())&&
14(0<=A&&(u.width=A),0<=T&&(u.height=T))):(u=(A=(this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"))[1]/A[0],T=this.width_!==void 0?this.width_:this.height_!==void 0?this.height_/u:this.videoWidth()||300,A=this.height_!==void 0?this.height_:T*u,L=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(L),nn(this.styleEl_,` 15 .`+L+` { 16 width: `+T+`px; 17 height: `+A+`px; 18 } 19 20 .`+L+`.vjs-fluid:not(.vjs-audio-only-mode) { 21 padding-top: `+100*u+`%; 22 } 23 `));},P.loadTech_=function(u,T){var A=this,L=(this.tech_&&this.unloadTech_(),fr(u)),ie=u.charAt(0).toLowerCase()+u.slice(1),Te=(L!=="Html5"&&this.tag&&(Gn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=L,this.isReady_=!1,this.autoplay()),pe={source:T,autoplay:Te=typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay?!1:Te,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+ie+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise},Te=(Yr.names.forEach(function(Ae){Ae=Yr[Ae],pe[Ae.getterName]=A[Ae.privateName];}),J(pe,this.options_[L]),J(pe,this.options_[ie]),J(pe,this.options_[u.toLowerCase()]),this.tag&&(pe.tag=this.tag),T&&T.src===this.cache_.src&&0<this.cache_.currentTime&&(pe.startTime=this.cache_.currentTime),Gn.getTech(u));if(!Te)throw new Error("No Tech named '"+L+"' exists! '"+L+"' should be registered using videojs.registerTech()'");this.tech_=new Te(pe),this.tech_.ready(er(this,this.handleTechReady_),!0),yu(this.textTracksJson_||[],this.tech_),Tt.forEach(function(Ae){A.on(A.tech_,Ae,function(je){return A["handleTech"+fr(Ae)+"_"](je);});}),Object.keys(St).forEach(function(Ae){A.on(A.tech_,Ae,function(je){A.tech_.playbackRate()===0&&A.tech_.seeking()?A.queuedCallbacks_.push({callback:A["handleTech"+St[Ae]+"_"].bind(A),event:je}):A["handleTech"+St[Ae]+"_"](je);});}),this.on(this.tech_,"loadstart",function(Ae){return A.handleTechLoadStart_(Ae);}),this.on(this.tech_,"sourceset",function(Ae){return A.handleTechSourceset_(Ae);}),this.on(this.tech_,"waiting",function(Ae){return A.handleTechWaiting_(Ae);}),this.on(this.tech_,"ended",function(Ae){return A.handleTechEnded_(Ae);}),this.on(this.tech_,"seeking",function(Ae){return A.handleTechSeeking_(Ae);}),this.on(this.tech_,"play",function(Ae){return A.handleTechPlay_(Ae);}),this.on(this.tech_,"firstplay",function(Ae){return A.handleTechFirstPlay_(Ae);}),this.on(this.tech_,"pause",function(Ae){return A.handleTechPause_(Ae);}),this.on(this.tech_,"durationchange",function(Ae){return A.handleTechDurationChange_(Ae);}),this.on(this.tech_,"fullscreenchange",function(Ae,je){return A.handleTechFullscreenChange_(Ae,je);}),this.on(this.tech_,"fullscreenerror",function(Ae,je){return A.handleTechFullscreenError_(Ae,je);}),this.on(this.tech_,"enterpictureinpicture",function(Ae){return A.handleTechEnterPictureInPicture_(Ae);}),this.on(this.tech_,"leavepictureinpicture",function(Ae){return A.handleTechLeavePictureInPicture_(Ae);}),this.on(this.tech_,"error",function(Ae){return A.handleTechError_(Ae);}),this.on(this.tech_,"posterchange",function(Ae){return A.handleTechPosterChange_(Ae);}),this.on(this.tech_,"textdata",function(Ae){return A.handleTechTextData_(Ae);}),this.on(this.tech_,"ratechange",function(Ae){return A.handleTechRateChange_(Ae);}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||L==="Html5"&&this.tag||it(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null);},P.unloadTech_=function(){var u=this;
23Yr.names.forEach(function(T){T=Yr[T],u[T.privateName]=u[T.getterName]();}),this.textTracksJson_=ql(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1;},P.tech=function(u){return u===void 0&&Z.warn(`Using the tech directly can be dangerous. I hope you know what you're doing. 24See https://github.com/videojs/video.js/issues/2617 for more info. 25`),this.tech_;},P.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_);},P.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_);},P.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_();},P.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay());},P.manualAutoplay_=function(u){var T=this;if(this.tech_&&typeof u=="string"){var A,L=function(){function ie(){T.muted(pe);}var pe=T.muted(),Te=(T.muted(!0),T.playTerminatedQueue_.push(ie),T.play());if(Ds(Te))return Te.catch(function(Ae){throw ie(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(Ae||""));});};if(u!=="any"||this.muted()?A=u!=="muted"||this.muted()?this.play():L():Ds(A=this.play())&&(A=A.catch(L)),Ds(A))return A.then(function(){T.trigger({type:"autoplay-success",autoplay:u});}).catch(function(){T.trigger({type:"autoplay-failure",autoplay:u});});}},P.updateSourceCaches_=function(u){for(var T=u=u===void 0?"":u,A="",u=(typeof T!="string"&&(T=u.src,A=u.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],T&&!A&&(A=function(Fe,He){if(!He)return"";if(Fe.cache_.source.src===He&&Fe.cache_.source.type)return Fe.cache_.source.type;var Qe=Fe.cache_.sources.filter(function(It){return It.src===He;});if(Qe.length)return Qe[0].type;for(var pt=Fe.$$("source"),Vt=0;Vt<pt.length;Vt++){var jt=pt[Vt];if(jt.type&&jt.src&&jt.src===He)return jt.type;}return tr(He);}(this,T)),this.cache_.source=Kn({},u,{src:T,type:A}),this.cache_.sources.filter(function(Fe){return Fe.src&&Fe.src===T;})),L=[],ie=this.$$("source"),pe=[],Te=0;Te<ie.length;Te++){var Ae=Ut(ie[Te]);L.push(Ae),Ae.src&&Ae.src===T&&pe.push(Ae.src);}pe.length&&!u.length?this.cache_.sources=L:u.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=T;},P.handleTechSourceset_=function(u){var T,A,L,ie=this;this.changingSrc_||(T=function(pe){return ie.updateSourceCaches_(pe);},A=this.currentSource().src,L=u.src,(T=!A||/^blob:/.test(A)||!/^blob:/.test(L)||this.lastSource_&&(this.lastSource_.tech===L||this.lastSource_.player===A)?T:function(){})(L),u.src||this.tech_.any(["sourceset","loadstart"],function(pe){pe.type!=="sourceset"&&(pe=ie.techGet("currentSrc"),ie.lastSource_.tech=pe,ie.updateSourceCaches_(pe));})),this.lastSource_={player:this.currentSource().src,tech:u.src},this.trigger({src:u.src,type:"sourceset"});},P.hasStarted=function(u){if(u===void 0)return this.hasStarted_;u!==this.hasStarted_&&(this.hasStarted_=u,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"));},P.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play");},P.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(u){return u.callback(u.event);}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange");},P.handleTechWaiting_=function(){var u=this,T=(this.addClass("vjs-waiting"),this.trigger("waiting"),this.currentTime());this.on("timeupdate",function A(){T!==u.currentTime()&&(u.removeClass("vjs-waiting"),u.off("timeupdate",A));});},P.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay");},P.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough");},P.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing");},P.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking");},P.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked");},P.handleTechFirstPlay_=function(){this.options_.starttime&&(Z.warn("Passing the `starttime` option to the player will be deprecated
25in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay");},P.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause");},P.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended");},P.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"));},P.handleTechClick_=function(u){!this.controls_||this.options_!==void 0&&this.options_.userActions!==void 0&&this.options_.userActions.click!==void 0&&this.options_.userActions.click===!1||(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,u):this.paused()?Xo(this.play()):this.pause());},P.handleTechDoubleClick_=function(u){!this.controls_||Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(T){return T.contains(u.target);})||this.options_!==void 0&&this.options_.userActions!==void 0&&this.options_.userActions.doubleClick!==void 0&&this.options_.userActions.doubleClick===!1||(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,u):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen());},P.handleTechTap_=function(){this.userActive(!this.userActive());},P.handleTechTouchStart_=function(){this.userWasActive=this.userActive();},P.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity();},P.handleTechTouchEnd_=function(u){u.cancelable&&u.preventDefault();},P.handleStageClick_=function(){this.reportUserActivity();},P.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen");},P.documentFullscreenChange_=function(A){var T,A=A.target.player;A&&A!==this||(A=this.el(),!(T=_.a[this.fsApi_.fullscreenElement]===A)&&A.matches?T=A.matches(":"+this.fsApi_.fullscreen):!T&&A.msMatchesSelector&&(T=A.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(T));},P.handleTechFullscreenChange_=function(u,T){var A=this;T&&(T.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){A.removeClass("vjs-ios-native-fs");})),this.isFullscreen(T.isFullscreen));},P.handleTechFullscreenError_=function(u,T){this.trigger("fullscreenerror",T);},P.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture");},P.handleTechEnterPictureInPicture_=function(u){this.isInPictureInPicture(!0);},P.handleTechLeavePictureInPicture_=function(u){this.isInPictureInPicture(!1);},P.handleTechError_=function(){var u=this.tech_.error();this.error(u);},P.handleTechTextData_=function(){var u=1<arguments.length?arguments[1]:null;this.trigger("textdata",u);},P.getCache=function(){return this.cache_;},P.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1};},P.techCall_=function(u,T){this.ready(function(){if(u in Su)return A=this.middleware_,this.tech_[u](A.reduce(_l(u),T));if(u in wu)return vs(this.middleware_,this.tech_,u,T);var A;try{this.tech_&&this.tech_[u](T);}catch(L){throw Z(L),L;}},!0);},P.techGet_=function(u){if(this.tech_&&this.tech_.isReady_){if(u in Ur)return T=this.middleware_,A=this.tech_,T.reduceRight(_l(u),A[u]());if(u in wu)return vs(this.middleware_,this.tech_,u);var T,A;try{return this.tech_[u]();}catch(L){throw this.tech_[u]===void 0?Z("Video.js: "+u+" method not defined for "+this.techName_+" playback technology.",L):L.name==="TypeError"?(Z("Video.js: "+u+" unavailable on "+this.techName_+" playback technology element.",L),this.tech_.isReady_=!1):Z(L),L;}}},P.play=function(){var u=this,T=this.options_.Promise||o.a.Promise;return T?new T(function(A){u.play_(A);}):this.play_();},P.play_=function(L){var T,A=this,L=(this.playCallbacks_.push(L=L===void 0?Xo:L),!!(!this.changingSrc_&&(this.src()||this.currentSrc()))),ie=!!(ee||Re);this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),this.isReady_&&L?(T=this.techGet_("play"),ie&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),T===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(T)):(this.waitToPlay_=function(pe){A.play_();},this.one(["ready","loadstart"],this.waitToPlay_),!L&&ie&&this.load());},P.runPlayTerminatedQueue_=function(){var u=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],u.forEach(function(T){T();});},P.runPlayCallbacks_=function(u){var T=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],T.forEach(function(A){A(u);});},P.pause=function(){this.techCall_("pause");},P.paused=function(){return this.techGet_("paused")!==!1;},P.played=function(){return this.techGet_("played")||da(0,0);},P.scrubbing=function(u){if(u===void 0)return this.scrubbing_;this.scrubbing_=!!u,this.techCall_("setScrubbing",this.scrubbing_),u?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing");},P.currentTime=function(u){return u!==void 0?(u<0&&(u=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",u),void(this.cache_.initTime=0)):(this.cache_.initTime=u,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime);},P.applyInitTime_=function(){this.currentTime(this.cache_.initTime);},P.duration=function(u){if(u===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;(u=(u=parseFloat(u))<0?1/0:u)!==this.cache_.duration&&((this.cache_.duration=u)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(u)||this.trigger("durationchange"));},P.remainingTime=function(){return this.duration()-this.currentTime();},P.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime());},P.buffered=function(){var u;return u=(u=this.techGet_("buffered"))&&u.length?u:da(0,0);},P.bufferedPercent=function(){return Wl(this.buffered(),this.duration());},P.bufferedEnd=function(){var T=this.buffered(),u=this.duration(),T=T.end(T.length-1);return T=u<T?u:T;},P.volume=function(u){var T;if(u===void 0)return T=parseFloat(this.techGet_("volume")),isNaN(T)?1:T;T=Math.max(0,Math.min(1,parseFloat(u))),this.cache_.volume=T,this.techCall_("setVolume",T),0<T&&this.lastVolume_(T);},P.muted=function(u){if(u===void 0)return this.techGet_("muted")||!1;this.techCall_("setMuted",u);},P.defaultMuted=function(u){return u!==void 0?this.techCall_("setDefaultMuted",u):this.techGet_("defaultMuted")||!1;},P.lastVolume_=function(u){if(u===void 0||u===0)return this.cache_.lastVolume;this.cache_.lastVolume=u;},P.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1;},P.isFullscreen=function(u){var T;if(u===void 0)return this.isFullscreen_;T=this.isFullscreen_,this.isFullscreen_=!!u,this.isFullscreen_!==T&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();},P.requestFullscreen=function(u){var T,A=this.options_.Promise||o.a.Promise;return A?(T=this,new A(function(L,ie){function pe(){T.off("fullscreenerror",Ae),T.off("fullscreenchange",Te);}function Te(){pe(),L();}function Ae(Fe,He){pe(),ie(He);}T.one("fullscreenchange",Te),T.one("fullscreenerror",Ae);var je=T.requestFullscreenHelper_(u);je&&(je.then(pe,pe),je.then(L,ie));})):this.requestFullscreenHelper_();},P.requestFullscreenHelper_=function(u){var T,A=this;if(this.fsApi_.prefixed||(T=this.options_.fullscreen&&this.options_.fullscreen.options||{},u!==void 0&&(T=u)),this.fsApi_.requestFullscreen)return(u=this.el_[this.fsApi_.requestFullscreen](T))&&u.then(function(){return A.isFullscreen(!0);},function(){return A.isFullscreen(!1);}),u;this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow();},P.exitFullscreen=function(){var u,T=this.options_.Promise||o.a.Promise;return T?(u=this,new T(function(A,L){function ie(){u.off("fullscreenerror",Te),u.off("fullscreenchange",pe);}function pe(){ie(),A();}function Te(je,Fe){ie(),L(Fe);}u.one("fullscreenchange",pe),u.one("fullscreenerror",Te);var Ae=u.exitFullscreenHelper_();Ae&&(Ae.then(ie,ie),Ae.then(A,L));})):this.exitFullscreenHelper_();},P.exitFullscreenHelper_=function(){var u,T=this;if(this.fsApi_.requestFullscreen)return(u=_.a[this.fsApi_.exitFullscreen]())&&Xo(u.then(function(){return T.isFullscreen(!1);})),u;this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow();},P.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=_.a.documentElement.style.overflow,pn(_.a,"keydown",this.boundFullWindowOnEscKey_),_.a.documentElement.style.overflow="hidden",ht(_.a.body,"vjs-full-window"),this.trigger("enterFullWindow");},P.fullWindowOnEscKey=function(u){x.a.isEventKey(u,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen());},P.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,yn(_.a,"keydown",this.boundFullWindowOnEscKey_),_.a.documentElement.style.overflow=this.docOrigOverflow,Et(_.a.body,"vjs-full-window"),this.trigger("exitFullWindow");},P.disablePictureInPicture=function(u){if(u===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",u),this.options_.disablePictureInPicture=u,this.trigger("disablepictureinpicturechanged");},P.isInPictureInPicture=function(u){if(u===void 0)return!!this.isInPictureInPicture_;this.isInPictureInPicture_=!!u,this.togglePictureInPictureClass_();},P.requestPictureInPicture=function(){if("pictureInPictureEnabled"in _.a&&this.disablePictureInPicture()===!1)return this.techGet_("requestPictureInPicture");},P.exitPictureInPicture=function(){if("pictureInPictureEnabled"in _.a)return _.a.exitPictureInPicture();},P.handleKeyDown=function(u){var T=this.options_.userActions;T&&T.hotkeys&&(function(A){var L=A.tagName.toLowerCase();return A.isContentEditable?!0:L==="input"?["button","checkbox","hidden","radio","reset","submit"].indexOf(A.type)===-1:["textarea"].indexOf(L)!==-1;}(this.el_.ownerDocument.activeElement)||(typeof T.hotkeys=="function"?T.hotkeys.call(this,u):this.handleHotkeys(u)));},P.handleHotkeys=function(u){var L=this.options_.userActions?this.options_.userActions.hotkeys:{},T=L.fullscreenKey,T=T===void 0?function(ie){return x.a.isEventKey(ie,"f");}:T,A=L.muteKey,A=A===void 0?function(ie){return x.a.isEventKey(ie,"m");}:A,L=L.playPauseKey,L=L===void 0?function(ie){return x.a.isEventKey(ie,"k")||x.a.isEventKey(ie,"Space");}:L;T.call(this,u)?(u.preventDefault(),u.stopPropagation(),T=Wt.getComponent("FullscreenToggle"),_.a[this.fsApi_.fullscreenEnabled]!==!1&&T.prototype.handleClick.call(this,u)):A.call(this,u)?(u.preventDefault(),u.stopPropagation(),Wt.getComponent("MuteToggle").prototype.handleClick.call(this,u)):L.call(this,u)&&(u.preventDefault(),u.stopPropagation(),Wt.getComponent("PlayToggle").prototype.handleClick.call(this,u));},P.canPlayType=function(u){for(var T=0,A=this.options_.techOrder;T<A.length;T++){var L=A[T],ie=Gn.getTech(L);
25if(ie=ie||Wt.getComponent(L)){if(ie.isSupported()&&(ie=ie.canPlayType(u)))return ie;}else Z.error('The "'+L+'" tech is undefined. Skipped browser support check for that tech.');}return"";},P.selectSource=function(u){function T(Te,Ae,je){var Fe;return Te.some(function(He){return Ae.some(function(Qe){if(Fe=je(He,Qe))return!0;});}),Fe;}function A(Te,Ae){var je=Te[0];if(Te[1].canPlaySource(Ae,ie.options_[je.toLowerCase()]))return{source:Ae,tech:je};}var L,ie=this,pe=this.options_.techOrder.map(function(Te){return[Te,Gn.getTech(Te)];}).filter(function(je){var Ae=je[0],je=je[1];return je?je.isSupported():(Z.error('The "'+Ae+'" tech is undefined. Skipped browser support check for that tech.'),!1);}),pe=this.options_.sourceOrder?T(u,pe,(L=A,function(Te,Ae){return L(Ae,Te);})):T(pe,u,A);return pe||!1;},P.handleSrc_=function(u,T){var A=this;if(u===void 0)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var L,ie,pe=Eu(u);pe.length?(this.changingSrc_=!0,T||(this.cache_.sources=pe),this.updateSourceCaches_(pe[0]),vd(this,pe[0],function(Te,Ae){var je;if(A.middleware_=Ae,T||(A.cache_.sources=pe),A.updateSourceCaches_(Te),A.src_(Te))return 1<pe.length?A.handleSrc_(pe.slice(1)):(A.changingSrc_=!1,A.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage});},0),void A.triggerReady());je=A.tech_,Ae.forEach(function(Fe){return Fe.setTech&&Fe.setTech(je);});}),this.options_.retryOnError&&1<pe.length&&(L=function(){A.error(null),A.handleSrc_(pe.slice(1),!0);},ie=function(){A.off("error",L);},this.one("error",L),this.one("playing",ie),this.resetRetryOnError_=function(){A.off("error",L),A.off("playing",ie);})):this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage});},0);},P.src=function(u){return this.handleSrc_(u,!1);},P.src_=function(u){var T,A,L=this,ie=this.selectSource([u]);return!ie||(T=ie.tech,A=this.techName_,fr(T)!==fr(A)?(this.changingSrc_=!0,this.loadTech_(ie.tech,ie.source),this.tech_.ready(function(){L.changingSrc_=!1;})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",u):this.techCall_("src",u.src),this.changingSrc_=!1;},!0),!1);},P.load=function(){this.techCall_("load");},P.reset=function(){var u=this,T=this.options_.Promise||o.a.Promise;this.paused()||!T?this.doReset_():Xo(this.play().then(function(){return u.doReset_();}));},P.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Mo(this)&&this.trigger("playerreset");},P.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_();},P.resetProgressBar_=function(){this.currentTime(0);var T=this.controlBar||{},u=T.durationDisplay,T=T.remainingTimeDisplay;u&&u.updateContent(),T&&T.updateContent();},P.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_();},P.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange");},P.currentSources=function(){var u=this.currentSource(),T=[];return Object.keys(u).length!==0&&T.push(u),this.cache_.sources||T;},P.currentSource=function(){return this.cache_.source||{};},P.currentSrc=function(){return this.currentSource()&&this.currentSource().src||"";},P.currentType=function(){return this.currentSource()&&this.currentSource().type||"";},P.preload=function(u){if(u===void 0)return this.techGet_("preload");this.techCall_("setPreload",u),this.options_.preload=u;},P.autoplay=function(u){if(u===void 0)return this.options_.autoplay||!1;var T;typeof u=="string"&&/(any|play|muted)/.test(u)||u===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=u,this.manualAutoplay_(typeof u=="string"?u:"play"),T=!1):this.options_.autoplay=!!u,T=T===void 0?this.options_.autoplay:T,this.tech_&&this.techCall_("setAutoplay",T);},P.playsinline=function(u){return u!==void 0?(this.techCall_("setPlaysinline",u),this.options_.playsinline=u,this):this.techGet_("playsinline");},P.loop=function(u){if(u===void 0)return this.techGet_("loop");this.techCall_("setLoop",u),this.options_.loop=u;},P.poster=function(u){if(u===void 0)return this.poster_;(u=u||"")!==this.poster_&&(this.poster_=u,this.techCall_("setPoster",u),this.isPosterFromTech_=!1,this.trigger("posterchange"));},P.handleTechPosterChange_=function(){var u;(!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster&&(u=this.tech_.poster()||"")!==this.poster_&&(this.poster_=u,this.isPosterFromTech_=!0,this.trigger("posterchange"));},P.controls=function(u){if(u===void 0)return!!this.controls_;this.controls_!==(u=!!u)&&(this.controls_=u,this.usingNativeControls()&&this.techCall_("setControls",u),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
25sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()));},P.usingNativeControls=function(u){if(u===void 0)return!!this.usingNativeControls_;this.usingNativeControls_!==(u=!!u)&&(this.usingNativeControls_=u,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")));},P.error=function(u){var T,A=this;if(u===void 0)return this.error_||null;N("beforeerror").forEach(function(L){L=L(A,u),oe(L)&&!Array.isArray(L)||typeof L=="string"||typeof L=="number"||L===null?u=L:A.log.error("please return a value that MediaError expects in beforeerror hooks");}),this.options_.suppressNotSupportedError&&u&&u.code===4?(this.options_.suppressNotSupportedError=!(T=function(){this.error(u);}),this.any(["click","touchstart"],T),this.one("loadstart",function(){this.off(["click","touchstart"],T);})):u===null?(this.error_=u,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close()):(this.error_=new qr(u),this.addClass("vjs-error"),Z.error("(CODE:"+this.error_.code+" "+qr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),N("error").forEach(function(L){return L(A,A.error_);}));},P.reportUserActivity=function(u){this.userActivity_=!0;},P.userActive=function(u){if(u===void 0)return this.userActive_;(u=!!u)!==this.userActive_&&(this.userActive_=u,this.userActive_?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.tech_&&this.tech_.one("mousemove",function(T){T.stopPropagation(),T.preventDefault();}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")));},P.listenForUserActivity_=function(){function u(Ae){pe(),this.clearInterval(T);}var T,A,L,ie,pe=er(this,this.reportUserActivity),Te=(this.on("mousedown",function(){pe(),this.clearInterval(T),T=this.setInterval(pe,250);}),this.on("mousemove",function(Ae){Ae.screenX===A&&Ae.screenY===L||(A=Ae.screenX,L=Ae.screenY,pe());}),this.on("mouseup",u),this.on("mouseleave",u),this.getChild("controlBar"));!Te||Re||Y||(Te.on("mouseenter",function(Ae){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0;}),Te.on("mouseleave",function(Ae){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout;})),this.on("keydown",pe),this.on("keyup",pe),this.setInterval(function(){var Ae;this.userActivity_&&(this.userActivity_=!1,this.userActive(!0),this.clearTimeout(ie),(Ae=this.options_.inactivityTimeout)<=0||(ie=this.setTimeout(function(){this.userActivity_||this.userActive(!1);},Ae)));},250);},P.playbackRate=function(u){if(u===void 0)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",u);},P.defaultPlaybackRate=function(u){return u!==void 0?this.techCall_("setDefaultPlaybackRate",u):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1;},P.isAudio=function(u){if(u===void 0)return!!this.isAudio_;this.isAudio_=!!u;},P.enableAudioOnlyUI_=function(){var u=this,T=(this.addClass("vjs-audio-only-mode"),this.children()),A=this.getChild("ControlBar"),L=A&&A.currentHeight();T.forEach(function(ie){ie!==A&&ie.el_&&!ie.hasClass("vjs-hidden")&&(ie.hide(),u.audioOnlyCache_.hiddenChildren.push(ie));}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(L),this.trigger("audioonlymodechange");},P.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(u){return u.show();}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange");},P.audioOnlyMode=function(u){var T=this;if(typeof u!="boolean"||u===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=u;var A,L=this.options_.Promise||o.a.Promise;if(L)return u?(A=[],this.isInPictureInPicture()&&A.push(this.exitPictureInPicture()),this.isFullscreen()&&A.push(this.exitFullscreen()),this.audioPosterMode()&&A.push(this.audioPosterMode(!1)),L.all(A).then(function(){return T.enableAudioOnlyUI_();})):L.resolve().then(function(){return T.disableAudioOnlyUI_();});u?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_();},P.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange");},P.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange");},P.audioPosterMode=function(u){var T=this;if(typeof u!="boolean"||u===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=u;var A=this.options_.Promise||o.a.Promise;if(A)return u?(this.audioOnlyMode()?this.audioOnlyMode(!1):A.resolve()).then(function(){T.enablePosterModeUI_();}):A.resolve().then(function(){T.disablePosterModeUI_();});u?(this.audioOnlyMode()&&this.audioOnlyMode(!1),this.enablePosterModeUI_()):this.disablePosterModeUI_();},P.addTextTrack=function(u,T,A){if(this.tech_)return this.tech_.addTextTrack(u,T,A);},P.addRemoteTextTrack=function(u,T){if(this.tech_)return this.tech_.addRemoteTextTrack(u,T);},P.removeRemoteTextTrack=function(u){var T=(T=(u=u===void 0?{}:u).track)||u;if(this.tech_)return this.tech_.removeRemoteTextTrack(T);},P.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality");},P.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0;},P.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0;},P.language=function(u){if(u===void 0)return this.language_;this.language_!==String(u).toLowerCase()&&(this.language_=String(u).toLowerCase(),Mo(this)&&this.trigger("languagechange"));},P.languages=function(){return Kn(R.prototype.options_.languages,this.languages_);},P.toJSON=function(){var u=Kn(this.options_),T=u.tracks;u.tracks=[];for(var A=0;A<T.length;A++){var L=T[A];(L=Kn(L)).player=void 0,u.tracks[A]=L;}return u;},P.createModal=function(u,T){var A=this,L=((T=T||{}).content=u||"",new ms(this,T));return this.addChild(L),L.on("dispose",function(){A.removeChild(L);}),L.open(),L;},P.updateCurrentBreakpoint_=function(){if(this.responsive())for(var u=this.currentBreakpoint(),T=this.currentWidth(),A=0;A<Xt.length;A++){var L=Xt[A];
25if(T<=this.breakpoints_[L]){if(u===L)return;u&&this.removeClass(pi[u]),this.addClass(pi[L]),this.breakpoint_=L;break;}}},P.removeCurrentBreakpoint_=function(){var u=this.currentBreakpointClass();this.breakpoint_="",u&&this.removeClass(u);},P.breakpoints=function(u){return u!==void 0&&(this.breakpoint_="",this.breakpoints_=J({},vi,u),this.updateCurrentBreakpoint_()),J(this.breakpoints_);},P.responsive=function(u){return u===void 0?this.responsive_:(u=!!u)!==this.responsive_?((this.responsive_=u)?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),u):void 0;},P.currentBreakpoint=function(){return this.breakpoint_;},P.currentBreakpointClass=function(){return pi[this.breakpoint_]||"";},P.loadMedia=function(u,T){var A,L,ie,pe=this;u&&typeof u=="object"&&(this.reset(),this.cache_.media=Kn(u),A=(u=this.cache_.media).artwork,L=u.poster,ie=u.src,u=u.textTracks,!A&&L&&(this.cache_.media.artwork=[{src:L,type:tr(L)}]),ie&&this.src(ie),L&&this.poster(L),Array.isArray(u)&&u.forEach(function(Te){return pe.addRemoteTextTrack(Te,!1);}),this.ready(T));},P.getMedia=function(){var u,T;return this.cache_.media?Kn(this.cache_.media):(u=this.poster(),T={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(A){return{kind:A.kind,label:A.label,language:A.language,src:A.src};})},u&&(T.poster=u,T.artwork=[{src:T.poster,type:tr(T.poster)}]),T);},R.getTagSettings=function(u){var T,A={sources:[],tracks:[]},L=Ut(u),ie=L["data-setup"];if(ot(u,"vjs-fill")&&(L.fill=!0),ot(u,"vjs-fluid")&&(L.fluid=!0),ie!==null&&(T=(ie=b()(ie||"{}"))[0],ie=ie[1],T&&Z.error(T),J(L,ie)),J(A,L),u.hasChildNodes())for(var pe=u.childNodes,Te=0,Ae=pe.length;Te<Ae;Te++){var je=pe[Te],Fe=je.nodeName.toLowerCase();Fe==="source"?A.sources.push(Ut(je)):Fe==="track"&&A.tracks.push(Ut(je));}return A;},P.flexNotSupported_=function(){var u=_.a.createElement("i");return!("flexBasis"in u.style||"webkitFlexBasis"in u.style||"mozFlexBasis"in u.style||"msFlexBasis"in u.style||"msFlexOrder"in u.style);},P.debug=function(u){if(u===void 0)return this.debugEnabled_;u?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1);},P.playbackRates=function(u){if(u===void 0)return this.cache_.playbackRates;Array.isArray(u)&&u.every(function(T){return typeof T=="number";})&&(this.cache_.playbackRates=u,this.trigger("playbackrateschange"));},R;}(Wt),ai=(Yr.names.forEach(function(k){var R=Yr[k];ki.prototype[R.getterName]=function(){return this.tech_?this.tech_[R.getterName]():(this[R.privateName]=this[R.privateName]||new R.ListClass(),this[R.privateName]);};}),ki.prototype.crossorigin=ki.prototype.crossOrigin,ki.players={},o.a.navigator),qt=(ki.prototype.options_={techOrder:Gn.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ai&&(ai.languages&&ai.languages[0]||ai.userLanguage||ai.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(k){ki.prototype[k]=function(){return this.techGet_(k);};}),Tt.forEach(function(k){ki.prototype["handleTech"+fr(k)+"_"]=function(){return this.trigger(k);};}),Wt.registerComponent("Player",ki),"plugin"),fi="activePlugins_",di={},ni=function(){function k(P){if(this.constructor===k)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=P,this.log||(this.log=this.player.log.createLogger(this.name)),Ls(this),delete this.trigger,ka(this,this.constructor.defaultState),Cd(P,this.name),this.dispose=this.dispose.bind(this),P.on("dispose",this.dispose);}var R=k.prototype;return R.version=function(){return this.constructor.VERSION;},R.getEventHash=function(P){return(P=P===void 0?{}:P).name=this.name,P.plugin=this.constructor,P.instance=this,P;},R.trigger=function(P,u){return hr(this.eventBusEl_,P,this.getEventHash(u=u===void 0?{}:u));},R.handleStateChanged=function(P){},R.dispose=function(){var P=this.name,u=this.player;this.trigger("dispose"),this.off(),u.off("dispose",this.dispose),u[fi][P]=!1,this.player=this.state=null,u[P]=Od(P,di[P]);},k.isBasic=function(P){return P=typeof P=="string"?nc(P):P,typeof P=="function"&&!k.prototype.isPrototypeOf(P.prototype);},k.registerPlugin=function(P,u){if(typeof P!="string")throw new Error('Illegal plugin name, "'+P+'", must be a string, was '+typeof P+".");if(ic(P))Z.warn('A plugin named "'+P+'" already exists. You may want to avoid re-registering plugins!');else if(ki.prototype.hasOwnProperty(P))throw new Error('Illegal plugin name, "'+P+'", cannot share a name with an existing player method!');if(typeof u!="function")throw new Error('Illegal plugin for "'+P+'", must be a function, was '+typeof u+".");return di[P]=u,P!==qt&&(k.isBasic(u)?ki.prototype[P]=cf(P,u):ki.prototype[P]=Od(P,u)),u;},k.deregisterPlugin=function(P){if(P===qt)throw new Error("Cannot de-register base plugin.");
25ic(P)&&(delete di[P],delete ki.prototype[P]);},k.getPlugins=function(P){var u;return(P=P===void 0?Object.keys(di):P).forEach(function(T){var A=nc(T);A&&((u=u||{})[T]=A);}),u;},k.getPluginVersion=function(P){return P=nc(P),P&&P.VERSION||"";},k;}(),Hi=(ni.getPlugin=nc,ni.BASE_PLUGIN_NAME=qt,ni.registerPlugin(qt,ni),ki.prototype.usingPlugin=function(k){return!!this[fi]&&this[fi][k]===!0;},!(ki.prototype.hasPlugin=function(k){return!!ic(k);}));function rt(k,R,P){if(T=rt.getPlayer(k))R&&Z.warn('Player "'+k+'" is already initialised. Options will not be applied.'),P&&T.ready(P);else{var u=typeof k=="string"?Pi("#"+Pd(k)):k;if(!Se(u))throw new TypeError("The element or ID supplied is not valid. (videojs)");u.ownerDocument.defaultView&&u.ownerDocument.body.contains(u)||Z.warn("The element supplied is not included in the DOM"),(R=R||{}).restoreEl===!0&&(R.restoreEl=(u.parentNode&&u.parentNode.hasAttribute("data-vjs-player")?u.parentNode:u).cloneNode(!0)),N("beforesetup").forEach(function(A){A=A(u,Kn(R)),!oe(A)||Array.isArray(A)?Z.error("please return an object in beforesetup hooks"):R=Kn(R,A);});var T=new(Wt.getComponent("Player"))(u,R,P);N("setup").forEach(function(A){return A(T);});}return T;}rt.hooks_=M,rt.hooks=N,rt.hook=function(k,R){N(k,R);},rt.hookOnce=function(k,R){N(k,[].concat(R).map(function(P){return function u(){return G(k,u),P.apply(void 0,arguments);};}));},rt.removeHook=G,o.a.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&ye()&&!(dn=Pi(".vjs-styles-defaults"))&&(dn=Ui("vjs-styles-defaults"),(El=Pi("head"))&&El.insertBefore(dn,El.firstChild),nn(dn,` 26 .video-js { 27 width: 300px; 28 height: 150px; 29 } 30 31 .vjs-fluid:not(.vjs-audio-only-mode) { 32 padding-top: 56.25% 33 } 34 `)),ji(1,rt),rt.VERSION="7.21.6",rt.options=ki.prototype.options_,rt.getPlayers=function(){return ki.players;},rt.getPlayer=function(k){var R=ki.players;if(typeof k=="string"){var P=Pd(k),u=R[P];if(u)return u;u=Pi("#"+P);}else u=k;if(Se(u)&&(P=u,k=P.player,u=P.playerId,k||R[u]))return k||R[u];},rt.getAllPlayers=function(){return Object.keys(ki.players).map(function(k){return ki.players[k];}).filter(Boolean);},rt.players=ki.players,rt.getComponent=Wt.getComponent,rt.registerComponent=function(k,R){Gn.isTech(R)&&Z.warn("The "+k+" tech w
34as registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Wt.registerComponent.call(Wt,k,R);},rt.getTech=Gn.getTech,rt.registerTech=Gn.registerTech,rt.use=function(k,R){Aa[k]=Aa[k]||[],Aa[k].push(R);},Object.defineProperty(rt,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(rt.middleware,"TERMINATOR",{value:js,writeable:!1,enumerable:!0}),rt.browser=W,rt.TOUCH_ENABLED=he,rt.extend=function(k,R){R===void 0&&(R={}),Hi||(Z.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Hi=!0);var P,u=function(){k.apply(this,arguments);},T={};for(P in typeof R=="object"?(R.constructor!==Object.prototype.constructor&&(u=R.constructor),T=R):typeof R=="function"&&(u=R),m()(u,k),k&&(u.super_=k),T)T.hasOwnProperty(P)&&(u.prototype[P]=T[P]);return u;},rt.mergeOptions=Kn,rt.bind=er,rt.registerPlugin=ni.registerPlugin,rt.deregisterPlugin=ni.deregisterPlugin,rt.plugin=function(k,R){return Z.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ni.registerPlugin(k,R);},rt.getPlugins=ni.getPlugins,rt.getPlugin=ni.getPlugin,rt.getPluginVersion=ni.getPluginVersion,rt.addLanguage=function(k,R){var P;return k=(""+k).toLowerCase(),rt.options.languages=Kn(rt.options.languages,((P={})[k]=R,P)),rt.options.languages[k];},rt.log=Z,rt.createLogger=re,rt.createTimeRange=rt.createTimeRanges=da,rt.formatTime=Fa,rt.setFormatTime=function(k){Jl=k;},rt.resetFormatTime=function(){Jl=Tu;},rt.parseUrl=Xl,rt.isCrossOrigin=Kl,rt.EventTarget=pr,rt.on=pn,rt.one=xi,rt.off=yn,rt.trigger=hr,rt.xhr=p.a,rt.TextTrack=Ko,rt.AudioTrack=Zl,rt.VideoTrack=ys,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(k){rt[k]=function(){return Z.warn("videojs."+k+"() is deprecated; use videojs.dom."+k+"() instead"),wn[k].apply(null,arguments);};}),rt.computedStyle=F,rt.dom=wn,rt.url=sf,rt.defineLazyProperty=Mu,rt.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});function ri(k,R,P){return k&&P&&P.responseURL&&R!==P.responseURL?P.responseURL:R;}function on(k,R){return Yg(k,function(P,u){return P-Ua<=R&&R<=u+Ua;});}function ur(k,R){return Yg(k,function(P){return R<=P-Gs;});}function xn(k){var R=[];if(!k||!k.length)return"";for(var P=0;P<k.length;P++)R.push(k.start(P)+" => "+k.end(P));return R.join(", ");}function Tn(k){for(var R=[],P=0;P<k.length;P++)R.push({start:k.start(P),end:k.end(P)});return R;}function Cn(k){if(k&&k.length&&k.end)return k.end(k.length-1);}function Vr(k,R){var P=0;if(k&&k.length)for(var u=0;u<k.length;u++){var T=k.start(u),A=k.end(u);A<R||(P+=T<R&&R<=A?A-R:A-T);}return P;}function fo(k,R){if(!R.preload)return R.duration;var P=0;return(R.parts||[]).forEach(function(u){P+=u.duration;}),(R.preloadHints||[]).forEach(function(u){u.type==="PART"&&(P+=k.partTargetDuration);}),P;}function Jo(k){return(k.segments||[]).reduce(function(R,P,u){return P.parts?P.parts.forEach(function(T,A){R.push({duration:T.duration,segmentIndex:u,partIndex:A,part:T,segment:P});}):R.push({duration:P.duration,segmentIndex:u,partIndex:null,segment:P,part:null}),R;},[]);}function Eo(k){return(k=k.segments&&k.segments.length&&k.segments[k.segments.length-1])&&k.parts||[];}function ea(k){var R;if(k=k.preloadSegment)return R=k.parts,(k=(k.preloadHints||[]).reduce(function(P,u){return P+(u.type==="PART"?1:0);},0))+(R&&R.length?R.length:0);}function Ro(k){var R=k.defaultDuration,P=k.durationList,u=k.startIndex,T=k.endIndex,A=0;if(T<u&&(u=(k=[T,u])[0],T=k[1]),u<0){for(var L=u;L<Math.min(0,T);L++)A+=R;u=0;}for(var ie=u;ie<T;ie++)A+=P[ie].duration;return A;}function sc(k,R,P,u){return k&&k.segments?k.endList?Qg(k):R===null?null:(R=Zg(k,k.mediaSequence+k.segments.length,R=R||0),P&&(R-=u=typeof u=="number"?u:Kg(null,k)),Math.max(0,R)):null;}function Fs(k){return k.excludeUntil&&k.excludeUntil>Date.now();}function Us(k){return k.excludeUntil&&k.excludeUntil===1/0;}function xl(k){var R=Fs(k);return!k.disabled&&!R;}function Id(k,R){return R.attributes&&R.attributes[k];}function Ru(k,R){if(k.playlists.length===1)return!0;var P=R.attributes.BANDWIDTH||Number.MAX_VALUE;return k.playlists.filter(function(u){return!!xl(u)&&(u.attributes.BANDWIDTH||0)<P;}).length===0;}
34function uf(k,R){return!(!k&&!R||!k&&R||k&&!R)&&(k===R||!(!k.id||!R.id||k.id!==R.id)||!(!k.resolvedUri||!R.resolvedUri||k.resolvedUri!==R.resolvedUri)||!(!k.uri||!R.uri||k.uri!==R.uri));}function Eg(k,R){var P,u=k&&k.mediaGroups&&k.mediaGroups.AUDIO||{},T=!1;for(P in u){for(var A in u[P])if(T=R(u[P][A]))break;if(T)break;}return!!T;}function G1(k,R,P){return"placeholder-uri-"+k+"-"+R+"-"+P;}function xg(k,R,P){P===void 0&&(P=G1),k.uri=R;for(var u=0;u<k.playlists.length;u++)k.playlists[u].uri||(k.playlists[u].uri="placeholder-uri-"+u);for(var T,A=Du(k),L=(cc(k,function(Te,Ae,je,Fe){if(!Te.playlists||!Te.playlists.length){if(A&&Ae==="AUDIO"&&!Te.uri)for(var He=0;He<k.playlists.length;He++){var Qe=k.playlists[He];if(Qe.attributes&&Qe.attributes.AUDIO&&Qe.attributes.AUDIO===je)return;}Te.playlists=[E()({},Te)];}Te.playlists.forEach(function(pt,Vt){var jt=P(Ae,je,Fe,pt),It=gf(Vt,jt);pt.uri?pt.resolvedUri=pt.resolvedUri||Ma(k.uri,pt.uri):(pt.uri=Vt===0?jt:It,pt.resolvedUri=pt.uri),pt.id=pt.id||It,pt.attributes=pt.attributes||{},k.playlists[pt.id]=pt,k.playlists[pt.uri]=pt;});}),k),ie=L.playlists.length;ie--;){var pe=L.playlists[ie];ey({playlist:pe,id:gf(ie,pe.uri)}),pe.resolvedUri=Ma(L.uri,pe.uri),L.playlists[pe.id]=pe,(L.playlists[pe.uri]=pe).attributes.BANDWIDTH||Jg.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.");}cc(T=k,function(Te){Te.uri&&(Te.resolvedUri=Ma(T.uri,Te.uri));});}function Tg(k,R){!k.resolvedUri&&k.uri&&(k.resolvedUri=Ma(R,k.uri)),k.key&&!k.key.resolvedUri&&(k.key.resolvedUri=Ma(R,k.key.uri)),k.map&&!k.map.resolvedUri&&(k.map.resolvedUri=Ma(R,k.map.uri)),k.map&&k.map.key&&!k.map.key.resolvedUri&&(k.map.key.resolvedUri=Ma(R,k.map.key.uri)),k.parts&&k.parts.length&&k.parts.forEach(function(P){P.resolvedUri||(P.resolvedUri=Ma(R,P.uri));}),k.preloadHints&&k.preloadHints.length&&k.preloadHints.forEach(function(P){P.resolvedUri||(P.resolvedUri=Ma(R,P.uri));});}function Cg(k){var R=k.segments||[],P=k.preloadSegment;if(P&&P.parts&&P.parts.length){if(P.preloadHints){for(var u=0;u<P.preloadHints.length;u++)if(P.preloadHints[u].type==="MAP")return R;}P.duration=k.targetDuration,P.preload=!0,R.push(P);}return R;}function df(k,R,P){P===void 0&&(P=ty);var u=Rd(k,{}),T=u.playlists[R.id];if(!T||P(T,R))return null;R.segments=Cg(R);var A=Rd(T,R);if(A.preloadSegment&&!R.preloadSegment&&delete A.preloadSegment,T.segments){if(R.skip){R.segments=R.segments||[];for(var L=0;L<R.skip.skippedSegments;L++)R.segments.unshift({skipped:!0});}A.segments=function(pe,Te,Ae){for(var je,Fe=pe.slice(),He=Te.slice(),Qe=(Ae=Ae||0,[]),pt=0;pt<He.length;pt++){var Vt=Fe[pt+Ae],jt=He[pt];Vt?(je=Vt.map||je,Qe.push(nw(Vt,jt))):(je&&!jt.map&&(jt.map=je),Qe.push(jt));}return Qe;}(T.segments,R.segments,R.mediaSequence-T.mediaSequence);}A.segments.forEach(function(pe){Tg(pe,A.resolvedUri);});for(var ie=0;ie<u.playlists.length;ie++)u.playlists[ie].id===R.id&&(u.playlists[ie]=A);return u.playlists[R.id]=A,u.playlists[R.uri]=A,cc(k,function(pe,Te,Ae,je){if(pe.playlists)for(var Fe=0;Fe<pe.playlists.length;Fe++)R.id===pe.playlists[Fe].id&&(pe.playlists[Fe]=A);}),u;}function hf(k,R){var P=(P=k.segments||[])[P.length-1],u=(u=P&&P.parts&&P.parts[P.parts.length-1])&&u.duration||P&&P.duration;return R&&u?1e3*u:500*(k.partTargetDuration||k.targetDuration||10);}function pf(k,R,P,u){var T=k.responseType==="arraybuffer"?k.response:k.responseText;!R&&T&&(k.responseTime=Date.now(),k.roundTripTime=k.responseTime-k.requestTime,k.bytesReceived=T.byteLength||T.length,k.bandwidth||(k.bandwidth=Math.floor(k.bytesReceived/k.roundTripTime*8*1e3))),P.headers&&(k.responseHeaders=P.headers),R&&R.code==="ETIMEDOUT"&&(k.timedout=!0),u(R=R||k.aborted||P.statusCode===200||P.statusCode===206||P.statusCode===0?R:new Error("XHR Failed with a response of: "+(k&&(T||k.responseText))),k);}function Og(){function k(R,P){R=ow({timeout:45e3},R);var u=k.beforeRequest||rt.Vhs.xhr.beforeRequest,T=(u&&typeof u=="function"&&(u=u(R))&&(R=u),(rt.Vhs.xhr.original===!0?rw:rt.Vhs.xhr)(R,function(L,ie){return pf(T,L,ie,P);})),A=T.abort;return T.abort=function(){return T.aborted=!0,A.apply(T,arguments);}
34,T.uri=R.uri,T.requestTime=Date.now(),T;}return k.original=!0,k;}function ff(k){var R,P={};return k.byterange&&(P.Range=(k=k.byterange,R=k.offset,k=typeof k.offset=="bigint"||typeof k.length=="bigint"?o.a.BigInt(k.offset)+o.a.BigInt(k.length)-o.a.BigInt(1):k.offset+k.length-1,"bytes="+R+"-"+k)),P;}function z1(k,R){return k=k.toString(16),"00".substring(0,2-k.length)+k+(R%2?" ":"");}function H1(k){return 32<=k&&k<126?String.fromCharCode(k):".";}function Pg(k){var R={};return Object.keys(k).forEach(function(P){var u=k[P];Object(f.e)(u)?R[P]={bytes:u.buffer,byteOffset:u.byteOffset,byteLength:u.byteLength}:R[P]=u;}),R;}function kd(k){var R=k.byterange||{length:1/0,offset:0};return[R.length,R.offset,k.resolvedUri].join(",");}function Ig(k){return k.resolvedUri;}function kg(k){for(var R=Array.prototype.slice.call(k),P="",u=0;u<R.length/16;u++)P+=R.slice(16*u,16*u+16).map(z1).join("")+" "+R.slice(16*u,16*u+16).map(H1).join("")+` 35`;return P;}function $1(k){var R=k.playlist,P=(P=k.time)===void 0?void 0:P;if(!(k=k.callback))throw new Error("getProgramTime: callback must be provided");if(!R||P===void 0)return k({message:"getProgramTime: playlist and time must be provided"});if(!(R=function(T,A){if(!A||!A.segments||A.segments.length===0)return null;for(var L,ie=0,pe=0;pe<A.segments.length&&!(T<=(ie=(L=A.segments[pe]).videoTimingInfo?L.videoTimingInfo.transmuxedPresentationEnd:ie+L.duration));pe++);var Te=A.segments[A.segments.length-1];if(Te.videoTimingInfo&&Te.videoTimingInfo.transmuxedPresentationEnd<T)return null;if(ie<T){if(T>ie+Te.duration*iy)return null;L=Te;}return{segment:L,estimatedStart:L.videoTimingInfo?L.videoTimingInfo.transmuxedPresentationStart:ie-L.duration,type:L.videoTimingInfo?"accurate":"estimate"};}(P,R)))return k({message:"valid programTime was not found"});if(R.type==="estimate")return k({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:R.estimatedStart});var u={mediaSeconds:P};return(P=function(ie,A){if(!A.dateTimeObject)return null;var L=A.videoTimingInfo.transmuxerPrependedSeconds,ie=ie-(A.videoTimingInfo.transmuxedPresentationStart+L);return new Date(A.dateTimeObject.getTime()+1e3*ie);}(P,R.segment))&&(u.programDateTime=P.toISOString()),k(null,u);}function Ag(k){var R,P=k.programTime,u=k.playlist,T=k.retryCount,A=T===void 0?2:T,L=k.seekTo,ie=(T=k.pauseAfterSeek)===void 0||T,pe=k.tech,Te=k.callback;if(Te)return P!==void 0&&u&&L?u.endList||pe.hasStarted_?function(Ae){if(!Ae.segments||Ae.segments.length===0)return!1;for(var je=0;je<Ae.segments.length;je++)if(!Ae.segments[je].dateTimeObject)return!1;return!0;}(u)?(T=function(pt,je){var Fe;try{Fe=new Date(pt);}catch{return null;}if(!je||!je.segments||je.segments.length===0||Fe<(Qe=je.segments[0]).dateTimeObject)return null;for(var He=0;He<je.segments.length-1;He++){var Qe=je.segments[He];if(Fe<je.segments[He+1].dateTimeObject)break;}var pt=je.segments[je.segments.length-1],Vt=pt.dateTimeObject,jt=pt.videoTimingInfo?aw(pt.videoTimingInfo):pt.duration+pt.duration*iy;return new Date(Vt.getTime()+1e3*jt)<Fe?null:{segment:Qe=Vt<Fe?pt:Qe,estimatedStart:Qe.videoTimingInfo?Qe.videoTimingInfo.transmuxedPresentationStart:Fo.duration(je,je.mediaSequence+je.segments.indexOf(Qe)),type:Qe.videoTimingInfo?"accurate":"estimate"};}(P,u))?(R=function(Ae,je){var Fe,He;try{Fe=new Date(Ae),He=new Date(je);}catch{}return Ae=Fe.getTime(),(He.getTime()-Ae)/1e3;}((k=T.segment).dateTimeObject,P),T.type==="estimate"?A===0?Te({message:P+" is not buffered yet. Try again"}):(L(T.estimatedStart+R),void pe.one("seeked",function(){Ag({programTime:P,playlist:u,retryCount:A-1,seekTo:L,pauseAfterSeek:ie,tech:pe,callback:Te});})):(T=k.start+R,pe.one("seeked",function(){return Te(null,pe.currentTime());}),ie&&pe.pause(),void L(T))):Te({message:P+" was not found in the stream"}):Te({message:"programDateTime tags must be provided in the manifest "+u.resolvedUri}):Te({message:"player must be playing a live stream to start buffering"}):Te({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});throw new Error("seekToProgramTime: callback must be provided");}function Mg(k,R){if(k.readyState===4)return R();}function W1(k,R,P){function u(Te,Ae,je,Fe){return Ae.abort(),ie=!0,P(Te,Ae,je,Fe);}
35function T(Te,Ae){if(!ie){if(Te)return u(Te,Ae,"",L);var je=Ae.responseText.substring(L&&L.byteLength||0,Ae.responseText.length);return L=Object(f.d)(L,Object(f.h)(je,!0)),A=A||Object(w.a)(L),L.length<10||A&&L.length<A+2?Mg(Ae,function(){return u(Te,Ae,"",L);}):(je=Object(C.a)(L),je==="ts"&&L.length<188||!je&&L.length<376?Mg(Ae,function(){return u(Te,Ae,"",L);}):u(null,Ae,je,L));}}var A,L=[],ie=!1,pe=R({uri:k,beforeSend:function(Te){Te.overrideMimeType("text/plain; charset=x-user-defined"),Te.addEventListener("progress",function(Ae){return Ae.total,Ae.loaded,pf(Te,null,{statusCode:Te.status},T);});}},function(Te,Ae){return pf(pe,Te,Ae,T);});return pe;}function Rg(k,R){if(!ty(k,R)||k.sidx&&R.sidx&&(k.sidx.offset!==R.sidx.offset||k.sidx.length!==R.sidx.length)||!k.sidx&&R.sidx||k.sidx&&!R.sidx||k.segments&&!R.segments||!k.segments&&R.segments)return!1;if(k.segments||R.segments)for(var P=0;P<k.segments.length;P++){var u=k.segments[P],T=R.segments[P];if(u.uri!==T.uri||(u.byterange||T.byterange)&&(u=u.byterange,T=T.byterange,u&&!T||!u&&T||u.offset!==T.offset||u.length!==T.length))return!1;}return!0;}function q1(k,R,P,u){return"placeholder-uri-"+k+"-"+R+"-"+(u.attributes.NAME||P);}function Y1(k,R,P){for(var u,T,A=!0,L=ny(k,{duration:R.duration,minimumUpdatePeriod:R.minimumUpdatePeriod,timelineStarts:R.timelineStarts}),ie=0;ie<R.playlists.length;ie++){var pe=R.playlists[ie],Te=(pe.sidx&&(Te=Object(v.b)(pe.sidx),P&&P[Te]&&P[Te].sidx&&Object(v.a)(pe,P[Te].sidx,pe.sidx.resolvedUri)),df(L,pe,Rg));Te&&(L=Te,A=!1);}return cc(R,function(Ae,je,Fe,He){var Qe,pt;Ae.playlists&&Ae.playlists.length&&(Qe=Ae.playlists[0].id,(pt=df(L,Ae.playlists[0],Rg))&&(He in(L=pt).mediaGroups[je][Fe]||(L.mediaGroups[je][Fe][He]=Ae),L.mediaGroups[je][Fe][He].playlists[0]=L.playlists[Qe],A=!1));}),T=R,cc(u=L,function(Ae,je,Fe,He){He in T.mediaGroups[je][Fe]||delete u.mediaGroups[je][Fe][He];}),(A=R.minimumUpdatePeriod===k.minimumUpdatePeriod&&A)?null:L;}function Lg(k,R){var P,u={};for(P in k){var T=k[P].sidx;if(T){var A=Object(v.b)(T);if(!R[A])break;var L=R[A].sidxInfo;sw(L,T)&&(u[A]=R[A]);}}return u;}function Dg(k){return k.on=k.addEventListener,k.off=k.removeEventListener,k;}function Ng(k){return function(){var R=function(T){try{return URL.createObjectURL(new Blob([T],{type:"application/javascript"}));}catch{var A=new BlobBuilder();return A.append(T),URL.createObjectURL(A.getBlob());}}(k),P=Dg(new Worker(R)),u=(P.objURL=R,P.terminate);return P.on=P.addEventListener,P.off=P.removeEventListener,P.terminate=function(){return URL.revokeObjectURL(R),u.call(this);},P;};}function Vg(k){return"var browserWorkerPolyFill = "+Dg.toString()+`; 36browserWorkerPolyFill(self); 37`+k;}function jg(k){return k.toString().replace(/^function.+?{/,"").slice(0,-1);}function Bg(k){var R=k.transmuxer,P=k.bytes,u=k.audioAppendStart,T=k.gopsToAlignWith,A=k.remux,L=k.onData,ie=k.onTrackInfo,pe=k.onAudioTimingInfo,Te=k.onVideoTimingInfo,Ae=k.onVideoSegmentTimingInfo,je=k.onAudioSegmentTimingInfo,Fe=k.onId3,He=k.onCaptions,Qe=k.onDone,pt=k.onEndedTimeline,Vt=k.onTransmuxerLog,jt=k.isEndOfTimeline,It={buffer:[]},wi=jt;R.onmessage=function(Jt){R.currentTransmux===k&&(Jt.data.action==="data"&&uw(Jt,It,L),Jt.data.action==="trackinfo"&&ie(Jt.data.trackInfo),Jt.data.action==="gopInfo"&&hw(Jt,It),Jt.data.action==="audioTimingInfo"&&pe(Jt.data.audioTimingInfo),Jt.data.action==="videoTimingInfo"&&Te(Jt.data.videoTimingInfo),Jt.data.action==="videoSegmentTimingInfo"&&Ae(Jt.data.videoSegmentTimingInfo),Jt.data.action==="audioSegmentTimingInfo"&&je(Jt.data.audioSegmentTimingInfo),Jt.data.action==="id3Frame"&&Fe([Jt.data.id3Frame],Jt.data.id3Frame.dispatchType),Jt.data.action==="caption"&&He(Jt.data.caption),Jt.data.action==="endedtimeline"&&(wi=!1,pt()),Jt.data.action==="log"&&Vt(Jt.data.log),Jt.data.type!=="transmuxed"||wi||(R.onmessage=null,dw({transmuxedData:It,callback:Qe}),ry(R)));},u&&R.postMessage({action:"setAudioAppendStart",appendStart:u}),Array.isArray(T)&&R.postMessage({action:"alignGopsWith",gopsToAlignWith:T}),A!==void 0&&R.postMessage({action:"setRemux",remux:A}),P.byteLength&&(u=P instanceof ArrayBuffer?P:P.buffer,T=P instanceof ArrayBuffer?0:P.byteOffset,R.postMessage({action:"push",data:u,byteOffset:T,byteLength:P.byteLength},[u])),jt&&R.postMessage({action:"endTimeline"}),R.postMessage({action:"flush"});}function X1(k,R){R.currentTransmux?R.transmuxQueue.push(oy.bind(null,R,k)):(R.currentTransmux=k,oy(R,k));}function K1(k){k.transmuxer.currentTransmux?k.transmuxer.transmuxQueue.push(k):(k.transmuxer.currentTransmux=k,Bg(k));}function Ad(k){var R,P=k.transmuxer,u=k.endAction||k.action,T=k.callback,A=E()({},k,{endAction:null,transmuxer:null,callback:null});P.addEventListener("message",function L(ie){ie.data.action===u&&(P.removeEventListener("message",L),ie.data.data&&(ie.data.data=new Uint8Array(ie.data.data,k.byteOffset||0,k.byteLength||ie.data.data.byteLength),k.data&&(k.data=ie.data.data)),T(ie.data));}),k.data?(R=k.data instanceof ArrayBuffer,A.byteOffset=R?0:k.data.byteOffset,A.byteLength=k.data.byteLength,R=[R?k.data:k.data.buffer],P.postMessage(A,R)):P.postMessage(A);}function Fg(k,R,P){return function(L,T){var A=T.response,L=_f(L,T);if(L)return P(L,k);if(A.byteLength!==16)return P({status:T.status,message:"Invalid HLS key at URL: "+T.uri,code:Ga.FAILURE,xhr:T},k);for(var L=new DataView(A),ie=new Uint32Array([L.getUint32(0),L.getUint32(4),L.getUint32(8),L.getUint32(12)]),pe=0;pe<R.length;pe++)R[pe].bytes=ie;return P(null,k);};}function Z1(Qe){var R=Qe.segment,P=Qe.bytes,u=Qe.trackInfoFn,T=Qe.timingInfoFn,A=Qe.videoSegmentTimingInfoFn,L=Qe.audioSegmentTimingInfoFn,ie=Qe.id3Fn,pe=Qe.captionsFn,Te=Qe.isEndOfTimeline,Ae=Qe.endedTimelineFn,je=Qe.dataFn,Fe=Qe.doneFn,He=Qe.onTransmuxerLog,Qe=R.map&&R.map.tracks||{},pt=!!(Qe.audio&&Qe.video),Vt=T.bind(null,R,"audio","start"),jt=T.bind(null,R,"audio","end"),It=T.bind(null,R,"video","start"),wi=T.b
37ind(null,R,"video","end");Ad({action:"probeTs",transmuxer:R.transmuxer,data:P,baseStartTime:R.baseStartTime,callback:function(Jt){R.bytes=P=Jt.data,Jt=Jt.result,Jt&&(u(R,{hasAudio:Jt.hasAudio,hasVideo:Jt.hasVideo,isMuxed:pt}),u=null,Jt.hasAudio&&!pt&&Vt(Jt.audioStart),Jt.hasVideo&&It(Jt.videoStart),It=Vt=null),K1({bytes:P,transmuxer:R.transmuxer,audioAppendStart:R.audioAppendStart,gopsToAlignWith:R.gopsToAlignWith,remux:pt,onData:function(Ct){Ct.type=Ct.type==="combined"?"video":Ct.type,je(R,Ct);},onTrackInfo:function(Ct){u&&(pt&&(Ct.isMuxed=!0),u(R,Ct));},onAudioTimingInfo:function(Ct){Vt&&Ct.start!==void 0&&(Vt(Ct.start),Vt=null),jt&&Ct.end!==void 0&&jt(Ct.end);},onVideoTimingInfo:function(Ct){It&&Ct.start!==void 0&&(It(Ct.start),It=null),wi&&Ct.end!==void 0&&wi(Ct.end);},onVideoSegmentTimingInfo:function(Ct){A(Ct);},onAudioSegmentTimingInfo:function(Ct){L(Ct);},onId3:function(Ct,yi){ie(R,Ct,yi);},onCaptions:function(Ct){pe(R,[Ct]);},isEndOfTimeline:Te,onEndedTimeline:function(){Ae();},onTransmuxerLog:He,onDone:function(Ct){Fe&&(Ct.type=Ct.type==="combined"?"video":Ct.type,Fe(null,R,Ct));}});}});}function Q1(Dn){function R(Nn,bn){if(!Vt){if(Nn)return Vt=!0,vf(P),He(Nn,bn);if((pt+=1)===P.length){var mr=function(){if(bn.encryptedBytes)return gw({decryptionWorker:u,segment:bn,trackInfoFn:T,timingInfoFn:A,videoSegmentTimingInfoFn:L,audioSegmentTimingInfoFn:ie,id3Fn:pe,captionsFn:Te,isEndOfTimeline:Ae,endedTimelineFn:je,dataFn:Fe,doneFn:He,onTransmuxerLog:Qe});ly({segment:bn,bytes:bn.bytes,trackInfoFn:T,timingInfoFn:A,videoSegmentTimingInfoFn:L,audioSegmentTimingInfoFn:ie,id3Fn:pe,captionsFn:Te,isEndOfTimeline:Ae,endedTimelineFn:je,dataFn:Fe,doneFn:He,onTransmuxerLog:Qe});};if(bn.endOfAllRequests=Date.now(),bn.map&&bn.map.encryptedBytes&&!bn.map.bytes)return cy({decryptionWorker:u,id:bn.requestId+"-init",encryptedBytes:bn.map.encryptedBytes,key:bn.map.key},function(na){bn.map.bytes=na,sy(bn,function(Tl){if(Tl)return vf(P),He(Tl,bn);mr();});});mr();}}}var P,u,T,A,L,ie,pe,Te,Ae,je,Fe,He,Qe,pt,Vt,jt,It,wi=Dn.xhr,Jt=Dn.xhrOptions,Ct=Dn.decryptionWorker,yi=Dn.segment,Ni=Dn.abortFn,$i=Dn.progressFn,Wi=Dn.trackInfoFn,kn=Dn.timingInfoFn,Ln=Dn.videoSegmentTimingInfoFn,Zn=Dn.audioSegmentTimingInfoFn,sr=Dn.id3Fn,Gr=Dn.captionsFn,no=Dn.isEndOfTimeline,zn=Dn.endedTimelineFn,ia=Dn.dataFn,Ar=Dn.doneFn,Dn=Dn.onTransmuxerLog,go=[],Dn=(P=(Ct={activeXhrs:go,decryptionWorker:Ct,trackInfoFn:Wi,timingInfoFn:kn,videoSegmentTimingInfoFn:Ln,audioSegmentTimingInfoFn:Zn,id3Fn:sr,captionsFn:Gr,isEndOfTimeline:no,endedTimelineFn:zn,dataFn:ia,doneFn:Ar,onTransmuxerLog:Dn}).activeXhrs,u=Ct.decryptionWorker,T=Ct.trackInfoFn,A=Ct.timingInfoFn,L=Ct.videoSegmentTimingInfoFn,ie=Ct.audioSegmentTimingInfoFn,pe=Ct.id3Fn,Te=Ct.captionsFn,Ae=Ct.isEndOfTimeline,je=Ct.endedTimelineFn,Fe=Ct.dataFn,He=Ct.doneFn,Qe=Ct.onTransmuxerLog,pt=0,Vt=!1,yi.key&&!yi.key.bytes&&(Ar=[yi.key],yi.map&&!yi.map.bytes&&yi.map.key&&yi.map.key.resolvedUri===yi.key.resolvedUri&&Ar.push(yi.map.key),Dn=wi(rt.mergeOptions(Jt,{uri:yi.key.resolvedUri,responseType:"arraybuffer"}),Fg(yi,Ar,R)),go.push(Dn)),yi.map&&!yi.map.bytes&&(!yi.map.key||yi.key&&yi.key.resolvedUri===yi.map.key.resolvedUri||(Ct=wi(rt.mergeOptions(Jt,{uri:yi.map.key.resolvedUri,responseType:"arraybuffer"}),Fg(yi,[yi.map.key],R)),go.push(Ct)),Ar=rt.mergeOptions(Jt,{uri:yi.map.resolvedUri,responseType:"arraybuffer",headers:ff(yi.map)}),jt=(Dn={segment:yi,finishProcessingFn:R}).segment,It=Dn.finishProcessingFn,Ct=wi(Ar,function(mr,bn){var mr=_f(mr,bn);return mr?It(mr,jt):(mr=new Uint8Array(bn.response),jt.map.key?(jt.map.encryptedBytes=mr,It(null,jt)):(jt.map.bytes=mr,void sy(jt,function(na){if(na)return na.xhr=bn,na.status=bn.status,It(na,jt);It(null,jt);})));}),go.push(Ct)),rt.mergeOptions(Jt,{uri:yi.part&&yi.part.resolvedUri||yi.resolvedUri,responseType:"arraybuffer",headers:ff(yi)}));Ar={segment:yi,finishProcessingFn:R,responseType:Dn.responseType},Hn=Ar.segment,hc=Ar.finishProcessingFn,pc=Ar.responseType,(Ct=wi(Dn,function(Nn,bn){return Nn=_f(Nn,bn),Nn?hc(Nn,Hn):(Nn=pc!=="arraybuffer"&&bn.responseText?lw(bn.responseText.substring(Hn.lastReachedChar||0)):bn.response,Hn.stats=fw(bn),Hn.key?Hn.encryptedBytes=new Uint8Array(Nn):Hn.bytes=new Uint8Array(Nn),hc(null,Hn));})).addEventListener("progress",(Ha=(Jt={segment:yi,progressFn:$i,trackInfoFn:Wi,timingInfoFn:kn,videoSegmentTimingInfoFn:Ln,audioSegmentTimingInfoFn:Zn,id3Fn:sr,captionsFn:Gr,isEndOfTimeline:no,endedTimelineFn:zn,dataFn:ia}).segment,Es=Jt.progressFn,Jt.trackInfoFn,Jt.timingInfoFn,Jt.videoSegmentTimingInfoFn,Jt.audioSegmentTimingInfoFn,Jt.id3Fn,Jt.captionsFn,Jt.isEndOfTimeline,Jt.endedTimelineFn,Jt.dataFn,function(Nn){var bn=Nn.target;if(!bn.aborted)return Ha.stats=rt.mergeOptions(Ha.stats,mw(Nn)),!Ha.stats.firstBytesReceivedAt&&Ha.stats.bytesReceived&&(Ha.stats.firstBytesReceivedAt=Date.now()),Es(Nn,Ha);})),go.push(Ct);var Hn,hc,pc,Ha,Es,xf={};return go.forEach(function(Nn){var bn,mr;Nn.addEventListener("loadend",(bn=(Nn={loadendState:xf,abortFn:Ni}).loadendState,mr=Nn.abortFn,function(na){na.target.aborted&&mr&&!bn.calledAbortFn&&(mr(),bn.calledAbortFn=!0);}));}),function(){return vf(go);};}function Ug(k){var R=0;return k.audio&&R++,k.video&&R++,R;}function Md(k,R){return(k=k&&o.a.getComputedStyle(k))?k[R]:"";}function mf(k,R){var P,u;return(P=(P=k.attributes.BANDWIDTH?k.attributes.BANDWIDTH:P)||o.a.Number.MAX_VALUE)-(u=(u=R.attributes.BANDWIDTH?R.attributes.BANDWIDTH:u)||o.a.Number.MAX_VALUE);}function Gg(k,R,P,u,T,A){if(k){var L={bandwidth:R,width:P,height:u,limitRenditionByPlayerDimensions:T},ie=k.playlists,k=(Fo.isAudioOnly(k)&&(ie=A.getAudioTrackPlaylists_(),L.audioOnly=!0),ie.map(function(It){var wi=It.attributes&&It.attributes.RESOLUTION&&It.attributes.RESOLUTION.width,Jt=It.attributes&&It.attributes.RESOLUTION&&It.attributes.RESOLUTION.height,Ct=It.attributes&&It.attributes.BANDWIDTH;return{bandwidth:Ct||o.a.Number.MAX_VALUE,width:wi,height:Jt,playlist:It};})),ie=(dc(k,function(It,wi){return It.bandwidth-wi.bandwidth;}),(k=k.filter(function(It){return!Fo.isIncompatible(It.playlist);})).filter(function(It){return Fo.isEnabled(It.playlist);}
37)),Qe=(ie=ie.length?ie:k.filter(function(It){return!Fo.isDisabled(It.playlist);})).filter(function(It){return It.bandwidth*io.BANDWIDTH_VARIANCE<R;}),He=Qe[Qe.length-1],pe=Qe.filter(function(It){return It.bandwidth===He.bandwidth;})[0];if(T===!1)return(T=pe||ie[0]||k[0])&&T.playlist?(Fe=pe?"bandwidthBestRep":"sortedPlaylistReps",ie[0]&&(Fe="enabledPlaylistReps"),Dd("choosing "+dy(T)+" using "+Fe+" with options",L),T.playlist):(Dd("could not choose a playlist with options",L),null);var Te,Ae,je,Fe=Qe.filter(function(It){return It.width&&It.height;}),T=(dc(Fe,function(It,wi){return It.width-wi.width;}),Fe.filter(function(It){return It.width===P&&It.height===u;})),He=T[T.length-1],Qe=T.filter(function(It){return It.bandwidth===He.bandwidth;})[0],A=(Qe||(T=(Te=Fe.filter(function(It){return It.width>P||It.height>u;})).filter(function(It){return It.width===Te[0].width&&It.height===Te[0].height;}),He=T[T.length-1],Ae=T.filter(function(It){return It.bandwidth===He.bandwidth;})[0]),A.experimentalLeastPixelDiffSelector&&(T=Fe.map(function(It){return It.pixelDiff=Math.abs(It.width-P)+Math.abs(It.height-u),It;}),dc(T,function(It,wi){return It.pixelDiff===wi.pixelDiff?wi.bandwidth-It.bandwidth:It.pixelDiff-wi.pixelDiff;}),je=T[0]),je||Ae||Qe||pe||ie[0]||k[0]);return A&&A.playlist?(Fe="sortedPlaylistReps",je?Fe="leastPixelDiffRep":Ae?Fe="resolutionPlusOneRep":Qe?Fe="resolutionBestRep":pe?Fe="bandwidthBestRep":ie[0]&&(Fe="enabledPlaylistReps"),Dd("choosing "+dy(A)+" using "+Fe+" with options",L),A.playlist):(Dd("could not choose a playlist with options",L),null);}}function zg(){var k=this.useDevicePixelRatio&&o.a.devicePixelRatio||1;return Gg(this.playlists.master,this.systemBandwidth,parseInt(Md(this.tech_.el(),"width"),10)*k,parseInt(Md(this.tech_.el(),"height"),10)*k,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_);}function J1(k){var R=k.inbandTextTracks,P=k.metadataArray,u=k.timestampOffset,T=k.videoDuration;if(P){var A=o.a.WebKitDataCue||o.a.VTTCue,L=R.metadataTrack_;if(L&&(P.forEach(function(Fe){var He=Fe.cueTime+u;!(typeof He!="number"||o.a.isNaN(He)||He<0)&&He<1/0&&Fe.frames.forEach(function(Qe){var pt,Vt=new A(He,He,Qe.value||Qe.url||Qe.data||"");Vt.frame=Qe,Vt.value=Qe,pt=Vt,Object.defineProperties(pt.frame,{id:{get:function(){return rt.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),pt.value.key;}},value:{get:function(){return rt.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),pt.value.data;}},privateData:{get:function(){return rt.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),pt.value.data;}}}),L.addCue(Vt);});}),L.cues&&L.cues.length)){for(var ie=L.cues,pe=[],Te=0;Te<ie.length;Te++)ie[Te]&&pe.push(ie[Te]);var Ae=pe.reduce(function(Fe,He){var Qe=Fe[He.startTime]||[];return Qe.push(He),Fe[He.startTime]=Qe,Fe;},{}),je=Object.keys(Ae).sort(function(Fe,He){return Number(Fe)-Number(He);});je.forEach(function(Qe,He){var Qe=Ae[Qe],pt=Number(je[He+1])||T;Qe.forEach(function(Vt){Vt.endTime=pt;});});}}}function Lu(k,R,P){var u,T;if(P&&P.cues)for(u=P.cues.length;u--;)(T=P.cues[u]).startTime>=k&&T.endTime<=R&&P.removeCue(T);}function Hg(k){return typeof k=="number"&&isFinite(k);}function lc(He){var R=He.startOfSegment,P=He.duration,u=He.segment,T=He.part,A=(Ae=He.playlist).mediaSequence,L=Ae.id,Ae=Ae.segments,ie=He.mediaIndex,pe=He.partIndex,Te=He.timeline,Ae=(Ae===void 0?[]:Ae).length-1,je="mediaIndex/partIndex increment",Fe=(He.getMediaInfoForTime?je="getMediaInfoForTime ("+He.getMediaInfoForTime+")":He.isSyncRequest&&(je="getSyncSegmentCandidate (isSyncRequest)"),He.independent&&(je+=" with independent "+He.independent),typeof pe=="number"),He=He.segment.uri?"segment":"pre-segment",Qe=Fe?ea({preloadSegment:u})-1:0;return He+" ["+(A+ie)+"/"+(A+Ae)+"]"+(Fe?" part ["+pe+"/"+Qe+"]":"")+" segment start/end ["+u.start+" => "+u.end+"]"+(Fe?" part start/end ["+T.start+" => "+T.end+"]":"")+" startOfSegment ["+R+"] duration ["+P+"] timeline ["+Te+"] selected by ["+je+"] playlist ["+L+"]";}function $g(k){return k+"TimingInfo";}function Wg(A){var R=A.timelineChangeController,P=A.currentTimeline,u=A.segmentTimeline,T=A.loaderType,A=A.audioDisabled;return P!==u&&(T==="audio"?!(P=R.lastTimelineChange({type:"main"}))||P.to!==u:!(T!=="main"||!A)&&(!(P=R.pendingTimelineChange({type:"audio"}))||P.to!==u));}function qg(P){var R=P.segmentDuration,P=P.maxDuration;return!!R&&Math.round(R)>P+Gs;}function ew(k,ie){if(ie!=="hls")return null;var P,u;if(P={audioTimingInfo:k.audioTimingInfo,videoTimingInfo:k.videoTimingInfo},u=0,["video","audio"].forEach(function(je){var Te,Ae,je=P[je+"TimingInfo"];je&&(Te=je.start,je=je.end,typeof Te=="bigint"||typeof je=="bigint"?Ae=o.a.BigInt(je)-o.a.BigInt(Te):typeof Te=="number"&&typeof je=="number"&&(Ae=je-Te),Ae!==void 0&&u<Ae&&(u=Ae));}
37),!(ie=u=typeof u=="bigint"&&u<Number.MAX_SAFE_INTEGER?Number(u):u))return null;var T=k.playlist.targetDuration,A=qg({segmentDuration:ie,maxDuration:2*T}),L=qg({segmentDuration:ie,maxDuration:T}),ie="Segment with index "+k.mediaIndex+" from playlist "+k.playlist.id+" has a duration of "+ie+" when the reported duration is "+k.duration+" and the target duration is "+T+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return A||L?{severity:A?"warn":"info",message:ie}:null;}var Ma=a.a,Ra=function(k){return rt.log.debug?rt.log.debug.bind(rt,"VHS:",k+" >"):function(){};},Gs=1/30,Ua=3*Gs,Yg=function(k,R){var P,u=[];if(k&&k.length)for(P=0;P<k.length;P++)R(k.start(P),k.end(P))&&u.push([k.start(P),k.end(P)]);return rt.createTimeRanges(u);},Xg=rt.createTimeRange,Kg=function(k,R){return R.endList?0:k&&k.suggestedPresentationDelay?k.suggestedPresentationDelay:(k=0<Eo(R).length,k&&R.serverControl&&R.serverControl.partHoldBack?R.serverControl.partHoldBack:k&&R.partTargetDuration?3*R.partTargetDuration:R.serverControl&&R.serverControl.holdBack?R.serverControl.holdBack:R.targetDuration?3*R.targetDuration:0);},tw=function(k,R){var P=0,u=R-k.mediaSequence,T=k.segments[u];if(T){if(T.start!==void 0)return{result:T.start,precise:!0};if(T.end!==void 0)return{result:T.end-T.duration,precise:!0};}for(;u--;){if((T=k.segments[u]).end!==void 0)return{result:P+T.end,precise:!0};if(P+=fo(k,T),T.start!==void 0)return{result:P+T.start,precise:!0};}return{result:P,precise:!1};},iw=function(k,R){for(var P,u=0,T=R-k.mediaSequence;T<k.segments.length;T++){if((P=k.segments[T]).start!==void 0)return{result:P.start-u,precise:!0};if(u+=fo(k,P),P.end!==void 0)return{result:P.end-u,precise:!0};}return{result:-1,precise:!1};},Zg=function(k,R,P){if((R=R===void 0?k.mediaSequence+k.segments.length:R)<k.mediaSequence)return 0;var u=tw(k,R);return u.precise?u.result:(k=iw(k,R),k.precise?k.result:u.result+P);},Qg=function(k,R,P){if(!k)return 0;if(R===void 0){if(k.totalDuration)return k.totalDuration;if(!k.endList)return o.a.Infinity;}return Zg(k,R,P=typeof P!="number"?0:P);},Du=function(k){if(!k||!k.playlists||!k.playlists.length)return Eg(k,function(u){return u.playlists&&u.playlists.length||u.uri;});for(var R=0;R<k.playlists.length;R++){var P=function(A){var T=k.playlists[A],A=T.attributes&&T.attributes.CODECS;return A&&A.split(",").every(function(L){return Object(l.f)(L);})||Eg(k,function(L){return uf(T,L);})?"continue":{v:!1};}(R);if(P!=="continue"&&typeof P=="object")return P.v;}return!0;},Fo={liveEdgeDelay:Kg,duration:Qg,seekable:function(T,R,P){var u=R||0,T=sc(T,R,!0,P);return T===null?Xg():Xg(u,T);},getMediaInfoForTime:function(k){for(var R=k.playlist,P=k.currentTime,u=k.startingSegmentIndex,T=k.startingPartIndex,A=k.startTime,L=k.experimentalExactManifestTimings,ie=P-A,pe=Jo(R),Te=0,Ae=0;Ae<pe.length;Ae++){var je=pe[Ae];if(u===je.segmentIndex&&(typeof T!="number"||typeof je.partIndex!="number"||T===je.partIndex)){Te=Ae;break;}}if(ie<0){if(0<Te)for(var Fe=Te-1;0<=Fe;Fe--){var He=pe[Fe];if(ie+=He.duration,L){if(ie<0)continue;}else if(ie+Gs<=0)continue;return{partIndex:He.partIndex,segmentIndex:He.segmentIndex,startTime:A-Ro({defaultDuration:R.targetDuration,durationList:pe,startIndex:Te,endIndex:Fe})};}return{partIndex:pe[0]&&pe[0].partIndex||null,segmentIndex:pe[0]&&pe[0].segmentIndex||0,startTime:P};}if(Te<0){for(var Qe=Te;Qe<0;Qe++)if((ie-=R.targetDuration)<0)return{partIndex:pe[0]&&pe[0].partIndex||null,segmentIndex:pe[0]&&pe[0].segmentIndex||0,startTime:P};Te=0;}for(var pt=Te;pt<pe.length;pt++){var Vt=pe[pt];if(ie-=Vt.duration,L){if(0<ie)continue;}else if(0<=ie-Gs)continue;return{partIndex:Vt.partIndex,segmentIndex:Vt.segmentIndex,startTime:A+Ro({defaultDuration:R.targetDuration,durationList:pe,startIndex:Te,endIndex:pt})};}return{segmentIndex:pe[pe.length-1].segmentIndex,partIndex:pe[pe.length-1].partIndex,startTime:P};},isEnabled:xl,isDisabled:function(k){return k.disabled;},isBlacklisted:Fs,isIncompatible:Us,playlistEnd:sc,isAes:function(k){for(var R=0;R<k.segments.length;R++)if(k.segments[R].key)return!0;return!1;},hasAttribute:Id,estimateSegmentRequestTime:function(k,R,P,u){return Id("BANDWIDTH",P)?(k*P.attributes.BANDWIDTH-8*(u=u===void 0?0:u))/R:NaN;},isLowestEnabledRendition:Ru,isAudioOnly:Du,playlistMatch:uf,segmentDurationWithParts:fo},Jg=rt.log,gf=function(k,R){return k+"-"+R;},cc=function(k,R){k.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(P){if(k.mediaGroups[P])for(var u in k.mediaGroups[P])for(var T in k.mediaGroups[P][u]){var A=k.mediaGroups[P][u][T];R(A,P,u,T);}});},ey=function(u){var R=u.playlist,P=u.uri,u=u.id;R.id=u,R.playlistErrors_=0,P&&(R.uri=P),R.attributes=R.attributes||{};},Rd=rt.mergeOptions,nw=function(k,R){if(!k)return R;var P=Rd(k,R);if(k.preloadHints&&!R.preloadHints&&delete P.preloadHints,k.parts&&!R.parts)delete P.parts;else if(k.parts&&R.parts)for(var u=0;u<R.parts.length;u++)k.parts&&k.parts[u]&&(P.parts[u]=Rd(k.parts[u],R.parts[u]));return!k.skipped&&R.skipped&&(P.skipped=!1),k.preload&&!R.preload&&(P.preload=!1),P;},ty=function(k,R){return k===R||k.segments&&R.segments&&k.segments.length===R.segments.length&&k.endList===R.endList&&k.mediaSequence===R.mediaSequence&&k.preloadSegment===R.preloadSegment;},uc=function(k){function R(Te,T,pe){var L;if(pe===void 0&&(pe={}),L=k.call(this)||this,!Te)throw new Error("A non-empty playlist URL or object is required");
37L.logger_=Ra("PlaylistLoader");var ie=pe.withCredentials,ie=ie!==void 0&&ie,pe=pe.handleManifestRedirects,pe=pe!==void 0&&pe,Te=(L.src=Te,L.vhs_=T,L.withCredentials=ie,L.handleManifestRedirects=pe,T.options_);return L.customTagParsers=Te&&Te.customTagParsers||[],L.customTagMappers=Te&&Te.customTagMappers||[],L.experimentalLLHLS=Te&&Te.experimentalLLHLS||!1,rt.browser.IE_VERSION&&(L.experimentalLLHLS=!1),L.state="HAVE_NOTHING",L.handleMediaupdatetimeout_=L.handleMediaupdatetimeout_.bind(h()(L)),L.on("mediaupdatetimeout",L.handleMediaupdatetimeout_),L;}y()(R,k);var P=R.prototype;return P.handleMediaupdatetimeout_=function(){var u,T,A,L,ie,pe,Te,Ae,je=this;this.state==="HAVE_METADATA"&&(A=this.media(),u=Ma(this.master.uri,A.uri),this.experimentalLLHLS&&(T=u,!(A=A).endList&&A.serverControl&&(L={},A.serverControl.canBlockReload&&(pe=A.preloadSegment,ie=A.mediaSequence+A.segments.length,pe&&(pe=pe.parts||[],-1<(Te=ea(A)-1)&&Te!=pe.length-1&&(L._HLS_part=Te),(-1<Te||pe.length)&&ie--),L._HLS_msn=ie),A.serverControl&&A.serverControl.canSkipUntil&&(L._HLS_skip=A.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(L).length&&(Ae=new o.a.URL(T),["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(Fe){L.hasOwnProperty(Fe)&&Ae.searchParams.set(Fe,L[Fe]);}),T=Ae.toString())),u=T),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:u,withCredentials:this.withCredentials},function(Fe,He){if(je.request)return Fe?je.playlistRequestError(je.request,je.media(),"HAVE_METADATA"):void je.haveMetadata({playlistString:je.request.responseText,url:je.media().uri,id:je.media().id});}));},P.playlistRequestError=function(u,ie,A){var L=ie.uri,ie=ie.id;this.request=null,A&&(this.state=A),this.error={playlist:this.master.playlists[ie],status:u.status,message:"HLS playlist request error at URL: "+L+".",responseText:u.responseText,code:500<=u.status?4:2},this.trigger("error");},P.parseManifest_=function(He){var T,A,L,ie,pe,Te,Ae,je=this,Fe=He.url,He=He.manifestString;return He={onwarn:function(Qe){return Qe=Qe.message,je.logger_("m3u8-parser warn for "+Fe+": "+Qe);},oninfo:function(Qe){return Qe=Qe.message,je.logger_("m3u8-parser info for "+Fe+": "+Qe);},manifestString:He,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS},T=He.onwarn,A=He.oninfo,L=He.manifestString,ie=(ie=He.customTagParsers)===void 0?[]:ie,pe=(pe=He.customTagMappers)===void 0?[]:pe,He=He.experimentalLLHLS,Te=new s.a(),T&&Te.on("warn",T),A&&Te.on("info",A),ie.forEach(function(Qe){return Te.addParser(Qe);}),pe.forEach(function(Qe){return Te.addTagMapper(Qe);}),Te.push(L),Te.end(),Ae=Te.manifest,He||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(Qe){Ae.hasOwnProperty(Qe)&&delete Ae[Qe];}),Ae.segments&&Ae.segments.forEach(function(Qe){["parts","preloadHints"].forEach(function(pt){Qe.hasOwnProperty(pt)&&delete Qe[pt];});})),Ae.targetDuration||(A=10,Ae.segments&&Ae.segments.length&&(A=Ae.segments.reduce(function(Qe,pt){return Math.max(Qe,pt.duration);},0)),T&&T("manifest has no targetDuration defaulting to "+A),Ae.targetDuration=A),(ie=Eo(Ae)).length&&!Ae.partTargetDuration&&(pe=ie.reduce(function(Qe,pt){return Math.max(Qe,pt.duration);},0),T&&(T("manifest has no partTargetDuration defaulting to "+pe),Jg.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),Ae.partTargetDuration=pe),Ae;},P.haveMetadata=function(A){var ie=A.playlistString,L=A.playlistObject,T=A.url,A=A.id,L=(this.request=null,this.state="HAVE_METADATA",L||this.parseManifest_({url:T,manifestString:ie})),ie=(L.lastRequest=Date.now(),ey({playlist:L,uri:T,id:A}),df(this.master,L));this.targetDuration=L.partTargetDuration||L.targetDuration,this.pendingMedia_=null,ie?(this.master=ie,this.media_=this.master.playlists[A]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(hf(this.media(),!!ie)),this.trigger("loadedplaylist");},P.dispose=function(){this.trigger("dispose"),this.stopRequest(),o.a.clearTimeout(this.mediaUpdateTimeout),o.a.clearTimeout(this.finalRenditionTimeout),this.off();},P.stopRequest=function(){var u;this.request&&(u=this.request,this.request=null,u.onreadystatechange=null,u.abort());},P.media=function(u,T){var A=this;if(!u)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof u=="string"){if(!this.master.playlists[u])throw new Error("Unknown playlist URI: "+u);u=this.master.playlists[u];}if(o.a.clearTimeout(this.finalRenditionTimeout),T)T=(u.partTargetDuration||u.targetDuration)/2*1e3||5e3,this.finalRenditionTimeout=o.a.setTimeout(this.media.bind(this,u,!1),T);else{var L=this.state,T=!this.media_||u.id!==this.media_.id,ie=this.master.playlists[u.id];if(ie&&ie.endList||u.endList&&u.segments.length)this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=u,T&&(this.trigger("mediachanging"),L==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange"));else if(this.updateMediaUpdateTimeout_(hf(u,!0)),T){if(this.state="SWITCHING_MEDIA",this.request){if(u.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null;}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=u,this.request=this.vhs_.xhr({uri:u.resolvedUri,withCredentials:this.withCredentials},function(Te,Ae){if(A.request){if(u.lastRequest=Date.now(),u.resolvedUri=ri(A.handleManifestRedirects,u.resolvedUri,Ae),Te)return A.playlistRequestError(A.request,u,L);A.haveMetadata({playlistString:Ae.responseText,url:u.uri,id:u.id}),L==="HAVE_MASTER"?A.trigger("loadedmetadata"):A.trigger("mediachange");}});}}},P.pause=function(){this.mediaUpdateTimeout&&(o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA");},P.load=function(u){var T=this,A=(this.mediaUpdateTimeout&&(o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media());u?(u=A?(A.partTargetDuration||A.targetDuration)/2*1e3:5e3,this.mediaUpdateTimeout=o.a.setTimeout(function(){T.mediaUpdateTimeout=null,T.load();},u)):this.started?A&&!A.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start();},P.updateMediaUpdateTimeout_=function(u){var T=this;this.mediaUpdateTimeout&&(o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=o.a.setTimeout(function(){T.mediaUpdateTimeout=null,T.trigger("mediaupdatetimeout"),T.updateMediaUpdateTimeout_(u);},u));},P.start=function(){var u=this;this.started=!0,typeof this.src=="object"?(this.src.uri||(this.src.uri=o.a.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){u.setupInitialPlaylist(u.src);},0)):this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(T,A){if(u.request){if(u.request=null,T)return u.error={status:A.status,message:"HLS playlist request error at URL: "+u.src+".",responseText:A.responseText,code:2},u.state==="HAVE_NOTHING"&&(u.started=!1),u.trigger("error");u.src=ri(u.handleManifestRedirects,u.src,A),T=u.parseManifest_({manifestString:A.responseText,url:u.src}),u.setupInitialPlaylist(T);}});},P.srcUri=function(){return typeof this.src=="string"?this.src:this.src.uri;},P.setupInitialPlaylist=function(u){var T,A,L,ie;this.state="HAVE_MASTER",u.playlists?(this.master=u,xg(this.master,this.srcUri()),u.playlists.forEac
37h(function(pe){pe.segments=Cg(pe),pe.segments.forEach(function(Te){Tg(Te,pe.resolvedUri);});}),this.trigger("loadedplaylist"),this.request||this.media(this.master.playlists[0])):(T=this.srcUri()||o.a.location.href,this.master=(L=gf(0,A=T),(ie={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:o.a.location.href,resolvedUri:o.a.location.href,playlists:[{uri:A,id:L,resolvedUri:A,attributes:{}}]}).playlists[L]=ie.playlists[0],ie.playlists[A]=ie.playlists[0],ie),this.haveMetadata({playlistObject:u,url:T,id:this.master.playlists[0].id}),this.trigger("loadedmetadata"));},R;}(rt.EventTarget),rw=rt.xhr,ow=rt.mergeOptions,cn=Object.freeze({__proto__:null,createTransferableMessage:Pg,initSegmentId:kd,segmentKeyId:Ig,hexDump:kg,tagDump:function(k){return k=k.bytes,kg(k);},textRanges:function(k){for(var R,P,u="",T=0;T<k.length;T++)u+=(P=T,(R=k).start(P)+"-"+R.end(P)+" ");return u;}}),iy=.25,aw=function(k){return k.transmuxedPresentationEnd-k.transmuxedPresentationStart-k.transmuxerPrependedSeconds;},ny=rt.mergeOptions,sw=function(k,R){return(!k.map&&!R.map||!!(k.map&&R.map&&k.map.byterange.offset===R.map.byterange.offset&&k.map.byterange.length===R.map.byterange.length))&&k.uri===R.uri&&k.byterange.offset===R.byterange.offset&&k.byterange.length===R.byterange.length;},yf=function(k){function R(u,T,pe,Te){pe===void 0&&(pe={}),(ie=k.call(this)||this).masterPlaylistLoader_=Te||h()(ie),Te||(ie.isMaster_=!0);var ie,Te=pe,pe=Te.withCredentials,pe=pe!==void 0&&pe,Te=Te.handleManifestRedirects,Te=Te!==void 0&&Te;if(ie.vhs_=T,ie.withCredentials=pe,ie.handleManifestRedirects=Te,u)return ie.on("minimumUpdatePeriod",function(){ie.refreshXml_();}),ie.on("mediaupdatetimeout",function(){ie.refreshMedia_(ie.media().id);}),ie.state="HAVE_NOTHING",ie.loadedPlaylists_={},ie.logger_=Ra("DashPlaylistLoader"),ie.isMaster_?(ie.masterPlaylistLoader_.srcUrl=u,ie.masterPlaylistLoader_.sidxMapping_={}):ie.childPlaylist_=u,ie;throw new Error("A non-empty playlist URL or object is required");}y()(R,k);var P=R.prototype;return P.requestErrored_=function(u,T,A){return!this.request||(this.request=null,u?(this.error=typeof u!="object"||u instanceof Error?{status:T.status,message:"DASH request error at URL: "+T.uri,response:T.response,code:2}:u,A&&(this.state=A),this.trigger("error"),!0):void 0);},P.addSidxSegments_=function(u,T,A){var L,ie,pe=this,Te=u.sidx&&Object(v.b)(u.sidx);u.sidx&&Te&&!this.masterPlaylistLoader_.sidxMapping_[Te]?(L=ri(this.handleManifestRedirects,u.sidx.resolvedUri),ie=function(Ae,je){if(!pe.requestErrored_(Ae,je,T)){var Fe,Ae=pe.masterPlaylistLoader_.sidxMapping_;try{Fe=S()(Object(f.k)(je.response).subarray(8));}catch(Qe){return void pe.requestErrored_(Qe,je,T);}return Ae[Te]={sidxInfo:u.sidx,sidx:Fe},Object(v.a)(u,Fe,u.sidx.resolvedUri),A(!0);}},this.request=W1(L,this.vhs_.xhr,function(Ae,je,Fe,He){return Ae?ie(Ae,je):Fe&&Fe==="mp4"?(Qe=(pt=u.sidx.byterange).offset,pt=pt.length,He.length>=pt+Qe?ie(Ae,{response:He.subarray(Qe,Qe+pt),status:je.status,uri:je.uri}):void(pe.request=pe.vhs_.xhr({uri:L,responseType:"arraybuffer",headers:ff({byterange:u.sidx.byterange})},ie))):ie({status:je.status,message:"Unsupported "+(Fe||"unknown")+" container type for sidx segment at URL: "+L,response:"",playlist:u,internal:!0,blacklistDuration:1/0,code:2},je);var Qe,pt;})):this.mediaRequest_=o.a.setTimeout(function(){return A(!1);},0);},P.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},o.a.clearTimeout(this.minimumUpdatePeriodTimeout_),o.a.clearTimeout(this.mediaRequest_),o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off();},P.hasPendingRequest=function(){return this.request||this.mediaRequest_;},P.stopRequest=function(){var u;this.request&&(u=this.request,this.request=null,u.onreadystatechange=null,u.abort());},P.media=function(u){var T=this;if(!u)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);var A=this.state;if(typeof u=="string"){if(!this.masterPlaylistLoader_.master.playlists[u])throw new Error("Unknown playlist URI: "+u);u=this.masterPlaylistLoader_.master.playlists[u];}var L=!this.media_||u.id!==this.media_.id;L&&this.loadedPlaylists_[u.id]&&this.loadedPlaylists_[u.id].endList?(this.state="HAVE_METADATA",this.media_=u,L&&(this.trigger("mediachanging"),this.trigger("mediachange"))):L&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(u,A,function(ie){T.haveMetadata({startingState:A,playlist:u});}));},P.haveMetadata=function(A){var T=A.startingState,A=A.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[A.id]=A,this.mediaRequest_=null,this.refreshMedia_(A.id),T==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange");},P.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(o.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1);},P.load=function(u){var T=this,A=(o.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.media());u?(u=A?A.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=o.a.setTimeout(function(){return T.load();},u)):this.started?A&&!A.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start();},P.start=function(){var u=this;this.started=!0,this.isMaster_?this.requestMaster_(function(T,A){u.haveMaster_(),u.hasPendingRequest()||u.media_||u.media(u.masterPlaylistLoader_.master.playlists[0]);}):this.mediaRequest_=o.a.setTimeout(function(){return u.haveMaster_();},0);},P.requestMaster_=function(u){var T=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(A,L){if(T.requestErrored_(A,L))T.state==="HAVE_NOTHING"&&(T.started=!1);else{var ie=L.responseText!==T.masterPlaylistLoader_.masterXml_;if(T.masterPlaylistLoader_.masterXml_=L.responseText,L.responseHeaders&&L.responseHeaders.date?T.masterLoaded_=Date.parse(L.responseHeaders.date):T.masterLoaded_=Date.now(),T.masterPlaylistLoader_.srcUrl=ri(T.handleManifestRedirects,T.masterPlaylistLoader_.srcUrl,L),!ie)return u(L,ie);T.handleMaster_(),T.syncClientServerClock_(function(){return u(L,ie);});}});},P.syncClientServerClock_=function(u){var T=this,A=Object(v.d)(this.masterPlaylistLoader_.masterXml_);return A===null?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),u()):A.method==="DIRECT"?(this.masterPlaylistLoader_.clientOffset_=A.value-Date.now(),u()):void(this.request=this.vhs_.xhr({uri:Ma(this.masterPlaylistLoader_.srcUrl,A.value),method:A.method,withCredentials:this.withCredentials},function(L,ie){if(T.request){if(L)return T.masterPlaylistLoader_.clientOffset_=T.masterLoaded_-Date.now(),u();L=A.method==="HEAD"?ie.responseHeaders&&ie.responseHeaders.date?Date.parse(ie.responseHeaders.date):T.masterLoaded_:Date.parse(ie.responseText),T.masterPlaylistLoader_.clientOffset_=L-Date.now(),u();}}));},P.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_);},P.handleMaster_=function(){this.mediaRequest_=null;var u,T,A,L=this.masterPlaylistLoader_.master,ie=(u={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:L},T=u.masterXml,A=u.srcUrl,ie=u.clientOffset,pe=u.sidxMapping,u=u.previousManifest,T=Object(v.c)(T,{manifestUri:A,clientOffset:ie,sidxMapping:pe,previousManifest:u}),xg(T,A,q1),T),pe=(L&&(ie=Y1(L,ie,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=ie||L,this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0]);return pe&&pe!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=pe),(!L||ie&&ie.minimumUpdatePeriod!==L.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),!!ie;},P.updateMinimumUpdatePeriodTimeout_=function(){var u=this.masterPlaylistLoader_,T=(u.createMupOnMedia_&&(u.off("loadedmetadata",u.createMupOnMedia_),u.createMupOnMedia_=null),u.minimumUpdatePeriodTimeout_&&(o.a.clearTimeout(u.minimumUpdatePeriodTimeout_),u.minimumUpdatePeriodTimeout_=null),u.master&&u.master.minimumUpdatePeriod);T===0&&(u.media()?T=1e3*u.media().targetDuration:(u.createMupOnMedia_=u.updateMinimumUpdatePeriodTimeout_,u.one("loadedmetadata",u.createMupOnMedia_))),typeof T!="number"||T<=0?T<0&&this.logger_("found invalid minimumUpdatePeriod of "+T+", not setting a timeout"):this.createMUPTimeout_(T);},P.createMUPTimeout_=function(u){var T=this.masterPlaylistLoader_;T.minimumUpdatePeriodTimeout_=o.a.setTimeout(function(){T.minimumUpdatePeriodTimeout_=null,T.trigger("minimumUpdatePeriod"),T.createMUPTimeout_(u);},u);},P.refreshXml_=function(){var u=this;this.requestMaster_(function(T,A){var L,ie;A&&(u.media_&&(u.media_=u.masterPlaylistLoader_.master.playlists[u.media_.id]),u.masterPlaylistLoader_.sidxMapping_=(A=u.masterPlaylistLoader_.master,L=u.masterPlaylistLoader_.sidxMapping_,ie=Lg(A.playlists,L),cc(A,function(pe,Te,Ae,je){pe.playlists&&pe.playlists.length&&(pe=pe.playlists,ie=ny(ie,Lg(pe,L)));}),ie),u.addSidxSegments_(u.media(),u.state,function(pe){u.refreshMedia_(u.media().id);}));});},P.refreshMedia_=function(u){var T=this;if(!u)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var A=this.masterPlaylistLoader_.master.playlists,L=!this.media_||this.media_!==A[u];L?this.media_=A[u]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function ie(){T.media().endList||(T.mediaUpdateTimeout=o.a.setTimeout(function(){T.trigger("mediaupdatetimeout"),ie();},hf(T.media(),!!L)));}(),this.trigger("loadedplaylist");},R;}(rt.EventTarget),io={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},lw=function(k){for(var R=new Uint8Array(new ArrayBuffer(k.length)),P=0;P<k.length;P++)R[P]=k.charCodeAt(P);return R.buffer;},cw=Ng(Vg(jg(function(){function k(){this.init=function(){var ce={};this.on=function(ve,Pe){ce[ve]||(ce[ve]=[]),ce[ve]=ce[ve].concat(Pe);},this.off=function(ve,Pe){return!!ce[ve]&&(Pe=ce[ve].indexOf(Pe),ce[ve]=ce[ve].slice(),ce[ve].splice(Pe,1),-1<Pe);},this.trigger=function(ve){var Pe,we,Ee,Ve=ce[ve];if(Ve)if(arguments.length===2)for(we=Ve.length,Pe=0;Pe<we;++Pe)Ve[Pe].call(this,arguments[1]);else{for(Ee=[],Pe=arguments.length,Pe=1;Pe<arguments.length;++Pe)Ee.push(arguments[Pe]);for(we=Ve.length,Pe=0;Pe<we;++Pe)Ve[Pe].apply(this,Ee);}},this.dispose=function(){ce={};};};}k.prototype.pipe=function(ce){return this.on("data",function(ve){ce.push(ve);}),this.on("done",function(ve){ce.flush(ve);}),this.on("partialdone",function(ve){ce.partialFlush(ve);}),this.on("endedtimeline",function(ve){ce.endTimeline(ve);}),this.on("reset",function(ve){ce.reset(ve);}),ce;},k.prototype.push=function(ce){this.trigger("data",ce);},k.prototype.flush=function(ce){this.trigger("done",ce);},k.prototype.partialFlush=function(ce){this.trigger("partialdone",ce);},k.prototype.endTimeline=function(ce){this.trigger("endedtimeline",ce);},k.prototype.reset=function(ce){this.trigger("reset",ce);};var R,P,u,T,A,L,ie,pe,Te,Ae,je,Fe,He,Qe,pt,Vt,jt,It,wi,Jt,Ct,yi,Ni,$i,Wi,kn,Ln,Zn,sr,Gr,n
37o,zn,ia,Ar,go,Dn,Hn,jr=k,hc=Math.pow(2,32),pc={getUint64:function(Pe){var ve,Pe=new DataView(Pe.buffer,Pe.byteOffset,Pe.byteLength);return Pe.getBigUint64?(ve=Pe.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(ve):ve:Pe.getUint32(0)*hc+Pe.getUint32(4);},MAX_UINT32:hc},Ha=pc.MAX_UINT32;if(Ct={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},typeof Uint8Array<"u"){for(var Es in Ct)Ct.hasOwnProperty(Es)&&(Ct[Es]=[Es.charCodeAt(0),Es.charCodeAt(1),Es.charCodeAt(2),Es.charCodeAt(3)]);yi=new Uint8Array([105,115,111,109]),$i=new Uint8Array([97,118,99,49]),Ni=new Uint8Array([0,0,0,1]),Mf=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),mc=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Wi={video:Mf,audio:mc},Zn=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ln=new Uint8Array([0,0,0,0,0,0,0,0]),sr=new Uint8Array([0,0,0,0,0,0,0,0]),Gr=sr,no=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),zn=sr,kn=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]);}R=function(ce){for(var ve,Pe=[],we=0,Ee=1;Ee<arguments.length;Ee++)Pe.push(arguments[Ee]);for(Ee=Pe.length;Ee--;)we+=Pe[Ee].byteLength;for(ve=new Uint8Array(we+8),new DataView(ve.buffer,ve.byteOffset,ve.byteLength).setUint32(0,ve.byteLength),ve.set(ce,4),Ee=0,we=8;Ee<Pe.length;Ee++)ve.set(Pe[Ee],we),we+=Pe[Ee].byteLength;return ve;},P=function(){return R(Ct.dinf,R(Ct.dref,Zn));},u=function(ce){return R(Ct.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,ce.audioobjecttype<<3|ce.samplingfrequencyindex>>>1,ce.samplingfrequencyindex<<7|ce.channelcount<<3,6,1,2]));},Qe=function(ce){return R(Ct.hdlr,Wi[ce]);},He=function(ce){var ve=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,ce.duration>>>24&255,ce.duration>>>16&255,ce.duration>>>8&255,255&ce.duration,85,196,0,0]);return ce.samplerate&&(ve[12]=ce.samplerate>>>24&255,ve[13]=ce.samplerate>>>16&255,ve[14]=ce.samplerate>>>8&255,ve[15]=255&ce.samplerate),R(Ct.mdhd,ve);},Fe=function(ce){return R(Ct.mdia,He(ce),Qe(ce.type),L(ce));},A=function(ce){return R(Ct.mfhd,new Uint8Array([0,0,0,0,(4278190080&ce)>>24,(16711680&ce)>>16,(65280&ce)>>8,255&ce]));},L=function(ce){return R(Ct.minf,ce.type==="video"?R(Ct.vmhd,kn):R(Ct.smhd,Ln),P(),Vt(ce));},pe=function(ce){for(var ve=ce.length,Pe=[];ve--;)Pe[ve]=wi(ce[ve]);return R.apply(null,[Ct.mvex].concat(Pe));},Te=function(ce){return ce=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&ce)>>24,(16711680&ce)>>16,(65280&ce)>>8,255&ce,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]),R(Ct.mvhd,ce);},pt=function(ce){for(var ve,Pe=ce.samples||[],we=new Uint8Array(4+Pe.length),Ee=0;Ee<Pe.length;Ee++)ve=Pe[Ee].flags,we[Ee+4]=ve.dependsOn<<4|ve.isDependedOn<<2|ve.hasRedundancy;return R(Ct.sdtp,we);},Vt=function(ce){return R(Ct.stbl,jt(ce),R(Ct.stts,zn),R(Ct.stsc,Gr),R(Ct.stsz,no),R(Ct.stco,sr));},jt=function(ce){return R(Ct.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),(ce.type==="video"?ia:Ar)(ce));},ia=function(ce){for(var ve,Pe,we=ce.sps||[],Ee=ce.pps||[],Ve=[],Ye=[],et=0;et<we.length;et++)Ve.push((65280&we[et].byteLength)>>>8),Ve.push(255&we[et].byteLength),Ve=Ve.concat(Array.prototype.slice.call(we[et]));for(et=0;et<Ee.length;et++)Ye.push((65280&Ee[et].byteLength)>>>8),Ye.push(255&Ee[et].byteLength),Ye=Ye.concat(Array.prototype.slice.call(Ee[et]));return ve=[Ct.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&ce.width)>>8,255&ce.width,(65280&ce.height)>>8,255&ce.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),R(Ct.avcC,new Uint8Array([1,ce.profileIdc,ce.profileCompatibility,ce.levelIdc,255].concat([we.length],Ve,[Ee.length],Ye))),R(Ct.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],ce.sarRatio&&(Pe=ce.sarRatio[0],ce=ce.sarRatio[1],ve.push(R(Ct.pasp,new Uint8Array([(4278190080&Pe)>>24,(16711680&Pe)>>16,(65280&Pe)>>8,255&Pe,(4278190080&ce)>>24,(16711680&ce)>>16,(65280&ce)>>8,255&ce])))),R.apply(null,ve);},Ar=function(ce){return R(Ct.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&ce.channelcount)>>8,255&ce.channelcount,(65280&ce.samplesize)>>8,255&ce.samplesize,0,0,0,0,(65280&ce.samplerate)>>8,255&ce.samplerate,0,0]),u(ce));},je=function(ce){return ce=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&ce.id)>>24,(16711680&ce.id)>>16,(65280&ce.id)>>8,255&ce.id,0,0,0,0,(4278190080&ce.duration)>>24,(16711680&ce.duration)>>16,(65280&ce.duration)>>8,255&ce.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&ce.width)>>8,255&ce.width,0,0,(65280&ce.height)>>8,255&ce.height,0,0]),R(Ct.tkhd,ce);},It=function(ce){var ve,Pe=R(Ct.tfhd,new Uint8Array([0,0,0,58,(4278190080&ce.id)>>24,(16711680&ce.id)>>16,(65280&ce.id)>>8,255&ce.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),Ee=Math.floor(ce.baseMediaDecodeTime/Ha),we=Math.floor(ce.baseMediaDecodeTime%Ha),Ee=R(Ct.tfdt,new Uint8Array([1,0,0,0,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,255&Ee,we>>>24&255,we>>>16&255,we>>>8&255,255&we]));return ce.type==="audio"?(ve=Jt(ce,92),R(Ct.traf,Pe,Ee,ve)):(we=pt(ce),ve=Jt(ce,we.length+92),R(Ct.traf,Pe,Ee,ve,we));},Ae=function(ce){return ce.duration=ce.duration||4294967295,R(Ct.trak,je(ce),Fe(ce));},wi=function(ce){var ve=new Uint8Array([0,0,0,0,(4278190080&ce.id)>>24,(16711680&ce.id)>>16,(65280&ce.id)>>8,255&ce.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return ce.type!=="video"&&(ve[ve.length-1]=0),R(Ct.trex,ve);},go=function(ce,ve){var Pe=0,we=0,Ee=0,Ve=0;return ce.length&&(ce[0].duration!==void 0&&(Pe=1),ce[0].size!==void 0&&(we=2),ce[0].flags!==void 0&&(Ee=4),ce[0].compositionTimeOffset!==void 0&&(Ve=8)),[0,0,Pe|we|Ee|Ve,1,(4278190080&ce.length)>>>24,(16711680&ce.length)>>>16,(65280&ce.length)>>>8,255&ce.length,(4278190080&ve)>>>24,(16711680&ve)>>>16,(65280&ve)>>>8,255&ve];},Dn=function(ce,ve){var Pe,we,Ee,Ve,Ye=ce.samples||[];for(ve+=20+16*Ye.length,ce=go(Ye,ve),(we=new Uint8Array(ce.length+16*Ye.length)).set(ce),Pe=ce.length,Ve=0;Ve<Ye.length;Ve++)Ee=Ye[Ve],we[Pe++]=(4278190080&Ee.duration)>>>24,we[Pe++]=(16711680&Ee.duration)>>>16,we[Pe++]=(65280&Ee.duration)>>>8,we[Pe++]=255&Ee.duration,we[Pe++]=(4278190080&Ee.size)>>>24,we[Pe++]=(16711680&Ee.size)>>>16,we[Pe++]=(65280&Ee.size)>>>8,we[Pe++]=255&Ee.size,we[Pe++]=Ee.flags.isLeading<<2|Ee.flags.dependsOn,we[Pe++]=Ee.flags.isDependedOn<<6|Ee.flags.hasRedundancy<<4|Ee.flags.paddingValue<<1|Ee.flags.isNonSyncSample,we[Pe++]=61440&Ee.flags.degradationPriority,we[Pe++]=15&Ee.flags.degradationPriority,we[Pe++]=(4278190080&Ee.compositionTimeOffset)>>>24,we[Pe++]=(16711680&Ee.compositionTimeOffset)>>>16,we[Pe++]=(65280&Ee.compositionTimeOffset)>>>8,we[Pe++]=255&Ee.compositionTimeOffset;return R(Ct.trun,we);},Hn=function(ce,ve){var Pe,we,Ee,Ve,Ye=ce.samples||[];for(ve+=20+8*Ye.length,ce=go(Ye,ve),(Pe=new Uint8Array(ce.length+8*Ye.length)).set(ce),we=ce.length,Ve=0;Ve<Ye.length;Ve++)Ee=Ye[Ve],Pe[we++]=(4278190080&Ee.duration)>>>24,Pe[we++]=(16711680&Ee.duration)>>>16,Pe[we++]=(65280&Ee.duration)>>>8,Pe[we++]=255&Ee.duration,Pe[we++]=(4278190080&Ee.size)>>>24,Pe[we++]=(16711680&Ee.size)>>>16,Pe[we++]=(65280&Ee.size)>>>8,Pe[we++]=255&Ee.size;return R(Ct.trun,Pe);},Jt=function(ce,ve){return(ce.type==="audio"?Hn:Dn)(ce,ve);},T=function(){return R(Ct.ftyp,yi,Ni,yi,$i);};function xf(ce,ve){var Pe=$w();return Pe.dataOffset=ve,Pe.compositionTimeOffset=ce.pts-ce.dts,Pe.duration=ce.duration,Pe.size=4*ce.length,Pe.size+=ce.byteLength,ce.keyFrame&&(Pe.flags.dependsOn=2,Pe.flags.isNonSyncSample=0),Pe;}function Nn(ce){ce=ce||{},Nn.prototype.init.call(this),this.parse708captions_=typeof ce.parse708captions!="boolean"||ce.parse708captions,this.captionPackets_=[],this.ccStreams_=[new xr(0,0),new xr(0,1),new xr(1,0),new xr(1,1)],this.parse708captions_&&(this.cc708Stream_=new lr({captionServices:ce.captionServices})),this.reset(),this.ccStreams_.forEach(function(ve){ve.on("data",this.trigger.bind(this,"data")),ve.on("partialdone",this.trigger.bind(this,"partialdone")),ve.on("done",this.trigger.bind(this,"done"));},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")));}function bn(ce){return 32<=ce&&ce<=127||160<=ce&&ce<=255;}function mr(ce){this.windowNum=ce,this.reset();}function na(ce,ve,Pe){this.serviceNum=ce,this.text="",this.currentWindow=new mr(-1),this.windows=[],this.stream=Pe,typeof ve=="string"&&this.createTextDecoder(ve);}function Tl(ce){return ce===null?"":(ce=dE[ce]||ce,String.fromCharCode(ce));}function Cl(){for(var ce=[],ve=jd+1;ve--;)ce.push("");return ce;}function Tf(ce,ve){var Pe=1;for(ve<ce&&(Pe=-1);Math.abs(ve-ce)>fE;)ce+=Pe*pE;return ce;}function Cf(ce){var ve,Pe;Cf.prototype.init.call(this),this.type_=ce||"shared",this.push=function(we){this.type_!=="shared"&&we.type!==this.type_||(Pe===void 0&&(Pe=we.dts),we.dts=Tf(we.dts,Pe),we.pts=Tf(we.pts,Pe),ve=we.dts,this.trigger("data",we));},this.flush=function(){Pe=ve,this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");},this.discontinuity=function(){ve=Pe=void 0;},this.reset=function(){this.discontinuity(),this.trigger("reset");};}var Of,Iy=function(ce){return R(Ct.mdat,ce);},ky=function(ce,ve){for(var Pe=[],we=ve.length;we--;)Pe[we]=It(ve[we]);return R.apply(null,[Ct.moof,A(ce)].concat(Pe));},Hw=(ie=function(ce){for(var ve=ce.length,Pe=[];ve--;)Pe[ve]=Ae(ce[ve]);return R.apply(null,[Ct.moov,Te(4294967295)].concat(Pe).concat(pe(ce)));},function(Pe){var ve=T(),Pe=ie(Pe),we=new Uint8Array(ve.byteLength+Pe.byteLength);return we.set(ve),we.set(Pe,ve.byteLength),we;}),$w=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};},Ww=function(ce){var ve,Pe,we=[],Ee=[];for(Ee.byteLength=0,Ee.nalCount=0,Ee.duration=0,ve=we.byteLength=0;ve<ce.length;ve++)(Pe=ce[ve]).nalUnitType==="access_unit_delimiter_rbsp"?(we.length&&(we.duration=Pe.dts-we.dts,Ee.byteLength+=we.byteLength,Ee.nalCount+=we.length,Ee.duration+=we.duration,Ee.pu
37sh(we)),(we=[Pe]).byteLength=Pe.data.byteLength,we.pts=Pe.pts,we.dts=Pe.dts):(Pe.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(we.keyFrame=!0),we.duration=Pe.dts-we.dts,we.byteLength+=Pe.data.byteLength,we.push(Pe));return Ee.length&&(!we.duration||we.duration<=0)&&(we.duration=Ee[Ee.length-1].duration),Ee.byteLength+=we.byteLength,Ee.nalCount+=we.length,Ee.duration+=we.duration,Ee.push(we),Ee;},qw=function(ce){var ve,Pe,we=[],Ee=[];for(we.byteLength=0,we.nalCount=0,we.duration=0,we.pts=ce[0].pts,we.dts=ce[0].dts,Ee.byteLength=0,Ee.nalCount=0,Ee.duration=0,Ee.pts=ce[0].pts,Ee.dts=ce[0].dts,ve=0;ve<ce.length;ve++)(Pe=ce[ve]).keyFrame?(we.length&&(Ee.push(we),Ee.byteLength+=we.byteLength,Ee.nalCount+=we.nalCount,Ee.duration+=we.duration),(we=[Pe]).nalCount=Pe.length,we.byteLength=Pe.byteLength,we.pts=Pe.pts,we.dts=Pe.dts,we.duration=Pe.duration):(we.duration+=Pe.duration,we.nalCount+=Pe.length,we.byteLength+=Pe.byteLength,we.push(Pe));return Ee.length&&we.duration<=0&&(we.duration=Ee[Ee.length-1].duration),Ee.byteLength+=we.byteLength,Ee.nalCount+=we.nalCount,Ee.duration+=we.duration,Ee.push(we),Ee;},Yw=function(ce){var ve;return!ce[0][0].keyFrame&&1<ce.length&&(ve=ce.shift(),ce.byteLength-=ve.byteLength,ce.nalCount-=ve.nalCount,ce[0][0].dts=ve.dts,ce[0][0].pts=ve.pts,ce[0][0].duration+=ve.duration),ce;},Xw=function(ce,ve){for(var Pe,we,Ee,Ve=ve||0,Ye=[],et=0;et<ce.length;et++)for(we=ce[et],Pe=0;Pe<we.length;Pe++)Ee=we[Pe],Ve+=(Ee=xf(Ee,Ve)).size,Ye.push(Ee);return Ye;},Kw=function(ce){for(var ve,Pe,we,Ee,Ve,Ye=0,et=ce.byteLength,dt=ce.nalCount,wt=new Uint8Array(et+4*dt),zt=new DataView(wt.buffer),Gt=0;Gt<ce.length;Gt++)for(we=ce[Gt],ve=0;ve<we.length;ve++)for(Ee=we[ve],Pe=0;Pe<Ee.length;Pe++)Ve=Ee[Pe],zt.setUint32(Ye,Ve.data.byteLength),wt.set(Ve.data,Ye+=4),Ye+=Ve.data.byteLength;return wt;},zs=[33,16,5,32,164,27],Pf=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Qn=function(ce){for(var ve=[];ce--;)ve.push(0);return ve;},Zw=function(ce){return Object.keys(ce).reduce(function(ve,Pe){return ve[Pe]=new Uint8Array(ce[Pe].reduce(function(we,Ee){return we.concat(Ee);},[])),ve;},{});},Ay=function(ce){return 9e4*ce;},Qw=function(ce,ve){return ce*ve;},If=function(ce){return ce/9e4;},Jw=function(ce,ve){return ce/ve;},Ol=9e4,My=Ay,xo=If,Ry=function(ce,ve){return Ay(Jw(ce,ve));},eE=function(ce,ve){return Qw(If(ce),ve);},kf=function(ce,ve,Pe){return If(Pe?ce:ce-ve);},tE=function(ce,ve,Pe,we){var Ee,Ve,Ye,et,dt,wt=0,zt=0;if(ve.length&&(Ve=Ry(ce.baseMediaDecodeTime,ce.samplerate),Ee=Math.ceil(Ol/(ce.samplerate/1024)),Pe&&we&&(Ve=Ve-Math.max(Pe,we),zt=(wt=Math.floor(Ve/Ee))*Ee),!(wt<1||Ol/2<zt))){for(Of||(Pe={96e3:[zs,[227,64],Qn(154),[56]],88200:[zs,[231],Qn(170),[56]],64e3:[zs,[248,192],Qn(240),[56]],48e3:[zs,[255,192],Qn(268),[55,148,128],Qn(54),[112]],44100:[zs,[255,192],Qn(268),[55,163,128],Qn(84),[112]],32e3:[zs,[255,192],Qn(268),[55,234],Qn(226),[112]],24e3:[zs,[255,192],Qn(268),[55,255,128],Qn(268),[111,112],Qn(126),[224]],16e3:[zs,[255,192],Qn(268),[55,255,128],Qn(268),[111,255],Qn(269),[223,108],Qn(195),[1,192]],12e3:[Pf,Qn(268),[3,127,248],Qn(268),[6,255,240],Qn(268),[13,255,224],Qn(268),[27,253,128],Qn(259),[56]],11025:[Pf,Qn(268),[3,127,248],Qn(268),[6,255,240],Qn(268),[13,255,224],Qn(268),[27,255,192],Qn(268),[55,175,128],Qn(108),[112]],8e3:[Pf,Qn(268),[3,121,16],Qn(47),[7]]},Of=Zw(Pe)),Ye=(Ye=Of[ce.samplerate])||ve[0].data,et=0;et<wt;et++)dt=ve[0],ve.splice(0,0,{data:Ye,dts:dt.dts-Ee,pts:dt.pts-Ee});return ce.baseMediaDecodeTime-=Math.floor(eE(zt,ce.samplerate)),zt;}},iE=function(ce,ve,Pe){return ve.minSegmentDts>=Pe?ce:(ve.minSegmentDts=1/0,ce.filter(function(we){return we.dts>=Pe&&(ve.minSegmentDts=Math.min(ve.minSegmentDts,we.dts),ve.minSegmentPts=ve.minSegmentDts,!0);}));},nE=function(ce){for(var ve,Pe=[],we=0;we<ce.length;
37we++)ve=ce[we],Pe.push({size:ve.data.byteLength,duration:1024});return Pe;},rE=function(ce){for(var ve,Pe=0,we=new Uint8Array(function(Ve){for(var Ye=0,et=0;et<Ve.length;et++)Ye+=Ve[et].data.byteLength;return Ye;}(ce)),Ee=0;Ee<ce.length;Ee++)ve=ce[Ee],we.set(ve.data,Pe),Pe+=ve.data.byteLength;return we;},oE=Ol,fc=function(ce){delete ce.minSegmentDts,delete ce.maxSegmentDts,delete ce.minSegmentPts,delete ce.maxSegmentPts;},Ly=function(ce,ve){var Pe=ce.minSegmentDts;return ve||(Pe-=ce.timelineStartInfo.dts),ve=ce.timelineStartInfo.baseMediaDecodeTime,ve+=Pe,ve=Math.max(0,ve),ce.type==="audio"&&(ve*=ce.samplerate/oE,ve=Math.floor(ve)),ve;},Af=function(ce,ve){typeof ve.pts=="number"&&(ce.timelineStartInfo.pts===void 0&&(ce.timelineStartInfo.pts=ve.pts),ce.minSegmentPts===void 0?ce.minSegmentPts=ve.pts:ce.minSegmentPts=Math.min(ce.minSegmentPts,ve.pts),ce.maxSegmentPts===void 0?ce.maxSegmentPts=ve.pts:ce.maxSegmentPts=Math.max(ce.maxSegmentPts,ve.pts)),typeof ve.dts=="number"&&(ce.timelineStartInfo.dts===void 0&&(ce.timelineStartInfo.dts=ve.dts),ce.minSegmentDts===void 0?ce.minSegmentDts=ve.dts:ce.minSegmentDts=Math.min(ce.minSegmentDts,ve.dts),ce.maxSegmentDts===void 0?ce.maxSegmentDts=ve.dts:ce.maxSegmentDts=Math.max(ce.maxSegmentDts,ve.dts));},aE=function(ce){for(var ve=0,Pe={payloadType:-1,payloadSize:0},we=0,Ee=0;ve<ce.byteLength&&ce[ve]!==128;){for(;ce[ve]===255;)we+=255,ve++;for(we+=ce[ve++];ce[ve]===255;)Ee+=255,ve++;if(Ee+=ce[ve++],!Pe.payload&&we===4){if(String.fromCharCode(ce[ve+3],ce[ve+4],ce[ve+5],ce[ve+6])==="GA94"){Pe.payloadType=we,Pe.payloadSize=Ee,Pe.payload=ce.subarray(ve,ve+Ee);break;}Pe.payload=void 0;}ve+=Ee,Ee=we=0;}return Pe;},sE=function(ce){return ce.payload[0]!==181||(ce.payload[1]<<8|ce.payload[2])!=49||String.fromCharCode(ce.payload[3],ce.payload[4],ce.payload[5],ce.payload[6])!=="GA94"||ce.payload[7]!==3?null:ce.payload.subarray(8,ce.payload.length-1);},lE=function(ce,ve){var Pe,we,Ee,Ve,Ye=[];if(64&ve[0])for(we=31&ve[0],Pe=0;Pe<we;Pe++)Ve={type:3&ve[2+(Ee=3*Pe)],pts:ce},4&ve[2+Ee]&&(Ve.ccData=ve[3+Ee]<<8|ve[4+Ee],Ye.push(Ve));return Ye;},Mf=function(ce){for(var ve=ce.byteLength,Pe=[],we=1;we<ve-2;)ce[we]===0&&ce[we+1]===0&&ce[we+2]===3?(Pe.push(we+2),we+=2):we++;if(Pe.length===0)return ce;for(var Ee=ve-Pe.length,Ve=new Uint8Array(Ee),Ye=0,we=0;we<Ee;Ye++,we++)Ye===Pe[0]&&(Ye++,Pe.shift()),Ve[we]=ce[Ye];return Ve;},cE=4,uE=((Nn.prototype=new jr()).push=function(ce){var ve;ce.nalUnitType==="sei_rbsp"&&(ve=aE(ce.escapedRBSP)).payload&&ve.payloadType===cE&&(ve=sE(ve))&&(ce.dts<this.latestDts_?this.ignoreNextEqualDts_=!0:ce.dts===this.latestDts_&&this.ignoreNextEqualDts_?(this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1)):(ve=lE(ce.pts,ve),this.captionPackets_=this.captionPackets_.concat(ve),this.latestDts_!==ce.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=ce.dts));},Nn.prototype.flushCCStreams=function(ce){this.ccStreams_.forEach(function(ve){return ce==="flush"?ve.flush():ve.partialFlush();},this);},Nn.prototype.flushStream=function(ce){this.captionPackets_.length&&(this.captionPackets_.forEach(function(ve,Pe){ve.presortIndex=Pe;}),this.captionPackets_.sort(function(ve,Pe){return ve.pts===Pe.pts?ve.presortIndex-Pe.presortIndex:ve.pts-Pe.pts;}),this.captionPackets_.forEach(function(ve){ve.type<2?this.dispatchCea608Packet(ve):this.dispatchCea708Packet(ve);},this),this.captionPackets_.length=0),this.flushCCStreams(ce);},Nn.prototype.flush=function(){return this.flushStream("flush");},Nn.prototype.partialFlush=function(){return this.flushStream("partialFlush");},Nn.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(ce){ce.reset();});},Nn.prototype.dispatchCea608Packet=function(ce){this.setsTextOrXDSActive(ce)?this.activeCea608Channel_[ce.type]=null:this.setsChannel1Active(ce)?this.activeCea608Channel_[ce.type]=0:this.setsChannel2Active(ce)&&(this.activeCea608Channel_[ce.type]=1),this.activeCea608Channel_[ce.type]!==null&&this.ccStreams_[(ce.type<<1)+this.activeCea608Channel_[ce.type]].push(ce);},Nn.prototype.setsChannel1Active=function(ce){return(30720&ce.ccData)==4096;},Nn.prototype.setsChannel2Active=function(ce){return(30720&ce.ccData)==6144;},Nn.prototype.setsTextOrXDSActive=function(ce){return(28928&ce.ccData)==256||(30974&ce.ccData)==4138||(30974&ce.ccData)==6186;},Nn.prototype.dispatchCea708Packet=function(ce){this.parse708captions_&&this.cc708Stream_.push(ce);},{127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600}),lr=(mr.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0;},mr.prototype.getText=function(){return this.rows.join(` 38`);},mr.prototype.clearText=function(){this.rows=[""],this.rowIdx=0;},mr.prototype.newLine=function(ce){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(ce),0<this.rows.length&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--;},mr.prototype.isEmpty=function(){return this.rows.length===0||this.rows.length===1&&this.rows[0]==="";},mr.prototype.addText=function(ce){this.rows[this.rowIdx]+=ce;},mr.prototype.backspace=function(){var ce;this.isEmpty()||(ce=this.rows[this.rowIdx],this.rows[this.rowIdx]=ce.substr(0,ce.length-1));},na.prototype.init=function(ce,ve){this.startPts=ce;for(var Pe=0;Pe<8;Pe++)this.windows[Pe]=new mr(Pe),typeof ve=="function"&&(this.windows[Pe].beforeRowOverflow=ve);},na.prototype.setCurrentWindow=function(ce){this.currentWindow=this.windows[ce];},na.prototype.createTextDecoder=function(ce){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(ce);}catch(ve){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+ce+" encoding. "+ve});}},function ce(ve){ve=ve||{},ce.prototype.init.call(this);var Pe,we=this,Ee=ve.captionServices||{},Ve={};Object.keys(Ee).forEach(function(Ye){Pe=Ee[Ye],/^SERVICE/.test(Ye)&&(Ve[Ye]=Pe.encoding);}),this.serviceEncodings=Ve,this.current708Packet=null,this.services={},this.push=function(Ye){(Ye.type===3||we.current708Packet===null)&&we.new708Packet(),we.add708Bytes(Ye);};}),dE=(lr.prototype=new jr(),lr.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]};},lr.prototype.add708Bytes=function(ce){var Pe=ce.ccData,ve=Pe>>>8,Pe=255&Pe;this.current708Packet.ptsVals.push(ce.pts),this.current708Packet.data.push(ve),this.current708Packet.data.push(Pe);},lr.prototype.push708Packet=function(){var ce,ve=this.current708Packet,Pe=ve.data,we=null,Ee=0,Ve=Pe[Ee++];for(ve.seq=Ve>>6,ve.sizeCode=63&Ve;Ee<Pe.length;Ee++)ce=31&(Ve=Pe[Ee++]),(we=Ve>>5)===7&&0<ce&&(we=Pe[Ee++]),this.pushServiceBlock(we,Ee,ce),0<ce&&(Ee+=ce-1);},lr.prototype.pushServiceBlock=function(ce,ve,Pe){for(var we,Ee=ve,Ve=this.current708Packet.data,Ye=(Ye=this.services[ce])||this.initService(ce,Ee);Ee<ve+Pe&&Ee<Ve.length;
38Ee++)we=Ve[Ee],bn(we)?Ee=this.handleText(Ee,Ye):we===24?Ee=this.multiByteCharacter(Ee,Ye):we===16?Ee=this.extendedCommands(Ee,Ye):128<=we&&we<=135?Ee=this.setCurrentWindow(Ee,Ye):152<=we&&we<=159?Ee=this.defineWindow(Ee,Ye):we===136?Ee=this.clearWindows(Ee,Ye):we===140?Ee=this.deleteWindows(Ee,Ye):we===137?Ee=this.displayWindows(Ee,Ye):we===138?Ee=this.hideWindows(Ee,Ye):we===139?Ee=this.toggleWindows(Ee,Ye):we===151?Ee=this.setWindowAttributes(Ee,Ye):we===144?Ee=this.setPenAttributes(Ee,Ye):we===145?Ee=this.setPenColor(Ee,Ye):we===146?Ee=this.setPenLocation(Ee,Ye):we===143?Ye=this.reset(Ee,Ye):we===8?Ye.currentWindow.backspace():we===12?Ye.currentWindow.clearText():we===13?Ye.currentWindow.pendingNewLine=!0:we===14?Ye.currentWindow.clearText():we===141&&Ee++;},lr.prototype.extendedCommands=function(ce,ve){var Pe=this.current708Packet.data[++ce];return ce=bn(Pe)?this.handleText(ce,ve,{isExtended:!0}):ce;},lr.prototype.getPts=function(ce){return this.current708Packet.ptsVals[Math.floor(ce/2)];},lr.prototype.initService=function(ce,ve){var Pe,we="SERVICE"+ce,Ee=this;return we in this.serviceEncodings&&(Pe=this.serviceEncodings[we]),this.services[ce]=new na(ce,Pe,Ee),this.services[ce].init(this.getPts(ve),function(Ve){Ee.flushDisplayed(Ve,Ee.services[ce]);}),this.services[ce];},lr.prototype.handleText=function(ce,ve,Ve){var we,Ee=Ve&&Ve.isExtended,Ve=Ve&&Ve.isMultiByte,wt=this.current708Packet.data,Ye=Ee?4096:0,et=wt[ce],wt=wt[ce+1],dt=ve.currentWindow,wt=ve.textDecoder_&&!Ee?(Ve?(we=[et,wt],ce++):we=[et],ve.textDecoder_.decode(new Uint8Array(we))):(Ve=uE[Ee=Ye|et]||Ee,4096&Ee&&Ee===Ve?"":String.fromCharCode(Ve));return dt.pendingNewLine&&!dt.isEmpty()&&dt.newLine(this.getPts(ce)),dt.pendingNewLine=!1,dt.addText(wt),ce;},lr.prototype.multiByteCharacter=function(ce,ve){var we=this.current708Packet.data,Pe=we[ce+1],we=we[ce+2];return ce=bn(Pe)&&bn(we)?this.handleText(++ce,ve,{isMultiByte:!0}):ce;},lr.prototype.setCurrentWindow=function(ce,ve){var Pe=this.current708Packet.data[ce];return ve.setCurrentWindow(7&Pe),ce;},lr.prototype.defineWindow=function(ce,we){var Pe=this.current708Packet.data,Ee=Pe[ce],we=(we.setCurrentWindow(7&Ee),we.currentWindow),Ee=Pe[++ce];return we.visible=(32&Ee)>>5,we.rowLock=(16&Ee)>>4,we.columnLock=(8&Ee)>>3,we.priority=7&Ee,Ee=Pe[++ce],we.relativePositioning=(128&Ee)>>7,we.anchorVertical=127&Ee,Ee=Pe[++ce],we.anchorHorizontal=Ee,Ee=Pe[++ce],we.anchorPoint=(240&Ee)>>4,we.rowCount=15&Ee,Ee=Pe[++ce],we.columnCount=63&Ee,Ee=Pe[++ce],we.windowStyle=(56&Ee)>>3,we.penStyle=7&Ee,we.virtualRowCount=we.rowCount+1,ce;},lr.prototype.setWindowAttributes=function(ce,we){var Pe=this.current708Packet.data,we=(Pe[ce],we.currentWindow.winAttr),Ee=Pe[++ce];return we.fillOpacity=(192&Ee)>>6,we.fillRed=(48&Ee)>>4,we.fillGreen=(12&Ee)>>2,we.fillBlue=3&Ee,Ee=Pe[++ce],we.borderType=(192&Ee)>>6,we.borderRed=(48&Ee)>>4,we.borderGreen=(12&Ee)>>2,we.borderBlue=3&Ee,Ee=Pe[++ce],we.borderType+=(128&Ee)>>5,we.wordWrap=(64&Ee)>>6,we.printDirection=(48&Ee)>>4,we.scrollDirection=(12&Ee)>>2,we.justify=3&Ee,Ee=Pe[++ce],we.effectSpeed=(240&Ee)>>4,we.effectDirection=(12&Ee)>>2,we.displayEffect=3&Ee,ce;},lr.prototype.flushDisplayed=function(ce,ve){for(var Pe=[],we=0;we<8;we++)ve.windows[we].visible&&!ve.windows[we].isEmpty()&&Pe.push(ve.windows[we].getText());ve.endPts=ce,ve.text=Pe.join(` 39 40`),this.pushCaption(ve),ve.startPts=ce;},lr.prototype.pushCaption=function(ce){ce.text!==""&&(this.trigger("data",{startPts:ce.startPts,endPts:ce.endPts,text:ce.text,stream:"cc708_"+ce.serviceNum}),ce.text="",ce.startPts=ce.endPts);},lr.prototype.displayWindows=function(ce,ve){var Pe=this.current708Packet.data[++ce],we=this.getPts(ce);this.flushDisplayed(we,ve);for(var Ee=0;Ee<8;Ee++)Pe&1<<Ee&&(ve.windows[Ee].visible=1);return ce;},lr.prototype.hideWindows=function(ce,ve){var Pe=this.current708Packet.data[++ce],we=this.getPts(ce);this.flushDisplayed(we,ve);for(var Ee=0;Ee<8;Ee++)Pe&1<<Ee&&(ve.windows[Ee].visible=0);return ce;},lr.prototype.toggleWindows=function(ce,ve){var Pe=this.current708Packet.data[++ce],we=this.getPts(ce);this.flushDisplayed(we,ve);for(var Ee=0;Ee<8;Ee++)Pe&1<<Ee&&(ve.windows[Ee].visible^=1);return ce;},lr.prototype.clearWindows=function(ce,ve){var Pe=this.current708Packet.data[++ce],we=this.getPts(ce);this.flushDisplayed(we,ve);for(var Ee=0;Ee<8;Ee++)Pe&1<<Ee&&ve.windows[Ee].clearText();return ce;},lr.prototype.deleteWindows=function(ce,ve){var Pe=this.current708Packet.data[++ce],we=this.getPts(ce);this.flushDisplayed(we,ve);for(var Ee=0;Ee<8;Ee++)Pe&1<<Ee&&ve.windows[Ee].reset();return ce;},lr.prototype.setPenAttributes=function(ce,we){var Pe=this.current708Packet.data,we=(Pe[ce],we.currentWindow.penAttr),Ee=Pe[++ce];return we.textTag=(240&Ee)>>4,we.offset=(12&Ee)>>2,we.penSize=3&Ee,Ee=Pe[++ce],we.italics=(128&Ee)>>7,we.underline=(64&Ee)>>6,we.edgeType=(56&Ee)>>3,we.fontStyle=7&Ee,ce;},lr.prototype.setPenColor=function(ce,we){var Pe=this.current708Packet.data,we=(Pe[ce],we.currentWindow.penColor),Ee=Pe[++ce];return we.fgOpacity=(192&Ee)>>6,we.fgRed=(48&Ee)>>4,we.fgGreen=(12&Ee)>>2,we.fgBlue=3&Ee,Ee=Pe[++ce],we.bgOpacity=(192&Ee)>>6,we.bgRed=(48&Ee)>>4,we.bgGreen=(12&Ee)>>2,we.bgBlue=3&Ee,Ee=Pe[++ce],we.edgeRed=(48&Ee)>>4,we.edgeGreen=(12&Ee)>>2,we.edgeBlue=3&Ee,ce;},lr.prototype.setPenLocation=function(ce,ve){var Pe=this.current708Packet.data,we=(Pe[ce],ve.currentWindow.penLoc);return ve.currentWindow.pendingNewLine=!0,ve=Pe[++ce],we.row=15&ve,ve=Pe[++ce],we.column=63&ve,ce;},lr.prototype.reset=function(ce,ve){var Pe=this.getPts(ce);return this.flushDisplayed(Pe,ve),this.initService(ve.serviceNum,ce);},{42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496}),jd=14,hE=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xr=function ce(ve,Pe){ce.prototype.init.call(this),this.field_=ve||0,this.dataChannel_=Pe||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(we){var Ee,Ve,Ye,et,dt=32639&we.ccData;dt===this.lastControlCode_?this.lastControlCode_=null:((61440&dt)==4096?this.lastControlCode_=dt:dt!==this.PADDING_&&(this.lastControlCode_=null),Ee=dt>>>8,Ve=255&dt,dt!==this.PADDING_&&(dt===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":dt===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(we.pts),this.flushDisplayed(we.pts),et=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=et,this.startPts_=we.pts):dt===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(we.pts)):dt===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(we.pts)):dt===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(we.pts)):dt===this.CARRIAGE_RETURN_?(this.clearFormatting(we.pts),this.flushDisplayed(we.pts),this.shiftRowsUp_(),this.startPts_=we.pts):dt===this.BACKSPACE_?this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1):dt===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(we.pts),this.displayed_=Cl()):dt===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=Cl():dt===this.RESUME_DIRECT_CAPTIONING_?(this.mode_!=="paintOn"&&(this.flushDisplayed(we.pts),this.displayed_=Cl()),this.mode_="paintOn",this.startPts_=we.pts):this.isSpecialCharacter(Ee,Ve)?(Ye=Tl((Ee=(3&Ee)<<8)|Ve),this[this.mode_](we.pts,Ye),this.column_++):this.isExtCharacter(Ee,Ve)?(this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),Ye=Tl((Ee=(3&Ee)<<8)|Ve),this[this.mode_](we.pts,Ye),this.column_++):this.isMidRowCode(Ee,Ve)?(this.clearFormatting(we.pts),this[this.mode_](we.pts," "),this.column_++,(14&Ve)==14&&this.addFormatting(we.pts,["i"]),(1&Ve)==1&&this.addFormatting(we.pts,["u"])):this.isOffsetControlCode(Ee,Ve)?this.column_+=3&Ve:this.isPAC(Ee,Ve)?(et=hE.indexOf(7968&dt),this.mode_==="rollUp"&&(et-this.rollUpRows_+1<0&&(et=this.rollUpRows_-1),this.setRollUp(we.pts,et)),et!==this.row_&&(this.clearFormatting(we.pts),this.row_=et),1&Ve&&this.formatting_.indexOf("u")===-1&&this.addFormatting(we.pts,["u"]),(16&dt)==16&&(this.column_=4*((14&dt)>>1)),this.isColorPAC(Ve)&&(14&Ve)==14&&this.addFormatting(we.pts,["i"])):this.isNormalChar(Ee)&&(Ve===0&&(Ve=null),Ye=Tl(Ee),Ye+=Tl(Ve),this[this.mode_](we.pts,Ye),this.column_+=Ye.length)));};},mc=(xr.prototype=new jr(),xr.prototype.flushDisplayed=function(ce){var ve=this.displayed_.map(function(Pe,we){try{return Pe.trim();}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+we+"."}),"";}},this).join(` 41`).replace(/^\n+|\n+$/g,"");ve.length&&this.trigger("data",{startPts:this.startPts_,endPts:ce,text:ve,stream
41:this.name_});},xr.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Cl(),this.nonDisplayed_=Cl(),this.lastControlCode_=null,this.column_=0,this.row_=jd,this.rollUpRows_=2,this.formatting_=[];},xr.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_;},xr.prototype.isSpecialCharacter=function(ce,ve){return ce===this.EXT_&&48<=ve&&ve<=63;},xr.prototype.isExtCharacter=function(ce,ve){return(ce===this.EXT_+1||ce===this.EXT_+2)&&32<=ve&&ve<=63;},xr.prototype.isMidRowCode=function(ce,ve){return ce===this.EXT_&&32<=ve&&ve<=47;},xr.prototype.isOffsetControlCode=function(ce,ve){return ce===this.OFFSET_&&33<=ve&&ve<=35;},xr.prototype.isPAC=function(ce,ve){return ce>=this.BASE_&&ce<this.BASE_+8&&64<=ve&&ve<=127;},xr.prototype.isColorPAC=function(ce){return 64<=ce&&ce<=79||96<=ce&&ce<=127;},xr.prototype.isNormalChar=function(ce){return 32<=ce&&ce<=127;},xr.prototype.setRollUp=function(ce,ve){if(this.mode_!=="rollUp"&&(this.row_=jd,this.mode_="rollUp",this.flushDisplayed(ce),this.nonDisplayed_=Cl(),this.displayed_=Cl()),ve!==void 0&&ve!==this.row_)for(var Pe=0;Pe<this.rollUpRows_;Pe++)this.displayed_[ve-Pe]=this.displayed_[this.row_-Pe],this.displayed_[this.row_-Pe]="";ve===void 0&&(ve=this.row_),this.topRow_=ve-this.rollUpRows_+1;},xr.prototype.addFormatting=function(ce,ve){this.formatting_=this.formatting_.concat(ve),ve=ve.reduce(function(Pe,we){return Pe+"<"+we+">";},""),this[this.mode_](ce,ve);},xr.prototype.clearFormatting=function(ce){var ve;this.formatting_.length&&(ve=this.formatting_.reverse().reduce(function(Pe,we){return Pe+"</"+we+">";},""),this.formatting_=[],this[this.mode_](ce,ve));},xr.prototype.popOn=function(ce,ve){var Pe=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=Pe+=ve;},xr.prototype.rollUp=function(ce,ve){var Pe=this.displayed_[this.row_];this.displayed_[this.row_]=Pe+=ve;},xr.prototype.shiftRowsUp_=function(){for(var ce=0;ce<this.topRow_;ce++)this.displayed_[ce]="";for(ce=this.row_+1;ce<jd+1;ce++)this.displayed_[ce]="";for(ce=this.topRow_;ce<this.row_;ce++)this.displayed_[ce]=this.displayed_[ce+1];this.displayed_[this.row_]="";},xr.prototype.paintOn=function(ce,ve){var Pe=this.displayed_[this.row_];this.displayed_[this.row_]=Pe+=ve;},{CaptionStream:Nn,Cea608Stream:xr,Cea708Stream:lr}),yo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},pE=8589934592,fE=4294967296;Cf.prototype=new jr();function Dy(ce,ve,Pe){for(var we="",Ee=ve;Ee<Pe;Ee++)we+="%"+("00"+ce[Ee].toString(16)).slice(-2);return we;}function Bd(ce,ve,Pe){return decodeURIComponent(Dy(ce,ve,Pe));}function Fd(ce){return ce[0]<<21|ce[1]<<14|ce[2]<<7|ce[3];}var Ud,Rf,Gd,Fu=Cf,mE=Tf,Ny={TXXX:function(ce){var ve;if(ce.data[0]===3){for(ve=1;ve<ce.data.length;ve++)if(ce.data[ve]===0){ce.description=Bd(ce.data,1,ve),ce.value=Bd(ce.data,ve+1,ce.data.length).replace(/\0*$/,"");break;}ce.data=ce.value;}},WXXX:function(ce){var ve;if(ce.data[0]===3){for(ve=1;ve<ce.data.length;ve++)if(ce.data[ve]===0){ce.description=Bd(ce.data,1,ve),ce.url=Bd(ce.data,ve+1,ce.data.length);break;}}},PRIV:function(ce){for(var ve,Pe=0;Pe<ce.data.length;Pe++)if(ce.data[Pe]===0){ce.owner=(ve=ce.data,unescape(Dy(ve,0,Pe)));break;}ce.privateData=ce.data.subarray(Pe+1),ce.data=ce.privateData;}},Lf=function(ce){var ve,Pe={descriptor:ce&&ce.descriptor},we=0,Ee=[],Ve=0;if(Lf.prototype.init.call(this),this.dispatchType=yo.METADATA_STREAM_TYPE.toString(16),Pe.descriptor)for(ve=0;ve<Pe.descriptor.length;ve++)this.dispatchType+=("00"+Pe.descriptor[ve].toString(16)).slice(-2);this.push=function(Ye){var et,dt,wt,zt,Gt,Bi,Ai;if(Ye.type==="timed-metadata"){if(Ye.dataAlignmentIndicator&&(Ve=0,Ee.length=0),Ee.length===0&&(Ye.data.length<10||Ye.data[0]!==73||Ye.data[1]!==68||Ye.data[2]!==51))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(Ee.push(Ye),Ve+=Ye.data.byteLength,Ee.length===1&&(we=Fd(Ye.data.subarray(6,10)),we+=10),!(Ve<we)){for(et={data:new Uint8Array(we),frames:[],pts:Ee[0].pts,dts:Ee[0].dts},zt=0;zt<we;)et.data.set(Ee[0].data.subarray(0,we-zt),zt),zt+=Ee[0].data.byteLength,Ve-=Ee[0].data.byteLength,Ee.shift();dt=10,64&et.data[5]&&(dt=(dt+=4)+Fd(et.data.subarray(10,14)),we-=Fd(et.data.subarray(16,20)));do if((wt=Fd(et.data.subarray(dt+4,dt+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});while(((Ai={id:String.fromCharCode(et.data[dt],et.data[dt+1],et.data[dt+2],et.data[dt+3]),data:et.data.subarray(dt+10,dt+wt+10)}).key=Ai.id,Ny[Ai.id]&&(Ny[Ai.id](Ai),Ai.owner==="com.apple.streaming.transportStreamTimestamp"&&(Bi=(1&(Gt=Ai.data)[3])<<30|Gt[4]<<22|Gt[5]<<14|Gt[6]<<6|Gt[7]>>>2,Bi=(Bi*=4)+(3&Gt[7]),Ai.timeStamp=Bi,et.pts===void 0&&et.dts===void 0&&(et.pts=Ai.timeStamp,et.dts=Ai.timeStamp),this.trigger("timestamp",Ai))),et.frames.push(Ai),(dt=dt+10+wt)<we));this.trigger("data",et);}}};},Bu=(Lf.prototype=new jr(),Lf),Df=function(){var ce=new Uint8Array(188),ve=0;Df.prototype.init.call(this),this.push=function(Pe){var we,Ee=0,Ve=188;
41for(ve?((we=new Uint8Array(Pe.byteLength+ve)).set(ce.subarray(0,ve)),we.set(Pe,ve),ve=0):we=Pe;Ve<we.byteLength;)we[Ee]===71&&we[Ve]===71?(this.trigger("data",we.subarray(Ee,Ve)),Ee+=188,Ve+=188):(Ee++,Ve++);Ee<we.byteLength&&(ce.set(we.subarray(Ee),0),ve=we.byteLength-Ee);},this.flush=function(){ve===188&&ce[0]===71&&(this.trigger("data",ce),ve=0),this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");},this.reset=function(){ve=0,this.trigger("reset");};},Vy=(Df.prototype=new jr(),(Ud=function(){var ce,ve,Pe,we;Ud.prototype.init.call(this),(we=this).packetsWaitingForPmt=[],this.programMapTable=void 0,ce=function(Ee,Ve){var Ye=0;Ve.payloadUnitStartIndicator&&(Ye+=Ee[Ye]+1),(Ve.type==="pat"?ve:Pe)(Ee.subarray(Ye),Ve);},ve=function(Ee,Ve){Ve.section_number=Ee[7],Ve.last_section_number=Ee[8],we.pmtPid=(31&Ee[10])<<8|Ee[11],Ve.pmtPid=we.pmtPid;},Pe=function(Ee,Ve){var Ye,et;if(1&Ee[5]){for(we.programMapTable={video:null,audio:null,"timed-metadata":{}},Ye=3+((15&Ee[1])<<8|Ee[2])-4,et=12+((15&Ee[10])<<8|Ee[11]);et<Ye;){var dt=Ee[et],wt=(31&Ee[et+1])<<8|Ee[et+2];dt===yo.H264_STREAM_TYPE&&we.programMapTable.video===null?we.programMapTable.video=wt:dt===yo.ADTS_STREAM_TYPE&&we.programMapTable.audio===null?we.programMapTable.audio=wt:dt===yo.METADATA_STREAM_TYPE&&(we.programMapTable["timed-metadata"][wt]=dt),et+=5+((15&Ee[et+3])<<8|Ee[et+4]);}Ve.programMapTable=we.programMapTable;}},this.push=function(Ee){var Ve={},Ye=4;if(Ve.payloadUnitStartIndicator=!!(64&Ee[1]),Ve.pid=31&Ee[1],Ve.pid<<=8,Ve.pid|=Ee[2],1<(48&Ee[3])>>>4&&(Ye+=Ee[Ye]+1),Ve.pid===0)Ve.type="pat",ce(Ee.subarray(Ye),Ve),this.trigger("data",Ve);else if(Ve.pid===this.pmtPid)for(Ve.type="pmt",ce(Ee.subarray(Ye),Ve),this.trigger("data",Ve);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([Ee,Ye,Ve]):this.processPes_(Ee,Ye,Ve);},this.processPes_=function(Ee,Ve,Ye){Ye.pid===this.programMapTable.video?Ye.streamType=yo.H264_STREAM_TYPE:Ye.pid===this.programMapTable.audio?Ye.streamType=yo.ADTS_STREAM_TYPE:Ye.streamType=this.programMapTable["timed-metadata"][Ye.pid],Ye.type="pes",Ye.data=Ee.subarray(Ve),this.trigger("data",Ye);};}).prototype=new jr(),Ud.STREAM_TYPES={h264:27,adts:15},(Rf=function(){function ce(dt,wt,zt){var Gt,Bi=new Uint8Array(dt.size),Ai={type:wt},Gi=0,Br=0;if(dt.data.length&&!(dt.size<9)){for(Ai.trackId=dt.data[0].pid,Gi=0;Gi<dt.data.length;Gi++)Gt=dt.data[Gi],Bi.set(Gt.data,Br),Br+=Gt.data.byteLength;et(Bi,Ai),wt=wt==="video"||Ai.packetLength<=dt.size,(zt||wt)&&(dt.size=0,dt.data.length=0),wt&&Pe.trigger("data",Ai);}}var ve,Pe=this,we=!1,Ee={data:[],size:0},Ve={data:[],size:0},Ye={data:[],size:0},et=function(dt,wt){var zt=dt[0]<<16|dt[1]<<8|dt[2];wt.data=new Uint8Array(),zt==1&&(wt.packetLength=6+(dt[4]<<8|dt[5]),wt.dataAlignmentIndicator=(4&dt[6])!=0,192&(zt=dt[7])&&(wt.pts=(14&dt[9])<<27|(255&dt[10])<<20|(254&dt[11])<<12|(255&dt[12])<<5|(254&dt[13])>>>3,wt.pts*=4,wt.pts+=(6&dt[13])>>>1,wt.dts=wt.pts,64&zt&&(wt.dts=(14&dt[14])<<27|(255&dt[15])<<20|(254&dt[16])<<12|(255&dt[17])<<5|(254&dt[18])>>>3,wt.dts*=4,wt.dts+=(6&dt[18])>>>1)),wt.data=dt.subarray(9+dt[8]));};Rf.prototype.init.call(this),this.push=function(dt){({pat:function(){},pes:function(){var wt,zt;switch(dt.streamType){case yo.H264_STREAM_TYPE:wt=Ee,zt="video";break;case yo.ADTS_STREAM_TYPE:wt=Ve,zt="audio";break;case yo.METADATA_STREAM_TYPE:wt=Ye,zt="timed-metadata";break;default:return;}dt.payloadUnitStartIndicator&&ce(wt,zt,!0),wt.data.push(dt),wt.size+=dt.data.byteLength;},pmt:function(){var wt={type:"metadata",tracks:[]};(ve=dt.programMapTable).video!==null&&wt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+ve.video,codec:"avc",type:"video"}),ve.audio!==null&&wt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+ve.audio,codec:"adts",type:"audio"}),we=!0,Pe.trigger("data",wt);}})[dt.type]();},this.reset=function(){Ee.size=0,Ee.data.length=0,Ve.size=0,Ve.data.length=0,this.trigger("reset");},this.flushStreams_=function(){ce(Ee,"video"),ce(Ve,"audio"),ce(Ye,"timed-metadata");},this.flush=function(){var dt;!we&&ve&&(dt={type:"metadata",tracks:[]},ve.video!==null&&dt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+ve.video,codec:"avc",type:"video"}),ve.audio!==null&&dt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+ve.audio,codec:"adts",type:"audio"}),Pe.trigger("data",dt)),we=!1,this.flushStreams_(),this.trigger("done");};}).prototype=new jr(),{PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Df,TransportParseStream
41:Ud,ElementaryStream:Rf,TimestampRolloverStream:Fu,CaptionStream:mc.CaptionStream,Cea608Stream:mc.Cea608Stream,Cea708Stream:mc.Cea708Stream,MetadataStream:Bu});for(Gd in yo)yo.hasOwnProperty(Gd)&&(Vy[Gd]=yo[Gd]);var Nf,jy,xs=Vy,gE=Ol,By=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Vf=function(ce){var ve,Pe=0;Vf.prototype.init.call(this),this.skipWarn_=function(we,Ee){this.trigger("log",{level:"warn",message:"adts skiping bytes "+we+" to "+Ee+" in frame "+Pe+" outside syncword"});},this.push=function(we){var Ee,Ve,Ye,et,dt,wt,zt=0;if(ce||(Pe=0),we.type==="audio"){for(ve&&ve.length?(Ye=ve,(ve=new Uint8Array(Ye.byteLength+we.data.byteLength)).set(Ye),ve.set(we.data,Ye.byteLength)):ve=we.data;zt+7<ve.length;)if(ve[zt]!==255||(246&ve[zt+1])!=240)typeof wt!="number"&&(wt=zt),zt++;else{if(typeof wt=="number"&&(this.skipWarn_(wt,zt),wt=null),Ve=2*(1&~ve[zt+1]),Ee=(3&ve[zt+3])<<11|ve[zt+4]<<3|(224&ve[zt+5])>>5,dt=(et=1024*(1+(3&ve[zt+6])))*gE/By[(60&ve[zt+2])>>>2],ve.byteLength-zt<Ee)break;this.trigger("data",{pts:we.pts+Pe*dt,dts:we.dts+Pe*dt,sampleCount:et,audioobjecttype:1+(ve[zt+2]>>>6&3),channelcount:(1&ve[zt+2])<<2|(192&ve[zt+3])>>>6,samplerate:By[(60&ve[zt+2])>>>2],samplingfrequencyindex:(60&ve[zt+2])>>>2,samplesize:16,data:ve.subarray(zt+7+Ve,zt+Ee)}),Pe++,zt+=Ee;}typeof wt=="number"&&(this.skipWarn_(wt,zt),wt=null),ve=ve.subarray(zt);}},this.flush=function(){Pe=0,this.trigger("done");},this.reset=function(){ve=void 0,this.trigger("reset");},this.endTimeline=function(){ve=void 0,this.trigger("endedtimeline");};},Fy=(Vf.prototype=new jr(),Vf),yE=function(ce){var ve=ce.byteLength,Pe=0,we=0;this.length=function(){return 8*ve;},this.bitsAvailable=function(){return 8*ve+we;},this.loadWord=function(){var Ee=ce.byteLength-ve,Ve=new Uint8Array(4),Ye=Math.min(4,ve);if(Ye===0)throw new Error("no bytes available");Ve.set(ce.subarray(Ee,Ee+Ye)),Pe=new DataView(Ve.buffer).getUint32(0),we=8*Ye,ve-=Ye;},this.skipBits=function(Ee){var Ve;Ee<we||(Ee=(Ee-=we)-8*(Ve=Math.floor(Ee/8)),ve-=Ve,this.loadWord()),Pe<<=Ee,we-=Ee;},this.readBits=function(Ee){var Ve=Math.min(we,Ee),Ye=Pe>>>32-Ve;return 0<(we-=Ve)?Pe<<=Ve:0<ve&&this.loadWord(),0<(Ve=Ee-Ve)?Ye<<Ve|this.readBits(Ve):Ye;},this.skipLeadingZeros=function(){for(var Ee=0;Ee<we;++Ee)if(Pe&2147483648>>>Ee)return Pe<<=Ee,we-=Ee,Ee;return this.loadWord(),Ee+this.skipLeadingZeros();},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());},this.readUnsignedExpGolomb=function(){var Ee=this.skipLeadingZeros();return this.readBits(Ee+1)-1;},this.readExpGolomb=function(){var Ee=this.readUnsignedExpGolomb();return 1&Ee?1+Ee>>>1:-1*(Ee>>>1);},this.readBoolean=function(){return this.readBits(1)===1;},this.readUnsignedByte=function(){return this.readBits(8);},this.loadWord();},jf=function(){var ce,ve,Pe=0;jf.prototype.init.call(this),this.push=function(we){for(var Ee,Ve=(ve=ve?((Ee=new Uint8Array(ve.byteLength+we.data.byteLength)).set(ve),Ee.set(we.data,ve.byteLength),Ee):we.data).byteLength;Pe<Ve-3;Pe++)if(ve[Pe+2]===1){ce=Pe+5;break;}for(;ce<Ve;)switch(ve[ce]){case 0:if(ve[ce-1]!==0){ce+=2;break;}if(ve[ce-2]!==0){ce++;break;}for(Pe+3!==ce-2&&this.trigger("data",ve.subarray(Pe+3,ce-2));ve[++ce]!==1&&ce<Ve;);Pe=ce-2,ce+=3;break;case 1:if(ve[ce-1]!==0||ve[ce-2]!==0){ce+=3;break;}this.trigger("data",ve.subarray(Pe+3,ce-2)),Pe=ce-2,ce+=3;break;default:ce+=3;}ve=ve.subarray(Pe),ce-=Pe,Pe=0;},this.reset=function(){ve=null,Pe=0,this.trigger("reset");},this.flush=function(){ve&&3<ve.byteLength&&this.trigger("data",ve.subarray(Pe+3)),ve=null,Pe=0,this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");};};jf.prototype=new jr(),jy={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Nf=function(){var ce,ve,Pe,we,Ee,Ve,Ye,et=new jf();Nf.prototype.init.call(this),(ce=this).push=function(dt){dt.type==="video"&&(ve=dt.trackId,Pe=dt.pts,we=dt.dts,et.push(dt));},et.on("data",function(dt){var wt={trackId:ve,pts:Pe,dts:we,data:dt,nalUnitTypeCode:31&dt[0]};switch(wt.nalUnitTypeCode){case 5:wt.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:wt.nalUnitType="sei_rbsp",wt.escapedRBSP=Ee(dt.subarray(1));break;case 7:wt.nalUnitType="seq_parameter_set_rbsp",wt.escapedRBSP=Ee(dt.subarray(1)),wt.config=Ve(wt.escapedRBSP);break;case 8:wt.nalUnitType="pic_parameter_set_rbsp";break;case 9:wt.nalUnitType="access_unit_delimiter_rbsp";}ce.trigger("data",wt);}),et.on("done",function(){ce.trigger("done");}),et.on("partialdone",function(){ce.trigger("partialdone");}),et.on("reset",function(){ce.trigger("reset");}),et.on("endedtimeline",function(){ce.trigger("endedtimeline");}),this.flush=function(){et.flush();},this.partialFlush=function(){et.partialFlush();},this.reset=function(){et.reset();},this.endTimeline=function(){et.endTimeline();}
41,Ye=function(dt,wt){for(var zt=8,Gt=8,Bi=0;Bi<dt;Bi++)zt=(Gt=Gt!==0?(zt+wt.readExpGolomb()+256)%256:Gt)===0?zt:Gt;},Ee=function(dt){for(var wt=dt.byteLength,zt=[],Gt=1;Gt<wt-2;)dt[Gt]===0&&dt[Gt+1]===0&&dt[Gt+2]===3?(zt.push(Gt+2),Gt+=2):Gt++;if(zt.length===0)return dt;for(var Bi=wt-zt.length,Ai=new Uint8Array(Bi),Gi=0,Gt=0;Gt<Bi;Gi++,Gt++)Gi===zt[0]&&(Gi++,zt.shift()),Ai[Gt]=dt[Gi];return Ai;},Ve=function(Ts){var wt,zt,Gt,Bi,Ai,Gi,Br=0,vo=0,ro=0,Xr=0,gr=[1,1],rn=new yE(Ts),Ts=rn.readUnsignedByte(),Hf=rn.readUnsignedByte(),zu=rn.readUnsignedByte();if(rn.skipUnsignedExpGolomb(),jy[Ts]&&((zt=rn.readUnsignedExpGolomb())===3&&rn.skipBits(1),rn.skipUnsignedExpGolomb(),rn.skipUnsignedExpGolomb(),rn.skipBits(1),rn.readBoolean()))for(Ai=zt!==3?8:12,Gi=0;Gi<Ai;Gi++)rn.readBoolean()&&Ye(Gi<6?16:64,rn);if(rn.skipUnsignedExpGolomb(),(zt=rn.readUnsignedExpGolomb())===0)rn.readUnsignedExpGolomb();else if(zt===1)for(rn.skipBits(1),rn.skipExpGolomb(),rn.skipExpGolomb(),wt=rn.readUnsignedExpGolomb(),Gi=0;Gi<wt;Gi++)rn.skipExpGolomb();if(rn.skipUnsignedExpGolomb(),rn.skipBits(1),zt=rn.readUnsignedExpGolomb(),Gt=rn.readUnsignedExpGolomb(),(Bi=rn.readBits(1))===0&&rn.skipBits(1),rn.skipBits(1),rn.readBoolean()&&(Br=rn.readUnsignedExpGolomb(),vo=rn.readUnsignedExpGolomb(),ro=rn.readUnsignedExpGolomb(),Xr=rn.readUnsignedExpGolomb()),rn.readBoolean()&&rn.readBoolean()){switch(rn.readUnsignedByte()){case 1:gr=[1,1];break;case 2:gr=[12,11];break;case 3:gr=[10,11];break;case 4:gr=[16,11];break;case 5:gr=[40,33];break;case 6:gr=[24,11];break;case 7:gr=[20,11];break;case 8:gr=[32,11];break;case 9:gr=[80,33];break;case 10:gr=[18,11];break;case 11:gr=[15,11];break;case 12:gr=[64,33];break;case 13:gr=[160,99];break;case 14:gr=[4,3];break;case 15:gr=[3,2];break;case 16:gr=[2,1];break;case 255:gr=[rn.readUnsignedByte()<<8|rn.readUnsignedByte(),rn.readUnsignedByte()<<8|rn.readUnsignedByte()];}gr&&(gr[0],gr[1]);}return{profileIdc:Ts,levelIdc:zu,profileCompatibility:Hf,width:16*(zt+1)-2*Br-2*vo,height:(2-Bi)*(Gt+1)*16-2*ro-2*Xr,sarRatio:gr};};}).prototype=new jr();function Uy(ce,ve){return ce.length-ve<10||ce[ve]!==73||ce[ve+1]!==68||ce[ve+2]!==51?ve:Uy(ce,ve+=Wy(ce,ve));}function Gy(ce){return ce[0]<<21|ce[1]<<14|ce[2]<<7|ce[3];}function zy(ce,ve){for(var Pe=Object.keys(ve),we=0;we<Pe.length;we++){var Ee=Pe[we];Ee!=="headOfPipeline"&&ve[Ee].on&&ve[Ee].on("log",xE.bind(ce,Ee));}}function Hy(ce,ve){var Pe;if(ce.length===ve.length){for(Pe=0;Pe<ce.length;Pe++)if(ce[Pe]!==ve[Pe])return;return 1;}}function $y(ce,ve,Pe,we,Ee,Ve){return{start:{dts:ce,pts:ce+(Pe-ve)},end:{dts:ce+(we-ve),pts:ce+(Ee-Pe)},prependedContentDuration:Ve,baseMediaDecodeTime:ce};}var Bf,Ff,ju,Fu=Nf,vE=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Wy=function(ce,ve){var Pe=0<=(Pe=ce[ve+6]<<21|ce[ve+7]<<14|ce[ve+8]<<7|ce[ve+9])?Pe:0;return(16&ce[ve+5])>>4?Pe+20:Pe+10;},_E=function(ce,ve,Pe){for(var we="",Ee=ve;Ee<Pe;Ee++)we+="%"+("00"+ce[Ee].toString(16)).slice(-2);return we;},zd={isLikelyAacData:function(ce){var ve=Uy(ce,0);return ce.length>=ve+2&&(255&ce[ve])==255&&(240&ce[ve+1])==240&&(22&ce[ve+1])==16;},parseId3TagSize:Wy,parseAdtsSize:function(ce,ve){var Pe=(224&ce[ve+5])>>5,we=ce[ve+4]<<3;return 6144&ce[ve+3]|we|Pe;},parseType:function(ce,ve){return ce[ve]===73&&ce[ve+1]===68&&ce[ve+2]===51?"timed-metadata":!0&ce[ve]&&(240&ce[ve+1])==240?"audio":null;},parseSampleRate:function(ce){for(var ve=0;ve+5<ce.length;){if(ce[ve]===255&&(246&ce[ve+1])==240)return vE[(60&ce[ve+2])>>>2];ve++;}return null;},parseAacTimestamp:function(ce){var ve,Pe=10;64&ce[5]&&(Pe=(Pe+=4)+Gy(ce.subarray(10,14)));do{if((ve=Gy(ce.subarray(Pe+4,Pe+8)))<1)return null;if(String.fromCharCode(ce[Pe],ce[Pe+1],ce[Pe+2],ce[Pe+3])==="PRIV"){for(var we,Ee,Ve=ce.subarray(Pe+10,Pe+ve+10),Ye=0;Ye<Ve.byteLength;Ye++)if(Ve[Ye]===0){if(unescape(_E(Ve,0,Ye))==="com.apple.streaming.transportStreamTimestamp")return Ee=(1&(we=Ve.subarray(Ye+1))[3])<<30|we[4]<<22|we[5]<<14|we[6]<<6|we[7]>>>2,(Ee*=4)+(3&we[7]);break;}}}while((Pe=Pe+10+ve)<ce.byteLength);return null;}},Uf=function(){var ce=new Uint8Array(),ve=0;Uf.prototype.init.call(this),this.setTimestamp=function(Pe){ve=Pe;},this.push=function(Pe){var we,Ee,Ve=0,Ye=0;
41for(ce.length?(Ee=ce.length,(ce=new Uint8Array(Pe.byteLength+Ee)).set(ce.subarray(0,Ee)),ce.set(Pe,Ee)):ce=Pe;3<=ce.length-Ye;)if(ce[Ye]===73&&ce[Ye+1]===68&&ce[Ye+2]===51){if(ce.length-Ye<10||Ye+(Ve=zd.parseId3TagSize(ce,Ye))>ce.length)break;we={type:"timed-metadata",data:ce.subarray(Ye,Ye+Ve)},this.trigger("data",we),Ye+=Ve;}else if((255&ce[Ye])==255&&(240&ce[Ye+1])==240){if(ce.length-Ye<7||Ye+(Ve=zd.parseAdtsSize(ce,Ye))>ce.length)break;we={type:"audio",data:ce.subarray(Ye,Ye+Ve),pts:ve,dts:ve},this.trigger("data",we),Ye+=Ve;}else Ye++;Ee=ce.length-Ye,ce=0<Ee?ce.subarray(Ye):new Uint8Array();},this.reset=function(){ce=new Uint8Array(),this.trigger("reset");},this.endTimeline=function(){ce=new Uint8Array(),this.trigger("endedtimeline");};},bE=(Uf.prototype=new jr(),Uf),qy=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Yy=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],SE=Fu,wE=zd.isLikelyAacData,EE=Ol,xE=function(ce,ve){ve.stream=ce,this.trigger("log",ve);},Hd=function(ce,ve){var Pe=[],we=0,Ee=0,Ve=1/0,Ye=(ve=ve||{}).firstSequenceNumber||0;Hd.prototype.init.call(this),this.push=function(et){Af(ce,et),ce&&qy.forEach(function(dt){ce[dt]=et[dt];}),Pe.push(et);},this.setEarliestDts=function(et){we=et;},this.setVideoBaseMediaDecodeTime=function(et){Ve=et;},this.setAudioAppendStart=function(et){Ee=et;},this.flush=function(){var et,dt,wt,zt,Gt;Pe.length!==0&&(et=iE(Pe,ce,we),ce.baseMediaDecodeTime=Ly(ce,ve.keepOriginalTimestamps),Gt=tE(ce,et,Ee,Ve),ce.samples=nE(et),wt=Iy(rE(et)),Pe=[],zt=ky(Ye,[ce]),dt=new Uint8Array(zt.byteLength+wt.byteLength),Ye++,dt.set(zt),dt.set(wt,zt.byteLength),fc(ce),wt=Math.ceil(1024*EE/ce.samplerate),et.length&&(zt=et.length*wt,this.trigger("segmentTimingInfo",$y(Ry(ce.baseMediaDecodeTime,ce.samplerate),et[0].dts,et[0].pts,et[0].dts+zt,et[0].pts+zt,Gt||0)),this.trigger("timingInfo",{start:et[0].pts,end:et[0].pts+zt})),this.trigger("data",{track:ce,boxes:dt})),this.trigger("done","AudioSegmentStream");},this.reset=function(){fc(ce),Pe=[],this.trigger("reset");};};Hd.prototype=new jr(),(Bf=function(ce,ve){var Pe,we,Ee=[],Ve=[],Ye=(ve=ve||{}).firstSequenceNumber||0;Bf.prototype.init.call(this),delete ce.minPTS,this.gopCache_=[],this.push=function(et){Af(ce,et),et.nalUnitType!=="seq_parameter_set_rbsp"||Pe||(Pe=et.config,ce.sps=[et.data],Yy.forEach(function(dt){ce[dt]=Pe[dt];},this)),et.nalUnitType!=="pic_parameter_set_rbsp"||we||(we=et.data,ce.pps=[et.data]),Ee.push(et);},this.flush=function(){for(var et,dt,wt,zt=0;Ee.length&&Ee[0].nalUnitType!=="access_unit_delimiter_rbsp";)Ee.shift();if(Ee.length===0)this.resetStream_(),this.trigger("done","VideoSegmentStream");else{if(et=Ww(Ee),(et=qw(et))[0][0].keyFrame||((Gt=this.getGopForFusion_(Ee[0],ce))?(zt=Gt.duration,et.unshift(Gt),et.byteLength+=Gt.byteLength,et.nalCount+=Gt.nalCount,et.pts=Gt.pts,et.dts=Gt.dts,et.duration+=Gt.duration):et=Yw(et)),Ve.length){var Gt=ve.alignGopsAtEnd?this.alignGopsAtEnd_(et):this.alignGopsAtStart_(et);if(!Gt)return this.gopCache_.unshift({gop:et.pop(),pps:ce.pps,sps:ce.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),Ee=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");fc(ce),et=Gt;}Af(ce,et),ce.samples=Xw(et),Gt=Iy(Kw(et)),ce.baseMediaDecodeTime=Ly(ce,ve.keepOriginalTimestamps),this.trigger("processedGopsInfo",et.map(function(Bi){return{pts:Bi.pts,dts:Bi.dts,byteLength:Bi.byteLength};})),dt=et[0],wt=et[et.length-1],this.trigger("segmentTimingInfo",$y(ce.baseMediaDecodeTime,dt.dts,dt.pts,wt.dts+wt.duration,wt.pts+wt.duration,zt)),this.trigger("timingInfo",{start:et[0].pts,end:et[et.length-1].pts+et[et.length-1].duration}),this.gopCache_.unshift({gop:et.pop(),pps:ce.pps,sps:ce.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),Ee=[],this.trigger("baseMediaDecodeTime",ce.baseMediaDecodeTime),this.trigger("timelineStartInfo",ce.timelineStartInfo),dt=ky(Ye,[ce]),wt=new Uint8Array(dt.byteLength+Gt.byteLength),Ye++,wt.set(dt),wt.set(Gt,dt.byteLength),this.trigger("data",{track:ce,boxes:wt}),this.resetStream_(),this.trigger("done","VideoSegmentStream");}}
41,this.reset=function(){this.resetStream_(),Ee=[],this.gopCache_.length=0,Ve.length=0,this.trigger("reset");},this.resetStream_=function(){fc(ce),we=Pe=void 0;},this.getGopForFusion_=function(et){for(var dt,wt,zt,Gt=1/0,Bi=0;Bi<this.gopCache_.length;Bi++)wt=(zt=this.gopCache_[Bi]).gop,ce.pps&&Hy(ce.pps[0],zt.pps[0])&&ce.sps&&Hy(ce.sps[0],zt.sps[0])&&(wt.dts<ce.timelineStartInfo.dts||-1e4<=(wt=et.dts-wt.dts-wt.duration)&&wt<=45e3&&(!dt||wt<Gt)&&(dt=zt,Gt=wt));return dt?dt.gop:null;},this.alignGopsAtStart_=function(et){for(var dt,wt,zt,Gt,Bi=et.byteLength,Ai=et.nalCount,Gi=et.duration,Br=dt=0;Br<Ve.length&&dt<et.length&&(wt=Ve[Br],zt=et[dt],wt.pts!==zt.pts);)zt.pts>wt.pts?Br++:(dt++,Bi-=zt.byteLength,Ai-=zt.nalCount,Gi-=zt.duration);return dt===0?et:dt===et.length?null:((Gt=et.slice(dt)).byteLength=Bi,Gt.duration=Gi,Gt.nalCount=Ai,Gt.pts=Gt[0].pts,Gt.dts=Gt[0].dts,Gt);},this.alignGopsAtEnd_=function(et){for(var dt,wt,zt=Ve.length-1,Gt=et.length-1,Bi=null,Ai=!1;0<=zt&&0<=Gt;){if(dt=Ve[zt],wt=et[Gt],dt.pts===wt.pts){Ai=!0;break;}dt.pts>wt.pts?zt--:(zt===Ve.length-1&&(Bi=Gt),Gt--);}if(!Ai&&Bi===null)return null;if((Gi=Ai?Gt:Bi)===0)return et;var Gi=et.slice(Gi),Br=Gi.reduce(function(vo,ro){return vo.byteLength+=ro.byteLength,vo.duration+=ro.duration,vo.nalCount+=ro.nalCount,vo;},{byteLength:0,duration:0,nalCount:0});return Gi.byteLength=Br.byteLength,Gi.duration=Br.duration,Gi.nalCount=Br.nalCount,Gi.pts=Gi[0].pts,Gi.dts=Gi[0].dts,Gi;},this.alignGopsWith=function(et){Ve=et;};}).prototype=new jr(),((ju=function(ce,ve){this.numberOfTracks=0,this.metadataStream=ve,(ce=ce||{}).remux!==void 0?this.remuxTracks=!!ce.remux:this.remuxTracks=!0,typeof ce.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=ce.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ju.prototype.init.call(this),this.push=function(Pe){return Pe.text?this.pendingCaptions.push(Pe):Pe.frames?this.pendingMetadata.push(Pe):(this.pendingTracks.push(Pe.track),this.pendingBytes+=Pe.boxes.byteLength,Pe.track.type==="video"&&(this.videoTrack=Pe.track,this.pendingBoxes.push(Pe.boxes)),void(Pe.track.type==="audio"&&(this.audioTrack=Pe.track,this.pendingBoxes.unshift(Pe.boxes))));};}).prototype=new jr()).flush=function(ce){var ve,Pe,we,Ee=0,Ve={captions:[],captionStreams:{},metadata:[],info:{}},Ye=0;if(this.pendingTracks.length<this.numberOfTracks){if(ce!=="VideoSegmentStream"&&ce!=="AudioSegmentStream"||this.remuxTracks)return;if(this.pendingTracks.length===0)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0));}if(this.videoTrack?(Ye=this.videoTrack.timelineStartInfo.pts,Yy.forEach(function(et){Ve.info[et]=this.videoTrack[et];},this)):this.audioTrack&&(Ye=this.audioTrack.timelineStartInfo.pts,qy.forEach(function(et){Ve.info[et]=this.audioTrack[et];},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?Ve.type=this.pendingTracks[0].type:Ve.type="combined",this.emittedTracks+=this.pendingTracks.length,ce=Hw(this.pendingTracks),Ve.initSegment=new Uint8Array(ce.byteLength),Ve.initSegment.set(ce),Ve.data=new Uint8Array(this.pendingBytes),we=0;we<this.pendingBoxes.length;we++)Ve.data.set(this.pendingBoxes[we],Ee),Ee+=this.pendingBoxes[we].byteLength;for(we=0;we<this.pendingCaptions.length;we++)(ve=this.pendingCaptions[we]).startTime=kf(ve.startPts,Ye,this.keepOriginalTimestamps),ve.endTime=kf(ve.endPts,Ye,this.keepOriginalTimestamps),Ve.captionStreams[ve.stream]=!0,Ve.captions.push(ve);for(we=0;we<this.pendingMetadata.length;we++)(Pe=this.pendingMetadata[we]).cueTime=kf(Pe.pts,Ye,this.keepOriginalTimestamps),Ve.metadata.push(Pe);for(Ve.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",Ve),we=0;we<Ve.captions.length;we++)ve=Ve.captions[we],this.trigger("caption",ve);for(we=0;we<Ve.metadata.length;we++)Pe=Ve.metadata[we],this.trigger("id3Frame",Pe);}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);},ju.prototype.setRemux=function(ce){this.remuxTracks=ce;},(Ff=function(ce){var ve,Pe,we=this,Ee=!0;Ff.prototype.init.call(this),ce=ce||{},this.baseMediaDecodeTime=ce.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var Ve={};(this.transmuxPipeline_=Ve).type="aac",Ve.metadataStream=new xs.MetadataStream(),Ve.aacStream
41=new bE(),Ve.audioTimestampRolloverStream=new xs.TimestampRolloverStream("audio"),Ve.timedMetadataTimestampRolloverStream=new xs.TimestampRolloverStream("timed-metadata"),Ve.adtsStream=new Fy(),Ve.coalesceStream=new ju(ce,Ve.metadataStream),Ve.headOfPipeline=Ve.aacStream,Ve.aacStream.pipe(Ve.audioTimestampRolloverStream).pipe(Ve.adtsStream),Ve.aacStream.pipe(Ve.timedMetadataTimestampRolloverStream).pipe(Ve.metadataStream).pipe(Ve.coalesceStream),Ve.metadataStream.on("timestamp",function(Ye){Ve.aacStream.setTimestamp(Ye.timeStamp);}),Ve.aacStream.on("data",function(Ye){Ye.type!=="timed-metadata"&&Ye.type!=="audio"||Ve.audioSegmentStream||(Pe=Pe||{timelineStartInfo:{baseMediaDecodeTime:we.baseMediaDecodeTime},codec:"adts",type:"audio"},Ve.coalesceStream.numberOfTracks++,Ve.audioSegmentStream=new Hd(Pe,ce),Ve.audioSegmentStream.on("log",we.getLogTrigger_("audioSegmentStream")),Ve.audioSegmentStream.on("timingInfo",we.trigger.bind(we,"audioTimingInfo")),Ve.adtsStream.pipe(Ve.audioSegmentStream).pipe(Ve.coalesceStream),we.trigger("trackinfo",{hasAudio:!!Pe,hasVideo:!!ve}));}),Ve.coalesceStream.on("data",this.trigger.bind(this,"data")),Ve.coalesceStream.on("done",this.trigger.bind(this,"done")),zy(this,Ve);},this.setupTsPipeline=function(){var Ve={};(this.transmuxPipeline_=Ve).type="ts",Ve.metadataStream=new xs.MetadataStream(),Ve.packetStream=new xs.TransportPacketStream(),Ve.parseStream=new xs.TransportParseStream(),Ve.elementaryStream=new xs.ElementaryStream(),Ve.timestampRolloverStream=new xs.TimestampRolloverStream(),Ve.adtsStream=new Fy(),Ve.h264Stream=new SE(),Ve.captionStream=new xs.CaptionStream(ce),Ve.coalesceStream=new ju(ce,Ve.metadataStream),Ve.headOfPipeline=Ve.packetStream,Ve.packetStream.pipe(Ve.parseStream).pipe(Ve.elementaryStream).pipe(Ve.timestampRolloverStream),Ve.timestampRolloverStream.pipe(Ve.h264Stream),Ve.timestampRolloverStream.pipe(Ve.adtsStream),Ve.timestampRolloverStream.pipe(Ve.metadataStream).pipe(Ve.coalesceStream),Ve.h264Stream.pipe(Ve.captionStream).pipe(Ve.coalesceStream),Ve.elementaryStream.on("data",function(Ye){var et;if(Ye.type==="metadata"){for(et=Ye.tracks.length;et--;)ve||Ye.tracks[et].type!=="video"?Pe||Ye.tracks[et].type!=="audio"||((Pe=Ye.tracks[et]).timelineStartInfo.baseMediaDecodeTime=we.baseMediaDecodeTime):(ve=Ye.tracks[et]).timelineStartInfo.baseMediaDecodeTime=we.baseMediaDecodeTime;ve&&!Ve.videoSegmentStream&&(Ve.coalesceStream.numberOfTracks++,Ve.videoSegmentStream=new Bf(ve,ce),Ve.videoSegmentStream.on("log",we.getLogTrigger_("videoSegmentStream")),Ve.videoSegmentStream.on("timelineStartInfo",function(dt){Pe&&!ce.keepOriginalTimestamps&&(Pe.timelineStartInfo=dt,Ve.audioSegmentStream.setEarliestDts(dt.dts-we.baseMediaDecodeTime));}),Ve.videoSegmentStream.on("processedGopsInfo",we.trigger.bind(we,"gopInfo")),Ve.videoSegmentStream.on("segmentTimingInfo",we.trigger.bind(we,"videoSegmentTimingInfo")),Ve.videoSegmentStream.on("baseMediaDecodeTime",function(dt){Pe&&Ve.audioSegmentStream.setVideoBaseMediaDecodeTime(dt);}),Ve.videoSegmentStream.on("timingInfo",we.trigger.bind(we,"videoTimingInfo")),Ve.h264Stream.pipe(Ve.videoSegmentStream).pipe(Ve.coalesceStream)),Pe&&!Ve.audioSegmentStream&&(Ve.coalesceStream.numberOfTracks++,Ve.audioSegmentStream=new Hd(Pe,ce),Ve.audioSegmentStream.on("log",we.getLogTrigger_("audioSegmentStream")),Ve.audioSegmentStream.on("timingInfo",we.trigger.bind(we,"audioTimingInfo")),Ve.audioSegmentStream.on("segmentTimingInfo",we.trigger.bind(we,"audioSegmentTimingInfo")),Ve.adtsStream.pipe(Ve.audioSegmentStream).pipe(Ve.coalesceStream)),we.trigger("trackinfo",{hasAudio:!!Pe,hasVideo:!!ve});}}),Ve.coalesceStream.on("data",this.trigger.bind(this,"data")),Ve.coalesceStream.on("id3Frame",function(Ye){Ye.dispatchType=Ve.metadataStream.dispatchType,we.trigger("id3Frame",Ye);}),Ve.coalesceStream.on("caption",this.trigger.bind(this,"caption")),Ve.coalesceStream.on("done",this.trigger.bind(this,"done")),zy(this,Ve);},this.setBaseMediaDecodeTime=function(Ve){var Ye=this.transmuxPipeline_;ce.keepOriginalTimestamps||(this.baseMediaDecodeTime=Ve),Pe&&(Pe.timelineStartInfo.dts=void 0,Pe.timelineStartInfo.pts=void 0,fc(Pe),Ye.audioTimestampRolloverStream&&Ye.audioTimestampRolloverStream.discontinuity()),ve&&(Ye.videoSegmentStream&&(Ye.videoSegmentStream.gopCache_=[]),ve.timelineStartInfo.dts=void 0,ve.timelineStartInfo.pts=void 0,fc(ve),Ye.captionStream.reset()),Ye.timestampRolloverStream&&Ye.timestampRolloverStream.discontinuity();},this.setAudioAppendStart=function(Ve){Pe&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(Ve);},this.setRemux=function(Ve){var Ye=this.transmuxPipeline_;ce.remux=Ve,Ye&&Ye.coalesceStream&&Ye.coalesceStream.setRemux(Ve);},this.alignGopsWith=function(Ve){ve&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(Ve);},this.getLogTrigger_=function(Ve){var Ye=this;return function(et){et.stream=Ve,Ye.trigger("log",et);};},this.push=function(Ve){var Ye;Ee&&((Ye=wE(Ve))&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():Ye||this.transmuxPipeline_.type==="ts"||this.setupTsPipeline(),Ee=!1),this.transmuxPipeline_.headOfPipeline.push(Ve);},this.flush=function(){Ee=!0,this.transmuxPipeline_.headOfPipeline.flush();},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline();},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset();},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset();};}).prototype=new jr();function Xy(ce){var ve=31&ce[1];return ve<<8|ce[2];}function $d(ce){return!!(64&ce[1]);}function Wd(ce){var ve=0;return 1<(48&ce[3])>>>4&&(ve+=ce[4]+1),ve;}function Gf(ce){switch(ce){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null;}}var TE=Ff,Bu=function(ce){return ce>>>0;},Fu=function(ce){return("00"+ce.toString(16)).slice(-2);},Uu=function(ce){var ve="";return(ve+=String.fromCharCode(ce[0]))+String.fromCharCode(ce[1])+String.fromCharCode(ce[2])+String.fromCharCode(ce[3]);},CE=Bu,Uo=function ce(ve,Pe){var we,Ee,Ve,Ye=[];
41if(!Pe.length)return null;for(we=0;we<ve.byteLength;)Ee=CE(ve[we]<<24|ve[we+1]<<16|ve[we+2]<<8|ve[we+3]),Ve=Uu(ve.subarray(we+4,we+8)),Ee=1<Ee?we+Ee:ve.byteLength,Ve===Pe[0]&&(Pe.length===1?Ye.push(ve.subarray(we+8,Ee)):(Ve=ce(ve.subarray(we+8,Ee),Pe.slice(1))).length&&(Ye=Ye.concat(Ve))),we=Ee;return Ye;},OE=Bu,PE=pc.getUint64,IE=function(ce){var ve={version:ce[0],flags:new Uint8Array(ce.subarray(1,4))};return ve.version===1?ve.baseMediaDecodeTime=PE(ce.subarray(4)):ve.baseMediaDecodeTime=OE(ce[4]<<24|ce[5]<<16|ce[6]<<8|ce[7]),ve;},Ky=function(ce){return{isLeading:(12&ce[0])>>>2,dependsOn:3&ce[0],isDependedOn:(192&ce[1])>>>6,hasRedundancy:(48&ce[1])>>>4,paddingValue:(14&ce[1])>>>1,isNonSyncSample:1&ce[1],degradationPriority:ce[2]<<8|ce[3]};},kE=function(ce){var ve,Pe={version:ce[0],flags:new Uint8Array(ce.subarray(1,4)),samples:[]},we=new DataView(ce.buffer,ce.byteOffset,ce.byteLength),Ee=1&Pe.flags[2],Ve=4&Pe.flags[2],Ye=1&Pe.flags[1],et=2&Pe.flags[1],dt=4&Pe.flags[1],wt=8&Pe.flags[1],zt=we.getUint32(4),Gt=8;for(Ee&&(Pe.dataOffset=we.getInt32(Gt),Gt+=4),Ve&&zt&&(ve={flags:Ky(ce.subarray(Gt,Gt+4))},Gt+=4,Ye&&(ve.duration=we.getUint32(Gt),Gt+=4),et&&(ve.size=we.getUint32(Gt),Gt+=4),wt&&(Pe.version===1?ve.compositionTimeOffset=we.getInt32(Gt):ve.compositionTimeOffset=we.getUint32(Gt),Gt+=4),Pe.samples.push(ve),zt--);zt--;)ve={},Ye&&(ve.duration=we.getUint32(Gt),Gt+=4),et&&(ve.size=we.getUint32(Gt),Gt+=4),dt&&(ve.flags=Ky(ce.subarray(Gt,Gt+4)),Gt+=4),wt&&(Pe.version===1?ve.compositionTimeOffset=we.getInt32(Gt):ve.compositionTimeOffset=we.getUint32(Gt),Gt+=4),Pe.samples.push(ve);return Pe;},AE=function(Pe){var ve=new DataView(Pe.buffer,Pe.byteOffset,Pe.byteLength),Pe={version:Pe[0],flags:new Uint8Array(Pe.subarray(1,4)),trackId:ve.getUint32(4)},we=1&Pe.flags[2],Ee=2&Pe.flags[2],Ve=8&Pe.flags[2],Ye=16&Pe.flags[2],et=32&Pe.flags[2],dt=65536&Pe.flags[0],wt=131072&Pe.flags[0],zt=8;return we&&(zt+=4,Pe.baseDataOffset=ve.getUint32(12),zt+=4),Ee&&(Pe.sampleDescriptionIndex=ve.getUint32(zt),zt+=4),Ve&&(Pe.defaultSampleDuration=ve.getUint32(zt),zt+=4),Ye&&(Pe.defaultSampleSize=ve.getUint32(zt),zt+=4),et&&(Pe.defaultSampleFlags=ve.getUint32(zt)),dt&&(Pe.durationIsEmpty=!0),!we&&wt&&(Pe.baseDataOffsetIsMoof=!0),Pe;},jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:t!==void 0?t:typeof self<"u"?self:{},jr=typeof window<"u"?window:jr!==void 0?jr:typeof self<"u"?self:{},zf=jr,ME=Mf,RE=mc.CaptionStream,LE=function(we,ve){var Pe=Uo(we,["moof","traf"]),we=Uo(we,["mdat"]),Ee={},Ve=[];return we.forEach(function(Ye,et){et=Pe[et],Ve.push({mdat:Ye,traf:et});}),Ve.forEach(function(vo){var et,dt,wt,zt,Gt,Bi=vo.mdat,vo=vo.traf,Ai=Uo(vo,["tfhd"]),Ai=AE(Ai[0]),Gi=Ai.trackId,Br=Uo(vo,["tfdt"]),Br=0<Br.length?IE(Br[0]).baseMediaDecodeTime:0,vo=Uo(vo,["trun"]);ve===Gi&&0<vo.length&&(et=Br,dt=Ai.defaultSampleDuration||0,wt=Ai.defaultSampleSize||0,zt=Ai.trackId,Gt=[],vo.forEach(function(ro){ro=kE(ro).samples,ro.forEach(function(Xr){Xr.duration===void 0&&(Xr.duration=dt),Xr.size===void 0&&(Xr.size=wt),Xr.trackId=zt,Xr.dts=et,Xr.compositionTimeOffset===void 0&&(Xr.compositionTimeOffset=0),typeof et=="bigint"?(Xr.pts=et+zf.BigInt(Xr.compositionTimeOffset),et+=zf.BigInt(Xr.duration)):(Xr.pts=et+Xr.compositionTimeOffset,et+=Xr.duration);}),Gt=Gt.concat(ro);}),Br=function(ro,Xr,gr){for(var rn,Ts,Hf=new DataView(ro.buffer,ro.byteOffset,ro.byteLength),zu={logs:[],seiNals:[]},Cs=0;Cs+4<ro.length;Cs+=rn)if(rn=Hf.getUint32(Cs),Cs+=4,!(rn<=0))switch(31&ro[Cs]){case 6:var Hs=ro.subarray(Cs+1,Cs+1+rn),qd=function(HE,Jy){for(var ev=HE,$f=0;$f<Jy.length;$f++){var Wf=Jy[$f];if(ev<Wf.size)return Wf;ev-=Wf.size;}return null;}(Cs,Xr),Hs={nalUnitType:"sei_rbsp",size:rn,data:Hs,escapedRBSP:ME(Hs),trackId:gr};if(qd)Hs.pts=qd.pts,Hs.dts=qd.dts,Ts=qd;else{if(!Ts){zu.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+Cs+" for trackId "+gr+". See mux.js#223."});break;}Hs.pts=Ts.pts,Hs.dts=Ts.dts;}zu.seiNals.push(Hs);}return zu;}(Bi,Gt,Gi),Ee[Gi]||(Ee[Gi]={seiNals:[],logs:[]}),Ee[Gi].seiNals=Ee[Gi].seiNals.concat(Br.seiNals),Ee[Gi].logs=Ee[Gi].logs.concat(Br.logs));}),Ee;},DE=function(){var ce,ve,Pe,we,Ee,Ve,Ye=!1;this.isInitialized=function(){return Ye;},this.init=function(et){ce=new RE(),Ye=!0,Ve=!!et&&et.isPartial,ce.on("data",function(dt){dt.startTime=dt.startPts/we,dt.endTime=dt.endPts/we,Ee.captions.push(dt),Ee.captionStream
41s[dt.stream]=!0;}),ce.on("log",function(dt){Ee.logs.push(dt);});},this.isNewInit=function(et,dt){return!(et&&et.length===0||dt&&typeof dt=="object"&&Object.keys(dt).length===0)&&(Pe!==et[0]||we!==dt[Pe]);},this.parse=function(et,dt,wt){if(!this.isInitialized()||!dt||!wt)return null;if(this.isNewInit(dt,wt))Pe=dt[0],we=wt[Pe];else if(Pe===null||!we)return ve.push(et),null;for(;0<ve.length;){var zt=ve.shift();this.parse(zt,dt,wt);}return(et=function(Gt,Bi,Ai){return Bi===null?null:(Gt=LE(Gt,Bi)[Bi]||{},{seiNals:Gt.seiNals,logs:Gt.logs,timescale:Ai});}(et,Pe,we))&&et.logs&&(Ee.logs=Ee.logs.concat(et.logs)),et!==null&&et.seiNals?(this.pushNals(et.seiNals),this.flushStream(),Ee):Ee.logs.length?{logs:Ee.logs,captions:[],captionStreams:[]}:null;},this.pushNals=function(et){if(!this.isInitialized()||!et||et.length===0)return null;et.forEach(function(dt){ce.push(dt);});},this.flushStream=function(){if(!this.isInitialized())return null;Ve?ce.partialFlush():ce.flush();},this.clearParsedCaptions=function(){Ee.captions=[],Ee.captionStreams={},Ee.logs=[];},this.resetCaptionStream=function(){if(!this.isInitialized())return null;ce.reset();},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream();},this.reset=function(){ve=[],we=Pe=null,Ee?this.clearParsedCaptions():Ee={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream();},this.reset();},Zy=Bu,Gu=Fu,NE=pc.getUint64,VE=function(ce){var ve=ce[0]===0?12:20;return Zy(ce[ve]<<24|ce[1+ve]<<16|ce[2+ve]<<8|ce[3+ve]);},jE=function(ce,ve){return ve=Uo(ve,["moof","traf"]).reduce(function(Pe,et){var Ee,Ve=Uo(et,["tfhd"])[0],Ve=Zy(Ve[4]<<24|Ve[5]<<16|Ve[6]<<8|Ve[7]),Ve=ce[Ve]||9e4,et=Uo(et,["tfdt"])[0],Ye=new DataView(et.buffer,et.byteOffset,et.byteLength),et=et[0]===1?NE(et.subarray(4,12)):Ye.getUint32(4);return typeof et=="bigint"?Ee=et/zf.BigInt(Ve):typeof et!="number"||isNaN(et)||(Ee=et/Ve),Pe=(Ee=Ee<Number.MAX_SAFE_INTEGER?Number(Ee):Ee)<Pe?Ee:Pe;},1/0),typeof ve=="bigint"||isFinite(ve)?ve:0;},BE=function(ve){var ve=Uo(ve,["moov","trak"]),Pe=[];return ve.forEach(function(we){var Ee,Ve={},et=Uo(we,["tkhd"])[0],Ye=(et&&(Ye=(et=new DataView(et.buffer,et.byteOffset,et.byteLength)).getUint8(0),Ve.id=Ye===0?et.getUint32(12):et.getUint32(20)),Uo(we,["mdia","hdlr"])[0]),Ye=(Ye&&(et=Uu(Ye.subarray(8,12)),Ve.type=et==="vide"?"video":et==="soun"?"audio":et),Uo(we,["mdia","minf","stbl","stsd"])[0]),et=(Ye&&(et=Ye.subarray(8),Ve.codec=Uu(et.subarray(4,8)),(Ye=Uo(et,[Ve.codec])[0])&&(/^[asm]vc[1-9]$/i.test(Ve.codec)?(Ee=Ye.subarray(78),Uu(Ee.subarray(4,8))==="avcC"&&11<Ee.length?(Ve.codec+=".",Ve.codec+=Gu(Ee[9]),Ve.codec+=Gu(Ee[10]),Ve.codec+=Gu(Ee[11])):Ve.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(Ve.codec)?(Ee=Ye.subarray(28),Uu(Ee.subarray(4,8))==="esds"&&20<Ee.length&&Ee[19]!==0?(Ve.codec+="."+Gu(Ee[19]),Ve.codec+="."+Gu(Ee[20]>>>2&63).replace(/^0/,"")):Ve.codec="mp4a.40.2"):Ve.codec=Ve.codec.toLowerCase())),Uo(we,["mdia","mdhd"])[0]);et&&(Ve.timescale=VE(et)),Pe.push(Ve);}),Pe;},gc=mE,Jn={},Pl=(Jn.ts={parseType:function(ce,ve){return ce=Xy(ce),ce===0?"pat":ce===ve?"pmt":ve?"pes":null;},parsePat:function(ce){var ve=$d(ce),Pe=4+Wd(ce);return ve&&(Pe+=ce[Pe]+1),(31&ce[Pe+10])<<8|ce[Pe+11];},parsePmt:function(ce){var ve={},Pe=$d(ce),we=4+Wd(ce);if(Pe&&(we+=ce[we]+1),1&ce[we+5]){for(var Ee=3+((15&ce[we+1])<<8|ce[we+2])-4,Ve=12+((15&ce[we+10])<<8|ce[we+11]);Ve<Ee;){var Ye=we+Ve;ve[(31&ce[Ye+1])<<8|ce[Ye+2]]=ce[Ye],Ve+=5+((15&ce[Ye+3])<<8|ce[Ye+4]);}return ve;}},parsePayloadUnitStartIndicator:$d,parsePesType:function(ce,ve){switch(ve[Xy(ce)]){case yo.H264_STREAM_TYPE:return"video";case yo.ADTS_STREAM_TYPE:return"audio";case yo.METADATA_STREAM_TYPE:return"timed-metadata";default:return null;}},parsePesTime:function(ce){if(!$d(ce))return null;var ve=4+Wd(ce);if(ve>=ce.byteLength)return null;var Pe=null,we=ce[ve+7];return 192&we&&((Pe={}).pts=(14&ce[ve+9])<<27|(255&ce[ve+10])<<20|(254&ce[ve+11])<<12|(255&ce[ve+12])<<5|(254&ce[ve+13])>>>3,Pe.pts*=4,Pe.pts+=(6&ce[ve+13])>>>1,Pe.dts=Pe.pts,64&we&&(Pe.dts=(14&ce[ve+14])<<27|(255&ce[ve+15])<<20|(254&ce[ve+16])<<12|(255&ce[ve+17])<<5|(254&ce[ve+18])>>>3,Pe.dts*=4,Pe.dts+=(6&ce[ve+18])>>>1)),Pe;},videoPacketContainsKeyFrame:function(ce){for(var ve=4+Wd(ce),Pe=ce.subarray(ve),we=0,Ee=0,Ve=!1;Ee<Pe.byteLength-3;Ee++)if(Pe[Ee+2]===1){we=Ee+5;break;}for(;we<Pe.byteLength;)switch(Pe[we]){case 0:if(Pe[we-1]!==0){we+=2;break;}if(Pe[we-2]!==0){we++;break;}for(Ee+3!==we-2&&Gf(31&Pe[Ee+3])==="slice_layer_without_partitioning_rbsp_idr"&&(Ve=!0);Pe[++we]!==1&&we<Pe.length;);Ee=we-2,we+=3;break;case 1:if(Pe[we-1]!==0||Pe[we-2]!==0){we+=3;break;}Gf(31&Pe[Ee+3])==="slice_layer_without_partitioning_rbsp_idr"&&(Ve=!0),Ee=we-2,we+=3;break;default:we+=3;}return Pe=Pe.subarray(Ee),we-=Ee,Ee=0,Ve=Pe&&3<Pe.byteLength&&Gf(31&Pe[Ee+3])==="slice_layer_without_partitioning_rbsp_idr"?!0:Ve;}},Jn.aac=zd,Ol),FE=function(ce,ve){for(var Pe,we=0,Ee=188;Ee<ce.byteLength;)if(ce[we]===71&&ce[Ee]===71){switch(Pe=ce.subarray(we,Ee),Jn.ts.parseType(Pe,ve.pid)){case"pat":ve.pid=Jn.ts.parsePat(Pe);break;case"pmt":var Ve=Jn.ts.parsePmt(Pe);ve.table=ve.table||{},Object.keys(Ve).forEach(function(Ye){ve.table[Ye]=Ve[Ye];});}we+=188,Ee+=188;}else we++,Ee++;},UE=function(ce,ve,Pe){for(var we,Ee,Ve,Ye,et=0,dt=188,wt=!1;dt<=ce.byteLength;)if(ce[et]!==71||ce[dt]!==71&&dt!==ce.byteLength)et++,dt++;else{if(we=ce.subarray(et,dt),Jn.ts.parseType(we,ve.pid)==="pes"&&(Ee=Jn.ts.parsePesType(we,ve.table),Ve=Jn.ts.parsePayloadUnitStartIndicator(we),Ee==="audio"&&Ve&&(Ye=Jn.ts.parsePesTime(we))&&(Ye.type="audio",Pe.audio.push(Ye),wt=!0)),wt)break;et+=188,dt+=188;}for(et=(dt=ce.byteLength)-188,wt=!1;0<=et;)if(ce[et]!==71||ce[dt]!==71&&dt!==ce.byteLength)et--,dt--;else{if(we=ce.subarray(et,dt),Jn.ts.parseType(we,ve.pid)==="pes"&&(Ee=Jn.ts.parsePesType(we,ve.table),Ve=Jn.ts.parsePayloadUnitStartIndicator(we),Ee==="audio"&&Ve&&(Ye=Jn.ts.parsePesTime(we))&&(Ye.type="audio",Pe.audio.push(Ye),wt=!0)),wt)break;et-=188,dt-=188;}},GE=function(ce,ve,Pe){for(var we,Ee,Ve,Ye,et,dt,wt,zt,Gt=0,Bi=188,Ai=!1,Gi={data:[],size:0};Bi<ce.byteLength;)if(ce[Gt]===71&&ce[Bi]===71){if(we=ce.subarray(Gt,Bi),Jn.ts.parseType(we,ve.pid)==="pes"&&(Ee=Jn.ts.parsePesType(we,ve.table),Ve=Jn.ts.parsePayloadUnitStartIndicator(we),Ee==="video"&&(Ve&&!Ai&&(Ye=Jn.ts.parsePesTime(we))&&(Ye.type="video",Pe.video.push(Ye),Ai=!0),!Pe.firstKeyFrame))){if
41(Ve&&Gi.size!==0){for(et=new Uint8Array(Gi.size),dt=0;Gi.data.length;)wt=Gi.data.shift(),et.set(wt,dt),dt+=wt.byteLength;Jn.ts.videoPacketContainsKeyFrame(et)&&((zt=Jn.ts.parsePesTime(et))?(Pe.firstKeyFrame=zt,Pe.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")),Gi.size=0;}Gi.data.push(we),Gi.size+=we.byteLength;}if(Ai&&Pe.firstKeyFrame)break;Gt+=188,Bi+=188;}else Gt++,Bi++;for(Gt=(Bi=ce.byteLength)-188,Ai=!1;0<=Gt;)if(ce[Gt]===71&&ce[Bi]===71){if(we=ce.subarray(Gt,Bi),Jn.ts.parseType(we,ve.pid)==="pes"&&(Ee=Jn.ts.parsePesType(we,ve.table),Ve=Jn.ts.parsePayloadUnitStartIndicator(we),Ee==="video"&&Ve&&(Ye=Jn.ts.parsePesTime(we))&&(Ye.type="video",Pe.video.push(Ye),Ai=!0)),Ai)break;Gt-=188,Bi-=188;}else Gt--,Bi--;},zE=function(Ve,ve){var Pe,we,Ee,Ve=(Jn.aac.isLikelyAacData(Ve)?function(Ye){for(var et,dt=!1,wt=0,zt=null,Gt=null,Bi=0,Ai=0;3<=Ye.length-Ai;){switch(Jn.aac.parseType(Ye,Ai)){case"timed-metadata":if(Ye.length-Ai<10){dt=!0;break;}if((Bi=Jn.aac.parseId3TagSize(Ye,Ai))>Ye.length){dt=!0;break;}Gt===null&&(et=Ye.subarray(Ai,Ai+Bi),Gt=Jn.aac.parseAacTimestamp(et)),Ai+=Bi;break;case"audio":if(Ye.length-Ai<7){dt=!0;break;}if((Bi=Jn.aac.parseAdtsSize(Ye,Ai))>Ye.length){dt=!0;break;}zt===null&&(et=Ye.subarray(Ai,Ai+Bi),zt=Jn.aac.parseSampleRate(et)),wt++,Ai+=Bi;break;default:Ai++;}if(dt)return null;}if(zt===null||Gt===null)return null;var Gi=Pl/zt;return{audio:[{type:"audio",dts:Gt,pts:Gt},{type:"audio",dts:Gt+1024*wt*Gi,pts:Gt+1024*wt*Gi}]};}:function(Ye){var et,dt={pid:null,table:null},wt={};for(et in FE(Ye,dt),dt.table)if(dt.table.hasOwnProperty(et))switch(dt.table[et]){case yo.H264_STREAM_TYPE:wt.video=[],GE(Ye,dt,wt),wt.video.length===0&&delete wt.video;break;case yo.ADTS_STREAM_TYPE:wt.audio=[],UE(Ye,dt,wt),wt.audio.length===0&&delete wt.audio;}return wt;})(Ve);return Ve&&(Ve.audio||Ve.video)?(ve=ve,(Pe=Ve).audio&&Pe.audio.length&&((we=ve)!==void 0&&!isNaN(we)||(we=Pe.audio[0].dts),Pe.audio.forEach(function(Ye){Ye.dts=gc(Ye.dts,we),Ye.pts=gc(Ye.pts,we),Ye.dtsTime=Ye.dts/Pl,Ye.ptsTime=Ye.pts/Pl;})),Pe.video&&Pe.video.length&&((Ee=ve)!==void 0&&!isNaN(Ee)||(Ee=Pe.video[0].dts),Pe.video.forEach(function(Ye){Ye.dts=gc(Ye.dts,Ee),Ye.pts=gc(Ye.pts,Ee),Ye.dtsTime=Ye.dts/Pl,Ye.ptsTime=Ye.pts/Pl;}),Pe.firstKeyFrame&&((ve=Pe.firstKeyFrame).dts=gc(ve.dts,Ee),ve.pts=gc(ve.pts,Ee),ve.dtsTime=ve.dts/Pl,ve.ptsTime=ve.pts/Pl)),Ve):null;},Qy=function(){function ce(Pe,we){this.options=we||{},this.self=Pe,this.init();}var ve=ce.prototype;return ve.init=function(){var Pe,we;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new TE(this.options),Pe=this.self,(we=this.transmuxer).on("data",function(Ee){var Ve=Ee.initSegment,Ve=(Ee.initSegment={data:Ve.buffer,byteOffset:Ve.byteOffset,byteLength:Ve.byteLength},Ee.data);Ee.data=Ve.buffer,Pe.postMessage({action:"data",segment:Ee,byteOffset:Ve.byteOffset,byteLength:Ve.byteLength},[Ee.data]);}),we.on("done",function(Ee){Pe.postMessage({action:"done"});}),we.on("gopInfo",function(Ee){Pe.postMessage({action:"gopInfo",gopInfo:Ee});}),we.on("videoSegmentTimingInfo",function(Ee){var Ve={start:{decode:xo(Ee.start.dts),presentation:xo(Ee.start.pts)},end:{decode:xo(Ee.end.dts),presentation:xo(Ee.end.pts)},baseMediaDecodeTime:xo(Ee.baseMediaDecodeTime)};Ee.prependedContentDuration&&(Ve.prependedContentDuration=xo(Ee.prependedContentDuration)),Pe.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:Ve});}),we.on("audioSegmentTimingInfo",function(Ee){var Ve={start:{decode:xo(Ee.start.dts),presentation:xo(Ee.start.pts)},end:{decode:xo(Ee.end.dts),presentation:xo(Ee.end.pts)},baseMediaDecodeTime:xo(Ee.baseMediaDecodeTime)};Ee.prependedContentDuration&&(Ve.prependedContentDuration=xo(Ee.prependedContentDuration)),Pe.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:Ve});}),we.on("id3Frame",function(Ee){Pe.postMessage({action:"id3Frame",id3Frame:Ee});}),we.on("caption",function(Ee){Pe.postMessage({action:"caption",caption:Ee});}),we.on("trackinfo",function(Ee){Pe.postMessage({action:"trackinfo",trackInfo:Ee});}),we.on("audioTimingInfo",function(Ee){Pe.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:xo(Ee.start),end:xo(Ee.end)}});}),we.on("videoTimingInfo",function(Ee){Pe.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:xo(Ee.start),end:xo(Ee.end)}});}),we.on("log",function(Ee){Pe.postMessage({action:"log",log:Ee});});},ve.pushMp4Captions=function(Ee){this.captionParser||(this.captionParser=new DE(),this.captionParser.init());var we=new Uint8Array(Ee.data,Ee.byteOffset,Ee.byteLength),Ee=this.captionParser.parse(we,Ee.trackIds,Ee.timescales);this.self.postMessage({action:"mp4Captions",captions:Ee&&Ee.captions||[],logs:Ee&&Ee.logs||[],data:we.buffer},[we.buffer]);},ve.probeMp4StartTime=function(we){var Ee=we.timescales,we=we.data,Ee=jE(Ee,we);this.self.postMessage({action:"probeMp4StartTime",startTime:Ee,data:we},[we.buffer]);},ve.probeMp4Tracks=function(we){var we=we.data,Ee=BE(we);this.self.postMessage({action:"probeMp4Tracks",tracks:Ee,data:we},[we.buffer]);},ve.probeTs=function(Ee){var we=Ee.data,Ee=Ee.baseStartTime,Ee=typeof Ee!="number"||isNaN(Ee)?void 0:Ee*Ol,Ee=zE(we,Ee),
41Ve=null;Ee&&((Ve={hasVideo:Ee.video&&Ee.video.length===2||!1,hasAudio:Ee.audio&&Ee.audio.length===2||!1}).hasVideo&&(Ve.videoStart=Ee.video[0].ptsTime),Ve.hasAudio&&(Ve.audioStart=Ee.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:Ve,data:we},[we.buffer]);},ve.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions();},ve.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions();},ve.push=function(Pe){Pe=new Uint8Array(Pe.data,Pe.byteOffset,Pe.byteLength),this.transmuxer.push(Pe);},ve.reset=function(){this.transmuxer.reset();},ve.setTimestampOffset=function(Pe){Pe=Pe.timestampOffset||0,this.transmuxer.setBaseMediaDecodeTime(Math.round(My(Pe)));},ve.setAudioAppendStart=function(Pe){this.transmuxer.setAudioAppendStart(Math.ceil(My(Pe.appendStart)));},ve.setRemux=function(Pe){this.transmuxer.setRemux(Pe.remux);},ve.flush=function(Pe){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"});},ve.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"});},ve.alignGopsWith=function(Pe){this.transmuxer.alignGopsWith(Pe.gopsToAlignWith.slice());},ce;}();self.onmessage=function(ce){ce.data.action==="init"&&ce.data.options?this.messageHandlers=new Qy(self,ce.data.options):(this.messageHandlers||(this.messageHandlers=new Qy(self)),ce.data&&ce.data.action&&ce.data.action!=="init"&&this.messageHandlers[ce.data.action]&&this.messageHandlers[ce.data.action](ce.data));};}))),uw=function(k,Te,P){var pe=k.data.segment,u=pe.type,T=pe.initSegment,Ae=pe.captions,A=pe.captionStreams,L=pe.metadata,ie=pe.videoFrameDtsTime,pe=pe.videoFramePtsTime,Te=(Te.buffer.push({captions:Ae,captionStreams:A,metadata:L}),k.data.segment.boxes||{data:k.data.segment.data}),Ae={type:u,data:new Uint8Array(Te.data,Te.data.byteOffset,Te.data.byteLength),initSegment:new Uint8Array(T.data,T.byteOffset,T.byteLength)};ie!==void 0&&(Ae.videoFrameDtsTime=ie),pe!==void 0&&(Ae.videoFramePtsTime=pe),P(Ae);},dw=function(P){var R=P.transmuxedData,P=P.callback;R.buffer=[],P(R);},hw=function(k,R){R.gopInfo=k.data.gopInfo;},ry=function(k){k.currentTransmux=null,k.transmuxQueue.length&&(k.currentTransmux=k.transmuxQueue.shift(),typeof k.currentTransmux=="function"?k.currentTransmux():Bg(k.currentTransmux));},oy=function(k,R){k.postMessage({action:R}),ry(k);},ay=function(k){X1("reset",k);},pw=function(k){var R=new cw(),P=(R.currentTransmux=null,R.transmuxQueue=[],R.terminate);return R.terminate=function(){return R.currentTransmux=null,R.transmuxQueue.length=0,P.call(R);},R.postMessage({action:"init",options:k}),R;},Ga={FAILURE:2,TIMEOUT:-101,ABORTED:-102},vf=function(k){k.forEach(function(R){R.abort();});},fw=function(k){return{bandwidth:k.bandwidth,bytesReceived:k.bytesReceived||0,roundTripTime:k.roundTripTime||0};},mw=function(k){var R=k.target,R={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-R.requestTime||0};return R.bytesReceived=k.loaded,R.bandwidth=Math.floor(R.bytesReceived/R.roundTripTime*8*1e3),R;},_f=function(k,R){return R.timedout?{status:R.status,message:"HLS request timed-out at URL: "+R.uri,code:Ga.TIMEOUT,xhr:R}:R.aborted?{status:R.status,message:"HLS request aborted at URL: "+R.uri,code:Ga.ABORTED,xhr:R}:k?{status:R.status,message:"HLS request errored at URL: "+R.uri,code:Ga.FAILURE,xhr:R}:R.responseType==="arraybuffer"&&R.response.byteLength===0?{status:R.status,message:"Empty HLS response at URL: "+R.uri,code:Ga.FAILURE,xhr:R}:null;},sy=function(k,R){var P,u=Object(C.a)(k.map.bytes);if(u!=="mp4")return P=k.map.resolvedUri||k.map.uri,R({internal:!0,message:"Found unsupported "+(u||"unknown")+" container for initialization segment at URL: "+P,code:Ga.FAILURE});Ad({action:"probeMp4Tracks",data:k.map.bytes,transmuxer:k.transmuxer,callback:function(L){var A=L.tracks,L=L.data;return k.map.bytes=L,A.forEach(function(ie){k.map.tracks=k.map.tracks||{},k.map.tracks[ie.type]||typeof(k.map.tracks[ie.type]=ie).id=="number"&&ie.timescale&&(k.map.timescales=k.map.timescales||{},k.map.timescales[ie.id]=ie.timescale);}),R(null);}});},ly=function(k){var R,P,u,T=k.segment,A=k.bytes,L=k.trackInfoFn,ie=k.timingInfoFn,pe=k.videoSegmentTimingInfoFn,Te=k.audioSegmentTimingInfoFn,Ae=k.id3Fn,je=k.captionsFn,Fe=k.isEndOfTimeline,He=k.endedTimelineFn,Qe=k.dataFn,pt=k.doneFn,Vt=k.onTransmuxerLog,jt=new Uint8Array(A);Object(C.b)(jt)?(T.isFmp4=!0,R=T.map.tracks,P={isFmp4:!0,hasVideo:!!R.video,hasAudio:!!R.audio},R.audio&&R.audio.codec&&R.audio.codec!=="enca"&&(P.audioCodec=R.audio.codec),R.video&&R.video.codec&&R.video.codec!=="encv"&&(P.videoCodec=R.video.codec),R.video&&R.audio&&(P.isMuxed=!0),L(T,P),u=function(It){Qe(T,{data:jt,type:P.hasAudio&&!P.isMuxed?"audio":"video"}),It&&It.length&&je(T,It),pt(null,T,{});},Ad({action:"probeMp4StartTime",timescales:T.map.timescales,data:jt,transmuxer:T.transmuxer,callback:function(Jt){var wi=Jt.data,Jt=Jt.startTime;A=wi.buffer,T.bytes=jt=wi,P.hasAudio&&!P.isMuxed&&ie(T,"audio","start",Jt),P.hasVideo&&ie(T,"video","start",Jt),R.video&&wi.byteLength&&T.transmuxer?Ad({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:T.transmuxer,data:jt,timescales:T.map.timescales,trackIds:[R.video.id],callback:function(Ct){A=Ct.data.buffer,T.bytes=jt=Ct.data,Ct.logs.forEac
41h(function(yi){Vt(rt.mergeOptions(yi,{stream:"mp4CaptionParser"}));}),u(Ct.captions);}}):u();}})):T.transmuxer?(T.container===void 0&&(T.container=Object(C.a)(jt)),T.container!=="ts"&&T.container!=="aac"?(L(T,{hasAudio:!1,hasVideo:!1}),pt(null,T,{})):Z1({segment:T,bytes:A,trackInfoFn:L,timingInfoFn:ie,videoSegmentTimingInfoFn:pe,audioSegmentTimingInfoFn:Te,id3Fn:Ae,captionsFn:je,isEndOfTimeline:Fe,endedTimelineFn:He,dataFn:Qe,doneFn:pt,onTransmuxerLog:Vt})):pt(null,T,{});},cy=function(k,R){var P=k.id,u=k.key,T=k.encryptedBytes,A=k.decryptionWorker;A.addEventListener("message",function L(ie){ie.data.source===P&&(A.removeEventListener("message",L),ie=ie.data.decrypted,R(new Uint8Array(ie.bytes,ie.byteOffset,ie.byteLength)));}),k=u.bytes.slice?u.bytes.slice():new Uint32Array(Array.prototype.slice.call(u.bytes)),A.postMessage(Pg({source:P,encrypted:T,key:k,iv:u.iv}),[T.buffer,k.buffer]);},gw=function(k){var R=k.decryptionWorker,P=k.segment,u=k.trackInfoFn,T=k.timingInfoFn,A=k.videoSegmentTimingInfoFn,L=k.audioSegmentTimingInfoFn,ie=k.id3Fn,pe=k.captionsFn,Te=k.isEndOfTimeline,Ae=k.endedTimelineFn,je=k.dataFn,Fe=k.doneFn,He=k.onTransmuxerLog;cy({id:P.requestId,key:P.key,encryptedBytes:P.encryptedBytes,decryptionWorker:R},function(Qe){P.bytes=Qe,ly({segment:P,bytes:P.bytes,trackInfoFn:u,timingInfoFn:T,videoSegmentTimingInfoFn:A,audioSegmentTimingInfoFn:L,id3Fn:ie,captionsFn:pe,isEndOfTimeline:Te,endedTimelineFn:Ae,dataFn:je,doneFn:Fe,onTransmuxerLog:He});});},yw=Ra("CodecUtils"),uy=function(k,R){return R=R.attributes||{},k&&k.mediaGroups&&k.mediaGroups.AUDIO&&R.AUDIO&&k.mediaGroups.AUDIO[R.AUDIO];},Ld=function(k){var R={};return k.forEach(function(A){var u=A.mediaType,T=A.type,A=A.details;R[u]=R[u]||[],R[u].push(Object(l.i)(""+T+A));}),Object.keys(R).forEach(function(P){1<R[P].length?(yw("multiple "+P+" codecs found as attributes: "+R[P].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),R[P]=null):R[P]=R[P][0];}),R;},Nu=function(k,R){var P=R.attributes||{},u=Ld(function(T){if(T=T.attributes||{},T.CODECS)return Object(l.h)(T.CODECS);}(R)||[]);return uy(k,R)&&!u.audio&&!function(T,ie){if(!uy(T,ie))return!0;var L,ie=ie.attributes||{},pe=T.mediaGroups.AUDIO[ie.AUDIO];for(L in pe)if(!pe[L].uri&&!pe[L].playlists)return!0;return!1;}(k,R)&&(R=Ld(Object(l.d)(k,P.AUDIO)||[])).audio&&(u.audio=R.audio),u;},Dd=Ra("PlaylistSelector"),dy=function(k){var R;if(k&&k.playlist)return R=k.playlist,JSON.stringify({id:R.id,bandwidth:k.bandwidth,width:k.width,height:k.height,codecs:R.attributes&&R.attributes.CODECS||""});},dc=function(k,R){var P=k.slice();k.sort(function(u,T){var A=R(u,T);return A===0?P.indexOf(u)-P.indexOf(T):A;});},bf=function(k){function R(u,T){var A=k.call(this)||this;if(!u)throw new TypeError("Initialization settings are required");if(typeof u.currentTime!="function")throw new TypeError("No currentTime getter specified");if(u.mediaSource)return A.bandwidth=u.bandwidth,A.throughput={rate:0,count:0},A.roundTrip=NaN,A.resetStats_(),A.mediaIndex=null,A.partIndex=null,A.hasPlayed_=u.hasPlayed,A.currentTime_=u.currentTime,A.seekable_=u.seekable,A.seeking_=u.seeking,A.duration_=u.duration,A.mediaSource_=u.mediaSource,A.vhs_=u.vhs,A.loaderType_=u.loaderType,A.currentMediaInfo_=void 0,A.startingMediaInfo_=void 0,A.segmentMetadataTrack_=u.segmentMetadataTrack,A.goalBufferLength_=u.goalBufferLength,A.sourceType_=u.sourceType,A.sourceUpdater_=u.sourceUpdater,A.inbandTextTracks_=u.inbandTextTracks,A.state_="INIT",A.timelineChangeController_=u.timelineChangeController,A.shouldSaveSegmentTimingInfo_=!0,A.parse708captions_=u.parse708captions,A.useDtsForTimestampOffset_=u.useDtsForTimestampOffset,A.captionServices_=u.captionServices,A.experimentalExactManifestTimings=u.experimentalExactManifestTimings,A.checkBufferTimeout_=null,A.error_=void 0,A.currentTimeline_=-1,A.pendingSegment_=null,A.xhrOptions_=null,A.pendingSegments_=[],A.audioDisabled_=!1,A.isPendingTimestampOffset_=!1,A.gopBuffer_=[],A.timeMapping_=0,A.safeAppend_=11<=rt.browser.IE_VERSION,A.appendInitSegment_={audio:!0,video:!0},A.playlistOfLastInitSegment_={audio:null,video:null},A.callQueue_=[],A.loadQueue_=[],A.metadataQueue_={id3:[],caption:[]},A.waitingOnRemove_=!1,A.quotaExceededErrorRetryTimeout_=null,A.activeInitSegmentId_=null,A.initSegments_={},A.cacheEncryptionKeys_=u.cacheEncryptionKeys,A.keyCache_={},A.decrypter_=u.decrypter,A.syncController_=u.syncController,A.syncPoint_={segmentIndex:0,time:0},A.transmuxer_=A.createTransmuxer_(),A.triggerSyncInfoUpdate_=function(){return A.trigger("syncinfoupdate");},A.syncController_.on("syncinfoupdate",A.triggerSyncInfoUpdate_),A.mediaSource_.addEventListener("sourceopen",function(){A.isEndOfStream_
41()||(A.ended_=!1);}),A.fetchAtBuffer_=!1,A.logger_=Ra("SegmentLoader["+A.loaderType_+"]"),Object.defineProperty(h()(A),"state",{get:function(){return this.state_;},set:function(L){L!==this.state_&&(this.logger_(this.state_+" -> "+L),this.state_=L,this.trigger("statechange"));}}),A.sourceUpdater_.on("ready",function(){A.hasEnoughInfoToAppend_()&&A.processCallQueue_();}),A.loaderType_==="main"&&A.timelineChangeController_.on("pendingtimelinechange",function(){A.hasEnoughInfoToAppend_()&&A.processCallQueue_();}),A.loaderType_==="audio"&&A.timelineChangeController_.on("timelinechange",function(){A.hasEnoughInfoToLoad_()&&A.processLoadQueue_(),A.hasEnoughInfoToAppend_()&&A.processCallQueue_();}),A;throw new TypeError("No MediaSource specified");}y()(R,k);var P=R.prototype;return P.createTransmuxer_=function(){return pw({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_});},P.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0;},P.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&o.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off();},P.setAudio=function(u){this.audioDisabled_=!u,u?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_());},P.abort=function(){this.state!=="WAITING"?this.pendingSegment_&&(this.pendingSegment_=null):(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_());},P.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,o.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null;},P.checkForAbort_=function(u){return this.state!=="APPENDING"||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==u:(this.state="READY",!0);},P.error=function(u){return u!==void 0&&(this.logger_("error occurred:",u),this.error_=u),this.pendingSegment_=null,this.error_;},P.endOfStream=function(){this.ended_=!0,this.transmuxer_&&ay(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended");},P.buffered_=function(){var u=this.getMediaInfo_();if(!this.sourceUpdater_||!u)return rt.createTimeRanges();if(this.loaderType_==="main"){var T=u.hasAudio,A=u.hasVideo,u=u.isMuxed;if(A&&T&&!this.audioDisabled_&&!u)return this.sourceUpdater_.buffered();if(A)return this.sourceUpdater_.videoBuffered();}return this.sourceUpdater_.audioBuffered();},P.initSegmentForMap=function(u,T){if(T===void 0&&(T=!1),!u)return null;var A=kd(u),L=this.initSegments_[A];return T&&!L&&u.bytes&&(this.initSegments_[A]=L={resolvedUri:u.resolvedUri,byterange:u.byterange,bytes:u.bytes,tracks:u.tracks,timescales:u.timescales}),L||u;},P.segmentKey=function(u,ie){if(ie===void 0&&(ie=!1),!u)return null;var A=Ig(u),L=this.keyCache_[A],ie=(this.cacheEncryptionKeys_&&ie&&!L&&u.bytes&&(this.keyCache_[A]=L={resolvedUri:u.resolvedUri,bytes:u.bytes}),{resolvedUri:(L||u).resolvedUri});return L&&(ie.bytes=L.bytes),ie;},P.couldBeginLoading_=function(){return this.playlist_&&!this.paused();},P.load=function(){if(this.monitorBuffer_(),this.playlist_)return this.state==="INIT"&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY"));},P.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_();},P.playlist=function(u,T){if(T===void 0&&(T={}),u){var A,L=this.playlist_,ie=this.pendingSegment_,T=(this.playlist_=u,this.xhrOptions_=T,this.state==="INIT"&&(u.syncInfo={mediaSequence:u.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(u)),null);if(L&&(L.id?T=L.id:L.uri&&(T=L.uri)),this.logger_("playlist update ["+T+" => "+(u.id||u.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();
41L&&L.uri===u.uri?(T=u.mediaSequence-L.mediaSequence,this.logger_("live window shift ["+T+"]"),this.mediaIndex!==null&&(this.mediaIndex-=T,this.mediaIndex<0?(this.mediaIndex=null,this.partIndex=null):(A=this.playlist_.segments[this.mediaIndex],!this.partIndex||A.parts&&A.parts.length&&A.parts[this.partIndex]||(A=this.mediaIndex,this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=A))),ie&&(ie.mediaIndex-=T,ie.mediaIndex<0?(ie.mediaIndex=null,ie.partIndex=null):(0<=ie.mediaIndex&&(ie.segment=u.segments[ie.mediaIndex]),0<=ie.partIndex&&ie.segment.parts&&(ie.part=ie.segment.parts[ie.partIndex]))),this.syncController_.saveExpiredSegmentInfo(L,u)):(this.mediaIndex!==null&&(u.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate"));}},P.pause=function(){this.checkBufferTimeout_&&(o.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null);},P.paused=function(){return this.checkBufferTimeout_===null;},P.resetEverything=function(u){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,u),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}));},P.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader();},P.resyncLoader=function(){this.transmuxer_&&ay(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"});},P.remove=function(u,T,A,L){if(A===void 0&&(A=function(){}),L===void 0&&(L=!1),(T=T===1/0?this.duration_():T)<=u)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var ie,pe=1,Te=function(){--pe===0&&A();};for(ie in!L&&this.audioDisabled_||(pe++,this.sourceUpdater_.removeAudio(u,T,Te)),!L&&this.loaderType_!=="main"||(this.gopBuffer_=function(Ae,je,Fe,He){for(var Qe=Math.ceil((je-He)*I.ONE_SECOND_IN_TS),pt=Math.ceil((Fe-He)*I.ONE_SECOND_IN_TS),je=Ae.slice(),Vt=Ae.length;Vt--&&!(Ae[Vt].pts<=pt););if(Vt!==-1){for(var jt=Vt+1;jt--&&!(Ae[jt].pts<=Qe););jt=Math.max(jt,0),je.splice(jt,Vt-jt+1);}return je;}(this.gopBuffer_,u,T,this.timeMapping_),pe++,this.sourceUpdater_.removeVideo(u,T,Te)),this.inbandTextTracks_)Lu(u,T,this.inbandTextTracks_[ie]);Lu(u,T,this.segmentMetadataTrack_),Te();}else this.logger_("skipping remove because no source updater or starting media info");},P.monitorBuffer_=function(){this.checkBufferTimeout_&&o.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=o.a.setTimeout(this.monitorBufferTick_.bind(this),1);},P.monitorBufferTick_=function(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&o.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=o.a.setTimeout(this.monitorBufferTick_.bind(this),500);},P.fillBuffer_=function(){var u;
41this.sourceUpdater_.updating()||(u=this.chooseNextRequest_())&&(typeof u.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:u.timeline})),this.loadSegment_(u));},P.isEndOfStream_=function(ie,T,pe){if(ie===void 0&&(ie=this.mediaIndex),T===void 0&&(T=this.playlist_),pe===void 0&&(pe=this.partIndex),!T||!this.mediaSource_)return!1;var L=typeof ie=="number"&&T.segments[ie],ie=ie+1===T.segments.length,pe=!L||!L.parts||pe+1===L.parts.length;return T.endList&&this.mediaSource_.readyState==="open"&&ie&&pe;},P.chooseNextRequest_=function(){var u=this.buffered_(),pe=Cn(u)||0,u=Vr(u,this.currentTime_()),ie=!this.hasPlayed_()&&1<=u,T=u>=this.goalBufferLength_(),A=this.playlist_.segments;if(!A.length||ie||T)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var L,ie={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_},pe=(ie.isSyncRequest?ie.mediaIndex=function(Ae,je,Fe){je=je||[];for(var He=[],Qe=0,pt=0;pt<je.length;pt++){var Vt=je[pt];if(Ae===Vt.timeline&&(He.push(pt),Fe<(Qe+=Vt.duration)))return pt;}return He.length===0?0:He[He.length-1];}(this.currentTimeline_,A,pe):this.mediaIndex!==null?(T=A[this.mediaIndex],Te=typeof this.partIndex=="number"?this.partIndex:-1,ie.startOfSegment=T.end||pe,T.parts&&T.parts[Te+1]?(ie.mediaIndex=this.mediaIndex,ie.partIndex=Te+1):ie.mediaIndex=this.mediaIndex+1):(Te=(T=Fo.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?pe:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time})).segmentIndex,L=T.startTime,T=T.partIndex,ie.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+pe:"currentTime "+this.currentTime_(),ie.mediaIndex=Te,ie.startOfSegment=L,ie.partIndex=T),A[ie.mediaIndex]),Te=pe&&typeof ie.partIndex=="number"&&pe.parts&&pe.parts[ie.partIndex];return!pe||typeof ie.partIndex=="number"&&!Te?null:(typeof ie.partIndex!="number"&&pe.parts&&(ie.partIndex=0,Te=pe.parts[0]),u||!Te||Te.independent||(ie.partIndex===0?(T=(L=A[ie.mediaIndex-1]).parts&&L.parts.length&&L.parts[L.parts.length-1])&&T.independent&&(--ie.mediaIndex,ie.partIndex=L.parts.length-1,ie.independent="previous segment"):pe.parts[ie.partIndex-1].independent&&(--ie.partIndex,ie.independent="previous part")),u=this.mediaSource_&&this.mediaSource_.readyState==="ended",ie.mediaIndex>=A.length-1&&u&&!this.seeking_()?null:this.generateSegmentInfo_(ie));},P.generateSegmentInfo_=function(pe){var T=pe.independent,A=pe.playlist,je=pe.mediaIndex,L=pe.startOfSegment,He=pe.isSyncRequest,Fe=pe.partIndex,ie=pe.forceTimestampOffset,pe=pe.getMediaInfoForTime,Te=A.segments[je],Ae=typeof Fe=="number"&&Te.parts[Fe],je={requestId:"segment-loader-"+Math.random(),uri:Ae&&Ae.resolvedUri||Te.resolvedUri,mediaIndex:je,partIndex:Ae?Fe:null,isSyncRequest:He,startOfSegment:L,playlist:A,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:Te.timeline,duration:Ae&&Ae.duration||Te.duration,segment:Te,part:Ae,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:pe,independent:T},Fe=ie!==void 0?ie:this.isPendingTimestampOffset_,He=(je.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:Te.timeline,currentTimeline:this.currentTimeline_,startOfSegment:L,buffered:this.buffered_(),overrideCheck:Fe}),Cn(this.sourceUpdater_.audioBuffered()));return typeof He=="number"&&(je.audioAppendStart=He-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(je.gopsToAlignWith=function(Qe,pt,Vt){if(pt==null||!Qe.length)return[];for(var jt=Math.ceil((pt-Vt+3)*I.ONE_SECOND_IN_TS),It=0;It<Qe.length&&!(Qe[It].pts>jt);It++);return Qe.slice(It);}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),je;},P.timestampOffsetForSegment_=function(u){return T=u.segmentTimeline,A=u.currentTimeline,L=u.startOfSegment,ie=u.buffered,u.overrideCheck||T!==A?!(T<A)&&ie.length?
41ie.end(ie.length-1):L:null;var T,A,L,ie;},P.earlyAbortWhenNeeded_=function(u){var T,A,L,ie,pe,Te,Ae,je,Fe,He,Qe,pt,Vt;this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(u.firstBytesReceivedAt||Date.now())<1e3||(L=this.currentTime_(),Vt=u.bandwidth,T=this.pendingSegment_.duration,u=Fo.estimateSegmentRequestTime(T,Vt,this.playlist_,u.bytesReceived),A=this.buffered_(),ie=L,(pe=this.vhs_.tech_.playbackRate())===void 0&&(pe=1),u<=(A=((A.length?A.end(A.length-1):0)-ie)/pe-1)||(ie={master:this.vhs_.playlists.master,currentTime:L,bandwidth:Vt,duration:this.duration_(),segmentDuration:T,timeUntilRebuffer:A,currentTimeline:this.currentTimeline_,syncController:this.syncController_},pe=ie.master,Te=ie.currentTime,Ae=ie.bandwidth,je=ie.duration,Fe=ie.segmentDuration,He=ie.timeUntilRebuffer,Qe=ie.currentTimeline,pt=ie.syncController,pe=(ie=(pe=(pe=(ie=pe.playlists.filter(function(jt){return!Fo.isIncompatible(jt);})).filter(Fo.isEnabled)).length?pe:ie.filter(function(jt){return!Fo.isDisabled(jt);})).filter(Fo.hasAttribute.bind(null,"BANDWIDTH")).map(function(jt){var It=pt.getSyncPoint(jt,je,Qe,Te)?1:2;return{playlist:jt,rebufferingImpact:Fo.estimateSegmentRequestTime(Fe,Ae,jt)*It-He};})).filter(function(jt){return jt.rebufferingImpact<=0;}),dc(pe,function(jt,It){return mf(It.playlist,jt.playlist);}),(L=pe.length?pe[0]:(dc(ie,function(jt,It){return jt.rebufferingImpact-It.rebufferingImpact;}),ie[0]||null))&&(Vt=u-A-L.rebufferingImpact,!L.playlist||L.playlist.uri===this.playlist_.uri||Vt<(A<=Gs?1:.5)||(this.bandwidth=L.playlist.attributes.BANDWIDTH*io.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort")))));},P.handleAbort_=function(u){this.logger_("Aborting "+lc(u)),this.mediaRequestsAborted+=1;},P.handleProgress_=function(u,T){this.earlyAbortWhenNeeded_(T.stats),this.checkForAbort_(T.requestId)||this.trigger("progress");},P.handleTrackInfo_=function(u,T){this.earlyAbortWhenNeeded_(u.stats),this.checkForAbort_(u.requestId)||this.checkForIllegalMediaSwitch(T)||(function(A,L){if(!A&&!L||!A&&L||A&&!L)return!1;if(A!==L){var ie=Object.keys(A).sort(),pe=Object.keys(L).sort();if(ie.length!==pe.length)return!1;for(var Te=0;Te<ie.length;Te++){var Ae=ie[Te];if(Ae!==pe[Te]||A[Ae]!==L[Ae])return!1;}}return!0;}(this.currentMediaInfo_,T=T||{})||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=T,this.currentMediaInfo_=T,this.logger_("trackinfo update",T),this.trigger("trackinfo")),this.checkForAbort_(u.requestId)||(this.pendingSegment_.trackInfo=T,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()));},P.handleTimingInfo_=function(u,T,A,L){var ie;this.earlyAbortWhenNeeded_(u.stats),this.checkForAbort_(u.requestId)||((u=this.pendingSegment_)[ie=$g(T)]=u[ie]||{},u[ie][A]=L,this.logger_("timinginfo: "+T+" - "+A+" - "+L),this.hasEnoughInfoToAppend_()&&this.processCallQueue_());},P.handleCaptions_=function(u,T){var A,L,ie=this;this.earlyAbortWhenNeeded_(u.stats),this.checkForAbort_(u.requestId)||(T.length===0?this.logger_("SegmentLoader received no captions from a caption event"):this.pendingSegment_.hasAppendedData_?(A=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),L={},T.forEach(function(pe){L[pe.stream]=L[pe.stream]||{startTime:1/0,captions:[],endTime:0};var Te=L[pe.stream];Te.startTime=Math.min(Te.startTime,pe.startTime+A),Te.endTime=Math.max(Te.endTime,pe.endTime+A),Te.captions.push(pe);}),Object.keys(L).forEach(function(pe){var Te,Ae,je,Fe,He,Qe,pt,Vt,jt,It,wi,yi=L[pe],Jt=yi.startTime,Ct=yi.endTime,yi=yi.captions,Ni=ie.inbandTextTracks_;ie.logger_("adding cues from "+Jt+" -> "+Ct+" for "+pe),It=Ni,Te=ie.vhs_.tech_,It[Ae=pe]||(Te.trigger({type:"usage",name:"vhs-608"}),Te.trigger({type:"usage",name:"hls-608"}),/^cc708_/.test(je=Ae)&&(je="SERVICE"+Ae.split("_")[1]),(Fe=Te.textTracks().getTrackById(je))?It[Ae]=Fe:(He=Fe=Ae,Qe=!1,(pt=(Te.options_.vhs&&Te.options_.vhs.captionServices||{})[je])&&(Fe=pt.label,He=pt.language,Qe=pt.default),It[Ae]=Te.addRemoteTextTrack({kind:"captions",id:je,default:Qe,label:Fe,language:He},!1).track)),Lu(Jt,Ct,Ni[pe]),jt=(pt={captionArray:yi,inbandTextTracks:Ni,timestampOffset:A}).inbandTextTracks,It=pt.captionArray,wi=pt.timestampOffset,It&&(Vt=o.a.WebKitDataCue||o.a.VTTCue,It.forEach(function($i){var Wi=$i.stream;jt[Wi].addCue(new Vt($i.startTime+wi,$i.endTime+wi,$i.text));}));}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})):this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,u,T)));},P.handleId3_=function(u,T,A){var L,ie,pe,Te;this.earlyAbortWhenNeeded_(u.stats),this.checkForAbort_(u.requestId)||
41(this.pendingSegment_.hasAppendedData_?(L=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),ie=this.inbandTextTracks_,pe=A,Te=this.vhs_.tech_,ie.metadataTrack_||(ie.metadataTrack_=Te.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ie.metadataTrack_.inBandMetadataTrackDispatchType=pe),J1({inbandTextTracks:this.inbandTextTracks_,metadataArray:T,timestampOffset:L,videoDuration:this.duration_()})):this.metadataQueue_.id3.push(this.handleId3_.bind(this,u,T,A)));},P.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(u){return u();}),this.metadataQueue_.caption.forEach(function(u){return u();}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[];},P.processCallQueue_=function(){var u=this.callQueue_;this.callQueue_=[],u.forEach(function(T){return T();});},P.processLoadQueue_=function(){var u=this.loadQueue_;this.loadQueue_=[],u.forEach(function(T){return T();});},P.hasEnoughInfoToLoad_=function(){if(this.loaderType_!=="audio")return!0;var u=this.pendingSegment_;return!!u&&(!this.getCurrentMediaInfo_()||!Wg({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:u.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}));},P.getCurrentMediaInfo_=function(u){return(u=u===void 0?this.pendingSegment_:u)&&u.trackInfo||this.currentMediaInfo_;},P.getMediaInfo_=function(u){return u===void 0&&(u=this.pendingSegment_),this.getCurrentMediaInfo_(u)||this.startingMediaInfo_;},P.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null;},P.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var u=this.pendingSegment_,L=this.getCurrentMediaInfo_();if(!u||!L)return!1;var T=L.hasAudio,A=L.hasVideo,L=L.isMuxed;return!(A&&!u.videoTimingInfo)&&!(T&&!this.audioDisabled_&&!L&&!u.audioTimingInfo)&&!Wg({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:u.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_});},P.handleData_=function(u,T){if(this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId))if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())this.callQueue_.push(this.handleData_.bind(this,u,T));else{var A,L=this.pendingSegment_;if(this.setTimeMapping_(L.timeline),this.updateMediaSecondsLoaded_(L.part||L.segment),this.mediaSource_.readyState!=="closed"){if(u.map&&(u.map=this.initSegmentForMap(u.map,!0),L.segment.map=u.map),u.key&&this.segmentKey(u.key,!0),L.isFmp4=u.isFmp4,L.timingInfo=L.timingInfo||{},L.isFmp4?(this.trigger("fmp4"),L.timingInfo.start=L[$g(T.type)].start):(u=this.getCurrentMediaInfo_(),(u=this.loaderType_==="main"&&u&&u.hasVideo)&&(A=L.videoTimingInfo.start),L.timingInfo.start=this.trueSegmentStart_({currentStart:L.timingInfo.start,playlist:L.playlist,mediaIndex:L.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:u,firstVideoFrameTimeForData:A,videoTimingInfo:L.videoTimingInfo,audioTimingInfo:L.audioTimingInfo})),this.updateAppendInitSegmentStatus(L,T.type),this.updateSourceBufferTimestampOffset_(L),L.isSyncRequest){if(this.updateTimingInfoEnd_(L),this.syncController_.saveSegmentTimingInfo({segmentInfo:L,shouldSaveTimelineMapping:this.loaderType_==="main"}),u=this.chooseNextRequest_(),u.mediaIndex!==L.mediaIndex||u.partIndex!==L.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending");}L.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(L,T);}}},P.updateAppendInitSegmentStatus=function(u,T){this.loaderType_!=="main"||typeof u.timestampOffset!="number"||u.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[T]!==u.playlist&&(this.appendInitSegment_[T]=!0);},P.getInitSegmentAndUpdateState_=function(ie){var T=ie.type,A=ie.initSegment,L=ie.map,ie=ie.playlist;if(L){var pe=kd(L);if(this.activeInitSegmentId_===pe)return null;A=this.initSegmentForMap(L,!0).bytes,this.activeInitSegmentId_=pe;}return A&&this.appendInitSegment_[T]?(this.playlistOfLastInitSegment_[T]=ie,this.appendInitSegment_[T]=!1,this.activeInitSegmentId_=null,A):null;},P.handleQuotaExceededError_=function(pe,T){var A=this,L=pe.segmentInfo,ie=pe.type,pe=pe.bytes,Te=this.sourceUpdater_.audio
41Buffered(),Ae=this.sourceUpdater_.videoBuffered(),je=(1<Te.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Tn(Te).join(", ")),1<Ae.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Tn(Ae).join(", ")),Te.length?Te.start(0):0),Fe=Te.length?Te.end(Te.length-1):0,He=Ae.length?Ae.start(0):0,Qe=Ae.length?Ae.end(Ae.length-1):0;Fe-je<=1&&Qe-He<=1?(this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+pe.byteLength+", audio buffer: "+Tn(Te).join(", ")+", video buffer: "+Tn(Ae).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error")):(this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:L,type:ie,bytes:pe})),Fe=this.currentTime_()-1,this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+Fe),this.remove(0,Fe,function(){A.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),A.waitingOnRemove_=!1,A.quotaExceededErrorRetryTimeout_=o.a.setTimeout(function(){A.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),A.quotaExceededErrorRetryTimeout_=null,A.processCallQueue_();},1e3);},!0));},P.handleAppendError_=function(ie,T){var A=ie.segmentInfo,L=ie.type,ie=ie.bytes;T&&(T.code===22?this.handleQuotaExceededError_({segmentInfo:A,type:L,bytes:ie}):(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",T),this.error(L+" append of "+ie.length+"b failed for segment #"+A.mediaIndex+" in playlist "+A.playlist.id),this.trigger("appenderror")));},P.appendToSourceBuffer_=function(je){var T,A,L,ie=je.segmentInfo,pe=je.type,Te=je.initSegment,Ae=je.data,je=je.bytes;je||(T=[Ae],Ae=Ae.byteLength,Te&&(T.unshift(Te),Ae+=Te.byteLength),L=0,(Te={bytes:Ae,segments:T}).bytes&&(A=new Uint8Array(Te.bytes),Te.segments.forEach(function(Fe){A.set(Fe,L),L+=Fe.byteLength;})),je=A),this.sourceUpdater_.appendBuffer({segmentInfo:ie,type:pe,bytes:je},this.handleAppendError_.bind(this,{segmentInfo:ie,type:pe,bytes:je}));},P.handleSegmentTimingInfo_=function(u,T,A){this.pendingSegment_&&T===this.pendingSegment_.requestId&&((T=this.pendingSegment_.segment)[u=u+"TimingInfo"]||(T[u]={}),T[u].transmuxerPrependedSeconds=A.prependedContentDuration||0,T[u].transmuxedPresentationStart=A.start.presentation,T[u].transmuxedDecodeStart=A.start.decode,T[u].transmuxedPresentationEnd=A.end.presentation,T[u].transmuxedDecodeEnd=A.end.decode,T[u].baseMediaDecodeTime=A.baseMediaDecodeTime);},P.appendData_=function(u,T){var A=T.type,L=T.data;L&&L.byteLength&&(A==="audio"&&this.audioDisabled_||(T=this.getInitSegmentAndUpdateState_({type:A,initSegment:T.initSegment,playlist:u.playlist,map:u.isFmp4?u.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:u,type:A,initSegment:T,data:L})));},P.loadSegment_=function(u){var T=this;this.state="WAITING",this.pendingSegment_=u,this.trimBackBuffer_(u),typeof u.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(u):this.loadQueue_.push(function(){var A=E()({},u,{forceTimestampOffset:!0});E()(u,T.generateSegmentInfo_(A)),T.isPendingTimestampOffset_=!1,T.updateTransmuxerAndRequestSegment_(u);});},P.updateTransmuxerAndRequestSegment_=function(u){var T=this,A=(this.shouldUpdateTransmuxerTimestampOffset_(u.timestampOffset)&&(this.gopBuffer_.length=0,u.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:u.timestampOffset})),this.createSimplifiedSegmentObj_(u)),pe=this.isEndOfStream_(u.mediaIndex,u.playlist,u.partIndex),L=this.mediaIndex!==null,ie=u.timeline!==this.currentTimeline_&&0<u.timeline,pe=pe||L&&ie;this.logger_("Requesting "+lc(u)),A.map&&!A.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),u.abortRequests=Q1({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:A,abortFn:this.handleAbort_.bind(this,u),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
41ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",u.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",u.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:pe,endedTimelineFn:function(){T.logger_("received endedtimeline callback");},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(Fe){var Ae=Fe.message,je=Fe.level,Fe=Fe.stream;T.logger_(lc(u)+" logged from transmuxer stream "+Fe+" as a "+je+": "+Ae);}});},P.trimBackBuffer_=function(u){T=this.seekable_(),ie=this.currentTime_(),A=this.playlist_.targetDuration||10,L=ie-io.BACK_BUFFER_LENGTH,T.length&&(L=Math.max(L,T.start(0))),T=ie-A;var T,A,L,ie=Math.min(T,L);0<ie&&this.remove(0,ie);},P.createSimplifiedSegmentObj_=function(u){var T=u.segment,A=u.part,A={resolvedUri:(A||T).resolvedUri,byterange:(A||T).byterange,requestId:u.requestId,transmuxer:u.transmuxer,audioAppendStart:u.audioAppendStart,gopsToAlignWith:u.gopsToAlignWith,part:u.part},L=u.playlist.segments[u.mediaIndex-1];return L&&L.timeline===T.timeline&&(L.videoTimingInfo?A.baseStartTime=L.videoTimingInfo.transmuxedDecodeEnd:L.audioTimingInfo&&(A.baseStartTime=L.audioTimingInfo.transmuxedDecodeEnd)),T.key&&(L=T.key.iv||new Uint32Array([0,0,0,u.mediaIndex+u.playlist.mediaSequence]),A.key=this.segmentKey(T.key),A.key.iv=L),T.map&&(A.map=this.initSegmentForMap(T.map)),A;},P.saveTransferStats_=function(u){this.mediaRequests+=1,u&&(this.mediaBytesTransferred+=u.bytesReceived,this.mediaTransferDuration+=u.roundTripTime);},P.saveBandwidthRelatedStats_=function(u,T){this.pendingSegment_.byteLength=T.bytesReceived,u<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+u+" is less than the min to record "+1/60):(this.bandwidth=T.bandwidth,this.roundTrip=T.roundTripTime);},P.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout");},P.segmentRequestFinished_=function(u,T,A){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,u,T,A));else if(this.saveTransferStats_(T.stats),this.pendingSegment_&&T.requestId===this.pendingSegment_.requestId){if(u)return this.pendingSegment_=null,this.state="READY",u.code===Ga.ABORTED?void 0:(this.pause(),u.code===Ga.TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(u),void this.trigger("error")));u=this.pendingSegment_,this.saveBandwidthRelatedStats_(u.duration,T.stats),u.endOfAllRequests=T.endOfAllRequests,A.gopInfo&&(this.gopBuffer_=function(L,ie,pe){if(!ie.length)return L;if(pe)return ie.slice();for(var Te=ie[0].pts,Ae=0;Ae<L.length&&!(L[Ae].pts>=Te);Ae++);return L.slice(0,Ae).concat(ie);}(this.gopBuffer_,A.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(u);}},P.setTimeMapping_=function(u){u=this.syncController_.mappingForTimeline(u),u!==null&&(this.timeMapping_=u);},P.updateMediaSecondsLoaded_=function(u){typeof u.start=="number"&&typeof u.end=="number"?this.mediaSecondsLoaded+=u.end-u.start:this.mediaSecondsLoaded+=u.duration;},P.shouldUpdateTransmuxerTimestampOffset_=function(u){return u!==null&&(this.loaderType_==="main"&&u!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&u!==this.sourceUpdater_.audioTimestampOffset());},P.trueSegmentStart_=function(je){var T=je.currentStart,A=je.playlist,L=je.mediaIndex,ie=je.firstVideoFrameTimeForData,pe=je.currentVideoTimestampOffset,Te=je.useVideoTimingInfo,Ae=je.videoTimingInfo,je=je.audioTimingInfo;return T!==void 0?T:Te?(T=A.segments[L-1],L!==0&&T&&T.start!==void 0&&T.end===ie+pe?Ae.start:ie):je.start;},P.waitForAppendsToComplete_=function(u){var T,A,L=this.getCurrentMediaInfo_(u);L?(A=L.hasAudio,T=L.hasVideo,L=L.isMuxed,T=this.loaderType_==="main"&&T,A=!this.audioDisabled_&&A&&!L,u.waitingOnAppends=0,u.hasAppendedData_?(T&&u.waitingOnAppends++,A&&u.waitingOnAppends++,T&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,u)),A&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,u))):(u.timingInfo||typeof u.timestampOffset!="number"||(this.isPendingTimestampOffset_=!0),u.timingInfo={start:0},u.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(u),this.processMetadataQueue_()),this.checkAppendsDone_(u))):(this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),this.trigger("error"));},P.checkAppendsDone_=function(u){this.checkForAbort_(u.requestId)||
41(u.waitingOnAppends--,u.waitingOnAppends===0&&this.handleAppendsDone_());},P.checkForIllegalMediaSwitch=function(u){A=this.loaderType_,T=this.getCurrentMediaInfo_(),u=u;var T,A=A==="main"&&T&&u?u.hasAudio||u.hasVideo?T.hasVideo&&!u.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!T.hasVideo&&u.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null;return!!A&&(this.error({message:A,blacklistDuration:1/0}),this.trigger("error"),!0);},P.updateSourceBufferTimestampOffset_=function(u){var T;u.timestampOffset===null||typeof u.timingInfo.start!="number"||u.changedTimestampOffset||this.loaderType_!=="main"||(T=!1,u.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:u.segment.videoTimingInfo,audioTimingInfo:u.segment.audioTimingInfo,timingInfo:u.timingInfo}),u.changedTimestampOffset=!0,u.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(u.timestampOffset),T=!0),u.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(u.timestampOffset),T=!0),T&&this.trigger("timestampoffset"));},P.getSegmentStartTimeForTimestampOffsetCalculation_=function(L){var T=L.videoTimingInfo,A=L.audioTimingInfo,L=L.timingInfo;return this.useDtsForTimestampOffset_?T&&typeof T.transmuxedDecodeStart=="number"?T.transmuxedDecodeStart:A&&typeof A.transmuxedDecodeStart=="number"?A.transmuxedDecodeStart:L.start:L.start;},P.updateTimingInfoEnd_=function(u){u.timingInfo=u.timingInfo||{};var T=this.getMediaInfo_(),T=this.loaderType_==="main"&&T&&T.hasVideo&&u.videoTimingInfo?u.videoTimingInfo:u.audioTimingInfo;T&&(u.timingInfo.end=typeof T.end=="number"?T.end:T.start+u.duration);},P.handleAppendsDone_=function(){var u,T,A;this.pendingSegment_&&this.trigger("appendsdone"),this.pendingSegment_?(u=this.pendingSegment_,this.updateTimingInfoEnd_(u),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:u,shouldSaveTimelineMapping:this.loaderType_==="main"}),(T=ew(u,this.sourceType_))&&(T.severity==="warn"?rt.log.warn(T.message):this.logger_(T.message)),this.recordThroughput_(u),this.pendingSegment_=null,this.state="READY",u.isSyncRequest&&(this.trigger("syncinfoupdate"),!u.hasAppendedData_)?this.logger_("Throwing away un-appended sync request "+lc(u)):(this.logger_("Appended "+lc(u)),this.addSegmentMetadataCue_(u),this.fetchAtBuffer_=!0,this.currentTimeline_!==u.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:u.timeline}),this.loaderType_!=="main"||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:u.timeline})),this.currentTimeline_=u.timeline,this.trigger("syncinfoupdate"),T=u.segment,A=u.part,T=T.end&&this.currentTime_()-T.end>3*u.playlist.targetDuration,A=A&&A.end&&this.currentTime_()-A.end>3*u.playlist.partTargetDuration,T||A?(this.logger_("bad "+(T?"segment":"part")+" "+lc(u)),this.resetEverything()):(this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=u.mediaIndex,this.partIndex=u.partIndex,this.isEndOfStream_(u.mediaIndex,u.playlist,u.partIndex)&&this.endOfStream(),this.trigger("appended"),u.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()))):(this.state="READY",this.paused()||this.monitorBuffer_());},P.recordThroughput_=function(u){var T,A;u.duration<1/60?this.logger_("Ignoring segment's throughput because its duration of "+u.duration+" is less than the min to record "+1/60):(T=this.throughput.rate,A=Date.now()-u.endOfAllRequests+1,u=Math.floor(u.byteLength/A*8*1e3),this.throughput.rate+=(u-T)/++this.throughput.count);},P.addSegmentMetadataCue_=function(u){var T,A,L,ie;this.segmentMetadataTrack_&&(T=(ie=u.segment).start,A=ie.end,Hg(T)&&Hg(A)&&(Lu(T,A,this.segmentMetadataTrack_),L=o.a.WebKitDataCue||o.a.VTTCue,ie={custom:ie.custom,dateTimeObject:ie.dateTimeObject,dateTimeString:ie.dateTimeString,bandwidth:u.playlist.attributes.BANDWIDTH,resolution:u.playlist.attributes.RESOLUTION,codecs:u.playlist.attributes.CODECS,byteLength:u.byteLength,uri:u.uri,timeline:u.timeline,playlist:u.playlist.id,start:T,end:A},(u=new L(T,A,JSON.stringify(ie))).value=ie,this.segmentMetadataTrack_.addCue(u)));},R;}(rt.EventTarget);function Ss(){}function hy(k){return typeof k!="string"?k:k.replace(/./,function(R){return R.toUpperCase();});}function py(k,R){var P=R[k+"Buffer"],u=hy(k);P&&(P.removeEventListener("updateend",R["on"+u+"UpdateEnd_"]),P.removeEventListener("error",R["on"+u+"Error_"]),R.codecs[k]=null,R[k+"Buffer"]=null);}function za(k,R){return k&&R&&Array.prototype.indexOf.call(k.sourceBuffers,R)!==-1;}function ta(A){var R=A.type,P=A.sourceUpdater,u=A.action,T=A.doneFn,A=A.name;P.queue.push({type:R,action:u,doneFn:T,name:A}),wf(R,P);}function fy(k,R){return function(P){var u;R.queuePending[k]&&(u=R.queuePending[k].doneFn,R.queuePending[k]=null,u&&u(R[k+"Error_"])),wf(k,R);};}function my(k){return decodeURIComponent(escape(String.fromCharCode.apply(null,k)));}function vw(k){function R(){u.AUDIO.onTrackChanged(),A.trigger({type:"usage",name:"vhs-audio-change"}),A.trigger({type:"usage",name:"hls-audio-change"});}["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(Ae){Nw[Ae](Ae,k);});var P,u=k.mediaTypes,T=k.masterPlaylistLoader,A=k.tech,L=k.vhs,ie=(pe=k.segmentLoaders).AUDIO,pe=pe.main,Te=(["AUDIO","SUBTITLES"].forEach(function(Ae){var je,Fe,He,Qe,pt,Vt,jt,It,wi,Jt;u[Ae].activeGroup=(je=Ae,Fe=k,function(Ct){var yi=Fe.masterPlaylistLoader,Ni=Fe.mediaTypes[je].groups,$i=yi.media();if(!$i)return null;
41var Wi=null,kn=($i.attributes[je]&&(Wi=Ni[$i.attributes[je]]),Object.keys(Ni));if(!Wi)if(je==="AUDIO"&&1<kn.length&&Du(Fe.master))for(var Ln=0;Ln<kn.length;Ln++){var Zn=Ni[kn[Ln]];if(Vw(Zn,$i)){Wi=Zn;break;}}else Ni.main?Wi=Ni.main:kn.length===1&&(Wi=Ni[kn[0]]);return Ct===void 0?Wi:Ct!==null&&Wi&&Wi.filter(function(sr){return sr.id===Ct.id;})[0]||null;}),u[Ae].activeTrack=jw[Ae](Ae,k),u[Ae].onGroupChanged=(He=Ae,Qe=k,function(){var yi=Qe.segmentLoaders,Ct=yi[He],yi=yi.main,Ni=Qe.mediaTypes[He],$i=Ni.activeTrack(),Wi=Ni.getActiveGroup(),kn=Ni.activePlaylistLoader,Ln=Ni.lastGroup_;Wi&&Ln&&Wi.id===Ln.id||(Ni.lastGroup_=Wi,Ni.lastTrack_=$i,Nd(Ct,Ni),Wi&&!Wi.isMasterPlaylist&&(Wi.playlistLoader?(Ct.resyncLoader(),Ty(Wi.playlistLoader,Ni)):kn&&yi.resetEverything()));}),u[Ae].onGroupChanging=(pt=Ae,Vt=k,function(){var Ct=Vt.segmentLoaders[pt];Vt.mediaTypes[pt].lastGroup_=null,Ct.abort(),Ct.pause();}),u[Ae].onTrackChanged=(jt=Ae,It=k,function(){var Ct=It.masterPlaylistLoader,Ni=It.segmentLoaders,yi=Ni[jt],Ni=Ni.main,$i=It.mediaTypes[jt],Wi=$i.activeTrack(),kn=$i.getActiveGroup(),Ln=$i.activePlaylistLoader,Zn=$i.lastTrack_;if((!Zn||!Wi||Zn.id!==Wi.id)&&($i.lastGroup_=kn,$i.lastTrack_=Wi,Nd(yi,$i),kn)){if(kn.isMasterPlaylist){if(!Wi||!Zn||Wi.id===Zn.id)return;var sr=It.vhs.masterPlaylistController_,Gr=sr.selectPlaylist();return sr.media()===Gr?void 0:($i.logger_("track change. Switching master audio from "+Zn.id+" to "+Wi.id),Ct.pause(),Ni.resetEverything(),void sr.fastQualityChange_(Gr));}if(jt==="AUDIO"){if(!kn.playlistLoader)return Ni.setAudio(!0),void Ni.resetEverything();yi.setAudio(!0),Ni.setAudio(!1);}Ln===kn.playlistLoader||(yi.track&&yi.track(Wi),yi.resetEverything()),Ty(kn.playlistLoader,$i);}}),u[Ae].getActiveGroup=(wi=Ae,Jt=k.mediaTypes,function(){var Ct=Jt[wi].activeTrack();return Ct?Jt[wi].activeGroup(Ct):null;});}),u.AUDIO.activeGroup());for(P in Te&&(Te=(Te.filter(function(Ae){return Ae.default;})[0]||Te[0]).id,u.AUDIO.tracks[Te].enabled=!0,u.AUDIO.onGroupChanged(),u.AUDIO.onTrackChanged(),u.AUDIO.getActiveGroup().playlistLoader?(pe.setAudio(!1),ie.setAudio(!0)):pe.setAudio(!0)),T.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(Ae){return u[Ae].onGroupChanged();});}),T.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(Ae){return u[Ae].onGroupChanging();});}),A.audioTracks().addEventListener("change",R),A.remoteTextTracks().addEventListener("change",u.SUBTITLES.onTrackChanged),L.on("dispose",function(){A.audioTracks().removeEventListener("change",R),A.remoteTextTracks().removeEventListener("change",u.SUBTITLES.onTrackChanged);}),A.clearTracks("audio"),u.AUDIO.tracks)A.audioTracks().addTrack(u.AUDIO.tracks[P]);}function _w(k,R,P){var u,T=k.masterPlaylistController_,A=T[(k.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(T);R.attributes&&(u=R.attributes.RESOLUTION,this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=R.attributes.BANDWIDTH,this.frameRate=R.attributes["FRAME-RATE"]),this.codecs=Nu(T.master(),R),this.playlist=R,this.id=P,this.enabled=Uw(k.playlists,R.id,A);}function gy(k,R){function P(Te){Te!=null&&(L=k.duration()!==1/0&&k.currentTime()||0,k.one("loadedmetadata",pe),k.src(Te),k.trigger({type:"usage",name:"vhs-error-reload"}),k.trigger({type:"usage",name:"hls-error-reload"}),k.play());}function u(){if(Date.now()-A<1e3*ie.errorInterval)k.trigger({type:"usage",name:"vhs-error-reload-canceled"}),k.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(ie.getSource&&typeof ie.getSource=="function")return A=Date.now(),ie.getSource.call(k,P);rt.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");}}function T(){k.off("loadedmetadata",pe),k.off("error",u),k.off("dispose",T);}var A=0,L=0,ie=rt.mergeOptions(zw,R),pe=(k.ready(function(){k.trigger({type:"usage",name:"vhs-error-reload-initialized"}),k.trigger({type:"usage",name:"hls-error-reload-initialized"});}),function(){L&&k.currentTime(L);});k.on("error",u),k.on("dispose",T),k.reloadSourceOnError=function(Te){T(),gy(k,Te);};}function yy(k,R){for(var P=R.media(),u=-1,T=0;T<k.length;T++)if(k[T].id===P.id){u=T;break;}k.selectedIndex_=u,k.trigger({selectedIndex:u,type:"change"});}function bw(u){var R=u.player,P=u.sourceKeySystems,A=u.audioMedia,u=u.mainPlaylists;if(!R.eme.initializeMediaKeys)return Promise.resolve();u=A=A?u.concat([A]):u,T=Object.keys(P);var T,A=u.reduce(function(pe,Te){var Ae;return Te.contentProtection&&(Ae=T.reduce(function(je,Fe){var He=Te.contentProtection[Fe];return He&&He.pssh&&(je[Fe]={pssh:He.pssh}),je;},{}
41),Object.keys(Ae).length&&pe.push(Ae)),pe;},[]),L=[],ie=[];return A.forEach(function(pe){ie.push(new Promise(function(Te,Ae){R.tech_.one("keysessioncreated",Te);})),L.push(new Promise(function(Te,Ae){R.eme.initializeMediaKeys({keySystems:pe},function(je){je?Ae(je):Te();});}));}),Promise.race([Promise.all(L),Promise.race(ie)]);}function Sw(k){var R=k.player;return!!(k=function(P,u,T){if(!P)return P;var A,L={},ie=(u&&u.attributes&&u.attributes.CODECS&&(L=Ld(Object(l.h)(u.attributes.CODECS))),T&&T.attributes&&T.attributes.CODECS&&(L.audio=T.attributes.CODECS),Object(l.e)(L.video)),pe=Object(l.e)(L.audio),Te={};for(A in P)Te[A]={},pe&&(Te[A].audioContentType=pe),ie&&(Te[A].videoContentType=ie),u.contentProtection&&u.contentProtection[A]&&u.contentProtection[A].pssh&&(Te[A].pssh=u.contentProtection[A].pssh),typeof P[A]=="string"&&(Te[A].url=P[A]);return rt.mergeOptions(P,Te);}(k.sourceKeySystems,k.media,k.audioMedia))&&(!((R.currentSource().keySystems=k)&&!R.eme)||(rt.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1));}function vy(){if(!o.a.localStorage)return null;var k=o.a.localStorage.getItem(Py);if(!k)return null;try{return JSON.parse(k);}catch{return null;}}var ws,ww=["video","audio"],Sf=function(k,R){var P=R[k+"Buffer"];return P&&P.updating||R.queuePending[k];},Ew=function(k,R){for(var P=0;P<R.length;P++){var u=R[P];if(u.type==="mediaSource")return null;if(u.type===k)return P;}return null;},wf=function k(R,P){if(P.queue.length!==0){var u=0,T=P.queue[u];if(T.type==="mediaSource")P.updating()||P.mediaSource.readyState==="closed"||(P.queue.shift(),T.action(P),T.doneFn&&T.doneFn(),k("audio",P),k("video",P));else if(R!=="mediaSource"&&P.ready()&&P.mediaSource.readyState!=="closed"&&!Sf(R,P)){if(T.type!==R){if((u=Ew(R,P.queue))===null)return;T=P.queue[u];}P.queue.splice(u,1),(P.queuePending[R]=T).action(R,P),T.doneFn||(P.queuePending[R]=null,k(R,P));}}},xw=function(k,R,P){return function(u,T){var A=T[u+"Buffer"];if(za(T.mediaSource,A)){T.logger_("Appending segment "+R.mediaIndex+"'s "+k.length+" bytes to "+u+"Buffer");try{A.appendBuffer(k);}catch(L){T.logger_("Error with code "+L.code+" "+(L.code===22?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+R.mediaIndex+" to "+u+"Buffer"),T.queuePending[u]=null,P(L);}}};},_y=function(k,R){return function(P,u){var T=u[P+"Buffer"];if(za(u.mediaSource,T)){u.logger_("Removing "+k+" to "+R+" from "+P+"Buffer");try{T.remove(k,R);}catch{u.logger_("Remove "+k+" to "+R+" from "+P+"Buffer failed");}}};},by=function(k){return function(R,P){var u=P[R+"Buffer"];za(P.mediaSource,u)&&(P.logger_("Setting "+R+"timestampOffset to "+k),u.timestampOffset=k);};},Sy=function(k){return function(R,P){k();};},Tw=function(k){return function(R){if(R.mediaSource.readyState==="open"){R.logger_("Calling mediaSource endOfStream("+(k||"")+")");try{R.mediaSource.endOfStream(k);}catch(P){rt.log.warn("Failed to call media source endOfStream",P);}}};},Cw=function(k){return function(R){R.logger_("Setting mediaSource duration to "+k);try{R.mediaSource.duration=k;}catch(P){rt.log.warn("Failed to set media source duration",P);}};},Ow=function(){return function(k,R){if(R.mediaSource.readyState==="open"){var P=R[k+"Buffer"];if(za(R.mediaSource,P)){R.logger_("calling abort on "+k+"Buffer");try{P.abort();}catch(u){rt.log.warn("Failed to abort on "+k+"Buffer",u);}}}};},Pw=function(k,R){return function(P){var u=hy(k),T=Object(l.e)(R),T=(P.logger_("Adding "+k+"Buffer with codec "+R+" to mediaSource"),P.mediaSource.addSourceBuffer(T));T.addEventListener("updateend",P["on"+u+"UpdateEnd_"]),T.addEventListener("error",P["on"+u+"Error_"]),P.codecs[k]=R,P[k+"Buffer"]=T;};},Iw=function(k){return function(R){var P=R[k+"Buffer"];if(py(k,R),za(R.mediaSource,P)){R.logger_("Removing "+k+"Buffer with codec "+R.codecs[k]+" from mediaSource");try{R.mediaSource.removeSourceBuffer(P);}catch(u){rt.log.warn("Failed to removeSourceBuffer "+k+"Buffer",u);}}};},kw=function(k){return function(R,P){var u=P[R+"Buffer"],T=Object(l.e)(k);if(za(P.mediaSource,u)&&P.codecs[R]!==k){P.logger_("changing "+R+"Buffer codec from "+P.codecs[R]+" to "+k);try{u.changeType(T),P.codecs[R]=k;}catch(A){rt.log.warn("Failed to changeType on "+R+"Buffer",A);}}};},wy=function(k){function R(u){var T=k.call(this)||this;return T.mediaSource=u,T.sourceopenListener_=function(){return wf("mediaSource",h()(T));},T.mediaSource.addEventListener("sourceopen",T.sourceopenListener_),T.logger_=R
41a("SourceUpdater"),T.audioTimestampOffset_=0,T.videoTimestampOffset_=0,T.queue=[],T.queuePending={audio:null,video:null},T.delayedAudioAppendQueue_=[],T.videoAppendQueued_=!1,T.codecs={},T.onVideoUpdateEnd_=fy("video",h()(T)),T.onAudioUpdateEnd_=fy("audio",h()(T)),T.onVideoError_=function(A){T.videoError_=A;},T.onAudioError_=function(A){T.audioError_=A;},T.createdSourceBuffers_=!1,T.initializedEme_=!1,T.triggeredReady_=!1,T;}y()(R,k);var P=R.prototype;return P.initializedEme=function(){this.initializedEme_=!0,this.triggerReady();},P.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_;},P.hasInitializedAnyEme=function(){return this.initializedEme_;},P.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme();},P.createSourceBuffers=function(u){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(u),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady());},P.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"));},P.addSourceBuffer=function(u,T){ta({type:"mediaSource",sourceUpdater:this,action:Pw(u,T),name:"addSourceBuffer"});},P.abort=function(u){ta({type:u,sourceUpdater:this,action:Ow(u),name:"abort"});},P.removeSourceBuffer=function(u){this.canRemoveSourceBuffer()?ta({type:"mediaSource",sourceUpdater:this,action:Iw(u),name:"removeSourceBuffer"}):rt.log.error("removeSourceBuffer is not supported!");},P.canRemoveSourceBuffer=function(){return!rt.browser.IE_VERSION&&!rt.browser.IS_FIREFOX&&o.a.MediaSource&&o.a.MediaSource.prototype&&typeof o.a.MediaSource.prototype.removeSourceBuffer=="function";},R.canChangeType=function(){return o.a.SourceBuffer&&o.a.SourceBuffer.prototype&&typeof o.a.SourceBuffer.prototype.changeType=="function";},P.canChangeType=function(){return this.constructor.canChangeType();},P.changeType=function(u,T){this.canChangeType()?ta({type:u,sourceUpdater:this,action:kw(T),name:"changeType"}):rt.log.error("changeType is not supported!");},P.addOrChangeSourceBuffers=function(u){var T=this;if(!u||typeof u!="object"||Object.keys(u).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(u).forEach(function(A){var L=u[A];if(!T.hasCreatedSourceBuffers())return T.addSourceBuffer(A,L);T.canChangeType()&&T.changeType(A,L);});},P.appendBuffer=function(u,T){var A=this,L=u.segmentInfo,ie=u.type,pe=u.bytes;this.processedAppend_=!0,ie==="audio"&&this.videoBuffer&&!this.videoAppendQueued_?(this.delayedAudioAppendQueue_.push([u,T]),this.logger_("delayed audio append of "+pe.length+" until video append")):(ta({type:ie,sourceUpdater:this,action:xw(pe,L||{mediaIndex:-1},T),doneFn:T,name:"appendBuffer"}),ie==="video"&&(this.videoAppendQueued_=!0,this.delayedAudioAppendQueue_.length&&(u=this.delayedAudioAppendQueue_.slice(),this.logger_("queuing delayed audio "+u.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,u.forEach(function(Te){A.appendBuffer.apply(A,Te);}))));},P.audioBuffered=function(){return za(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered||rt.createTimeRange();},P.videoBuffered=function(){return za(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered||rt.createTimeRange();},P.buffered=function(){var u=za(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,T=za(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;{if(T&&!u)return this.audioBuffered();if(u&&!T)return this.videoBuffered();var A=this.audioBuffered(),L=this.videoBuffered(),ie=null,pe=null,Te=0,Ae=[],je=[];if(!(A&&A.length&&L&&L.length))return rt.createTimeRange();for(var Fe=A.length;Fe--;)Ae.push({time:A.start(Fe),type:"start"}),Ae.push({time:A.end(Fe),type:"end"});for(Fe=L.length;Fe--;)Ae.push({time:L.start(Fe),type:"start"}),Ae.push({time:L.end(Fe),type:"end"});for(Ae.sort(function(He,Qe){return He.time-Qe.time;}),Fe=0;Fe<Ae.length;Fe++)Ae[Fe].type==="start"?++Te===2&&(ie=Ae[Fe].time):Ae[Fe].type==="end"&&--Te===1&&(pe=Ae[Fe].time),ie!==null&&pe!==null&&(je.push([ie,pe]),pe=ie=null);return rt.createTimeRanges(je);}},P.setDuration=function(u,T){T===void 0&&(T=Ss),ta({type:"mediaSource",sourceUpdater:this,action:Cw(u),name:"duration",doneFn:T});},P.endOfStream=function(u,T){T===void 0&&(T=Ss),ta({type:"mediaSource",sourceUpdater:this,action:Tw(u=typeof(u=u===void 0?null:u)!="string"?void 0:u),name:"endOfStream",doneFn:T});},P.removeAudio=function(u,T,A){A===void 0&&(A=Ss),this.audioBuffered().length&&this.audioBuffered().end(0)!==0?ta({type:"audio",sourceUpdater:this,action:_y(u,T),doneFn:A,name:"remove"}):A();},P.removeVideo=function(u,T,A){A===void 0&&(A=Ss),this.videoBuffered().length&&this.videoBuffered().end(0)!==0?ta({type:"video",sourceUpdater:this,action:_y(u,T),doneFn:A,name:"remove"}):A();},P.updating=function(){return!(!Sf("audio",this)&&!Sf("video",this));},P.audioTimestampOffset=function(u){return u!==void 0&&this.audioBuffer&&this.audioTimestampOffset_!==u&&(ta({type:"audio",sourceUpdater:this,action:by(u),name:"timestampOffset"}),this.audioTimestampOffset_=u),this.audioTimestampOffset_;},P.videoTimestampOffset=function(u){return u!==void 0&&this.videoBuffer&&this.videoTimestampOffset!==u&&(ta({type:"video",sourceUpdater:this,action:by(u),name:"timestampOffset"}),this.videoTimestampOffset_=u),this.videoTimestampOffset_;},P.audioQueueCallback=function(u){this.audioBuffer&&ta({type:"audio",sourceUpdater:this,action:Sy(u),name:"callback"});},P.videoQueueCallback=function(u){this.videoBuffer&&ta({type:"video",sourceUpdater:this,action:Sy(u),name:"callback"});},P.dispose=function(){var u=this;this.trigger("dispose"),ww.forEach(function(T){u.abort(T),u.canRemoveSourceBuffer()?u.removeSourceBuffer(T):u[T+"QueueCallback"](function(){return py(T,u);});}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off();},R;}(rt.EventTarget),Ey=new Uint8Array(` 42
43`.split("").map(function(k){return k.charCodeAt(0);})),Aw=function(k){function R(){return k.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this;}return y()(R,k),R;}(O()(Error)),Mw=function(k){function R(u,T){return(T=k.call(this,u,T=T===void 0?{}:T)||this).mediaSource_=null,T.subtitlesTrack_=null,T.loaderType_="subtitle",T.featuresNativeTextTracks_=u.featuresNativeTextTracks,T.loadVttJs=u.loadVttJs,T.shouldSaveSegmentTimingInfo_=!1,T;}y()(R,k);var P=R.prototype;return P.createTransmuxer_=function(){return null;},P.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return rt.createTimeRanges();var T=this.subtitlesTrack_.cues,u=T[0].startTime,T=T[T.length-1].startTime;return rt.createTimeRanges([[u,T]]);},P.initSegmentForMap=function(u,T){if(T===void 0&&(T=!1),!u)return null;var A=kd(u),L=this.initSegments_[A];return T&&!L&&u.bytes&&(T=Ey.byteLength+u.bytes.byteLength,(T=new Uint8Array(T)).set(u.bytes),T.set(Ey,u.bytes.byteLength),this.initSegments_[A]=L={resolvedUri:u.resolvedUri,byterange:u.byterange,bytes:T}),L||u;},P.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused();},P.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_();},P.track=function(u){return u!==void 0&&(this.subtitlesTrack_=u,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_;},P.remove=function(u,T){Lu(u,T,this.subtitlesTrack_);},P.fillBuffer_=function(){var u=this,T=this.chooseNextRequest_();T&&(this.syncController_.timestampOffsetForTimeline(T.timeline)===null?(this.syncController_.one("timestampoffset",function(){u.state="READY",u.paused()||u.monitorBuffer_();}),this.state="WAITING_ON_TIMELINE"):this.loadSegment_(T));},P.timestampOffsetForSegment_=function(){return null;},P.chooseNextRequest_=function(){return this.skipEmptySegments_(k.prototype.chooseNextRequest_.call(this));},P.skipEmptySegments_=function(u){for(;u&&u.segment.empty;){if(u.mediaIndex+1>=u.playlist.segments.length){u=null;break;}u=this.generateSegmentInfo_({playlist:u.playlist,mediaIndex:u.mediaIndex+1,startOfSegment:u.startOfSegment+u.duration,isSyncRequest:u.isSyncRequest});}return u;},P.stopForError=function(u){this.error(u),this.state="READY",this.pause(),this.trigger("error");},P.segmentRequestFinished_=function(u,T,A){var L=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(T.stats),this.pendingSegment_){if(u)u.code===Ga.TIMEOUT&&this.handleTimeout_(),u.code===Ga.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(u);else{var ie=this.pendingSegment_,pe=(this.saveBandwidthRelatedStats_(ie.duration,T.stats),T.key&&this.segmentKey(T.key,!0),this.state="APPENDING",this.trigger("appending"),ie.segment);if(pe.map&&(pe.map.bytes=T.map.bytes),ie.bytes=T.bytes,typeof o.a.WebVTT!="function"&&typeof this.loadVttJs=="function")this.state="WAITING_ON_VTTJS",this.loadVttJs().then(function(){return L.segmentRequestFinished_(u,T,A);},function(){return L.stopForError({message:"Error loading vtt.js"});});else{pe.requested=!0;try{this.parseVTTCues_(ie);}catch(pt){return void this.stopForError({message:pt.message});}if(this.updateTimeMapping_(ie,this.syncController_.timelines[ie.timeline],this.playlist_),ie.cues.length?ie.timingInfo={start:ie.cues[0].startTime,end:ie.cues[ie.cues.length-1].endTime}:ie.timingInfo={start:ie.startOfSegment,end:ie.startOfSegment+ie.duration},ie.isSyncRequest)this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";else{ie.byteLength=ie.bytes.byteLength,this.mediaSecondsLoaded+=pe.duration,ie.cues.forEach(function(pt){L.subtitlesTrack_.addCue(L.featuresNativeTextTracks_?new o.a.VTTCue(pt.startTime,pt.endTime,pt.text):pt);});var Te=this.subtitlesTrack_,Ae=Te.cues;if(Ae)for(var je=0;je<Ae.length;je++){for(var Fe=[],He=0,Qe=0;Qe<Ae.length;Qe++)Ae[je].startTime===Ae[Qe].startTime&&Ae[je].endTime===Ae[Qe].endTime&&Ae[je].text===Ae[Qe].text&&1<++He&&Fe.push(Ae[Qe]);Fe.length&&Fe.forEach(function(pt){return Te.removeCue(pt);});}this.handleAppendsDone_();}}}}else this.state="READY",this.mediaRequestsAborted+=1;}else this.state="READY";},P.handleData_=function(){},P.updateTimingInfoEnd_=function(){},P.parseVTTCues_=function(u){var T=!1;if(typeof o.a.WebVTT!="function")throw new Aw();typeof o.a.TextDecoder=="function"?A=new o.a.TextDecoder("utf8"):(A=o.a.WebVTT.StringDecoder(),T=!0);var A=new o.a.WebVTT.Parser(o.a,o.a.vttjs,A),L=(u.cues=[],u.timestampmap={MPEGTS:0,LOCAL:0},A.oncue=u.cues.push.bind(u.cues),A.ontimestampmap=function(ie){u.timestampmap=ie;},A.onparsingerror=function(ie){rt.log.warn("Error encountered when parsing cues: "+ie.message);},u.segment.map&&(L=u.segment.map.bytes,T&&(L=my(L)),A.parse(L)),u.bytes);T&&(L=my(L)),A.parse(L),A.flush();},P.updateTimeMapping_=function(u,T,A){var L,ie,pe=u.segment;T&&(u.cues.length?(ie=u.timestampmap,L=ie.MPEGTS/I.ONE_SECOND_IN_TS-ie.LOCAL+T.mapping,u.cues.forEac
43h(function(Te){Te.startTime+=L,Te.endTime+=L;}),A.syncInfo||(ie=u.cues[0].startTime,T=u.cues[u.cues.length-1].startTime,A.syncInfo={mediaSequence:A.mediaSequence+u.mediaIndex,time:Math.min(ie,T-pe.duration)})):pe.empty=!0);},R;}(bf),xy=[{name:"VOD",run:function(k,R,P,u,T){return P!==1/0?{time:0,segmentIndex:0,partIndex:null}:null;}},{name:"ProgramDateTime",run:function(k,R,P,u,T){if(!Object.keys(k.timelineToDatetimeMappings).length)return null;var A=null,L=null,ie=Jo(R);T=T||0;for(var pe=0;pe<ie.length;pe++){var Te=ie[R.endList||T===0?pe:ie.length-(pe+1)],Ae=Te.segment,je=k.timelineToDatetimeMappings[Ae.timeline];if(je&&Ae.dateTimeObject){var Fe=Ae.dateTimeObject.getTime()/1e3+je;if(Ae.parts&&typeof Te.partIndex=="number")for(var He=0;He<Te.partIndex;He++)Fe+=Ae.parts[He].duration;if(je=Math.abs(T-Fe),L!==null&&(je===0||L<je))break;L=je,A={time:Fe,segmentIndex:Te.segmentIndex,partIndex:Te.partIndex};}}return A;}},{name:"Segment",run:function(k,R,P,u,T){for(var A=null,L=null,ie=(T=T||0,Jo(R)),pe=0;pe<ie.length;pe++){var Te=ie[R.endList||T===0?pe:ie.length-(pe+1)],Ae=Te.segment,je=Te.part&&Te.part.start||Ae&&Ae.start;if(Ae.timeline===u&&je!==void 0){if(Ae=Math.abs(T-je),L!==null&&L<Ae)break;(!A||L===null||Ae<=L)&&(L=Ae,A={time:je,segmentIndex:Te.segmentIndex,partIndex:Te.partIndex});}}return A;}},{name:"Discontinuity",run:function(k,R,P,u,T){var A=null;if(T=T||0,R.discontinuityStarts&&R.discontinuityStarts.length)for(var L=null,ie=0;ie<R.discontinuityStarts.length;ie++){var pe=R.discontinuityStarts[ie],Te=R.discontinuitySequence+ie+1,Te=k.discontinuities[Te];if(Te){var Ae=Math.abs(T-Te.time);if(L!==null&&L<Ae)break;(!A||L===null||Ae<=L)&&(L=Ae,A={time:Te.time,segmentIndex:pe,partIndex:null});}}return A;}},{name:"Playlist",run:function(k,R,P,u,T){return R.syncInfo?{time:R.syncInfo.time,segmentIndex:R.syncInfo.mediaSequence-R.mediaSequence,partIndex:null}:null;}}],Rw=function(k){function R(u){var T=k.call(this)||this;return T.timelines=[],T.discontinuities=[],T.timelineToDatetimeMappings={}
43,T.logger_=Ra("SyncController"),T;}y()(R,k);var P=R.prototype;return P.getSyncPoint=function(u,T,A,L){return u=this.runStrategies_(u,T,A,L),u.length?this.selectSyncPoint_(u,{key:"time",value:L}):null;},P.getExpiredTime=function(u,T){return!u||!u.segments||(T=this.runStrategies_(u,T,u.discontinuitySequence,0),!T.length)?null:(T=this.selectSyncPoint_(T,{key:"segmentIndex",value:0}),0<T.segmentIndex&&(T.time*=-1),Math.abs(T.time+Ro({defaultDuration:u.targetDuration,durationList:u.segments,startIndex:T.segmentIndex,endIndex:0})));},P.runStrategies_=function(u,T,A,L){for(var ie=[],pe=0;pe<xy.length;pe++){var Te=xy[pe],Ae=Te.run(this,u,T,A,L);Ae&&(Ae.strategy=Te.name,ie.push({strategy:Te.name,syncPoint:Ae}));}return ie;},P.selectSyncPoint_=function(u,T){for(var A=u[0].syncPoint,L=Math.abs(u[0].syncPoint[T.key]-T.value),ie=u[0].strategy,pe=1;pe<u.length;pe++){var Te=Math.abs(u[pe].syncPoint[T.key]-T.value);Te<L&&(L=Te,A=u[pe].syncPoint,ie=u[pe].strategy);}return this.logger_("syncPoint for ["+T.key+": "+T.value+"] chosen with strategy ["+ie+"]: [time:"+A.time+", segmentIndex:"+A.segmentIndex+(typeof A.partIndex=="number"?",partIndex:"+A.partIndex:"")+"]"),A;},P.saveExpiredSegmentInfo=function(u,T){var A=T.mediaSequence-u.mediaSequence;if(86400<A)rt.log.warn("Not saving expired segment info. Media sequence gap "+A+" is too large.");else for(var L=A-1;0<=L;L--){var ie=u.segments[L];if(ie&&ie.start!==void 0){T.syncInfo={mediaSequence:u.mediaSequence+L,time:ie.start},this.logger_("playlist refresh sync: [time:"+T.syncInfo.time+", mediaSequence: "+T.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break;}}},P.setDateTimeMappingForStart=function(u){var T;this.timelineToDatetimeMappings={},u.segments&&u.segments.length&&u.segments[0].dateTimeObject&&(T=(u=u.segments[0]).dateTimeObject.getTime()/1e3,this.timelineToDatetimeMappings[u.timeline]=-T);},P.saveSegmentTimingInfo=function(A){var T=A.segmentInfo,A=A.shouldSaveTimelineMapping,ie=this.calculateSegmentTimeMapping_(T,T.timingInfo,A),L=T.segment,ie=(ie&&(this.saveDiscontinuitySyncInfo_(T),T.playlist.syncInfo||(T.playlist.syncInfo={mediaSequence:T.playlist.mediaSequence+T.mediaIndex,time:L.start})),L.dateTimeObject);L.discontinuity&&A&&ie&&(this.timelineToDatetimeMappings[L.timeline]=-ie.getTime()/1e3);},P.timestampOffsetForTimeline=function(u){return this.timelines[u]===void 0?null:this.timelines[u].time;},P.mappingForTimeline=function(u){return this.timelines[u]===void 0?null:this.timelines[u].mapping;},P.calculateSegmentTimeMapping_=function(u,T,A){var L,ie,pe=u.segment,Te=u.part,Ae=this.timelines[u.timeline];if(typeof u.timestampOffset=="number")Ae={time:u.startOfSegment,mapping:u.startOfSegment-T.start},A&&(this.timelines[u.timeline]=Ae,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+u.timeline+": [time: "+Ae.time+"] [mapping: "+Ae.mapping+"]")),L=u.startOfSegment,ie=T.end+Ae.mapping;else{if(!Ae)return!1;L=T.start+Ae.mapping,ie=T.end+Ae.mapping;}return Te&&(Te.start=L,Te.end=ie),(!pe.start||L<pe.start)&&(pe.start=L),pe.end=ie,!0;},P.saveDiscontinuitySyncInfo_=function(u){var T=u.playlist,A=u.segment;if(A.discontinuity)this.discontinuities[A.timeline]={time:A.start,accuracy:0};else if(T.discontinuityStarts&&T.discontinuityStarts.length)for(var L=0;L<T.discontinuityStarts.length;L++){var ie,pe=T.discontinuityStarts[L],Te=T.discontinuitySequence+L+1,Ae=pe-u.mediaIndex,je=Math.abs(Ae);(!this.discontinuities[Te]||this.discontinuities[Te].accuracy>je)&&(ie=void 0,ie=Ae<0?A.start-Ro({defaultDuration:T.targetDuration,durationList:T.segments,startIndex:u.mediaIndex,endIndex:pe}):A.end+Ro({defaultDuration:T.targetDuration,durationList:T.segments,startIndex:u.mediaIndex+1,endIndex:pe}),this.discontinuities[Te]={time:ie,accuracy:je});}},P.dispose=function(){this.trigger("dispose"),this.off();},R;}(rt.EventTarget),Lw=function(k){function R(){var u=k.call(this)||this;return u.pendingTimelineChanges_={},u.lastTimelineChanges_={},u;}y()(R,k);var P=R.prototype;return P.clearPendingTimelineChange=function(u){this.pendingTimelineChanges_[u]=null,this.trigger("pendingtimelinechange");},P.pendingTimelineChange=function(L){var T=L.type,A=L.from,L=L.to;return typeof A=="number"&&typeof L=="number"&&(this.pendingTimelineChanges_[T]={type:T,from:A,to:L},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[T];},P.lastTimelineChange=function(L){var T=L.type,A=L.from,L=L.to;return typeof A=="number"&&typeof L=="number"&&(this.lastTimelineChanges_[T]={type:T,from:A,to:L},delete this.pendingTimelineChanges_[T],this.trigger("timelinechange")),this.lastTimelineChanges_[T];},P.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off();},R;}(rt.EventTarget),Dw=Ng(Vg(jg(function(){var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:t!==void 0?t:typeof self<"u"?self:{};function k(Fe,He,Qe){return Fe(Qe={path:He,exports:{},require:function(pt,Vt){throw Vt==null&&Qe.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");}},Qe.exports),Qe.exports;}var R=k(function(Fe){function He(Qe,pt){for(var Vt=0;Vt<pt.length;Vt++){var jt=pt[Vt];jt.enumerable=jt.enumerable||!1,jt.configurable=!0,"value"in jt&&(jt.writable=!0),Object.defineProperty(Qe,jt.key,jt);}}
43Fe.exports=function(Qe,pt,Vt){return pt&&He(Qe.prototype,pt),Vt&&He(Qe,Vt),Qe;},Fe.exports.default=Fe.exports,Fe.exports.__esModule=!0;}),P=k(function(Fe){function He(Qe,pt){return Fe.exports=He=Object.setPrototypeOf||function(Vt,jt){return Vt.__proto__=jt,Vt;},Fe.exports.default=Fe.exports,Fe.exports.__esModule=!0,He(Qe,pt);}Fe.exports=He,Fe.exports.default=Fe.exports,Fe.exports.__esModule=!0;}),u=k(function(Fe){Fe.exports=function(He,Qe){He.prototype=Object.create(Qe.prototype),He.prototype.constructor=He,P(He,Qe);},Fe.exports.default=Fe.exports,Fe.exports.__esModule=!0;}),T=function(){function Fe(){this.listeners={};}var He=Fe.prototype;return He.on=function(Qe,pt){this.listeners[Qe]||(this.listeners[Qe]=[]),this.listeners[Qe].push(pt);},He.off=function(Qe,pt){return this.listeners[Qe]?(pt=this.listeners[Qe].indexOf(pt),this.listeners[Qe]=this.listeners[Qe].slice(0),this.listeners[Qe].splice(pt,1),-1<pt):!1;},He.trigger=function(Qe){var pt=this.listeners[Qe];if(pt)if(arguments.length===2)for(var Vt=pt.length,jt=0;jt<Vt;++jt)pt[jt].call(this,arguments[1]);else for(var It=Array.prototype.slice.call(arguments,1),wi=pt.length,Jt=0;Jt<wi;++Jt)pt[Jt].apply(this,It);},He.dispose=function(){this.listeners={};},He.pipe=function(Qe){this.on("data",function(pt){Qe.push(pt);});},Fe;}();function A(Fe){return Fe<<24|(65280&Fe)<<8|(16711680&Fe)>>8|Fe>>>24;}function L(Fe){var He={};return Object.keys(Fe).forEach(function(Qe){var pt,Vt=Fe[Qe];pt=Vt,(ArrayBuffer.isView==="function"?ArrayBuffer.isView(pt):pt&&pt.buffer instanceof ArrayBuffer)?He[Qe]={bytes:Vt.buffer,byteOffset:Vt.byteOffset,byteLength:Vt.byteLength}:He[Qe]=Vt;}),He;}var ie=null,pe=function(){function Fe(He){ie=ie||function(){for(var Ni,$i,Wi,kn,Ln,Zn,sr,Gr=[[[],[],[],[],[]],[[],[],[],[],[]]],no=Gr[0],zn=Gr[1],ia=no[4],Ar=zn[4],go=[],Dn=[],Hn=0;Hn<256;Hn++)Dn[(go[Hn]=Hn<<1^283*(Hn>>7))^Hn]=Hn;for(Ni=$i=0;!ia[Ni];Ni^=Wi||1,$i=Dn[$i]||1)for(sr=16843009*go[kn=go[Wi=go[Ar[ia[Ni]=Ln=(Ln=$i^$i<<1^$i<<2^$i<<3^$i<<4)>>8^255&Ln^99]=Ni]]]^65537*kn^257*Wi^16843008*Ni,Zn=257*go[Ln]^16843008*Ln,Hn=0;Hn<4;Hn++)no[Hn][Ni]=Zn=Zn<<24^Zn>>>8,zn[Hn][Ln]=sr=sr<<24^sr>>>8;for(Hn=0;Hn<5;Hn++)no[Hn]=no[Hn].slice(0),zn[Hn]=zn[Hn].slice(0);return Gr;}(),this._tables=[[ie[0][0].slice(),ie[0][1].slice(),ie[0][2].slice(),ie[0][3].slice(),ie[0][4].slice()],[ie[1][0].slice(),ie[1][1].slice(),ie[1][2].slice(),ie[1][3].slice(),ie[1][4].slice()]];var Qe,pt,Vt,jt=this._tables[0][4],It=this._tables[1],wi=He.length,Jt=1;if(wi!==4&&wi!==6&&wi!==8)throw new Error("Invalid aes key size");var Ct=He.slice(0),yi=[];for(this._key=[Ct,yi],Qe=wi;Qe<4*wi+28;Qe++)Vt=Ct[Qe-1],(Qe%wi==0||wi===8&&Qe%wi==4)&&(Vt=jt[Vt>>>24]<<24^jt[Vt>>16&255]<<16^jt[Vt>>8&255]<<8^jt[255&Vt],Qe%wi==0&&(Vt=Vt<<8^Vt>>>24^Jt<<24,Jt=Jt<<1^283*(Jt>>7))),Ct[Qe]=Ct[Qe-wi]^Vt;for(pt=0;Qe;pt++,Qe--)Vt=Ct[3&pt?Qe:Qe-4],yi[pt]=Qe<=4||pt<4?Vt:It[0][jt[Vt>>>24]]^It[1][jt[Vt>>16&255]]^It[2][jt[Vt>>8&255]]^It[3][jt[255&Vt]];}return Fe.prototype.decrypt=function(He,Qe,pt,Vt,jt,It){for(var wi,Jt,Ct,yi=this._key[1],Ni=He^yi[0],$i=Vt^yi[1],Wi=pt^yi[2],kn=Qe^yi[3],Ln=yi.length/4-2,Zn=4,He=this._tables[1],sr=He[0],Gr=He[1],no=He[2],zn=He[3],ia=He[4],Ar=0;Ar<Ln;Ar++)wi=sr[Ni>>>24]^Gr[$i>>16&255]^no[Wi>>8&255]^zn[255&kn]^yi[Zn],Jt=sr[$i>>>24]^Gr[Wi>>16&255]^no[kn>>8&255]^zn[255&Ni]^yi[Zn+1],Ct=sr[Wi>>>24]^Gr[kn>>16&255]^no[Ni>>8&255]^zn[255&$i]^yi[Zn+2],kn=sr[kn>>>24]^Gr[Ni>>16&255]^no[$i>>8&255]^zn[255&Wi]^yi[Zn+3],Zn+=4,Ni=wi,$i=Jt,Wi=Ct;for(Ar=0;Ar<4;Ar++)jt[(3&-Ar)+It]=ia[Ni>>>24]<<24^ia[$i>>16&255]<<16^ia[Wi>>8&255]<<8^ia[255&kn]^yi[Zn++],wi=Ni,Ni=$i,$i=Wi,Wi=kn,kn=wi;},Fe;}(),Te=function(Fe){function He(){var pt=Fe.call(this,T)||this;return pt.jobs=[],pt.delay=1,pt.timeout_=null,pt;}u(He,Fe);var Qe=He.prototype;return Qe.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null;},Qe.push=function(pt){this.jobs.push(pt),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay));},He;}(T),Ae=function(){function Fe(He,Qe,pt,Vt){var jt=Fe.STEP,It=new Int32Array(He.buffer),wi=new Uint8Array(He.byteLength),Jt=0;for(this.asyncStream_=new Te(),this.asyncStream_.push(this.decryptChunk_(It.subarray(Jt,Jt+jt),Qe,pt,wi)),Jt=jt;Jt<It.length;Jt+=jt)pt=new Uint32Array([A(It[Jt-4]),A(It[Jt-3]),A(It[Jt-2]),A(It[Jt-1])]),this.asyncStream_.push(this.decryptChunk_(It.subarray(Jt,Jt+jt),Qe,pt,wi));this.asyncStream_.push(function(){Vt(null,wi.subarray(0,wi.byteLength-wi[wi.byteLength-1]));});}return Fe.prototype.decryptChunk_=function(He,Qe,pt,Vt){return function(){var jt=function(It,wi,Jt){for(var Ct,yi,Ni,$i,Wi=new Int32Array(It.buffer,It.byteOffset,It.byteLength>>2),kn=new pe(Array.prototype.slice.call(wi)),wi=new Uint8Array(It.byteLength),Ln=new Int32Array(wi.buffer),Zn=Jt[0],sr=Jt[1],Gr=Jt[2],no=Jt[3],zn=0;zn<Wi.length;zn+=4)Ct=A(Wi[zn]),yi=A(Wi[zn+1]),Ni=A(Wi[zn+2]),$i=A(Wi[zn+3]),kn.decrypt(Ct,yi,Ni,$i,Ln,zn),Ln[zn]=A(Ln[zn]^Zn),Ln[zn+1]=A(Ln[zn+1]^sr),Ln[zn+2]=A(Ln[zn+2]^Gr),Ln[zn+3]=A(Ln[zn+3]^no),Zn=Ct,sr=yi,Gr=Ni,no=$i;return wi;}(He,Qe,pt);Vt.set(jt,He.byteOffset);};},R(Fe,null,[{key:"STEP",get:function(){return 32e3;}}]),Fe;}(),je=typeof window<"u"?window:je!==void 0?je:typeof self<"u"?self:{},je=je.BigInt||Number;je("0x1"),je("0x100"),je("0x10000"),je("0x1000000"),je("0x100000000"),je("0x10000000000"),je("0x1000000000000"),je("0x100000000000000"),je("0x10000000000000000"),self.onmessage=function(Qe){var He=Qe.data,Qe=new
43Uint8Array(He.encrypted.bytes,He.encrypted.byteOffset,He.encrypted.byteLength),pt=new Uint32Array(He.key.bytes,He.key.byteOffset,He.key.byteLength/4),Vt=new Uint32Array(He.iv.bytes,He.iv.byteOffset,He.iv.byteLength/4);new Ae(Qe,pt,Vt,function(jt,It){self.postMessage(L({source:He.source,decrypted:It}),[It.buffer]);});};}))),Nd=function(k,R){k.abort(),k.pause(),R&&R.activePlaylistLoader&&(R.activePlaylistLoader.pause(),R.activePlaylistLoader=null);},Ty=function(k,R){(R.activePlaylistLoader=k).load();},Vd={AUDIO:function(k,R){return function(){var T=R.segmentLoaders[k],P=R.mediaTypes[k],u=R.blacklistCurrentPlaylist,T=(Nd(T,P),P.activeTrack()),A=P.activeGroup(),A=(A.filter(function(pe){return pe.default;})[0]||A[0]).id,L=P.tracks[A];if(T===L)u({message:"Problem encountered loading the default audio track."});else{for(var ie in rt.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),P.tracks)P.tracks[ie].enabled=P.tracks[ie]===L;P.onTrackChanged();}};},SUBTITLES:function(k,R){return function(){var u=R.segmentLoaders[k],P=R.mediaTypes[k],u=(rt.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Nd(u,P),P.activeTrack());u&&(u.mode="disabled"),P.onTrackChanged();};}},Cy={AUDIO:function(k,R,P){var u,T,A;R&&(u=P.tech,T=P.requestOptions,A=P.segmentLoaders[k],R.on("loadedmetadata",function(){var L=R.media();A.playlist(L,T),(!u.paused()||L.endList&&u.preload()!=="none")&&A.load();}),R.on("loadedplaylist",function(){A.playlist(R.media(),T),u.paused()||A.load();}),R.on("error",Vd[k](k,P)));},SUBTITLES:function(k,R,P){var u=P.tech,T=P.requestOptions,A=P.segmentLoaders[k],L=P.mediaTypes[k];R.on("loadedmetadata",function(){var ie=R.media();A.playlist(ie,T),A.track(L.activeTrack()),(!u.paused()||ie.endList&&u.preload()!=="none")&&A.load();}),R.on("loadedplaylist",function(){A.playlist(R.media(),T),u.paused()||A.load();}),R.on("error",Vd[k](k,P));}},Nw={AUDIO:function(k,R){var P,u=R.vhs,T=R.sourceType,A=R.segmentLoaders[k],L=R.requestOptions,ie=R.master.mediaGroups,pe=R.mediaTypes[k],Te=pe.groups,Ae=pe.tracks,je=pe.logger_,Fe=R.masterPlaylistLoader,He=Du(Fe.master);for(P in ie[k]&&Object.keys(ie[k]).length!==0||(ie[k]={main:{default:{default:!0}}},He&&(ie[k].main.default.playlists=Fe.master.playlists)),ie[k])for(var Qe in Te[P]||(Te[P]=[]),ie[k][P]){var pt,jt=ie[k][P][Qe],Vt=void 0,Vt=He?(je("AUDIO group '"+P+"' label '"+Qe+"' is a master playlist"),jt.isMasterPlaylist=!0,null):T==="vhs-json"&&jt.playlists?new uc(jt.playlists[0],u,L):jt.resolvedUri?new uc(jt.resolvedUri,u,L):jt.playlists&&T==="dash"?new yf(jt.playlists[0],u,L,Fe):null,jt=rt.mergeOptions({id:Qe,playlistLoader:Vt},jt);Cy[k](k,jt.playlistLoader,R),Te[P].push(jt),Ae[Qe]===void 0&&(pt=new rt.AudioTrack({id:Qe,kind:(Vt=void 0,Vt=(pt=jt).default?"main":"alternative",Vt=pt.characteristics&&0<=pt.characteristics.indexOf("public.accessibility.describes-video")?"main-desc":Vt),enabled:!1,language:jt.language,default:jt.default,label:Qe}),Ae[Qe]=pt);}A.on("error",Vd[k](k,R));},SUBTITLES:function(k,R){var P,u=R.tech,T=R.vhs,A=R.sourceType,L=R.segmentLoaders[k],ie=R.requestOptions,pe=R.master.mediaGroups,Te=R.mediaTypes[k],Ae=Te.groups,je=Te.tracks,Fe=R.masterPlaylistLoader;for(P in pe[k])for(var He in Ae[P]||(Ae[P]=[]),pe[k][P])if(!pe[k][P][He].forced){var Qe=pe[k][P][He],pt=void 0;if(A==="hls")pt=new uc(Qe.resolvedUri,T,ie);else if(A==="dash"){if(!Qe.playlists.filter(function(Vt){return Vt.excludeUntil!==1/0;}).length)return;pt=new yf(Qe.playlists[0],T,ie,Fe);}else A==="vhs-json"&&(pt=new uc(Qe.playlists?Qe.playlists[0]:Qe.resolvedUri,T,ie));Qe=rt.mergeOptions({id:He,playlistLoader:pt},Qe),Cy[k](k,Qe.playlistLoader,R),Ae[P].push(Qe),je[He]===void 0&&(pt=u.addRemoteTextTrack({id:He,kind:"subtitles",default:Qe.default&&Qe.autoselect,language:Qe.language,label:He},!1).track,je[He]=pt);}L.on("error",Vd[k](k,R));},"CLOSED-CAPTIONS":function(k,A){var P,u=A.tech,T=A.master.mediaGroups,A=A.mediaTypes[k],L=A.groups,ie=A.tracks;for(P in T[k])for(var pe in L[P]||(L[P]=[]),T[k][P]){var Te,Ae,je=T[k][P][pe];/^(?:CC|SERVICE)/.test(je.instreamId)&&((Te=(Ae=u.options_.vhs&&u.options_.vhs.captionServices||{})[(Te={label:pe,language:je.language,instreamId:je.instreamId,default:je.default&&je.autoselect}).instreamId]?rt.mergeOptions(Te,Ae[Te.instreamId]):Te).default===void 0&&delete Te.default,L[P].push(rt.mergeOptions({id:pe},je)),ie[pe]===void 0&&(Ae=u.addRemoteTextTrack({id:Te.instreamId,
43kind:"captions",default:Te.default,language:Te.language,label:Te.label},!1).track,ie[pe]=Ae));}}},Vw=function k(R,P){for(var u=0;u<R.length;u++)if(uf(P,R[u])||R[u].playlists&&k(R[u].playlists,P))return!0;return!1;},jw={AUDIO:function(k,R){return function(){var P,u=R.mediaTypes[k].tracks;for(P in u)if(u[P].enabled)return u[P];return null;};},SUBTITLES:function(k,R){return function(){var P,u=R.mediaTypes[k].tracks;for(P in u)if(u[P].mode==="showing"||u[P].mode==="hidden")return u[P];return null;};}},Bw=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Fw=function(k){function R(u){var T=k.call(this)||this,A=u.src,L=u.handleManifestRedirects,ie=u.withCredentials,pe=u.tech,Te=u.bandwidth,wi=u.externVhs,Ae=u.useCueTags,je=u.blacklistDuration,Fe=u.enableLowInitialPlaylist,He=u.sourceType,Qe=u.cacheEncryptionKeys,Jt=u.experimentalBufferBasedABR,pt=u.experimentalLeastPixelDiffSelector,Vt=u.captionServices;if(!A)throw new Error("A non-empty playlist URL or JSON manifest string is required");var jt,It=u.maxPlaylistRetries,wi=(It==null&&(It=1/0),ws=wi,T.experimentalBufferBasedABR=!!Jt,T.experimentalLeastPixelDiffSelector=!!pt,T.withCredentials=ie,T.tech_=pe,T.vhs_=pe.vhs,T.sourceType_=He,T.useCueTags_=Ae,T.blacklistDuration=je,T.maxPlaylistRetries=It,T.enableLowInitialPlaylist=Fe,T.useCueTags_&&(T.cueTagsTrack_=T.tech_.addTextTrack("metadata","ad-cues"),T.cueTagsTrack_.inBandMetadataTrackDispatchType=""),T.requestOptions_={withCredentials:ie,handleManifestRedirects:L,maxPlaylistRetries:It,timeout:null},T.on("error",T.pauseLoading),T.mediaTypes_=(jt={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(Ct){jt[Ct]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ss,activeTrack:Ss,getActiveGroup:Ss,onGroupChanged:Ss,onTrackChanged:Ss,lastTrack_:null,logger_:Ra("MediaGroups["+Ct+"]")};}),jt),T.mediaSource=new o.a.MediaSource(),T.handleDurationChange_=T.handleDurationChange_.bind(h()(T)),T.handleSourceOpen_=T.handleSourceOpen_.bind(h()(T)),T.handleSourceEnded_=T.handleSourceEnded_.bind(h()(T)),T.mediaSource.addEventListener("durationchange",T.handleDurationChange_),T.mediaSource.addEventListener("sourceopen",T.handleSourceOpen_),T.mediaSource.addEventListener("sourceended",T.handleSourceEnded_),T.seekable_=rt.createTimeRanges(),T.hasPlayed_=!1,T.syncController_=new Rw(u),T.segmentMetadataTrack_=pe.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,T.decrypter_=new Dw(),T.sourceUpdater_=new wy(T.mediaSource),T.inbandTextTracks_={},T.timelineChangeController_=new Lw(),{vhs:T.vhs_,parse708captions:u.parse708captions,useDtsForTimestampOffset:u.useDtsForTimestampOffset,captionServices:Vt,mediaSource:T.mediaSource,currentTime:T.tech_.currentTime.bind(T.tech_),seekable:function(){return T.seekable();},seeking:function(){return T.tech_.seeking();},duration:function(){return T.duration();},hasPlayed:function(){return T.hasPlayed_;},goalBufferLength:function(){return T.goalBufferLength();},bandwidth:Te,syncController:T.syncController_,decrypter:T.decrypter_,sourceType:T.sourceType_,inbandTextTracks:T.inbandTextTracks_,cacheEncryptionKeys:Qe,sourceUpdater:T.sourceUpdater_,timelineChangeController:T.timelineChangeController_,experimentalExactManifestTimings:u.experimentalExactManifestTimings}),Jt=(T.masterPlaylistLoader_=new(T.sourceType_==="dash"?yf:uc)(A,T.vhs_,T.requestOptions_),T.setupMasterPlaylistLoaderListeners_(),T.mainSegmentLoader_=new bf(rt.mergeOptions(wi,{segmentMetadataTrack:T.segmentMetadataTrack_,loaderType:"main"}),u),T.audioSegmentLoader_=new bf(rt.mergeOptions(wi,{loaderType:"audio"}),u),T.subtitleSegmentLoader_=new Mw(rt.mergeOptions(wi,{loaderType:"vtt",featuresNativeTextTracks:T.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(Ct,yi){function Ni(){pe.off("vttjserror",$i),Ct();}function $i(){pe.off("vttjsloaded",Ni),yi();}pe.one("vttjsloaded",Ni),pe.one("vttjserror",$i),pe.addWebVttScript_();});}}),u),T.setupSegmentLoaderListeners_(),T.experimentalBufferBasedABR&&(T.masterPlaylistLoader_.one("loadedplaylist",function(){return T.
43startABRTimer_();}),T.tech_.on("pause",function(){return T.stopABRTimer_();}),T.tech_.on("play",function(){return T.startABRTimer_();})),Bw.forEach(function(Ct){T[Ct+"_"]=function(yi){return this.audioSegmentLoader_[yi]+this.mainSegmentLoader_[yi];}.bind(h()(T),Ct);}),T.logger_=Ra("MPC"),T.triggeredFmp4Usage=!1,T.tech_.preload()==="none"?(T.loadOnPlay_=function(){T.loadOnPlay_=null,T.masterPlaylistLoader_.load();},T.tech_.one("play",T.loadOnPlay_)):T.masterPlaylistLoader_.load(),T.timeToLoadedData__=-1,T.mainAppendsToLoadedData__=-1,T.audioAppendsToLoadedData__=-1,T.tech_.preload()==="none"?"play":"loadstart");return T.tech_.one(Jt,function(){var Ct=Date.now();T.tech_.one("loadeddata",function(){T.timeToLoadedData__=Date.now()-Ct,T.mainAppendsToLoadedData__=T.mainSegmentLoader_.mediaAppends,T.audioAppendsToLoadedData__=T.audioSegmentLoader_.mediaAppends;});}),T;}y()(R,k);var P=R.prototype;return P.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__;},P.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__;},P.appendsToLoadedData_=function(){var u=this.mainAppendsToLoadedData_(),T=this.audioAppendsToLoadedData_();return u===-1||T===-1?-1:u+T;},P.timeToLoadedData_=function(){return this.timeToLoadedData__;},P.checkABR_=function(u){u===void 0&&(u="abr");var T=this.selectPlaylist();T&&this.shouldSwitchToMedia_(T)&&this.switchMedia_(T,u);},P.switchMedia_=function(u,T,A){var L=this.media(),L=L&&(L.id||L.uri),ie=u.id||u.uri;L&&L!==ie&&(this.logger_("switch media "+L+" -> "+ie+" from "+T),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+T})),this.masterPlaylistLoader_.media(u,A);},P.startABRTimer_=function(){var u=this;this.stopABRTimer_(),this.abrTimer_=o.a.setInterval(function(){return u.checkABR_();},250);},P.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(o.a.clearInterval(this.abrTimer_),this.abrTimer_=null);},P.getAudioTrackPlaylists_=function(){var u=this.master(),T=u&&u.playlists||[];if(!u||!u.mediaGroups||!u.mediaGroups.AUDIO)return T;var A,L=u.mediaGroups.AUDIO,ie=Object.keys(L);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)A=this.mediaTypes_.AUDIO.activeTrack();else{var pe,Te=L.main||ie.length&&L[ie[0]];for(pe in Te)if(Te[pe].default){A={label:pe};break;}}if(!A)return T;var Ae,je=[];for(Ae in L)if(L[Ae][A.label]){var Fe=L[Ae][A.label];if(Fe.playlists&&Fe.playlists.length)je.push.apply(je,Fe.playlists);else if(Fe.uri)je.push(Fe);else if(u.playlists.length)for(var He=0;He<u.playlists.length;He++){var Qe=u.playlists[He];Qe.attributes&&Qe.attributes.AUDIO&&Qe.attributes.AUDIO===Ae&&je.push(Qe);}}return je.length?je:T;},P.setupMasterPlaylistLoaderListeners_=function(){var u=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var T=u.masterPlaylistLoader_.media(),A=1.5*T.targetDuration*1e3;Ru(u.masterPlaylistLoader_.master,u.masterPlaylistLoader_.media())?u.requestOptions_.timeout=0:u.requestOptions_.timeout=A,T.endList&&u.tech_.preload()!=="none"&&(u.mainSegmentLoader_.playlist(T,u.requestOptions_),u.mainSegmentLoader_.load()),vw({sourceType:u.sourceType_,segmentLoaders:{AUDIO:u.audioSegmentLoader_,SUBTITLES:u.subtitleSegmentLoader_,main:u.mainSegmentLoader_},tech:u.tech_,requestOptions:u.requestOptions_,masterPlaylistLoader:u.masterPlaylistLoader_,vhs:u.vhs_,master:u.master(),mediaTypes:u.mediaTypes_,blacklistCurrentPlaylist:u.blacklistCurrentPlaylist.bind(u)}),u.triggerPresenceUsage_(u.master(),T),u.setupFirstPlay(),!u.mediaTypes_.AUDIO.activePlaylistLoader||u.mediaTypes_.AUDIO.activePlaylistLoader.media()?u.trigger("selectedinitialmedia"):u.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){u.trigger("selectedinitialmedia");});}),this.masterPlaylistLoader_.on("loadedplaylist",function(){u.loadOnPlay_&&u.tech_.off("play",u.loadOnPlay_);var T,A=u.masterPlaylistLoader_.media();if(!A){if(u.excludeUnsupportedVariants_(),!(T=(T=u.enableLowInitialPlaylist?u.selectInitialPlaylist():T)||u.selectPlaylist())||!u.shouldSwitchToMedia_(T)||(u.initialMedia_=T,u.switchMedia_(u.initialMedia_,"initial"),!(u.sourceType_==="vhs-json"&&u.initialMedia_.segments)))return;A=u.initialMedia_;}u.handleUpdatedMediaPlaylist(A);}),this.masterPlaylistLoader_.on("error",function(){u.blacklistCurrentPlaylist(u.masterPlaylistLoader_.error);}),this.masterPlaylistLoader_.on("mediachanging",function(){u.mainSegmentLoader_.abort(),u.mainSegmentLoader_.pause();}),this.masterPlaylistLoader_.on("mediachange",function(){var T=u.masterPlaylistLoader_.media(),A=1.5*T.targetDuration*1e3;Ru(u.masterPlaylistLoader_.master,u.masterPlaylistLoader_.media())?u.requestOptions_.timeout=0:u.requestOptions_.timeout=A,u.masterPlaylistLoader_.load(),u.mainSegmentLoader_.playlist(T,u.requestOptions_),u.mainSegmentLoader_.load(),u.tech_.trigger({type:"mediachange",bubbles:!0});}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var T=u.masterPlaylistLoader_.media();T.lastExcludeReason_!=="playlist-unchanged"&&u.stuckAtPlaylistEnd_(T)&&(u.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),u.tech_.trigger("playliststuck"));}),this.masterPlaylistLoader_.on("renditiondisabled",function(){u.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),u.tech_.trigger({type:"usage",name:"hls-rendition-disabled"});}),this.masterPlaylistLoader_.on("renditionenabled",function(){u.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),u.tech_.trigger({type:"usage",name:"hls-rendition-enabled"});});},P.handleUpdatedMediaPlaylist=function(u){this.useCueTags_&&this.updateAdCues_(u),this.mainSegmentLoader_.playlist(u,this.requestOptions_),this.updateDuration(!u.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load());},P.triggerPresenceUsage_=function(pe,T){var A,L=pe.mediaGroups||{},ie=!0,pe=Object.keys(L.AUDIO);for(A in L.AUDIO)for(var Te in L.AUDIO[A])L.AUDIO[A][Te].uri||(ie=!1);ie&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(L.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),ws.Playlist.isAes(T)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),pe.length&&1<Object.keys(L.AUDIO[pe[0]]).length&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}));},P.shouldSwitchToMedia_=function(L){var A=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pen
43dingMedia_,T=this.tech_.currentTime(),ie=this.bufferLowWaterLine(),pe=this.bufferHighWaterLine(),Fe=this.tech_.buffered(),T=(Fe={buffered:Fe,currentTime:T,currentPlaylist:A,nextPlaylist:L,bufferLowWaterLine:ie,bufferHighWaterLine:pe,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_}).currentPlaylist,A=Fe.buffered,L=Fe.currentTime,ie=Fe.nextPlaylist,pe=Fe.bufferLowWaterLine,Te=Fe.bufferHighWaterLine,Ae=Fe.duration,je=Fe.experimentalBufferBasedABR,Fe=Fe.log;if(ie){var He="allowing switch "+(T&&T.id||"null")+" -> "+ie.id;if(!T)return Fe(He+" as current playlist is not set"),!0;if(ie.id!==T.id){var Qe=!!on(A,L).length;if(!T.endList)return Qe||typeof T.partTargetDuration!="number"?(Fe(He+" as current playlist is live"),!0):(Fe("not "+He+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);if(Qe=Vr(A,L),A=je?io.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:io.MAX_BUFFER_LOW_WATER_LINE,Ae<A)return Fe(He+" as duration < max low water line ("+Ae+" < "+A+")"),!0;if(L=ie.attributes.BANDWIDTH,Ae=T.attributes.BANDWIDTH,L<Ae&&(!je||Qe<Te))return A=He+" as next bandwidth < current bandwidth ("+L+" < "+Ae+")",je&&(A+=" and forwardBuffer < bufferHighWaterLine ("+Qe+" < "+Te+")"),Fe(A),!0;if((!je||Ae<L)&&pe<=Qe)return ie=He+" as forwardBuffer >= bufferLowWaterLine ("+Qe+" >= "+pe+")",je&&(ie+=" and next bandwidth > current bandwidth ("+L+" > "+Ae+")"),Fe(ie),!0;Fe("not "+He+" as no switching criteria met");}}else rt.log.warn("We received no playlist to switch to. Please check your stream.");return!1;},P.setupSegmentLoaderListeners_=function(){function u(){if(!T.sourceUpdater_.hasCreatedSourceBuffers())return T.tryToCreateSourceBuffers_();var A=T.getCodecsOrExclude_();A&&T.sourceUpdater_.addOrChangeSourceBuffers(A);}var T=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){T.checkABR_("bandwidthupdate"),T.tech_.trigger("bandwidthupdate");}),this.mainSegmentLoader_.on("timeout",function(){T.experimentalBufferBasedABR&&T.mainSegmentLoader_.load();}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){T.trigger("progress");}),this.mainSegmentLoader_.on("error",function(){T.blacklistCurrentPlaylist(T.mainSegmentLoader_.error());}),this.mainSegmentLoader_.on("appenderror",function(){T.error=T.mainSegmentLoader_.error_,T.trigger("error");}),this.mainSegmentLoader_.on("syncinfoupdate",function(){T.onSyncInfoUpdate_();}),this.mainSegmentLoader_.on("timestampoffset",function(){T.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),T.tech_.trigger({type:"usage",name:"hls-timestamp-offset"});}),this.audioSegmentLoader_.on("syncinfoupdate",function(){T.onSyncInfoUpdate_();}),this.audioSegmentLoader_.on("appenderror",function(){T.error=T.audioSegmentLoader_.error_,T.trigger("error");}),this.mainSegmentLoader_.on("ended",function(){T.logger_("main segment loader ended"),T.onEndOfStream();}),this.mainSegmentLoader_.on("earlyabort",function(A){T.experimentalBufferBasedABR||(T.delegateLoaders_("all",["abort"]),T.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120));}),this.mainSegmentLoader_.on("trackinfo",u),this.audioSegmentLoader_.on("trackinfo",u),this.mainSegmentLoader_.on("fmp4",function(){T.triggeredFmp4Usage||(T.tech_.trigger({type:"usage",name:"vhs-fmp4"}),T.tech_.trigger({type:"usage",name:"hls-fmp4"}),T.triggeredFmp4Usage=!0);}),this.audioSegmentLoader_.on("fmp4",function(){T.triggeredFmp4Usage||(T.tech_.trigger({type:"usage",name:"vhs-fmp4"}),T.tech_.trigger({type:"usage",name:"hls-fmp4"}),T.triggeredFmp4Usage=!0);}),this.audioSegmentLoader_.on("ended",function(){T.logger_("audioSegmentLoader ended"),T.onEndOfStream();});},P.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded);},P.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load();},P.smoothQualityChange_=function(u){u===void 0&&(u=this.selectPlaylist()),this.fastQualityChange_(u);},P.fastQualityChange_=function(u){var T=this;(u=u===void 0?this.selectPlaylist():u)===this.masterPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(u,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){rt.browser.IE_VERSION||rt.browser.IS_EDGE?T.tech_.setCurrentTime(T.tech_.currentTime()+.04):T.tech_.setCurrentTime(T.tech_.currentTime());}));},P.play=function(){var u;if(!this.setupFirstPlay())return this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load(),u=this.tech_.seekable(),this.tech_.duration()===1/0&&this.tech_.currentTime()<u.start(0)?this.tech_.setCurrentTime(u.end(u.length-1)):void 0;},P.setupFirstPlay=function(){var u=this,T=this.masterPlaylistLoader_.media();if(!T||this.tech_.paused()||this.hasPlayed_)return!1;if(!T.endList){var A=this.seekable();if(!A.length)return!1;if(rt.browser.IE_VERSION&&this.tech_.readyState()===0)return this.tech_.one("loadedmetadata",function(){u.trigger("firstplay"),u.tech_.setCurrentTime(A.end(0)),u.hasPlayed_=!0;}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(A.end(0));}return this.hasPlayed_=!0,this.load(),!0;},P.handleSourceOpen_=function(){var u;this.tryToCreateSourceBuffers_(),this.tech_.autoplay()&&(u=this.tech_.play())!==void 0&&typeof u.then=="function"&&u.then(null,function(T){}),this.trigger("sourceopen");},P.handleSourceEnded_=function(){var u,T;!this.inbandTextTracks_.metadataTrack_||(u=this.inbandTextTracks_.metadataTrack_.cues)&&u.length&&(T=this.duration(),u[u.length-1].endTime=isNaN(T)||Math.abs(T)===1/0?Number.MAX_VALUE:T);},P.handleDurationChange_=function(){this.tech_.trigger("durationchange");},P.onEndOfStream=function(){var u,T=this.mainSegmentLoader_.ended_;(T=this.mediaTypes_.AUDIO.activePlaylistLoader?((u=this.mainSegmentLoader_.getCurrentMediaInfo_())&&!u.hasVideo||T)&&this.audioSegmentLoader_.ended_:T)&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream());},P.stuckAtPlaylistEnd_=function(T){if(!this.seekable().length)return!1;var A=this.syncController_.getExpiredTime(T,this.duration());if(A===null)return!1;var T=ws.Playlist.playlistEnd(T,A),A=this.tech_.currentTime(),L=this.tech_.buffered();return L.length?(L=L.end(L.length-1),L-A<=Ua&&T-L<=Ua):T-A<=Ua;},P.blacklistCurrentPlaylist=function(u,T){var A=(u=u===void 0?{}:u).playlist||this.masterPlaylistLoader_.media();
43if(T=T||u.blacklistDuration||this.blacklistDuration,A){A.playlistErrors_++;var L,ie=this.masterPlaylistLoader_.master.playlists,pe=ie.filter(xl),pe=pe.length===1&&pe[0]===A;if(ie.length===1&&T!==1/0)return rt.log.warn("Problem encountered with playlist "+A.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(pe);pe&&(L=!1,ie.forEach(function(je){var Fe;je!==A&&(Fe=je.excludeUntil)!==void 0&&Fe!==1/0&&(L=!0,delete je.excludeUntil);}),L&&(rt.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))),ie=A.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*T,A.excludeUntil=ie,u.reason&&(A.lastExcludeReason_=u.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var Te,T=this.selectPlaylist();if(T)return ie=u.internal?this.logger_:rt.log.warn,Te=u.message?" "+u.message:"",ie((u.internal?"Internal problem":"Problem")+" encountered with playlist "+A.id+"."+Te+" Switching to playlist "+T.id+"."),T.attributes.AUDIO!==A.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),T.attributes.SUBTITLES!==A.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),ie=T.targetDuration/2*1e3||5e3,Te=typeof T.lastRequest=="number"&&Date.now()-T.lastRequest<=ie,this.switchMedia_(T,"exclude",pe||Te);this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");}else this.error=u,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");},P.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_();},P.delegateLoaders_=function(u,T){var A=this,L=[],ie=u==="all",pe=(!ie&&u!=="main"||L.push(this.masterPlaylistLoader_),[]);!ie&&u!=="audio"||pe.push("AUDIO"),!ie&&u!=="subtitle"||(pe.push("CLOSED-CAPTIONS"),pe.push("SUBTITLES")),pe.forEach(function(Te){Te=A.mediaTypes_[Te]&&A.mediaTypes_[Te].activePlaylistLoader,Te&&L.push(Te);}),["main","audio","subtitle"].forEach(function(Te){var Ae=A[Te+"SegmentLoader_"];!Ae||u!==Te&&u!=="all"||L.push(Ae);}),L.forEach(function(Te){return T.forEach(function(Ae){typeof Te[Ae]=="function"&&Te[Ae]();});});},P.setCurrentTime=function(u){var T=on(this.tech_.buffered(),u);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?T&&T.length?u:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0;},P.duration=function(){if(!this.masterPlaylistLoader_)return 0;var u=this.masterPlaylistLoader_.media();return u?u.endList?this.mediaSource?this.mediaSource.duration:ws.Playlist.duration(u):1/0:0;},P.seekable=function(){return this.seekable_;},P.onSyncInfoUpdate_=function(){var u;if(this.masterPlaylistLoader_){var T=this.masterPlaylistLoader_.media();if(T){var A=this.syncController_.getExpiredTime(T,this.duration());if(A!==null){var L,ie,pe=this.masterPlaylistLoader_.master,Te=ws.Playlist.seekable(T,A,ws.Playlist.liveEdgeDelay(pe,T));if(Te.length!==0){if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(T=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),(A=this.syncController_.getExpiredTime(T,this.duration()))===null||(u=ws.Playlist.seekable(T,A,ws.Playlist.liveEdgeDelay(pe,T))).length===0))return;this.seekable_&&this.seekable_.length&&(L=this.seekable_.end(0),ie=this.seekable_.start(0)),!u||u.start(0)>Te.end(0)||Te.start(0)>u.end(0)?this.seekable_=Te:this.seekable_=rt.createTimeRanges([[(u.start(0)>Te.start(0)?u:Te).start(0),(u.end(0)<Te.end(0)?u:Te).end(0)]]),this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===L&&this.seekable_.start(0)===ie||(this.logger_("seekable updated ["+xn(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"));}}}}},P.updateDuration=function(u){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open")this.updateDuration_=this.updateDuration.bind(this,u),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);else{if(u)return(u=this.seekable()).length?void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<u.end(u.length-1))&&this.sourceUpdater_.setDuration(u.end(u.length-1))):void 0;var u=this.tech_.buffered(),T=ws.Playlist.duration(this.masterPlaylistLoader_.media());0<u.length&&(T=Math.max(T,u.end(u.length-1))),this.mediaSource.duration!==T&&this.sourceUpdater_.setDuration(T);}},P.dispose=function(){var u=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(T){var A,L=u.mediaTypes_[T].groups;for(A in L)L[A].forEach(function(ie){ie.playlistLoader&&ie.playlistLoader.dispose();});}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off();},P.master=function(){return this.masterPlaylistLoader_.master;},P.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_;},P.areMediaTypesKnown_=function(){var T=!!this.mediaTypes_.AUDIO.activePlaylistLoader,u=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),T=!T||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return u&&T;},P.getCodecsOrExclude_=function(){var u=this,T={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},A=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media(),L=(T.video=T.main,Nu(this.master(),A)),ie={},pe=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(T.main.hasVideo&&(ie.video=L.video||T.main.videoCodec||l.b),T.main.isMuxed&&(ie.video+=","+(L.audio||T.main.audioCodec||l.a)),(T.main.hasAudio&&!T.main.isMuxed||T.audio.hasAudio||pe)&&(ie.audio=L.audio||T.main.audioCodec||T.audio.audioCodec||l.a,T.audio.isFmp4=(T.main.hasAudio&&!T.main.isMuxed?T.main:T.audio).isFmp4),ie.audio||ie.video){var Te,Ae,je={};if(["video","audio"].forEach(function(He){var Qe,pt;ie.hasOwnProperty(He)&&(Qe=T[He].isFmp4,pt=ie[He],!Object(Qe?l.c:l.g)(pt))&&(Qe=T[He].isFmp4?"browser":"muxer",je[Qe]=je[Qe]||[],je[Qe].push(ie[He]),He==="audio"&&(Te=Qe));}),pe&&Te&&A.attributes.AUDIO&&(Ae=A.attributes.AUDIO,this.master().playlists.forEac
43h(function(He){(He.attributes&&He.attributes.AUDIO)===Ae&&He!==A&&(He.excludeUntil=1/0);}),this.logger_("excluding audio group "+Ae+" as "+Te+' does not support codec(s): "'+ie.audio+'"')),!Object.keys(je).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var Fe=[];if(["video","audio"].forEach(function(He){var Qe=(Object(l.h)(u.sourceUpdater_.codecs[He]||"")[0]||{}).type,pt=(Object(l.h)(ie[He]||"")[0]||{}).type;Qe&&pt&&Qe.toLowerCase()!==pt.toLowerCase()&&Fe.push('"'+u.sourceUpdater_.codecs[He]+'" -> "'+ie[He]+'"');}),Fe.length)return void this.blacklistCurrentPlaylist({playlist:A,message:"Codec switching not supported: "+Fe.join(", ")+".",blacklistDuration:1/0,internal:!0});}return ie;}L=Object.keys(je).reduce(function(He,Qe){return He&&(He+=", "),He+=Qe+' does not support codec(s): "'+je[Qe].join(",")+'"';},"")+".",this.blacklistCurrentPlaylist({playlist:A,internal:!0,message:L,blacklistDuration:1/0});}else this.blacklistCurrentPlaylist({playlist:A,message:"Could not determine codecs for playlist.",blacklistDuration:1/0});},P.tryToCreateSourceBuffers_=function(){var u;this.mediaSource.readyState==="open"&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()&&(u=this.getCodecsOrExclude_())&&(this.sourceUpdater_.createSourceBuffers(u),u=[u.video,u.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(u));},P.excludeUnsupportedVariants_=function(){var u=this,T=this.master().playlists,A=[];Object.keys(T).forEach(function(Te){var ie,pe,Te=T[Te];A.indexOf(Te.id)===-1&&(A.push(Te.id),pe=[],!(ie=Nu(u.master,Te)).audio||Object(l.g)(ie.audio)||Object(l.c)(ie.audio)||pe.push("audio codec "+ie.audio),!ie.video||Object(l.g)(ie.video)||Object(l.c)(ie.video)||pe.push("video codec "+ie.video),ie.text&&ie.text==="stpp.ttml.im1t"&&pe.push("text codec "+ie.text),pe.length&&(Te.excludeUntil=1/0,u.logger_("excluding "+Te.id+" for unsupported: "+pe.join(", "))));});},P.excludeIncompatibleVariants_=function(ie){var T=this,A=[],L=this.master().playlists,ie=Ld(Object(l.h)(ie)),pe=Ug(ie),Te=ie.video&&Object(l.h)(ie.video)[0]||null,Ae=ie.audio&&Object(l.h)(ie.audio)[0]||null;Object.keys(L).forEach(function(pt){var Fe,He,Qe,pt=L[pt];A.indexOf(pt.id)===-1&&pt.excludeUntil!==1/0&&(A.push(pt.id),Fe=[],Qe=Nu(T.masterPlaylistLoader_.master,pt),He=Ug(Qe),(Qe.audio||Qe.video)&&(He!==pe&&Fe.push('codec count "'+He+'" !== "'+pe+'"'),T.sourceUpdater_.canChangeType()||(He=Qe.video&&Object(l.h)(Qe.video)[0]||null,Qe=Qe.audio&&Object(l.h)(Qe.audio)[0]||null,He&&Te&&He.type.toLowerCase()!==Te.type.toLowerCase()&&Fe.push('video codec "'+He.type+'" !== "'+Te.type+'"'),Qe&&Ae&&Qe.type.toLowerCase()!==Ae.type.toLowerCase()&&Fe.push('audio codec "'+Qe.type+'" !== "'+Ae.type+'"')),Fe.length&&(pt.excludeUntil=1/0,T.logger_("blacklisting "+pt.id+": "+Fe.join(" && ")))));});},P.updateAdCues_=function(u){var T=0,ie=this.seekable(),A=(ie.length&&(T=ie.start(0)),u),L=this.cueTagsTrack_,ie=T;if(ie===void 0&&(ie=0),A.segments)for(var pe=ie,Te=0;Te<A.segments.length;Te++){var Ae,je,Fe,He=A.segments[Te];if(Fe=Fe||function(Qe,pt){for(var Vt=Qe.cues,jt=0;jt<Vt.length;jt++){var It=Vt[jt];if(pt>=It.adStartTime&&pt<=It.adEndTime)return It;}return null;}(L,pe+He.duration/2)){if("cueIn"in He){Fe.endTime=pe,Fe.adEndTime=pe,pe+=He.duration,Fe=null;continue;}if(pe<Fe.endTime){pe+=He.duration;continue;}Fe.endTime+=He.duration;}else"cueOut"in He&&((Fe=new o.a.VTTCue(pe,pe+He.duration,He.cueOut)).adStartTime=pe,Fe.adEndTime=pe+parseFloat(He.cueOut),L.addCue(Fe)),"cueOutCont"in He&&(Ae=(je=He.cueOutCont.split("/").map(parseFloat))[0],je=je[1],(Fe=new o.a.VTTCue(pe,pe+He.duration,"")).adStartTime=pe-Ae,Fe.adEndTime=Fe.adStartTime+je,L.addCue(Fe));pe+=He.duration;}},P.goalBufferLength=function(){var u=this.tech_.currentTime(),T=io.GOAL_BUFFER_LENGTH,A=io.GOAL_BUFFER_LENGTH_RATE,L=Math.max(T,io.MAX_GOAL_BUFFER_LENGTH);return Math.min(T+u*A,L);},P.bufferLowWaterLine=function(){var u=this.tech_.currentTime(),T=io.BUFFER_LOW_WATER_LINE,A=io.BUFFER_LOW_WATER_LINE_RATE,L=Math.max(T,io.MAX_BUFFER_LOW_WATER_LINE),ie=Math.max(T,io.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(T+u*A,this.experimentalBufferBasedABR?ie:L);},P.bufferHighWaterLine=function(){return io.BUFFER_HIGH_WATER_LINE;},R;}(rt.EventTarget),Uw=function(k,R,P){return function(u){var T=k.master.playlists[R],A=Us(T),L=xl(T);return u===void 0?L:(u?delete T.disabled:T.disabled=!0,u===L||A||(P(),u?k.trigger("renditionenabled"):k.trigger("renditiondisabled")),u);};},Oy=["seeking","seeked","pause","playing","error"],Gw=function(){function k(P){function u(){return pe.monitorCurrentTime_();}function T(){return pe.monitorCurrentTime_();}function A(){return pe.techWaiting_();}function L(){return pe.cancelTimer_();}function ie(Fe){["main","audio"].forEach(function(He){Te[He+"SegmentLoader_"][Fe]("appended",pe.seekingAppendCheck_);});}var pe=this,Te=(this.masterPlaylistController_=P.masterPlaylistController,this.tech_=P.tech,this.seekable=P.seekable,this.allowSeeksWithinUnsafeLiveWindow=P.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=P.liveRangeSafeTimeDelta,this.media=P.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=R
43a("PlaybackWatcher"),this.logger_("initialize"),this.masterPlaylistController_),Ae=["main","subtitle","audio"],je={};Ae.forEach(function(Fe){je[Fe]={reset:function(){return pe.resetSegmentDownloads_(Fe);},updateend:function(){return pe.checkSegmentDownloads_(Fe);}},Te[Fe+"SegmentLoader_"].on("appendsdone",je[Fe].updateend),Te[Fe+"SegmentLoader_"].on("playlistupdate",je[Fe].reset),pe.tech_.on(["seeked","seeking"],je[Fe].reset);}),this.seekingAppendCheck_=function(){pe.fixesBadSeeks_()&&(pe.consecutiveUpdates=0,pe.lastRecordedTime=pe.tech_.currentTime(),ie("off"));},this.clearSeekingAppendCheck_=function(){return ie("off");},this.watchForBadSeeking_=function(){pe.clearSeekingAppendCheck_(),ie("on");},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",A),this.tech_.on(Oy,L),this.tech_.on("canplay",T),this.tech_.one("play",u),this.dispose=function(){pe.clearSeekingAppendCheck_(),pe.logger_("dispose"),pe.tech_.off("waiting",A),pe.tech_.off(Oy,L),pe.tech_.off("canplay",T),pe.tech_.off("play",u),pe.tech_.off("seeking",pe.watchForBadSeeking_),pe.tech_.off("seeked",pe.clearSeekingAppendCheck_),Ae.forEach(function(Fe){Te[Fe+"SegmentLoader_"].off("appendsdone",je[Fe].updateend),Te[Fe+"SegmentLoader_"].off("playlistupdate",je[Fe].reset),pe.tech_.off(["seeked","seeking"],je[Fe].reset);}),pe.checkCurrentTimeTimeout_&&o.a.clearTimeout(pe.checkCurrentTimeTimeout_),pe.cancelTimer_();};}var R=k.prototype;return R.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&o.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=o.a.setTimeout(this.monitorCurrentTime_.bind(this),250);},R.resetSegmentDownloads_=function(P){var u=this.masterPlaylistController_[P+"SegmentLoader_"];0<this[P+"StalledDownloads_"]&&this.logger_("resetting possible stalled download count for "+P+" loader"),this[P+"StalledDownloads_"]=0,this[P+"Buffered_"]=u.buffered_();},R.checkSegmentDownloads_=function(P){var u=this.masterPlaylistController_,T=u[P+"SegmentLoader_"],A=T.buffered_(),L=function(ie,pe){if(ie!==pe){if(!ie&&pe||!pe&&ie||ie.length!==pe.length)return!0;for(var Te=0;Te<ie.length;Te++)if(ie.start(Te)!==pe.start(Te)||ie.end(Te)!==pe.end(Te))return!0;}return!1;}(this[P+"Buffered_"],A);this[P+"Buffered_"]=A,L?this.resetSegmentDownloads_(P):(this[P+"StalledDownloads_"]++,this.logger_("found #"+this[P+"StalledDownloads_"]+" "+P+" appends that did not increase buffer (possible stalled download)",{playlistId:T.playlist_&&T.playlist_.id,buffered:Tn(A)}),this[P+"StalledDownloads_"]<10||(this.logger_(P+" loader stalled download exclusion"),this.resetSegmentDownloads_(P),this.tech_.trigger({type:"usage",name:"vhs-"+P+"-download-exclusion"}),P!=="subtitle"&&u.blacklistCurrentPlaylist({message:"Excessive "+P+" segment downloading detected."},1/0)));},R.checkCurrentTime_=function(){var P,u;if(!this.tech_.paused()&&!this.tech_.seeking())return P=this.tech_.currentTime(),u=this.tech_.buffered(),this.lastRecordedTime===P&&(!u.length||P+Ua>=u.end(u.length-1))?this.techWaiting_():void(5<=this.consecutiveUpdates&&P===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):P===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=P));},R.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null;},R.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var P,u=this.seekable(),T=this.tech_.currentTime();if(this.afterSeekableWindow_(u,T,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(P=u.end(u.length-1)),(P=this.beforeSeekableWindow_(u,T)?(L=u.start(0))+(L===u.end(0)?0:Ua):P)!==void 0)this.logger_("Trying to seek outside of seekable at time "+T+" with seekable range "+xn(u)+". Seeking to "+P+"."),this.tech_.setCurrentTime(P);else{for(var L=this.masterPlaylistController_.sourceUpdater_,u=this.tech_.buffered(),A=L.audioBuffer?L.audioBuffered():null,L=L.videoBuffer?L.videoBuffered():null,ie=this.media(),pe=ie.partTargetDuration||2*(ie.targetDuration-Gs),Te=[A,L],Ae=0;Ae<Te.length;Ae++)if(Te[Ae]&&Vr(Te[Ae],T)<pe)return!1;if(ie=ur(u,T),ie.length===0)return!1;P=ie.start(0)+Ua,this.logger_("Buffered region starts ("+ie.start(0)+") just beyond seek point ("+T+"). Seeking to "+P+"."),this.tech_.setCurrentTime(P);}return!0;},R.waiting_=function(){var P,u;this.techWaiting_()||(P=this.tech_.currentTime(),u=this.tech_.buffered(),(u=
43on(u,P)).length&&P+3<=u.end(0)&&(this.cancelTimer_(),this.tech_.setCurrentTime(P),this.logger_("Stopped at "+P+" while inside a buffered region ["+u.start(0)+" -> "+u.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})));},R.techWaiting_=function(){var u=this.seekable(),P=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null)return!0;if(this.beforeSeekableWindow_(u,P))return u=u.end(u.length-1),this.logger_("Fell out of live window at time "+P+". Seeking to live point (seekable end) "+u),this.cancelTimer_(),this.tech_.setCurrentTime(u),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0;var u=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,T=this.tech_.buffered();return this.videoUnderflow_({audioBuffered:u.audioBuffered(),videoBuffered:u.videoBuffered(),currentTime:P})?(this.cancelTimer_(),this.tech_.setCurrentTime(P),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0):(u=ur(T,P),0<u.length&&(T=u.start(0)-P,this.logger_("Stopped at "+P+", setting timer for "+T+", seeking to "+u.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*T,P),!0));},R.afterSeekableWindow_=function(P,u,T,A){if(A===void 0&&(A=!1),!P.length)return!1;var L=P.end(P.length-1)+Ua;return(L=!T.endList&&A?P.end(P.length-1)+3*T.targetDuration:L)<u;},R.beforeSeekableWindow_=function(P,u){return!!(P.length&&0<P.start(0)&&u<P.start(0)-this.liveRangeSafeTimeDelta);},R.videoUnderflow_=function(pe){var u,T,A,L=pe.videoBuffered,ie=pe.audioBuffered,pe=pe.currentTime;if(L)return L.length&&ie.length?(T=on(L,pe-3),A=on(L,pe),(ie=on(ie,pe)).length&&!A.length&&T.length&&(u={start:T.end(0),end:ie.end(0)})):ur(L,pe).length||(u=this.gapFromVideoUnderflow_(L,pe)),!!u&&(this.logger_("Encountered a gap in video from "+u.start+" to "+u.end+". Seeking to current time "+pe),!0);},R.skipTheGap_=function(P){var T=this.tech_.buffered(),u=this.tech_.currentTime(),T=ur(T,u);this.cancelTimer_(),T.length!==0&&u===P&&(this.logger_("skipTheGap_:","currentTime:",u,"scheduled currentTime:",P,"nextRange start:",T.start(0)),this.tech_.setCurrentTime(T.start(0)+Gs),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}));},R.gapFromVideoUnderflow_=function(P,u){for(var T=function(pe){if(pe.length<2)return rt.createTimeRanges();for(var Te=[],Ae=1;Ae<pe.length;Ae++){var je=pe.end(Ae-1),Fe=pe.start(Ae);Te.push([je,Fe]);}return rt.createTimeRanges(Te);}(P),A=0;A<T.length;A++){var L=T.start(A),ie=T.end(A);if(u-L<4&&2<u-L)return{start:L,end:ie};}return null;},k;}(),zw={errorInterval:30,getSource:function(k){return k(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource());}},mo={PlaylistLoader:uc,Playlist:Fo,utils:cn,STANDARD_PLAYLIST_SELECTOR:zg,INITIAL_PLAYLIST_SELECTOR:function(){var k=this,R=this.playlists.master.playlists.filter(Fo.isEnabled);return dc(R,mf),R.filter(function(P){return!!Nu(k.playlists.master,P).video;})[0]||null;},lastBandwidthSelector:zg,movingAverageBandwidthSelector:function(k){var R=-1,P=-1;if(k<0||1<k)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var u=this.useDevicePixelRatio&&o.a.devicePixelRatio||1;return R<0&&(R=this.systemBandwidth,P=this.systemBandwidth),0<this.systemBandwidth&&this.systemBandwidth!==P&&(R=k*this.systemBandwidth+(1-k)*R,P=this.systemBandwidth),Gg(this.playlists.master,R,parseInt(Md(this.tech_.el(),"width"),10)*u,parseInt(Md(this.tech_.el(),"height"),10)*u,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_);};},comparePlaylistBandwidth:mf,comparePlaylistResolution:function(k,R){var P,u;return(P=(P=k.attributes.RESOLUTION&&k.attributes.RESOLUTION.width?k.attributes.RESOLUTION.width:P)||o.a.Number.MAX_VALUE)===(u=(u=R.attributes.RESOLUTION&&R.attributes.RESOLUTION.width?R.attributes.RESOLUTION.width:u)||o.a.Number.MAX_VALUE)&&k.attributes.BANDWIDTH&&R.attributes.BANDWIDTH?k.attributes.BANDWIDTH-R.attributes.BANDWIDTH:P-u;},xhr:Og()}
43,Py=(Object.keys(io).forEach(function(k){Object.defineProperty(mo,k,{get:function(){return rt.log.warn("using Vhs."+k+" is UNSAFE be sure you know what you are doing"),io[k];},set:function(R){rt.log.warn("using Vhs."+k+" is UNSAFE be sure you know what you are doing"),typeof R!="number"||R<0?rt.log.warn("value of Vhs."+k+" must be greater than or equal to 0"):io[k]=R;}});}),"videojs-vhs");mo.canPlaySource=function(){return rt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.");},mo.supportsNativeHls=function(){if(!_.a||!_.a.createElement)return!1;var k=_.a.createElement("video");return rt.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(R){return /maybe|probably/i.test(k.canPlayType(R));}):!1;}(),mo.supportsNativeDash=!!(_.a&&_.a.createElement&&rt.getTech("Html5").isSupported())&&/maybe|probably/i.test(_.a.createElement("video").canPlayType("application/dash+xml")),mo.supportsTypeNatively=function(k){return k==="hls"?mo.supportsNativeHls:k==="dash"&&mo.supportsNativeDash;},mo.isSupported=function(){return rt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.");};var Ef=function(k){function R(u,T,A){var L=k.call(this,T,rt.mergeOptions(A.hls,A.vhs))||this;if(A.hls&&Object.keys(A.hls).length&&rt.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),typeof A.initialBandwidth=="number"&&(L.options_.bandwidth=A.initialBandwidth),L.logger_=Ra("VhsHandler"),T.options_&&T.options_.playerId&&((A=rt(T.options_.playerId)).hasOwnProperty("hls")||Object.defineProperty(A,"hls",{get:function(){return rt.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),T.trigger({type:"usage",name:"hls-player-access"}),h()(L);},configurable:!0}),A.hasOwnProperty("vhs")||Object.defineProperty(A,"vhs",{get:function(){return rt.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),T.trigger({type:"usage",name:"vhs-player-access"}),h()(L);},configurable:!0}),A.hasOwnProperty("dash")||Object.defineProperty(A,"dash",{get:function(){return rt.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),h()(L);},configurable:!0}),L.player_=A),L.tech_=T,L.source_=u,L.stats={},L.ignoreNextSeekingEvent_=!1,L.setOptions_(),L.options_.overrideNative&&T.overrideNativeAudioTracks&&T.overrideNativeVideoTracks)T.overrideNativeAudioTracks(!0),T.overrideNativeVideoTracks(!0);else if(L.options_.overrideNative&&(T.featuresNativeVideoTracks||T.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return L.on(_.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(ie){var pe=_.a.fullscreenElement||_.a.webkitFullscreenElement||_.a.mozFullScreenElement||_.a.msFullscreenElement;pe&&pe.contains(L.tech_.el())?L.masterPlaylistController_.fastQualityChange_():L.masterPlaylistController_.checkABR_();}),L.on(L.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime());}),L.on(L.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading();}),L.on(L.tech_,"play",L.play),L;}y()(R,k);var P=R.prototype;return P.setOptions_=function(){var u,T=this;this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects!==!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=this.source_.useBandwidthFromLocalStorage!==void 0?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=300),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage&&((u=vy())&&u.bandwidth&&(this.options_.bandwidth=u.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),u&&u.throughput&&(this.options_.throughput=u.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))),typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=io.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===io.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(A){T.source_[A]!==void 0&&(T.options_[A]=T.source_[A]);}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;},P.src=function(u,T){var A=this;u&&(this.setOptions_(),this.options_.src=(u=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(u.substring(u.indexOf(",")+1)):u,this.options_.tech=this.tech_,this.options_.externVhs=mo,this.options_.sourceType=Object(g.a)(T),this.options_.seekTo=function(L){A.tech_.setCurrentTime(L);},this.options_.smoothQualityChange&&rt.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new Fw(this.options_),u=rt.mergeOptions({liveRangeSafeTimeDelta:Ua}
43,this.options_,{seekable:function(){return A.seekable();},media:function(){return A.masterPlaylistController_.media();},masterPlaylistController:this.masterPlaylistController_}),this.playbackWatcher_=new Gw(u),this.masterPlaylistController_.on("error",function(){var L=rt.players[A.tech_.options_.playerId],ie=A.masterPlaylistController_.error;typeof ie!="object"||ie.code?typeof ie=="string"&&(ie={message:ie,code:3}):ie.code=3,L.error(ie);}),T=this.options_.experimentalBufferBasedABR?mo.movingAverageBandwidthSelector(.55):mo.STANDARD_PLAYLIST_SELECTOR,this.masterPlaylistController_.selectPlaylist=(this.selectPlaylist||T).bind(this),this.masterPlaylistController_.selectInitialPlaylist=mo.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist;},set:function(L){this.masterPlaylistController_.selectPlaylist=L.bind(this);}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;},set:function(L){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=L,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1;}},bandwidth:{get:function(){var L=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,ie=o.a.navigator.connection||o.a.navigator.mozConnection||o.a.navigator.webkitConnection;return L=this.options_.useNetworkInformationApi&&ie?1e7<=(ie=1e3*ie.downlink*1e3)&&1e7<=L?Math.max(L,ie):ie:L;},set:function(L){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=L,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0};}},systemBandwidth:{get:function(){var L=1/(this.bandwidth||1),ie=0<this.throughput?1/this.throughput:0;return Math.floor(1/(L+ie));},set:function(){rt.log.error('The "systemBandwidth" property is read-only');}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return A.bandwidth||0;},enumerable:!0},mediaRequests:{get:function(){return A.masterPlaylistController_.mediaRequests_()||0;},enumerable:!0},mediaRequestsAborted:{get:function(){return A.masterPlaylistController_.mediaRequestsAborted_()||0;},enumerable:!0},mediaRequestsTimedout:{get:function(){return A.masterPlaylistController_.mediaRequestsTimedout_()||0;},enumerable:!0},mediaRequestsErrored:{get:function(){return A.masterPlaylistController_.mediaRequestsErrored_()||0;},enumerable:!0},mediaTransferDuration:{get:function(){return A.masterPlaylistController_.mediaTransferDuration_()||0;},enumerable:!0},mediaBytesTransferred:{get:function(){return A.masterPlaylistController_.mediaBytesTransferred_()||0;},enumerable:!0},mediaSecondsLoaded:{get:function(){return A.masterPlaylistController_.mediaSecondsLoaded_()||0;},enumerable:!0},mediaAppends:{get:function(){return A.masterPlaylistController_.mediaAppends_()||0;},enumerable:!0},mainAppendsToLoadedData:{get:function(){return A.masterPlaylistController_.mainAppendsToLoadedData_()||0;},enumerable:!0},audioAppendsToLoadedData:{get:function(){return A.masterPlaylistController_.audioAppendsToLoadedData_()||0;},enumerable:!0},appendsToLoadedData:{get:function(){return A.masterPlaylistController_.appendsToLoadedData_()||0;},enumerable:!0},timeToLoadedData:{get:function(){return A.masterPlaylistController_.timeToLoadedData_()||0;},enumerable:!0},buffered:{get:function(){return Tn(A.tech_.buffered());},enumerable:!0},currentTime:{get:function(){return A.tech_.currentTime();},enumerable:!0},currentSource:{get:function(){return A.tech_.currentSource_;},enumerable:!0},currentTech:{get:function(){return A.tech_.name_;},enumerable:!0},duration:{get:function(){return A.tech_.duration();},enumerable:!0},master:{get:function(){return A.playlists.master;},enumerable:!0},playerDimensions:{get:function(){return A.tech_.currentDimensions();},enumerable:!0},seekable:{get:function(){return Tn(A.tech_.seekable());},enumerable:!0},timestamp:{get:function(){return Date.now();},enumerable:!0},videoPlaybackQuality:{get:function(){return A.tech_.getVideoPlaybackQuality();},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){if(A.options_.useBandwidthFromLocalStorage){var L={bandwidth:A.bandwidth,throughput:Math.round(A.throughput)};if(o.a.localStorage){var ie=(ie=vy())?rt.mergeOptions(ie,L):L;try{o.a.localStorage.setItem(Py,JSON.stringify(ie));}catch{return;}}}}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var L;(L=A).representations=function(){var ie=L.masterPlaylistController_.master(),ie=Du(ie)?
43L.masterPlaylistController_.getAudioTrackPlaylists_():ie.playlists;return ie?ie.filter(function(pe){return!Us(pe);}).map(function(pe,Te){return new _w(L,pe,pe.id);}):[];};}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){A.setupEme_();}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress");}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0;}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=o.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_)));},P.createKeySessions_=function(){var u=this,T=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),bw({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:T&&T.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){u.logger_("created EME key session"),u.masterPlaylistController_.sourceUpdater_.initializedEme();}).catch(function(A){u.logger_("error while creating EME key session",A),u.player_.error({message:"Failed to initialize media keys for EME",code:3});});},P.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_();},P.setupEme_=function(){var u=this,T=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,T=Sw({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:T&&T.media()});this.player_.tech_.on("keystatuschange",function(A){var L;A.status==="output-restricted"&&(A=u.masterPlaylistController_.master())&&A.playlists&&(L=[],A.playlists.forEac
43h(function(ie){ie&&ie.attributes&&ie.attributes.RESOLUTION&&720<=ie.attributes.RESOLUTION.height&&(!ie.excludeUntil||ie.excludeUntil<1/0)&&(ie.excludeUntil=1/0,L.push(ie));}),L.length&&((A=rt.log).warn.apply(A,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(L)),u.masterPlaylistController_.fastQualityChange_()));}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),rt.browser.IE_VERSION!==11&&T?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme();},P.setupQualityLevels_=function(){var u=this,T=rt.players[this.tech_.options_.playerId];T&&T.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=T.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var A,L;A=u.qualityLevels_,(L=u).representations().forEach(function(ie){A.addQualityLevel(ie);}),yy(A,L.playlists);}),this.playlists.on("mediachange",function(){yy(u.qualityLevels_,u.playlists);}));},R.version=function(){return{"@videojs/http-streaming":"2.16.3","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"};},P.version=function(){return this.constructor.version();},P.canChangeType=function(){return wy.canChangeType();},P.play=function(){this.masterPlaylistController_.play();},P.setCurrentTime=function(u){this.masterPlaylistController_.setCurrentTime(u);},P.duration=function(){return this.masterPlaylistController_.duration();},P.seekable=function(){return this.masterPlaylistController_.seekable();},P.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&o.a.URL.revokeObjectURL&&(o.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),k.prototype.dispose.call(this);},P.convertToProgramTime=function(u,T){return $1({playlist:this.masterPlaylistController_.media(),time:u,callback:T});},P.seekToProgramTime=function(u,T,A,L){return A===void 0&&(A=!0),L===void 0&&(L=2),Ag({programTime:u,playlist:this.masterPlaylistController_.media(),retryCount:L,pauseAfterSeek:A,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:T});},R;}(rt.getComponent("Component")),Vu={name:"videojs-http-streaming",VERSION:"2.16.3",canHandleSource:function(k,R){return R=rt.mergeOptions(rt.options,R=R===void 0?{}:R),Vu.canPlayType(k.type,R);},handleSource:function(k,R,P){return P=rt.mergeOptions(rt.options,P=P===void 0?{}:P),R.vhs=new Ef(k,R,P),rt.hasOwnProperty("hls")||Object.defineProperty(R,"hls",{get:function(){return rt.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),R.vhs;},configurable:!0}),R.vhs.xhr=Og(),R.vhs.src(k.src,k.type),R.vhs;},canPlayType:function(k,R){return k=Object(g.a)(k),k?(R=Vu.getOverrideNative(R),!mo.supportsTypeNatively(k)||R?"maybe":""):"";},getOverrideNative:function(u){var u=u=u===void 0?{}:u,P=u.vhs,u=u.hls,R=!(rt.browser.IS_ANY_SAFARI||rt.browser.IS_IOS),P=(P===void 0?{}:P).overrideNative,u=(u===void 0?{}:u).overrideNative;return u!==void 0&&u||(P===void 0?R:P);}};Object(l.c)("avc1.4d400d,mp4a.40.2")&&rt.getTech("Html5").registerSourceHandler(Vu,0),rt.VhsHandler=Ef,Object.defineProperty(rt,"HlsHandler",{get:function(){return rt.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Ef;},configurable:!0}),rt.VhsSourceHandler=Vu,Object.defineProperty(rt,"HlsSourceHandler",{get:function(){return rt.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Vu;},configurable:!0}),rt.Vhs=mo,Object.defineProperty(rt,"Hls",{get:function(){return rt.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),mo;},configurable:!0}),rt.use||(rt.registerComponent("Hls",mo),rt.registerComponent("
43Vhs",mo)),rt.options.vhs=rt.options.vhs||{},rt.options.hls=rt.options.hls||{},rt.getPlugin&&rt.getPlugin("reloadSourceOnError")||(rt.registerPlugin||rt.plugin)("reloadSourceOnError",function(k){gy(this,k);}),r.default=rt;}.call(this,e(27));},function(i,r,e){"use strict";var n=e(68),t=e.n(n),n=e(0),o=e.n(n),_="http://example.com";r.a=function(E,x){if(/^[a-z]+:/i.test(x))return x;/^data:/.test(E)&&(E=o.a.location&&o.a.location.href||"");var h=typeof o.a.URL=="function",y=/^\/\//.test(E),b=!o.a.location&&!/\/\//i.test(E);return h?E=new o.a.URL(E,o.a.location||_):/\/\//i.test(E)||(E=t.a.buildAbsoluteURL(o.a.location&&o.a.location.href||"",E)),h?(h=new URL(x,E),b?h.href.slice(_.length):y?h.href.slice(h.protocol.length):h.href):t.a.buildAbsoluteURL(E,x);};},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function");}function o(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function _(h,y,b){return y&&o(h.prototype,y),b&&o(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;}Object.defineProperty(r,"__esModule",{value:!0}),r.ComponentAttributesBuilder=r.ComponentAttributes=r.XGravity=r.YGravity=void 0,(x=r.YGravity||(r.YGravity={}))[x.UNSET=-1]="UNSET",x[x.TOP=0]="TOP",x[x.MIDDLE=1]="MIDDLE",x[x.BOTTOM=2]="BOTTOM",(x=r.XGravity||(r.XGravity={}))[x.UNSET=-1]="UNSET",x[x.LEFT=0]="LEFT",x[x.CENTER=1]="CENTER",x[x.RIGHT=2]="RIGHT";var E=function(){return _(function h(y){n(this,h),this._startTime=y.startTime,this._endTime=y.endTime;},[{key:"duration",get:function(){return this._endTime-this._startTime;}},{key:"startTime",get:function(){return this._startTime;}},{key:"endTime",get:function(){return this._endTime;}}]);}(),x=(r.ComponentAttributes=E,function(){return _(function h(y){n(this,h),this._shouldBuildVDOM=!0,this._startTime=y.startTime,this._endTime=y.endTime;},[{key:"shouldBuildVDOM",get:function(){return this._shouldBuildVDOM;}},{key:"startTime",get:function(){return this._startTime;}},{key:"endTime",get:function(){return this._endTime;}},{key:"build",value:function(){return new E(this);}}]);}());r.ComponentAttributesBuilder=x;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}
43function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.VisualEffect=void 0;var h=b(104),y=b(47),b=function(p){function c(s){if(this instanceof c)return o(this,c,[s,y.EffectType.VISUAL]);throw new TypeError("Cannot call a class as a function");}var d,m,a=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(p&&p.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),p&&x(a,p),a=c,d&&n(a.prototype,d),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.BasicEffect);r.VisualEffect=b;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function _(y){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");Number(y)?this.fromNumeric(y):this.fromString(y);}return E=_,(x=[{key:"fromString",value:function(y){switch(this._aspectRatioStr=y){case"horizontal":this._aspectRatio=16/9;break;case"square":this._aspectRatio=1;break;case"vertical":this._aspectRatio=9/16;break;default:this._aspectRatio=16/9,this._aspectRatioStr="horizontal";}}},{key:"fromNumeric",value:function(y){this._aspectRatio=y,this._aspectRatioStr=1<y?"horizontal":y<1?"vertical":"square";}},{key:"aspectRatioStr",get:function(){return this._aspectRatioStr;}},{key:"aspectRatio",get:function(){return this._aspectRatio;}},{key:"toString",value:function(){return this._aspectRatioStr;}},{key:"toNumber",value:function(){return this._aspectRatio;}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.default=o;},function(i,r){var e=function(){return this;}();try{e=e||new Function("return this")();}catch{typeof window=="object"&&(e=window);}i.exports=e;},function(i,r){i.exports=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function");};},function(i,r){i.exports=function(e){return e!=null&&typeof e=="object";};},function(i,r){var e=function(_){return 9e4*_;},t=function(_,E){return _*E;},n=function(_){return _/9e4;},o=function(_,E){return _/E;};i.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:o,audioTsToVideoTs:function(_,E){return _/E*9e4;},videoTsToAudioTs:function(_,E){return _/9e4*E;},metadataTsToSeconds:function(_,E,x){return n(x?_:_-E);}};},function(i,r,e){"use strict";e.d(r,"a",function(){return C;}),e.d(r,"b",function(){return I;});function t(O){return typeof O=="string"?Object(x.h)(O):O;}function n(O,M,N){N===void 0&&(N=!1),M=h(M),O=Object(x.k)(O);var G=[];if(M.length)for(var H=0;H<O.length;){var B=(O[H]<<24|O[H+1]<<16|O[H+2]<<8|O[H+3])>>>0,z=O.subarray(H+4,H+8);if(B==0)break;if(B=H+B,B>O.length){if(N)break;B=O.length;}var te=O.subarray(H+8,B);Object(x.a)(z,M[0])&&(M.length===1?G.push(te):G.push.apply(G,n(te,M.slice(1),N))),H=B;}return G;}function o(O,M,N){if(N>=M.length)return M.length;var G=c(M,N,!1);if(Object(x.a)(O.bytes,G.bytes))return N;var H=c(M,N+G.length);return o(O,M,N+H.length+H.value+G.length);}function _(O,M){N=M,M=Array.isArray(N)?N.map(function(V){return d(V);}):[d(N)],O=Object(x.k)(O);var N,G=[];if(M.length)for(var H=0;H<O.length;){var B=c(O,H,!1),z=c(O,H+B.length),K=H+B.length+z.length,te=(z.value===127&&(z.value=o(B,O,K),z.value!==O.length&&(z.value-=K)),K+z.value>O.length?O.length:K+z.value),K=O.subarray(K,te);Object(x.a)(M[0],B.bytes)&&(M.length===1?G.push(K):G=G.concat(_(K,M.slice(1)))),H+=B.length+z.length+K.length;}return G;}function E(O,M,N,G){G===void 0&&(G=1/0),O=Object(x.k)(O),N=[].concat(N);for(var H,B=0,z=0;B<O.length&&(z<G||H);){var te=void 0;if(Object(x.a)(O.subarray(B),a)?te=4:Object(x.a)(O.subarray(B),s)&&(te=3),te){if(z++,H)return g(O.subarray(H,B));var K=void 0;M==="h264"?K=31&O[B+te]:M==="h265"&&(K=O[B+te]>>1&63),N.indexOf(K)!==-1&&(H=B+te),B+=te+(M==="h264"?1:2);}else B++;}return O.subarray(0,0);}
43var x=e(1),h=(new Uint8Array([79,112,117,115,72,101,97,100]),function(O){return Array.isArray(O)?O.map(t):[t(O)];}),y={EBML:Object(x.k)([26,69,223,163]),DocType:Object(x.k)([66,130]),Segment:Object(x.k)([24,83,128,103]),SegmentInfo:Object(x.k)([21,73,169,102]),Tracks:Object(x.k)([22,84,174,107]),Track:Object(x.k)([174]),TrackNumber:Object(x.k)([215]),DefaultDuration:Object(x.k)([35,227,131]),TrackEntry:Object(x.k)([174]),TrackType:Object(x.k)([131]),FlagDefault:Object(x.k)([136]),CodecID:Object(x.k)([134]),CodecPrivate:Object(x.k)([99,162]),VideoTrack:Object(x.k)([224]),AudioTrack:Object(x.k)([225]),Cluster:Object(x.k)([31,67,182,117]),Timestamp:Object(x.k)([231]),TimestampScale:Object(x.k)([42,215,177]),BlockGroup:Object(x.k)([160]),BlockDuration:Object(x.k)([155]),Block:Object(x.k)([161]),SimpleBlock:Object(x.k)([163])},b=[128,64,32,16,8,4,2,1],p=function(O){for(var M=1,N=0;N<b.length&&!(O&b[N]);N++)M++;return M;},c=function(O,M,N,G){N===void 0&&(N=!0),G===void 0&&(G=!1);var H=p(O[M]),B=O.subarray(M,M+H);return N&&((B=Array.prototype.slice.call(O,M,M+H))[0]^=b[H-1]),{length:H,value:Object(x.b)(B,{signed:G}),bytes:B};},d=function O(M){return typeof M=="string"?M.match(/.{1,2}/g).map(O):typeof M=="number"?Object(x.f)(M):M;},m=e(18),a=Object(x.k)([0,0,0,1]),s=Object(x.k)([0,0,1]),l=Object(x.k)([0,0,3]),g=function(O){for(var M=[],N=1;N<O.length-2;)Object(x.a)(O.subarray(N,N+3),l)&&(M.push(N+2),N++),N++;if(M.length===0)return O;for(var G=O.length-M.length,H=new Uint8Array(G),B=0,N=0;N<G;B++,N++)B===M[0]&&(B++,M.shift()),H[N]=O[B];return H;},f={webm:Object(x.k)([119,101,98,109]),matroska:Object(x.k)([109,97,116,114,111,115,107,97]),flac:Object(x.k)([102,76,97,67]),ogg:Object(x.k)([79,103,103,83]),ac3:Object(x.k)([11,119]),riff:Object(x.k)([82,73,70,70]),avi:Object(x.k)([65,86,73]),wav:Object(x.k)([87,65,86,69]),"3gp":Object(x.k)([102,116,121,112,51,103]),mp4:Object(x.k)([102,116,121,112]),fmp4:Object(x.k)([115,116,121,112]),mov:Object(x.k)([102,116,121,112,113,116]),moov:Object(x.k)([109,111,111,118]),moof:Object(x.k)([109,111,111,102])},v={aac:function(O){var M=Object(m.a)(O);return Object(x.a)(O,[255,16],{offset:M,mask:[255,22]});},mp3:function(O){var M=Object(m.a)(O);return Object(x.a)(O,[255,2],{offset:M,mask:[255,6]});},webm:function(O){return O=_(O,[y.EBML,y.DocType])[0],Object(x.a)(O,f.webm);},mkv:function(O){return O=_(O,[y.EBML,y.DocType])[0],Object(x.a)(O,f.matroska);},mp4:function(O){return!v["3gp"](O)&&!v.mov(O)&&(!(!Object(x.a)(O,f.mp4,{offset:4})&&!Object(x.a)(O,f.fmp4,{offset:4}))||!(!Object(x.a)(O,f.moof,{offset:4})&&!Object(x.a)(O,f.moov,{offset:4}))||void 0);},mov:function(O){return Object(x.a)(O,f.mov,{offset:4});},"3gp":function(O){return Object(x.a)(O,f["3gp"],{offset:4});},ac3:function(O){var M=Object(m.a)(O);return Object(x.a)(O,f.ac3,{offset:M});},ts:function(O){if(O.length<189&&1<=O.length)return O[0]===71;for(var M=0;M+188<O.length&&M<188;){if(O[M]===71&&O[M+188]===71)return!0;M+=1;}return!1;},flac:function(O){var M=Object(m.a)(O);return Object(x.a)(O,f.flac,{offset:M});},ogg:function(O){return Object(x.a)(O,f.ogg);},avi:function(O){return Object(x.a)(O,f.riff)&&Object(x.a)(O,f.avi,{offset:8});},wav:function(O){return Object(x.a)(O,f.riff)&&Object(x.a)(O,f.wav,{offset:8});},h264:function(O){return E(O,"h264",7,3).length;},h265:function(O){return E(O,"h265",[32,33],3).length;}},S=Object.keys(v).filter(function(O){return O!=="ts"&&O!=="h264"&&O!=="h265";}).concat(["ts","h264","h265"]),w=(S.forEach(function(O){var M=v[O];v[O]=function(N){return M(Object(x.k)(N));};}),v),C=function(O){O=Object(x.k)(O);for(var M=0;M<S.length;M++){var N=S[M];if(w[N](O))return N;}return"";},I=function(O){return 0<n(O,["moof"]).length;};},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=x(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 44In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function o(){o=function(){return s;};var a,s={},l=Object.prototype,g=l.hasOwnProperty,f=Object.defineProperty||function(F,X,Y){F[X]=Y.value;},V=typeof Symbol=="function"?Symbol:{},v=V.iterator||"@@iterator",S=V.asyncIterator||"@@asyncIterator",w=V.toStringTag||"@@toStringTag";function C(F,X,Y){return Object.defineProperty(F,X,{value:Y,enumerable:!0,configurable:!0,writable:!0}),F[X];}try{C({},"");}catch{C=function(X,Y,j){return X[Y]=j;};}function I(F,se,Y,fe){var D,$,ne,le,se=se&&se.prototype instanceof z?se:z,se=Object.create(se.prototype),fe=new oe(fe||[]);return f(se,"_invoke",{value:(D=F,$=Y,ne=fe,le=M,function(ge,he){if(le===G)throw Error("Generator is already running");if(le===H){if(ge==="throw")throw he;return{value:a,done:!0};}for(ne.method=ge,ne.arg=he;;){var _e=ne.delegate;if(_e&&(_e=function Re(ee,W){var ae=W.method,de=ee.iterator[ae];return de===a?(W.delegate=null,ae==="throw"&&ee.iterator.return&&
44(W.method="return",W.arg=a,Re(ee,W),W.method==="throw")||ae!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),B):(ae=O(de,ee.iterator,W.arg),ae.type==="throw"?(W.method="throw",W.arg=ae.arg,W.delegate=null,B):(de=ae.arg,de?de.done?(W[ee.resultName]=de.value,W.next=ee.nextLoc,W.method!=="return"&&(W.method="next",W.arg=a),W.delegate=null,B):de:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,B)));}(_e,ne),_e)){if(_e===B)continue;return _e;}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(le===M)throw le=H,ne.arg;ne.dispatchException(ne.arg);}else ne.method==="return"&&ne.abrupt("return",ne.arg);if(le=G,_e=O(D,$,ne),_e.type==="normal"){if(le=ne.done?H:N,_e.arg===B)continue;return{value:_e.arg,done:ne.done};}_e.type==="throw"&&(le=H,ne.method="throw",ne.arg=_e.arg);}})}),se;}function O(F,X,Y){try{return{type:"normal",arg:F.call(X,Y)};}catch(j){return{type:"throw",arg:j};}}s.wrap=I;var M="suspendedStart",N="suspendedYield",G="executing",H="completed",B={};function z(){}function te(){}function K(){}var V={},U=(C(V,v,function(){return this;}),Object.getPrototypeOf),U=U&&U(U(Q([]))),Z=(U&&U!==l&&g.call(U,v)&&(V=U),K.prototype=z.prototype=Object.create(V));function re(F){["next","throw","return"].forEach(function(X){C(F,X,function(Y){return this._invoke(X,Y);});});}function ue(F,X){var Y;f(this,"_invoke",{value:function(j,D){function $(){return new X(function(ne,le){(function se(ee,ge,he,_e){var Re,ee=O(F[ee],F,ge);if(ee.type!=="throw")return(ge=(Re=ee.arg).value)&&t(ge)=="object"&&g.call(ge,"__await")?X.resolve(ge.__await).then(function(W){se("next",W,he,_e);},function(W){se("throw",W,he,_e);}):X.resolve(ge).then(function(W){Re.value=W,he(Re);},function(W){return se("throw",W,he,_e);});_e(ee.arg);})(j,D,ne,le);});}return Y=Y?Y.then($,$):$();}});}function q(F){var X={tryLoc:F[0]};1 in F&&(X.catchLoc=F[1]),2 in F&&(X.finallyLoc=F[2],X.afterLoc=F[3]),this.tryEntries.push(X);}function J(F){var X=F.completion||{};X.type="normal",delete X.arg,F.completion=X;}function oe(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(q,this),this.reset(!0);}function Q(F){if(F||F===""){var X,Y=F[v];if(Y)return Y.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length))return X=-1,(Y=function j(){for(;++X<F.length;)if(g.call(F,X))return j.value=F[X],j.done=!1,j;return j.value=a,j.done=!0,j;}).next=Y;}throw new TypeError(t(F)+" is not iterable");}return f(Z,"constructor",{value:te.prototype=K,configurable:!0}),f(K,"constructor",{value:te,configurable:!0}),te.displayName=C(K,w,"GeneratorFunction"),s.isGeneratorFunction=function(F){return F=typeof F=="function"&&F.constructor,!!F&&(F===te||(F.displayName||F.name)==="GeneratorFunction");},s.mark=function(F){return Object.setPrototypeOf?Object.setPrototypeOf(F,K):(F.__proto__=K,C(F,w,"GeneratorFunction")),F.prototype=Object.create(Z),F;},s.awrap=function(F){return{__await:F};},re(ue.prototype),C(ue.prototype,S,function(){return this;}),s.AsyncIterator=ue,s.async=function(F,X,Y,j,D){D===void 0&&(D=Promise);var $=new ue(I(F,X,Y,j),D);return s.isGeneratorFunction(X)?$:$.next().then(function(ne){return ne.done?ne.value:$.next();});},re(Z),C(Z,w,"Generator"),C(Z,v,function(){return this;}),C(Z,"toString",function(){return"[object Generator]";}),s.keys=function(F){var X,Y=Object(F),j=[];for(X in Y)j.push(X);return j.reverse(),function D(){for(;j.length;){var $=j.pop();if($ in Y)return D.value=$,D.done=!1,D;}return D.done=!0,D;};},s.values=Q,oe.prototype={constructor:oe,reset:function(F){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(J),!F)for(var X in this)X.charAt(0)==="t"&&g.call(this,X)&&!isNaN(+X.slice(1))&&(this[X]=a);},stop:function(){this.done=!0;var F=this.tryEntries[0].completion;if(F.type==="throw")throw F.arg;return this.rval;},dispatchException:function(F){if(this.done)throw F;var X=this;function Y(se,fe){return $.type="throw",$.arg=F,X.next=se,fe&&(X.method="next",X.arg=a),!!fe;}for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j],$=D.completion;if(D.tryLoc==="root")return Y("end");if(D.tryLoc<=this.prev){var ne=g.call(D,"catchLoc"),le=g.call(D,"finallyLoc");if(ne&&le){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}else if(ne){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);}else{if(!le)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}}}},abrupt:function(F,X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y];if(j.tryLoc<=this.prev&&g.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var D=j;break;}}var $=(D=D&&(F==="break"||F==="continue")&&D.tryLoc<=X&&X<=D.finallyLoc?null:D)?D.completion:{};return $.type=F,$.arg=X,D?(this.method="next",this.next=D.finallyLoc,B):this.complete($);},complete:function(F,X){if(F.type==="throw")throw F.arg;return F.type==="break"||F.type==="continue"?this.next=F.arg:F.type==="return"?(this.rval=this.arg=F.arg,this.method="return",this.next="end"):F.type==="normal"&&X&&(this.next=X),B;},finish:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X];if(Y.finallyLoc===F)return this.complete(Y.completion,Y.afterLoc),J(Y),B;}},catch:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y,j,D=this.tryEntries[X];if(D.tryLoc===F)return(Y=D.completion).type==="throw"&&(j=Y.arg,J(D)),j;}throw Error("illegal catch attempt");},delegateYield:function(F,X,Y){return this.delegate={iterator:Q(F),resultName:X,nextLoc:Y},this.method==="next"&&(this.arg=a),B;}},s;}function _(a){return function(s){if(Array.isArray(s))return h(s);}(a)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s);}(a)||x(a)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 45In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function E(a,s){return function(l){if(Array.isArray(l))return l;}(a)||function(l,g){var f=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(f!=null){var v,S,w,C,I=[],O=!0,M=!1;try{if(w=(f=f.call(l)).next,g===0){if(Object(f)!==f)return;O=!1;}else for(;!(O=(v=w.call(f)).done)&&(I.push(v.value),I.length!==g);O=!0);}catch(N){M=!0,S=N;}
45finally{try{if(!O&&f.return!=null&&(C=f.return(),Object(C)!==C))return;}finally{if(M)throw S;}}return I;}}(a,s)||x(a,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 46In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(a,s){if(a){if(typeof a=="string")return h(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?h(a,s):void 0;}}function h(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function y(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}var b=this&&this.__awaiter||function(a,s,l,g){return new(l=l||Promise)(function(f,v){function S(I){try{C(g.next(I));}catch(O){v(O);}}function w(I){try{C(g.throw(I));}catch(O){v(O);}}function C(I){var O;I.done?f(I.value):((O=I.value)instanceof l?O:new l(function(M){M(O);})).then(S,w);}C((g=g.apply(a,s||[])).next());});},p=(Object.defineProperty(r,"__esModule",{value:!0}),m(24)),c=m(70),d=m(5),m=function(){function a(f,v){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.options=v,this.scale=v.scale||1,this.id=f.id,this._studioId=f.studioId,this._shouldTag=!!v.tagElements||!1,this._componentTemplate=f,this.components=[],this._visualEffects=[],this._animationEffects=[],this._isLegacyComponent=!1,this._isRtlLayout=f.isRtlLayout,this._slideIndex=f.slideIndex,this.addEffects();}return s=a,(l=[{key:"addEffects",value:function(){var f,S=E(c.CorePreviewerUtils.generateCoreEffects(this._componentTemplate.effects,this.scale),2),v=S[0],S=S[1];(f=this._visualEffects).push.apply(f,_(v)),(f=this._animationEffects).push.apply(f,_(S));}},{key:"applyVisualEffects",value:function(f,v){return b(this,void 0,void 0,o().mark(function S(){return o().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,c.CorePreviewerUtils.applyVisualEffects(f,this._visualEffects,v);case 2:case"end":return w.stop();}},S,this);}));}},{key:"renderHtmlRecursively",value:function(){return b(this,void 0,void 0,o().mark(function f(){var v,S,w,C;return o().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:this.propagateAttributes(this.components),v=[],S=n(this.components);try{for(S.s();!(w=S.n()).done;){C=w.value;try{v.push(C.renderView(this.element));}catch(O){d.default.debug("[".concat(this.constructor.name||"","]: Could not render recursive component, exception: ").concat(O.message));}}}catch(O){S.e(O);}finally{S.f();}return I.next=6,Promise.all(v);case 6:case"end":return I.stop();}},f,this);}));}},{key:"renderView",value:function(f){return b(this,void 0,void 0,o().mark(function v(){return o().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,this.renderHtml(f);case 2:return S.next=4,this.renderHtmlRecursively();case 4:this.handleAttributeInheritance();case 5:case"end":return S.stop();}},v,this);}));}},{key:"handleAttributeInheritance",value:function(){var f,v=!1;this.attributes.width==="inherit-child"&&(f=Math.max.apply(Math,_(this.components.map(function(S){return S.element.offsetWidth;}))),this.attributes.setWidth(f),v=!0),this.attributes.height==="inherit-child"&&(f=Math.max.apply(Math,_(this.components.map(function(S){return S.element.offsetHeight;}))),this.attributes.setHeight(f),this.element.style.height=this.attributes.height,v=!0),v&&this.applyStyle(this.element);}},{key:"handlePropAtts",value:function(f){var v,S;0<this.attributes.maxWidthVal&&0<f.attributes.maxWidthVal&&(v=this.attributes.maxWidthVal,S=f.attributes.maxWidthVal,v=Math.min(v,S),f.attributes.setMaxWidth(v)),0<this.attributes.maxHeightVal&&0<f.attributes.maxHeightVal&&(S=this.attributes.maxHeightVal,v=f.attributes.maxHeightVal,S=Math.min(S,v),f.attributes.setMaxHeight(S)),0<this.attributes.minWidthVal&&0<f.attributes.minWidthVal&&(v=this.attributes.minWidthVal,S=f.attributes.minWidthVal,v=Math.max(v,S),f.attributes.setMinWidth(v)),0<this.attributes.minHeightVal&&0<f.attributes.minHeightVal&&(S=this.attributes.minHeightVal,v=f.attributes.minHeightVal,S=Math.max(S,v),f.attributes.setMinHeight(S));}},{key:"propagateAttributes",value:function(f){var v,S=n(f);try{for(S.s();!(v=S.n()).done;){var w=v.value;this.handlePropAtts(w);}}catch(C){S.e(C);}finally{S.f();}}},{key:"applyStyle",value:function(f){if(f.style.position="absolute",f.style.visibility="hidden",this.attributes.zIndex&&(f.style.zIndex="".concat(this.attributes.zIndex)),f.style.width=this.attributes.width,f.style.height=this.attributes.height,f.style.backfaceVisibility="hidden",this.attributes.shadow&&(f.style.boxShadow=this.attributes.shadow),this.attributes.borderRadius&&(f.style.borderRadius=this.attributes.borderRadius),this.attributes.cssStyleDeclarations){var v,S=n(this.attributes.cssStyleDeclarations);try{for(S.s();!(v=S.n()).done;){var w=v.value,C=Object.keys(w)[0],I=d.default.scaleWithFormat(w[C],this.scale,C);f.style[C]=I;}}catch(ue){S.e(ue);}finally{S.f();}}if(0<this.attributes.maxWidthVal&&(f.style.maxWidth=this.attributes.maxWidth),0<this.attributes.maxHeightVal&&(f.style.maxHeight=this.attributes.maxHeight),0<this.attributes.minWidthVal&&(f.style.minWidth=this.attributes.minWidth),0<this.attributes.minHeightVal&&(f.style.minHeight=this.attributes.minHeight),this._isLegacyComponent){var O=f.style,M=this.attributes;switch(M.xGravity){case p.XGravity.UNSET:break;case p.XGravity.LEFT:O.left=M.x;break;case p.XGravity.CENTER:var N=M.widthVal,G=(N!==-1&&N!==0||(N=f.clientWidth),M.xVal);O.left=G-N/2+"px";break;case p.XGravity.RIGHT:O.right=M.x;}switch(M.yGravity){case p.YGravity.UNSET:break;case p.YGravity.TOP:O.top=M.y;break;case p.YGravity.MIDDLE:var H=M.heightVal,B=(H===0&&(H=f.clientHeight),M.yVal);O.top=B-H/2+"px";break;case p.YGravity.BOTTOM:O.bottom=M.y;}}else{var z=f.style,te=this.attributes,K="0",V="0";switch(z.removeProperty("top"),z.removeProperty("right"),z.removeProperty("left"),z.removeProperty("bottom"),te.xGravity){case p.XGravity.UNSET:break;case p.XGravity.LEFT:K="0",z.left=te.x;break;case p.XGravity.CENTER:K="-50%",z.left="calc(50% + ".concat(te.x,")");break;case p.XGravity.RIGHT:K="0",z.right=te.x;}switch(te.yGravity){case p.YGravity.UNSET:break;case p.YGravity.TOP:z.top=te.y;break;case p.YGravity.MIDDLE:V="-50%",z.top="calc(50% + ".concat(te.y,")");break;case p.YGravity.BOTTOM:V="0",z.bottom=te.y;}var U,Z=z.transform,re=Z.indexOf("translate");0<=re?(U=Z.indexOf(")",re),z.transform=Z.slice(0,re)+"translate3d(".concat(K,", ").concat(V,", 0)")+Z.slice(U+1),z.transform=z.transform.trim()):z.transform="".concat(Z," translate3d(").concat(K,", ").concat(V,", 0)").trim();}this.attributes.scale&&(0<=(U=(re=f.style.transform).indexOf("scale"))?(Z=re.indexOf(")",U),f.style.transform=re.slice(0,U)+"scale(".concat(this.attributes.scale,")")+re.slice(Z+1),f.style.transform=f.style.transform.trim()):f.style.transform="".concat(re," scale(").concat(this.attributes.scale,")").trim());}},{key:"tagElementWithTemplateID",value:function(){this.element&&this.element.setAttribute("templateIdentifier",this.componentTemplate.alphabeticalId||"");}},{key:"clear",value:function(){}},{key:"buildVDOM",value:function(){var f;return delete(f=this.baseVDom).id,delete f._componentTemplate,delete f.options,delete f._slideIndex,f;}},{key:"vDom",get:function(){return this.baseVDom;}},{key:"width",get:function(){return this.attributes.widthVal;}
46,set:function(f){this.attributes.setWidth(f);}},{key:"height",get:function(){return this.attributes.heightVal;},set:function(f){this.attributes.setHeight(f);}},{key:"getElement",value:function(){return this.element;}},{key:"setElement",value:function(f){f&&(this.element=f);}},{key:"innerComponents",value:function(){return this.components;}},{key:"getAttributeValue",value:function(f){return this.attributes.getAttributeValue(f);}},{key:"applyBinds",value:function(f){for(var v=this,S=function(ue,q,J){return ue!=="+"&&ue!=="-"||J.includes("%")||(J=d.default.scaleWithFormat(J,v.scale)),d.default.aluCalc(ue,q,J);},w=!1,C=[],I=0;I<f.length;I++){var O=f[I],M=O.dst.split(".");if(O.value!==void 0&&M.length===3&&M[0]===this.alphabeticalId&&M[1]==="attributes"){for(var N=O.value,G=(O.calc&&Array.isArray(O.calc)&&O.calc.length===2&&(N=S(O.calc[0],N,O.calc[1].toString())),this.attributes.setAttributeValue(M[2],N,!0,C.includes(O.dst))),H=I+1;H<f.length;H++)f[H].value!==void 0&&f[H].src===O.dst&&f[H].value!==N&&(f[H].value=G);C.push(O.dst),w=!0;}}w&&this.applyStyle(this.element),C.length=0;var B,z=n(f);try{for(z.s();!(B=z.n()).done;){var te,K,V,U,Z=B.value,re=Z.dst.split(".");Z.value!==void 0&&re.length===3&&re[0]===this.alphabeticalId&&re[1]==="style"&&((te=re[2])in this.element.style?(U=Z.value,Z.calc&&Array.isArray(Z.calc)&&Z.calc.length===2&&(U=S(Z.calc[0],U,Z.calc[1].toString())),C.includes(Z.dst)&&(V=(K=this.element.style[te].match(/[a-zA-Z%]+$/))?K[0]:"",U=parseFloat(U)+parseFloat(this.element.style[te])+V),this.element.style[te]=U,C.push(Z.dst)):d.default.error("Bind error: ".concat(te," style key does not exist in element style")));}}
46catch(ue){z.e(ue);}finally{z.f();}}},{key:"shouldTag",get:function(){return this._shouldTag;}},{key:"componentTemplate",get:function(){return this._componentTemplate;}},{key:"visualEffects",get:function(){return this._visualEffects;},set:function(f){this._visualEffects=f;}},{key:"animationEffects",get:function(){return this._animationEffects;},set:function(f){this._animationEffects=f;}},{key:"alphabeticalId",get:function(){return this._componentTemplate.alphabeticalId;}},{key:"isLegacyComponent",set:function(f){this._isLegacyComponent=f;}},{key:"studioId",get:function(){return this._studioId;}},{key:"isStudioEditable",get:function(){return!0;}},{key:"urlId",get:function(){}}])&&y(s.prototype,l),g&&y(s,g),Object.defineProperty(s,"prototype",{writable:!1}),s;var s,l,g;}();r.default=m;},function(i,r,e){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){return function(a){if(Array.isArray(a))return a;}(d)||function(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var g,f,v,S,w=[],C=!0,I=!1;try{if(v=(l=l.call(a)).next,s===0){if(Object(l)!==l)return;C=!1;}else for(;!(C=(g=v.call(l)).done)&&(w.push(g.value),w.length!==s);C=!0);}catch(O){I=!0,f=O;}finally{try{if(!C&&l.return!=null&&(S=l.return(),Object(S)!==S))return;}finally{if(I)throw f;}}return w;}}(d,m)||function(a,s){if(a){if(typeof a=="string")return o(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?o(a,s):void 0;}}(d,m)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 47In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function _(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}Object.defineProperty(r,"__esModule",{value:!0});var E=e(250),x=e(272),h=e(253),y=e(254),b=e(108),p=e(12),c=function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");}return m=d,s=[{key:"didSlideHasMainView",value:function(l){return l.mainViewChanges!==void 0;}},{key:"didMainViewChange",value:function(l,g){var f=l.mainViewChanges;return!(!this.didSlideHasMainView(l)||!f.getByTime(g))&&0<f.getByT
47ime(g).length;}},{key:"didFrontViewExists",value:function(l,g){return l.frontViewExist!==void 0;}},{key:"didFrontViewChange",value:function(l,g){var f=l.frontViewChanges;return!(!this.didFrontViewExists(l,g)||!f.getByTime(g))&&0<f.getByTime(g).length;}},{key:"hasFrontView",value:function(l,g){var f=this.isFrontViewComp(l,g);return function(v){return v.Components.reduce(function(S,w){return S||f(w);},!1);};}},{key:"isFrontViewComp",value:function(l,g){var f=this.isMainViewComp(l,g),v=!1;return function(S){return!!v||(v=f(S),!1);};}},{key:"isVidOrImage",value:function(l){return l instanceof E.default||l instanceof x.default;}},{key:"isMainImageComponent",value:function(l){return l instanceof E.default&&l.componentTemplate.alphabeticalId&&(l.componentTemplate.alphabeticalId==="mainMedia"||l.componentTemplate.alphabeticalId==="image-foreground");}},{key:"isMainVideoComponent",value:function(l){return l instanceof x.default&&l.componentTemplate.alphabeticalId&&(l.componentTemplate.alphabeticalId==="mainMedia"||l.componentTemplate.alphabeticalId==="video-foreground");}},{key:"isMainVidOrImage",value:function(l){return this.isMainImageComponent(l)||this.isMainVideoComponent(l);}},{key:"isMainViewComp",value:function(l,g){var f=this;return function(v){return f.isMainVideoComponent(v)&&v&&(0,b.isMediaSource)(v)&&(v.MediaURL()===l||v.MediaURL===g);};}},{key:"getAllContainedPlayers",value:function(l,g,f){var v=Array.from(g.entries()).reduce(function(S,C){var C=n(C,2),I=C[0];return C[1].contains(l)?S.concat([I]):S;},[]);return p.MediaPlayerCache.getInstance(f).players.filter(function(S){return v.includes(S.src);});}}],(a=null)&&_(m.prototype,a),s&&_(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();(r.default=c).exist=function(d,m){return d.reduce(function(a,s){return a||m(s);},!1);},c.hasImageOrVidComps=function(d){return c.exist(d.Components,c.isVidOrImage);},c.hasMainView=function(d,m){return function(a){return c.exist(a.Components,c.isMainViewComp(d,m));};},c.hasMultipleVideoComps=function(d){return 1<d.Layers.reduce(function(m,a){return m+a.Components.reduce(function(s,l){return l instanceof x.default?s+1:s;},0);},0);},c.hasBackgroundRemovalEffect=function(d){return d.Layers.some(function(m){return m.Components.some(function(a){return Array.isArray(a.visualEffects)&&a.visualEffects.some(function(s){return((s=s?.adaptingEffect)==null?void 0:s.type)==="backgroundRemoval";});});});},c.isTransitiveEffect=function(d){return d instanceof h.FadeEffect||d instanceof y.TranslateEffect;};},function(i,r,p){"use strict";function t(f,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,function(C){return C=function(I,O){if(n(I)!="object"||!I)return I;var M=I[Symbol.toPrimitive];if(M===void 0)return(O==="string"?String:Number)(I);if(M=M.call(I,O||"default"),n(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.");}(C,"string"),n(C)=="symbol"?C:C+"";}(w.key),w);}}function n(f){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v;}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v;})(f);}function o(f,v){return function(S){if(Array.isArray(S))return S;}(f)||function(S,w){var C=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(C!=null){var I,O,M,N,G=[],H=!0,B=!1;try{if(M=(C=C.call(S)).next,w===0){if(Object(C)!==C)return;H=!1;}else for(;!(H=(I=M.call(C)).done)&&(G.push(I.value),G.length!==w);H=!0);}catch(z){B=!0,O=z;}finally{try{if(!H&&C.return!=null&&(N=C.return(),Object(N)!==N))return;}finally{if(B)throw O;}}return G;}}(f,v)||x(f,v)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 48In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(f,v){var S,w=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!w){if(Array.isArray(f)||(w=x(f))||v&&f&&typeof f.length=="number")return w&&(f=w),S=0,{s:v=function(){},n:function(){return S>=f.length?{done:!0}:{done:!1,value:f[S++]};},e:function(M){throw M;},f:v};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 49In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var C,I=!0,O=!1;return{s:function(){w=w.call(f);},n:function(){var M=w.next();return I=M.done,M;},e:function(M){O=!0,C=M;},f:function(){try{I||w.return==null||w.return();}finally{if(O)throw C;}}};}function E(f){return function(v){if(Array.isArray(v))return h(v);}(f)||function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v);}(f)||x(f)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 50In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(f,v){if(f){if(typeof f=="string")return h(f,v);var S={}.toString.call(f).slice(8,-1);return(S=S==="Object"&&f.constructor?f.constructor.name:S)==="Map"||S==="Set"?Array.from(f):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?h(f,v):void 0;}}function h(f,v){(v==null||v>f.length)&&(v=f.length);for(var S=0,w=Array(v);S<v;S++)w[S]=f[S];return w;}
50Object.defineProperty(r,"__esModule",{value:!0}),r.ResourceManager=r.isAccessArray=r.isAccessObject=r.isAccessString=r.isValueDefinition=r.isManipulatorArgument=r.isAccessManipulator=r.isAccessResource=r.ManipulatorTypeNames=r.ManipulatorsObjects=void 0;var y=p(5),p=p(116),b=(r.ManipulatorsObjects=[Array.prototype,String.prototype,Number.prototype,Math,p.CustomManipulators],r.ManipulatorTypeNames=["array","string","number","math","custom"],new Map(function(){for(var f=arguments.length,v=new Array(f),S=0;S<f;S++)v[S]=arguments[S];var w=Math.min.apply(Math,E(v.map(function(C){return C.length;})));return Array.from({length:w},function(C,I){return v.map(function(O){return O[I];});});}(r.ManipulatorTypeNames,r.ManipulatorsObjects)));r.isAccessResource=function(f){return s(f)||l(f)||g(f)||d(f);};var p=function(){var f,v=[],S=_(r.ManipulatorsObjects);try{for(S.s();!(f=S.n()).done;){var w=function(C){var I,O=[],M=_(Object.getOwnPropertyNames(C));try{for(M.s();!(I=M.n()).done;){var N=I.value;typeof C[N]=="function"&&O.push(N);}}catch(G){M.e(G);}finally{M.f();}return O;}(f.value);v.push.apply(v,E(w));}}catch(C){S.e(C);}finally{S.f();}return v=v.filter(function(C){return!["constructor","length"].includes(C);});}(),c=new Set(p);function d(f){var v=y.default.cloneDeep(f),v=(v.hasOwnProperty("type")&&delete v.type,Array.from(Object.entries(v))),S=v.reduce(function(w,O){var O=o(O,2),I=O[0],O=O[1];return w&&c.has(I)&&Array.isArray(O)&&O.reduce(function(M,N){return M&&m(N);},!0);},!0);return n(f)==="object"&&0<v.length&&S;}function m(f){return f===null||["number","boolean","number","bigint"].includes(n(f))||s(f)||d(f)||g(f)||a(f);}function a(f){return n(f)==="object"&&"val"in f;}function s(f){return typeof f=="string";}function l(f){return n(f)==="object"&&"res"in f&&(s(f.res)||d(f.res)||g(f.res));}function g(f){return!!Array.isArray(f)&&f.reduce(function(v,S){return v&&(s(S)||d(S)||g(S));},!0);}r.isAccessManipulator=d,r.isManipulatorArgument=m,r.isValueDefinition=a,r.isAccessString=s,r.isAccessObject=l,r.isAccessArray=g,p=function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");}return v=f,w=[{key:"deepGet",value:function(C,I){var O=void 0;try{s(I)?O=f.accessStringHandler(C,I):l(I)?O=f.accessObjectHandler(C,I):d(I)?O=f.accessManipulatorHandler(C,I):g(I)&&(O=f.accessArrayHandler(C,I));}catch(M){y.default.warn(M),O=void 0;}return O;}},{key:"accessObjectHandler",value:function(C,I){return this.deepGet(C,I.res);}},{key:"accessStringHandler",value:function(C,I){var O=I.split("/"),M=C;try{var N,G=_(O);try{for(G.s();!(N=G.n()).done;){var H,B,z=N.value,te=z.split("-");M=2<=te.length&&Array.isArray(M[te[0]])&&Number.isInteger(Number(te[1]))?(H=te[0],0<=(B=Number(te[1]))&&B<M[H].length?M[H][B]:void y.default.warn("[".concat(this.constructor.name,"]: Index ").concat(B," out of range: ").concat(JSON.stringify(M[H])))):z in M?M[z]:void y.default.warn("[".concat(this.constructor.name,"]: Resource not found: Key Error ").concat(z," not in ").concat(JSON.stringify(M)));}}catch(K){G.e(K);}finally{G.f();}}catch(K){y.default.warn("[".concat(this.constructor.name,"]: Resource access string ").concat(I,` is wrong, follow-up error: 51 `).concat(K.message)),M=void 0;}return M;}},{key:"accessManipulatorHandler",value:function(C,I){var O=this,M=I.type,H=y.default.cloneDeep(I);delete H.type;var N,H=o(Array.from(Object.entries(H)).shift(),2),G=H[0],H=H[1];if(!Array.isArray(H))throw new Error("[".concat(this.constructor.name,"] Arguments defined in ").concat(JSON.stringify(I)," are not array."));if(N=H.map(function(V){var U;return a(V)?V.val:d(V)||s(V)||g(V)||l(V)?((U=O.deepGet(C,V))===void 0&&y.default.warn("[".concat(O.constructor.name,"]: Undefined detected while evaluating arguments of manipulator: ").concat(JSON.stringify(I))),U):V;}),M){if(b.has(M))return H=b.get(M),["custom","math"].includes(M)?H[G].apply(H,E(N)):(H=H[G]).call.apply(H,E(N));throw new Error("[".concat(this.constructor.name,"]: Could not find type ").concat(M," among ").concat(JSON.stringify(r.ManipulatorTypeNames)));}var B,z=_(r.ManipulatorsObjects);try{for(z.s();!(B=z.n()).done;){var te,K=B.value;if(typeof K[G]=="function")return(te=K[G]).call.apply(te,E(N));}}
51catch(V){z.e(V);}finally{z.f();}throw new Error("[".concat(this.constructor.name,"] Fallback sequentially execution of manipulator handler didn't find the function ").concat(G));}},{key:"accessArrayHandler",value:function(C,I){var O,M=C,N=_(I);try{for(N.s();!(O=N.n()).done;)var G=O.value,M=this.deepGet(M,G);}catch(H){N.e(H);}finally{N.f();}return M===C?void 0:M;}}],(S=null)&&t(v.prototype,S),w&&t(v,w),Object.defineProperty(v,"prototype",{writable:!1}),v;var v,S,w;}(),r.ResourceManager=p;},function(i,r,E){var t=E(120),n=E(121),o=E(122),_=E(123),E=E(124);function x(h){var y=-1,b=h==null?0:h.length;for(this.clear();++y<b;){var p=h[y];this.set(p[0],p[1]);}}x.prototype.clear=t,x.prototype.delete=n,x.prototype.get=o,x.prototype.has=_,x.prototype.set=E,i.exports=x;},function(i,r,e){var t=e(75);i.exports=function(n,o){for(var _=n.length;_--;)if(t(n[_][0],o))return _;return-1;};},function(i,r,e){var t=e(52),n=e(131),o=e(132),_=t?t.toStringTag:void 0;i.exports=function(E){return E==null?E===void 0?"[object Undefined]":"[object Null]":(_&&_ in Object(E)?n:o)(E);};},function(i,r,e){e=e(16)(Object,"create"),i.exports=e;},function(i,r,e){var t=e(145);i.exports=function(n,o){return n=n.__data__,t(o)?n[typeof o=="string"?"string":"hash"]:n.map;};},function(i,r,e){var t=e(79),n=e(80);i.exports=function(o,_,E,x){for(var h=!E,y=(E=E||{},-1),b=_.length;++y<b;){var p=_[y],c=x?x(E[p],o[p],p,E,o):void 0;c===void 0&&(c=o[p]),(h?n:t)(E,p,c);}return E;};},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseTransitor=r.SLIDE_TRANSITION=void 0,(o=r.SLIDE_TRANSITION||(r.SLIDE_TRANSITION={}))[o.NoTransition=0]="NoTransition",o[o.Top2Bottom=1]="Top2Bottom",o[o.Bottom2Top=2]="Bottom2Top",o[o.Left2Right=3]="Left2Right",o[o.Right2Left=4]="Right2Left",o[o.FadeIn=5]="FadeIn";var o=function(){function _(y,b,p){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this._transitionDuration=.5,this.transition=y,this.aspectRatio=p,this.slideDuration=b,this.ease=["ease","out"];}return E=_,(x=[{key:"translateFromEffect",value:function(y,b,p,c){return{type:"translate",attributes:{offsetTime:c,duration:p,fromVal:b,axis:y,ease:4<arguments.length&&arguments[4]!==void 0?arguments[4]:this.ease}};}},{key:"translateToEffect",value:function(y,b,p,c){return{type:"translate",attributes:{offsetTime:c,duration:p,toVal:b,axis:y,ease:4<arguments.length&&arguments[4]!==void 0?arguments[4]:this.ease}};}},{key:"fadeEffect",value:function(y,b,p,c){return{type:"fade",attributes:{offsetTime:c,duration:p,fromVal:y,toVal:b}};}},{key:"transitionDuration",get:function(){return this._transitionDuration;}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();(r.BaseTransitor=o).topRef=["*",["relative-h","-100%"],1.5],o.bottomRef=["*",["relative-h","100%"],1.5],o.leftRef=["*",["relative-w","-100%"],1.5],o.rightRef=["*",["relative-w","100%"],1.5];},function(i,r){function e(t,n){return i.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,_){return o.__proto__=_,o;},i.exports.__esModule=!0,i.exports.default=i.exports,e(t,n);}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,e){"use strict";function t(_,E){return(E=E===void 0?Object:E)&&typeof E.freeze=="function"?E.freeze(_):_;}var n=t({HTML:"text/html",isHTML:function(_){return _===n.HTML;},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(_){return _===o.HTML;},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});r.assign=function(_,E){if(_===null||typeof _!="object")throw new TypeError("target is not an object");for(var x in E)Object.prototype.hasOwnProperty.call(E,x)&&(_[x]=E[x]);return _;},r.find=function(_,E,x){if(x===void 0&&(x=Array.prototype),_&&typeof x.find=="function")return x.find.call(_,E);for(var h=0;h<_.length;h++)if(Object.prototype.hasOwnProperty.call(_,h)){var y=_[h];if(E.call(void 0,y,h,_))return y;}},r.freeze=t,r.MIME_TYPE=n,r.NAMESPACE=o;},function(i,r,e){"use strict";(function(t){e.d(r,"a",function(){return E;});var n=e(0),o=e.n(n),_=function(x){return o.a.atob?o.a.atob(x):t.from(x,"base64").toString("binary");};function E(x){for(var h=_(x),y=new Uint8Array(h.length),b=0;b<h.length;
51b++)y[b]=h.charCodeAt(b);return y;}}).call(this,e(236).Buffer);},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(){n=function(){return b;};var y,b={},p=Object.prototype,c=p.hasOwnProperty,d=Object.defineProperty||function(re,ue,q){re[ue]=q.value;},G=typeof Symbol=="function"?Symbol:{},m=G.iterator||"@@iterator",a=G.asyncIterator||"@@asyncIterator",s=G.toStringTag||"@@toStringTag";function l(re,ue,q){return Object.defineProperty(re,ue,{value:q,enumerable:!0,configurable:!0,writable:!0}),re[ue];}try{l({},"");}catch{l=function(ue,q,J){return ue[q]=J;};}function g(re,Y,q,j){var oe,Q,F,X,Y=Y&&Y.prototype instanceof O?Y:O,Y=Object.create(Y.prototype),j=new U(j||[]);return d(Y,"_invoke",{value:(oe=re,Q=q,F=j,X=v,function(D,$){if(X===w)throw Error("Generator is already running");if(X===C){if(D==="throw")throw $;return{value:y,done:!0};}for(F.method=D,F.arg=$;;){var ne=F.delegate;if(ne&&(ne=function le(se,fe){var ge=fe.method,he=se.iterator[ge];return he===y?(fe.delegate=null,ge==="throw"&&se.iterator.return&&(fe.method="return",fe.arg=y,le(se,fe),fe.method==="throw")||ge!=="return"&&(fe.method="throw",fe.arg=new TypeError("The iterator does not provide a '"+ge+"' method")),I):(ge=f(he,se.iterator,fe.arg),ge.type==="throw"?(fe.method="throw",fe.arg=ge.arg,fe.delegate=null,I):(he=ge.arg,he?he.done?(fe[se.resultName]=he.value,fe.next=se.nextLoc,fe.method!=="return"&&(fe.method="next",fe.arg=y),fe.delegate=null,I):he:(fe.method="throw",fe.arg=new TypeError("iterator result is not an object"),fe.delegate=null,I)));}(ne,F),ne)){if(ne===I)continue;return ne;}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(X===v)throw X=C,F.arg;F.dispatchException(F.arg);}else F.method==="return"&&F.abrupt("return",F.arg);if(X=w,ne=f(oe,Q,F),ne.type==="normal"){if(X=F.done?C:S,ne.arg===I)continue;return{value:ne.arg,done:F.done};}ne.type==="throw"&&(X=C,F.method="throw",F.arg=ne.arg);}})}),Y;}function f(re,ue,q){try{return{type:"normal",arg:re.call(ue,q)};}catch(J){return{type:"throw",arg:J};}}b.wrap=g;var v="suspendedStart",S="suspendedYield",w="executing",C="completed",I={};function O(){}function M(){}function N(){}var G={},H=(l(G,m,function(){return this;}),Object.getPrototypeOf),H=H&&H(H(Z([]))),B=(H&&H!==p&&c.call(H,m)&&(G=H),N.prototype=O.prototype=Object.create(G));function z(re){["next","throw","return"].forEach(function(ue){l(re,ue,function(q){return this._invoke(ue,q);});});}function te(re,ue){var q;d(this,"_invoke",{value:function(J,oe){function Q(){return new ue(function(F,X){(function Y(se,D,$,ne){var le,se=f(re[se],re,D);if(se.type!=="throw")return(D=(le=se.arg).value)&&t(D)=="object"&&c.call(D,"__await")?ue.resolve(D.__await).then(function(fe){Y("next",fe,$,ne);},function(fe){Y("throw",fe,$,ne);}):ue.resolve(D).then(function(fe){le.value=fe,$(le);},function(fe){return Y("throw",fe,$,ne);});ne(se.arg);})(J,oe,F,X);});}return q=q?q.then(Q,Q):Q();}});}function K(re){var ue={tryLoc:re[0]};1 in re&&(ue.catchLoc=re[1]),2 in re&&(ue.finallyLoc=re[2],ue.afterLoc=re[3]),this.tryEntries.push(ue);}function V(re){var ue=re.completion||{};ue.type="normal",delete ue.arg,re.completion=ue;}function U(re){this.tryEntries=[{tryLoc:"root"}],re.forEach(K,this),this.reset(!0);}function Z(re){if(re||re===""){var ue,q=re[m];if(q)return q.call(re);if(typeof re.next=="function")return re;if(!isNaN(re.length))return ue=-1,(q=function J(){for(;++ue<re.length;)if(c.call(re,ue))return J.value=re[ue],J.done=!1,J;return J.value=y,J.done=!0,J;}).next=q;}throw new TypeError(t(re)+" is not iterable");}return d(B,"constructor",{value:M.prototype=N,configurable:!0}),d(N,"constructor",{value:M,configurable:!0}),M.displayName=l(N,s,"GeneratorFunction"),b.isGeneratorFunction=function(re){return re=typeof re=="function"&&re.constructor,!!re&&(re===M||(re.displayName||re.name)==="GeneratorFunction");},b.mark=function(re){return Object.setPrototypeOf?Object.setPrototypeOf(re,N):(re.__proto__=N,l(re,s,"GeneratorFunction")),re.prototype=Object.create(B),re;},b.awrap=function(re){return{__await:re};},z(te.prototype),l(te.prototype,a,function(){return this;}),b.AsyncIterator=te,b.async=function(re,ue,q,J,oe){oe===void 0&&(oe=Promise);var Q=new te(g(re,ue,q,J),oe);return b.isGeneratorFunction(ue)?Q:Q.next().then(function(F){return F.done?F.value:Q.next();});},z(B),l(B,s,"Generator"),l(B,m,function(){return this;}),l(B,"toString",function(){return"[object Generator]";}),b.keys=function(re){var ue,q=Object(re),J=[];for(ue in q)J.push(ue);return J.reverse(),function oe(){for(;J.length;){var Q=J.pop();if(Q in q)return oe.value=Q,oe.done=!1,oe;}return oe.done=!0,oe;};},b.values=Z,U.prototype={constructor:U,reset:function(re){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEac
51h(V),!re)for(var ue in this)ue.charAt(0)==="t"&&c.call(this,ue)&&!isNaN(+ue.slice(1))&&(this[ue]=y);},stop:function(){this.done=!0;var re=this.tryEntries[0].completion;if(re.type==="throw")throw re.arg;return this.rval;},dispatchException:function(re){if(this.done)throw re;var ue=this;function q(Y,j){return Q.type="throw",Q.arg=re,ue.next=Y,j&&(ue.method="next",ue.arg=y),!!j;}for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J],Q=oe.completion;if(oe.tryLoc==="root")return q("end");if(oe.tryLoc<=this.prev){var F=c.call(oe,"catchLoc"),X=c.call(oe,"finallyLoc");if(F&&X){if(this.prev<oe.catchLoc)return q(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return q(oe.finallyLoc);}else if(F){if(this.prev<oe.catchLoc)return q(oe.catchLoc,!0);}else{if(!X)throw Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return q(oe.finallyLoc);}}}},abrupt:function(re,ue){for(var q=this.tryEntries.length-1;0<=q;--q){var J=this.tryEntries[q];if(J.tryLoc<=this.prev&&c.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var oe=J;break;}}var Q=(oe=oe&&(re==="break"||re==="continue")&&oe.tryLoc<=ue&&ue<=oe.finallyLoc?null:oe)?oe.completion:{};return Q.type=re,Q.arg=ue,oe?(this.method="next",this.next=oe.finallyLoc,I):this.complete(Q);},complete:function(re,ue){if(re.type==="throw")throw re.arg;return re.type==="break"||re.type==="continue"?this.next=re.arg:re.type==="return"?(this.rval=this.arg=re.arg,this.method="return",this.next="end"):re.type==="normal"&&ue&&(this.next=ue),I;},finish:function(re){for(var ue=this.tryEntries.length-1;0<=ue;--ue){var q=this.tryEntries[ue];if(q.finallyLoc===re)return this.complete(q.completion,q.afterLoc),V(q),I;}},catch:function(re){for(var ue=this.tryEntries.length-1;0<=ue;--ue){var q,J,oe=this.tryEntries[ue];if(oe.tryLoc===re)return(q=oe.completion).type==="throw"&&(J=q.arg,V(oe)),J;}throw Error("illegal catch attempt");},delegateYield:function(re,ue,q){return this.delegate={iterator:Z(re),resultName:ue,nextLoc:q},this.method==="next"&&(this.arg=y),I;}},b;}function o(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}var _=this&&this.__awaiter||function(y,b,p,c){return new(p=p||Promise)(function(d,m){function a(g){try{l(c.next(g));}catch(f){m(f);}}function s(g){try{l(c.throw(g));}catch(f){m(f);}}function l(g){var f;g.done?d(g.value):((f=g.value)instanceof p?f:new p(function(v){v(f);})).then(a,s);}l((c=c.apply(y,b||[])).next());});},E=(Object.defineProperty(r,"__esModule",{value:!0}),r.AudioContextSingleton=void 0,h(5)),x=h(12),h=function(){function y(){var d,m=this;if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");try{if(this.audioContext=new(window.AudioContext||window.webkitAudioContext)(),!this.audioContext)throw E.default.error("[".concat(this.constructor.name,"] Could not make object of AudioContext and use audio-processing graph")),new Error("[".concat(this.constructor.name,"] Could not make object of AudioContext and use audio-processing graph"));E.default.debug("[".concat(this.constructor.name,"] AudioContext state: ").concat(this.audioContext.state)),x.MediaPlayerCache.isSafari&&(d=function(a){m.audioContext&&m.audioContext.state!=="running"&&m.audioContext.resume(),window.removeEventListener("touchstart",d),window.removeEventListener("click",d);},window.addEventListener("touchstart",d),window.addEventListener("click",d));}catch(a){this.audioContext=void 0,E.default.error("[".concat(this.constructor.name,"] This browser doesn't support AudioContext: ").concat(a));}}return b=y,c=[{key:"getInstance",value:function(){var d;return(d=this._instance)!=null&&d.audioContext||(this._instance=new y()),this._instance;}}],(p=[{key:"getAudioContext",value:function(){return this.audioContext;}},{key:"connectAudioElementWithGain",value:function(d){if((d instanceof HTMLAudioElement||d instanceof HTMLVideoElement)&&this.audioContext)try{E.default.debug("[".concat(this.constructor.name,"] Constructing WebAudioAPI, currently state : ").concat(this.audioContext.state));var m=this.audioContext.createMediaElementSource(d),a=this.audioContext.createGain();return m.connect(a),a.connect(this.audioContext.destination),{source:m,gainNode:a};}catch(s){E.default.error("[".concat(this.constructor.name,"] Exception handled from constructing WebAudioAPI : ").concat(s));}else E.default.error("[".concat(this.constructor.name,"] Invalid operation: AudioContext is not initialized or using invalid audioElement."));}},{key:"disconnectGainNode",value:function(d,m){try{d&&d.disconnect(),m&&m.disconnect(),E.default.debug("[".concat(this.constructor.name,"] audio n
51odes are disconnected and closed"));}catch(a){E.default.error("[".concat(this.constructor.name,"] release of audio nodes exception : ").concat(a));}}},{key:"closeAudioContext",value:function(){return _(this,void 0,void 0,n().mark(function d(){return n().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(this.audioContext)return m.prev=1,m.next=4,this.audioContext.close();m.next=13;break;case 4:E.default.debug("[".concat(this.constructor.name,"] audio context closed")),m.next=10;break;case 7:m.prev=7,m.t0=m.catch(1),E.default.error("[".concat(this.constructor.name,"] release of audio context exception : ").concat(m.t0));case 10:return m.prev=10,this.audioContext=void 0,m.finish(10);case 13:case"end":return m.stop();}},d,this,[[1,7,10,13]]);}));}}])&&o(b.prototype,p),c&&o(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.AudioContextSingleton=h;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){var a,s=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!s){if(Array.isArray(d)||(s=function(v,S){if(v){if(typeof v=="string")return o(v,S);var w={}.toString.call(v).slice(8,-1);return(w=w==="Object"&&v.constructor?v.constructor.name:w)==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?o(v,S):void 0;}}(d))||m&&d&&typeof d.length=="number")return s&&(d=s),a=0,{s:m=function(){},n:function(){return a>=d.length?{done:!0}:{done:!1,value:d[a++]};},e:function(v){throw v;},f:m};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 52In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var l,g=!0,f=!1;return{s:function(){s=s.call(d);},n:function(){var v=s.next();return g=v.done,v;},e:function(v){f=!0,l=v;},f:function(){try{g||s.return==null||s.return();}finally{if(f)throw l;}}};}function o(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function _(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}Object.defineProperty(r,"__esModule",{value:!0});var E=c(289),x=c(5),h=c(32),y=c(47),b=c(105),p=c(271),c=function(){function d(l,g,f){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._render=g.render||!1,this.scale=g.scale||1,this.attributes=f,this.mediaURL=void 0,this._animationEffects=l.animationEffects,this._visualEffects=l.visualEffects,this._behavioralEffects=[],l instanceof h.default&&this.addEffects(l.componentTemplate.effects),this.transformEffects();}return m=d,(a=[{key:"transformEffects",value:function(){p.CorePreviewerEffectUtils.transformEffects(this.animationEffects,{startTime:this.startTime}),Array.isArray(this.animationEffects)&&0<this.animationEffects.length&&x.default.sortDescendingTimeOffset(this.animationEffects);}},{key:"addEffects",value:function(l){if(Array.isArray(l)){var g,f=n(l);try{for(f.s();!(g=f.n()).done;){var v=g.value,S=(v.attributes.startTime=this.startTime,v.attributes.scale=this.scale,E.EffectFactory.createEffect(v));S&&S.type===y.EffectType.BEHAVIORAL&&this._behavioralEffects.push(S);}}catch(w){f.e(w);}finally{f.f();}}}},{key:"behavioralEffects",get:function(){return this._behavioralEffects;}},{key:"animationEffects",get:function(){return this._animationEffects;}},{key:"visualEffects",get:function(){return this._visualEffects;}},{key:"getAllEffects",value:function(){var l=this.animationEffects||[],g=this.visualEffects||[],f=this.behavioralEffects||[];return l.concat.apply(l,[g,f]);}},{key:"renderTimeline",value:function(l,g,f,v){l.set(g,{visibility:"visible"},this.startTime).set(g,{visibility:"inherit"},this.endTime);var S,w=n(this._animationEffects);try{for(w.s();!(S=w.n()).done;)S.value.apply(g,l,this.startTime);}catch(C){w.e(C);}finally{w.f();}b.default.renderComponentsTimeline(f,l,v);}},{key:"startTime",get:function(){var l=0;return l=this.attributes&&this.attributes.startTime()?this.attributes.startTime():l;}},{key:"endTime",get:function(){var l=0;return l=this.attributes&&this.attributes.endTime()?this.attributes.endTime():l;}},{key:"clear",value:function(){}},{key:"render",get:function(){return this._render;}}])&&_(m.prototype,a),s&&_(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();r.default=c;},function(i,r,e){"use strict";
52Object.defineProperty(r,"__esModule",{value:!0}),r.EffectType=void 0,(r=r.EffectType||(r.EffectType={}))[r.VISUAL=0]="VISUAL",r[r.ANIMATION=1]="ANIMATION",r[r.BEHAVIORAL=2]="BEHAVIORAL",r[r.UNKNOWN=3]="UNKNOWN";},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=E(l);var s=d,l=_()?Reflect.construct(l,a||[],E(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function x(d,m){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0}),r.AnimationEffect=void 0;var h=c(104),y=c(71),b=c(47),p=c(5),c=function(d){function m(l){if(this instanceof m)return(l=o(this,m,[l,b.EffectType.ANIMATION]))._duration=l.attributes.duration,l._timeOffset=0,l.attributes.hasOwnProperty("offsetTime")&&(l._timeOffset=l.attributes.offsetTime),l.ease=y.default.byName("none"),l.attributes.hasOwnProperty("ease")&&(l.ease=l.attributes.ease),l._once=!!l.attributes.once,l._repeat=l.attributes.repeat,l._disableRegexTextAnnotations=!1,l;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&x(s,d),s=m,(d=[{key:"timeOffset",get:function(){return this._timeOffset;}},{key:"duration",get:function(){return this._duration;}},{key:"once",get:function(){return this._once;}},{key:"repeat",get:function(){return this._repeat;}},{key:"disableRegexTextAnnotations",get:function(){return this._disableRegexTextAnnotations;}},{key:"apply",value:function(l,g,f){this.timeline=g,this.element=l;var v=this.build(f);v?this.once?v.eventCallback("onComplete",function(){v.kill();}):0<=this.repeat&&(v=v.repeat(-1).repeatDelay(this.repeat)):p.default.warn("[".concat(this.constructor.name,"]: Building animation effect has failed - did not return Tween"));}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(h.BasicEffect);r.AnimationEffect=c;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function");}function o(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function _(c,d,m){return d&&o(c.prototype,d),m&&o(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;}
52Object.defineProperty(r,"__esModule",{value:!0}),r.GeneralAttributesBuilder=r.GeneralAttributes=void 0;var E=p(5),x=p(257),h=p(24),y=p(19),b=function(){return _(function c(d){n(this,c),this._width=d.width,this._height=d.height,this._fitContent=d.fitContent,this._yGravity=d.yGravity,this._xGravity=d.xGravity,this._x=d.x,this._y=d.y,this._zIndex=d.zIndex,this._shadow=d.shadow,this._borderRadius=d.borderRadius,this._cssStyleDeclarations=d.cssStyleDeclarations,this._maxWidth=d.maxWidth,this._maxHeight=d.maxHeight,this._minWidth=d.minWidth,this._minHeight=d.minHeight,this._scale=d.scale,this._vDom=this.buildVDOM();},[{key:"fitContent",get:function(){return this._fitContent;}},{key:"yGravity",get:function(){return this._yGravity;}},{key:"xGravity",get:function(){return this._xGravity;}},{key:"width",get:function(){return this._width.str();}},{key:"height",get:function(){return this._height.str();}},{key:"getAttributeValue",value:function(c){var d="_"+c;if(d in this)switch(this[d].constructor){case x.HtmlSizeAttrib:case x.HtmlPosAttrib:return this[d].str();case String:return this[d];case Number:return this[d].toString();}else E.default.error("error: ".concat(c," attribute does not exist"));}},{key:"setAttributeValue",value:function(c,d){var m,a=3<arguments.length?arguments[3]:void 0,s="_"+c,l=void 0;if(s in this)switch(this[s].constructor){case x.HtmlSizeAttrib:case x.HtmlPosAttrib:var g=this[s];g.updateAttrib(d,a),l=g.str();break;case String:a?(g=(g=this[s].match(/[a-zA-Z%]+$/))?g[0]:"",m=parseFloat(this[s]),this[s]=m+parseFloat(d)+g):this[s]=d,l=this[s];break;case Number:this[s]=a?this[s]+parseFloat(d):parseFloat(d),l=this[s].toString();}else E.default.error("error: ".concat(c," attribute does not exist"));return l;}},{key:"setWidth",value:function(c){this._width=new x.HtmlSizeAttrib(c);}},{key:"setHeight",value:function(c){this._height=new x.HtmlSizeAttrib(c);}},{key:"maxWidth",get:function(){return this._maxWidth.str();}},{key:"maxHeight",get:function(){return this._maxHeight.str();}},{key:"maxWidthVal",get:function(){return this._maxWidth.val();}},{key:"maxHeightVal",get:function(){return this._maxHeight.val();}},{key:"minWidth",get:function(){return this._minWidth.str();}},{key:"minWidthVal",get:function(){return this._minWidth.val();}},{key:"minHeightVal",get:function(){return this._minHeight.val();}},{key:"minHeight",get:function(){return this._minHeight.str();}},{key:"setMinWidth",value:function(c){this._minWidth=new x.HtmlSizeAttrib(c);}},{key:"setMinHeight",value:function(c){this._minHeight=new x.HtmlSizeAttrib(c);}},{key:"setMaxWidth",value:function(c){this._maxWidth=new x.HtmlSizeAttrib(c);}},{key:"setMaxHeight",value:function(c){this._maxHeight=new x.HtmlSizeAttrib(c);}},{key:"x",get:function(){return this._x.str();}},{key:"y",get:function(){return this._y.str();}},{key:"widthVal",get:function(){return this._width.val();}},{key:"heightVal",get:function(){return this._height.val();}},{key:"xVal",get:function(){return this._x.val();}},{key:"yVal",get:function(){return this._y.val();}},{key:"zIndex",get:function(){return this._zIndex;}},{key:"shadow",get:function(){return this._shadow;}},{key:"borderRadius",get:function(){return this._borderRadius;}},{key:"cssStyleDeclarations",get:function(){return this._cssStyleDeclarations;}},{key:"scale",get:function(){return this._scale;}},{key:"buildVDOM",value:function(){return E.default.surpass(y.VDOMConstructor.builder(this));}},{key:"vDom",get:function(){return this._vDom;}}]);}(),p=(r.GeneralAttributes=b,function(){return _(function c(d,m){n(this,c),this.scaleFactor=m||1,this._width=new x.HtmlSizeAttrib(d.width,this.scaleFactor),this._height=new x.HtmlSizeAttrib(d.height,this.scaleFactor),this._x=new x.HtmlPosAttrib(d.x,this.scaleFactor),this._y=new x.HtmlPosAttrib(d.y,this.scaleFactor),this._fitContent=d.fitContent||!1,this._yGravity=h.YGravity.TOP,this._xGravity=h.XGravity.LEFT,d.hasOwnProperty("yGravity")&&this.setYGravity(d.yGravity),d.hasOwnProperty("xGravity")&&this.setXGravity(d.xGravity),this._zIndex=d.zIndex?Number(d.zIndex):0,this._borderRadius=d.borderRadius?E.default.scaleWithFormat(d.borderRadius.toString(),this.scaleFactor):void 0,this._cssStyleDeclarations=d.cssStyleDeclarations||void 0,this._shadow=d.shadow||void 0,this._maxWidth=new x.HtmlSizeAttrib(d.maxWidth,this.scaleFactor),this._minWidth=new x.HtmlSizeAttrib(d.minWidth,this.scaleFactor),this._maxHeight=new x.HtmlSizeAttrib(d.maxHeight,this.scaleFactor),this._minHeight=new x.HtmlSizeAttrib(d.minHeight,this.scaleFactor),d.hasOwnProperty("scale")&&this.setScale(d.scale);},[{key:"fitContent",get:function(){return this._fitContent;}},{key:"setYGravity",value:function(c){return c!=="TOP"&&c!=="MIDDLE"&&c!=="BOTTOM"&&c!=="UNSET"||(this._yGravity=h.YGravity[c]),this;}},{key:"setXGravity",value:function(c){return c!=="LEFT"&&c!=="CENTER"&&c!=="RIGHT"&&c!=="UNSET"||(this._xGravity=h.XGravity[c]),this;}},{key:"yGravity",get:function(){return this._yGravity;}},{key:"xGravity",get:function(){return this._xGravity;}},{key:"width",get:function(){return this._width;}},{key:"height",get:function(){return this._height;}},{key:"x",get:function(){return this._x;}},{key:"y",get:function(){return this._y;}},{key:"zIndex",get:function(){return this._zIndex;}},{key:"shadow",get:function(){return this._shadow;}},{key:"borderRadius",get:function(){return this._borderRadius;}},{key:"cssStyleDeclarations",get:function(){return this._cssStyleDeclarations;}},{key:"maxWidth",get:function(){return this._maxWidth;},set:function(c){this._maxWidth=c;}},{key:"maxHeight",get:function(){return this._maxHeight;},set:function(c){this._maxHeight=c;}},{key:"minWidth",get:function(){return this._minWidth;},set:function(c){this._minWidth=c;}},{key:"minHeight",get:function(){return this._minHeight;},set:function(c){this._minHeight=c;}},{key:"setScale",value:function(c){this._scale=function(d){if(typeof d=="str
52ing"){var m=d.match(/\(([^)]+)\)/);if(m)return m[1];}return d;}(c);}},{key:"scale",get:function(){return this._scale;}},{key:"build",value:function(){return new b(this);}}]);}());r.GeneralAttributesBuilder=p;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(s){return h(s)||function(l){if(typeof Symbol<"u"&&l[Symbol.iterator]!=null||l["@@iterator"]!=null)return Array.from(l);}(s)||E(s)||_();}function o(s,l){return h(s)||function(g,f){var v=g==null?null:typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(v!=null){var S,w,C,I,O=[],M=!0,N=!1;try{if(C=(v=v.call(g)).next,f===0){if(Object(v)!==v)return;M=!1;}else for(;!(M=(S=C.call(v)).done)&&(O.push(S.value),O.length!==f);M=!0);}catch(G){N=!0,w=G;}finally{try{if(!M&&v.return!=null&&(I=v.return(),Object(I)!==I))return;}finally{if(N)throw w;}}return O;}}(s,l)||E(s,l)||_();}function _(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 53In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}function E(s,l){if(s){if(typeof s=="string")return x(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?x(s,l):void 0;}}function x(s,l){(l==null||l>s.length)&&(l=s.length);for(var g=0,f=Array(l);g<l;g++)f[g]=s[g];return f;}function h(s){if(Array.isArray(s))return s;}function y(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
53(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}Object.defineProperty(r,"__esModule",{value:!0}),r.ValueParser=r.isVDMValue=void 0;var b=a(71),p=a(26),c=a(21),d=a(5),m=a(17),a=(r.isVDMValue=function(s){return typeof s=="string"||typeof s=="number"||Array.isArray(s)&&s.reduce(function(l,g){return l&&typeof g=="string";})||(0,c.isParameterReference)(s);},function(){function s(v,S,w,C){var I=4<arguments.length&&arguments[4]!==void 0?arguments[4]:void 0,O=5<arguments.length?arguments[5]:void 0,M=this,N=s;if(!(M instanceof N))throw new TypeError("Cannot call a class as a function");this._width=S.width,this._height=S.height,this._maxWidth=S.maxWidth,this._maxHeight=S.maxHeight,this._minWidth=S.minWidth,this._minHeight=S.minHeight,this._startTime=w,this._endTime=C,this.duration=C-w,this._aspectRatio=new p.default(this._width/this._height),this._slideAspectRatio=v,this._paramLookUp=I,this.percentageRegExp=new RegExp(/\d+(\.\d+)?%/),this._globalAtts=O,this.setAxisSizes();}return l=s,(g=[{key:"getWidth",value:function(){return this._width;}},{key:"getHeight",value:function(){return this._height;}},{key:"paramLookUp",get:function(){return this._paramLookUp;},set:function(v){this._paramLookUp=v;}},{key:"slideAspectRatio",get:function(){return this._slideAspectRatio;}},{key:"globalAtts",get:function(){return this._globalAtts;}},{key:"setAxisSizes",value:function(){var v=s.BASE_SIZES[this._slideAspectRatio.toString()];this.axisSizes={x:{view:this._width,maxView:this._maxWidth,minView:this._minWidth,reference:v._width},y:{view:this._height,maxView:this._maxHeight,minView:this._minHeight,reference:v._height}};}},{key:"parseGlobal",value:function(v){if(this.hasOwnProperty(v))return this[v];}},{key:"parseRGBA",value:function(v){if(v&&v.length===4)return v=this.parseList(v),"rgba(".concat(v[0],",").concat(v[1],",").concat(v[2],",").concat(v[3],")");}},{key:"parseCss",value:function(C){var C=o(C,3),S=C[0],w=C[1],C=C[2];if(w==="x"||w==="y"){var I,S=String(this.parseBasic(S)).match(/^([+-]?(?:\d+\.|\d*\.?\d+))(px|%)?$/);if(S&&this.axisSizes[w][C])return I=Number(S[1]),S[2]==="%"?I/100*this.axisSizes[w][C]:I*this.axisSizes[w][C]/this.axisSizes[w].reference;}}},{key:"parseGlobalAttributes",value:function(v){if(d.default.debug("[".concat(this.constructor.name,"]: parsing global atts for key: ").concat(v," : ").concat(JSON.stringify(this._globalAtts))),this._globalAtts&&this._globalAtts.hasOwnProperty(v))return this._globalAtts[v];}},{key:"parseList",value:function(v){var S=this;return v.map(function(w){return S.parseVal(w);});}},{key:"parseEase",value:function(v){return b.default.byName(v);}},{key:"parseComplex",value:function(S){var S=n(S),w=S[0],C=S.slice(1);switch(w){case"list":return this.parseList(C);case"ease":return this.parseEase(C[0]);default:return;}}},{key:"parsePercentage",value:function(v){return parseFloat(v.match(this.percentageRegExp)[0]);}},{key:"parseMath",value:function(v,S){var w=this;if(!(S.length<2)){var C,I=!1;switch(S=(S=this.parseList(S)).map(function(O){return typeof O=="string"&&O.match(w.percentageRegExp)?(I=!0,w.parsePercentage(O)):O;}),v){case"+":C=S.reduce(function(O,M){return O+M;});break;case"-":C=S.reduce(function(O,M){return O-M;});break;case"*":C=S.reduce(function(O,M){return O*M;});break;case"/":if(S[1]===0)return;C=S.reduce(function(O,M){return O/M;});break;default:return;}if(C!==void 0)return I?Math.min(100,Math.max(0,C)).toFixed(3)+"%":C;}}},{key:"parseBasic",value:function(S){if((0,c.isParameterReference)(S)&&(S=(0,m.getRefVal)(this.paramLookUp,S,this._slideAspectRatio,this.constructor.name)),!Array.isArray(S))return S;var S=n(S),w=S[0],C=S.slice(1);switch(w){case"relative-w":return C.push.apply(C,["x","view"]),this.parseCss(C);case"relative-h":return C.push.apply(C,["y","view"]),this.parseCss(C);case"relative-max-w":return C.push.apply(C,["x","maxView"]),this.parseCss(C);case"relative-min-w":return C.push.apply(C,["x","minView"]),this.parseCss(C);case"relative-max-h":return C.push.apply(C,["y","maxView"]),this.parseCss(C);case"relative-min-h":return C.push.apply(C,["y","minView"]),this.parseCss(C);case"global":case"layer":return this.parseGlobal(C[0]);case"rgba":return this.parseRGBA(C);case"global-w":return this.parseGlobalAttributes("width");case"global-h":return this.parseGlobalAttributes("height");case"+":case"-":case"*":case"/":return this.parseMath(w,C);default:return;}}},{key:"parseVal",value:function(v){var S;return(0,c.isParameterReference)(v)&&(v=(0,m.getRefVal)(this.paramLookUp,v,this._slideAspectRatio,this.constructor.name)),Array.isArray(v)?(S=v[0],0<=s.BASIC_E.indexOf(S)?this.parseBasic(v):0<=s.COMPLEX_
53E.indexOf(S)?this.parseComplex(v):v):v;}},{key:"width",get:function(){return this._width;}},{key:"height",get:function(){return this._height;}},{key:"startTime",get:function(){return this._startTime;},set:function(v){this._startTime=v;}},{key:"endTime",get:function(){return this._endTime;},set:function(v){this._endTime=v;}}])&&y(l.prototype,g),f&&y(l,f),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,g,f;}());(r.ValueParser=a).BASE_SIZES={horizontal:{width:1920,height:1080},square:{width:1080,height:1080},vertical:{width:1080,height:1920}},a.BASIC_E=["+","-","/","*","relative-w","relative-h","relative-max-w","relative-max-h","relative-min-w","relative-min-h","global-w","global-h","global","layer","rgba"],a.COMPLEX_E=["list","ease"];},function(i,r,e){e=e(16)(e(14),"Map"),i.exports=e;},function(i,r,e){e=e(14).Symbol,i.exports=e;},function(i,r,e){var t=e(81),n=e(159),o=e(85);i.exports=function(_){return(o(_)?t:n)(_);};},function(i,r){var e=Array.isArray;i.exports=e;},function(i,r){i.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l;}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i;}}),e.webpackPolyfill=1),e;};},function(i,r){i.exports=function(e){return function(t){return e(t);};};},function(i,r,e){(function(t){var n=e(77),E=r&&!r.nodeType&&r,o=E&&typeof t=="object"&&t&&!t.nodeType&&t,_=o&&o.exports===E&&n.process,E=function(){try{var x=o&&o.require&&o.require("util").types;return x||_&&_.binding&&_.binding("util");}catch{}}();t.exports=E;}).call(this,e(55)(i));},function(i,r){var e=Object.prototype;i.exports=function(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||e);};},function(i,r,e){var t=e(81),n=e(162),o=e(85);i.exports=function(_){return o(_)?t(_,!0):n(_);};},function(i,r,n){var t=n(167),n=n(86),o=Object.prototype.propertyIsEnumerable,_=Object.getOwnPropertySymbols;i.exports=_?function(E){return E==null?[]:(E=Object(E),t(_(E),function(x){return o.call(E,x);}));}:n;},function(i,r,f){var t=f(171),n=f(51),o=f(172),_=f(173),E=f(174),x=f(37),h=f(78),y="[object Map]",b="[object Promise]",p="[object Set]",c="[object WeakMap]",d="[object DataView]",m=h(t),a=h(n),s=h(o),l=h(_),g=h(E),f=x;(t&&f(new t(new ArrayBuffer(1)))!=d||n&&f(new n())!=y||o&&f(o.resolve())!=b||_&&f(new _())!=p||E&&f(new E())!=c)&&(f=function(w){var S=x(w),w=S=="[object Object]"?w.constructor:void 0,w=w?h(w):"";if(w)switch(w){case m:return d;case a:return y;case s:return b;case l:return p;case g:return c;}return S;}),i.exports=f;},function(i,r,e){var t=e(177);i.exports=function(n){var o=new n.constructor(n.byteLength);return new t(o).set(new t(n)),o;};},function(i,r,y){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(t(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),t(m)=="symbol"?m:m+"";}(d.key),d);}}function o(b,m,c){m=E(m);var d=b,m=_()?Reflect.construct(m,c||[],E(b).constructor):m.apply(b,c);if(m&&(t(m)=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(b=d,b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b;}function _(){try{var b=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!b;})();}function E(b){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p);})(b);}
53function x(b,p){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=d,c;})(b,p);}Object.defineProperty(r,"__esModule",{value:!0});var h=y(41),y=function(b){function p(m,a,s){if(this instanceof p)return o(this,p,[m,a,s]);throw new TypeError("Cannot call a class as a function");}var c,d=p;if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");return d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),b&&x(d,b),d=p,(b=[{key:"getTransitionObj",value:function(){var m=0<arguments.length&&arguments[0]!==void 0?arguments[0]:1,a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;switch(this.transition){case h.SLIDE_TRANSITION.Top2Bottom:return this.translateFromEffect("y",h.BaseTransitor.topRef,m,a);case h.SLIDE_TRANSITION.Bottom2Top:return this.translateFromEffect("y",h.BaseTransitor.bottomRef,m,a);case h.SLIDE_TRANSITION.Left2Right:return this.translateFromEffect("x",h.BaseTransitor.leftRef,m,a);case h.SLIDE_TRANSITION.Right2Left:return this.translateFromEffect("x",h.BaseTransitor.rightRef,m,a);case h.SLIDE_TRANSITION.FadeIn:return this.fadeEffect(0,1,m,a);default:h.SLIDE_TRANSITION.NoTransition;return;}}}])&&n(d.prototype,b),c&&n(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d;}(h.BaseTransitor);r.default=y;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseZoom=void 0;var o=function(){function _(y){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.fromVal=y.fromVal,this.toVal=y.toVal,this.offsetTime=y.offsetTime,this.duration=y.duration,this.ease=typeof y.ease=="string"&&0<y.ease.length?y.ease:["ease","none"];}return E=_,(x=[{key:"getZoomObj",value:function(){return{type:"zoomPan",attributes:{offsetTime:this.offsetTime,duration:this.duration,fromVal:this.fromVal,toVal:this.toVal,ease:this.ease}};}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.BaseZoom=o;},function(i,r,e){var t=e(235),n=e(42);i.exports=function(o,_,E){if(t())return Reflect.construct.apply(null,arguments);(x=[null]).push.apply(x,_);var x=new(o.bind.apply(o,x))();return E&&n(x,E.prototype),x;},i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,e){"use strict";for(var t=e(0),n=e(11),o=e(230),_=(b.httpHandler=e(231),function(c){var d={};return c&&c.trim().split(` 54`).forEach(function(l){var a=l.indexOf(":"),s=l.slice(0,a).trim().toLowerCase(),l=l.slice(a+1).trim();d[s]===void 0?d[s]=l:Array.isArray(d[s])?d[s].push(l):d[s]=[d[s],l];}),d;}
54),E=(i.exports=b,(i.exports.default=b).XMLHttpRequest=t.XMLHttpRequest||function(){},b.XDomainRequest=("withCredentials"in new b.XMLHttpRequest())?b.XMLHttpRequest:t.XDomainRequest,["get","put","post","patch","head","delete"]),x=function(c){b[c==="delete"?"del":c]=function(d,m,a){return(m=y(d,m,a)).method=c.toUpperCase(),p(m);};},h=0;h<E.length;h++)x(E[h]);function y(c,d,m){var a=c;return o(d)?(m=d,typeof c=="string"&&(a={uri:c})):a=n({},d,{uri:c}),a.callback=m,a;}function b(c,d,m){return p(d=y(c,d,m));}function p(c){if(c.callback===void 0)throw new Error("callback argument missing");var d=!1,m=function(H,B,z){d||(d=!0,c.callback(H,B,z));};function a(){var H=void 0,H=S.response||S.responseText||function(B){try{if(B.responseType==="document")return B.responseXML;var z=B.responseXML&&B.responseXML.documentElement.nodeName==="parsererror";if(B.responseType===""&&!z)return B.responseXML;}catch{}return null;}(S);if(N)try{H=JSON.parse(H);}catch{}return H;}function s(H){return clearTimeout(v),(H=H instanceof Error?H:new Error(""+(H||"Unknown XMLHttpRequest Error"))).statusCode=0,m(H,G);}function l(){var H,B,z;if(!f)return clearTimeout(v),H=c.useXDR&&S.status===void 0?200:S.status===1223?204:S.status,B=G,z=null,H!==0?(B={body:a(),statusCode:H,method:C,headers:{},url:w,rawRequest:S},S.getAllResponseHeaders&&(B.headers=_(S.getAllResponseHeaders()))):z=new Error("Internal XMLHttpRequest Error"),m(z,B,B.body);}var g,f,v,S=c.xhr||null,w=(S=S||new(c.cors||c.useXDR?b.XDomainRequest:b.XMLHttpRequest)()).url=c.uri||c.url,C=S.method=c.method||"GET",I=c.body||c.data,O=S.headers=c.headers||{},M=!!c.sync,N=!1,G={body:void 0,headers:{},statusCode:0,method:C,url:w,rawRequest:S};if("json"in c&&c.json!==!1&&(N=!0,O.accept||O.Accept||(O.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(O["content-type"]||O["Content-Type"]||(O["Content-Type"]="application/json"),I=JSON.stringify(c.json===!0?I:c.json))),S.onreadystatechange=function(){S.readyState===4&&setTimeout(l,0);},S.onload=l,S.onerror=s,S.onprogress=function(){},S.onabort=function(){f=!0;},S.ontimeout=s,S.open(C,w,!M,c.username,c.password),M||(S.withCredentials=!!c.withCredentials),!M&&0<c.timeout&&(v=setTimeout(function(){var H;f||(f=!0,S.abort("timeout"),(H=new Error("XMLHttpRequest timeout")).code="ETIMEDOUT",s(H));},c.timeout)),S.setRequestHeader)for(g in O)O.hasOwnProperty(g)&&S.setRequestHeader(g,O[g]);else if(c.headers&&!function(H){for(var B in H)if(H.hasOwnProperty(B))return;return 1;}(c.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in c&&(S.responseType=c.responseType),"beforeSend"in c&&typeof c.beforeSend=="function"&&c.beforeSend(S),S.send(I||null),S;}},function(n,r,e){var t=e(0),n=n.exports={WebVTT:e(232),VTTCue:e(233),VTTRegion:e(234)},o=(t.vttjs=n,t.WebVTT=n.WebVTT,n.VTTCue),_=n.VTTRegion,E=t.VTTCue,x=t.VTTRegion;n.shim=function(){t.VTTCue=o,t.VTTRegion=_;},n.restore=function(){t.VTTCue=E,t.VTTRegion=x;},t.VTTCue||n.shim();},function(i,r,e){var t,n,o,_,E;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,E={buildAbsoluteURL:function(c,h,y){if(y=y||{},c=c.trim(),!(h=h.trim())){if(!y.alwaysNormalize)return c;var b=E.parseURL(c);if(b)return b.path=E.normalizePath(b.path),E.buildURLFromParts(b);throw new Error("Error trying to parse base URL.");}if(b=E.parseURL(h),!b)throw new Error("Error trying to parse relative URL.");if(b.scheme)return y.alwaysNormalize?(b.path=E.normalizePath(b.path),E.buildURLFromParts(b)):h;if(h=E.parseURL(c),!h)throw new Error("Error trying to parse base URL.");!h.netLoc&&h.path&&h.path[0]!=="/"&&(c=n.exec(h.path),h.netLoc=c[1],h.path=c[2]),h.netLoc&&!h.path&&(h.path="/");var p,c={scheme:h.scheme,netLoc:b.netLoc,path:null,params:b.params,query:b.query,fragment:b.fragment};return b.netLoc||(c.netLoc=h.netLoc,b.path[0]!=="/"&&(b.path?(p=(p=h.path).substring(0,p.lastIndexOf("/")+1)+b.path,c.path=E.normalizePath(p)):(c.path=h.path,b.params||(c.params=h.params,b.query||(c.query=h.query
54))))),c.path===null&&(c.path=y.alwaysNormalize?E.normalizePath(b.path):b.path),E.buildURLFromParts(c);},parseURL:function(x){return x=t.exec(x),x?{scheme:x[1]||"",netLoc:x[2]||"",path:x[3]||"",params:x[4]||"",query:x[5]||"",fragment:x[6]||""}:null;},normalizePath:function(x){for(x=x.split("").reverse().join("").replace(o,"");x.length!==(x=x.replace(_,"")).length;);return x.split("").reverse().join("");},buildURLFromParts:function(x){return x.scheme+x.netLoc+x.path+x.params+x.query+x.fragment;}},i.exports=E;},function(i,r,e){"use strict";e.d(r,"a",function(){return o;});var t=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,n=/^application\/dash\+xml/i,o=function(_){return t.test(_)?"hls":n.test(_)?"dash":_==="application/vnd.videojs.vhs+json"?"vhs-json":null;};},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(){n=function(){return c;};var p,c={},d=Object.prototype,m=d.hasOwnProperty,a=Object.defineProperty||function(q,J,oe){q[J]=oe.value;},B=typeof Symbol=="function"?Symbol:{},s=B.iterator||"@@iterator",l=B.asyncIterator||"@@asyncIterator",g=B.toStringTag||"@@toStringTag";function f(q,J,oe){return Object.defineProperty(q,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}),q[J];}try{f({},"");}catch{f=function(J,oe,Q){return J[oe]=Q;};}function v(q,D,oe,$){var F,X,Y,j,D=D&&D.prototype instanceof N?D:N,D=Object.create(D.prototype),$=new re($||[]);return a(D,"_invoke",{value:(F=q,X=oe,Y=$,j=w,function(ne,le){if(j===I)throw Error("Generator is already running");if(j===O){if(ne==="throw")throw le;return{value:p,done:!0};}for(Y.method=ne,Y.arg=le;;){var se=Y.delegate;if(se&&(se=function fe(ge,he){var _e=he.method,Re=ge.iterator[_e];return Re===p?(he.delegate=null,_e==="throw"&&ge.iterator.return&&(he.method="return",he.arg=p,fe(ge,he),he.method==="throw")||_e!=="return"&&(he.method="throw",he.arg=new TypeError("The iterator does not provide a '"+_e+"' method")),M):(_e=S(Re,ge.iterator,he.arg),_e.type==="throw"?(he.method="throw",he.arg=_e.arg,he.delegate=null,M):(Re=_e.arg,Re?Re.done?(he[ge.resultName]=Re.value,he.next=ge.nextLoc,he.method!=="return"&&(he.method="next",he.arg=p),he.delegate=null,M):Re:(he.method="throw",he.arg=new TypeError("iterator result is not an object"),he.delegate=null,M)));}(se,Y),se)){if(se===M)continue;return se;}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(j===w)throw j=O,Y.arg;Y.dispatchException(Y.arg);}else Y.method==="return"&&Y.abrupt("return",Y.arg);if(j=I,se=S(F,X,Y),se.type==="normal"){if(j=Y.done?O:C,se.arg===M)continue;return{value:se.arg,done:Y.done};}se.type==="throw"&&(j=O,Y.method="throw",Y.arg=se.arg);}})}),D;}function S(q,J,oe){try{return{type:"normal",arg:q.call(J,oe)};}catch(Q){return{type:"throw",arg:Q};}}c.wrap=v;var w="suspendedStart",C="suspendedYield",I="executing",O="completed",M={};function N(){}function G(){}function H(){}var B={},z=(f(B,s,function(){return this;}),Object.getPrototypeOf),z=z&&z(z(ue([]))),te=(z&&z!==d&&m.call(z,s)&&(B=z),H.prototype=N.prototype=Object.create(B));function K(q){["next","throw","return"].forEach(function(J){f(q,J,function(oe){return this._invoke(J,oe);});});}function V(q,J){var oe;a(this,"_invoke",{value:function(Q,F){function X(){return new J(function(Y,j){(function D(ge,ne,le,se){var fe,ge=S(q[ge],q,ne);if(ge.type!=="throw")return(ne=(fe=ge.arg).value)&&t(ne)=="object"&&m.call(ne,"__await")?J.resolve(ne.__await).then(function(he){D("next",he,le,se);},function(he){D("throw",he,le,se);}):J.resolve(ne).then(function(he){fe.value=he,le(fe);},function(he){return D("throw",he,le,se);});se(ge.arg);})(Q,F,Y,j);});}return oe=oe?oe.then(X,X):X();}});}function U(q){var J={tryLoc:q[0]};1 in q&&(J.catchLoc=q[1]),2 in q&&(J.finallyLoc=q[2],J.afterLoc=q[3]),this.tryEntries.push(J);}function Z(q){var J=q.completion||{};J.type="normal",delete J.arg,q.completion=J;}function re(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(U,this),this.reset(!0);}function ue(q){if(q||q===""){var J,oe=q[s];if(oe)return oe.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length))return J=-1,(oe=function Q(){for(;++J<q.length;)if(m.call(q,J))return Q.value=q[J],Q.done=!1,Q;return Q.value=p,Q.done=!0,Q;}).next=oe;}throw new TypeError(t(q)+" is not iterable");}return a(te,"constructor",{value:G.prototype=H,configurable:!0}),a(H,"constructor",{value:G,configurable:!0}
54),G.displayName=f(H,g,"GeneratorFunction"),c.isGeneratorFunction=function(q){return q=typeof q=="function"&&q.constructor,!!q&&(q===G||(q.displayName||q.name)==="GeneratorFunction");},c.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,H):(q.__proto__=H,f(q,g,"GeneratorFunction")),q.prototype=Object.create(te),q;},c.awrap=function(q){return{__await:q};},K(V.prototype),f(V.prototype,l,function(){return this;}),c.AsyncIterator=V,c.async=function(q,J,oe,Q,F){F===void 0&&(F=Promise);var X=new V(v(q,J,oe,Q),F);return c.isGeneratorFunction(J)?X:X.next().then(function(Y){return Y.done?Y.value:X.next();});},K(te),f(te,g,"Generator"),f(te,s,function(){return this;}),f(te,"toString",function(){return"[object Generator]";}),c.keys=function(q){var J,oe=Object(q),Q=[];for(J in oe)Q.push(J);return Q.reverse(),function F(){for(;Q.length;){var X=Q.pop();if(X in oe)return F.value=X,F.done=!1,F;}return F.done=!0,F;};},c.values=ue,re.prototype={constructor:re,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,this.tryEntries.forEach(Z),!q)for(var J in this)J.charAt(0)==="t"&&m.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=p);},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval;},dispatchException:function(q){if(this.done)throw q;var J=this;function oe(D,$){return X.type="throw",X.arg=q,J.next=D,$&&(J.method="next",J.arg=p),!!$;}for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q],X=F.completion;if(F.tryLoc==="root")return oe("end");if(F.tryLoc<=this.prev){var Y=m.call(F,"catchLoc"),j=m.call(F,"finallyLoc");if(Y&&j){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}else if(Y){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);}else{if(!j)throw Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}}}},abrupt:function(q,J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.tryLoc<=this.prev&&m.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var F=Q;break;}}var X=(F=F&&(q==="break"||q==="continue")&&F.tryLoc<=J&&J<=F.finallyLoc?null:F)?F.completion:{};return X.type=q,X.arg=J,F?(this.method="next",this.next=F.finallyLoc,M):this.complete(X);},complete:function(q,J){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&J&&(this.next=J),M;},finish:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J];if(oe.finallyLoc===q)return this.complete(oe.completion,oe.afterLoc),Z(oe),M;}},catch:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe,Q,F=this.tryEntries[J];if(F.tryLoc===q)return(oe=F.completion).type==="throw"&&(Q=oe.arg,Z(F)),Q;}throw Error("illegal catch attempt");},delegateYield:function(q,J,oe){return this.delegate={iterator:ue(q),resultName:J,nextLoc:oe},this.method==="next"&&(this.arg=p),M;}},c;}function o(p,c){var d,m=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!m){if(Array.isArray(p)||(m=function(g,f){if(g){if(typeof g=="string")return _(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?_(g,f):void 0;}}(p))||c&&p&&typeof p.length=="number")return m&&(p=m),d=0,{s:c=function(){},n:function(){return d>=p.length?{done:!0}:{done:!1,value:p[d++]};},e:function(g){throw g;},f:c};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 55In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a,s=!0,l=!1;return{s:function(){m=m.call(p);},n:function(){var g=m.next();return s=g.done,g;},e:function(g){l=!0,a=g;},f:function(){try{s||m.return==null||m.return();}finally{if(l)throw a;}}};}function _(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function E(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}var x=this&&this.__awaiter||function(p,c,d,m){return new(d=d||Promise)(function(a,s){function l(v){try{f(m.next(v));}catch(S){s(S);}}function g(v){try{f(m.throw(v));}catch(S){s(S);}}function f(v){var S;
55v.done?a(v.value):((S=v.value)instanceof d?S:new d(function(w){w(S);})).then(l,g);}f((m=m.apply(p,c||[])).next());});},h=(Object.defineProperty(r,"__esModule",{value:!0}),r.CorePreviewerUtils=void 0,b(291)),y=b(47),b=function(){function p(){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");}return c=p,m=[{key:"applyVisualEffects",value:function(a,s,l){return x(this,void 0,void 0,n().mark(function g(){var f,v;return n().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(s&&Array.isArray(s)){S.next=2;break;}return S.abrupt("return");case 2:f=o(s),S.prev=3,f.s();case 5:if((v=f.n()).done){S.next=11;break;}return v=v.value,S.next=9,v.apply(a,l);case 9:S.next=5;break;case 11:S.next=16;break;case 13:S.prev=13,S.t0=S.catch(3),f.e(S.t0);case 16:return S.prev=16,f.f(),S.finish(16);case 19:case"end":return S.stop();}},g,null,[[3,13,16,19]]);}));}},{key:"generateCoreEffects",value:function(a,s){var l,g=[],f=[],v=!1,S=!1,w=0,C=o(a);try{for(C.s();!(l=C.n()).done;){var I=l.value,O=(I.guid="".concat(w,"x"),I.type!=="transform"?I.attributes.scale=s:I.attributes.previewerScale=s,h.CoreEffectFactory.createEffect(I));O&&(O.type!==y.EffectType.VISUAL||S?O.type!==y.EffectType.ANIMATION||v||(O.standalone?(f=[O],v=!0):f.push(O)):O.standalone?(g=[O],S=!0):g.push(O)),w++;}}catch(M){C.e(M);}finally{C.f();}return p.disableAnimationEffects&&(f=f.filter(function(M){return M.preserveInStudio;})),[g=p.disableVisualEffects?[]:g,f];}}],(d=null)&&E(c.prototype,d),m&&E(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}();(r.CorePreviewerUtils=b).disableAnimationEffects=!1,b.disableVisualEffects=!1;},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0});var o=_(281),_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"byName",value:function(b){switch(b){case"in":return o.Power2.easeIn;case"out":return o.Power2.easeOut;case"inOut":return o.Power2.easeInOut;case"bounceIn":return o.Bounce.easeIn;case"bounceOut":return o.Bounce.easeOut;case"backIn":return o.Back.easeIn;case"backOut":return o.Back.easeOut;default:return o.Power0.easeNone;}}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();r.default=_;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){return function(m){if(Array.isArray(m))return m;}(c)||function(m,a){var s=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(s!=null){var l,g,f,v,S=[],w=!0,C=!1;try{if(f=(s=s.call(m)).next,a===0){if(Object(s)!==s)return;w=!1;}else for(;!(w=(l=f.call(s)).done)&&(S.push(l.value),S.length!==a);w=!0);}catch(I){C=!0,g=I;}finally{try{if(!w&&s.return!=null&&(v=s.return(),Object(v)!==v))return;}finally{if(C)throw g;}}return S;}}(c,d)||_(c,d)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 56In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(c,d){var m,a=typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(!a){if(Array.isArray(c)||(a=_(c))||d&&c&&typeof c.length=="number")return a&&(c=a),m=0,{s:d=function(){},n:function(){return m>=c.length?{done:!0}:{done:!1,value:c[m++]};},e:function(f){throw f;},f:d};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 57In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var s,l=!0,g=!1;return{s:function(){a=a.call(c);},n:function(){var f=a.next();return l=f.done,f;},e:function(f){g=!0,s=f;},f:function(){try{l||a.return==null||a.return();}finally{if(g)throw s;}}};}function _(c,d){if(c){if(typeof c=="string")return E(c,d);var m={}.toString.call(c).slice(8,-1);
57return(m=m==="Object"&&c.constructor?c.constructor.name:m)==="Map"||m==="Set"?Array.from(c):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?E(c,d):void 0;}}function E(c,d){(d==null||d>c.length)&&(d=c.length);for(var m=0,a=Array(d);m<d;m++)a[m]=c[m];return a;}function x(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}Object.defineProperty(r,"__esModule",{value:!0}),r.MediaPipeSegmenterProvider=void 0;var h=p(5),y=p(306),b=p(12),p=function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.renderCanvasPool=new Map(),this.preservedBboxes=new Map(),this.float32ArrayFallbackWarned=!1,this.segmentForVideoWarned=!1,this.gpuDownscaleLogged=!1,this.segmenterUnavailableWarned=!1,this._lastError=void 0,this.errorCallback=void 0;}return d=c,a=[{key:"getPersonScale",value:function(){return .8;}},{key:"getInstance",value:function(){return c.instance=c.instance?c.instance:new c();}}],(m=[{key:"setErrorCallback",value:function(s){this.errorCallback=s;}},{key:"getLastError",value:function(){return this._lastError;}},{key:"clearLastError",value:function(){this._lastError=void 0;}},{key:"reportError",value:function(s,l){if(this._lastError={type:s,message:l,timestamp:Date.now()},this.errorCallback)try{this.errorCallback(this._lastError);}catch(g){console.warn("Background removal error callback threw:",g);}}},{key:"getSegmenter",value:function(){var s;return window.mediapipeSegmenter||(this.segmenterUnavailableWarned||(s="Segmenter not initialized. Backgroun
57d removal disabled, falling back to normal video rendering.",console.warn(s),this.reportError("SEGMENTER_UNAVAILABLE",s),this.segmenterUnavailableWarned=!0),null);}},{key:"isInitialized",value:function(){return!!window.mediapipeSegmenter;}},{key:"segmentForVideo",value:function(s){var l=this.getSegmenter();if(!l)return null;var g=Math.round(performance.now());try{var f=l.segmentForVideo(s,g);if(f==null||!f.confidenceMasks||f.confidenceMasks.length<1)return h.default.error("Segmentation failed: No confidence masks returned"),null;var v,S=f.confidenceMasks.length===1,w=f.confidenceMasks[0],C=S?f.confidenceMasks[0]:f.confidenceMasks[1],I=(this.segmentForVideoWarned||(h.default.debug("using getAsFloat32Array() which involves GPU\u2192CPU copy."),this.segmentForVideoWarned=!0),w.getAsFloat32Array());if(S){for(var O=new Float32Array(I.length),M=0;M<I.length;M++)O[M]=1-I[M];I=O,v=new Float32Array(I.length).fill(0);}else v=C.getAsFloat32Array();return{backgroundMask:I,hairMask:v,width:w.width,height:w.height};}catch(N){return l=N instanceof Error?N.message:String(N),h.default.error("Segmentation failed: ".concat(l)),null;}}},{key:"getBgRemoval",value:function(s,l,g){var f,v,S,w,C,I=this,O=(this.renderCanvasPool.has(s)||((f=document.createElement("canvas")).width=l.videoWidth||640,f.height=l.videoHeight||360,l=null,0<y.SEGMENTATION_INPUT_SIZE&&((v=new y.GPUVideoDownscaler(y.SEGMENTATION_INPUT_SIZE,y.SEGMENTATION_INPUT_SIZE)).isReady()?l=v:v.dispose()),this.renderCanvasPool.set(s,{sharedCanvas:f,renderer:null,mediapipeGL:null,useGPUTextures:!b.MediaPlayerCache.isSafari,downscaler:l,targetCtx:null,lastTargetCanvas:null,cachedPersonBbox:null,personBboxCalculated:!1,bboxSamples:[],bboxFramesSinceFirstSample:0,inversionBuffer:null,emptyHairMaskBuffer:null,lastPersonRenderedRect:null,personTransform:null,personBoundingBox:g||null,lastMaskWidth:0,lastMaskHeight:0,committedPersonBbox:null}),(v=this.preservedBboxes.get(s))&&((f=this.renderCanvasPool.get(s)).cachedPersonBbox=v,f.personBboxCalculated=!0,f.lastMaskWidth=y.SEGMENTATION_INPUT_SIZE||256,f.lastMaskHeight=y.SEGMENTATION_INPUT_SIZE||256,f.committedPersonBbox=this.reverseNormalizePersonBbox(v,y.SEGMENTATION_INPUT_SIZE||256,y.SEGMENTATION_INPUT_SIZE||256),this.preservedBboxes.delete(s),h.default.debug("[MediaPipeSegmenterProvider] Restored preserved bbox for ".concat(s))),l?h.default.debug("[MediaPipeSegmenterProvider] Created context with GPU downscaler (".concat(y.SEGMENTATION_INPUT_SIZE,"x").concat(y.SEGMENTATION_INPUT_SIZE,") for ").concat(s)):h.default.debug("[MediaPipeSegmenterProvider] Created context for ".concat(s," (downscaling disabled or unavailable)"))),this.renderCanvasPool.get(s));return g&&!O.personBoundingBox&&(O.personBoundingBox=g),O.personBoundingBox&&!O.personBboxCalculated&&(f=y.SEGMENTATION_INPUT_SIZE||256,v=y.SEGMENTATION_INPUT_SIZE||256,l=Math.floor(O.personBoundingBox.x*f),g=Math.floor(O.personBoundingBox.y*v),w=Math.ceil((O.personBoundingBox.x+O.personBoundingBox.width)*f),C=Math.ceil((O.personBoundingBox.y+O.personBoundingBox.height)*v),S=Math.round(.15*v),l=Math.max(0,l-2),g=Math.max(0,g-S),w=Math.min(f-1,w+2),C=Math.min(v-1,C+2),O.cachedPersonBbox={minX:l,minY:g,maxX:w,maxY:C},O.personBboxCalculated=!0,O.lastMaskWidth=f,O.lastMaskHeight=v,h.default.debug("[MediaPipeSegmenterProvider] Using pre-computed personBoundingBox for ".concat(s))),{render:function(M,N){var G=2<arguments.length&&arguments[2]!==void 0&&arguments[2],H=I.getSegmenter();if(!H)return!1;var B=Math.round(performance.now());try{var z,te,K=M,V=(!O.downscaler||(bi=O.downscaler.downscale(M))&&(K=bi,I.gpuDownscaleLogged||(z=O.downscaler.getDimensions(),h.default.debug("[MediaPipeSegmenterProvider] GPU downscaling: ".concat(M.videoWidth,"x").concat(M.videoHeight," \u2192 ").concat(z.width,"x").concat(z.height)),I.gpuDownscaleLogged=!0)),H.segmentForVideo(K,B));if(V==null||!V.confidenceMasks||V.confidenceMasks.length<1)te="No confidence masks returned from segmenter",h.default.error("Segmentation failed: ".concat(te)),I.reportError("SEGMENTATION_FAILED",te);else{var U=V.confidenceMasks.length===1,Z=V.confidenceMasks[0],re=U?V.confidenceMasks[0]:V.confidenceMasks[1],ue=Z.width,q=Z.height;if(O.lastMaskWidth=ue,O.lastMaskHeight=q,O.sharedCanvas.width===M.videoWidth&&O.sharedCanvas.height===M.videoHeight||(O.sharedCanvas.width=M.videoWidth,O.sharedCanvas.height=M.videoHeight),O.useGPUTextures)try{if
57(!O.mediapipeGL){if(O.mediapipeGL=Z.getGL(),!O.mediapipeGL)throw new Error("MediaPipe GL context not available");var J=O.mediapipeGL.canvas;if(!J)throw new Error("MediaPipe GL canvas not available");if(O.sharedCanvas=J,O.renderer=new y.WebGLMaskRenderer(O.sharedCanvas,O.mediapipeGL),!O.renderer.isReady())throw new Error("Failed to create renderer with MediaPipe GL");var oe=J instanceof OffscreenCanvas?"OffscreenCanvas":"HTMLCanvasElement";h.default.debug("[MediaPipeSegmenterProvider] GPU texture pipeline initialized (".concat(oe,") for ").concat(s));}if(O.renderer&&O.mediapipeGL){O.sharedCanvas.width===M.videoWidth&&O.sharedCanvas.height===M.videoHeight||(O.sharedCanvas.width=M.videoWidth,O.sharedCanvas.height=M.videoHeight);var Q=Z.getAsWebGLTexture(),F=re.getAsWebGLTexture();if(O.renderer.renderFromR32FTextures(M,Q,F,ue,q,U),I.shouldRecalculateBbox(O)){var X=Z.getAsFloat32Array();if(U){for(var Y=new Float32Array(X.length),j=0;j<X.length;j++)Y[j]=1-X[j];X=Y;}I.accumulateBboxSample(O,X,ue,q,s);}var D,$,ne,le,se,fe,ge,he,_e,Re,ee=I.getCachedContext(O,N);return ee&&O.cachedPersonBbox&&(D=O.sharedCanvas.width,$=O.sharedCanvas.height,ne=N.width,le=N.height,se=I.scaleBoundingBox(O.cachedPersonBbox,ue,q,D,$),ge=(fe=I.computePersonDrawRect(se,ne,le,G,O.personTransform)).drawX,he=fe.drawY,_e=fe.drawW,Re=fe.drawH,ee.clearRect(0,0,ne,le),ee.drawImage(O.sharedCanvas,se.x,se.y,se.w,se.h,ge,he,_e,Re),O.lastPersonRenderedRect={x:ge,y:he,width:_e,height:Re}),!0;}}catch(Ge){var W=Ge instanceof Error?Ge.message:String(Ge),ae="GPU texture path unavailable, using Float32Array fallback: ".concat(W);h.default.debug(ae),I.reportError("GPU_FALLBACK",ae),O.useGPUTextures=!1,O.mediapipeGL=null,O.renderer&&(O.renderer.dispose(),O.renderer=null),O.sharedCanvas=document.createElement("canvas"),O.sharedCanvas.width=M.videoWidth||640,O.sharedCanvas.height=M.videoHeight||360,O.renderer=new y.WebGLMaskRenderer(O.sharedCanvas);}if(O.renderer||(h.default.debug("[MediaPipeSegmenterProvider] Creating fallback renderer for ".concat(s)),O.renderer=new y.WebGLMaskRenderer(O.sharedCanvas),h.default.debug("[MediaPipeSegmenterProvider] Fallback renderer created, isReady: ".concat(O.renderer.isReady()))),O.renderer&&O.renderer.isReady()){I.float32ArrayFallbackWarned||(h.default.debug("Using Float32Array fallback path. GPU texture path failed or unavailable."),I.float32ArrayFallbackWarned=!0),O.sharedCanvas.width===M.videoWidth&&O.sharedCanvas.height===M.videoHeight||(O.sharedCanvas.width=M.videoWidth,O.sharedCanvas.height=M.videoHeight);var de,ye=Z.getAsFloat32Array();if(U){O.inversionBuffer&&O.inversionBuffer.length===ye.length||(O.inversionBuffer=new Float32Array(ye.length));for(var Se=0;Se<ye.length;Se++)O.inversionBuffer[Se]=1-ye[Se];ye=O.inversionBuffer,O.emptyHairMaskBuffer&&O.emptyHairMaskBuffer.length===ye.length||(O.emptyHairMaskBuffer=new Float32Array(ye.length)),de=O.emptyHairMaskBuffer;}else de=re.getAsFloat32Array();O.renderer.render(M,ye,de,ue,q),I.shouldRecalculateBbox(O)&&I.accumulateBboxSample(O,ye,ue,q,s);var De,Ue,Be,nt,it,ot,ht,Et,At,Nt,Ut=I.getCachedContext(O,N);return Ut&&O.cachedPersonBbox&&(De=O.sharedCanvas.width,Ue=O.sharedCanvas.height,Be=N.width,nt=N.height,it=I.scaleBoundingBox(O.cachedPersonBbox,ue,q,De,Ue),ht=(ot=I.computePersonDrawRect(it,Be,nt,G,O.personTransform)).drawX,Et=ot.drawY,At=ot.drawW,Nt=ot.drawH,Ut.clearRect(0,0,Be,nt),Ut.drawImage(O.sharedCanvas,it.x,it.y,it.w,it.h,ht,Et,At,Nt),O.lastPersonRenderedRect={x:ht,y:Et,width:At,height:Nt}),!0;}}return!1;}catch(Ge){var bi=Ge instanceof Error?Ge.message:String(Ge);return h.default.error("Render failed: ".concat(bi)),I.reportError("RENDER_FAILED",bi),!1;}},resetCache:function(){O.renderer&&O.renderer.clearPreviousMask(),h.default.debug("[MediaPipeSegmenterProvider] Reset cache for ".concat(s));}};}},{key:"getCachedContext",value:function(s,l){return s.lastTargetCanvas!==l&&(s.targetCtx=l.getContext("2d"),s.lastTargetCanvas=l),s.targetCtx;}},{key:"findPersonBoundingBox",value:function(s,l,g){for(var f=l,v=g,S=0,w=0,C=!1,I=0;I<g;I++)for(var O=0;O<l;O++)s[I*l+O]<.5&&(C=!0,O<f&&(f=O),S<O&&(S=O),I<v&&(v=I),w<I&&(w=I));if(!C)return null;var M=Math.round(.15*g);return{minX:f=Math.max(0,f-2),minY:v=Math.max(0,v-M),maxX:S=Math.min(l-1,S+2),maxY:w=Math.min(g-1,w+2)};}},{key:"scaleBoundingBox",value:function(s,l,g,f,v){return f/=l,l=v/g,{x:Math.floor(s.minX*f),y:Math.floor(s.minY*l),w:Math.ceil((s.maxX-s.minX+1)*f),h:Math.ceil((s.maxY-s.minY+1)*l)};}},{key:"shouldRecalculateBbox",value:function(s){return!s.personBoundingBox&&!s.personBboxCalculated;}},{key:"accumulateBboxSample",value:function(s,l,g,f,v){0<s.bboxSamples.length&&s.bboxFramesSinceFirstSample++,l=this.findPersonBoundingBox(l,g,f),l?(s.bboxSamples.push(l),s.bboxSamples.length===1&&(s.cachedPersonBbox=l,s.committedPersonBbox=this.reverseNormalizePersonBbox(l,g,f),h.default.debug("[MediaPipe
57SegmenterProvider] Initial bbox sample for ".concat(v))),(30<=s.bboxSamples.length||180<=s.bboxFramesSinceFirstSample)&&(s.cachedPersonBbox=this.averageBboxSamples(s.bboxSamples),s.personBboxCalculated=!0,s.committedPersonBbox=this.reverseNormalizePersonBbox(s.cachedPersonBbox,g,f),h.default.debug("[MediaPipeSegmenterProvider] Committed averaged bbox (".concat(s.bboxSamples.length," samples, ").concat(s.bboxFramesSinceFirstSample," frames) for ").concat(v)))):0<s.bboxSamples.length&&180<=s.bboxFramesSinceFirstSample&&(s.cachedPersonBbox=this.averageBboxSamples(s.bboxSamples),s.personBboxCalculated=!0,s.committedPersonBbox=this.reverseNormalizePersonBbox(s.cachedPersonBbox,g,f),h.default.debug("[MediaPipeSegmenterProvider] Committed bbox on frame limit (".concat(s.bboxSamples.length," samples, ").concat(s.bboxFramesSinceFirstSample," frames) for ").concat(v)));}},{key:"averageBboxSamples",value:function(s){var l,g=s.length,f=0,v=0,S=0,w=0,C=o(s);try{for(C.s();!(l=C.n()).done;){var I=l.value;f+=I.minX,v+=I.minY,S+=I.maxX,w+=I.maxY;}}catch(O){C.e(O);}finally{C.f();}return{minX:Math.round(f/g),minY:Math.round(v/g),maxX:Math.round(S/g),maxY:Math.round(w/g)};}},{key:"reverseNormalizePersonBbox",value:function(w,l,g){var v=Math.round(.15*g),f=Math.max(0,w.minX+2),v=Math.max(0,w.minY+v),S=Math.min(l,w.maxX-2),w=Math.min(g,w.maxY-2);return{x:f/l,y:v/g,width:Math.max(0,S-f)/l,height:Math.max(0,w-v)/g};}},{key:"clearCanvasPool",value:function(){this.preservedBboxes.clear();var s,l=o(this.renderCanvasPool.entries());try{for(l.s();!(s=l.n()).done;){var g=n(s.value,2),f=g[0],v=g[1];v.cachedPersonBbox&&v.personBboxCalculated&&!v.personBoundingBox&&this.preservedBboxes.set(f,v.cachedPersonBbox);}}catch(M){l.e(M);}finally{l.f();}var S,w=o(this.renderCanvasPool.entries());try{for(w.s();!(S=w.n()).done;){var C=n(S.value,2),I=C[0],O=C[1];O.renderer&&O.renderer.dispose(),O.downscaler&&O.downscaler.dispose(),O.mediapipeGL=null,h.default.debug("[MediaPipeSegmenterProvider] Disposed renderer for ".concat(I));}}catch(M){w.e(M);}finally{w.f();}this.renderCanvasPool.clear(),h.default.debug("[MediaPipeSegmenterProvider] Canvas pool cleared");}},{key:"getPersonRenderedRect",value:function(l){var l=this.renderCanvasPool.get(l);return(l=l?.lastPersonRenderedRect)!=null?l:null;}},{key:"setPersonTransform",value:function(s,l){s=this.renderCanvasPool.get(s),s&&(s.personTransform=l);}},{key:"consumeCommittedPersonBbox",value:function(s){if(s=this.renderCanvasPool.get(s),!s||!s.committedPersonBbox)return null;var l=s.committedPersonBbox;return s.committedPersonBbox=null,l;}},{key:"rerenderPerson",value:function(s,S,C){if(s=this.renderCanvasPool.get(s),s==null||!s.cachedPersonBbox||!s.lastMaskWidth||!s.lastMaskHeight)return!1;var f=this.getCachedContext(s,S);if(!f)return!1;var w=s.sharedCanvas.width,M=s.sharedCanvas.height,v=S.width,S=S.height,w=this.scaleBoundingBox(s.cachedPersonBbox,s.lastMaskWidth,s.lastMaskHeight,w,M),M=this.computePersonDrawRect(w,v,S,C,s.personTransform),C=M.drawX,I=M.drawY,O=M.drawW,M=M.drawH;return f.clearRect(0,0,v,S),f.drawImage(s.sharedCanvas,w.x,w.y,w.w,w.h,C,I,O,M),s.lastPersonRenderedRect={x:C,y:I,width:O,height:M},!0;}},{key:"computePersonDrawRect",value:function(s,l,g,f,S){if(s.w<=0||s.h<=0)return{drawX:0,drawY:0,drawW:0,drawH:0};if(s=s.w/s.h,S)return C=.8*g*S.scale,{drawX:(S.centerX?l/2:S.x)-(w=C*s)/2,drawY:(S.centerY?g/2:S.y)-C/2,drawW:w,drawH:C};var S=.8*g,w=S*s,C=g-(S=l<w?(w=l)/s:S)+.15*g;return{drawX:f?l-w:0,drawY:C,drawW:w,drawH:S};}}])&&x(d.prototype,m),a&&x(d,a),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,m,a;}();r.MediaPipeSegmenterProvider=p;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(){n=function(){return c;};var p,c={},d=Object.prototype,m=d.hasOwnProperty,a=Object.defineProperty||function(q,J,oe){q[J]=oe.value;},B=typeof Symbol=="function"?Symbol:{},s=B.iterator||"@@iterator",l=B.asyncIterator||"@@asyncIterator",g=B.toStringTag||"@@toStringTag";function f(q,J,oe){return Object.defineProperty(q,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}),q[J];}try{f({},"");}catch{f=function(J,oe,Q){return J[oe]=Q;};}function v(q,D,oe,$){var F,X,Y,j,D=D&&D.prototype instanceof N?D:N,D=Object.create(D.prototype),$=new re($||[]);return a(D,"_invoke",{value:(F=q,X=oe,Y=$,j=w,function(ne,le){if(j===I)throw Error("Generator is already running");if(j===O){if(ne==="throw")throw le;return{value:p,done:!0};}for(Y.method=ne,Y.arg=le;;){var se=Y.delegate;if(se&&(se=function fe(ge,he){var _e=he.method,Re=ge.iterator[_e];return Re===p?(he.delegate=null,_e==="throw"&&ge.iterator.return&&
57(he.method="return",he.arg=p,fe(ge,he),he.method==="throw")||_e!=="return"&&(he.method="throw",he.arg=new TypeError("The iterator does not provide a '"+_e+"' method")),M):(_e=S(Re,ge.iterator,he.arg),_e.type==="throw"?(he.method="throw",he.arg=_e.arg,he.delegate=null,M):(Re=_e.arg,Re?Re.done?(he[ge.resultName]=Re.value,he.next=ge.nextLoc,he.method!=="return"&&(he.method="next",he.arg=p),he.delegate=null,M):Re:(he.method="throw",he.arg=new TypeError("iterator result is not an object"),he.delegate=null,M)));}(se,Y),se)){if(se===M)continue;return se;}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(j===w)throw j=O,Y.arg;Y.dispatchException(Y.arg);}else Y.method==="return"&&Y.abrupt("return",Y.arg);if(j=I,se=S(F,X,Y),se.type==="normal"){if(j=Y.done?O:C,se.arg===M)continue;return{value:se.arg,done:Y.done};}se.type==="throw"&&(j=O,Y.method="throw",Y.arg=se.arg);}})}),D;}function S(q,J,oe){try{return{type:"normal",arg:q.call(J,oe)};}catch(Q){return{type:"throw",arg:Q};}}c.wrap=v;var w="suspendedStart",C="suspendedYield",I="executing",O="completed",M={};function N(){}function G(){}function H(){}var B={},z=(f(B,s,function(){return this;}),Object.getPrototypeOf),z=z&&z(z(ue([]))),te=(z&&z!==d&&m.call(z,s)&&(B=z),H.prototype=N.prototype=Object.create(B));function K(q){["next","throw","return"].forEach(function(J){f(q,J,function(oe){return this._invoke(J,oe);});});}function V(q,J){var oe;a(this,"_invoke",{value:function(Q,F){function X(){return new J(function(Y,j){(function D(ge,ne,le,se){var fe,ge=S(q[ge],q,ne);if(ge.type!=="throw")return(ne=(fe=ge.arg).value)&&t(ne)=="object"&&m.call(ne,"__await")?J.resolve(ne.__await).then(function(he){D("next",he,le,se);},function(he){D("throw",he,le,se);}):J.resolve(ne).then(function(he){fe.value=he,le(fe);},function(he){return D("throw",he,le,se);});se(ge.arg);})(Q,F,Y,j);});}return oe=oe?oe.then(X,X):X();}});}function U(q){var J={tryLoc:q[0]};1 in q&&(J.catchLoc=q[1]),2 in q&&(J.finallyLoc=q[2],J.afterLoc=q[3]),this.tryEntries.push(J);}function Z(q){var J=q.completion||{};J.type="normal",delete J.arg,q.completion=J;}function re(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(U,this),this.reset(!0);}function ue(q){if(q||q===""){var J,oe=q[s];if(oe)return oe.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length))return J=-1,(oe=function Q(){for(;++J<q.length;)if(m.call(q,J))return Q.value=q[J],Q.done=!1,Q;return Q.value=p,Q.done=!0,Q;}).next=oe;}throw new TypeError(t(q)+" is not iterable");}return a(te,"constructor",{value:G.prototype=H,configurable:!0}),a(H,"constructor",{value:G,configurable:!0}
57),G.displayName=f(H,g,"GeneratorFunction"),c.isGeneratorFunction=function(q){return q=typeof q=="function"&&q.constructor,!!q&&(q===G||(q.displayName||q.name)==="GeneratorFunction");},c.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,H):(q.__proto__=H,f(q,g,"GeneratorFunction")),q.prototype=Object.create(te),q;},c.awrap=function(q){return{__await:q};},K(V.prototype),f(V.prototype,l,function(){return this;}),c.AsyncIterator=V,c.async=function(q,J,oe,Q,F){F===void 0&&(F=Promise);var X=new V(v(q,J,oe,Q),F);return c.isGeneratorFunction(J)?X:X.next().then(function(Y){return Y.done?Y.value:X.next();});},K(te),f(te,g,"Generator"),f(te,s,function(){return this;}),f(te,"toString",function(){return"[object Generator]";}),c.keys=function(q){var J,oe=Object(q),Q=[];for(J in oe)Q.push(J);return Q.reverse(),function F(){for(;Q.length;){var X=Q.pop();if(X in oe)return F.value=X,F.done=!1,F;}return F.done=!0,F;};},c.values=ue,re.prototype={constructor:re,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,this.tryEntries.forEach(Z),!q)for(var J in this)J.charAt(0)==="t"&&m.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=p);},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval;},dispatchException:function(q){if(this.done)throw q;var J=this;function oe(D,$){return X.type="throw",X.arg=q,J.next=D,$&&(J.method="next",J.arg=p),!!$;}for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q],X=F.completion;if(F.tryLoc==="root")return oe("end");if(F.tryLoc<=this.prev){var Y=m.call(F,"catchLoc"),j=m.call(F,"finallyLoc");if(Y&&j){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}else if(Y){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);}else{if(!j)throw Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}}}},abrupt:function(q,J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.tryLoc<=this.prev&&m.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var F=Q;break;}}var X=(F=F&&(q==="break"||q==="continue")&&F.tryLoc<=J&&J<=F.finallyLoc?null:F)?F.completion:{};return X.type=q,X.arg=J,F?(this.method="next",this.next=F.finallyLoc,M):this.complete(X);},complete:function(q,J){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&J&&(this.next=J),M;},finish:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J];if(oe.finallyLoc===q)return this.complete(oe.completion,oe.afterLoc),Z(oe),M;}},catch:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe,Q,F=this.tryEntries[J];if(F.tryLoc===q)return(oe=F.completion).type==="throw"&&(Q=oe.arg,Z(F)),Q;}throw Error("illegal catch attempt");},delegateYield:function(q,J,oe){return this.delegate={iterator:ue(q),resultName:J,nextLoc:oe},this.method==="next"&&(this.arg=p),M;}},c;}function o(p,c){var d,m=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!m){if(Array.isArray(p)||(m=function(g,f){if(g){if(typeof g=="string")return _(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?_(g,f):void 0;}}(p))||c&&p&&typeof p.length=="number")return m&&(p=m),d=0,{s:c=function(){},n:function(){return d>=p.length?{done:!0}:{done:!1,value:p[d++]};},e:function(g){throw g;},f:c};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 58In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a,s=!0,l=!1;return{s:function(){m=m.call(p);},n:function(){var g=m.next();return s=g.done,g;},e:function(g){l=!0,a=g;},f:function(){try{s||m.return==null||m.return();}finally{if(l)throw a;}}};}function _(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function E(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}var x=this&&this.__awaiter||function(p,c,d,m){return new(d=d||Promise)(function(a,s){function l(v){try{f(m.next(v));}catch(S){s(S);}}function g(v){try{f(m.throw(v));}catch(S){s(S);}}function f(v){var S;
58v.done?a(v.value):((S=v.value)instanceof d?S:new d(function(w){w(S);})).then(l,g);}f((m=m.apply(p,c||[])).next());});},h=(Object.defineProperty(r,"__esModule",{value:!0}),b(307)),y=b(5),b=function(){function p(){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");}return c=p,m=[{key:"createComponents",value:function(a,s){var l=[];if(Array.isArray(a)){var g,f=o(a);try{for(f.s();!(g=f.n()).done;){var v=g.value,S=h.default.createComponent(v,s);S&&l.push(S);}}catch(w){f.e(w);}finally{f.f();}}return l;}},{key:"renderComponents",value:function(a,s,l){return x(this,void 0,void 0,n().mark(function g(){var f,v,S,w;return n().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:C.prev=0,f=[],v=o(a);try{for(v.s();!(S=v.n()).done;)w=S.value,f.push(w.renderHtml(s));}catch(I){v.e(I);}finally{v.f();}return C.next=6,Promise.all(f);case 6:C.next=12;break;case 8:throw C.prev=8,C.t0=C.catch(0),y.default.debug("[".concat(l||"","]: Could not render components")),C.t0;case 12:case"end":return C.stop();}},g,null,[[0,8]]);}));}}],(d=null)&&E(c.prototype,d),m&&E(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}();r.default=b;},function(i,r,e){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=b(s);var a=c,s=h()?Reflect.construct(s,m||[],b(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(c,d,m,a){var s=E(b(1&a?c.prototype:c),d,m);return 2&a?function(l){return s.apply(m,l);}:s;}function E(){return(E=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,d,m){var a=function(s,l){for(;!{}.hasOwnProperty.call(s,l)&&(s=b(s))!==null;);return s;}(c,d);if(a)return(a=Object.getOwnPropertyDescriptor(a,d)).get?a.get.call(arguments.length<3?c:m):a.value;}).apply(null,arguments);}function x(c){var d=typeof Map=="function"?new Map():void 0;return function(m){if(m===null||!function(s){try{return Function.toString.call(s).indexOf("[native code]")!==-1;}catch{return typeof s=="function";}}(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(d!==void 0){if(d.has(m))return d.get(m);d.set(m,a);}function a(){return function(s,v,g){if(h())return Reflect.construct.apply(null,arguments);var f=[null],v=(f.push.apply(f,v),new(s.bind.apply(s,f))());return g&&y(v,g.prototype),v;}(m,arguments,b(this).constructor);}return a.prototype=Object.create(m.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),y(a,m);}(c);}function h(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!c;})();}function y(c,d){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}function b(c){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}Object.defineProperty(r,"__esModule",{value:!0}),r.VDMPreviewerEvents=r.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS=r.VDM_PREVIEWER_EVENT_LISTENERS=void 0,r.VDM_PREVIEWER_EVENT_LISTENERS={HEAD_BOUNDING_BOX_DETECTED:"headBoundingBoxDetected",PERSON_BOUNDING_BOX_DETECTED:"personBoundingBoxDetected"},r.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS={HEAD_BOUNDING_BOX_DETECTED:"_headBoundingBoxDetected",PERSON_BOUNDING_BOX_DETECTED:"_personBoundingBoxDetected"};var p=function(c){function d(s){var l;if(this instanceof d)return(l=o(this,d)).containerId=s,l.eventsListenerMap=new Map(),l;throw new TypeError("Cannot call a class as a function");}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&y(a,c),a=d,c=[{key:"getInstance",value:function(s){if(s)return d.instances.has(s)||d.instances.set(s,new d(s)),d.instances.get(s);throw new Error("containerId is required to get VDMPreviewerEvents instance");}},{key:"disposeInstance",value:function(s){var l=d.instances.get(s);
58l&&(l.dispose(),d.instances.delete(s));}}],(m=[{key:"getContainerId",value:function(){return this.containerId;}},{key:"size",get:function(){return this.eventsListenerMap.size;}},{key:"keys",value:function(){return this.eventsListenerMap.keys();}},{key:"addEventListener",value:function(s,l,g){_(d,"addEventListener",this,3)([s,l,g]),l=this.eventsListenerMap.get(s)||0,this.eventsListenerMap.set(s,l+1);}},{key:"removeEventListener",value:function(s,l,g){_(d,"removeEventListener",this,3)([s,l,g]),l=this.eventsListenerMap.get(s)||0,1<l?this.eventsListenerMap.set(s,l-1):this.eventsListenerMap.delete(s);}},{key:"dispose",value:function(){this.eventsListenerMap&&(this.eventsListenerMap.clear(),this.eventsListenerMap=void 0);}}])&&n(a.prototype,m),c&&n(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a;}(x(EventTarget));(r.VDMPreviewerEvents=p).instances=new Map();},function(i,r){i.exports=function(e,t){return e===t||e!=e&&t!=t;};},function(i,r,e){var t=e(37),n=e(28);i.exports=function(o){return!!n(o)&&((o=t(o))=="[object Function]"||o=="[object GeneratorFunction]"||o=="[object AsyncFunction]"||o=="[object Proxy]");};},function(i,r,e){(function(t){t=typeof t=="object"&&t&&t.Object===Object&&t,i.exports=t;}).call(this,e(27));},function(i,r){var e=Function.prototype.toString;i.exports=function(t){if(t!=null){try{return e.call(t);}catch{}try{return t+"";}catch{}}return"";};},function(i,r,e){var t=e(80),n=e(75),o=Object.prototype.hasOwnProperty;i.exports=function(_,E,x){var h=_[E];o.call(_,E)&&n(h,x)&&(x!==void 0||E in _)||t(_,E,x);};},function(i,r,e){var t=e(150);i.exports=function(n,o,_){o=="__proto__"&&t?t(n,o,{configurable:!0,enumerable:!0,value:_,writable:!0}):n[o]=_;};},function(i,r,e){var t=e(152),n=e(153),o=e(54),_=e(82),E=e(156),x=e(157),h=Object.prototype.hasOwnProperty;i.exports=function(y,b){var p,c=o(y),d=!c&&n(y),m=!c&&!d&&_(y),a=!c&&!d&&!m&&x(y),s=c||d||m||a,l=s?t(y.length,String):[],g=l.length;for(p in y)!b&&!h.call(y,p)||s&&(p=="length"||m&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||E(p,g))||l.push(p);return l;};},function(i,r,e){(function(t){var n=e(14),o=e(155),E=r&&!r.nodeType&&r,_=E&&typeof t=="object"&&t&&!t.nodeType&&t,_=_&&_.exports===E?n.Buffer:void 0,E=_?_.isBuffer:void 0;t.exports=E||o;}).call(this,e(55)(i));},function(i,r){i.exports=function(e){return typeof e=="number"&&-1<e&&e%1==0&&e<=9007199254740991;};},function(i,r){i.exports=function(e,t){return function(n){return e(t(n));};};},function(i,r,e){var t=e(76),n=e(83);i.exports=function(o){return o!=null&&n(o.length)&&!t(o);};},function(i,r){i.exports=function(){return[];};},function(i,r,_){var t=_(88),n=_(89),o=_(60),_=_(86),E=Object.getOwnPropertySymbols;i.exports=E?function(x){for(var h=[];x;)t(h,o(x)),x=n(x);return h;}:_;},function(i,r){i.exports=function(e,t){for(var n=-1,o=t.length,_=e.length;++n<o;)e[_+n]=t[n];return e;};},function(i,r,e){e=e(84)(Object.getPrototypeOf,Object),i.exports=e;},function(i,r,e){var t=e(88),n=e(54);i.exports=function(o,_,E){return _=_(o),n(o)?_:t(_,E(o));};},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.BasePosition=void 0;var o=function(){function _(y,b,p,c){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.fromTop=y,this.fromLeft=b,this.fromRight=p,this.fromBot=c;}return E=_,(x=[{key:"getPositionObj",value:function(){return{type:"position",attributes:{fromTop:this.fromTop,fromLeft:this.fromLeft,fromRight:this.fromRight,fromBot:this.fromBot}};}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.BasePosition=o;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){var b,p=typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(!p){if(Array.isArray(h)||(p=function(a,s){if(a){if(typeof a=="str
58ing")return o(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?o(a,s):void 0;}}(h))||y&&h&&typeof h.length=="number")return p&&(h=p),b=0,{s:y=function(){},n:function(){return b>=h.length?{done:!0}:{done:!1,value:h[b++]};},e:function(a){throw a;},f:y};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 59In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var c,d=!0,m=!1;return{s:function(){p=p.call(h);},n:function(){var a=p.next();return d=a.done,a;},e:function(a){m=!0,c=a;},f:function(){try{d||p.return==null||p.return();}finally{if(m)throw c;}}};}function o(h,y){(y==null||y>h.length)&&(y=h.length);for(var b=0,p=Array(y);b<y;b++)p[b]=h[b];return p;}function _(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}Object.defineProperty(r,"__esModule",{value:!0});var E=x(13),x=function(){function h(c){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");if(this._zIndex=c.zIndex||E.DisplayPriority.LAST_ORDER,this._templateIds=[],c.templateIds){var d,m=n(c.templateIds);try{for(m.s();!(d=m.n()).done;){var a=d.value;this._templateIds.push(a);}}catch(s){m.e(s);}finally{m.f();}}}return y=h,(b=[{key:"zIndex",get:function(){return this._zIndex;},set:function(c){this._zIndex=c;}},{key:"templateIds",get:function(){return this._templateIds;}}])&&_(y.prototype,b),p&&_(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.default=x;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function _(y){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.target=y.target,this.data=y.data;}return E=_,(x=[{key:"seekTarget",value:function(y){function b(d){return d.hasOwnProperty("id")&&d.id&&d.id===p.target?d:d.hasOwnProperty("components")&&d.components?(m=[],d.components.forEach(function(a){a=b(a),a&&(m=m.concat(a));}),m):void 0;var m;}var p=this,c=[];return y.forEach(function(d){d=b(d),d&&(c=c.concat(d));}),c;}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.default=o;},function(i,r,e){"use strict";function t(b,p){return function(c){if(Array.isArray(c))return c;}(b)||function(c,d){var m=c==null?null:typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(m!=null){var a,s,l,g,f=[],v=!0,S=!1;try{if(l=(m=m.call(c)).next,d===0){if(Object(m)!==m)return;v=!1;}else for(;!(v=(a=l.call(m)).done)&&(f.push(a.value),f.length!==d);v=!0);}catch(w){S=!0,s=w;}finally{try{if(!v&&m.return!=null&&(g=m.return(),Object(g)!==g))return;}finally{if(S)throw s;}}return f;}}(b,p)||function(c,d){if(c){if(typeof c=="string")return n(c,d);var m={}.toString.call(c).slice(8,-1);return(m=m==="Object"&&c.constructor?c.constructor.name:m)==="Map"||m==="Set"?Array.from(c):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?n(c,d):void 0;}}
59(b,p)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 60In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(b,p){(p==null||p>b.length)&&(p=b.length);for(var c=0,d=Array(p);c<p;c++)d[c]=b[c];return d;}function o(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(_(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),_(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),_(m)=="symbol"?m:m+"";}(d.key),d);}}function _(b){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}Object.defineProperty(r,"__esModule",{value:!0}),r.ParameterBuilder=r.isParameterObject=void 0;var E=e(208),x=e(21),h=e(5),y=e(209);r.isParameterObject=function(b){return _(b)==="object"&&"type"in b;},e=function(){function b(m){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.resources=m;}return p=b,(c=[{key:"build",value:function(m){if((0,x.isCommonParameterTypes)(m.type)){if(m.default=(0,y.resolveParameterResources)(this.resources,m.default,this.constructor.name),!(0,x.isRelativeValue)(m.default)&&b.isValid(m.default,m.allowedValues,m.type)||(0,x.isRelativeValue)(m.default)&&function(a,s,l){for(var g=0,f=Object.entries(a);g<f.length;g++){var S=t(f[g],2),v=S[0],S=S[1];if(!b.isValid(S,s,l))return h.default.warn("ParameterBuilder: Something wrong with: ".concat(v," and val: ").concat(S)),!1;}return!0;}(m.default,m.allowedValues,m.type))return new E.Parameter(m);}else h.default.warn("ParameterBuilder: non-valid type ".concat(m.type," passed"));}}])&&o(p.prototype,c),d&&o(p,d),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,c,d;}(),(r.ParameterBuilder=e).isValid=function(b,p,c){return b===void 0?(h.default.warn("ParameterBuilder: undefined value passed"),!1):p&&!p.includes(b)?(h.default.warn("ParameterBuilder: value ".concat(b," is not allowed: ").concat(JSON.stringify(p))),!1):(p=Array.isArray(b)?"array":_(b),c===p||(h.default.warn("ParameterBuilder: type of value ".concat(p," is not as declared: ").concat(c)),!1));};},function(i,r,w){"use strict";function t(C){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I;}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I;})(C);}function n(C,N,O){if(_())return Reflect.construct.apply(null,arguments);var M=[null],N=(M.push.apply(M,N),new(C.bind.apply(C,M))());return O&&o(N,O.prototype),N;}function o(C,I){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,M){return O.__proto__=M,O;})(C,I);}function _(){try{var C=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!C;})();}function E(C){return function(I){if(Array.isArray(I))return x(I);}(C)||function(I){if(typeof Symbol<"u"&&I[Symbol.iterator]!=null||I["@@iterator"]!=null)return Array.from(I);}(C)||function(I,O){if(I){if(typeof I=="string")return x(I,O);var M={}.toString.call(I).slice(8,-1);return(M=M==="Object"&&I.constructor?I.constructor.name:M)==="Map"||M==="Set"?Array.from(I):M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?x(I,O):void 0;}}(C)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 61In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(C,I){(I==null||I>C.length)&&(I=C.length);for(var O=0,M=Array(I);O<I;O++)M[O]=C[O];return M;}function h(C,I){for(var O=0;O<I.length;O++){var M=I[O];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(C,function(N){return N=function(G,H){if(t(G)!="object"||!G)return G;var B=G[Symbol.toPrimitive];
61if(B===void 0)return(H==="string"?String:Number)(G);if(B=B.call(G,H||"default"),t(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.");}(N,"string"),t(N)=="symbol"?N:N+"";}(M.key),M);}}Object.defineProperty(r,"__esModule",{value:!0});var y=w(211),b=w(5),p=w(212),c=w(213),d=w(214),m=w(215),a=w(216),s=w(217),l=w(218),g=w(219),f=w(220),v=w(221),S=w(222),w=function(){function C(){if(!(this instanceof C))throw new TypeError("Cannot call a class as a function");}return I=C,M=[{key:"createFunction",value:function(N,G){var H=2<arguments.length&&arguments[2]!==void 0?arguments[2]:void 0;try{switch(N){case"fn::equals":return n(y.default,E(G));case"fn::not":return n(p.default,E(G));case"fn::gt":return n(c.default,E(G));case"fn::gte":return n(d.default,E(G));case"fn::lt":return n(m.default,E(G));case"fn::lte":return n(a.default,E(G));case"fn::len":return n(s.default,E(G));case"fn::and":return n(g.default,E(G));case"fn::or":return n(f.default,E(G));case"fn::object-function":return n(v.default,[H].concat(E(G)));case"fn::is-res-exist":return n(S.default,[H].concat(E(G)));case"fn::trim":return n(l.default,E(G));default:return null;}}catch(B){return b.default.debug(`Error while creating intrinsic function 62 type: `.concat(N," , error: ").concat(B.message)),null;}}}],(O=null)&&h(I.prototype,O),M&&h(I,M),Object.defineProperty(I,"prototype",{writable:!1}),I;var I,O,M;}();r.default=w;},function(i,r,e){"use strict";function t(E,x){return function(h){if(Array.isArray(h))return h;}(E)||function(h,y){var b=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(b!=null){var p,c,d,m,a=[],s=!0,l=!1;try{if(d=(b=b.call(h)).next,y===0){if(Object(b)!==b)return;s=!1;}else for(;!(s=(p=d.call(b)).done)&&(a.push(p.value),a.length!==y);s=!0);}catch(g){l=!0,c=g;}finally{try{if(!s&&b.return!=null&&(m=b.return(),Object(m)!==m))return;}finally{if(l)throw c;}}return a;}}(E,x)||function(h,y){if(h){if(typeof h=="string")return n(h,y);var b={}.toString.call(h).slice(8,-1);return(b=b==="Object"&&h.constructor?h.constructor.name:b)==="Map"||b==="Set"?Array.from(h):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?n(h,y):void 0;}}(E,x)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 63In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(E,x){(x==null||x>E.length)&&(x=E.length);for(var h=0,y=Array(x);h<x;h++)y[h]=E[h];return y;}function o(E){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function _(E){return o(E)==="object"&&"return"in E;}Object.defineProperty(r,"__esModule",{value:!0}),r.isObjectFunctionExecution=r.isObjectFunctionsTemplate=r.isObjectFunctionTemplate=void 0,r.isObjectFunctionTemplate=_,r.isObjectFunctionsTemplate=function(E){return o(E)==="object"&&Object.entries(E).reduce(function(x,b){var b=t(b,2),y=b[0],b=b[1];return x&&typeof y=="string"&&_(b);},!0);},r.isObjectFunctionExecution=function(E){return o(E)==="object"&&E!==null&&"exec"in E&&1<=E.exec.length;};},function(i,r,y){var y=y(43),t=y.find,n=y.NAMESPACE;function o(ee){return ee!=="";}function _(ee,W){return ee.hasOwnProperty(W)||(ee[W]=!0),ee;}function E(ee){return ee?(ee=(ee=ee)?ee.split(/[\t\n\f\r ]+/).filter(o):[],Object.keys(ee.reduce(_,{}))):[];}function x(ee,W){for(var ae in ee)Object.prototype.hasOwnProperty.call(ee,ae)&&(W[ae]=ee[ae]);}function h(ee,W){var ae=ee.prototype;function de(){}ae instanceof W||(de.prototype=W.prototype,x(ae,de=new de()),ee.prototype=ae=de),ae.constructor!=ee&&(typeof ee!="function"&&console.error("unknown Class:"+ee),ae.constructor=ee);}var y={},b=(y.ELEMENT_NODE=1,y.ATTRIBUTE_NODE=2,y.TEXT_NODE=3,y.CDATA_SECTION_NODE=4,y.ENTITY_REFERENCE_NODE=5,y.ENTITY_NODE=6,y.PROCESSING_INSTRUCTION_NODE=7,y.COMMENT_NODE=8,y.DOCUMENT_NODE=9,y.DOCUMENT_TYPE_NODE=10,y.DOCUMENT_FRAGMENT_NODE=11,y.NOTATION_NODE=12,{}),p={},c=(b.INDEX_SIZE_ERR=(p[1]="Index size error",1),b.DOMSTRING_SIZE_ERR=(p[2]="DOMString size error",2),b.HIERARCHY_REQUEST_ERR=(p[3]="Hierarchy request error",3)),d=(b.WRONG_DOCUMENT_ERR=(p[4]="Wrong document",4),b.INVALID_CHARACTER_ERR=(p[5]="Invalid character",5),b.NO_DATA_ALLOWED_ER
63R=(p[6]="No data allowed",6),b.NO_MODIFICATION_ALLOWED_ERR=(p[7]="No modification allowed",7),b.NOT_FOUND_ERR=(p[8]="Not found",8));b.NOT_SUPPORTED_ERR=(p[9]="Not supported",9),b.INUSE_ATTRIBUTE_ERR=(p[10]="Attribute in use",10),b.INVALID_STATE_ERR=(p[11]="Invalid state",11),b.SYNTAX_ERR=(p[12]="Syntax error",12),b.INVALID_MODIFICATION_ERR=(p[13]="Invalid modification",13),b.NAMESPACE_ERR=(p[14]="Invalid namespace",14),b.INVALID_ACCESS_ERR=(p[15]="Invalid access",15);function m(ee,W){var ae;return W instanceof Error?ae=W:(ae=this,Error.call(this,p[ee]),this.message=p[ee],Error.captureStackTrace&&Error.captureStackTrace(this,m)),ae.code=ee,W&&(this.message=this.message+": "+W),ae;}function a(){}function s(ee,W){this._node=ee,this._refresh=W,l(this);}function l(ee){var W=ee._node._inc||ee._node.ownerDocument._inc;if(ee._inc!==W){var ae=ee._refresh(ee._node);if(Re(ee,"length",ae.length),!ee.$$length||ae.length<ee.$$length)for(var de=ae.length;(de in ee);de++)Object.prototype.hasOwnProperty.call(ee,de)&&delete ee[de];x(ae,ee),ee._inc=W;}}function g(){}function f(ee,W){for(var ae=ee.length;ae--;)if(ee[ae]===W)return ae;}function v(ee,W,ae,de){de?W[f(W,de)]=ae:W[W.length++]=ae,ee&&(W=(ae.ownerElement=ee).ownerDocument)&&(de&&N(W,ee,de),de=ee,ee=ae,(ae=W)&&ae._inc++,ee.namespaceURI===n.XMLNS&&(de._nsMap[ee.prefix?ee.localName:""]=ee.value));}function S(ee,W,ae){var de=f(W,ae);if(!(0<=de))throw new m(d,new Error(ee.tagName+"@"+ae));for(var ye,Se=W.length-1;de<Se;)W[de]=W[++de];W.length=Se,ee&&(ye=ee.ownerDocument)&&(N(ye,ee,ae),ae.ownerElement=null);}function w(){}function C(){}function I(ee){return(ee=="<"?"<":ee==">"&&">")||ee=="&"&&"&"||ee=='"'&&"""||"&#"+ee.charCodeAt()+";";}function O(ee,W){if(W(ee))return 1;if(ee=ee.firstChild)do if(O(ee,W))return 1;while(ee=ee.nextSibling);}function M(){this.ownerDocument=this;}function N(ee,W,ae){ee&&ee._inc++,ae.namespaceURI===n.XMLNS&&delete W._nsMap[ae.prefix?ae.localName:""];}function G(ee,W,ae){if(ee&&ee._inc){ee._inc++;var de=W.childNodes;if(ae)de[de.length++]=ae;else{for(var ye=W.firstChild,Se=0;ye;)ye=(de[Se++]=ye).nextSibling;de.length=Se,delete de[de.length];}}}function H(ee,W){var ae=W.previousSibling,de=W.nextSibling;return ae?ae.nextSibling=de:ee.firstChild=de,de?de.previousSibling=ae:ee.lastChild=ae,W.parentNode=null,W.previousSibling=null,W.nextSibling=null,G(ee.ownerDocument,ee),W;}function B(ee){return ee&&ee.nodeType===C.DOCUMENT_TYPE_NODE;}function z(ee){return ee&&ee.nodeType===C.ELEMENT_NODE;}function te(ee){return ee&&ee.nodeType===C.TEXT_NODE;}function K(de,W){var ae,de=de.childNodes||[];if(!t(de,z)&&!B(W))return ae=t(de,B),!(W&&ae&&de.indexOf(ae)>de.indexOf(W));}function V(de,W){var ae,de=de.childNodes||[];if(!t(de,function(ye){return z(ye)&&ye!==W;}))return ae=t(de,B),!(W&&ae&&de.indexOf(ae)>de.indexOf(W));}function U(ee,W,ae){if(!(de=ee)||de.nodeType!==C.DOCUMENT_NODE&&de.nodeType!==C.DOCUMENT_FRAGMENT_NODE&&de.nodeType!==C.ELEMENT_NODE)throw new m(c,"Unexpected parent node type "+ee.nodeType);var de;if(ae&&ae.parentNode!==ee)throw new m(d,"child not in parent");if(!(de=W)||!(z(de)||te(de)||B(de)||de.nodeType===C.DOCUMENT_FRAGMENT_NODE||de.nodeType===C.COMMENT_NODE||de.nodeType===C.PROCESSING_INSTRUCTION_NODE)||B(W)&&ee.nodeType!==C.DOCUMENT_NODE)throw new m(c,"Unexpected node type "+W.nodeType+" for parent node type "+ee.nodeType);}function Z(ee,W,ae){var de=ee.childNodes||[],ye=W.childNodes||[];if(W.nodeType===C.DOCUMENT_FRAGMENT_NODE){var Se=ye.filter(z);if(1<Se.length||t(ye,te))throw new m(c,"More than one element or text in fragment");if(Se.length===1&&!K(ee,ae))throw new m(c,"Element in fragment can not be inserted before doctype");}if(z(W)&&!K(ee,ae))throw new m(c,"Only one element can be added and only after doctype");if(B(W)){if(t(de,B))throw new m(c,"Only one doctype is allowed");if(ye=t(de,z),ae&&de.indexOf(ye)<de.indexOf(ae))throw new m(c,"Doctype can only be inserted before an element");if(!ae&&ye)throw new m(c,"Doctype can not be appended since element is present");}}function re(ee,W,ae){var de=ee.childNodes||[],ye=W.childNodes||[];
63if(W.nodeType===C.DOCUMENT_FRAGMENT_NODE){var Se=ye.filter(z);if(1<Se.length||t(ye,te))throw new m(c,"More than one element or text in fragment");if(Se.length===1&&!V(ee,ae))throw new m(c,"Element in fragment can not be inserted before doctype");}if(z(W)&&!V(ee,ae))throw new m(c,"Only one element can be added and only after doctype");if(B(W)){if(t(de,function(De){return B(De)&&De!==ae;}))throw new m(c,"Only one doctype is allowed");if(ye=t(de,z),ae&&de.indexOf(ye)<de.indexOf(ae))throw new m(c,"Doctype can only be inserted before an element");}}function ue(ee,W,ae,de){if(U(ee,W,ae),ee.nodeType===C.DOCUMENT_NODE&&(de||Z)(ee,W,ae),de=W.parentNode,de&&de.removeChild(W),W.nodeType===11){var ye=W.firstChild;if(ye==null)return W;var Se=W.lastChild;}else ye=Se=W;for(de=ae?ae.previousSibling:ee.lastChild,ye.previousSibling=de,Se.nextSibling=ae,de?de.nextSibling=ye:ee.firstChild=ye,ae==null?ee.lastChild=Se:ae.previousSibling=Se;ye.parentNode=ee,ye!==Se&&(ye=ye.nextSibling););return G(ee.ownerDocument||ee,ee),W.nodeType==11&&(W.firstChild=W.lastChild=null),W;}function q(){this._nsMap={};}function J(){}function oe(){}function Q(){}function F(){}function X(){}function Y(){}function j(){}function D(){}function $(){}function ne(){}function le(){}function se(){}function fe(ee,W){var ae,de=[],ye=this.nodeType==9&&this.documentElement||this,Se=ye.prefix,De=ye.namespaceURI;return _e(this,de,ee,W,ae=De&&Se==null&&(Se=ye.lookupPrefix(De))==null?[{namespace:De,prefix:null}]:ae),de.join("");}function ge(ee,W,ae){var de=ee.prefix||"",ye=ee.namespaceURI;if(ye&&(de!=="xml"||ye!==n.XML)&&ye!==n.XMLNS){for(var Se=ae.length;Se--;){var De=ae[Se];if(De.prefix===de)return De.namespace!==ye;}return 1;}}function he(ee,W,ae){ee.push(" ",W,'="',ae.replace(/[<>&"\t\n\r]/g,I),'"');}function _e(ee,W,ae,de,ye){if(ye=ye||[],de){if(!(ee=de(ee)))return;if(typeof ee=="string")return void W.push(ee);}switch(ee.nodeType){case 1:var Se=ee.attributes,De=Se.length,Ue=ee.firstChild,Be=ee.tagName,nt=Be;if(!(ae=n.isHTML(ee.namespaceURI)||ae)&&!ee.prefix&&ee.namespaceURI){for(var it,ot=0;ot<Se.length;ot++)if(Se.item(ot).name==="xmlns"){it=Se.item(ot).value;break;}if(!it){for(var ht=ye.length-1;0<=ht;ht--)if((Et=ye[ht]).prefix===""&&Et.namespace===ee.namespaceURI){it=Et.namespace;break;}}if(it!==ee.namespaceURI){for(var Et,ht=ye.length-1;0<=ht;ht--)if((Et=ye[ht]).namespace===ee.namespaceURI){Et.prefix&&(nt=Et.prefix+":"+Be);break;}}}W.push("<",nt);for(var At=0;At<De;At++)(Nt=Se.item(At)).prefix=="xmlns"?ye.push({prefix:Nt.localName,namespace:Nt.value}):Nt.nodeName=="xmlns"&&ye.push({prefix:"",namespace:Nt.value});for(var Nt,Ut,bi,At=0;At<De;At++)ge(Nt=Se.item(At),0,ye)&&(he(W,(Ut=Nt.prefix||"")?"xmlns:"+Ut:"xmlns",bi=Nt.namespaceURI),ye.push({prefix:Ut,namespace:bi})),_e(Nt,W,ae,de,ye);if(Be===nt&&ge(ee,0,ye)&&(he(W,(Ut=ee.prefix||"")?"xmlns:"+Ut:"xmlns",bi=ee.namespaceURI),ye.push({prefix:Ut,namespace:bi})),Ue||ae&&!/^(?:meta|link|img|br|hr|input)$/i.test(Be)){if(W.push(">"),ae&&/^script$/i.test(Be))for(;Ue;)Ue.data?W.push(Ue.data):_e(Ue,W,ae,de,ye.slice()),Ue=Ue.nextSibling;else for(;Ue;)_e(Ue,W,ae,de,ye.slice()),Ue=Ue.nextSibling;W.push("</",nt,">");}else W.push("/>");return;case 9:case 11:for(Ue=ee.firstChild;Ue;)_e(Ue,W,ae,de,ye.slice()),Ue=Ue.nextSibling;return;case 2:return he(W,ee.name,ee.value);case 3:return W.push(ee.data.replace(/[<&>]/g,I));case 4:return W.push("<![CDATA[",ee.data,"]]>");case 8:return W.push("<!--",ee.data,"-->");case 10:var Ge=ee.publicId,qe=ee.systemId;return W.push("<!DOCTYPE ",ee.name),void(Ge?(W.push(" PUBLIC ",Ge),qe&&qe!="."&&W.push(" ",qe),W.push(">")):qe&&qe!="."?W.push(" SYSTEM ",qe,">"):((Ge=ee.internalSubset)&&W.push(" [",Ge,"]"),W.push(">")));case 7:return W.push("<?",ee.target," ",ee.data,"?>");case 5:return W.push("&",ee.nodeName,";");default:W.push("??",ee.nodeName);}}function Re(ee,W,ae){ee[W]=ae;}m.prototype=Error.prototype,x(b,m),a.prototype={length:0,item:function(ee){return 0<=ee&&ee<this.length?this[ee]:null;},toString:function(ee,W){for(var ae=[],de=0;de<this.length;de++)_e(this[de],ae,ee,W);return ae.join("");},filter:function(ee){return Array.prototype.filter.call(this,ee);},indexOf:function(ee){return Array.prototype.indexOf.call(this,ee);}},s.prototype.item=function(ee){return l(this),this[ee]||null;},h(s,a),g.prototype={length:0,item:a.prototype.item,getNamedItem:function(ee){for(var W=this.length;W--;){var ae=this[W];if(ae.nodeName==ee)return ae;}},setNamedItem:function(ee){var W=ee.ownerElement;
63if(W&&W!=this._ownerElement)throw new m(10);return W=this.getNamedItem(ee.nodeName),v(this._ownerElement,this,ee,W),W;},setNamedItemNS:function(ee){var W=ee.ownerElement;if(W&&W!=this._ownerElement)throw new m(10);return W=this.getNamedItemNS(ee.namespaceURI,ee.localName),v(this._ownerElement,this,ee,W),W;},removeNamedItem:function(ee){return ee=this.getNamedItem(ee),S(this._ownerElement,this,ee),ee;},removeNamedItemNS:function(ee,W){return ee=this.getNamedItemNS(ee,W),S(this._ownerElement,this,ee),ee;},getNamedItemNS:function(ee,W){for(var ae=this.length;ae--;){var de=this[ae];if(de.localName==W&&de.namespaceURI==ee)return de;}return null;}},w.prototype={hasFeature:function(ee,W){return!0;},createDocument:function(ee,W,ae){var de=new M();return de.implementation=this,de.childNodes=new a(),de.doctype=ae||null,ae&&de.appendChild(ae),W&&(ae=de.createElementNS(ee,W),de.appendChild(ae)),de;},createDocumentType:function(ee,W,ae){var de=new Y();return de.name=ee,de.nodeName=ee,de.publicId=W||"",de.systemId=ae||"",de;}},C.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(ee,W){return ue(this,ee,W);},replaceChild:function(ee,W){ue(this,ee,W,re),W&&this.removeChild(W);},removeChild:function(ee){return H(this,ee);},appendChild:function(ee){return this.insertBefore(ee,null);},hasChildNodes:function(){return this.firstChild!=null;},cloneNode:function(ee){return function W(ae,de,ye){var Se=new de.constructor();for(var De in de){var Ue;
63!Object.prototype.hasOwnProperty.call(de,De)||typeof(Ue=de[De])!="object"&&Ue!=Se[De]&&(Se[De]=Ue);}switch(de.childNodes&&(Se.childNodes=new a()),Se.ownerDocument=ae,Se.nodeType){case 1:var Be=de.attributes,nt=Se.attributes=new g(),it=Be.length;nt._ownerElement=Se;for(var ot=0;ot<it;ot++)Se.setAttributeNode(W(ae,Be.item(ot),!0));break;case 2:ye=!0;}if(ye)for(var ht=de.firstChild;ht;)Se.appendChild(W(ae,ht,ye)),ht=ht.nextSibling;return Se;}(this.ownerDocument||this,this,ee);},normalize:function(){for(var ee=this.firstChild;ee;){var W=ee.nextSibling;W&&W.nodeType==3&&ee.nodeType==3?(this.removeChild(W),ee.appendData(W.data)):(ee.normalize(),ee=W);}},isSupported:function(ee,W){return this.ownerDocument.implementation.hasFeature(ee,W);},hasAttributes:function(){return 0<this.attributes.length;},lookupPrefix:function(ee){for(var W=this;W;){var ae=W._nsMap;if(ae){for(var de in ae)if(Object.prototype.hasOwnProperty.call(ae,de)&&ae[de]===ee)return de;}W=W.nodeType==2?W.ownerDocument:W.parentNode;}return null;},lookupNamespaceURI:function(ee){for(var W=this;W;){var ae=W._nsMap;if(ae&&Object.prototype.hasOwnProperty.call(ae,ee))return ae[ee];W=W.nodeType==2?W.ownerDocument:W.parentNode;}return null;},isDefaultNamespace:function(ee){return this.lookupPrefix(ee)==null;}},x(y,C),x(y,C.prototype),M.prototype={nodeName:"#document",nodeType:9,doctype:null,documentElement:null,_inc:1,insertBefore:function(ee,W){if(ee.nodeType==11)for(var ae=ee.firstChild;ae;){var de=ae.nextSibling;this.insertBefore(ae,W),ae=de;}else ue(this,ee,W),(ee.ownerDocument=this).documentElement===null&&ee.nodeType===1&&(this.documentElement=ee);return ee;},removeChild:function(ee){return this.documentElement==ee&&(this.documentElement=null),H(this,ee);},replaceChild:function(ee,W){ue(this,ee,W,re),ee.ownerDocument=this,W&&this.removeChild(W),z(ee)&&(this.documentElement=ee);},importNode:function(ee,W){return function ae(de,ye,Se){var De;switch(ye.nodeType){case 1:(De=ye.cloneNode(!1)).ownerDocument=de;case 11:break;case 2:Se=!0;}if(De=De||ye.cloneNode(!1),De.ownerDocument=de,De.parentNode=null,Se)for(var Ue=ye.firstChild;Ue;)De.appendChild(ae(de,Ue,Se)),Ue=Ue.nextSibling;return De;}(this,ee,W);},getElementById:function(ee){var W=null;return O(this.documentElement,function(ae){if(ae.nodeType==1&&ae.getAttribute("id")==ee)return W=ae,!0;}),W;},getElementsByClassName:function(ee){var W=E(ee);return new s(this,function(ae){var de=[];return 0<W.length&&O(ae.documentElement,function(ye){var Se,De,Ue;ye!==ae&&ye.nodeType===1&&(Se=ye.getAttribute("class"))&&((De=ee===Se)||(Se=E(Se),De=W.every((Ue=Se,function(Be){return Ue&&Ue.indexOf(Be)!==-1;}))),De&&de.push(ye));}),de;});},createElement:function(ee){var W=new q();return W.ownerDocument=this,W.nodeName=ee,W.tagName=ee,W.localName=ee,W.childNodes=new a(),(W.attributes=new g())._ownerElement=W;},createDocumentFragment:function(){var ee=new ne();return ee.ownerDocument=this,ee.childNodes=new a(),ee;},createTextNode:function(ee){var W=new Q();return W.ownerDocument=this,W.appendData(ee),W;},createComment:function(ee){var W=new F();return W.ownerDocument=this,W.appendData(ee),W;},createCDATASection:function(ee){var W=new X();return W.ownerDocument=this,W.appendData(ee),W;},createProcessingInstruction:function(ee,W){var ae=new le();return ae.ownerDocument=this,ae.tagName=ae.nodeName=ae.target=ee,ae.nodeValue=ae.data=W,ae;},createAttribute:function(ee){var W=new J();return W.ownerDocument=this,W.name=ee,W.nodeName=ee,W.localName=ee,W.specified=!0,W;},createEntityReference:function(ee){var W=new $();return W.ownerDocument=this,W.nodeName=ee,W;},createElementNS:function(ee,W){var ae=new q(),de=W.split(":"),ye=ae.attributes=new g();return ae.childNodes=new a(),ae.ownerDocument=this,ae.nodeName=W,ae.tagName=W,ae.namespaceURI=ee,de.length==2?(ae.prefix=de[0],ae.localName=de[1]):ae.localName=W,ye._ownerElement=ae;},createAttributeNS:function(ee,W){var ae=new J(),de=W.split(":");return ae.ownerDocument=this,ae.nodeName=W,ae.name=W,ae.namespaceURI=ee,ae.specified=!0,de.length==2?(ae.prefix=de[0],ae.localName=de[1]):ae.localName=W,ae;}},h(M,C),M.prototype.getElementsByTagName=(q.prototype={nodeType:1,hasAttribute:function(ee){return this.getAttributeNode(ee)!=null;},getAttribute:function(ee){return ee=this.getAttributeNode(ee),ee&&ee.value||"";},getAttributeNode:function(ee){return this.attributes.getNamedItem(ee);},setAttribute:function(ee,W){ee=this.ownerDocument.createAttribute(ee),ee.value=ee.nodeValue=""+W,this.setAttributeNode(ee);},removeAttribute:function(ee){ee=this.getAttributeNode(ee),ee&&this.removeAttributeNode(ee);},appendChild:function(ee){return ee.nodeType===11?this.insertBefore(ee,null):(W=this,(ee=ee).parentNode&&ee.parentNode.removeChild(ee),ee.parentNode=W,ee.previousSibling=W.lastChild,ee.nextSibling=null,ee.previousSibling?ee.previousSibling.nextSibling=ee:W.firstChild=ee,W.last
63Child=ee,G(W.ownerDocument,W,ee),ee);var W;},setAttributeNode:function(ee){return this.attributes.setNamedItem(ee);},setAttributeNodeNS:function(ee){return this.attributes.setNamedItemNS(ee);},removeAttributeNode:function(ee){return this.attributes.removeNamedItem(ee.nodeName);},removeAttributeNS:function(ee,W){ee=this.getAttributeNodeNS(ee,W),ee&&this.removeAttributeNode(ee);},hasAttributeNS:function(ee,W){return this.getAttributeNodeNS(ee,W)!=null;},getAttributeNS:function(ee,W){return ee=this.getAttributeNodeNS(ee,W),ee&&ee.value||"";},setAttributeNS:function(ee,W,ae){ee=this.ownerDocument.createAttributeNS(ee,W),ee.value=ee.nodeValue=""+ae,this.setAttributeNode(ee);},getAttributeNodeNS:function(ee,W){return this.attributes.getNamedItemNS(ee,W);},getElementsByTagName:function(ee){return new s(this,function(W){var ae=[];return O(W,function(de){de===W||de.nodeType!=1||ee!=="*"&&de.tagName!=ee||ae.push(de);}),ae;});},getElementsByTagNameNS:function(ee,W){return new s(this,function(ae){var de=[];return O(ae,function(ye){ye===ae||ye.nodeType!==1||ee!=="*"&&ye.namespaceURI!==ee||W!=="*"&&ye.localName!=W||de.push(ye);}),de;});}}).getElementsByTagName,M.prototype.getElementsByTagNameNS=q.prototype.getElementsByTagNameNS,h(q,C),J.prototype.nodeType=2,h(J,C),oe.prototype={data:"",substringData:function(ee,W){return this.data.substring(ee,ee+W);},appendData:function(ee){ee=this.data+ee,this.nodeValue=this.data=ee,this.length=ee.length;},insertData:function(ee,W){this.replaceData(ee,0,W);},appendChild:function(ee){throw new Error(p[c]);},deleteData:function(ee,W){this.replaceData(ee,W,"");},replaceData:function(ye,W,ae){var de=this.data.substring(0,ye),ye=this.data.substring(ye+W);this.nodeValue=this.data=ae=de+ae+ye,this.length=ae.length;}},h(oe,C),Q.prototype={nodeName:"#text",nodeType:3,splitText:function(de){var W=(ae=this.data).substring(de),ae=ae.substring(0,de),de=(this.data=this.nodeValue=ae,this.length=ae.length,this.ownerDocument.createTextNode(W));return this.parentNode&&this.parentNode.insertBefore(de,this.nextSibling),de;}},h(Q,oe),F.prototype={nodeName:"#comment",nodeType:8},h(F,oe),X.prototype={nodeName:"#cdata-section",nodeType:4},h(X,oe),Y.prototype.nodeType=10,h(Y,C),j.prototype.nodeType=12,h(j,C),D.prototype.nodeType=6,h(D,C),$.prototype.nodeType=5,h($,C),ne.prototype.nodeName="#document-fragment",ne.prototype.nodeType=11,h(ne,C),le.prototype.nodeType=7,h(le,C),se.prototype.serializeToString=function(ee,W,ae){return fe.call(ee,W,ae);},C.prototype.toString=fe;try{Object.defineProperty&&(Object.defineProperty(s.prototype,"length",{get:function(){return l(this),this.$$length;}}),Object.defineProperty(C.prototype,"textContent",{get:function(){return function ee(W){switch(W.nodeType){case 1:case 11:var ae=[];for(W=W.firstChild;W;)W.nodeType!==7&&W.nodeType!==8&&ae.push(ee(W)),W=W.nextSibling;return ae.join("");default:return W.nodeValue;}}(this);},set:function(ee){switch(this.nodeType){case 1:case 11:for(;this.firstChild;)this.removeChild(this.firstChild);(ee||String(ee))&&this.appendChild(this.ownerDocument.createTextNode(ee));break;default:this.data=ee,this.value=ee,this.nodeValue=ee;}}}),Re=function(ee,W,ae){ee["$$"+W]=ae;});}catch{}r.DocumentType=Y,r.DOMException=m,r.DOMImplementation=w,r.Element=q,r.Node=C,r.NodeList=a,r.XMLSerializer=se;},function(i,r){i.exports=function(e,t){var n,o=null;try{n=JSON.parse(e,t);}catch(_){o=_;}return[o,n];};},function(i,r,e){var t=e(42);i.exports=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&t(n,o);},i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,e){var t=e(97);r.DOMImplementation=t.DOMImplementation,r.XMLSerializer=t.XMLSerializer,r.DOMParser=e(240).DOMParser;},function(i,r,e){var t=e(243).getUint64;i.exports=function(n){var o=new DataView(n.buffer,n.byteOffset,n.byteLength),_={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:o.getUint32(4),timescale:o.getUint32(8)},E=12,x=(_.version===0?(_.earliestPresentationTime=o.getUint32(E),_.firstOffset=o.getUint32(E+4),E+=8):(_.earliestPresentationTime=t(n.subarray(E)),_.firstOffset=t(n.subarray(E+8)),E+=16),o.getUint16(E+=2));for(E+=2;0<x;E+=12,x--)_.references.push({referenceType:(128&n[E])>>>7,referencedSize:2147483647&o.getUint32(E),subsegmentDuration:o.getUint32(E+4),startsWithSap:!!(128&n[E+8]),sapType:(112&n[E+8])>>>4,sapDeltaTime:268435455&o.getUint32(E+8)});return _;};},function(i,r,e){var t=e(244),n=e(42),o=e(245),_=e(65);function E(x){var h=typeof Map=="function"?new Map():void 0;return i.exports=E=function(y){if(y===null||!o(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(h!==void 0){if(h.has(y))return h.get(y);h.set(y,b);}function b(){return _(y,arguments,t(this).constructor);}return b.prototype=Object.create(y.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),n(b,y);},i.exports.__esModule=!0,i.exports.default=i.exports,E(x);}i.exports=E,i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,x,e){"use strict";e.d(x,"a",function(){return s;});function t(g){var g=/([0-9.]*)?@?([0-9.]*)?/.exec(g||""),f={};return g[1]&&(f.length=parseInt(g[1],10)),g[2]&&(f.offset=parseInt(g[2],10)),f;}function n(l){for(var g,f=l.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),v={},S=f.length;S--;)f[S]!==""&&((g=/([^=]*)=(.*)/.exec(f[S]).slice(1))[0]=g[0].replace(/^\s+|\s+$/g,""),g[1]=g[1].replace(/^\s+|\s+$/g,""),g[1]=g[1].replace(/^['"](.*)['"]$/g,"$1"),v[g[0]]=g[1]);return v;}function o(l){var g={};return Object.keys(l).forEach(function(f){g[a(f)]=l[f];}),g;}function _(O){var g,f,v,S,w,C=O.serverControl,I=O.targetDuration,O=O.partTargetDuration;C&&(g="#EXT-X-SERVER-CONTROL",f="holdBack",v="partHoldBack",S=I&&3*I,w=O&&2*O,I&&!C.hasOwnProperty(f)&&(C[f]=S,this.trigger("info",{message:g+" defaulting HOLD-BACK to targetDuration * 3 ("+S+")."})),S&&C[f]<S&&(this.trigger("warn",{message:g+" clamping HOLD-BACK ("+C[f]+") to targetDuration * 3 ("+S+")"}),C[f]=S),O&&!C.hasOwnProperty(v)&&(C[v]=3*O,this.trigger("info",{message:g+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+C[v]+")."})),O&&C[v]<w&&(this.trigger("warn",{message:g+" clamping PART-HOLD-BACK ("+C[v]+") to partTargetDuration * 2 ("+w+")."}),C[v]=w));}var x=e(4),E=e.n(x),x=function(){function l(){this.listeners={};}var g=l.prototype;return g.on=function(f,v){this.listeners[f]||(this.listeners[f]=[]),this.listeners[f].push(v);},g.off=function(f,v){return this.listeners[f]?(v=this.listeners[f].indexOf(v),this.listeners[f]=this.listeners[f].slice(0),this.listeners[f].splice(v,1),-1<v):!1;},g.trigger=function(f){var v=this.listeners[f];if(v)if(arguments.length===2)for(var S=v.length,w=0;w<S;++w)v[w].call(this,arguments[1]);
63else for(var C=Array.prototype.slice.call(arguments,1),I=v.length,O=0;O<I;++O)v[O].apply(this,C);},g.dispose=function(){this.listeners={};},g.pipe=function(f){this.on("data",function(v){f.push(v);});},l;}(),y=e(11),h=e.n(y),y=e(6),b=e.n(y),p=e(44),c=function(l){function g(){var f=l.call(this)||this;return f.buffer="",f;}return E()(g,l),g.prototype.push=function(f){var v;for(this.buffer+=f,v=this.buffer.indexOf(` 64`);-1<v;v=this.buffer.indexOf(` 65`))this.trigger("data",this.buffer.substring(0,v)),this.buffer=this.buffer.substring(v+1);},g;}(x),d=" ",m=function(l){function g(){var v=l.call(this)||this;return v.customParsers=[],v.tagMappers=[],v;}E()(g,l);var f=g.prototype;return f.push=function(v){var S,w,C=this;(v=v.trim()).length!==0&&(v[0]!=="#"?this.trigger("data",{type:"uri",uri:v}):this.tagMappers.reduce(function(I,O){return O=O(v),O===v?I:I.concat([O]);},[v]).forEach(function(I){for(var O,M,N=0;N<C.customParsers.length;N++)if(C.customParsers[N].call(C,I))return;I.indexOf("#EXT")!==0?C.trigger("data",{type:"comment",text:I.slice(1)}):(I=I.replace("\r",""),(S=/^#EXTM3U/.exec(I))?C.trigger("data",{type:"tag",tagType:"m3u"}):(S=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(I))?(w={type:"tag",tagType:"inf"},S[1]&&(w.duration=parseFloat(S[1])),S[2]&&(w.title=S[2]),C.trigger("data",w)):(S=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(I))?(w={type:"tag",tagType:"targetduration"},S[1]&&(w.duration=parseInt(S[1],10)),C.trigger("data",w)):(S=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(I))?(w={type:"tag",tagType:"version"},S[1]&&(w.version=parseInt(S[1],10)),C.trigger("data",w)):(S=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(I))?(w={type:"tag",tagType:"media-sequence"},S[1]&&(w.number=parseInt(S[1],10)),C.trigger("data",w)):(S=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(I))?(w={type:"tag",tagType:"discontinuity-sequence"},S[1]&&(w.number=parseInt(S[1],10)),C.trigger("data",w)):(S=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(I))?(w={type:"tag",tagType:"playlist-type"},S[1]&&(w.playlistType=S[1]),C.trigger("data",w)):(S=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(I))?(w=h()(t(S[1]),{type:"tag",tagType:"byterange"}),C.trigger("data",w)):(S=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(I))?(w={type:"tag",tagType:"allow-cache"},S[1]&&(w.allowed=!/NO/.test(S[1])),C.trigger("data",w)):(S=/^#EXT-X-MAP:?(.*)$/.exec(I))?(w={type:"tag",tagType:"map"},S[1]&&((M=n(S[1])).URI&&(w.uri=M.URI),M.BYTERANGE&&(w.byterange=t(M.BYTERANGE))),C.trigger("data",w)):(S=/^#EXT-X-STREAM-INF:?(.*)$/.exec(I))?(w={type:"tag",tagType:"stream-inf"},S[1]&&(w.attributes=n(S[1]),w.attributes.RESOLUTION&&(M={},(O=w.attributes.RESOLUTION.split("x"))[0]&&(M.width=parseInt(O[0],10)),O[1]&&(M.height=parseInt(O[1],10)),w.attributes.RESOLUTION=M),w.attributes.BANDWIDTH&&(w.attributes.BANDWIDTH=parseInt(w.attributes.BANDWIDTH,10)),w.attributes["FRAME-RATE"]&&(w.attributes["FRAME-RATE"]=parseFloat(w.attributes["FRAME-RATE"])),w.attributes["PROGRAM-ID"]&&(w.attributes["PROGRAM-ID"]=parseInt(w.attributes["PROGRAM-ID"],10))),C.trigger("data",w)):(S=/^#EXT-X-MEDIA:?(.*)$/.exec(I))?(w={type:"tag",tagType:"media"},S[1]&&(w.attributes=n(S[1])),C.trigger("data",w)):(S=/^#EXT-X-ENDLIST/.exec(I))?C.trigger("data",{type:"tag",tagType:"endlist"}):(S=/^#EXT-X-DISCONTINUITY/.exec(I))?C.trigger("data",{type:"tag",tagType:"discontinuity"}):(S=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(I))?(w={type:"tag",tagType:"program-date-time"},S[1]&&(w.dateTimeString=S[1],w.dateTimeObject=new Date(S[1])),C.trigger("data",w)):(S=/^#EXT-X-KEY:?(.*)$/.exec(I))?(w={type:"tag",tagType:"key"},S[1]&&(w.attributes=n(S[1]),w.attributes.IV&&(w.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(w.attributes.IV=w.attributes.IV.substring(2)),w.attributes.IV=w.attributes.IV.match(/.{8}/g),w.attributes.IV[0]=parseInt(w.attributes.IV[0],16),w.attributes.IV[1]=parseInt(w.attributes.IV[1],16),w.attributes.IV[2]=parseInt(w.attributes.IV[2],16),w.attributes.IV[3]=parseInt(w.attributes.IV[3],16),w.attributes.IV=new Uint32Array(w.attributes.IV))),C.trigger("data",w)):(S=/^#EXT-X-START:?(.*)$/.exec(I))?(w={type:"tag",tagType:"start"},S[1]&&(w.attributes=n(S[1]),w.attributes["TIME-OFFSET"]=parseFloat(w.attributes["TIME-OFFSET"]),w.attributes.PRECISE=/YES/.test(w.attributes.PRECISE)),C.trigger("data",w)):(S=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(I))?(w={type:"tag",tagType:"cue-out-cont"},S[1]?w.data=S[1]:w.data="",C.trigger("data",w)):(S=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(I))?(w={type:"tag",tagType:"cue-out"},S[1]?w.data=S[1]:w.data="",C.trigger("data",w)):(S=/^#EXT-X-CUE-IN:?(.*)?$/.exec(I))?(w={type:"tag",tagType:"cue-in"},S[1]?w.data=S[1]:w.data="",C.trigger("data",w)):(S=/^#EXT-X-SKIP:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"skip"}).attributes=n(S[1]),w.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(w.attributes["SKIPPED-SEGMENTS"]=parseInt(w.attributes["SKIPPED-SEGMENTS"],10)),w.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(w.attributes["RECENTLY-REMOVED-DATERANGES"]=w.attributes["RECENTLY-REMOVED-DATERANGES"].split(d)),C.trigger("data",w)):(S=/^#EXT-X-PART
65:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"part"}).attributes=n(S[1]),["DURATION"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=parseFloat(w.attributes[G]));}),["INDEPENDENT","GAP"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=/YES/.test(w.attributes[G]));}),w.attributes.hasOwnProperty("BYTERANGE")&&(w.attributes.byterange=t(w.attributes.BYTERANGE)),C.trigger("data",w)):(S=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"server-control"}).attributes=n(S[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=parseFloat(w.attributes[G]));}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=/YES/.test(w.attributes[G]));}),C.trigger("data",w)):(S=/^#EXT-X-PART-INF:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"part-inf"}).attributes=n(S[1]),["PART-TARGET"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=parseFloat(w.attributes[G]));}),C.trigger("data",w)):(S=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"preload-hint"}).attributes=n(S[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(G){var H;w.attributes.hasOwnProperty(G)&&(w.attributes[G]=parseInt(w.attributes[G],10),H=G==="BYTERANGE-LENGTH"?"length":"offset",w.attributes.byterange=w.attributes.byterange||{},w.attributes.byterange[H]=w.attributes[G],delete w.attributes[G]);}),C.trigger("data",w)):(S=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(I))&&S[1]?((w={type:"tag",tagType:"rendition-report"}).attributes=n(S[1]),["LAST-MSN","LAST-PART"].forEach(function(G){w.attributes.hasOwnProperty(G)&&(w.attributes[G]=parseInt(w.attributes[G],10));}),C.trigger("data",w)):C.trigger("data",{type:"tag",data:I.slice(4)}));}));},f.addParser=function(v){var S=this,w=v.expression,C=v.customType,I=v.dataParser,O=v.segment;typeof I!="function"&&(I=function(M){return M;}),this.customParsers.push(function(M){if(w.exec(M))return S.trigger("data",{type:"custom",data:I(M),customType:C,segment:O}),!0;});},f.addTagMapper=function(v){var S=v.expression,w=v.map;this.tagMappers.push(function(C){return S.test(C)?w(C):C;});},g;}(x),a=function(l){return l.toLowerCase().replace(/-(\w)/g,function(g){return g[1].toUpperCase();});},s=function(l){function g(){var v,S,w=l.call(this)||this,C=(w.lineStream=new c(),w.parseStream=new m(),w.lineStream.pipe(w.parseStream),b()(w)),I=[],O={},M=!1,N={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},G=0,H=(w.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},0),B=0;return w.on("end",function(){O.uri||!O.parts&&!O.preloadHints||(!O.map&&v&&(O.map=v),!O.key&&S&&(O.key=S),O.timeline||typeof G!="number"||(O.timeline=G),w.manifest.preloadSegment=O);}),w.parseStream.on("data",function(z){var te,K;({tag:function(){(({version:function(){z.version&&(this.manifest.version=z.version);},"allow-cache":function(){this.manifest.allowCache=z.allowed,"allowed"in z||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0);},byterange:function(){var V={};"length"in z&&((O.byterange=V).length=z.length,"offset"in z||(z.offset=H)),"offset"in z&&((O.byterange=V).offset=z.offset),H=V.offset+V.length;},endlist:function(){this.manifest.endList=!0;},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),0<z.duration&&(O.duration=z.duration),z.duration===0&&(O.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=I;},key:function(){if(z.attributes){if(z.attributes.METHOD==="NONE")S=null;else if(z.attributes.URI){if(z.attributes.KEYFORMAT==="com.apple.streamingkeydelivery")this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:z.attributes};else if(z.attributes.KEYFORMAT==="com.microsoft.playready")this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:z.attributes.URI};else{if(z.attributes.KEYFORMAT==="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed")return["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(z.attributes.METHOD)===-1?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):(z.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),z.attributes.URI.substring(0,23)!=="data:text/plain;base64,"?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):z.attributes.KEYID&&z.attributes.KEYID.substring(0,2)==="0x"?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:z.attributes.KEYFORMAT,keyId:z.attributes.KEYID.substring(2)},pssh:Object(p.a)(z.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));z.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),S={method:z.attributes.METHOD||"AES-128",uri:z.attributes.URI},z.attributes.IV!==void 0&&(S.iv=z.attributes.IV);}}else this.trigger("warn",{message:"ignoring key declaration without URI"});}else this.trigger("warn",{message:"ignoring key declaration without attribute list"});},"media-sequence":function(){isFinite(z.number)?this.manifest.mediaSequence=z.
65number:this.trigger("warn",{message:"ignoring invalid media sequence: "+z.number});},"discontinuity-sequence":function(){isFinite(z.number)?(this.manifest.discontinuitySequence=z.number,G=z.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+z.number});},"playlist-type":function(){/VOD|EVENT/.test(z.playlistType)?this.manifest.playlistType=z.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+z.playlist});},map:function(){v={},z.uri&&(v.uri=z.uri),z.byterange&&(v.byterange=z.byterange),S&&(v.key=S);},"stream-inf":function(){this.manifest.playlists=I,this.manifest.mediaGroups=this.manifest.mediaGroups||N,z.attributes?(O.attributes||(O.attributes={}),h()(O.attributes,z.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"});},media:function(){var V;this.manifest.mediaGroups=this.manifest.mediaGroups||N,z.attributes&&z.attributes.TYPE&&z.attributes["GROUP-ID"]&&z.attributes.NAME?((V=this.manifest.mediaGroups[z.attributes.TYPE])[z.attributes["GROUP-ID"]]=V[z.attributes["GROUP-ID"]]||{},te=V[z.attributes["GROUP-ID"]],(K={default:/yes/i.test(z.attributes.DEFAULT)}).default?K.autoselect=!0:K.autoselect=/yes/i.test(z.attributes.AUTOSELECT),z.attributes.LANGUAGE&&(K.language=z.attributes.LANGUAGE),z.attributes.URI&&(K.uri=z.attributes.URI),z.attributes["INSTREAM-ID"]&&(K.instreamId=z.attributes["INSTREAM-ID"]),z.attributes.CHARACTERISTICS&&(K.characteristics=z.attributes.CHARACTERISTICS),z.attributes.FORCED&&(K.forced=/yes/i.test(z.attributes.FORCED)),te[z.attributes.NAME]=K):this.trigger("warn",{message:"ignoring incomplete or missing media group"});},discontinuity:function(){G+=1,O.discontinuity=!0,this.manifest.discontinuityStarts.push(I.length);},"program-date-time":function(){this.manifest.dateTimeString===void 0&&(this.manifest.dateTimeString=z.dateTimeString,this.manifest.dateTimeObject=z.dateTimeObject),O.dateTimeString=z.dateTimeString,O.dateTimeObject=z.dateTimeObject;},targetduration:function(){!isFinite(z.duration)||z.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+z.duration}):(this.manifest.targetDuration=z.duration,_.call(this,this.manifest));},start:function(){!z.attributes||isNaN(z.attributes["TIME-OFFSET"])?this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"}):this.manifest.start={timeOffset:z.attributes["TIME-OFFSET"],precise:z.attributes.PRECISE};},"cue-out":function(){O.cueOut=z.data;},"cue-out-cont":function(){O.cueOutCont=z.data;},"cue-in":function(){O.cueIn=z.data;},skip:function(){this.manifest.skip=o(z.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",z.attributes,["SKIPPED-SEGMENTS"]);},part:function(){var V=this,U=(M=!0,this.manifest.segments.length),Z=o(z.attributes),Z=(O.parts=O.parts||[],O.parts.push(Z),Z.byterange&&(Z.byterange.hasOwnProperty("offset")||(Z.byterange.offset=B),B=Z.byterange.offset+Z.byterange.length),O.parts.length-1);this.warnOnMissingAttributes_("#EXT-X-PART #"+Z+" for segment #"+U,z.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(re,ue){re.hasOwnProperty("lastPart")||V.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+ue+" lacks required attribute(s): LAST-PART"});});},"server-control":function(){var V=this.manifest.serverControl=o(z.attributes);V.hasOwnProperty("canBlockReload")||(V.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),_.call(this,this.manifest),V.canSkipDateranges&&!V.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"});},"preload-hint":function(){var V=this.manifest.segments.length,U=o(z.attributes),Z=U.type&&U.type==="PART",re=(O.preloadHints=O.preloadHints||[],O.preloadHints.push(U),!U.byterange||U.byterange.hasOwnProperty("offset")||(U.byterange.offset=Z?B:0,Z&&(B=U.byterange.offset+U.byterange.length)),O.preloadHints.length-1);if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+re+" for segment #"+V,z.attributes,["TYPE","URI"]),U.type)for(var ue=0;ue<O.preloadHints.length-1;ue++){var q=O.preloadHints[ue];q.type&&q.type===U.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+re+" for segment #"+V+" has the same TYPE "+U.type+" as preload hint #"+ue});}},"rendition-report":function(){var V=o(z.attributes),V=(this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(V),this.manifest.renditionReports.length-1),U=["LAST-MSN","URI"];M&&U.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+V,z.attributes,U);},"part-inf":function(){this.manifest.partInf=o(z.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",z.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),_.call(this,this.manifest);}})[z.tagType]||function(){}).call(C);},uri:function(){O.uri=z.uri,I.push(O),!this.manifest.targetDuration||"duration"in O||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),O.duration=this.manifest.targetDuration),S&&(O.key=S),O.timeline=G,v&&(O.map=v),B=0,O={};},comment:function(){},custom:function(){z.segment?(O.custom=O.custom||{},O.custom[z.customType]=z.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[z.customType]=z.data);}})[z.type].call(C);}),w;}E()(g,l);var f=g.prototype;return f.warnOnMissingAttributes_=function(v,S,w){var C=[];
65w.forEach(function(I){S.hasOwnProperty(I)||C.push(I);}),C.length&&this.trigger("warn",{message:v+" lacks required attribute(s): "+C.join(", ")});},f.push=function(v){this.lineStream.push(v);},f.end=function(){this.lineStream.push(` 66`),this.trigger("end");},f.addParser=function(v){this.parseStream.addParser(v);},f.addTagMapper=function(v){this.parseStream.addTagMapper(v);},g;}(x);},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.BasicEffect=void 0;var o=E(5),_=E(19),E=function(){function x(p,c){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this.preserveInStudio=!1,this._studioCurrentTime=0,this._type=c,this._adaptingEffect=p,this._attributes=Object.assign({},p.attributes),this.scale=this._attributes.scale||1,this._vDOM=this.buildVDOM(),this._guid=p.guid!==void 0?p.guid:o.default.shortGUID(),this._standalone=p.standalone;}return h=x,(y=[{key:"buildVDOM",value:function(){var p;return o.default.surpass((delete(p=_.VDOMConstructor.builder(this))._attributes.startTime,delete p._attributes.endTime,p));}},{key:"vDom",get:function(){return this._vDOM;}},{key:"type",get:function(){return this._type;}},{key:"attributes",get:function(){return this._attributes;},set:function(p){this._attributes=p;}},{key:"adaptingEffect",get:function(){return this._adaptingEffect;}},{key:"guid",get:function(){return this._guid;}},{key:"standalone",get:function(){return this._standalone;}},{key:"parseCss",value:function(p){return p=(p=p&&p!=="auto"?p:"0px").match(/^([+-]?(?:\d+\.|\d*\.?\d+))(px|%)?$/),p?{num:Number(p[1]),ext:p[2]}:{num:0,ext:"px"};}},{key:"onStudioReady",value:function(p){this._studioCurrentTime=p.time;}}])&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.BasicEffect=E;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(){n=function(){return d;};var c,d={},m=Object.prototype,a=m.hasOwnProperty,s=Object.defineProperty||function(J,oe,Q){J[oe]=Q.value;},z=typeof Symbol=="function"?Symbol:{},l=z.iterator||"@@iterator",g=z.asyncIterator||"@@asyncIterator",f=z.toStringTag||"@@toStringTag";function v(J,oe,Q){return Object.defineProperty(J,oe,{value:Q,enumerable:!0,configurable:!0,writable:!0}),J[oe];}try{v({},"");}catch{v=function(oe,Q,F){return oe[Q]=F;};}function S(J,$,Q,ne){var X,Y,j,D,$=$&&$.prototype instanceof G?$:G,$=Object.create($.prototype),ne=new ue(ne||[]);return s($,"_invoke",{value:(X=J,Y=Q,j=ne,D=C,function(le,se){if(D===O)throw Error("Generator is already running");if(D===M){if(le==="throw")throw se;return{value:c,done:!0};}for(j.method=le,j.arg=se;;){var fe=j.delegate;if(fe&&(fe=function ge(he,_e){var Re=_e.method,ee=he.iterator[Re];return ee===c?(_e.delegate=null,Re==="throw"&&he.iterator.return&&(_e.method="return",_e.arg=c,ge(he,_e),_e.method==="throw")||Re!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+Re+"' method")),N):(Re=w(ee,he.iterator,_e.arg),Re.type==="throw"?(_e.method="throw",_e.arg=Re.arg,_e.delegate=null,N):(ee=Re.arg,ee?ee.done?(_e[he.resultName]=ee.value,_e.next=he.nextLoc,_e.method!=="return"&&(_e.method="next",_e.arg=c),_e.delegate=null,N):ee:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,N)));}(fe,j),fe)){if(fe===N)continue;return fe;}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(D===C)throw D=M,j.arg;j.dispatchException(j.arg);}else j.method==="return"&&j.abrupt("return",j.arg);if(D=O,fe=w(X,Y,j),fe.type==="normal"){if(D=j.done?M:I,fe.arg===N)continue;return{value:fe.arg,done:j.done};}fe.type==="throw"&&(D=M,j.method="throw",j.arg=fe.arg);}})}),$;}function w(J,oe,Q){try{return{type:"normal",arg:J.call(oe,Q)};}catch(F){return{type:"throw",arg:F};}}d.wrap=S;var C="suspendedStart",I="suspendedYield",O="executing",M="completed",N={};function G(){}function H(){}function B(){}var z={},te=(v(z,l,function(){return this;}),Object.getPrototypeOf),te=te&&te(te(q([]))),K=(te&&te!==m&&a.call(te,l)&&(z=te),B.prototype=G.prototype=Object.create(z));
66function V(J){["next","throw","return"].forEach(function(oe){v(J,oe,function(Q){return this._invoke(oe,Q);});});}function U(J,oe){var Q;s(this,"_invoke",{value:function(F,X){function Y(){return new oe(function(j,D){(function $(he,le,se,fe){var ge,he=w(J[he],J,le);if(he.type!=="throw")return(le=(ge=he.arg).value)&&t(le)=="object"&&a.call(le,"__await")?oe.resolve(le.__await).then(function(_e){$("next",_e,se,fe);},function(_e){$("throw",_e,se,fe);}):oe.resolve(le).then(function(_e){ge.value=_e,se(ge);},function(_e){return $("throw",_e,se,fe);});fe(he.arg);})(F,X,j,D);});}return Q=Q?Q.then(Y,Y):Y();}});}function Z(J){var oe={tryLoc:J[0]};1 in J&&(oe.catchLoc=J[1]),2 in J&&(oe.finallyLoc=J[2],oe.afterLoc=J[3]),this.tryEntries.push(oe);}function re(J){var oe=J.completion||{};oe.type="normal",delete oe.arg,J.completion=oe;}function ue(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(Z,this),this.reset(!0);}function q(J){if(J||J===""){var oe,Q=J[l];if(Q)return Q.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length))return oe=-1,(Q=function F(){for(;++oe<J.length;)if(a.call(J,oe))return F.value=J[oe],F.done=!1,F;return F.value=c,F.done=!0,F;}).next=Q;}throw new TypeError(t(J)+" is not iterable");}return s(K,"constructor",{value:H.prototype=B,configurable:!0}),s(B,"constructor",{value:H,configurable:!0}),H.displayName=v(B,f,"GeneratorFunction"),d.isGeneratorFunction=function(J){return J=typeof J=="function"&&J.constructor,!!J&&(J===H||(J.displayName||J.name)==="GeneratorFunction");},d.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,B):(J.__proto__=B,v(J,f,"GeneratorFunction")),J.prototype=Object.create(K),J;},d.awrap=function(J){return{__await:J};},V(U.prototype),v(U.prototype,g,function(){return this;}),d.AsyncIterator=U,d.async=function(J,oe,Q,F,X){X===void 0&&(X=Promise);var Y=new U(S(J,oe,Q,F),X);return d.isGeneratorFunction(oe)?Y:Y.next().then(function(j){return j.done?j.value:Y.next();});},V(K),v(K,f,"Generator"),v(K,l,function(){return this;}),v(K,"toString",function(){return"[object Generator]";}),d.keys=function(J){var oe,Q=Object(J),F=[];for(oe in Q)F.push(oe);return F.reverse(),function X(){for(;F.length;){var Y=F.pop();if(Y in Q)return X.value=Y,X.done=!1,X;}return X.done=!0,X;};},d.values=q,ue.prototype={constructor:ue,reset:function(J){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(re),!J)for(var oe in this)oe.charAt(0)==="t"&&a.call(this,oe)&&!isNaN(+oe.slice(1))&&(this[oe]=c);},stop:function(){this.done=!0;var J=this.tryEntries[0].completion;if(J.type==="throw")throw J.arg;return this.rval;},dispatchException:function(J){if(this.done)throw J;var oe=this;function Q($,ne){return Y.type="throw",Y.arg=J,oe.next=$,ne&&(oe.method="next",oe.arg=c),!!ne;}for(var F=this.tryEntries.length-1;0<=F;--F){var X=this.tryEntries[F],Y=X.completion;if(X.tryLoc==="root")return Q("end");if(X.tryLoc<=this.prev){var j=a.call(X,"catchLoc"),D=a.call(X,"finallyLoc");if(j&&D){if(this.prev<X.catchLoc)return Q(X.catchLoc,!0);if(this.prev<X.finallyLoc)return Q(X.finallyLoc);}else if(j){if(this.prev<X.catchLoc)return Q(X.catchLoc,!0);}else{if(!D)throw Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return Q(X.finallyLoc);}}}},abrupt:function(J,oe){for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q];if(F.tryLoc<=this.prev&&a.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var X=F;break;}}var Y=(X=X&&(J==="break"||J==="continue")&&X.tryLoc<=oe&&oe<=X.finallyLoc?null:X)?X.completion:{};return Y.type=J,Y.arg=oe,X?(this.method="next",this.next=X.finallyLoc,N):this.complete(Y);},complete:function(J,oe){if(J.type==="throw")throw J.arg;return J.type==="break"||J.type==="continue"?this.next=J.arg:J.type==="return"?(this.rval=this.arg=J.arg,this.method="return",this.next="end"):J.type==="normal"&&oe&&(this.next=oe),N;},finish:function(J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),re(Q),N;}},catch:function(J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q,F,X=this.tryEntries[oe];if(X.tryLoc===J)return(Q=X.completion).type==="throw"&&(F=Q.arg,re(X)),F;}throw Error("illegal catch attempt");},delegateYield:function(J,oe,Q){return this.delegate={iterator:q(J),resultName:oe,nextLoc:Q},this.method==="next"&&(this.arg=c),N;}},d;}function o(c,d){var m,a=typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(!a){if(Array.isArray(c)||(a=function(f,v){if(f){if(typeof f=="string")return _(f,v);var S={}.toString.call(f).slice(8,-1);return(S=S==="Object"&&f.constructor?f.constructor.name:S)==="Map"||S==="Set"?Array.from(f):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?_(f,v):void 0;}}(c))||d&&c&&typeof c.length=="number")return a&&(c=a),m=0,{s:d=function(){},n:function(){return m>=c.length?{done:!0}:{done:!1,value:c[m++]};},e:function(f){throw f;},f:d};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 67In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var s,l=!0,g=!1;return{s:function(){a=a.call(c);},n:function(){var f=a.next();return l=f.done,f;},e:function(f){g=!0,s=f;},f:function(){try{l||a.return==null||a.return();}finally{if(g)throw s;}}};}function _(c,d){(d==null||d>c.length)&&(d=c.length);for(var m=0,a=Array(d);m<d;m++)a[m]=c[m];return a;}function E(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}var x=this&&this.__awaiter||function(c,d,m,a){return new(m=m||Promise)(function(s,l){function g(S){try{v(a.next(S));}catch(w){l(w);}}function f(S){try{v(a.throw(S));}catch(w){l(w);}}function v(S){var w;S.done?s(S.value):((w=S.value)instanceof m?w:new m(function(C){C(w);})).then(g,f);}v((a=a.apply(c,d||[])).next());});}
67,h=(Object.defineProperty(r,"__esModule",{value:!0}),p(249)),y=p(73),b=p(5),p=function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");}return d=c,a=[{key:"createComponents",value:function(s,l){var g=[];if(Array.isArray(s)){var f,v=o(s);try{for(v.s();!(f=v.n()).done;){var S=f.value,w=h.default.createComponent(S,l);w&&g.push(w);}}catch(C){v.e(C);}finally{v.f();}}return g;}},{key:"renderComponents",value:function(s,l,g){return x(this,void 0,void 0,n().mark(function f(){return n().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,y.default.renderComponents(s,l,g);case 2:case"end":return v.stop();}},f);}));}},{key:"renderComponentsTimeline",value:function(s,l,g){try{s.forEach(function(f){f.renderTimeline(l);});}catch(f){throw b.default.debug("[".concat(g||"","]: Could not render timeline components")),f;}}}],(m=null)&&E(d.prototype,m),a&&E(d,a),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,m,a;}();r.default=p;},function(i,r,y){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(b,p){return function(c){if(Array.isArray(c))return c;}(b)||function(c,d){var m=c==null?null:typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(m!=null){var a,s,l,g,f=[],v=!0,S=!1;try{if(l=(m=m.call(c)).next,d===0){if(Object(m)!==m)return;v=!1;}else for(;!(v=(a=l.call(m)).done)&&(f.push(a.value),f.length!==d);v=!0);}catch(w){S=!0,s=w;}finally{try{if(!v&&m.return!=null&&(g=m.return(),Object(g)!==g))return;}finally{if(S)throw s;}}return f;}}(b,p)||_(b,p)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 68In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(b,p){var c,d=typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(!d){if(Array.isArray(b)||(d=_(b))||p&&b&&typeof b.length=="number")return d&&(b=d),c=0,{s:p=function(){},n:function(){return c>=b.length?{done:!0}:{done:!1,value:b[c++]};},e:function(l){throw l;},f:p};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 69In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var m,a=!0,s=!1;return{s:function(){d=d.call(b);},n:function(){var l=d.next();return a=l.done,l;},e:function(l){s=!0,m=l;},f:function(){try{a||d.return==null||d.return();}finally{if(s)throw m;}}};}function _(b,p){if(b){if(typeof b=="string")return E(b,p);var c={}.toString.call(b).slice(8,-1);return(c=c==="Object"&&b.constructor?b.constructor.name:c)==="Map"||c==="Set"?Array.from(b):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?E(b,p):void 0;}}function E(b,p){(p==null||p>b.length)&&(p=b.length);for(var c=0,d=Array(p);c<p;c++)d[c]=b[c];return d;}function x(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(t(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),t(m)=="symbol"?m:m+"";}(d.key),d);}}Object.defineProperty(r,"__esModule",{value:!0});var h=y(5),y=function(){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.storageMap=new Map(),this.inflight=new Map(),this.generation=0;}return p=b,d=[{key:"getInstance",value:function(m){return b.instances.has(m)||b.instances.set(m,new b()),b.instances.get(m);}},{key:"disposeInstance",value:function(m){var a=b.instances.get(m);a&&(a.revokeAll(),b.instances.delete(m));}}],(c=[{key:"printStorageMap",value:function(){h.default.debug("storageMap (".concat(this.storageMap.size," entries)"));var m,a=o(this.storageMap);try{for(a.s();!(m=a.n()).done;){var s=n(m.value,2),l=s[0],g=s[1];h.default.debug("[blob] ".concat(l.slice(8,200)," \u2192 ").concat(g.blobURL?"has blob":"null"," refCount:").concat(g.refCount));}}catch(f){a.e(f);}finally{a.f();}}},{key:"printPendingRevoke",value:function(){h.default.debug("pendingRevoke is retired \u2014 ref-count sweep is used instead");}},{key:"reserve",value:function(m){var a=this.storageMap.get(m);a?a.refCount++:this.storageMap.set(m,{blobURL:null,refCount:1});}},{key:"getOrCreate",value:function(m,a){var s=this,g=this.storageMap.get(m);
69if(g&&g.blobURL)return h.default.debug("[getOrCreate] cache hit for key: ".concat(m.slice(8,200))),Promise.resolve(g.blobURL);var l,g=this.inflight.get(m);return g||(l=this.generation,g=a().then(function(f){if(h.default.debug("[getOrCreate] fetched blob for key: ".concat(m.slice(8,200))),s.generation!==l)throw new Error("BlobURLRegistry was reset during fetch");var v=s.storageMap.get(m);if(v)return v.blobURL=URL.createObjectURL(f),v.blobURL;throw new Error("BlobURLRegistry entry was swept during fetch");}).finally(function(){return s.inflight.delete(m);}),this.inflight.set(m,g)),g;}},{key:"resetRefCounts",value:function(){var m,a=o(this.storageMap.values());try{for(a.s();!(m=a.n()).done;)m.value.refCount=0;}catch(s){a.e(s);}finally{a.f();}}},{key:"sweepUnreferenced",value:function(){var m,a=o(this.storageMap);try{for(a.s();!(m=a.n()).done;){var s=n(m.value,2),l=s[0],g=s[1];g.refCount===0&&(g.blobURL&&URL.revokeObjectURL(g.blobURL),this.storageMap.delete(l));}}catch(f){a.e(f);}finally{a.f();}}},{key:"revokeAll",value:function(){this.generation++;var m,a=o(this.storageMap.values());try{for(a.s();!(m=a.n()).done;){var s=m.value;s.blobURL&&URL.revokeObjectURL(s.blobURL);}}catch(l){a.e(l);}finally{a.f();}this.storageMap.clear(),this.inflight.clear();}}])&&x(p.prototype,c),d&&x(p,d),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,c,d;}();(r.default=y).instances=new Map();},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.LoadingScheduler=void 0;var o=function(){function _(){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");}return E=_,h=[{key:"getInstance",value:function(){return this._instance||(this._instance=new this());}}],(x=[{key:"setMediaTimeline",value:function(y){this.mediaTimeLines=y;}},{key:"setSlidesTimeline",value:function(y){this.slidesTimeline=y.sort(function(b,p){return b.compareTo(p);});}},{key:"getMediaTimelines",value:function(){return this.mediaTimeLines;}},{key:"getMediaTimeline",value:function(y){return this.mediaTimeLines.get(y);}},{key:"clear",value:function(){this.mediaTimeLines=void 0,this.slidesTimeline=void 0;}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.LoadingScheduler=o;},function(i,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isMediaSource=void 0,r.isMediaSource=function(t){return t.MediaURL!==void 0;};},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}Object.defineProperty(r,"__esModule",{value:!0}),r.AudioEffectFactory=void 0;var o=x(330),_=x(331),E=x(332),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");}
69return y=h,p=[{key:"createEffect",value:function(c){switch(c.type){case"volume":return new o.VolumeAudioEffect(c);case"volumeMuted":return new E.VolumeMutedAudioEffect(c);case"fade":return new _.VolumeFadeEffect(c);default:return;}}}],(b=null)&&n(y.prototype,b),p&&n(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.AudioEffectFactory=x;},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.AudioBasicEffect=void 0;var o=function(){function _(y){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.attributes=y.attributes,this._type=y.type,this.duration=this.attributes.duration,this.absoluteStartTime=((y=this.attributes.startTime)!=null?y:0)+((y=this.attributes.offsetTime)!=null?y:0),this.absoluteEndTime=this.absoluteStartTime+((y=this.attributes.duration)!=null?y:0);}return E=_,(x=[{key:"type",get:function(){return this._type;}},{key:"apply",value:function(y,b,p){this.gainNode=b,this.timeline=p,this.player=y;}},{key:"getPlayerVolume",value:function(){var y;return(y=this.player)!=null&&y.loaderObj?this.player.loaderObj.loader.volume:this.gainNode?this.gainNode.gain.value:this.player?this.player.volume:void 0;}},{key:"setPlayerVolume",value:function(y){var b;(b=this.player)!=null&&b.loaderObj?this.player.loaderObj.loader.volume=y:this.gainNode?this.gainNode.gain.value=y:this.player&&(this.player.volume=y);}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.AudioBasicEffect=o;},function(i,r,y){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(b,p){if(!(b instanceof p))throw new TypeError("Cannot call a class as a function");}function o(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(t(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),t(m)=="symbol"?m:m+"";}(d.key),d);}}function _(b,p,c){return p&&o(b.prototype,p),c&&o(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;}Object.defineProperty(r,"__esModule",{value:!0}),r.AudioComponentBase=void 0;var E=y(5),x=y(45),h=function(){return _(function b(p){n(this,b),this._seek=0,this._startTime=p.startTime,this._endTime=p.endTime,p.hasOwnProperty("seek")&&(this._seek=p.seek);},[{key:"startTime",get:function(){return this._startTime;}},{key:"endTime",get:function(){return this._endTime;}},{key:"seek",get:function(){return this._seek;}}]);}(),y=function(){return _(function b(p,c,d){n(this,b),this._attributes=new h(p.attributes),this._componentId=p.id,this._audioResources=c,d.useGainVolume&&(this._useGainVolume=!0,x.AudioContextSingleton.getInstance()),this._effects=[],this._src=E.default.replaceAssetUrl(p.src.url),this.setAudioType(p.id);},[{key:"containsTime",value:function(b){return b>=this._attributes.startTime&&b<=this._attributes.endTime;}},{key:"audioType",value:function(){return this._type;}},{key:"setAudioType",value:function(b){b=b.split("-")[0],this._type=b;}}]);}();r.AudioComponentBase=y;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){var b,p=typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(!p){if(Array.isArray(h)||(p=function(a,s){if(a){if(typeof a=="str
69ing")return o(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?o(a,s):void 0;}}(h))||y&&h&&typeof h.length=="number")return p&&(h=p),b=0,{s:y=function(){},n:function(){return b>=h.length?{done:!0}:{done:!1,value:h[b++]};},e:function(a){throw a;},f:y};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 70In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var c,d=!0,m=!1;return{s:function(){p=p.call(h);},n:function(){var a=p.next();return d=a.done,a;},e:function(a){m=!0,c=a;},f:function(){try{d||p.return==null||p.return();}finally{if(m)throw c;}}};}function o(h,y){(y==null||y>h.length)&&(y=h.length);for(var b=0,p=Array(y);b<y;b++)p[b]=h[b];return p;}function _(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}Object.defineProperty(r,"__esModule",{value:!0}),r.RenderStrategy=r.PriorityRender=r.JobTypes=void 0;var E=x(5),x=((x=r.JobTypes||(r.JobTypes={}))[x.SCREENSHOTJOBS=0]="SCREENSHOTJOBS",x[x.OVERLAYJOBS=1]="OVERLAYJOBS",(x=r.PriorityRender||(r.PriorityRender={}))[x.FULL_RENDER=0]="FULL_RENDER",x[x.FULL_RENDER_STANDALONE=1]="FULL_RENDER_STANDALONE",x[x.FRONT_VIEW_CHANGE=2]="FRONT_VIEW_CHANGE",x[x.FRONT_VIEW_UNCHANGED=3]="FRONT_VIEW_UNCHANGED",x[x.NO_FRONT_VIEW=4]="NO_FRONT_VIEW",function(){function h(c){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this.previewer=c;}return y=h,p=[{key:"tagJobs",value:function(c,d){return c.forEach(function(m){return m.info=d;}),c;}},{key:"completeKeys",value:function(c,d,m){if(!c)return c;var a,s=[],l=d,g=n(c=c.sort(function(v,S){return v.start-S.start;}));try{for(g.s();!(a=g.n()).done;){var f=a.value;l<f.start&&s.push({start:l,end:f.start}),s.push(f),l=f.end;}}catch(v){g.e(v);}finally{g.f();}return l<m&&s.push({start:l,end:m}),s.sort(function(v,S){return v.start-S.start;});}},{key:"mergeConsequentIntervals",value:function(c){if(c)return E.default.cloneDeep(c).sort(function(d,m){return d.start-m.start;}).reduce(function(d,m){return!d.length||d[d.length-1].end<m.start?d.push(m):d[d.length-1].end=Math.max(d[d.length-1].end,m.end),d;},[]);}},{key:"tagWithIndex",value:function(c){var d,m=E.default.cloneDeep(c),a=(m.jobs=m.jobs.flat().sort(function(l,g){return l.start-g.start;}),m.jobs.forEach(function(l,g){return Object.assign(l,{index:g});}),n(c.jobs));try{for(a.s();!(d=a.n()).done;){var s=d.value;Array.isArray(s)&&s.forEach(function(l){return Object.assign(l,m.jobs.find(function(g){return g.start===l.start&&g.end===l.end&&g.info===l.info;}));});}}catch(l){a.e(l);}finally{a.f();}return c;}}],(b=[{key:"accumulatedGapComparator",value:function(c,d){return c=c.reduce(function(m,a){return m+(a.end-a.start);},0),d.reduce(function(m,a){return m+(a.end-a.start);},0)-c;}}])&&_(y.prototype,b),p&&_(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}());(r.RenderStrategy=x).MAX_BG_REMOVAL_JOB_IN_SEC=1;},,function(i,r,I){"use strict";function t(O){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M;}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M;})(O);}function n(O,M){var N,G=typeof Symbol<"u"&&O[Symbol.iterator]||O["@@iterator"];if(!G){if(Array.isArray(O)||(G=function(te,K){if(te){if(typeof te=="string")return o(te,K);var V={}.toString.call(te).slice(8,-1);return(V=V==="Object"&&te.constructor?te.constructor.name:V)==="Map"||V==="Set"?Array.from(te):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?o(te,K):void 0;}}(O))||M&&O&&typeof O.length=="number")return G&&(O=G),N=0,{s:M=function(){},n:function(){return N>=O.length?{done:!0}:{done:!1,value:O[N++]};},e:function(te){throw te;},f:M};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 71In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var H,B=!0,z=!1;return{s:function(){G=G.call(O);},n:function(){var te=G.next();return B=te.done,te;},e:function(te){z=!0,H=te;},f:function(){try{B||G.return==null||G.return();}finally{if(z)throw H;}}};}function o(O,M){(M==null||M>O.length)&&(M=O.length);for(var N=0,G=Array(M);N<M;N++)G[N]=O[N];return G;}function _(){_=function(){return M;};var O,M={},N=Object.prototype,G=N.hasOwnProperty,H=Object.defineProperty||function(ge,he,_e){ge[he]=_e.value;},X=typeof Symbol=="function"?Symbol:{},B=X.iterator||"@@iterator",z=X.asyncIterator||"@@asyncIterator",te=X.toStringTag||"@@toStringTag";function K(ge,he,_e){return Object.defineProperty(ge,he,{value:_e,enumerable:!0,configurable:!0,writable:!0}),ge[he];}try{K({},"");}catch{K=function(he,_e,Re){return he[_e]=Re;};}function V(ge,ye,_e,Se){var ee,W,ae,de,ye=ye&&ye.prototype instanceof oe?ye:
71oe,ye=Object.create(ye.prototype),Se=new se(Se||[]);return H(ye,"_invoke",{value:(ee=ge,W=_e,ae=Se,de=Z,function(De,Ue){if(de===ue)throw Error("Generator is already running");if(de===q){if(De==="throw")throw Ue;return{value:O,done:!0};}for(ae.method=De,ae.arg=Ue;;){var Be=ae.delegate;if(Be&&(Be=function nt(it,ot){var ht=ot.method,Et=it.iterator[ht];return Et===O?(ot.delegate=null,ht==="throw"&&it.iterator.return&&(ot.method="return",ot.arg=O,nt(it,ot),ot.method==="throw")||ht!=="return"&&(ot.method="throw",ot.arg=new TypeError("The iterator does not provide a '"+ht+"' method")),J):(ht=U(Et,it.iterator,ot.arg),ht.type==="throw"?(ot.method="throw",ot.arg=ht.arg,ot.delegate=null,J):(Et=ht.arg,Et?Et.done?(ot[it.resultName]=Et.value,ot.next=it.nextLoc,ot.method!=="return"&&(ot.method="next",ot.arg=O),ot.delegate=null,J):Et:(ot.method="throw",ot.arg=new TypeError("iterator result is not an object"),ot.delegate=null,J)));}(Be,ae),Be)){if(Be===J)continue;return Be;}if(ae.method==="next")ae.sent=ae._sent=ae.arg;else if(ae.method==="throw"){if(de===Z)throw de=q,ae.arg;ae.dispatchException(ae.arg);}else ae.method==="return"&&ae.abrupt("return",ae.arg);if(de=ue,Be=U(ee,W,ae),Be.type==="normal"){if(de=ae.done?q:re,Be.arg===J)continue;return{value:Be.arg,done:ae.done};}Be.type==="throw"&&(de=q,ae.method="throw",ae.arg=Be.arg);}})}),ye;}function U(ge,he,_e){try{return{type:"normal",arg:ge.call(he,_e)};}catch(Re){return{type:"throw",arg:Re};}}M.wrap=V;var Z="suspendedStart",re="suspendedYield",ue="executing",q="completed",J={};function oe(){}function Q(){}function F(){}var X={},Y=(K(X,B,function(){return this;}),Object.getPrototypeOf),Y=Y&&Y(Y(fe([]))),j=(Y&&Y!==N&&G.call(Y,B)&&(X=Y),F.prototype=oe.prototype=Object.create(X));function D(ge){["next","throw","return"].forEach(function(he){K(ge,he,function(_e){return this._invoke(he,_e);});});}function $(ge,he){var _e;H(this,"_invoke",{value:function(Re,ee){function W(){return new he(function(ae,de){(function ye(it,De,Ue,Be){var nt,it=U(ge[it],ge,De);if(it.type!=="throw")return(De=(nt=it.arg).value)&&t(De)=="object"&&G.call(De,"__await")?he.resolve(De.__await).then(function(ot){ye("next",ot,Ue,Be);},function(ot){ye("throw",ot,Ue,Be);}):he.resolve(De).then(function(ot){nt.value=ot,Ue(nt);},function(ot){return ye("throw",ot,Ue,Be);});Be(it.arg);})(Re,ee,ae,de);});}return _e=_e?_e.then(W,W):W();}});}function ne(ge){var he={tryLoc:ge[0]};1 in ge&&(he.catchLoc=ge[1]),2 in ge&&(he.finallyLoc=ge[2],he.afterLoc=ge[3]),this.tryEntries.push(he);}function le(ge){var he=ge.completion||{};he.type="normal",delete he.arg,ge.completion=he;}function se(ge){this.tryEntries=[{tryLoc:"root"}],ge.forEach(ne,this),this.reset(!0);}function fe(ge){if(ge||ge===""){var he,_e=ge[B];if(_e)return _e.call(ge);if(typeof ge.next=="function")return ge;if(!isNaN(ge.length))return he=-1,(_e=function Re(){for(;++he<ge.length;)if(G.call(ge,he))return Re.value=ge[he],Re.done=!1,Re;return Re.value=O,Re.done=!0,Re;}).next=_e;}throw new TypeError(t(ge)+" is not iterable");}return H(j,"constructor",{value:Q.prototype=F,configurable:!0}),H(F,"constructor",{value:Q,configurable:!0}),Q.displayName=K(F,te,"GeneratorFunction"),M.isGeneratorFunction=function(ge){return ge=typeof ge=="function"&&ge.constructor,!!ge&&(ge===Q||(ge.displayName||ge.name)==="GeneratorFunction");},M.mark=function(ge){return Object.setPrototypeOf?Object.setPrototypeOf(ge,F):(ge.__proto__=F,K(ge,te,"GeneratorFunction")),ge.prototype=Object.create(j),ge;},M.awrap=function(ge){return{__await:ge};},D($.prototype),K($.prototype,z,function(){return this;}),M.AsyncIterator=$,M.async=function(ge,he,_e,Re,ee){ee===void 0&&(ee=Promise);var W=new $(V(ge,he,_e,Re),ee);return M.isGeneratorFunction(he)?W:W.next().then(function(ae){return ae.done?ae.value:W.next();});},D(j),K(j,te,"Generator"),K(j,B,function(){return this;}),K(j,"toString",function(){return"[object Generator]";}),M.keys=function(ge){var he,_e=Object(ge),Re=[];for(he in _e)Re.push(he);return Re.reverse(),function ee(){for(;Re.length;){var W=Re.pop();if(W in _e)return ee.value=W,ee.done=!1,ee;}return ee.done=!0,ee;};},M.values=fe,se.prototype={constructor:se,reset:function(ge){if(this.prev=0,this.next=0,this.sent=this._sent=O,this.done=!1,this.delegate=null,this.method="next",this.arg=O,this.tryEntries.forEac
71h(le),!ge)for(var he in this)he.charAt(0)==="t"&&G.call(this,he)&&!isNaN(+he.slice(1))&&(this[he]=O);},stop:function(){this.done=!0;var ge=this.tryEntries[0].completion;if(ge.type==="throw")throw ge.arg;return this.rval;},dispatchException:function(ge){if(this.done)throw ge;var he=this;function _e(ye,Se){return W.type="throw",W.arg=ge,he.next=ye,Se&&(he.method="next",he.arg=O),!!Se;}for(var Re=this.tryEntries.length-1;0<=Re;--Re){var ee=this.tryEntries[Re],W=ee.completion;if(ee.tryLoc==="root")return _e("end");if(ee.tryLoc<=this.prev){var ae=G.call(ee,"catchLoc"),de=G.call(ee,"finallyLoc");if(ae&&de){if(this.prev<ee.catchLoc)return _e(ee.catchLoc,!0);if(this.prev<ee.finallyLoc)return _e(ee.finallyLoc);}else if(ae){if(this.prev<ee.catchLoc)return _e(ee.catchLoc,!0);}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<ee.finallyLoc)return _e(ee.finallyLoc);}}}},abrupt:function(ge,he){for(var _e=this.tryEntries.length-1;0<=_e;--_e){var Re=this.tryEntries[_e];if(Re.tryLoc<=this.prev&&G.call(Re,"finallyLoc")&&this.prev<Re.finallyLoc){var ee=Re;break;}}var W=(ee=ee&&(ge==="break"||ge==="continue")&&ee.tryLoc<=he&&he<=ee.finallyLoc?null:ee)?ee.completion:{};return W.type=ge,W.arg=he,ee?(this.method="next",this.next=ee.finallyLoc,J):this.complete(W);},complete:function(ge,he){if(ge.type==="throw")throw ge.arg;return ge.type==="break"||ge.type==="continue"?this.next=ge.arg:ge.type==="return"?(this.rval=this.arg=ge.arg,this.method="return",this.next="end"):ge.type==="normal"&&he&&(this.next=he),J;},finish:function(ge){for(var he=this.tryEntries.length-1;0<=he;--he){var _e=this.tryEntries[he];if(_e.finallyLoc===ge)return this.complete(_e.completion,_e.afterLoc),le(_e),J;}},catch:function(ge){for(var he=this.tryEntries.length-1;0<=he;--he){var _e,Re,ee=this.tryEntries[he];if(ee.tryLoc===ge)return(_e=ee.completion).type==="throw"&&(Re=_e.arg,le(ee)),Re;}throw Error("illegal catch attempt");},delegateYield:function(ge,he,_e){return this.delegate={iterator:fe(ge),resultName:he,nextLoc:_e},this.method==="next"&&(this.arg=O),J;}},M;}function E(O,M){for(var N=0;N<M.length;N++){var G=M[N];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(O,function(H){return H=function(B,z){if(t(B)!="object"||!B)return B;var te=B[Symbol.toPrimitive];if(te===void 0)return(z==="string"?String:Number)(B);if(te=te.call(B,z||"default"),t(te)!="object")return te;throw new TypeError("@@toPrimitive must return a primitive value.");}(H,"string"),t(H)=="symbol"?H:H+"";}(G.key),G);}}function x(O,H,N){H=p(H);var G=O,H=h()?Reflect.construct(H,N||[],p(O).constructor):H.apply(O,N);if(H&&(t(H)=="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(O=G,O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O;}function h(){try{var O=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!O;})();}function y(O,M,N,G){var H=b(p(1&G?O.prototype:O),M,N);return 2&G?function(B){return H.apply(N,B);}:H;}function b(){return(b=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(O,M,N){var G=function(H,B){for(;!{}.hasOwnProperty.call(H,B)&&(H=p(H))!==null;);return H;}(O,M);if(G)return(G=Object.getOwnPropertyDescriptor(G,M)).get?G.get.call(arguments.length<3?O:N):G.value;}).apply(null,arguments);}function p(O){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M);})(O);}function c(O,M){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,G){return N.__proto__=G,N;})(O,M);}var d,m=this&&this.__awaiter||function(O,M,N,G){return new(N=N||Promise)(function(H,B){function z(V){try{K(G.next(V));}catch(U){B(U);}}function te(V){try{K(G.throw(V));}catch(U){B(U);}}function K(V){var U;V.done?H(V.value):((U=V.value)instanceof N?U:new N(function(Z){Z(U);})).then(z,te);}K((G=G.apply(O,M||[])).next());});},a=(Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasLayer=r.VideoComponentState=void 0,I(32)),s=I(12),l=I(5),g=I(258),f=I(19),v=I(252),S=I(74),w=I(72),C=I(70),I=((I=d=r.VideoComponentState||(r.VideoComponentState={}))[I.CREATED=0]="CREATED",I[I.LOADING=1]="LOADING",I[I.READY=2]="READY",I[I.PLAYING=3]="PLAYING",I[I.PAUSED=4]="PAUSED",I[I.STALLED=5]="STALLED",I[I.ENDED=6]="ENDED",I[I.ERROR=7]="ERROR",(I=r.CanvasLayer||(r.CanvasLayer={}))[I.FG=0]="FG",I[I.BG=1]="BG",function(O){function M(H,B){var z;if(this instanceof M)return(B=x(this,M,[H,B]))._backgroundRemovalEffect=null,B._guid=l.default.shortGUID(),B.player=void 0,B.playerObject=void 0,B.attributes=new g.VideoComponentCoreAttributesBuilder(H.attributes,B.scale).build(),B._canvasDomPosition=H.attributes.domPosition,H.src.url!==""&&(B.mediaURL=H.src.url,B.mediaURL=l.default.replaceAssetUrl(B.mediaURL)),B._urlId=(z=(z=H.src)==null?void 0:z.urlId)!=null?z:s.PRIMARY_URL_ID,B._mediaId=(z=(z=H.src)==null?void 0:z.mediaId)!=null?z:void 0,B._volume=(z=(z=H.src)==null?void 0:z.volume)!=null?z:0,B._seek=H.src.seek,B._headBoundingBox=H.src.headBoundingBox,B._personBoundingBox=H.src.personBoundingBox,H.src.loadingThumbnailUrl!==""&&(B.loadingThumbnailUrl=H.src.loadingThumbnailUrl,B.loadingThumbnailUrl=l.default.replaceAssetUrl(B.loadingThumbnailUrl)),B.position={fromLeft:void 0,fromTop:void 0,fromRight:void 0,fromBot:void 0},B.canvasScaleStyle=void 0,B.state=d.CREATED,B.baseVDom=B.buildVDOM(),B;throw new TypeError("Cannot call a class as a function");}var N,G=M;if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");return G.prototype=Object.create(O&&O.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),Object.defineProperty(G,"prototype",{writable:!1}),O&&c(G,O),G=M,(O=[{key:"getPlayer",value:function(){var H=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0];return m(this,void 0,void 0,_().mark(function B(){var z;return _().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return z=s.MediaPlayerCache.getInstance(this.options.containerId),te.next=3,z.getPlayer(this._urlId,this.mediaURL,this._seek,this._volume,H);case 3:return this.playerObject=te.sent,te.abrupt("return",this.playerObject);case 5:case"end":return te.stop();}},B,this);}));}},{key:"hasEffect",value:function(H){return Array.isArray(this.visualEffects)&&this.visualEffects.some(function(B){return((B=B?.adaptingEffect)==null?void 0:B.type)===H;});}},{key:"handleSpatialInfo",value:function(){this.player&&(this.videoWidth=this.player.videoWidth(),this.videoHeight=this.player.videoHeight());}},{key:"configureComp",value:function(H){H&&(this.playerObject=H,this.player=H.player,this.handleSpatialInfo(),this.videoElement=H.element);}},{key:"setVideoPlayerObject",value:function(){return m(this,void 0,void 0,_().mark(function H(){var B;return _().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.prev=0,z.next=3,this.getPlayer();case 3:z.next=13;break;case 5:throw z.prev=5,z.t0=z.catch(0),this.state=d.ERROR,B=z.t0&&z.t0.message?z.t0.message:"",l.default.error("Could not load video urlId:".concat(this._urlId,", mediaURL:").concat(this.mediaURL,", msg:").concat(B)),this.player=void 0,this.playerObject=void 0,z.t0;case 13:case"end":return z.stop();}},H,this,[[0,5]]);}));}},{key:"renderHtmlAfterPlayerObjectIsSet",value:function(){var H;return m(this,void 0,void 0,_().mark(function B(){var z,te,K;return _().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(this.state=d.READY,this.applyCanvasStyle(this.videoCanvas),this.configureComp(this.playerObject),l.default.debug("Finished loading. urlId:".concat(this._urlId,", mediaURL:").concat(this.mediaURL,", w: ").concat(this.videoWidth,", h: ").concat(this.videoHeight)),l.default.debug("Loaded video finished ! time: ".concat(this._seek)),this.applyStyle(this.element),K=this.hasEffect("headCentering"),z=this.hasEffect("backgroundRemoval"),te={},K&&this._headBoundingBox===void 0&&(te.headCenteringEffectData={videoElement:this.videoElement,videoWidth:this.player.videoWidth(),videoHeight:this.player.videoHeight(),headBoundingBox:void 0}
71),z&&(K=w.MediaPipeSegmenterProvider.getInstance(),K=K.getBgRemoval(this._canvasUniqueId,this.videoElement,this._personBoundingBox),te.backgroundRemovalEffectData={render:K.render,resetCache:K.resetCache,videoCanvas:this.videoCanvas,isRtlLayout:this._isRtlLayout,canvasUniqueId:this._canvasUniqueId}),0<Object.keys(te).length)return V.next=14,this.applyVisualEffects(this.element,te);V.next=18;break;case 14:((H=te.headCenteringEffectData)==null?void 0:H.headBoundingBox)!==void 0&&(this._headBoundingBox=te.headCenteringEffectData.headBoundingBox,this.options.containerId&&S.VDMPreviewerEvents.getInstance(this.options.containerId).dispatchEvent(new CustomEvent(S.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS.HEAD_BOUNDING_BOX_DETECTED,{detail:{headBoundingBox:this._headBoundingBox,slideIndex:this._slideIndex,mediaId:this._mediaId}})),this.handleSpatialInfo()),z&&(this._backgroundRemovalEffect=(H=this.visualEffects)==null?void 0:H.find(function(U){return((U=U?.adaptingEffect)==null?void 0:U.type)==="backgroundRemoval";})),V.next=20;break;case 18:return V.next=20,this.applyVisualEffects(this.element);case 20:l.default.debug("Finished rendering VidCOmp!");case 21:case"end":return V.stop();}},B,this);}));}},{key:"renderHtml",value:function(H){return m(this,void 0,void 0,_().mark(function B(){return _().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return this.state=d.LOADING,this.element=document.createElement("div"),this.element.style.visibility="hidden",H.appendChild(this.element),this.videoCanvas=document.createElement("canvas"),this.videoCanvas.classList.add("canvas-player"),this.element.appendChild(this.videoCanvas),this._canvasUniqueId="[".concat(this._urlId,"][").concat(this.mediaURL,"]"),z.next=10,this.setVideoPlayerObject();case 10:if(this.playerObject)return z.next=13,this.renderHtmlAfterPlayerObjectIsSet();z.next=13;break;case 13:case"end":return z.stop();}},B,this);}));}},{key:"applyStyle",value:function(H){y(M,"applyStyle",this,3)([H]),this._isLegacyComponent?H.style.transform="translate3d(0,0,0)":H.style.overflow="hidden";}},{key:"applyCanvasStyle",value:function(H){H.style.width="100%",H.style.height="100%",H.width=this.attributes.widthVal,H.height=this.attributes.heightVal,H.style.zIndex="2",this._canvasDomPosition&&["static","absolute","fixed","relative","sticky","initial","inherit","revert"].includes(this._canvasDomPosition)?H.style.position=this._canvasDomPosition:H.style.position="absolute";}},{key:"fitMediaOnCanvas",value:function(H,B,z){var te,K,V,U=this.position.fromLeft!==void 0?B*this.position.fromLeft:0,Z=this.position.fromTop!==void 0?z*this.position.fromTop:0,re=B-U-(this.position.fromRight!==void 0?B-B*this.position.fromRight:0),ue=z-Z-(this.position.fromBot!==void 0?z-z*this.position.fromBot:0),q=re/ue,J=H.width/H.height;return J=q<J?(V=H.height,te=(H.width-(K=V/ue*re))/2,0):J<q?(K=H.width,te=0,(H.height-(V=K/re*ue))/2):(V=H.height,K=H.width,te=0),q=ue,ue=re,re=U,U=Z,this.canvasScaleStyle!==void 0&&(te=(Z=v.CanvasScaleEffect.calculateScaleRect(this.canvasScaleStyle,H.width,H.height,ue,q)).x,J=Z.y,K=Z.w,V=Z.h),this._headBoundingBox&&(Z=B*this._headBoundingBox.xCenter,B=z*this._headBoundingBox.yCenter,((re-=ue/2-(Z-re))+ue)*(z=K/ue)<H.width-te&&(re=(H.width-te)/z-ue),((U-=q/2-(B-U))+q)*(Z=V/q)<H.height-J&&(U=(H.height-J)/Z-q)),z=[re,U,ue,q,te,J,K,V].map(function(oe){return Math.round(oe);}),this._fitInfo=z;}},{key:"reconstructWithRecycle",value:function(){return m(this,void 0,void 0,_().mark(function H(){var B,z;return _().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return this.videoCanvas=this.element.querySelector(".canvas-player"),te.next=3,this.getPlayer();case 3:(z=te.sent)&&(this.state=d.READY,this.configureComp(z)),this.videoCanvas.getContext("2d").clearRect(0,0,this.videoCanvas.width,this.videoCanvas.height),z=this.hasEffect("backgroundRemoval"),B=this.hasEffect("transform"),z&&!B&&(z="[".concat(this._urlId,"][").concat(this.mediaURL,"]"),w.MediaPipeSegmenterProvider.getInstance().setPersonTransform(z,null)),l.default.debug("Finished assigning special elements at Video Component!");case 11:case"end":return te.stop();}},H,this);}));}},{key:"renderHtmlRecursively",value:function(){return m(this,void 0,void 0,_().mark(function H(){return _().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:case"end":return B.stop();}},H);}));}},{key:"clear",value:function(){this.state=d.CREATED,this._backgroundRemovalEffect&&(this._backgroundRemovalEffect.dispose(),this._backgroundRemovalEffect=null);}},{key:"applyVisualEffects",value:function(H,B){var z;return m(this,void 0,void 0,_().mark(function te(){var K,V,U,Z,re,ue,q,J,oe;return _().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(C.CorePreviewerUtils.disableVisualEffects)return Q.abrupt("return");Q.next=2;break;case 2:if((K=this.visualEffects)&&Array.isArray(K)){Q.next=5;break;}return Q.abrupt("return");case 5:if(V=K.find(function(F){return((F=F?.adaptingEffect)==null?void 0:F.type)==="backgroundRemoval";}),U=K.find(function(F){return((F=F?.adaptingEffect)==null?void 0:F.type)==="transform";}),!V||!U){Q.next=34;break;}Z=n(K),Q.prev=9,Z.s();case 11:if((re=Z.n()).done){Q.next=24;break;}if((re=re.value)!==U){Q.next=20;break;}ue=re.attributes,J=((z=this.videoCanvas)==null?void 0:z.width)||0,oe=((z=this.videoCanvas)==null?void 0:z.height)||0,V.setPersonTransform({x:0<J?(parseFloat(ue.x)||0)*J:0,y:0<oe?(parseFloat(ue.y)||0)*oe:0,scale:parseFloat(ue.scale)||1,centerX:!!ue.centerX,centerY:!!ue.centerY}),Q.next=22;break;case 20:return Q.next=22,re.apply(H,B);case 22:Q.next=11;break;case 24:Q.next=29;break;case 26:Q.prev=26,Q.t0=Q.catch(9),Z.e(Q.t0);case 29:return Q.prev=29,Z.f(),Q.finish(29);case 32:Q.next=52;break;case 34:V&&!U&&V.setPersonTransform(null),q=n(K),Q.prev=36,q.s();case 38:if((J=q.n()).done){Q.next=44;break;}return oe=J.value,Q.next=42,oe.apply(H,B);case 42:Q.next=38;break;case 44:Q.next=49;break;case 46:Q.prev=46,Q.t1=Q.catch(36),q.e(Q.t1);case 49:return Q.prev=49,q.f(),Q.finish(49);case 52:case"end":return Q.stop();}},te,this,[[9,26,29,32],[36,46,49,52]]);}));}},{key:"buildVDOM",value:function(){var H;return this.baseVDom=l.default.surpass((delete(H=f.VDOMConstructor.builder(this)).state,delete H._seek,delete H._mediaId,H)),y(M,"buildVDOM",this,3)([]);}},{key:"seek",get:function(){return this._seek;}},{key:"fitInfo",get:function(){return this._fitInfo;}},{key:"getVideoElement",value:function(){return this.videoElement;}},{key:"getVideoPlayer",value:function(){return this.player;}},{key:"MediaURL",value:function(){return this.mediaURL;}},{key:"urlId",get:function(){return this._urlId;}},{key:"isStudioEditable",get:function(){return!(this._backgroundRemovalEffect&&!this._backgroundRemovalEffect.getPersonRenderedRect());}},{key:"backgroundRemovalEffect",get:function(){return this._backgroundRemovalEffect;}}])&&E(G.prototype,O),N&&E(G,N),Object.defineProperty(G,"prototype",{writable:!1}),G;}(a.default));r.default=I;},function(n,r){var e,t,n=n.exports={};function o(){throw new Error("setTimeout has not been defined");}function _(){throw new Error("clearTimeout has not been defined");}try{e=typeof setTimeout=="function"?setTimeout:o;}catch{e=o;}try{t=typeof clearTimeout=="function"?clearTimeout:_;}catch{t=_;}function E(a){if(e===setTimeout)return setTimeout(a,0);if((e===o||!e)&&setTimeout)return(e=setTimeout)(a,0);try{return e(a,0);}catch{try{return e.call(null,a,0);}catch{return e.call(this,a,0);}}}var x,h=[],y=!1,b=-1;
71function p(){y&&x&&(y=!1,x.length?h=x.concat(h):b=-1,h.length&&c());}function c(){if(!y){for(var a=E(p),s=(y=!0,h.length);s;){for(x=h,h=[];++b<s;)x&&x[b].run();b=-1,s=h.length;}x=null,y=!1,function(l){if(t===clearTimeout)return clearTimeout(l);if((t===_||!t)&&clearTimeout)return(t=clearTimeout)(l);try{t(l);}catch{try{return t.call(null,l);}catch{return t.call(this,l);}}}(a);}}function d(a,s){this.fun=a,this.array=s;}function m(){}n.nextTick=function(a){var s=new Array(arguments.length-1);if(1<arguments.length)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];h.push(new d(a,s)),h.length!==1||y||E(c);},d.prototype.run=function(){this.fun.apply(null,this.array);},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(a){return[];},n.binding=function(a){throw new Error("process.binding is not supported");},n.cwd=function(){return"/";},n.chdir=function(a){throw new Error("process.chdir is not supported");},n.umask=function(){return 0;};},function(i,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CustomManipulators=void 0;function t(o){return[void 0,null].includes(o);}function n(o,_,E){return!t(o)&&(Array.isArray(o)&&0<o.length||typeof o=="string"&&o!=="")?_:E;}r.CustomManipulators={coalesce:function(){for(var o=arguments.length,_=new Array(o),E=0;E<o;E++)_[E]=arguments[E];return _.find(function(x){return!t(x);});},ifNotEmpty:n,takeIfNotEmpty:function(o,_){return n(o,o,_);},completeUrl:function(o){return t(o)||o===""||o.match(/^(https?:\/\/|tel:|mailto:)/i)?o:"http://".concat(o);},parseInt:function(o){return Number.parseInt(o);},takeIfEqual:function(o,_,E){return t(o)||o!==_?void 0:E;},ifBooleanTrue:function(o,_,E){return typeof o=="boolean"&&o?_:E;}};},function(i,r,e){var t=e(118);i.exports=function(n){return t(n,5);};},function(i,r,e){var t=e(119),n=e(149),o=e(79),_=e(151),E=e(161),x=e(164),h=e(165),y=e(166),b=e(168),p=e(169),c=e(170),d=e(61),m=e(175),a=e(176),s=e(182),l=e(54),g=e(82),f=e(184),v=e(28),S=e(186),w=e(53),C=e(59),I="[object Arguments]",O="[object Function]",M="[object Object]",N={};N[I]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[M]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[O]=N["[object WeakMap]"]=!1,i.exports=function G(H,B,z,te,K,V){var U,Z=1&B,re=2&B,ue=4&B;if((U=z?K?z(H,te,K,V):z(H):U)===void 0){if(!v(H))return H;if(te=l(H)){if(U=m(H),!Z)return h(H,U);}else{var q=d(H),J=q==O||q=="[object GeneratorFunction]";if(g(H))return x(H,Z);if(q==M||q==I||J&&!K){if(U=re||J?{}:s(H),!Z)return re?b(H,E(U,H)):y(H,_(U,H));}else{if(!N[q])return K?H:{};U=a(H,q,Z);}}if(J=(V=V||new t()).get(H))return J;V.set(H,U),S(H)?H.forEach(function(Q){U.add(G(Q,B,z,Q,H,V));}):f(H)&&H.forEach(function(Q,F){U.set(F,G(Q,B,z,F,H,V));});var oe=te?void 0:(ue?re?c:p:re?C:w)(H);n(oe||H,function(Q,F){oe&&(Q=H[F=Q]),o(U,F,G(Q,B,z,F,H,V));});}return U;};},function(i,r,x){var t=x(35),n=x(125),o=x(126),_=x(127),E=x(128),x=x(129);function h(y){y=this.__data__=new t(y),this.size=y.size;}h.prototype.clear=n,h.prototype.delete=o,h.prototype.get=_,h.prototype.has=E,h.prototype.set=x,i.exports=h;},function(i,r){i.exports=function(){this.__data__=[],this.size=0;};},function(i,r,e){var t=e(36),n=Array.prototype.splice;i.exports=function(o){var _=this.__data__;return!((o=t(_,o))<0)&&(o==_.length-1?_.pop():n.call(_,o,1),--this.size,!0);};},function(i,r,e){var t=e(36);i.exports=function(n){var o=this.__data__;return(n=t(o,n))<0?void 0:o[n][1];};},function(i,r,e){var t=e(36);i.exports=function(n){return-1<t(this.__data__,n);};},function(i,r,e){var t=e(36);i.exports=function(n,o){var _=this.__data__,E=t(_,n);
71return E<0?(++this.size,_.push([n,o])):_[E][1]=o,this;};},function(i,r,e){var t=e(35);i.exports=function(){this.__data__=new t(),this.size=0;};},function(i,r){i.exports=function(n){var t=this.__data__,n=t.delete(n);return this.size=t.size,n;};},function(i,r){i.exports=function(e){return this.__data__.get(e);};},function(i,r){i.exports=function(e){return this.__data__.has(e);};},function(i,r,e){var t=e(35),n=e(51),o=e(136);i.exports=function(_,E){var x=this.__data__;if(x instanceof t){var h=x.__data__;if(!n||h.length<199)return h.push([_,E]),this.size=++x.size,this;x=this.__data__=new o(h);}return x.set(_,E),this.size=x.size,this;};},function(i,r,x){var t=x(76),n=x(133),o=x(28),_=x(78),E=/^\[object .+?Constructor\]$/,x=Function.prototype,h=Object.prototype,x=x.toString,h=h.hasOwnProperty,y=RegExp("^"+x.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");i.exports=function(b){return!(!o(b)||n(b))&&(t(b)?y:E).test(_(b));};},function(i,r,t){var t=t(52),n=Object.prototype,o=n.hasOwnProperty,_=n.toString,E=t?t.toStringTag:void 0;i.exports=function(x){var h=o.call(x,E),y=x[E];try{var b=!(x[E]=void 0);}catch{}var p=_.call(x);return b&&(h?x[E]=y:delete x[E]),p;};},function(i,r){var e=Object.prototype.toString;i.exports=function(t){return e.call(t);};},function(i,r,t){var t=t(134),n=(t=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";i.exports=function(o){return!!n&&n in o;};},function(i,r,e){e=e(14)["__core-js_shared__"],i.exports=e;},function(i,r){i.exports=function(e,t){return e?.[t];};},function(i,r,E){var t=E(137),n=E(144),o=E(146),_=E(147),E=E(148);function x(h){var y=-1,b=h==null?0:h.length;for(this.clear();++y<b;){var p=h[y];this.set(p[0],p[1]);}}x.prototype.clear=t,x.prototype.delete=n,x.prototype.get=o,x.prototype.has=_,x.prototype.set=E,i.exports=x;},function(i,r,e){var t=e(138),n=e(35),o=e(51);i.exports=function(){this.size=0,this.__data__={hash:new t(),map:new(o||n)(),string:new t()};};},function(i,r,E){var t=E(139),n=E(140),o=E(141),_=E(142),E=E(143);function x(h){var y=-1,b=h==null?0:h.length;for(this.clear();++y<b;){var p=h[y];this.set(p[0],p[1]);}}x.prototype.clear=t,x.prototype.delete=n,x.prototype.get=o,x.prototype.has=_,x.prototype.set=E,i.exports=x;},function(i,r,e){var t=e(38);i.exports=function(){this.__data__=t?t(null):{},this.size=0;};},function(i,r){i.exports=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e;};},function(i,r,e){var t=e(38),n=Object.prototype.hasOwnProperty;i.exports=function(o){var _,E=this.__data__;return t?(_=E[o])==="__lodash_hash_undefined__"?void 0:_:n.call(E,o)?E[o]:void 0;};},function(i,r,e){var t=e(38),n=Object.prototype.hasOwnProperty;i.exports=function(o){var _=this.__data__;return t?_[o]!==void 0:n.call(_,o);};},function(i,r,e){var t=e(38);i.exports=function(n,o){var _=this.__data__;return this.size+=this.has(n)?0:1,_[n]=t&&o===void 0?"__lodash_hash_undefined__":o,this;};},function(i,r,e){var t=e(39);i.exports=function(n){return n=t(this,n).delete(n),this.size-=n?1:0,n;};},function(i,r){i.exports=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null;};},function(i,r,e){var t=e(39);i.exports=function(n){return t(this,n).get(n);};},function(i,r,e){var t=e(39);i.exports=function(n){return t(this,n).has(n);};},function(i,r,e){var t=e(39);i.exports=function(n,o){var _=t(this,n),E=_.size;return _.set(n,o),this.size+=_.size==E?0:1,this;};},function(i,r){i.exports=function(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e;};},function(i,r,n){var t=n(16),n=function(){try{var o=t(Object,"defineProperty");return o({},"",{}),o;}catch{}}();i.exports=n;},function(i,r,e){var t=e(40),n=e(53);i.exports=function(o,_){return o&&t(_,n(_),o);};},function(i,r){i.exports=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o;};},function(i,r,E){var t=E(154),n=E(29),E=Object.prototype,o=E.hasOwnProperty,_=E.propertyIsEnumerable,E=t(function(){return arguments;}())?t:function(x){return n(x)&&o.call(x,"callee")&&!_.call(x,"callee");};i.exports=E;},function(i,r,e){var t=e(37),n=e(29);i.exports=function(o){return n(o)&&t(o)=="[object Arguments]";};},function(i,r){i.exports=function(){return!1;};},function(i,r){var e=/^(?:0|[1-9]\d*)$/;i.exports=function(t,n){var o=typeof t;return!!(n=n??9007199254740991)&&(o=="number"||o!="symbol"&&e.test(t))&&-1<t&&t%1==0&&t<n;};},function(i,r,n){var t=n(158),o=n(56),n=n(57),n=n&&n.isTypedArray,o=n?o(n):t;i.exports=o;},function(i,r,e){var t=e(37),n=e(83),o=e(29),_={};
71_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_["[object Arguments]"]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object Boolean]"]=_["[object DataView]"]=_["[object Date]"]=_["[object Error]"]=_["[object Function]"]=_["[object Map]"]=_["[object Number]"]=_["[object Object]"]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object WeakMap]"]=!1,i.exports=function(E){return o(E)&&n(E.length)&&!!_[t(E)];};},function(i,r,e){var t=e(58),n=e(160),o=Object.prototype.hasOwnProperty;i.exports=function(_){if(!t(_))return n(_);var E,x=[];for(E in Object(_))o.call(_,E)&&E!="constructor"&&x.push(E);return x;};},function(i,r,e){e=e(84)(Object.keys,Object),i.exports=e;},function(i,r,e){var t=e(40),n=e(59);i.exports=function(o,_){return o&&t(_,n(_),o);};},function(i,r,e){var t=e(28),n=e(58),o=e(163),_=Object.prototype.hasOwnProperty;i.exports=function(E){if(!t(E))return o(E);var x,h=n(E),y=[];for(x in E)(x!="constructor"||!h&&_.call(E,x))&&y.push(x);return y;};},function(i,r){i.exports=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t;};},function(i,r,e){(function(t){var n=e(14),o=r&&!r.nodeType&&r,_=o&&typeof t=="object"&&t&&!t.nodeType&&t,_=_&&_.exports===o?n.Buffer:void 0,E=_?_.allocUnsafe:void 0;t.exports=function(x,h){return h?x.slice():(h=x.length,h=E?E(h):new x.constructor(h),x.copy(h),h);};}).call(this,e(55)(i));},function(i,r){i.exports=function(e,t){var n=-1,o=e.length;for(t=t||Array(o);++n<o;)t[n]=e[n];return t;};},function(i,r,e){var t=e(40),n=e(60);i.exports=function(o,_){return t(o,n(o),_);};},function(i,r){i.exports=function(e,t){for(var n=-1,o=e==null?0:e.length,_=0,E=[];++n<o;){var x=e[n];t(x,n,e)&&(E[_++]=x);}return E;};},function(i,r,e){var t=e(40),n=e(87);i.exports=function(o,_){return t(o,n(o),_);};},function(i,r,e){var t=e(90),n=e(60),o=e(53);i.exports=function(_){return t(_,o,n);};},function(i,r,e){var t=e(90),n=e(87),o=e(59);i.exports=function(_){return t(_,o,n);};},function(i,r,e){e=e(16)(e(14),"DataView"),i.exports=e;},function(i,r,e){e=e(16)(e(14),"Promise"),i.exports=e;},function(i,r,e){e=e(16)(e(14),"Set"),i.exports=e;},function(i,r,e){e=e(16)(e(14),"WeakMap"),i.exports=e;},function(i,r){var e=Object.prototype.hasOwnProperty;i.exports=function(t){var n=t.length,o=new t.constructor(n);return n&&typeof t[0]=="string"&&e.call(t,"index")&&(o.index=t.index,o.input=t.input),o;};},function(i,r,e){var t=e(62),n=e(178),o=e(179),_=e(180),E=e(181);i.exports=function(x,h,y){var b=x.constructor;switch(h){case"[object ArrayBuffer]":return t(x);case"[object Boolean]":case"[object Date]":return new b(+x);case"[object DataView]":return n(x,y);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return E(x,y);case"[object Map]":return new b();case"[object Number]":case"[object String]":return new b(x);case"[object RegExp]":return o(x);case"[object Set]":return new b();case"[object Symbol]":return _(x);}};},function(i,r,e){e=e(14).Uint8Array,i.exports=e;},function(i,r,e){var t=e(62);i.exports=function(n,o){return o=o?t(n.buffer):n.buffer,new n.constructor(o,n.byteOffset,n.byteLength);};},function(i,r){var e=/\w*$/;i.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n;};},function(i,r,t){var t=t(52),t=t?t.prototype:void 0,n=t?t.valueOf:void 0;i.exports=function(o){return n?Object(n.call(o)):{};};},function(i,r,e){var t=e(62);i.exports=function(n,o){return o=o?t(n.buffer):n.buffer,new n.constructor(o,n.byteOffset,n.length);};},function(i,r,e){var t=e(183),n=e(89),o=e(58);i.exports=function(_){return typeof _.constructor!="function"||o(_)?{}:t(n(_));};},function(i,r,e){var t=e(28),n=Object.create;function o(){}i.exports=function(_){return t(_)?n?n(_):(o.prototype=_,_=new o(),o.prototype=void 0,_):{};};},function(i,r,n){var t=n(185),o=n(56),n=n(57),n=n&&n.isMap,o=n?o(n):t;i.exports=o;},function(i,r,e){var t=e(61),n=e(29);i.exports=function(o){return n(o)&&t(o)=="[object Map]";};},function(i,r,n){var t=n(187),o=n(56),n=n(57),n=n&&n.isSet,o=n?o(n):t;i.exports=o;},function(i,r,e){var t=e(61),n=e(29);i.exports=function(o){return n(o)&&t(o)=="[object Set]";};},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];
71if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0});var o=h(20),_=h(189),E=h(190),x=h(191),h=function(){function y(){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");}return b=y,c=[{key:"createSlideTransitor",value:function(d,m,a,s){switch(d){case o.VDMSlideType.VDMImageSlide:case o.VDMSlideType.VDMTextSlide:case o.VDMSlideType.VDMTweetTextSlide:return new _.default(m,a,s);case o.VDMSlideType.VDMTweetSlide:return new E.default(m,a,s);case o.VDMSlideType.VDMContextSlide:return new x.default(m,a,s);default:return;}}}],(p=null)&&n(b.prototype,p),c&&n(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c,d,m){if(this instanceof y)return(c=o(this,y,[c,d,m]))._transitionDuration=.5,c;throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getTransitionObj(this._transitionDuration);return d&&(c.push({effect:d,target:"mediaLayer"}),c.push({effect:d,target:"textLayer"})),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(63).default),r.default=e;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){return function(a){if(Array.isArray(a))return a;}(d)||function(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var g,f,v,S,w=[],C=!0,I=!1;try{if(v=(l=l.call(a)).next,s===0){if(Object(l)!==l)return;C=!1;}else for(;!(C=(g=v.call(l)).done)&&(w.push(g.value),w.length!==s);C=!0);}catch(O){I=!0,f=O;}finally{try{if(!C&&l.return!=null&&(S=l.return(),Object(S)!==S))return;}finally{if(I)throw f;}}return w;}}(d,m)||function(a,s){if(a){if(typeof a=="string")return o(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?o(a,s):void 0;}}
71(d,m)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 72In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function _(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function E(d,l,a){l=h(l);var s=d,l=x()?Reflect.construct(l,a||[],h(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function x(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!d;})();}function h(d){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function y(d,m){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0});var b=c(63),p=c(41),c=function(d){function m(l,g,f){if(this instanceof m)return(l=E(this,m,[l,g,f])).textMediaRatio=.4,l._transitionDuration=1,l;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&y(s,d),s=m,(d=[{key:"build",value:function(){var l=[],f=n(this.getEffects(),2),g=f[0],f=f[1];return g&&l.push({effect:g,target:"mediaLayer"}),f&&l.push({effect:f,target:"textLayer"}),l;}},{key:"getEffects",value:function(){switch(this.aspectRatio.toString()){case"horizontal":return this.setHorizontalTransitions();case"vertical":return this.setVerticalTransitions();case"square":return this.setSquareTransitions();default:return[void 0,void 0];}}},{key:"setHorizontalTransitions",value:function(){var l=void 0,g=void 0;switch(this.transition){case p.SLIDE_TRANSITION.Top2Bottom:case p.SLIDE_TRANSITION.Bottom2Top:l=this.getTransitionObj(this._transitionDuration),g=this.getTransitionObj(this._transitionDuration);break;case p.SLIDE_TRANSITION.Left2Right:l=this.getTransitionObj(this._transitionDuration),g=this.getTransitionObj(this._transitionDuration-.35);break;case p.SLIDE_TRANSITION.Right2Left:l=this.getTransitionObj(this._transitionDuration-.35),g=this.getTransitionObj(this._transitionDuration);break;case p.SLIDE_TRANSITION.FadeIn:this._transitionDuration=.5,l=this.fadeEffect(0,1,this._transitionDuration,0),g=this.fadeEffect(0,1,this._transitionDuration,0);}return[l,g];}},{key:"setVerticalTransitions",value:function(){var l=void 0,g=void 0;switch(this.transition){case p.SLIDE_TRANSITION.Top2Bottom:l=this.getTransitionObj(this._transitionDuration),g=this.getTransitionObj(this._transitionDuration-.35);break;case p.SLIDE_TRANSITION.Bottom2Top:l=this.getTransitionObj(this._transitionDuration-.35),g=this.getTransitionObj(this._transitionDuration);break;case p.SLIDE_TRANSITION.Left2Right:case p.SLIDE_TRANSITION.Right2Left:l=this.getTransitionObj(this._transitionDuration),g=this.getTransitionObj(this._transitionDuration);break;case p.SLIDE_TRANSITION.FadeIn:l=this.fadeEffect(0,1,this._transitionDuration,0),g=this.fadeEffect(0,1,this._transitionDuration,0);}return[l,g];}},{key:"setSquareTransitions",value:function(){var l=void 0,g=void 0,f=this.slideDuration*this.textMediaRatio;switch(this._transitionDuration=.5,this.transition){case p.SLIDE_TRANSITION.FadeIn:l=this.fadeEffect(0,1,this._transitionDuration,0),g=this.fadeEffect(0,1,this._transitionDuration,f);break;case p.SLIDE_TRANSITION.Top2Bottom:l=this.translateFromEffect("y",["-",0,["global","height"]],this._transitionDuration,0),g=this.translateFromEffect("y",["-",0,["global","height"]],this._transitionDuration,f);break;case p.SLIDE_TRANSITION.Bottom2Top:l=this.translateFromEffect("y",["*",1.5,["global","height"]],this._transitionDuration,0),g=this.translateFromEffect("y",["*",1.5,["global","height"]],this._transitionDuration,f);break;case p.SLIDE_TRANSITION.Left2Right:l=this.translateFromEffect("x",["-",0,["global","width"]],this._transitionDuration,0),g=this.translateFromEffect("x",["-",0,["global","width"]],this._transitionDuration,f);break;case p.SLIDE_TRANSITION.Right2Left:l=this.translateFromEffect("x",["*",1.5,["global","width"]],this._transitionDuration,0),g=this.translateFromEffect("x",["*",1.5,["global","width"]],this._transitionDuration,f);break;default:p.SLIDE_TRANSITION.NoTransition,g=this.translateFromEffect("y",["-",0,["global","height"]],this._transitionDuration,f);}return[l,g];}}])&&_(s.prototype,d),a&&_(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(b.default);r.default=c;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}
72function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c,d,m){if(this instanceof y)return(c=o(this,y,[c,d,m]))._transitionDuration=.5,c;throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getTransitionObj(this._transitionDuration);return d&&c.push({effect:d,target:"background"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(63).default),r.default=e;},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0});var o=h(20),_=h(193),E=h(194),x=h(195),h=function(){function y(){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");}return b=y,c=[{key:"createEffect",value:function(d,m){switch(m){case o.VDMSlideType.VDMImageSlide:case o.VDMSlideType.VDMTextSlide:case o.VDMSlideType.VDMTweetSlide:return new _.default(d);case o.VDMSlideType.VDMTweetTextSlide:return new E.default(d);case o.VDMSlideType.VDMContextSlide:return new x.default(d);default:return;}}}],(p=null)&&n(b.prototype,p),c&&n(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getZoomObj();return d&&c.push({effect:d,target:"mainMedia"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(64).BaseZoom),r.default=e;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}
72function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getZoomObj();return d&&c.push({effect:d,target:"textLayer"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(64).BaseZoom),r.default=e;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getZoomObj();return d&&c.push({effect:d,target:"video-foreground"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(64).BaseZoom),r.default=e;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=function(w,C){if(w){if(typeof w=="string")return o(w,C);var I={}.toString.call(w).slice(8,-1);return(I=I==="Object"&&w.constructor?w.constructor.name:I)==="Map"||I==="Set"?Array.from(w):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?o(w,C):void 0;}}(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 73In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function o(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function _(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}
73(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.TextTransitor=void 0;var b,p,c=m(41),d=m(26),m=((m=b=b||{})[m.NoTransition=0]="NoTransition",m[m.FromTop=1]="FromTop",m[m.FromBottom=2]="FromBottom",m[m.FromLeft=3]="FromLeft",m[m.FromRight=4]="FromRight",m[m.FadeIn=5]="FadeIn",(m=p=p||{})[m.NoTransition=0]="NoTransition",m[m.ToBottom=1]="ToBottom",m[m.ToTop=2]="ToTop",m[m.ToRight=3]="ToRight",m[m.ToLeft=4]="ToLeft",m[m.FadeOut=5]="FadeOut",function(a){function s(f,v,S){var w;if(this instanceof s)return(w=E(this,s,[0,S,new d.default("horizontal")])).easeIn=["ease","in"],w.easeOut=["ease","out"],w.calcTransition(f),w.offsetTime=v,w.slideDuration=S,w._transitionDuration=.5,w;throw new TypeError("Cannot call a class as a function");}var l,g=s;if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");return g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&y(g,a),g=s,(a=[{key:"calcTransition",value:function(f){this.inTransition=Math.floor(f/6),this.outTransition=f%6;}},{key:"getTransitionObj",value:function(){var f=[];switch(this.inTransition){case b.FromTop:f.push(this.translateFromEffect("y",c.BaseTransitor.topRef,this._transitionDuration,this.offsetTime,this.easeOut));break;case b.FromBottom:f.push(this.translateFromEffect("y",c.BaseTransitor.bottomRef,this._transitionDuration,this.offsetTime,this.easeOut));break;case b.FromLeft:f.push(this.translateFromEffect("x",c.BaseTransitor.leftRef,this._transitionDuration,this.offsetTime,this.easeOut));break;case b.FromRight:f.push(this.translateFromEffect("x",c.BaseTransitor.rightRef,this._transitionDuration,this.offsetTime,this.easeOut));break;case b.FadeIn:f.push(this.fadeEffect(0,1,this._transitionDuration,0));}switch(this.outTransition){case p.ToBottom:f.push(this.translateToEffect("y",c.BaseTransitor.bottomRef,this._transitionDuration,this.slideDuration-this._transitionDuration,this.easeIn));break;case p.ToTop:f.push(this.translateToEffect("y",c.BaseTransitor.topRef,this._transitionDuration,this.slideDuration-this._transitionDuration,this.easeIn));break;case p.ToRight:f.push(this.translateToEffect("x",c.BaseTransitor.rightRef,this._transitionDuration,this.slideDuration-this._transitionDuration,this.easeIn));break;case p.ToLeft:f.push(this.translateToEffect("x",c.BaseTransitor.leftRef,this._transitionDuration,this.slideDuration-this._transitionDuration,this.easeIn));break;case p.FadeOut:f.push(this.fadeEffect(1,0,this._transitionDuration,this.slideDuration-this._transitionDuration));}return f;}},{key:"build",value:function(){var f=[],v=this.getTransitionObj();if(v&&0<v.length){var S,w=n(v);try{for(w.s();!(S=w.n()).done;){var C=S.value;f.push({effect:C,target:"textLayer"});}}catch(I){w.e(I);}finally{w.f();}}return f;}}])&&_(g.prototype,a),l&&_(g,l),Object.defineProperty(g,"prototype",{writable:!1}),g;}(c.BaseTransitor));r.TextTransitor=m;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}
73Object.defineProperty(r,"__esModule",{value:!0});var o=x(20),_=x(198),E=x(199),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");}return y=h,p=[{key:"createEffect",value:function(c,d,m,a,s){switch(s){case o.VDMSlideType.VDMContextSlide:return new _.default(c,d,m,a);case o.VDMSlideType.VDMImageSlide:case o.VDMSlideType.VDMTweetSlide:return new E.default(c,d,m,a);default:return;}}}],(b=null)&&n(y.prototype,b),p&&n(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.default=x;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c,d,m,a){if(this instanceof y)return o(this,y,[c,d,m,a]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getPositionObj();return d&&c.push({effect:d,target:"video-foreground"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(91).BasePosition),r.default=e;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}
73function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(c,d,m,a){if(this instanceof y)return o(this,y,[c,d,m,a]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"build",value:function(){var c=[],d=this.getPositionObj();return d&&c.push({effect:d,target:"mainMedia"}),c;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(91).BasePosition),r.default=e;},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){var p,c=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!c){if(Array.isArray(y)||(c=function(s,l){if(s){if(typeof s=="string")return o(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?o(s,l):void 0;}}(y))||b&&y&&typeof y.length=="number")return c&&(y=c),p=0,{s:b=function(){},n:function(){return p>=y.length?{done:!0}:{done:!1,value:y[p++]};},e:function(s){throw s;},f:b};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 74In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var d,m=!0,a=!1;return{s:function(){c=c.call(y);},n:function(){var s=c.next();return m=s.done,s;},e:function(s){a=!0,d=s;},f:function(){try{m||c.return==null||c.return();}finally{if(a)throw d;}}};}function o(y,b){(b==null||b>y.length)&&(b=y.length);for(var p=0,c=Array(b);p<b;p++)c[p]=y[p];return c;}function _(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0});var E=h(26),x=h(92),h=function(){function y(d,m){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");this._aspectRatio=new E.default(m.aspectRatio),this._templateId2paramsValues=new Map(),this._metadata=new x.default(d.metadata);}return b=y,(p=[{key:"zIndex",get:function(){return this._metadata.zIndex;}},{key:"aspectRatio",get:function(){return this._aspectRatio;}},{key:"templateId2name2parameter",get:function(){return this._templateId2name2parameter;}},{key:"setSupport",value:function(d){this._support=[],d.support&&(this._support=d.support);}},{key:"injectParametersValues",value:function(d){if(this._metadata&&this._metadata.templateIds){var m,a=n(this._metadata.templateIds);try{for(a.s();!(m=a.n()).done;){var s=m.value;s in d&&this._templateId2paramsValues.set(s,d[s]);}}catch(l){a.e(l);}finally{a.f();}}}}])&&_(b.prototype,p),c&&_(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){var s,l=typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];
74if(!l){if(Array.isArray(m)||(l=function(S,w){if(S){if(typeof S=="string")return o(S,w);var C={}.toString.call(S).slice(8,-1);return(C=C==="Object"&&S.constructor?S.constructor.name:C)==="Map"||C==="Set"?Array.from(S):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?o(S,w):void 0;}}(m))||a&&m&&typeof m.length=="number")return l&&(m=l),s=0,{s:a=function(){},n:function(){return s>=m.length?{done:!0}:{done:!1,value:m[s++]};},e:function(S){throw S;},f:a};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 75In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var g,f=!0,v=!1;return{s:function(){l=l.call(m);},n:function(){var S=l.next();return f=S.done,S;},e:function(S){v=!0,g=S;},f:function(){try{f||l.return==null||l.return();}finally{if(v)throw g;}}};}function o(m,a){(a==null||a>m.length)&&(a=m.length);for(var s=0,l=Array(a);s<a;s++)l[s]=m[s];return l;}function _(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}Object.defineProperty(r,"__esModule",{value:!0}),r.SlideAdapterBuilder=void 0;var b=d(202),p=d(5),c=d(205),d=function(m){function a(g,f,v,S){if(this instanceof a)return(v=E(this,a,[v,S]))._startTime=g,v._endTime=f,v._mediaPosition=void 0,v._slideEffects=void 0,v;throw new TypeError("Cannot call a class as a function");}var s,l=a;if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");return l.prototype=Object.create(m&&m.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),m&&y(l,m),l=a,(m=[{key:"dynamicChanges",get:function(){return this._dynamicChanges;}},{key:"mediaPosition",get:function(){return this._mediaPosition;}},{key:"startTime",get:function(){return this._startTime;}},{key:"endTime",get:function(){return this._endTime;}},{key:"createDynamicChanges",value:function(g){var f,v=[],S=n(g);try{for(S.s();!(f=S.n()).done;)var w=f.value,v=v.concat([b.default.createDynamicChange(w)]);}catch(C){S.e(C);}finally{S.f();}return this._dynamicChanges=v,this;}},{key:"setMediaLayerPosition",value:function(g){return this._mediaPosition=g,this;}},{key:"setSlideResources",value:function(g){return this._slideResources=g,this;}},{key:"slideEffects",get:function(){return this._slideEffects;}},{key:"setSlideEffects",value:function(g){return this._slideEffects=g,this;}},{key:"setAspectRatio",value:function(g){return this._aspectRatio=g,this;}},{key:"normalizeTimeValues",value:function(){if(this.startTime&&(this._startTime=p.default.round(this._startTime,3)),this.endTime&&(this._endTime=p.default.round(this._endTime,3)),this.slideEffects){var g,f=n(this.slideEffects);try{for(f.s();!(g=f.n()).done;){var v=g.value;v&&v.effect&&v.effect.attributes&&(v.effect.attributes.hasOwnProperty("startTime")?v.effect.attributes.startTime=p.default.round(v.effect.attributes.startTime,3):v.effect.attributes.hasOwnProperty("offsetTime")?v.effect.attributes.offsetTime=p.default.round(v.effect.attributes.offsetTime,3):v.effect.attributes.hasOwnProperty("endTime")?v.effect.attributes.endTime=p.default.round(v.effect.attributes.endTime,3):v.effect.attributes.hasOwnProperty("duration")&&(v.effect.attributes.duration=p.default.round(v.effect.attributes.duration,3)));}}catch(S){f.e(S);}finally{f.f();}}}},{key:"build",value:function(){return this.normalizeTimeValues(),new c.SlideAdapter(this);}}])&&_(l.prototype,m),s&&_(l,s),Object.defineProperty(l,"prototype",{writable:!1}),l;}(d(247).default);r.SlideAdapterBuilder=d;},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;
75y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0});var o=E(203),_=E(204),E=function(){function x(){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");}return h=x,b=[{key:"createDynamicChange",value:function(p){switch(p.type){case"attribute":return new o.AttributeChange(p);case"removeEffect":return new _.RemoveEffect(p);default:return;}}}],(y=null)&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.default=E;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.AttributeChange=void 0,e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"apply",value:function(c){var d=this;
75this.seekTarget(c).forEach(function(m){m.hasOwnProperty("attributes")&&m.attributes&&Object.assign(m.attributes,d.data);});}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(93).default),r.AttributeChange=e;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.RemoveEffect=void 0,e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"apply",value:function(c){var d=this;
75this.seekTarget(c).forEach(function(m){m.hasOwnProperty("effects")&&m.effects&&d.data.type&&(m.effects=m.effects.filter(function(a){return a.type!==d.data.type;}));});}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(93).default),r.RemoveEffect=e;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=function(w,C){if(w){if(typeof w=="string")return o(w,C);var I={}.toString.call(w).slice(8,-1);return(I=I==="Object"&&w.constructor?w.constructor.name:I)==="Map"||I==="Set"?Array.from(w):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?o(w,C):void 0;}}(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 76In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function o(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function _(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function E(a,f,l){f=b(f);var g=a,f=x()?Reflect.construct(f,l||[],b(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a,s,l,g){var f=y(b(1&g?a.prototype:a),s,l);return 2&g?function(v){return f.apply(l,v);}:f;}function y(){return(y=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,s,l){var g=function(f,v){for(;!{}.hasOwnProperty.call(f,v)&&(f=b(f))!==null;);return f;}(a,s);if(g)return(g=Object.getOwnPropertyDescriptor(g,s)).get?g.get.call(arguments.length<3?a:l):g.value;}).apply(null,arguments);}function b(a){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function p(a,s){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.SlideAdapter=void 0;var c=m(5),d=m(206),m=function(a){function s(f){var v;if(this instanceof s)return(v=E(this,s,[f])).startTime=Math.max(0,f.startTime),v._mediaPosition=f.mediaPosition,v.endTime=Math.max(f.endTime,v.startTime),v.duration=v.endTime-v.startTime,v.slideEffects=f.slideEffects,v.applyDynamicChanges(f.dynamicChanges),v;throw new TypeError("Cannot call a class as a function");}var l,g=s;if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");return g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&p(g,a),g=s,(a=[{key:"applyDynamicChanges",value:function(f){if(f){var v,S=n(f);try{for(S.s();!(v=S.n()).done;)v.value.apply(this._layers);}catch(w){S.e(w);}finally{S.f();}}}},{key:"adaptGenericComponent",value:function(f){var v,S=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],S=h(s,"adaptGenericComponent",this,3)([f,S]);if(S){var w=S.effects,C=f.studioId,I=f.id||"",O=f.src&&"id"in f.src?f.src.id:"";if(f.type==="component/text"){0<((te=this._slideResources.segmentation)==null?void 0:te.length)&&(f.attributes.segmentation=this._slideResources.segmentation);var M,N=!1,G=n(f.components);try{for(G.s();!(M=G.n()).done;){var H,B=M.value,z=(!N&&B.src&&"id"in B.src&&(O=B.src.id,N=!0),n(B.effects));try{for(z.s();!(H=z.n()).done;)H.value.locale=this._slideResources.locale;}catch(K){z.e(K);}finally{z.f();}0<((v=this._slideResources.segmentation)==null?void 0:v.length)&&(B.attributes.segmentation=this._slideResources.segmentation);}}catch(K){G.e(K);}finally{G.f();}}var te=this.getEffectsById(this.slideEffects,I,O,C);0<te.length&&(w=w.concat(te)),S.attributes.startTime=this.startTime,S.attributes.endTime=this.endTime,S.effects=w;}return S;}},{key:"adaptGenericSubComponent",value:function(f){return f=h(s,"adaptGenericSubComponent",this,3)([f]),f&&(f.attributes.startTime=this.startTime,f.attributes.endTime=this.endTime),f;}},{key:"adaptVideoComponent",value:function(f){if(f=h(s,"adaptVideoComponent",this,3)([f]),f)return f;}},{key:"adaptImageComponent",value:function(f){if(f=h(s,"adaptImageComponent",this,3)([f]),f)return f;}}
76,{key:"adaptColorComponent",value:function(f){if(f=h(s,"adaptColorComponent",this,3)([f]),f)return f;}},{key:"adaptAnimationComponent",value:function(f){if(f=h(s,"adaptAnimationComponent",this,3)([f]),f)return f;}},{key:"adaptMediaComponent",value:function(f){var v,S=h(s,"adaptMediaComponent",this,3)([f]),w="";if(f.src.id&&(v=c.default.deepGet(this._slideResources,f.src.id))?w=v:f.src.url&&(w=f.src.url),S)return d.default.verifyVideoMedia(w)&&((v=S).effects||(v.effects=[]),v.type&&v.type==="video"&&v.effects.push({type:"videoBackground",attributes:{blur:60,height:["relative-h","100%"],width:["relative-w","100%"]}}),S=v),S;}},{key:"adaptMediaBackgroundComponent",value:function(f){if(f=h(s,"adaptMediaBackgroundComponent",this,3)([f]),f)return f;}},{key:"adaptTextTemplateComponent",value:function(f){if(f=h(s,"adaptTextTemplateComponent",this,3)([f]),f)return f;}},{key:"adaptTextContainerComponent",value:function(f){if(f=h(s,"adaptTextContainerComponent",this,3)([f]),f)return f;}},{key:"adaptLayer",value:function(f,w){var S,w=h(s,"adaptLayer",this,3)([f,w]);if(w)return S=w.effects,f=f.id||"",0<(f=this.getEffectsById(this.slideEffects,f)).length&&(S=S.concat(f)),w.effects=S,w;}},{key:"getEffectsById",value:function(f,v,S,w){var C,I,O=[];if(f){var M,N=n(f);try{for(N.s();!(M=N.n()).done;){var G=M.value;(G.target==="*"||G.target===v||S!==void 0&&G.srcId===S||w!==void 0&&w===((I=(C=G.effect)==null?void 0:C.attributes)==null?void 0:I.studioId))&&O.push(G.effect);}}catch(H){N.e(H);}finally{N.f();}}return O;}},{key:"adapt",value:function(){var f=h(s,"adapt",this,3)([]),v=[];return f&&f.forEach(function(S){return v.push(S);}),v;}}])&&_(g.prototype,a),l&&_(g,l),Object.defineProperty(g,"prototype",{writable:!1}),g;}(d.default);r.SlideAdapter=m;},function(i,r,s){"use strict";function t(l){return function(g){if(Array.isArray(g))return x(g);}(l)||function(g){if(typeof Symbol<"u"&&g[Symbol.iterator]!=null||g["@@iterator"]!=null)return Array.from(g);}(l)||E(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 77In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(l){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g;}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g;})(l);}function o(l,g){return function(f){if(Array.isArray(f))return f;}(l)||function(f,v){var S=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(S!=null){var w,C,I,O,M=[],N=!0,G=!1;try{if(I=(S=S.call(f)).next,v===0){if(Object(S)!==S)return;N=!1;}else for(;!(N=(w=I.call(S)).done)&&(M.push(w.value),M.length!==v);N=!0);}catch(H){G=!0,C=H;}finally{try{if(!N&&S.return!=null&&(O=S.return(),Object(O)!==O))return;}finally{if(G)throw C;}}return M;}}(l,g)||E(l,g)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 78In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(l,g){var f,v=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!v){if(Array.isArray(l)||(v=E(l))||g&&l&&typeof l.length=="number")return v&&(l=v),f=0,{s:g=function(){},n:function(){return f>=l.length?{done:!0}:{done:!1,value:l[f++]};},e:function(I){throw I;},f:g};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 79In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var S,w=!0,C=!1;return{s:function(){v=v.call(l);},n:function(){var I=v.next();return w=I.done,I;},e:function(I){C=!0,S=I;},f:function(){try{w||v.return==null||v.return();}finally{if(C)throw S;}}};}function E(l,g){if(l){if(typeof l=="string")return x(l,g);var f={}.toString.call(l).slice(8,-1);return(f=f==="Object"&&l.constructor?l.constructor.name:f)==="Map"||f==="Set"?Array.from(l):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?x(l,g):void 0;}}function x(l,g){(g==null||g>l.length)&&(g=l.length);for(var f=0,v=Array(g);f<g;f++)v[f]=l[f];return v;}function h(l,g){for(var f=0;f<g.length;f++){var v=g[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,function(S){return S=function(w,C){if(n(w)!="object"||!w)return w;var I=w[Symbol.toPrimitive];if(I===void 0)return(C==="string"?String:Number)(w);if(I=I.call(w,C||"default"),n(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.");}(S,"string"),n(S)=="symbol"?S:S+"";}(v.key),v);}}
79Object.defineProperty(r,"__esModule",{value:!0});var y=s(207),b=s(5),p=s(225),c=s(226),d=s(17),m=s(34),a=s(12),s=function(){function l(S){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this.counter=0,this._aspectRatio=S.aspectRatio,this._slideResources=S.slideResources,this._templateId2paramsValues=S.templateId2paramsValues,this._templateId2var2condition=new Map(),this._templateId2name2parameter=new Map(),this._templateId2name2objectFunction=new Map(),new y.SlideAdapterDirector(this).manageBuildPhase(S);}return g=l,(f=[{key:"adaptGenericComponent",value:function(S){var w=this,C=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],I=Object.assign({},S.attributes),O=this.adaptEffects(S.effects,S.templateId),M=[];return C&&Array.isArray(S.components)&&S.components.forEach(function(N){N=w.adaptComponent(N),N&&M.push(N);}),{src:{},attributes:I,type:"",id:this.counter++,studioId:S.studioId,effects:O,alphabeticalId:S.id,components:M,isRtlLayout:(C=this._slideResources.rtlLayout)!=null&&C,slideIndex:this._slideResources.index};}},{key:"adaptGenericSubComponent",value:function(S){var w=Object.assign({},S.attributes),C=this.adaptEffects(S.effects,S.templateId);return{src:{},attributes:w,type:"",id:this.counter++,effects:C,alphabeticalId:S.id,isRtlLayout:(w=this._slideResources.rtlLayout)!=null&&w,slideIndex:this._slideResources.index};}},{key:"adaptEffects",value:function(S,w){var C=[];if(Array.isArray(S)){var I,O=_(S);try{for(O.s();!(I=O.n()).done;){var M=I.value;if(M.condition){if(this.isCondSatisfiedExtended(M.condition,w)){for(var N=0,G=Object.entries(M.attributes);N<G.length;N++){var H=o(G[N],2),B=H[0],z=H[1],te=b.default.deepGet(this._slideResources,z);te!==void 0&&(M.attributes[B]=te);}C.push(Object.assign({},M));}}else{for(var K=0,V=Object.entries(M.attributes);K<V.length;K++){var U=o(V[K],2),Z=U[0],re=U[1],ue=b.default.deepGet(this._slideResources,re);ue!==void 0&&(M.attributes[Z]=ue);}C.push(Object.assign({},M));}}}catch(q){O.e(q);}finally{O.f();}}return C;}},{key:"adaptVideoComponent",value:function(S){var w,C,I,O=this.adaptGenericComponent(S),M=S.effects.some(function(Z){return Z&&Z.type==="headCentering";}),N=S.effects.some(function(Z){return Z&&Z.type==="backgroundRemoval";}),G="",H="",B=0,z=void 0,te=void 0,K=void 0,V=void 0,U=a.PRIMARY_URL_ID;if(S.src.id&&(w=b.default.deepGet(this._slideResources,S.src.id))?(G=w,(0,m.isAccessString)(S.src.id)?(((I=S.src.id.replace("/url","/seek")).includes("/seek")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/seek")))&&(B=w),((I=S.src.id.replace("/url","/urlId")).includes("/urlId")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/urlId")))&&(U=w),((I=S.src.id.replace("/url","/mediaId")).includes("/mediaId")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/mediaId")))&&(V=w),((I=S.src.id.replace("/url","/volume")).includes("/volume")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/volume")))&&(z=w),M&&((I=S.src.id.replace("/url","/headBoundingBox")).includes("/headBoundingBox")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/headBoundingBox")))&&(te=w),N&&((I=S.src.id.replace("/url","/personBoundingBox")).includes("/personBoundingBox")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/personBoundingBox")))&&(K=w),this._slideResources.lowRes&&((I=S.src.id.replace("/url","/previewUrl")).includes("/previewUrl")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/previewUrl")))&&(G=w)):(b.default.warn("src.id was tested only with access string and access array"),I=(C=function(Z,re){if(typeof Z=="string")return Z.replace(new RegExp("url","g"),re);if(Array.isArray(Z))return Z.map(function(q){return C(q,re);});if(n(Z)==="object"&&Z!==null)for(var ue in Z)Z.hasOwnProperty(ue)&&(Z[ue]=C(Z[ue],re));return Z;})(S.src.id,"seek"),(w=b.default.deepGet(this._slideResources,I))&&(B=w),I=C(S.src.id,"urlId"),(w=b.default.deepGet(this._slideResources,I))&&(U=w),I=C(S.src.id,"mediaId"),(w=b.default.deepGet(this._slideResources,I))&&(V=w),I=C(S.src.id,"volume"),(w=b.default.deepGet(this._slideResources,I))&&(z=w),M&&(I=C(S.src.id,"headBoundingBox"),(w=b.default.deepGet(this._slideResources,I))&&(te=w)),N&&(I=C(S.src.id,"personBoundingBox"),(w=b.default.deepGet(this._slideResources,I))&&(K=w)),this._slideResources.lowRes&&(I=C(S.src.id,"previewUrl"),(w=b.default.deepGet(this._slideResources,I))&&(G=w)))):S.src.url&&(G=S.src.url,B=S.src.seek?Number(S.src.seek):B),(w=b.default.deepGet(this._slideResources,"loadingThumbnail"))&&l.verifyImageMedia(w)&&(H=w),l.verifyVideoMedia(G))return O.src={url:G,loadingThumbnailUrl:H,seek:B,urlId:U,volume:z,headBoundingBox:te,personBoundingBox:K,mediaId:V},O.type="video",O;}},{key:"adaptImageComponent",value:function(S){var w,C,I,O=this.adaptGenericComponent(S),M="";if(S.src.id&&(w=b.default.deepGet(this._slideResources,S.src.id))?(M=w,(0,m.isAccessString)(S.src.id)?this._slideResources.lowRes&&((I=S.src.id.replace("/url","/thumbnailUrl")).includes("/thumbn
79ailUrl")&&(w=b.default.deepGet(this._slideResources,I))||I==="asset.url"&&(w=b.default.deepGet(this._slideResources,"media-0/thumbnailUrl")))&&(M=w):(b.default.warn("src.id was tested only with access string and access array"),C=function(N,G){if(typeof N=="string")return N.replace(new RegExp("url","g"),G);if(Array.isArray(N))return N.map(function(B){return C(B,G);});if(n(N)==="object"&&N!==null)for(var H in N)N.hasOwnProperty(H)&&(N[H]=C(N[H],G));return N;},this._slideResources.lowRes&&(I=C(S.src.id,"thumbnailUrl"),(w=b.default.deepGet(this._slideResources,I))&&(M=w)))):S.src.url&&(M=S.src.url),l.verifyImageMedia(M))return O.src={url:M},O.type="image",O;}},{key:"adaptColorComponent",value:function(S){return S=this.adaptGenericComponent(S),S.type="color",S;}},{key:"adaptAnnotation",value:function(S){return Object.assign({},S);}},{key:"adaptTextTemplateComponentText",value:function(S){if(this._textTemplate){var w,C=[],I=[],O=new RegExp(/\\\//,"g"),M=new RegExp(/\\\*/,"g"),N=new RegExp("%#%","g"),G=new RegExp("%!%","g");S=(S=""+S).replace(O,"%#%").replace(M,"%!%");for(var H=0;H<this._textTemplate.textAnnotations.length;H++)for(var B=this._textTemplate.textAnnotations[H].regex,z=new RegExp(B,"g");w=z.exec(S);)I.push({annotationInd:H+1,index:w.index,val:w[0],final:w[1]});var te,K=0,V=_(I=I.sort(function(re,ue){return re.index-ue.index;}));try{for(V.s();!(te=V.n()).done;){var U,Z=te.value;Z.index>=K&&(0<(U=S.substring(K,Z.index).replace(N,"/").replace(G,"*")).length&&C.push({text:U,annotationInd:0}),C.push({text:Z.final.replace(N,"/").replace(G,"*"),annotationInd:Z.annotationInd}),K=Z.index+Z.val.length);}}catch(re){V.e(re);}finally{V.f();}return S.length>K&&C.push({text:S.substring(K,S.length).replace(N,"/").replace(G,"*"),annotationInd:0}),C;}}},{key:"adaptTextTemplateComponent",value:function(S){var w,C=[],I=this.adaptGenericSubComponent(S),O="";return S.src.id&&(w=b.default.deepGet(this._slideResources,S.src.id))?O=w:S.src.default&&(O=S.src.default),O&&typeof O=="string"&&0<O.replace(/\s/g,"").length&&(w=this.adaptTextTemplateComponentText(O))&&((S=Object.assign({},I.attributes)).sections=w,C.push(Object.assign(Object.assign({},I),{attributes:S,type:"text"}))),C;}},{key:"buildAnnotationObject",value:function(S){var w={container:void 0,text:void 0,textAnnotations:[]};if(S.textAnnotations&&0<S.textAnnotations.length){var C=0;for(S.text?w.text=S.text:(C=1,w.text=S.textAnnotations[0]);C<S.textAnnotations.length;C++)w.textAnnotations.push(S.textAnnotations[C]);}return w;}},{key:"adaptTextContainerComponent",value:function(S){var w=0,C=this.buildAnnotationObject(S);if(this._textTemplate||C.text){var U=C.text||this._textTemplate.text,I=[],U=this.adaptAnnotation(U),O=(I.push(U),this._textTemplate?this._textTemplate.textAnnotations:void 0);if(O&&0<((U=C.textAnnotations)==null?void 0:U.length))if(O.length===0)O=C.textAnnotations;else{for(var M=0;M<O.length;M++){var N,G=_(C.textAnnotations);try{for(G.s();!(N=G.n()).done;){var H=N.value;O[M].regex===H.regex&&(O[M]=H);}}catch(D){G.e(D);}finally{G.f();}}O&&C.textAnnotations&&O.push.apply(O,t(C.textAnnotations.filter(function(D){return!O.some(function($){return $.regex===D.regex;});})));}if(O){var B,z=_(O);try{for(z.s();!(B=z.n()).done;){var te=B.value;I.push(this.adaptAnnotation(te));}}catch(D){z.e(D);}finally{z.f();}}var K,V,U=S.resources||this._slideResources,Z=this.adaptGenericComponent(S,!1),re=(U.textPosition===void 0||S.attributes.ignoreSlideTextPosition||(re=Z.attributes,K=(S.isLegacyComponent?c:p).default.getPosition(U.textPosition),Z.attributes=Object.assign({},re,K)),Z.textAnnotations=I,S.container||(this._textTemplate?this._textTemplate.container:void 0)),ue=(re&&re.bgColor&&(Z.attributes.color=re.bgColor),U.alignHorizontal&&(Z.attributes.xAlignment=U.alignHorizontal),Z.subComponents=[],_(S.components));try{for(ue.s();!(V=ue.n()).done;){var q=V.value;if(!q.condition||this.isCondSatisfiedExtended(q.condition,S.templateId)){q.templateId=S.templateId;var J,oe=this.adaptTextTemplateComponent(q);if(oe&&0<oe.length){if(S.attributes.ignoreTextAnnotations){var Q,F=_(oe);try{for(F.s();!(Q=F.n()).done;){var X=Q.value;if(X.attributes.sections){var Y,j=_(X.attributes.sections);try{for(j.s();!(Y=j.n()).done;)Y.value.annotationInd=0;}catch(D){j.e(D);}finally{j.f();}}}}
79catch(D){F.e(D);}finally{F.f();}}(J=Z.subComponents).push.apply(J,t(oe)),w+=oe.length;}}}}catch(D){ue.e(D);}finally{ue.f();}if(Z.type="container/text",0<w)return Z;}}},{key:"adaptAnimationComponent",value:function(S){function w(N,G){G.animationType=N.type,G.inAnimationText=N.inAnimationText,G.loop=N.loop;}var C,I,O=this.adaptGenericComponent(S),M="";if(S.src.id&&S.src.index!==void 0&&(C=b.default.deepGet(this._slideResources,S.src.id))?(I=C[Number(S.src.index)])&&(M=I.jsonUrl||"",w(I,O)):!S.src.id||S.src.index!==void 0&&C||(I=S.src.default)&&(M=I.jsonUrl||"",w(I,O)),function(N){return N=b.default.getExtension(N),!!/(json)$/i.exec(N);}(M))return O.src={jsonUrl:M},O.type="animation",O;}},{key:"adaptMediaComponent",value:function(S){var w,C="";return S.src.id&&(w=b.default.deepGet(this._slideResources,S.src.id))?C=w:S.src.url&&(C=S.src.url),l.verifyVideoMedia(C)?this.adaptVideoComponent(S):l.verifyImageMedia(C)?this.adaptImageComponent(S):void 0;}},{key:"adaptMediaBackgroundComponent",value:function(S){var w,C="";if(S.src.id&&(w=b.default.deepGet(this._slideResources,S.src.id))?C=w:S.src.url&&(C=S.src.url),l.verifyImageMedia(C))return this.adaptImageComponent(S);}},{key:"adaptComponent",value:function(S){switch(S.type){case"component/video":return this.adaptVideoComponent(S);case"component/image":return this.adaptImageComponent(S);case"component/color":return this.adaptColorComponent(S);case"component/text":return this.adaptTextContainerComponent(S);case"component/animation":return this.adaptAnimationComponent(S);case"component/media":return this.adaptMediaComponent(S);case"component/media-background":return this.adaptMediaBackgroundComponent(S);}}},{key:"adaptLayer",value:function(S,w){var C,I=Object.assign({},S.attributes),O=this.adaptEffects(S.effects,S.templateId),M=[],N=[],G=S.id||"",H=_(S.components);try{for(H.s();!(C=H.n()).done;){var B,z=C.value;z.templateId=S.templateId,z.isLegacyComponent=S.isLegacyLayer,z.condition&&!this.isCondSatisfiedExtended(z.condition,z.templateId)||(B=this.adaptComponent(z))&&M.push(B);}}catch(U){H.e(U);}finally{H.f();}if(S.binds){var te,K=_(S.binds);try{for(K.s();!(te=K.n()).done;){var V=te.value;V&&N.push(V);}}catch(U){K.e(U);}finally{K.f();}}if(0<M.length)return{attributes:I,components:M,effects:O,alphabeticalId:G,binds:N,templateId:S.templateId,isLegacyLayer:S.isLegacyLayer,slideIndex:this._slideResources.index};}},{key:"isCondSatisfiedExtended",value:function(S,w){return!(this._templateId2var2condition&&this._templateId2var2condition.has(w)&&this._templateId2var2condition.get(w).has(S))||!!this._templateId2var2condition.get(w).has(S)&&(w=this._templateId2var2condition.get(w).get(S),(0,d.isCondSatisfied)(w));}},{key:"adapt",value:function(){var S,w=this,C=(this.counter=0,[]),I=this;return this._layers.forEach(function(O,M){O.condition&&!I.isCondSatisfiedExtended(O.condition,O.templateId)||(S=w.adaptLayer(O,M))&&C.push(S);}),C;}},{key:"aspectRatio",get:function(){return this._aspectRatio;},set:function(S){this._aspectRatio=S;}},{key:"slideResources",get:function(){return this._slideResources;},set:function(S){this._slideResources=S;}},{key:"templateId2name2objectFunction",get:function(){return this._templateId2name2objectFunction;},set:function(S){this._templateId2name2objectFunction=S;}},{key:"templateId2var2condition",get:function(){return this._templateId2var2condition;},set:function(S){this._templateId2var2condition=S;}},{key:"templateId2paramsValues",get:function(){return this._templateId2paramsValues;},set:function(S){this._templateId2paramsValues=S;}},{key:"layers",get:function(){return this._layers;},set:function(S){this._layers=S;}},{key:"textTemplate",get:function(){return this._textTemplate;},set:function(S){this._textTemplate=S;}},{key:"templateId2name2parameter",get:function(){return this._templateId2name2parameter;}}])&&h(g.prototype,f),v&&h(g,v),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,f,v;}();(r.default=s).verifyVideoMedia=function(l){return l=b.default.getExtension(l),!!/(mp4|mpeg|hls|m3u8|mov)$/i.exec(l);},s.verifyImageMedia=function(l){return l=b.default.getExtension(l),!!/(jpg|png|jpeg|svg)$/i.exec(l);};},function(i,r,s){"use strict";function t(l){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g;}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g;})(l);}function n(l,g){return function(f){if(Array.isArray(f))return f;}(l)||function(f,v){var S=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(S!=null){var w,C,I,O,M=[],N=!0,G=!1;try{if(I=(S=S.call(f)).next,v===0){if(Object(S)!==S)return;N=!1;}else for(;!(N=(w=I.call(S)).done)&&(M.push(w.value),M.length!==v);N=!0);}catch(H){G=!0,C=H;}
79finally{try{if(!N&&S.return!=null&&(O=S.return(),Object(O)!==O))return;}finally{if(G)throw C;}}return M;}}(l,g)||_(l,g)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 80In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(l,g){var f,v=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!v){if(Array.isArray(l)||(v=_(l))||g&&l&&typeof l.length=="number")return v&&(l=v),f=0,{s:g=function(){},n:function(){return f>=l.length?{done:!0}:{done:!1,value:l[f++]};},e:function(I){throw I;},f:g};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 81In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var S,w=!0,C=!1;return{s:function(){v=v.call(l);},n:function(){var I=v.next();return w=I.done,I;},e:function(I){C=!0,S=I;},f:function(){try{w||v.return==null||v.return();}finally{if(C)throw S;}}};}function _(l,g){if(l){if(typeof l=="string")return E(l,g);var f={}.toString.call(l).slice(8,-1);return(f=f==="Object"&&l.constructor?l.constructor.name:f)==="Map"||f==="Set"?Array.from(l):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?E(l,g):void 0;}}function E(l,g){(g==null||g>l.length)&&(g=l.length);for(var f=0,v=Array(g);f<g;f++)v[f]=l[f];return v;}function x(l,g){for(var f=0;f<g.length;f++){var v=g[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,function(S){return S=function(w,C){if(t(w)!="object"||!w)return w;var I=w[Symbol.toPrimitive];if(I===void 0)return(C==="string"?String:Number)(w);if(I=I.call(w,C||"default"),t(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.");}(S,"string"),t(S)=="symbol"?S:S+"";}(v.key),v);}}Object.defineProperty(r,"__esModule",{value:!0}),r.SlideAdapterDirector=void 0;var h=s(21),y=s(5),b=s(94),p=s(210),c=s(223),d=s(96),m=s(224),a=s(17),s=function(){function l(S){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this.adapter=S;}return g=l,(f=[{key:"manageBuildPhase",value:function(S){this.buildInfoFromTemplates(S.templateIds,S.support),this.buildSlideObjects(S.templateIds,S.support);}},{key:"buildInfoFromTemplates",value:function(S,w){var C=this;if(S&&w){var I,O=o(S);try{for(O.s();!(I=O.n()).done;)(function(){var M=I.value,N=w.find(function(G){return G.templateId===M;});N&&(N.objectFunctions&&(C.adapter.templateId2name2objectFunction.has(M)||C.adapter.templateId2name2objectFunction.set(M,new Map()),C.buildTemplateObjectFunctions(M,N.objectFunctions)),N.conditions&&(C.adapter.templateId2var2condition.has(M)||C.adapter.templateId2var2condition.set(M,new Map()),C.buildTemplateConditions(M,N.conditions)),N.parameters&&(C.adapter.templateId2name2parameter.has(M)||C.adapter.templateId2name2parameter.set(M,new Map()),C.buildTemplateParameters(M,N.parameters)));})();}catch(M){O.e(M);}finally{O.f();}}}}
81,{key:"buildTemplateObjectFunctions",value:function(S,w){if(w!==void 0)for(var C=new c.ObjectFunctionBuilder(this.adapter.slideResources),I=0,O=Object.entries(w);I<O.length;I++){var N=n(O[I],2),M=N[0],N=N[1];if((0,d.isObjectFunctionTemplate)(N))try{var G=C.build(N);G&&this.adapter.templateId2name2objectFunction.get(S).set(M,G);}catch(H){y.default.debug(H.message);}else y.default.warn("".concat(this.constructor.name,": The definition ").concat(JSON.stringify(N),` 82 of objectFunction `).concat(M,` 83 in template `).concat(S," is wrong."));}}},{key:"buildTemplateParameters",value:function(S,w){var C=this;if(w!==void 0&&(w=function(j){var D=y.default.cloneDeep(j);if(j.defaults){delete D.defaults;var $=[];if(j.defaults.common)for(var ne=0,le=Object.entries(j.defaults.common);ne<le.length;ne++){var fe=n(le[ne],2),se=fe[0],fe=fe[1];se in D&&(D[se].default=fe,$.push(se));}for(var ge=0,he=Object.entries(j.defaults);ge<he.length;ge++){var Re=n(he[ge],2),_e=Re[0],Re=Re[1];if(_e!=="common"){Se=Ue=De=Ue=ye=de=void 0;for(var ee=D,W=_e,_e=Re,ae=$,de=0,ye=Object.entries(_e);de<ye.length;de++){var Se,Ue=n(ye[de],2),De=Ue[0],Ue=Ue[1];De in ee&&!ae.includes(De)&&(Se=ee[De].default,(0,h.isRelativeValue)(Se)||(ee[De].default={horizontal:void 0,square:void 0,vertical:void 0}),ee[De].default[W]=Ue);}}}}return D;}(w),w)){for(var I=new b.ParameterBuilder(this.adapter.slideResources),O=0,M=Object.entries(w);O<M.length;O++){var G=n(M[O],2),N=G[0],G=G[1];if((0,b.isParameterObject)(G))try{var H=I.build(G);H?this.adapter.templateId2name2parameter.get(S).set(N,H):y.default.warn("Problem while building the parameter: ".concat(N,` 84 1) Check the value passed against the values allowed 85 86 2) Check if you didn't miss any aspect-ratio while declaring the parameter in the template 87 88 3) Check if there exists default value at all 89`));}catch(D){y.default.warn(D.message);}else y.default.warn("".concat(this.constructor.name,": The parameter object ").concat(JSON.stringify(G),` 90 of parameter `).concat(N,` 91 in template `).concat(S," is wrong."));}var B=S,w=this.adapter.templateId2paramsValues,z=this.adapter.templateId2name2parameter;if(w.has(B)){var w=w.get(B),te=z.get(B),K=[];if(w.common)if((0,h.isNames2Value)(w.common))for(var V=0,U=Object.entries(w.common);V<U.length;V++){var re=n(U[V],2),Z=re[0],re=re[1];if(te.has(Z))try{te.get(Z).setDefault((0,a.getResourceByRef)(C.adapter.slideResources,re,"setValues")),K.push(Z);}catch($){y.default.warn("Could not set parameter default, error: ".concat($.message));}}else y.default.warn(`Incorrect type parameters or structure passed with $parameters option in common section: 92 93 TemplateId: `.concat(B," params: ").concat(JSON.stringify(w.common),` 94 95 Please check the corresponding interface in the adapter to validate the structure and types`));delete w.common;for(var ue=0,q=Object.entries(w);ue<q.length;ue++){var oe=n(q[ue],2),J=oe[0],oe=oe[1];if((0,h.isNames2Value)(oe))for(var Q=0,F=Object.entries(oe);Q<F.length;Q++){var Y=n(F[Q],2),X=Y[0],Y=Y[1];if(!K.includes(X)&&te.has(X))try{te.get(X).setDefault((0,a.getResourceByRef)(C.adapter.slideResources,Y,"setValues"),J);}catch($){y.default.warn("Could not set parameter default, error: ".concat($.message));}}else y.default.warn(`Incorrect type parameters or structure passed with $parameters option: 96 97 TemplateId: `.concat(B," AspectRatio: ").concat(J," params: ").concat(JSON.stringify(oe),` 98 99 Please check the corresponding interface in the adapter to validate the structure and types`));}}}}}
99,{key:"buildTemplateConditions",value:function(S,w){if(w!==void 0)for(var C=new p.ConditionBuilder(this.adapter.slideResources),I=0,O=Object.entries(w);I<O.length;I++){var N=n(O[I],2),M=N[0],N=N[1];if((0,p.isConditionObject)(N))try{var G=C.build(N);G&&this.adapter.templateId2var2condition.get(S).set(M,G);}catch(H){y.default.warn(H.message);}else y.default.warn("".concat(this.constructor.name,": The condition object ").concat(JSON.stringify(N),` 100 of condition `).concat(M,` 101 in template `).concat(S," is wrong."));}}},{key:"buildSlideObjects",value:function(S,w){var C=this;if(S&&w){var I,O=[],M=(this.adapter.textTemplate=void 0,o(S));try{for(M.s();!(I=M.n()).done;)(function(){var N=I.value,G=w.find(function(V){return V.templateId===N;});if(G){var H,B=C.adapter.templateId2name2objectFunction.get(N),z=C.adapter.templateId2name2parameter.get(N),te=C.adapter.templateId2var2condition.get(N),K=new m.default(B,z,te,C.adapter.aspectRatio,C.adapter.slideResources);switch(G.type){case"template/package":case"template/card":case"template/slide":G.style&&(H=G.style[C.adapter.aspectRatio.toString()],(H=y.default.cloneDeep(H)).layers=K.execute(H.layers),H.layers.forEach(function(V){V.templateId=N,V.isLegacyLayer="isLegacy"in G&&G.isLegacy;}),O=O.concat(H.layers));break;case"template/text":G.style&&(H=G.style[C.adapter.aspectRatio.toString()],H=K.execute(H),C.adapter.textTemplate=y.default.cloneDeep(H));}}})();}catch(N){M.e(N);}finally{M.f();}this.adapter.layers=O;}}}])&&x(g.prototype,f),v&&x(g,v),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,f,v;}();r.SlideAdapterDirector=s;},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.Parameter=void 0;var o=E(94),_=E(21),E=function(){function x(p){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this._type=p.type,this._default=p.default,this._editable=p.editable||!0,this._allowedValues=p.allowedValues;}return h=x,(y=[{key:"getValue",value:function(p){return this._default==null||(0,_.isRelativeValue)(this._default)?p&&(0,_.isRelativeValue)(this._default)?this._default[p]:void 0:this._default;}},{key:"setDefault",value:function(p,c){if(!this._editable)throw new Error("Parameter: can not set non-editable parameter");if(!o.ParameterBuilder.isValid(p,this._allowedValues,this._type))throw new Error("Parameter: can not set parameter value, non-valid value passed");if(this._allowedValues!=null&&!this._allowedValues.includes(p))throw new Error("Parameter: value given is not allowed");c!=null&&(0,_.isRelativeValue)(this._default)?this._default[c]=p:this._default=p;}}])&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.Parameter=E;},function(i,r,e){"use strict";function t(x,h){return function(y){if(Array.isArray(y))return y;}(x)||function(y,b){var p=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(p!=null){var c,d,m,a,s=[],l=!0,g=!1;try{if(m=(p=p.call(y)).next,b===0){if(Object(p)!==p)return;l=!1;}else for(;!(l=(c=m.call(p)).done)&&(s.push(c.value),s.length!==b);l=!0);}catch(f){g=!0,d=f;}finally{try{if(!l&&p.return!=null&&(a=p.return(),Object(a)!==a))return;}finally{if(g)throw d;}}return s;}}(x,h)||function(y,b){if(y){if(typeof y=="string")return n(y,b);var p={}.toString.call(y).slice(8,-1);return(p=p==="Object"&&y.constructor?y.constructor.name:p)==="Map"||p==="Set"?Array.from(y):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?n(y,b):void 0;}}
101(x,h)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 102In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(x,h){(h==null||h>x.length)&&(h=x.length);for(var y=0,b=Array(h);y<h;y++)b[y]=x[y];return b;}Object.defineProperty(r,"__esModule",{value:!0}),r.resolveParameterResources=void 0;var o=e(5),_=e(21),E=e(17);r.resolveParameterResources=function(x,h,y){var b=o.default.cloneDeep(h);if((0,_.isRelativeValue)(b))for(var p=0,c=Object.entries(b);p<c.length;p++){var m=t(c[p],2),d=m[0],m=m[1];b[d]=(0,E.recursivelyGetResource)(x,m,y);}else b!==void 0&&(b=(0,E.recursivelyGetResource)(x,b,y));return b;};},function(i,r,e){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,c){return function(d){if(Array.isArray(d))return d;}(p)||function(d,m){var a=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(a!=null){var s,l,g,f,v=[],S=!0,w=!1;try{if(g=(a=a.call(d)).next,m===0){if(Object(a)!==a)return;S=!1;}else for(;!(S=(s=g.call(a)).done)&&(v.push(s.value),v.length!==m);S=!0);}catch(C){w=!0,l=C;}finally{try{if(!S&&a.return!=null&&(f=a.return(),Object(f)!==f))return;}finally{if(w)throw l;}}return v;}}(p,c)||function(d,m){if(d){if(typeof d=="string")return _(d,m);var a={}.toString.call(d).slice(8,-1);return(a=a==="Object"&&d.constructor?d.constructor.name:a)==="Map"||a==="Set"?Array.from(d):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(d,m):void 0;}}(p,c)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 103In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}Object.defineProperty(r,"__esModule",{value:!0}),r.ConditionBuilder=r.isConditionObject=void 0;var E=e(95),x=e(10),h=e(34),y=e(17);function b(p){if(x.default.isObject(p)&&!(0,h.isAccessObject)(p))for(var c=0,d=Object.entries(p);c<d.length;c++){var m=o(d[c],2),m=(m[0],m[1]);if(Array.isArray(m))return!0;}return!1;}
103r.isConditionObject=b,e=function(){function p(a){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");this.resources=a;}return c=p,(d=[{key:"build",value:function(a){for(var s=this,l=0,g=Object.entries(a);l<g.length;l++){var v=o(g[l],2),f=v[0],v=(v=v[1]).map(function(S){return b(S)?s.build(S):(0,y.getResourceByRef)(s.resources,S,s.constructor.name);},this);return E.default.createFunction(f,v,this.resources);}}}])&&n(c.prototype,d),m&&n(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}(),r.ConditionBuilder=e;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){var a=y.default.pairwise(this.evaluatedArgs,function(s,l){return s===l;});return y.default.forAll(a,!0);}},{key:"strictArgsCheck",value:function(){return 2<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}
103function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),e=function(h){function y(){var c=this,d=y;if(c instanceof d)return o(this,y,arguments);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"_eval",value:function(){return!this.evaluatedArgs[0];}},{key:"strictArgsCheck",value:function(){return 1<=arguments.length;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(9).IntrinsicFunction),r.default=e;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){var a=y.default.pairwise(this.evaluatedArgs,function(s,l){return l<s;});return y.default.forAll(a,!0);}},{key:"strictArgsCheck",value:function(){return 2<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
103p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){var a=y.default.pairwise(this.evaluatedArgs,function(s,l){return l<=s;});return y.default.forAll(a,!0);}},{key:"strictArgsCheck",value:function(){return 2<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){var a=y.default.pairwise(this.evaluatedArgs,function(s,l){return s<l;});return y.default.forAll(a,!0);}},{key:"strictArgsCheck",value:function(){return 2<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
103p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){var a=y.default.pairwise(this.evaluatedArgs,function(s,l){return s<=l;});return y.default.forAll(a,!0);}},{key:"strictArgsCheck",value:function(){return 2<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){if(y.default.hasOwnProperty(this.evaluatedArgs[0],"length")||Array.isArray(this.evaluatedArgs[0])||typeof this.evaluatedArgs[0]=="string")return this.evaluatedArgs[0].length;y.default.error("Argument passed to Length function doesn't have length property");}},{key:"strictArgsCheck",value:function(){return 1<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
103p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){if(typeof this.evaluatedArgs[0]=="string")return this.evaluatedArgs[0].trim();y.default.error("Argument passed to trim function is not string");}},{key:"strictArgsCheck",value:function(){return 1<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){return y.default.forAll(this.evaluatedArgs,!0);}},{key:"strictArgsCheck",value:function(){return 0<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
103p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0});var h=b(9),y=b(10),b=function(p){function c(){var a=this,s=c;if(a instanceof s)return o(this,c,arguments);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"_eval",value:function(){return y.default.isTrueExists(this.evaluatedArgs);}},{key:"strictArgsCheck",value:function(){return 0<=arguments.length;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.IntrinsicFunction);r.default=b;},function(i,r,e){"use strict";function t(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(x(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),x(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),x(s)=="symbol"?s:s+"";}(a.key),a);}}function n(c,s,m){s=_(s);var a=c,s=o()?Reflect.construct(s,m||[],_(c).constructor):s.apply(c,m);if(s&&(x(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function o(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(o=function(){return!!c;})();}function _(c){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function E(c,d){return(E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}function x(c){return(x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}Object.defineProperty(r,"__esModule",{value:!0}),r.isArgReference=void 0;var h=e(9),y=e(5),b=e(17);function p(c){return x(c)==="object"&&"arg"in c&&typeof c.arg=="number";}r.isArgReference=p,e=function(c){function d(s){var l=this,g=d;if(!(l instanceof g))throw new TypeError("Cannot call a class as a function");for(var f=arguments.length,v=new Array(1<f?f-1:0),S=1;S<f;S++)v[S-1]=arguments[S];if(l=n(this,d,[].concat(v)),s===void 0)throw new Error(`ObjectFunction: couldn't initiate given object function 104 105 given definition is undefined`);return l.name=s.name,l.argumentsDescription=s.argumentsDescription,l.shouldDescribe=s.describeUponEval,l.description=s.description,l.return=s.return,l;}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&E(a,c),a=d,(c=[{key:"_eval",value:function(){var s=this,l=(this.shouldDescribe&&this.describe(),(0,b.deepReplaceIterator)(function(f){return f;},function(f){return p(f)?s.evaluatedArgs[f.arg]:f;})),g=y.default.cloneDeep(this.return);return l.iterate(g);}}
105,{key:"strictArgsCheck",value:function(){return!0;}},{key:"describe",value:function(){this.description&&y.default.debug(this.description),this.argumentsDescription&&y.default.debug(this.argumentsDescription);}}])&&t(a.prototype,c),m&&t(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.IntrinsicFunction),r.default=e;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0});var h=p(9),y=p(10),b=p(5),p=function(c){function d(s){var l=this,g=d;if(!(l instanceof g))throw new TypeError("Cannot call a class as a function");for(var f=arguments.length,v=new Array(1<f?f-1:0),S=1;S<f;S++)v[S-1]=arguments[S];return(l=o(this,d,[].concat(v))).resources=s,l;}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"_eval",value:function(){var s=this.evaluatedArgs[0];if(typeof s=="string")return b.default.deepGet(this.resources,s)!=null;y.default.error("Argument passed to ExistResource is not string");}},{key:"strictArgsCheck",value:function(){return 1<=arguments.length;}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.IntrinsicFunction);r.default=p;},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectFunctionBuilder=void 0;var o=_(95),_=function(){function E(b){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");this.resources=b;}return x=E,(h=[{key:"build",value:function(b){return o.default.createFunction(E.nameDefinition,[],b);}}])&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();(r.ObjectFunctionBuilder=_).nameDefinition="fn::object-function";},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p){return function(c){if(Array.isArray(c))return c;}(p)||function(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c);}(p)||function(c,d){if(c){if(typeof c=="string")return o(c,d);var m={}.toString.call(c).slice(8,-1);
105return(m=m==="Object"&&c.constructor?c.constructor.name:m)==="Map"||m==="Set"?Array.from(c):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?o(c,d):void 0;}}(p)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 106In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function _(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}Object.defineProperty(r,"__esModule",{value:!0});var E=b(96),x=b(17),h=b(5),y=b(21),b=function(){function p(a,s,l,g,f){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");this.lookUpObjectFuncs=a,this.lookUpParameters=s,this.lookUpConditions=l,this.aspectRatio=g,this.resources=f;}return c=p,(d=[{key:"execute",value:function(a){var s=this;return(0,x.deepReplaceIterator)(function(l){return l;},function(l){if(!(0,E.isObjectFunctionExecution)(l))return l;s.lookUpObjectFuncs||h.default.warn("[".concat(s.constructor.name,"] Requested execution ").concat(JSON.stringify(l),` 107 108 but Object functions look up table is not defined - check definition on template`));var f=n(l.exec),g=f[0],f=f.slice(1);if(s.lookUpObjectFuncs.has(g)){if(l.condition)if(s.lookUpConditions){if(s.lookUpConditions.has(l.condition)){var v=s.lookUpConditions.get(l.condition);if(!(0,x.isCondSatisfied)(v))return null;}}else h.default.warn("[".concat(s.constructor.name,"] Requested condition: ").concat(JSON.stringify(l.condition)," in object function execution ").concat(JSON.stringify(l),` 109 110 but Conditions look up table is not defined - check definition on template`));return v=s.lookUpObjectFuncs.get(g),v.args=f.map(function(S){return S=(0,y.isParameterReference)(S)?(0,x.getRefVal)(s.lookUpParameters,S,s.aspectRatio,s.constructor.name):S,(0,x.recursivelyGetResource)(s.resources,S,s.constructor.name);}),v.eval();}h.default.warn("".concat(s.constructor.name,": Given function ").concat(g,` is not 111 defined in the slide.`));},function(l,g,f){f===null&&(Array.isArray(l)?l.splice(g,1):delete l.key);}).iterate(a);}}])&&_(c.prototype,d),m&&_(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}();r.default=b;},function(i,r,e){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0}),r.POSITION=void 0,(_=o=r.POSITION||(r.POSITION={}))[_.TopLeft=0]="TopLeft",_[_.TopMiddle=1]="TopMiddle",_[_.TopRight=2]="TopRight",_[_.CenterLeft=3]="CenterLeft",_[_.CenterMiddle=4]="CenterMiddle",_[_.CenterRight=5]="CenterRight",_[_.BottomLeft=6]="BottomLeft",_[_.BottomMiddle=7]="BottomMiddle",_[_.BottomRight=8]="BottomRight";var o,_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"getPosition",value:function(b){switch(b){case o.TopLeft:return this.topLeft();case o.TopMiddle:return this.topMiddle();case o.TopRight:return this.topRight();case o.CenterLeft:return this.centerLeft();case o.CenterMiddle:return this.centerMiddle();case o.CenterRight:return this.centerRight();case o.BottomLeft:return this.bottomLeft();case o.BottomMiddle:return this.bottomMiddle();case o.BottomRight:return this.bottomRight();default:return this.getBasicTopPosition();}}},{key:"getBasicTopPosition",value:function(){return{x:this.X_OFFSET,y:this.Y_OFFSET,yGravity:"TOP",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"getBasicCenterPosition",value:function(){return{x:this.X_OFFSET,y:0,yGravity:"MIDDLE",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"getBasicBottomPosition",value:function(){return{x:this.X_OFFSET,y:this.Y_OFFSET,yGravity:"BOTTOM",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"topLeft",value:function(){return this.getBasicTopPosition();}},{key:"topMiddle",value:function(){var b=this.getBasicTopPosition();return b.x=0,b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"topRight",value:function(){var b=this.getBasicTopPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}},{key:"centerLeft",value:function(){return this.getBasicCenterPosition();}},{key:"centerMiddle",value:function(){var b=this.getBasicCenterPosition();return b.x=0,b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"centerRight",value:function(){var b=this.getBasicCenterPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}},{key:"bottomLeft",value:function(){return this.getBasicBottomPosition();}},{key:"bottomMiddle",value:function(){var b=this.getBasicBottomPosition();return b.x=0,b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"bottomRight",value:function(){var b=this.getBasicBottomPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();(r.default=_).POSITION=o,_.X_OFFSET=50,_.Y_OFFSET=50;},function(i,r,e){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}
111Object.defineProperty(r,"__esModule",{value:!0}),r.POSITION=void 0,(_=o=r.POSITION||(r.POSITION={}))[_.TopLeft=0]="TopLeft",_[_.TopMiddle=1]="TopMiddle",_[_.TopRight=2]="TopRight",_[_.CenterLeft=3]="CenterLeft",_[_.CenterMiddle=4]="CenterMiddle",_[_.CenterRight=5]="CenterRight",_[_.BottomLeft=6]="BottomLeft",_[_.BottomMiddle=7]="BottomMiddle",_[_.BottomRight=8]="BottomRight";var o,_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"getPosition",value:function(b){switch(b){case o.TopLeft:return this.topLeft();case o.TopMiddle:return this.topMiddle();case o.TopRight:return this.topRight();case o.CenterLeft:return this.centerLeft();case o.CenterMiddle:return this.centerMiddle();case o.CenterRight:return this.centerRight();case o.BottomLeft:return this.bottomLeft();case o.BottomMiddle:return this.bottomMiddle();case o.BottomRight:return this.bottomRight();default:return this.getBasicTopPosition();}}},{key:"getBasicTopPosition",value:function(){return{x:this.X_OFFSET,y:this.Y_OFFSET,yGravity:"TOP",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"getBasicCenterPosition",value:function(){return{x:this.X_OFFSET,y:["relative-h","50%"],yGravity:"MIDDLE",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"getBasicBottomPosition",value:function(){return{x:this.X_OFFSET,y:this.Y_OFFSET,yGravity:"BOTTOM",xAlignment:"LEFT",xGravity:"LEFT"};}},{key:"topLeft",value:function(){return this.getBasicTopPosition();}},{key:"topMiddle",value:function(){var b=this.getBasicTopPosition();return b.x=["relative-w","50%"],b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"topRight",value:function(){var b=this.getBasicTopPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}},{key:"centerLeft",value:function(){return this.getBasicCenterPosition();}},{key:"centerMiddle",value:function(){var b=this.getBasicCenterPosition();return b.x=["relative-w","50%"],b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"centerRight",value:function(){var b=this.getBasicCenterPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}},{key:"bottomLeft",value:function(){return this.getBasicBottomPosition();}},{key:"bottomMiddle",value:function(){var b=this.getBasicBottomPosition();return b.x=["relative-w","50%"],b.xAlignment="CENTER",b.xGravity="CENTER",b;}},{key:"bottomRight",value:function(){var b=this.getBasicBottomPosition();return b.xGravity="RIGHT",b.xAlignment="RIGHT",b;}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();(r.default=_).POSITION=o,_.X_OFFSET=50,_.Y_OFFSET=50;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=E(l);var s=d,l=_()?Reflect.construct(l,a||[],E(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function x(d,m){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}
111Object.defineProperty(r,"__esModule",{value:!0}),r.VideoMediaLoader=void 0;var h=c(5),y=c(228),b=c(22),p=c(45),c=(c(246),function(d){function m(l){if(this instanceof m)return o(this,m,[l]);throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&x(s,d),s=m,(d=[{key:"setPlayer",value:function(l){h.default.debug("[".concat(this.constructor.name,"] loading video: ").concat(l.url));var g=this.getPlayerOptions(l),g=(this.player=(0,b.default)(this.mediaElement,g),{src:l.url});if(h.default.getExtension(l.url)==="m3u8"&&(this.isHls=!0,g.type="application/x-mpegURL",this.player.html5={hls:{enableLowInitialPlaylist:!0}}),this.player.src(g),l.useGainVolume)try{this.useGainNode=!0,this.connectAudioNodes();}catch(f){this.useGainNode=!1,this.disconnectAudioNodes(),h.default.error("[".concat(this.constructor.name,"] Could no create GainNode for video player. ").concat(f));}}},{key:"connectAudioNodes",value:function(){var l=this;try{var g=p.AudioContextSingleton.getInstance(),f=g.getAudioContext();this.player.ready(function(){h.default.debug("[".concat(l.constructor.name,"] Constructing WebAudioAPI, currently state : ").concat(f.state));var v=l.player.tech({IWillNotUseThisInPlugins:!0}).el(),v=(v.crossOrigin="anonymous",g.connectAudioElementWithGain(v));v&&(l.player.muted(!1),l.player.volume(1),l.sourceNode=v.source,l.gainNode=v.gainNode,l.gainNode.gain.value=0);});}catch(v){h.default.error("[".concat(this.constructor.name,"] Exception handled from constructing WebAudioAPI : ").concat(v));}}},{key:"disconnectAudioNodes",value:function(){(this.sourceNode||this.gainNode)&&(p.AudioContextSingleton.getInstance().disconnectGainNode(this.sourceNode,this.gainNode),this.sourceNode=void 0,this.gainNode=void 0,h.default.debug("[".concat(this.constructor.name,"] Video player audio nodes are disconnected and closed (if exists)")));}},{key:"volume",get:function(){if(this.player)return this.useGainNode?this.gainNode.gain.value:this.player.volume();h.default.debug("[".concat(this.constructor.name,"] Couldn't get the volume of video player, player is not initialized"));},set:function(l){this.player?this.useGainNode?(this.player.muted(!1),this.player.volume(1),this.gainNode.gain.value=l):(this.player.muted(l===0),this.player.volume(l)):h.default.debug("[".concat(this.constructor.name,"] Couldn't set the volume of video player, player is not initialized"));}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(y.MediaLoader));r.VideoMediaLoader=c;},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.MediaLoader=void 0;var o=E(5),_=E(12),E=function(){function x(p){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this.mediaElement=p,this.finished=!1,this.isHls=!1;}return h=x,(y=[{key:"getPlayerOptions",value:function(p){var c={playsinline:!0,controls:!1,autoplay:!1,children:[]};return p.preload&&(c.preload=p.preload),c;}},{key:"load",value:function(p){var c=this,d=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];return new Promise(function(m,a){o.default.debug("[".concat(c.constructor.name,"] Media Loader Starts, options preload ").concat(p.preload," !!!")),d&&c.setPlayer(p);var s=c.isHls,l=(p.event||"canplay").toLowerCase();clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),c.player.ready(function(){o.default.debug("[".concat(c.constructor.name,"] Player object for ").concat(p.url," is ready"));var g=c.player;g.muted(!0),g.volume(0),g.playbackRate(p.playbackRate||1),p.preload!=="none"&&!_.MediaPlayerCache.isSafari||(o.default.debug("[".concat(c.constructor.name,"] Calling Player load for ").concat(p.url)),g.load()),c.sampleFallbackInterval=setInterval(function(){if(!g||g.isDisposed())clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),o.default.error("[".concat(c.constructor.name,"] Video player is null/disposed while fallback interval is running. Rejecting the promise.")),a(g);else for(var f=0;f<g.buffered().length;f++){var v=g.currentTime();if(o.default.isRangeInTimeRanges(v,v,g.buffered())){o.default.error("[".concat(c.constructor.name,"] Video player did not get a ").concat(l," event in ").concat(1e4," seconds. Fallback is calling resolve for loading as there is enough data in the buffer.")),clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),m(g);break;}}},1e4),c.maxFallbackTimeout=setTimeout(function(){o.default.error("[".concat(c.constructor.name,"] Video player did not get a ").concat(l," event in ").concat(3e4," seconds. Fallback is calling reject for loading as there is not enough data in the buffer.")),clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),g&&!g.isDisposed()&&g.dispose(),a(g);},3e4),g.one("loadedmetadata",function(){if(o.default.debug("[".concat(c.constructor.name,"] Metadata for ").concat(p.url," has been loaded!")),s){var f=g.tech_.hls,v={height:0,index:0};if(f){o.default.debug("[".concat(c.constructor.name,"] Reading HLS attributes"));for(var S=0;S<f.playlists.master.playlists.length;S++)o.default.debug("[".concat(c.constructor.name,"] Playlist [").concat(S,"]: ").concat(JSON.stringify(f.playlists.master.playlists[S].attributes.RESOLUTION))),f.playlists.master.playlists[S].attributes.RESOLUTION.height>v.height&&(v.height=f.playlists.master.playlists[S].attributes.RESOLUTION.height,v.index=S);}}o.default.debug("[".concat(c.constructor.name,"] Setting current time to: ").concat(p.currentTime)),g.currentTime(p.currentTime);}),g.one(l,function(){o.default.debug("[".concat(c.constructor.name,"] Event ").concat(p.event," has been called for ").concat(p.url)),clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),m(g);}),g.one("error",function(f,v){o.default.error("[".concat(c.constructor.name,"] Video error: ").concat(v)),clearInterval(c.sampleFallbackInterval),clearTimeout(c.maxFallbackTimeout),g.isDisposed()||g.dispose(),a(new Error("[".concat(c.constructor.name,"] Error while loading ").concat(c.player.type," at ").concat(p.url)));});});});}}])&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.MediaLoader=E;},function(i,r){},function(i,r){i.exports=function(t){if(!t)return!1;var n=e.call(t);return n==="[object Function]"||typeof t=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt);};var e=Object.prototype.toString;},function(i,r,e){"use strict";var t=e(0);i.exports=function(n,o){return o===void 0&&(o=!1),function(_,E,x){if(_)n(_);else if(400<=E.statusCode&&E.statusCode<=599){if(_=x,o)if(t.TextDecoder){E=function(h){return h===void 0&&(h=""),h.toLowerCase().split(";").reduce(function(y,c){var c=c.split("="),p=c[0],c=c[1];return p.trim()==="charset"?c.trim():y;},"utf-8");}(E.headers&&E.headers["content-type"]);try{_=new TextDecoder(E).decode(x);}catch{}}
111else _=String.fromCharCode.apply(null,new Uint8Array(x));n({cause:_});}else n(null,x);};};},function(i,r,t){var t=t(3),n=Object.create||function(w){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return o.prototype=w,new o();};function o(){}function _(w,C){this.name="ParsingError",this.code=w.code,this.message=C||w.message;}function E(w){function C(I,O,M,N){return 3600*(0|I)+60*(0|O)+(0|M)+(0|N)/1e3;}return w=w.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/),w?w[3]?C(w[1],w[2],w[3].replace(":",""),w[4]):59<w[1]?C(w[1],w[2],0,w[4]):C(0,w[1],w[2],w[4]):null;}function x(){this.values=n(null);}function h(w,C,I,O){var M,N,G=O?w.split(O):[w];for(M in G)typeof G[M]=="string"&&(N=G[M].split(I)).length===2&&C(N[0].trim(),N[1].trim());}((_.prototype=n(Error.prototype)).constructor=_).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},x.prototype={set:function(w,C){this.get(w)||C===""||(this.values[w]=C);},get:function(w,C,I){return I?this.has(w)?this.values[w]:C[I]:this.has(w)?this.values[w]:C;},has:function(w){return w in this.values;},alt:function(w,C,I){for(var O=0;O<I.length;++O)if(C===I[O]){this.set(w,C);break;}},integer:function(w,C){/^-?\d+$/.test(C)&&this.set(w,parseInt(C,10));},percent:function(w,C){return!!(C.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(C=parseFloat(C))&&C<=100)&&(this.set(w,C),!0);}};var y=t.createElement&&t.createElement("textarea"),b={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},p={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},c={v:"title",lang:"lang"},d={rt:"ruby"};function m(w,C){for(var I,O,M,N,G,H,B=w.document.createElement("div"),z=B,te=[];(I=function(){if(!C)return null;var K=C.match(/^([^<]*)(<[^>]*>?)?/);return K=K[1]||K[2],C=C.substr(K.length),K;}())!==null;)I[0]==="<"?I[1]==="/"?te.length&&te[te.length-1]===I.substr(2).replace(">","")&&(te.pop(),z=z.parentNode):(M=E(I.substr(1,I.length-2)))?(O=w.document.createProcessingInstruction("timestamp",M),z.appendChild(O)):(M=I.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))&&(N=M[1],G=M[3],H=void 0,H=b[N],(O=H?(H=w.document.createElement(H),(N=c[N])&&G&&(H[N]=G.trim()),H):null)&&(N=z,d[(G=O).localName]&&d[G.localName]!==N.localName||(M[2]&&((H=M[2].split(".")).forEach(function(U){var V=/^bg_/.test(U),U=V?U.slice(3):U;p.hasOwnProperty(U)&&(U=p[U],O.style[V?"background-color":"color"]=U);}),O.className=H.join(" ")),te.push(M[1]),z.appendChild(O),z=O))):z.appendChild(w.document.createTextNode((G=I,y.innerHTML=G,G=y.textContent,y.textContent="",G)));return B;}var a=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function s(w){var C=[],I="";if(w&&w.childNodes){for(M(C,w);I=function N(G){if(!G||!G.length)return null;var H,B=G.pop(),z=B.textContent||B.innerText;return z?(H=z.match(/^.*(\n|\r)/))?H[G.length=0]:z:B.tagName==="ruby"?N(G):B.childNodes?(M(G,B),N(G)):void 0;}(C);)for(var O=0;O<I.length;O++)if(function(N){for(var G=0;G<a.length;G++){var H=a[G];if(N>=H[0]&&N<=H[1])return 1;}}
111(I.charCodeAt(O)))return"rtl";}return"ltr";function M(N,G){for(var H=G.childNodes.length-1;0<=H;H--)N.push(G.childNodes[H]);}}function l(){}function g(w,C,I){l.call(this),this.cue=C,this.cueDiv=m(w,C.text);var O={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"},M=(this.applyStyles(O,this.cueDiv),this.div=w.document.createElement("div"),O={direction:s(this.cueDiv),writingMode:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:C.align==="middle"?"center":C.align,font:I.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(O),this.div.appendChild(this.cueDiv),0);switch(C.positionAlign){case"start":case"line-left":M=C.position;break;case"center":M=C.position-C.size/2;break;case"end":case"line-right":M=C.position-C.size;}C.vertical===""?this.applyStyles({left:this.formatStyle(M,"%"),width:this.formatStyle(C.size,"%")}):this.applyStyles({top:this.formatStyle(M,"%"),height:this.formatStyle(C.size,"%")}),this.move=function(N){this.applyStyles({top:this.formatStyle(N.top,"px"),bottom:this.formatStyle(N.bottom,"px"),left:this.formatStyle(N.left,"px"),right:this.formatStyle(N.right,"px"),height:this.formatStyle(N.height,"px"),width:this.formatStyle(N.width,"px")});};}function f(w){var C,I,O,M;w.div&&(C=w.div.offsetHeight,I=w.div.offsetWidth,O=w.div.offsetTop,M=(M=w.div.childNodes)&&(M=M[0])&&M.getClientRects&&M.getClientRects(),w=w.div.getBoundingClientRect(),M=M?Math.max(M[0]&&M[0].height||0,w.height/M.length):0),this.left=w.left,this.right=w.right,this.top=w.top||O,this.height=w.height||C,this.bottom=w.bottom||O+(w.height||C),this.width=w.width||I,this.lineHeight=M!==void 0?M:w.lineHeight;}function v(w,C,I,O){var M,N=new f(C),G=C.cue,H=function(Z){if(typeof Z.line=="number"&&(Z.snapToLines||0<=Z.line&&Z.line<=100))return Z.line;if(!Z.track||!Z.track.textTrackList||!Z.track.textTrackList.mediaElement)return-1;for(var re=Z.track,ue=re.textTrackList,q=0,J=0;J<ue.length&&ue[J]!==re;J++)ue[J].mode==="showing"&&q++;return-1*++q;}(G),B=[];if(G.snapToLines){switch(G.vertical){case"":B=["+y","-y"],M="height";break;case"rl":B=["+x","-x"],M="width";break;case"lr":B=["-x","+x"],M="width";}var z=N.lineHeight,te=z*Math.round(H),K=I[M]+z,V=B[0];Math.abs(te)>K&&(te=te<0?-1:1,te*=Math.ceil(K/z)*z),H<0&&(te+=G.vertical===""?I.height:I.width,B=B.reverse()),N.move(V,te);}else{var U=N.lineHeight/I.height*100;switch(G.lineAlign){case"center":H-=U/2;break;case"end":H-=U;}switch(G.vertical){case"":C.applyStyles({top:C.formatStyle(H,"%")});break;case"rl":C.applyStyles({left:C.formatStyle(H,"%")});break;case"lr":C.applyStyles({right:C.formatStyle(H,"%")});}B=["+y","-x","+x","-y"],N=new f(C);}K=function(Z,re){for(var ue,q=new f(Z),J=1,oe=0;oe<re.length;oe++){for(;Z.overlapsOppositeAxis(I,re[oe])||Z.within(I)&&Z.overlapsAny(O);)Z.move(re[oe]);if(Z.within(I))return Z;var Q=Z.intersectPercentage(I);Q<J&&(ue=new f(Z),J=Q),Z=new f(q);}return ue||q;}(N,B),C.move(K.toCSSCompatValues(I));}function S(){}l.prototype.applyStyles=function(w,C){for(var I in C=C||this.div,w)w.hasOwnProperty(I)&&(C.style[I]=w[I]);},l.prototype.formatStyle=function(w,C){return w===0?0:w+C;},(g.prototype=n(l.prototype)).constructor=g,f.prototype.move=function(w,C){switch(C=C!==void 0?C:this.lineHeight,w){case"+x":this.left+=C,this.right+=C;break;case"-x":this.left-=C,this.right-=C;break;case"+y":this.top+=C,this.bottom+=C;break;case"-y":this.top-=C,this.bottom-=C;}},f.prototype.overlaps=function(w){return this.left<w.right&&this.right>w.left&&this.top<w.bottom&&this.bottom>w.top;},f.prototype.overlapsAny=function(w){for(var C=0;C<w.length;C++)if(this.overlaps(w[C]))return!0;return!1;},f.prototype.within=function(w){return this.top>=w.top&&this.bottom<=w.bottom&&this.left>=w.left&&this.right<=w.right;},f.prototype.overlapsOppositeAxis=function(w,C){switch(C){case"+x":return this.left<w.left;case"-x":return this.right>w.right;case"+y":return this.top<w.top;case"-y":return this.bottom>w.bottom;}},f.prototype.intersectPercentage=function(w){return Math.max(0,Math.min(this.right,w.right)-Math.max(this.left,w.left))*Math.max(0,Math.min(this.bottom,w.bottom)-Math.max(this.top,w.top))/(this.height*this.width);},f.prototype.toCSSCompatValues=function(w){return{top:this.top-w.top,bottom:w.bottom-this.bottom,left:this.left-w.left,right:w.right-this.right,height:this.height,width:this.width};},f.getSimpleBoxPosition=function(w){var C=w.div?w.div.offsetHeight:w.tagName?w.offsetHeight:0,I=w.div?w.div.offsetWidth:w.tagName?w.offsetWidth:0,O=w.div?w.div.offsetTop:w.tagName?w.offsetTop:0;return{left:(w=w.div?w.div.getBoundingClientRect():w.tagName?w.getBoundingClientRect():w).left,right:w.right,top:w.top||O,height:w.height||C,bottom:w.bottom||O+(w.height||C),width:w.width||I};},S.StringDecoder=function(){return{decode:function(w){if(!w)return"";
111if(typeof w!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(w));}};},S.convertCueToDOMTree=function(w,C){return w&&C?m(w,C):null;},S.processCues=function(w,C,I){if(!w||!C||!I)return null;for(;I.firstChild;)I.removeChild(I.firstChild);var O=w.document.createElement("div");if(O.style.position="absolute",O.style.left="0",O.style.right="0",O.style.top="0",O.style.bottom="0",O.style.margin="1.5%",I.appendChild(O),function(K){for(var V=0;V<K.length;V++)if(K[V].hasBeenReset||!K[V].displayState)return 1;}(C))for(var M,N,G=[],H=f.getSimpleBoxPosition(O),B={font:Math.round(.05*H.height*100)/100+"px sans-serif"},z=0;z<C.length;z++)N=C[z],M=new g(w,N,B),O.appendChild(M.div),v(0,M,H,G),N.displayState=M.div,G.push(f.getSimpleBoxPosition(M));else for(var te=0;te<C.length;te++)O.appendChild(C[te].displayState);},(S.Parser=function(w,C,I){I||(I=C,C={}),C=C||{},this.window=w,this.vttjs=C,this.state="INITIAL",this.buffer="",this.decoder=I||new TextDecoder("utf8"),this.regionList=[];}).prototype={reportOrThrowError:function(w){if(!(w instanceof _))throw w;this.onparsingerror&&this.onparsingerror(w);},parse:function(w){var C=this;function I(){for(var B=C.buffer,z=0;z<B.length&&B[z]!=="\r"&&B[z]!==` 112`;)++z;var te=B.substr(0,z);return B[z]==="\r"&&++z,B[z]===` 113`&&++z,C.buffer=B.substr(z),te;}function O(B){B.match(/X-TIMESTAMP-MAP/)?h(B,function(z,te){var K;z==="X-TIMESTAMP-MAP"&&(z=te,K=new x(),h(z,function(V,U){switch(V){case"MPEGT":K.integer(V+"S",U);break;case"LOCA":K.set(V+"L",E(U));}},/[^\d]:/,/,/),C.ontimestampmap&&C.ontimestampmap({MPEGTS:K.get("MPEGTS"),LOCAL:K.get("LOCAL")}));},/=/):h(B,function(z,te){var K;z==="Region"&&(z=te,K=new x(),h(z,function(V,U){switch(V){case"id":K.set(V,U);break;case"width":K.percent(V,U);break;case"lines":K.integer(V,U);break;case"regionanchor":case"viewportanchor":var Z=U.split(",");if(Z.length!==2)break;var re=new x();if(re.percent("x",Z[0]),re.percent("y",Z[1]),!re.has("x")||!re.has("y"))break;K.set(V+"X",re.get("x")),K.set(V+"Y",re.get("y"));break;case"scroll":K.alt(V,U,["up"]);}},/=/,/\s/),K.has("id")&&((z=new(C.vttjs.VTTRegion||C.window.VTTRegion)()).width=K.get("width",100),z.lines=K.get("lines",3),z.regionAnchorX=K.get("regionanchorX",0),z.regionAnchorY=K.get("regionanchorY",100),z.viewportAnchorX=K.get("viewportanchorX",0),z.viewportAnchorY=K.get("viewportanchorY",100),z.scroll=K.get("scroll",""),C.onregion&&C.onregion(z),C.regionList.push({id:K.get("id"),region:z})));},/:/);}w&&(C.buffer+=C.decoder.decode(w,{stream:!0}));try{if(C.state==="INITIAL"){if(!/\r\n|\n/.test(C.buffer))return this;var M,N=(M=I()).match(/^WEBVTT([ \t].*)?$/);if(!N||!N[0])throw new _(_.Errors.BadSignature);C.state="HEADER";}for(var G=!1;C.buffer;){if(!/\r\n|\n/.test(C.buffer))return this;switch(G?G=!1:M=I(),C.state){case"HEADER":/:/.test(M)?O(M):M||(C.state="ID");continue;case"NOTE":M||(C.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(M)){C.state="NOTE";break;}if(!M)continue;C.cue=new(C.vttjs.VTTCue||C.window.VTTCue)(0,0,"");try{C.cue.align="center";}catch{C.cue.align="middle";}if(C.state="CUE",M.indexOf("-->")===-1){C.cue.id=M;continue;}case"CUE":try{(function(B,z,te){var K=B;function V(){var ue=E(B);if(ue===null)throw new _(_.Errors.BadTimeStamp,"Malformed timestamp: "+K);return B=B.replace(/^[^\sa-zA-Z-]+/,""),ue;}function U(){B=B.replace(/^\s+/,"");}if(U(),z.startTime=V(),U(),B.substr(0,3)!=="-->")throw new _(_.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+K);B=B.substr(3),U(),z.endTime=V(),U();var Z=B,re=new x();h(Z,function(ue,q){switch(ue){case"region":for(var J=te.length-1;0<=J;J--)if(te[J].id===q){re.set(ue,te[J].region);break;}break;case"vertical":re.alt(ue,q,["rl","lr"]);break;case"line":var oe=q.split(","),Q=oe[0];re.integer(ue,Q),re.percent(ue,Q)&&re.set("snapToLines",!1),re.alt(ue,Q,["auto"]),oe.length===2&&re.alt("lineAlign",oe[1],["start","center","end"]);break;case"position":oe=q.split(","),re.percent(ue,oe[0]),oe.length===2&&re.alt("positionAlign",oe[1],["start","center","end"]);break;case"size":re.percent(ue,q);break;case"align":re.alt(ue,q,["start","center","end","left","right"]);}},/:/,/\s/),z.region=re.get("region",null),z.vertical=re.get("vertical","");try{z.line=re.get("line","auto");}catch{}z.lineAlign=re.get("lineAlign","start"),z.snapToLines=re.get("snapToLines",!0),z.size=re.get("size",100);try{z.align=re.get("align","center");}catch{z.align=re.get("align","middle");}try{z.position=re.get("position","auto");}catch{z.position=re.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},z.align);}z.positionAlign=re.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},z.align);})(M,C.cue,C.regionList);}catch(B){C.reportOrThrowError(B),C.cue=null,C.state="BADCUE";continue;}C.state="CUETEXT";continue;case"CUETEXT":var H=M.indexOf("-->")!==-1;if(!M||H&&(G=!0)){C.oncue&&C.oncue(C.cue),C.cue=null,C.state="ID";continue;}C.cue.text&&(C.cue.text+=` 114`),C.cue.text+=M.replace(/\u2028/g,` 115`).replace(/u2029/g,` 116`);continue;case"BADCUE":M||(C.state="ID");continue;}}}catch(B){C.reportOrThrowError(B),C.state==="CUETEXT"&&C.cue&&C.oncue&&C.oncue(C.cue),C.cue=null,C.state=C.state==="INITIAL"?"BADWEBVTT":"BADCUE";}return this;},flush:function(){var w=this;try{if(w.buffer+=w.decoder.decode(),!w.cue&&w.state!=="HEADER"||(w.buffer+=` 117 118`,w.parse()),w.state==="INITIAL")throw new _(_.Errors.BadSignature);}catch(C){w.reportOrThrowError(C);}return w.onflush&&w.onflush(),this;}},i.exports=S;}
118,function(i,r){var e={"":1,lr:1,rl:1},t={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(_){return typeof _=="string"&&!!t[_.toLowerCase()]&&_.toLowerCase();}function o(_,E,x){this.hasBeenReset=!1;var h="",y=!1,b=_,p=E,c=x,d=null,m="",a=!0,s="auto",l="start",g="auto",f="auto",v=100,S="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return h;},set:function(w){h=""+w;}},pauseOnExit:{enumerable:!0,get:function(){return y;},set:function(w){y=!!w;}},startTime:{enumerable:!0,get:function(){return b;},set:function(w){if(typeof w!="number")throw new TypeError("Start time must be set to a number.");b=w,this.hasBeenReset=!0;}},endTime:{enumerable:!0,get:function(){return p;},set:function(w){if(typeof w!="number")throw new TypeError("End time must be set to a number.");p=w,this.hasBeenReset=!0;}},text:{enumerable:!0,get:function(){return c;},set:function(w){c=""+w,this.hasBeenReset=!0;}},region:{enumerable:!0,get:function(){return d;},set:function(w){d=w,this.hasBeenReset=!0;}},vertical:{enumerable:!0,get:function(){return m;},set:function(w){if(w=typeof(w=w)=="string"&&!!e[w.toLowerCase()]&&w.toLowerCase(),w===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");m=w,this.hasBeenReset=!0;}},snapToLines:{enumerable:!0,get:function(){return a;},set:function(w){a=!!w,this.hasBeenReset=!0;}},line:{enumerable:!0,get:function(){return s;},set:function(w){if(typeof w!="number"&&w!=="auto")throw new SyntaxError("Line: an invalid number or illegal string was specified.");s=w,this.hasBeenReset=!0;}},lineAlign:{enumerable:!0,get:function(){return l;},set:function(w){w=n(w),w?(l=w,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.");}},position:{enumerable:!0,get:function(){return g;},set:function(w){if(w<0||100<w)throw new Error("Position must be between 0 and 100.");g=w,this.hasBeenReset=!0;}},positionAlign:{enumerable:!0,get:function(){return f;},set:function(w){w=n(w),w?(f=w,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.");}},size:{enumerable:!0,get:function(){return v;},set:function(w){if(w<0||100<w)throw new Error("Size must be between 0 and 100.");v=w,this.hasBeenReset=!0;}},align:{enumerable:!0,get:function(){return S;},set:function(w){if(w=n(w),!w)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");S=w,this.hasBeenReset=!0;}}}),this.displayState=void 0;}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text);},i.exports=o;},function(i,r){var e={"":!0,up:!0};function t(n){return typeof n=="number"&&0<=n&&n<=100;}i.exports=function(){var n=100,o=3,_=0,E=100,x=0,h=100,y="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return n;},set:function(b){if(!t(b))throw new Error("Width must be between 0 and 100.");n=b;}},lines:{enumerable:!0,get:function(){return o;},set:function(b){if(typeof b!="number")throw new TypeError("Lines must be set to a number.");o=b;}},regionAnchorY:{enumerable:!0,get:function(){return E;},set:function(b){if(!t(b))throw new Error("RegionAnchorX must be between 0 and 100.");E=b;}},regionAnchorX:{enumerable:!0,get:function(){return _;},set:function(b){if(!t(b))throw new Error("RegionAnchorY must be between 0 and 100.");_=b;}},viewportAnchorY:{enumerable:!0,get:function(){return h;},set:function(b){if(!t(b))throw new Error("ViewportAnchorY must be between 0 and 100.");h=b;}},viewportAnchorX:{enumerable:!0,get:function(){return x;},set:function(b){if(!t(b))throw new Error("ViewportAnchorX must be between 0 and 100.");x=b;}},scroll:{enumerable:!0,get:function(){return y;},set:function(b){b=typeof(b=b)=="string"&&!!e[b.toLowerCase()]&&b.toLowerCase(),b===!1?console.warn("Scroll: an invalid or illegal string was specified."):y=b;}}});};},function(i,r){function e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return i.exports=function(){return!!t;},i.exports.__esModule=!0,(i.exports.default=i.exports)();}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,e){"use strict";(function(t){var n=e(237),o=e(238),_=e(239);function E(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823;}function x(V,U){if(E()<U)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(V=new Uint8Array(U)).__proto__=h.prototype:(V=V===null?new h(U):V).length=U,V;}function h(V,U,Z){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(V,U,Z);if(typeof V!="number")return y(this,V,U,Z);if(typeof U=="string")throw new Error("If encoding is specified then the first argument must be a string");return p(this,V);}function y(V,U,Z,re){if(typeof U=="number")throw new TypeError('"value" argument must not be a number');if(typeof ArrayBuffer<"u"&&U instanceof ArrayBuffer){var ue=V,q=U,J=Z;if(q.byteLength,J<0||q.byteLength<J)throw new RangeError("'offset' is out of bounds");if(q.byteLength<J+(re||0))throw new RangeError("'length' is out of bounds");return q=J===void 0&&re===void 0?new Uint8Array(q):re===void 0?new Uint8Array(q,J):new Uint8Array(q,J,re),h.TYPED_ARRAY_SUPPORT?(ue=q).__proto__=h.prototype:ue=c(ue,q),ue;}
118if(typeof U!="string"){if(J=V,re=U,h.isBuffer(re))return q=0|d(re.length),(J=x(J,q)).length!==0&&re.copy(J,0,0,q),J;if(re){if(typeof ArrayBuffer<"u"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||function(oe){return oe!=oe;}(re.length)?x(J,0):c(J,re);if(re.type==="Buffer"&&_(re.data))return c(J,re.data);}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}if(ue=V,re=U,V=Z,!h.isEncoding(V=typeof V=="string"&&V!==""?V:"utf8"))throw new TypeError('"encoding" must be a valid string encoding');return U=0|m(re,V),ue=(re=(ue=x(ue,U)).write(re,V))!==U?ue.slice(0,re):ue;}function b(V){if(typeof V!="number")throw new TypeError('"size" argument must be a number');if(V<0)throw new RangeError('"size" argument must not be negative');}function p(V,U){if(b(U),V=x(V,U<0?0:0|d(U)),!h.TYPED_ARRAY_SUPPORT)for(var Z=0;Z<U;++Z)V[Z]=0;return V;}function c(V,U){var Z=U.length<0?0:0|d(U.length);V=x(V,Z);for(var re=0;re<Z;re+=1)V[re]=255&U[re];return V;}function d(V){if(V>=E())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E().toString(16)+" bytes");return 0|V;}function m(V,U){if(h.isBuffer(V))return V.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(V)||V instanceof ArrayBuffer))return V.byteLength;var Z=(V=typeof V!="string"?""+V:V).length;if(Z===0)return 0;for(var re=!1;;)switch(U){case"ascii":case"latin1":case"binary":return Z;case"utf8":case"utf-8":case void 0:return z(V).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Z;case"hex":return Z>>>1;case"base64":return te(V).length;default:if(re)return z(V).length;U=(""+U).toLowerCase(),re=!0;}}function a(V,U,Z){var re,ue=!1;if((U=U===void 0||U<0?0:U)>this.length||(Z=Z===void 0||Z>this.length?this.length:Z)<=0||(Z>>>=0)<=(U>>>=0))return"";for(V=V||"utf8";;)switch(V){case"hex":var q=this,ne=U,J=Z,X=q.length;(!J||J<0||X<J)&&(J=X);for(var oe="",Q=ne=!ne||ne<0?0:ne;Q<J;++Q)oe+=function(W){return W<16?"0"+W.toString(16):W.toString(16);}(q[Q]);return oe;case"utf8":case"utf-8":return S(this,U,Z);case"ascii":var F=this,X=U,Y=Z,j="";Y=Math.min(F.length,Y);for(var D=X;D<Y;++D)j+=String.fromCharCode(127&F[D]);return j;case"latin1":case"binary":var $=this,ne=U,le=Z,se="";le=Math.min($.length,le);for(var fe=ne;fe<le;++fe)se+=String.fromCharCode($[fe]);return se;case"base64":return ge=this,re=Z,(he=U)===0&&re===ge.length?n.fromByteArray(ge):n.fromByteArray(ge.slice(he,re));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var ge=U,he=Z,_e=this.slice(ge,he),Re="",ee=0;ee<_e.length;ee+=2)Re+=String.fromCharCode(_e[ee]+256*_e[ee+1]);return Re;default:if(ue)throw new TypeError("Unknown encoding: "+V);V=(V+"").toLowerCase(),ue=!0;}}function s(V,U,Z){var re=V[U];V[U]=V[Z],V[Z]=re;}function l(V,U,Z,re,ue){if(V.length===0)return-1;if(typeof Z=="string"?(re=Z,Z=0):2147483647<Z?Z=2147483647:Z<-2147483648&&(Z=-2147483648),Z=+Z,(Z=(Z=isNaN(Z)?ue?0:V.length-1:Z)<0?V.length+Z:Z)>=V.length){if(ue)return-1;Z=V.length-1;}else if(Z<0){if(!ue)return-1;Z=0;}if(typeof U=="string"&&(U=h.from(U,re)),h.isBuffer(U))return U.length===0?-1:g(V,U,Z,re,ue);if(typeof U=="number")return U&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?(ue?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(V,U,Z):g(V,[U],Z,re,ue);throw new TypeError("val must be string, number or Buffer");}function g(V,U,Z,re,ue){var q=1,J=V.length,oe=U.length;if(re!==void 0&&((re=String(re).toLowerCase())==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(V.length<2||U.length<2)return-1;J/=q=2,oe/=2,Z/=2;}function Q(D,$){return q===1?D[$]:D.readUInt16BE($*q);}if(ue){for(var F=-1,X=Z;X<J;X++)if(Q(V,X)===Q(U,F===-1?0:X-F)){if(X-(F=F===-1?X:F)+1===oe)return F*q;}else F!==-1&&(X-=X-F),F=-1;}else for(X=Z=J<Z+oe?J-oe:Z;0<=X;X--){for(var Y=!0,j=0;j<oe;j++)if(Q(V,X+j)!==Q(U,j)){Y=!1;break;}if(Y)return X;}return-1;}function f(V,U,Z,re){return K(function(ue){for(var q=[],J=0;J<ue.length;++J)q.push(255&ue.charCodeAt(J));return q;}(U),V,Z,re);}function v(V,U,Z,re){return K(function(ue,q){for(var J,oe,Q=[],F=0;F<ue.length&&!((q-=2)<0);++F)oe=ue.charCodeAt(F),J=oe>>8,oe=oe%256,Q.push(oe),Q.push(J);return Q;}(U,V.length-Z),V,Z,re);}function S(V,U,Z){Z=Math.min(V.length,Z);for(var re=[],ue=U;ue<Z;){var q,J,oe,Q,F=V[ue],X=null,Y=239<F?4:223<F?3:191<F?2:1;if(ue+Y<=Z)switch(Y){case 1:F<128&&(X=F);break;case 2:(192&(q=V[ue+1]))==128&&127<(Q=(31&F)<<6|63&q)&&(X=Q);break;case 3:q=V[ue+1],J=V[ue+2],(192&q)==128&&(192&J)==128&&2047<(Q=(15&F)<<12|(63&q)<<6|63&J)&&(Q<55296||57343<Q)&&(X=Q);break;case 4:q=V[ue+1],J=V[ue+2],oe=V[ue+3],(192&q)==128&&(192&J)==128&&(192&oe)==128&&65535<(Q=(15&F)<<18|(63&q)<<12|(63&J)<<6|63&oe)&&Q<1114112&&(X=Q);}X===null?(X=65533,Y=1):65535<X&&(X-=65536,re.push(X>>>10&1023|55296),X=56320|1023&X),re.push(X),ue+=Y;}var j=re,D=j.length;if(D<=w)return String.fromCharCode.apply(String,j);for(var $="",ne=0;ne<D;)$+=String.fromCharCode.apply(String,j.slice(ne,ne+=w));return $;}r.Buffer=h,r.SlowBuffer=function(V){return+V!=V&&(V=0),h.alloc(+V);},r.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==void 0?t.TYPED_ARRAY_SUPPORT:function(){try{var V=new Uint8Array(1);return V.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42;}},V.foo()===42&&typeof V.subarray=="function"&&V.subarray(1,1).byteLength===0;}catch{return!1;}}(),r.kMaxLength=E(),h.poolSize=8192,h._augment=function(V){return V.__proto__=h.prototype,V;},h.from=function(V,U,Z){return y(null,V,U,Z);},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(V,U,Z){return re=null,U=U,Z=Z,b(V=V),!(V<=0)&&U!==void 0?typeof Z=="string"?x(re,V).fill(U,Z):x(re,V).fill(U):x(re,V);var re;},h.allocUnsafe=function(V){return p(null,V);},h.allocUnsafeSlow=function(V){return p(null,V);},h.isBuffer=function(V){return!(V==null||!V._isBuffer);}
118,h.compare=function(V,U){if(!h.isBuffer(V)||!h.isBuffer(U))throw new TypeError("Arguments must be Buffers");if(V===U)return 0;for(var Z=V.length,re=U.length,ue=0,q=Math.min(Z,re);ue<q;++ue)if(V[ue]!==U[ue]){Z=V[ue],re=U[ue];break;}return Z<re?-1:re<Z?1:0;},h.isEncoding=function(V){switch(String(V).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},h.concat=function(V,U){if(!_(V))throw new TypeError('"list" argument must be an Array of Buffers');if(V.length===0)return h.alloc(0);if(U===void 0)for(ue=U=0;ue<V.length;++ue)U+=V[ue].length;for(var Z=h.allocUnsafe(U),re=0,ue=0;ue<V.length;++ue){var q=V[ue];if(!h.isBuffer(q))throw new TypeError('"list" argument must be an Array of Buffers');q.copy(Z,re),re+=q.length;}return Z;},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var V=this.length;if(V%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var U=0;U<V;U+=2)s(this,U,U+1);return this;},h.prototype.swap32=function(){var V=this.length;if(V%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var U=0;U<V;U+=4)s(this,U,U+3),s(this,U+1,U+2);return this;},h.prototype.swap64=function(){var V=this.length;if(V%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var U=0;U<V;U+=8)s(this,U,U+7),s(this,U+1,U+6),s(this,U+2,U+5),s(this,U+3,U+4);return this;},h.prototype.toString=function(){var V=0|this.length;return V==0?"":arguments.length===0?S(this,0,V):a.apply(this,arguments);},h.prototype.equals=function(V){if(h.isBuffer(V))return this===V||h.compare(this,V)===0;throw new TypeError("Argument must be a Buffer");},h.prototype.inspect=function(){var V="",U=r.INSPECT_MAX_BYTES;return 0<this.length&&(V=this.toString("hex",0,U).match(/.{2}/g).join(" "),this.length>U&&(V+=" ... ")),"<Buffer "+V+">";},h.prototype.compare=function(V,U,Z,re,ue){if(!h.isBuffer(V))throw new TypeError("Argument must be a Buffer");if(Z===void 0&&(Z=V?V.length:0),re===void 0&&(re=0),ue===void 0&&(ue=this.length),(U=U===void 0?0:U)<0||Z>V.length||re<0||ue>this.length)throw new RangeError("out of range index");if(ue<=re&&Z<=U)return 0;if(ue<=re)return-1;if(Z<=U)return 1;if(this===V)return 0;for(var q=(ue>>>=0)-(re>>>=0),J=(Z>>>=0)-(U>>>=0),oe=Math.min(q,J),Q=this.slice(re,ue),F=V.slice(U,Z),X=0;X<oe;++X)if(Q[X]!==F[X]){q=Q[X],J=F[X];break;}return q<J?-1:J<q?1:0;},h.prototype.includes=function(V,U,Z){return this.indexOf(V,U,Z)!==-1;},h.prototype.indexOf=function(V,U,Z){return l(this,V,U,Z,!0);},h.prototype.lastIndexOf=function(V,U,Z){return l(this,V,U,Z,!1);},h.prototype.write=function(V,U,Z,re){if(U===void 0)re="utf8",Z=this.length,U=0;else if(Z===void 0&&typeof U=="string")re=U,Z=this.length,U=0;else{if(!isFinite(U))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");U|=0,isFinite(Z)?(Z|=0,re===void 0&&(re="utf8")):(re=Z,Z=void 0);}var ue=this.length-U;if((Z===void 0||ue<Z)&&(Z=ue),0<V.length&&(Z<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");re=re||"utf8";for(var q,J,oe,Q=!1;;)switch(re){case"hex":var F=this,X=V,Y=U,j=Z,D=(Y=Number(Y)||0,F.length-Y);if((!j||D<(j=Number(j)))&&(j=D),(D=X.length)%2!=0)throw new TypeError("Invalid hex string");D/2<j&&(j=D/2);for(var $=0;$<j;++$){var ne=parseInt(X.substr(2*$,2),16);if(isNaN(ne))return $;F[Y+$]=ne;}return $;case"utf8":case"utf-8":return D=U,oe=Z,K(z(V,(J=this).length-D),J,D,oe);case"ascii":return f(this,V,U,Z);case"latin1":case"binary":return f(this,V,U,Z);case"base64":return J=this,oe=U,q=Z,K(te(V),J,oe,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,V,U,Z);default:if(Q)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),Q=!0;}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)};};var w=4096;function C(V,U,Z){if(V%1!=0||V<0)throw new RangeError("offset is not uint");if(Z<V+U)throw new RangeError("Trying to access beyond buffer length");}function I(V,U,Z,re,ue,q){if(!h.isBuffer(V))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue<U||U<q)throw new RangeError('"value" argument is out of bounds');if(Z+re>V.length)throw new RangeError("Index out of range");}function O(V,U,Z,re){U<0&&(U=65535+U+1);for(var ue=0,q=Math.min(V.length-Z,2);ue<q;++ue)V[Z+ue]=(U&255<<8*(re?ue:1-ue))>>>8*(re?ue:1-ue);}function M(V,U,Z,re){U<0&&(U=4294967295+U+1);for(var ue=0,q=Math.min(V.length-Z,4);ue<q;++ue)V[Z+ue]=U>>>8*(re?ue:3-ue)&255;}function N(V,U,Z,re){if(Z+re>V.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("Index out of range");}function G(V,U,Z,re,ue){return ue||N(V,0,Z,4),o.write(V,U,Z,re,23,4),Z+4;}function H(V,U,Z,re,ue){return ue||N(V,0,Z,8),o.write(V,U,Z,re,52,8),Z+8;}h.prototype.slice=function(V,U){var Z=this.length;if((V=~~V)<0?(V+=Z)<0&&(V=0):Z<V&&(V=Z),(U=U===void 0?Z:~~U)<0?(U+=Z)<0&&(U=0):Z<U&&(U=Z),U<V&&(U=V),h.TYPED_ARRAY_SUPPORT)(ue=this.subarray(V,U)).__proto__=h.prototype;else for(var re=U-V,ue=new h(re,void 0),q=0;q<re;++q)ue[q]=this[q+V];return ue;},h.prototype.readUIntLE=function(V,U,Z){V|=0,U|=0,Z||C(V,U,this.length);for(var re=this[V],ue=1,q=0;++q<U&&(ue*=256);)re+=this[V+q]*ue;return re;},h.prototype.readUIntBE=function(V,U,Z){V|=0,U|=0,Z||C(V,U,this.length);for(var re=this[V+--U],ue=1;0<U&&(ue*=256);)re+=this[V+--U]*ue;return re;},h.prototype.readUInt8=function(V,U){return U||C(V,1,this.length),this[V];},h.prototype.readUInt16LE=function(V,U){return U||C(V,2,this.length),this[V]|this[V+1]<<8;},h.prototype.readUInt16BE=function(V,U){return U||C(V,2,this.length),this[V]<<8|this[V+1];},h.prototype.readUInt32LE=function(V,U){return U||C(V,4,this.length),(this[V]|this[V+1]<<8|this[V+2]<<16)+16777216*this[V+3];},h.prototype.readUInt32BE=function(V,U){return U||C(V,4,this.length),16777216*this[V]+(this[V+1]<<16|this[V+2]<<8|this[V+3]);},h.prototype.readIntLE=function(V,U,Z){V|=0,U|=0,Z||C(V,U,this.length);for(var re=this[V],ue=1,q=0;++q<U&&(ue*=256);)re+=this[V+q]*ue;return(ue*=128)<=re&&(re-=Math.pow(2,8*U)),re;},h.prototype.readIntBE=function(V,U,Z){V|=0,U|=0,Z||C(V,U,this.length);for(var re=U,ue=1,q=this[V+--re];0<re&&(ue*=256);)q+=this[V+--re]*ue;return(ue*=128)<=q&&(q-=Math.pow(2,8*U)),q;},h.prototype.readInt8=function(V,U){return U||C(V,1,this.length),128&this[V]?-1*(255-this[V]+1):this[V];},h.prototype.readInt16LE=function(V,U){return U||C(V,2,this.length),U=this[V]|this[V+1]<<8,32768&U?4294901760|U:U;},h.prototype.readInt16BE=function(V,U){return U||C(V,2,this.length),U=this[V+1]|this[V]<<8,32768&U?4294901760|U:U;},h.prototype.readInt32LE=function(V,U){return U||C(V,4,this.length),this[V]|this[V+1]<<8|this[V+2]<<16|this[V+3]<<24;},h.prototype.readInt32BE=function(V,U){return U||C(V,4,this.length),this[V]<<24|this[V+1]<<16|this[V+2]<<8|this[V+3];},h.prototype.readFloatLE=function(V,U){return U||C(V,4,this.length),o.read(this,V,!0,23,4);},h.prototype.readFloatBE=function(V,U){return U||C(V,4,this.length),o.read(this,V,!1,23,4);},h.prototype.readDoubleLE=function(V,U){return U||C(V,8,this.length),o.read(this,V,!0,52,8);},h.prototype.readDoubleBE=function(V,U){return U||C(V,8,this.length),o.read(this,V,!1,52,8);},h.prototype.writeUIntLE=function(V,U,Z,re){V=+V,U|=0,Z|=0,re||I(this,V,U,Z,Math.pow(2,8*Z)-1,0);var ue=1,q=0;for(this[U]=255&V;++q<Z&&(ue*=256);)this[U+q]=V/ue&255;return U+Z;},h.prototype.writeUIntBE=function(V,U,Z,re){V=+V,U|=0,Z|=0,re||I(this,V,U,Z,Math.pow(2,8*Z)-1,0);var ue=Z-1,q=1;for(this[U+ue]=255&V;0<=--ue&&(q*=256);)this[U+ue]=V/q&255;return U+Z;},h.prototype.writeUInt8=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,1,255,0),h.TYPED_ARRAY_SUPPORT||(V=Math.floor(V)),this[U]=255&V,U+1;},h.prototype.writeUInt16LE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[U]=255&V,this[U+1]=V>>>8):O(this,V,U,!0),U+2;},h.prototype.writeUInt16BE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[U]=V>>>8,this[U+1]=255&V):O(this,V,U,!1),U+2;},h.prototype.writeUInt32LE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[U+3]=V>>>24,this[U+2]=V>>>16,this[U+1]=V>>>8,this[U]=255&V):M(this,V,U,!0),U+4;},h.prototype.writeUInt32BE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[U]=V>>>24,this[U+1]=V>>>16,this[U+2]=V>>>8,this[U+3]=255&V):M(this,V,U,!1),U+4;},h.prototype.writeIntLE=function(V,U,Z,re){V=+V,U|=0,re||I(this,V,U,Z,(re=Math.pow(2,8*Z-1))-1,-re);var ue=0,q=1,J=0;for(this[U]=255&V;++ue<Z&&(q*=256);)V<0&&J===0&&this[U+ue-1]!==0&&(J=1),this[U+ue]=(V/q>>0)-J&255;return U+Z;},h.prototype.writeIntBE=function(V,U,Z,re){V=+V,U|=0,re||I(this,V,U,Z,(re=Math.pow(2,8*Z-1))-1,-re);var ue=Z-1,q=1,J=0;for(this[U+ue]=255&V;0<=--ue&&(q*=256);)V<0&&J===0&&this[U+ue+1]!==0&&(J=1),this[U+ue]=(V/q>>0)-J&255;return U+Z;},h.prototype.writeInt8=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,1,127,-128),h.TYPED_ARRAY_SUPPORT||(V=Math.floor(V)),this[U]=255&(V=V<0?255+V+1:V),U+1;},h.prototype.writeInt16LE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[U]=255&V,this[U+1]=V>>>8):O(this,V,U,!0),U+2;},h.prototype.writeInt16BE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[U]=V>>>8,this[U+1]=255&V):O(this,V,U,!1),U+2;},h.prototype.writeInt32LE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[U]=255&V,this[U+1]=V>>>8,this[U+2]=V>>>16,this[U+3]=V>>>24):M(this,V,U,!0),U+4;},h.prototype.writeInt32BE=function(V,U,Z){return V=+V,U|=0,Z||I(this,V,U,4,2147483647,-2147483648),V<0&&(V=4294967295+V+1),h.TYPED_ARRAY_SUPPORT?(this[U]=V>>>24,this[U+1]=V>>>16,this[U+2]=V>>>8,this[U+3]=255&V):M(this,V,U,!1),U+4;},h.prototype.writeFloatLE=function(V,U,Z){return G(this,V,U,!0,Z);},h.prototype.writeFloatBE=function(V,U,Z){return G(this,V,U,!1,Z);},h.prototype.writeDoubleLE=function(V,U,Z){return H(this,V,U,!0,Z);},h.prototype.writeDoubleBE=function(V,U,Z){return H(this,V,U,!1,Z);},h.prototype.copy=function(V,U,Z,re){if(Z=Z||0,re||re===0||(re=this.length),U>=V.length&&(U=V.length),(re=0<re&&re<Z?Z:re)===Z||V.length===0||this.length===0)return 0;if((U=U||0)<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("sourceStart out of bounds");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length);var ue,q=(re=V.length-U<re-Z?V.length-U+Z:re)-Z;if(this===V&&Z<U&&U<re)for(ue=q-1;0<=ue;--ue)V[ue+U]=this[ue+Z];else if(q<1e3||!h.TYPED_ARRAY_SUPPORT)for(ue=0;ue<q;++ue)V[ue+U]=this[ue+Z];else Uint8Array.prototype.set.call(V,this.subarray(Z,Z+q),U);return q;},h.prototype.fill=function(V,U,Z,re){if(typeof V=="string"){var ue;if(typeof U=="string"?(re=U,U=0,Z=this.length):typeof Z=="string"&&(re=Z,Z=this.length),V.length!==1||(ue=V.charCodeAt(0))<256&&(V=ue),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!h.isEncoding(re))throw new TypeError("Unknown encoding: "+re);}else typeof V=="number"&&(V&=255);if(U<0||this.length<U||this.length<Z)throw new RangeError("Out of range index");if(!(Z<=U))if(U>>>=0,Z=Z===void 0?this.length:Z>>>0,typeof(V=V||0)=="number")for(oe=U;oe<Z;++oe)this[oe]=V;else for(var q=h.isBuffer(V)?V:z(new h(V,re).toString()),J=q.length,oe=0;oe<Z-U;++oe)this[oe+U]=q[oe%J];return this;};var B=/[^+\/0-9A-Za-z-_]/g;function z(V,U){U=U||1/0;for(var Z,re=V.length,ue=null,q=[],J=0;J<re;++J){if(55295<(Z=V.charCodeAt(J))&&Z<57344){if(!ue){if(56319<Z){-1<(U-=3)&&q.push(239,191,189);continue;}if(J+1===re){-1<(U-=3)&&q.push(239,191,189);continue;}ue=Z;continue;}if(Z<56320){-1<(U-=3)&&q.push(239,191,189),ue=Z;continue;}Z=65536+(ue-55296<<10|Z-56320);}else ue&&-1<(U-=3)&&q.push(239,191,189);if(ue=null,Z<128){if(--U<0)break;q.push(Z);}else if(Z<2048){if((U-=2)<0)break;q.push(Z>>6|192,63&Z|128);}
118else if(Z<65536){if((U-=3)<0)break;q.push(Z>>12|224,Z>>6&63|128,63&Z|128);}else{if(!(Z<1114112))throw new Error("Invalid code point");if((U-=4)<0)break;q.push(Z>>18|240,Z>>12&63|128,Z>>6&63|128,63&Z|128);}}return q;}function te(V){return n.toByteArray(function(U){var Z;if((U=((Z=U).trim?Z.trim():Z.replace(/^\s+|\s+$/g,"")).replace(B,"")).length<2)return"";for(;U.length%4!=0;)U+="=";return U;}(V));}function K(V,U,Z,re){for(var ue=0;ue<re&&!(ue+Z>=U.length||ue>=V.length);++ue)U[ue+Z]=V[ue];return ue;}}).call(this,e(27));},function(i,r,e){"use strict";r.byteLength=function(p){var p=h(p),b=p[0],p=p[1];return 3*(b+p)/4-p;},r.toByteArray=function(y){var b,p,d=h(y),c=d[0],d=d[1],m=new o(function(l,g){return 3*(l+g)/4-g;}(c,d)),a=0,s=0<d?c-4:c;for(p=0;p<s;p+=4)b=n[y.charCodeAt(p)]<<18|n[y.charCodeAt(p+1)]<<12|n[y.charCodeAt(p+2)]<<6|n[y.charCodeAt(p+3)],m[a++]=b>>16&255,m[a++]=b>>8&255,m[a++]=255&b;return d===2&&(b=n[y.charCodeAt(p)]<<2|n[y.charCodeAt(p+1)]>>4,m[a++]=255&b),d===1&&(b=n[y.charCodeAt(p)]<<10|n[y.charCodeAt(p+1)]<<4|n[y.charCodeAt(p+2)]>>2,m[a++]=b>>8&255,m[a++]=255&b),m;},r.fromByteArray=function(y){for(var b,p=y.length,c=p%3,d=[],m=0,a=p-c;m<a;m+=16383)d.push(function(s,l,g){for(var f,v=[],S=l;S<g;S+=3)f=(s[S]<<16&16711680)+(s[S+1]<<8&65280)+(255&s[S+2]),v.push(function(w){return t[w>>18&63]+t[w>>12&63]+t[w>>6&63]+t[63&w];}(f));return v.join("");}(y,m,a<m+16383?a:m+16383));return c==1?(b=y[p-1],d.push(t[b>>2]+t[b<<4&63]+"==")):c==2&&(b=(y[p-2]<<8)+y[p-1],d.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),d.join("");};for(var t=[],n=[],o=typeof Uint8Array<"u"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0,x=_.length;E<x;++E)t[E]=_[E],n[_.charCodeAt(E)]=E;function h(y){var b=y.length;if(0<b%4)throw new Error("Invalid string. Length must be a multiple of 4");return y=y.indexOf("="),b=(y=y===-1?b:y)===b?0:4-y%4,[y,b];}n[45]=62,n[95]=63;},function(i,r){r.read=function(e,t,n,o,m){var E,x,h=8*m-o-1,y=(1<<h)-1,b=y>>1,p=-7,c=n?m-1:0,d=n?-1:1,m=e[t+c];for(c+=d,E=m&(1<<-p)-1,m>>=-p,p+=h;0<p;E=256*E+e[t+c],c+=d,p-=8);for(x=E&(1<<-p)-1,E>>=-p,p+=o;0<p;x=256*x+e[t+c],c+=d,p-=8);if(E===0)E=1-b;else{if(E===y)return x?NaN:1/0*(m?-1:1);x+=Math.pow(2,o),E-=b;}return(m?-1:1)*x*Math.pow(2,E-o);},r.write=function(e,t,n,o,_,a){var x,h,y=8*a-_-1,b=(1<<y)-1,p=b>>1,c=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=o?0:a-1,m=o?1:-1,a=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,x=b):(x=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-x))<1&&(x--,o*=2),2<=(t+=1<=x+p?c/o:c*Math.pow(2,1-p))*o&&(x++,o/=2),b<=x+p?(h=0,x=b):1<=x+p?(h=(t*o-1)*Math.pow(2,_),x+=p):(h=t*Math.pow(2,p-1)*Math.pow(2,_),x=0));8<=_;e[n+d]=255&h,d+=m,h/=256,_-=8);for(x=x<<_|h,y+=_;0<y;e[n+d]=255&x,d+=m,x/=256,y-=8);e[n+d-m]|=128*a;};},function(i,r){var e={}.toString;i.exports=Array.isArray||function(t){return e.call(t)=="[object Array]";};},function(i,r,_){var t=_(43),n=_(97),o=_(241),_=_(242),E=n.DOMImplementation,x=t.NAMESPACE,h=_.ParseError,y=_.XMLReader;function b(l){return l.replace(/\r[\n\u0085]/g,` 119`).replace(/[\r\u0085\u2028]/g,` 120`);}function p(l){this.options=l||{locator:{}};}function c(){this.cdata=!1;}function d(l,g){g.lineNumber=l.lineNumber,g.columnNumber=l.columnNumber;}function m(l){if(l)return` 121@`+(l.systemId||"")+"#[line:"+l.lineNumber+",col:"+l.columnNumber+"]";}function a(l,g,f){return typeof l=="string"?l.substr(g,f):l.length>=g+f||g?new java.lang.String(l,g,f)+"":l;}function s(l,g){(l.currentElement||l.doc).appendChild(g);}p.prototype.parseFromString=function(l,I){var f=this.options,v=new y(),S=f.domBuilder||new c(),M=f.errorHandler,w=f.locator,C=f.xmlns||{},I=/\/x?html?$/.test(I),O=I?o.HTML_ENTITIES:o.XML_ENTITIES,M=(w&&S.setDocumentLocator(w),v.errorHandler=function(N,G,H){if(!N){if(G instanceof c)return G;N=G;}var B={},z=N instanceof Function;function te(K){var V=N[K];!V&&z&&(V=N.length==2?function(U){N(K,U);}:N),B[K]=V?function(U){V("[xmldom "+K+"] "+U+m(H));}:function(){};}return H=H||{},te("warning"),te("error"),te("fatalError"),B;}(M,S,w),v.domBuilder=f.domBuilder||S,I&&(C[""]=x.HTML),C.xml=C.xml||x.XML,f.normalizeLineEndings||b);return l&&typeof l=="string"?v.parse(M(l),C,O):v.errorHandler.error("invalid doc source"),S.doc;},c.prototype={startDocument:function(){this.doc=new E().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId);},startElement:function(l,g,f,v){var S=this.doc,w=S.createElementNS(l,f||g),C=v.length;s(this,w),this.currentElement=w,this.locator&&d(this.locator,w);for(var I=0;I<C;I++){var l=v.getURI(I),O=v.getValue(I),f=v.getQName(I),M=S.createAttributeNS(l,f);this.locator&&d(v.getLocator(I),M),M.value=M.nodeValue=O,w.setAttributeNode(M);}},endElement:function(l,g,f){var v=this.currentElement;v.tagName,this.currentElement=v.parentNode;},startPrefixMapping:function(l,g){},endPrefixMapping:function(l){},processingInstruction:function(l,g){l=this.doc.createProcessingInstruction(l,g),this.locator&&d(this.locator,l),s(this,l);},ignorableWhitespace:function(l,g,f){},characters:function(l,g,f){var v;
121(l=a.apply(this,arguments))&&(v=this.cdata?this.doc.createCDATASection(l):this.doc.createTextNode(l),this.currentElement?this.currentElement.appendChild(v):/^\s*$/.test(l)&&this.doc.appendChild(v),this.locator&&d(this.locator,v));},skippedEntity:function(l){},endDocument:function(){this.doc.normalize();},setDocumentLocator:function(l){(this.locator=l)&&(l.lineNumber=0);},comment:function(l,g,f){l=a.apply(this,arguments);var v=this.doc.createComment(l);this.locator&&d(this.locator,v),s(this,v);},startCDATA:function(){this.cdata=!0;},endCDATA:function(){this.cdata=!1;},startDTD:function(l,g,f){var v=this.doc.implementation;v&&v.createDocumentType&&(v=v.createDocumentType(l,g,f),this.locator&&d(this.locator,v),s(this,v),this.doc.doctype=v);},warning:function(l){console.warn("[xmldom warning] "+l,m(this.locator));},error:function(l){console.error("[xmldom error] "+l,m(this.locator));},fatalError:function(l){throw new h(l,this.locator);}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(l){c.prototype[l]=function(){return null;};}),r.__DOMHandler=c,r.normalizeLineEndings=b,r.DOMParser=p;},function(i,r,e){"use strict";e=e(43).freeze,r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=
vendor: 35,741 bytes, lines 121-122
121e({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` 122`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}),
122r.entityMap=r.HTML_ENTITIES;},function(i,r,n){var t=n(43).NAMESPACE,n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,o=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),_=new RegExp("^"+n.source+o.source+"*(?::"+n.source+o.source+"*)?$"),E=0,x=1,h=2,y=3,b=4,p=5,c=6,d=7;function m(v,S){this.message=v,this.locator=S,Error.captureStackTrace&&Error.captureStackTrace(this,m);}function a(){}function s(v,S){return S.lineNumber=v.lineNumber,S.columnNumber=v.columnNumber,S;}function l(v,S,w){for(var C=v.tagName,I=null,O=v.length;O--;){var M=v[O],G=M.qName,N=M.value,G=0<(B=G.indexOf(":"))?(H=M.prefix=G.slice(0,B),z=G.slice(B+1),H==="xmlns"&&z):(H=null,(z=G)==="xmlns"&&"");M.localName=z,G!==!1&&(I==null&&(I={},g(w,w={})),w[G]=I[G]=N,M.uri=t.XMLNS,S.startPrefixMapping(G,N));}for(var H,O=v.length;O--;)(H=(M=v[O]).prefix)&&(H==="xml"&&(M.uri=t.XML),H!=="xmlns"&&(M.uri=w[H||""]));var B,z=0<(B=C.indexOf(":"))?(H=v.prefix=C.slice(0,B),v.localName=C.slice(B+1)):(H=null,v.localName=C),te=v.uri=w[H||""];if(S.startElement(te,z,C,v),!v.closed)return v.currentNSMap=w,v.localNSMap=I,1;if(S.endElement(te,z,C),I)for(H in I)Object.prototype.hasOwnProperty.call(I,H)&&S.endPrefixMapping(H);}function g(v,S){for(var w in v)Object.prototype.hasOwnProperty.call(v,w)&&(S[w]=v[w]);}function f(){this.attributeNames={};}(m.prototype=new Error()).name=m.name,a.prototype={parse:function(v,S,w){var C=this.domBuilder;C.startDocument(),g(S,S={}),function(I,O,M,N,G){function H(he){var _e=he.slice(1,-1);return Object.hasOwnProperty.call(M,_e)?M[_e]:_e.charAt(0)==="#"?65535<(_e=parseInt(_e.substr(1).replace("x","0x")))?(_e-=65536,String.fromCharCode(55296+(_e>>10),56320+(1023&_e))):String.fromCharCode(_e):(G.error("entity not found:"+he),he);}function B(he){var _e;ue<he&&(_e=I.substring(ue,he).replace(/&#?\w+;/g,H),U&&z(ue),N.characters(_e,0,he-ue),ue=he);}function z(he,_e){for(;K<=he&&(_e=V.exec(I));)te=_e.index,K=te+_e[0].length,U.lineNumber++;U.columnNumber=he-te+1;}for(var te=0,K=0,V=/.*(?:\r\n?|\n)|.*$/g,U=N.locator,Z=[{currentNSMap:O}],re={},ue=0;;){try{var q,J,oe=I.indexOf("<",ue);if(oe<0)return I.substr(ue).match(/^\s*$/)||(q=N.doc,J=q.createTextNode(I.substr(ue)),q.appendChild(J),N.currentElement=J);switch(ue<oe&&B(oe),I.charAt(oe+1)){case"/":var ne=I.indexOf(">",oe+3),Q=I.substring(oe+2,ne).replace(/[ \t\n\r]+$/g,""),F=Z.pop(),X=(ne<0?(Q=I.substring(oe+2).replace(/[\s<].*/,""),G.error("end tag name: "+Q+" is not complete:"+F.tagName),ne=oe+1+Q.length):Q.match(/\s</)&&(Q=Q.replace(/[\s<].*/,""),G.error("end tag name: "+Q+" maybe not complete"),ne=oe+1+Q.length),F.localNSMap),Y=F.tagName==Q;if(Y||F.tagName&&F.tagName.toLowerCase()==Q.toLowerCase()){if(N.endElement(F.uri,F.localName,Q),X)for(var j in X)Object.prototype.hasOwnProperty.call(X,j)&&N.endPrefixMapping(j);Y||G.fatalError("end tag name: "+Q+" is not match the current start tagName:"+F.tagName);}else Z.push(F);ne++;break;case"?":U&&z(oe),ne=function(he,_e,Re){var ee=he.indexOf("?>",_e);return ee&&(he=he.substring(_e,ee).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/),he)?(he[0].length,Re.processingInstruction(he[1],he[2]),ee+2):-1;}(I,oe,N);break;case"!":U&&z(oe),ne=function(he,_e,Re,ee){{if(he.charAt(_e+2)==="-")return he.charAt(_e+3)==="-"?(ae=he.indexOf("-->",_e+4),_e<ae?(Re.comment(he,_e+4,ae-_e-4),ae+3):(ee.error("Unclosed comment"),-1)):-1;if(he.substr(_e+3,6)=="CDATA[")return ae=he.indexOf("]]>",_e+9),Re.startCDATA(),Re.characters(he,_e+9,ae-_e-9),Re.endCDATA(),ae+3;var W,ee=function(ye,Se){var De,Ue=[],Be=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Be.lastIndex=Se,Be.exec(ye);De=Be.exec(ye);)if(Ue.push(De),De[1])return Ue;}(he,_e),ae=ee.length;if(1<ae&&/!doctype/i.test(ee[0][0]))return he=ee[1][0],W=_e=!1,3<ae&&(/^public$/i.test(ee[2][0])?(_e=ee[3][0],W=4<ae&&ee[4][0]):/^system$/i.test(ee[2][0])&&(W=ee[3][0])),ee=ee[ae-1],Re.startDTD(he,_e,W),Re.endDTD(),ee.index+ee[0].length;}return-1;}(I,oe,N,G);break;default:U&&z(oe);var D=new f(),$=Z[Z.length-1].currentNSMap,ne=function(he,_e,Re,ee,W,ae){function de(nt,it,ot){Re.attributeNames.hasOwnProperty(nt)&&ae.fatalError("Attribute "+nt+" redefined"),Re.addValue(nt,it.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,W),ot);}for(var ye,Se=++_e,De=E;;){var Ue=he.charAt(Se);switch(Ue){case"=":if(De===x)ye=he.slice(_e,Se),De=y;else{if(De!==h)throw new Error("attribute equal must after attrName");De=y;}break;
122case"'":case'"':if(De===y||De===x){if(De===x&&(ae.warning('attribute value must after "="'),ye=he.slice(_e,Se)),_e=Se+1,!(0<(Se=he.indexOf(Ue,_e))))throw new Error("attribute value no end '"+Ue+"' match");Be=he.slice(_e,Se),de(ye,Be,_e-1),De=p;}else{if(De!=b)throw new Error('attribute value must after "="');Be=he.slice(_e,Se),de(ye,Be,_e),ae.warning('attribute "'+ye+'" missed start quot('+Ue+")!!"),_e=Se+1,De=p;}break;case"/":switch(De){case E:Re.setTagName(he.slice(_e,Se));case p:case c:case d:De=d,Re.closed=!0;case b:case x:break;case h:Re.closed=!0;break;default:throw new Error("attribute invalid close char('/')");}break;case"":return ae.error("unexpected end of input"),De==E&&Re.setTagName(he.slice(_e,Se)),Se;case">":switch(De){case E:Re.setTagName(he.slice(_e,Se));case p:case c:case d:break;case b:case x:(Be=he.slice(_e,Se)).slice(-1)==="/"&&(Re.closed=!0,Be=Be.slice(0,-1));case h:De===h&&(Be=ye),De==b?(ae.warning('attribute "'+Be+'" missed quot(")!'),de(ye,Be,_e)):(t.isHTML(ee[""])&&Be.match(/^(?:disabled|checked|selected)$/i)||ae.warning('attribute "'+Be+'" missed value!! "'+Be+'" instead!!'),de(Be,Be,_e));break;case y:throw new Error("attribute value missed!!");}return Se;case"\x80":Ue=" ";default:if(Ue<=" ")switch(De){case E:Re.setTagName(he.slice(_e,Se)),De=c;break;case x:ye=he.slice(_e,Se),De=h;break;case b:var Be=he.slice(_e,Se);ae.warning('attribute "'+Be+'" missed quot(")!!'),de(ye,Be,_e);case p:De=c;}else switch(De){case h:Re.tagName,t.isHTML(ee[""])&&ye.match(/^(?:disabled|checked|selected)$/i)||ae.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead2!!'),de(ye,ye,_e),_e=Se,De=x;break;case p:ae.warning('attribute space is required"'+ye+'"!!');case c:De=x,_e=Se;break;case y:De=b,_e=Se;break;case d:throw new Error("elements closed character '/' and '>' must be connected to");}}Se++;}}(I,oe,D,$,H,G),le=D.length;if(!D.closed&&function(he,_e,Re,ee){var W=ee[Re];return W==null&&((W=he.lastIndexOf("</"+Re+">"))<_e&&(W=he.lastIndexOf("</"+Re)),ee[Re]=W),W<_e;}(I,ne,D.tagName,re)&&(D.closed=!0,M.nbsp||G.warning("unclosed xml attribute")),U&&le){for(var se=s(U,{}),fe=0;fe<le;fe++){var ge=D[fe];z(ge.offset),ge.locator=s(U,{});}N.locator=se,l(D,N,$)&&Z.push(D),N.locator=U;}else l(D,N,$)&&Z.push(D);t.isHTML(D.uri)&&!D.closed?ne=function(he,_e,Re,ee,W){if(/^(?:script|textarea)$/i.test(Re)){var ae=he.indexOf("</"+Re+">",_e),he=he.substring(_e+1,ae);if(/[&<]/.test(he))return /^script$/i.test(Re)||(he=he.replace(/&#?\w+;/g,ee)),W.characters(he,0,he.length),ae;}return _e+1;}(I,ne,D.tagName,H,N):ne++;}}catch(he){if(he instanceof m)throw he;G.error("element parse error: "+he),ne=-1;}ue<ne?ue=ne:B(Math.max(oe,ue)+1);}}(v,S,w,C,this.errorHandler),C.endDocument();}},f.prototype={setTagName:function(v){if(!_.test(v))throw new Error("invalid tagName:"+v);this.tagName=v;},addValue:function(v,S,w){if(!_.test(v))throw new Error("invalid attribute:"+v);this.attributeNames[v]=this.length,this[this.length++]={qName:v,value:S,offset:w};},length:0,getLocalName:function(v){return this[v].localName;},getLocator:function(v){return this[v].locator;},getQName:function(v){return this[v].qName;},getURI:function(v){return this[v].uri;},getValue:function(v){return this[v].value;}},r.XMLReader=a,r.ParseError=m;},function(i,r){var e=Math.pow(2,32);i.exports={getUint64:function(o){var n,o=new DataView(o.buffer,o.byteOffset,o.byteLength);return o.getBigUint64?(n=o.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(n):n:o.getUint32(0)*e+o.getUint32(4);},MAX_UINT32:e};},function(i,r){function e(t){return i.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n);},i.exports.__esModule=!0,i.exports.default=i.exports,e(t);}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r){i.exports=function(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1;}catch{return typeof e=="function";}},i.exports.__esModule=!0,i.exports.default=i.exports;},function(i,r,y){"use strict";y.r(r);var t=y(22);function n(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b;}function o(b){var p=this;
122return p.id=b.id,p.label=p.id,p.width=b.width,p.height=b.height,p.bitrate=b.bandwidth,p.frameRate=b.frameRate,p.enabled_=b.enabled,Object.defineProperty(p,"enabled",{get:function(){return p.enabled_();},set:function(c){p.enabled_(c);}}),p;}var _,E=function(b){var p;function c(){var m=b.call(this)||this,a=n(n(m));return a.levels_=[],a.selectedIndex_=-1,Object.defineProperty(a,"selectedIndex",{get:function(){return a.selectedIndex_;}}),Object.defineProperty(a,"length",{get:function(){return a.levels_.length;}}),a||n(m);}p=b,(d=c).prototype=Object.create(p.prototype),(d.prototype.constructor=d).__proto__=p;var d=c.prototype;return d.addQualityLevel=function(m){var a,s=this.getQualityLevelById(m.id);return s||(a=this.levels_.length,s=new o(m),""+a in this||Object.defineProperty(this,a,{get:function(){return this.levels_[a];}}),this.levels_.push(s),this.trigger({qualityLevel:s,type:"addqualitylevel"})),s;},d.removeQualityLevel=function(m){for(var a=null,s=0,l=this.length;s<l;s++)if(this[s]===m){a=this.levels_.splice(s,1)[0],this.selectedIndex_===s?this.selectedIndex_=-1:this.selectedIndex_>s&&this.selectedIndex_--;break;}return a&&this.trigger({qualityLevel:m,type:"removequalitylevel"}),a;},d.getQualityLevelById=function(m){for(var a=0,s=this.length;a<s;a++){var l=this[a];if(l.id===m)return l;}return null;},d.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0;},c;}(t.default.EventTarget);for(_ in E.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},E.prototype.allowedEvents_)E.prototype["on"+_]=null;function x(b){return p=this,t.default.mergeOptions({},b),c=p.qualityLevels,d=new E(),p.on("dispose",function m(){d.dispose(),p.qualityLevels=c,p.off("dispose",m);}),p.qualityLevels=function(){return d;},p.qualityLevels.VERSION=h,d;var p,c,d;}var h="2.2.1",y=t.default.registerPlugin||t.default.plugin;y("qualityLevels",x),x.VERSION=h,r.default=x;},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0});var o=_(26),_=function(){function E(b,p){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");this._templateIds=b,this._support=p,this._templateId2paramsValues=void 0,this._aspectRatio=new o.default("horizontal"),this._slideResources=void 0;}return x=E,(h=[{key:"templateIds",get:function(){return this._templateIds;}},{key:"slideResources",get:function(){return this._slideResources;}},{key:"aspectRatio",get:function(){return this._aspectRatio;}},{key:"support",get:function(){return this._support;}},{key:"templateId2paramsValues",get:function(){return this._templateId2paramsValues;}},{key:"setTemplateId2paramsValues",value:function(b){return this._templateId2paramsValues=b,this;}},{key:"setSlideResources",value:function(b){return this._slideResources=b,this;}},{key:"setAspectRatio",value:function(b){return this._aspectRatio=b,this;}}])&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();r.default=_;},function(i,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AUDIO_TRACK_TYPES=void 0,r.AUDIO_TRACK_TYPES={MAINTRACK:"maintrack",SOUNDBED:"soundbed",SLIDE:"slide"};},function(i,r,y){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(t(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),t(m)=="symbol"?m:m+"";}(d.key),d);}}
122Object.defineProperty(r,"__esModule",{value:!0});var o=y(250),_=y(313),E=y(315),x=y(272),h=y(320),y=function(){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");}return p=b,d=[{key:"createComponent",value:function(m,a){switch(m.type){case"image":return new o.default(m,a);case"video":return new x.default(m,a);case"color":return new _.default(m,a);case"container/text":return new E.default(m,a);case"animation":return h.default.createComponent(m,a);default:return;}}}],(c=null)&&n(p.prototype,c),d&&n(p,d),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,c,d;}();r.default=y;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function o(a,f,l){f=E(f);var g=a,f=_()?Reflect.construct(f,l||[],E(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function _(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!a;})();}function E(a){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function x(a,s){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0});var h=m(46),y=m(5),b=m(255),p=m(312),c=m(105),d=m(2),m=function(a){function s(f,v){var S;if(this instanceof s)return(S=o(this,s,[f,v])).attributes=new p.ImageComponentAttributesBuilder(f.attributes,S.scale).build(),S._timeBasedComponent=new h.default(S,v,S.attributes),S._timeBasedComponent.render&&(S.mediaURL=y.default.replaceAssetUrl(S.mediaURL)),S.components=c.default.createComponents(f.components,v),S;throw new TypeError("Cannot call a class as a function");}var l,g=s;if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");return g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&x(g,a),g=s,(a=[{key:"endTime",value:function(){return this._timeBasedComponent.endTime;}},{key:"startTime",value:function(){return this._timeBasedComponent.startTime;}},{key:"getAllEffects",value:function(){return this._timeBasedComponent.getAllEffects();}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}},{key:"renderTimeline",value:function(f){var v=d.gsap.timeline();this._timeBasedComponent.renderTimeline(v,this.element,this.components,this.constructor.name),f.add(v,0);}}])&&n(g.prototype,a),l&&n(g,l),Object.defineProperty(g,"prototype",{writable:!1}),g;}(b.default);r.default=m;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
122p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.BehavioralEffect=void 0;var h=b(104),y=b(47),b=function(p){function c(s){var l;if(this instanceof c)return(l=o(this,c,[s,y.EffectType.BEHAVIORAL])).data=s.attributes,l;throw new TypeError("Cannot call a class as a function");}var d,m,a=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(p&&p.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),p&&x(a,p),a=c,d&&n(a.prototype,d),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.BasicEffect);r.BehavioralEffect=b;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasScaleEffect=void 0,e=function(h){function y(c){if(this instanceof y)return(c=o(this,y,[c])).scaleStyle=c.attributes.style,c;throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,h=[{key:"calculateScaleRect",value:function(c,d,m,a,s){switch(c){case"FILL":return{w:d,h:m,x:0,y:0};case"FIT":return y.calculateFitRect(d,m,a,s);case"ZOOM":return y.calculateZoomRect(d,m,a,s);}}},{key:"calculateFitRect",value:function(c,d,m,l){var s,l=m/l<c/d?(s=m*(d/l),d):l*((s=c)/m);return{w:s,h:l,x:(c-s)/2,y:(d-l)/2};}},{key:"calculateZoomRect",value:function(c,d,l,a){var s,l=l/a<c/d?a*((s=c)/l):(s=l*(d/a),d);return{w:s,h:l,x:(c-s)/2,y:(d-l)/2};}}],(b=[{key:"apply",value:function(c){c&&"canvasScaleStyle"in c&&this.scaleStyle&&(c.canvasScaleStyle=this.scaleStyle);}}])&&n(p.prototype,b),h&&n(p,h),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(251).BehavioralEffect),r.CanvasScaleEffect=e;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=E(l);var s=d,l=_()?Reflect.construct(l,a||[],E(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}
122function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function x(d,m){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0}),r.FadeEffect=void 0;var h=c(48),y=c(5),b=c(12),p=c(2),c=function(d){function m(l){if(this instanceof m)return(l=o(this,m,[l])).fromVal=1,l.toVal=1,l.attributes.hasOwnProperty("fromVal")&&(l.fromVal=y.default.clamp(l.attributes.fromVal,0,1)),l.attributes.hasOwnProperty("toVal")&&(l.toVal=y.default.clamp(l.attributes.toVal,0,1)),l;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&x(s,d),s=m,(d=[{key:"build",value:function(){var l=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,f={force3D:!0,opacity:this.fromVal},g={force3D:!0,opacity:this.toVal,ease:this.ease,duration:this.duration},f=(b.MediaPlayerCache.isSafari&&(g.z=.01),p.gsap.fromTo(this.element,f,g));return this.timeline.add(f,l+this.timeOffset),f;}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(h.AnimationEffect);r.FadeEffect=c;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0}),r.TranslateEffect=void 0;var h=p(48),y=p(5),b=p(2),p=function(c){function d(s){if(this instanceof d)return s.attributes.diffValue=new Date(),(s=o(this,d,[s])).fromVal=void 0,s.toVal=void 0,s.axis=s.attributes.axis,s.attributes.hasOwnProperty("fromVal")&&(s.fromVal=y.default.scale(s.attributes.fromVal,s.scale)),s.attributes.hasOwnProperty("toVal")&&(s.toVal=y.default.scale(s.attributes.toVal,s.scale)),s.axis!=="x"&&s.axis!=="y"&&s.axis!=="width"&&s.axis!=="height"&&(s.axis="x"),s;throw new TypeError("Cannot call a class as a function");}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"getTranslateVal",value:function(s,l){switch(["width","height"].includes(s)&&l===void 0&&(l=this.element.getBoundingClientRect()[s]),s){case"x":return l?l-(this.element.offsetLeft+this.element.clientWidth/2):0;case"y":return l?l-(this.element.offsetTop+this.element.clientHeight/2):0;case"width":case"height":return l;default:return 0;}}},{key:"build",value:function(){var s=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,l={},g={ease:this.ease,duration:this.duration};return l[this.axis]=this.getTranslateVal(this.axis,this.fromVal),g[this.axis]=this.getTranslateVal(this.axis,this.toVal),l=this.fromVal&&this.toVal===void 0?(l.ease=this.ease,l.duration=this.duration,b.gsap.from(this.element,l)):this.toVal&&this.fromVal===void 0?b.gsap.to(this.element,g):b.gsap.fromTo(this.element,l,g),this.timeline.add(l,s+this.timeOffset),l;}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.AnimationEffect);r.TranslateEffect=p;},function(i,r,v){"use strict";function t(S){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w;}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w;})(S);}function n(S,w){return function(C){if(Array.isArray(C))return C;}(S)||function(C,I){var O=C==null?null:typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(O!=null){var M,N,G,H,B=[],z=!0,te=!1;try{if(G=(O=O.call(C)).next,I===0){if(Object(O)!==O)return;z=!1;}else for(;!(z=(M=G.call(O)).done)&&(B.push(M.value),B.length!==I);z=!0);}catch(K){te=!0,N=K;}
122finally{try{if(!z&&O.return!=null&&(H=O.return(),Object(H)!==H))return;}finally{if(te)throw N;}}return B;}}(S,w)||function(C,I){if(C){if(typeof C=="string")return o(C,I);var O={}.toString.call(C).slice(8,-1);return(O=O==="Object"&&C.constructor?C.constructor.name:O)==="Map"||O==="Set"?Array.from(C):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?o(C,I):void 0;}}(S,w)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 123In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(S,w){(w==null||w>S.length)&&(w=S.length);for(var C=0,I=Array(w);C<w;C++)I[C]=S[C];return I;}function _(){_=function(){return w;};var S,w={},C=Object.prototype,I=C.hasOwnProperty,O=Object.defineProperty||function(ne,le,se){ne[le]=se.value;},J=typeof Symbol=="function"?Symbol:{},M=J.iterator||"@@iterator",N=J.asyncIterator||"@@asyncIterator",G=J.toStringTag||"@@toStringTag";function H(ne,le,se){return Object.defineProperty(ne,le,{value:se,enumerable:!0,configurable:!0,writable:!0}),ne[le];}try{H({},"");}catch{H=function(le,se,fe){return le[se]=fe;};}function B(ne,ee,se,W){var ge,he,_e,Re,ee=ee&&ee.prototype instanceof re?ee:re,ee=Object.create(ee.prototype),W=new D(W||[]);return O(ee,"_invoke",{value:(ge=ne,he=se,_e=W,Re=te,function(ae,de){if(Re===V)throw Error("Generator is already running");if(Re===U){if(ae==="throw")throw de;return{value:S,done:!0};}for(_e.method=ae,_e.arg=de;;){var ye=_e.delegate;if(ye&&(ye=function Se(De,Ue){var Be=Ue.method,nt=De.iterator[Be];return nt===S?(Ue.delegate=null,Be==="throw"&&De.iterator.return&&(Ue.method="return",Ue.arg=S,Se(De,Ue),Ue.method==="throw")||Be!=="return"&&(Ue.method="throw",Ue.arg=new TypeError("The iterator does not provide a '"+Be+"' method")),Z):(Be=z(nt,De.iterator,Ue.arg),Be.type==="throw"?(Ue.method="throw",Ue.arg=Be.arg,Ue.delegate=null,Z):(nt=Be.arg,nt?nt.done?(Ue[De.resultName]=nt.value,Ue.next=De.nextLoc,Ue.method!=="return"&&(Ue.method="next",Ue.arg=S),Ue.delegate=null,Z):nt:(Ue.method="throw",Ue.arg=new TypeError("iterator result is not an object"),Ue.delegate=null,Z)));}(ye,_e),ye)){if(ye===Z)continue;return ye;}if(_e.method==="next")_e.sent=_e._sent=_e.arg;else if(_e.method==="throw"){if(Re===te)throw Re=U,_e.arg;_e.dispatchException(_e.arg);}else _e.method==="return"&&_e.abrupt("return",_e.arg);if(Re=V,ye=z(ge,he,_e),ye.type==="normal"){if(Re=_e.done?U:K,ye.arg===Z)continue;return{value:ye.arg,done:_e.done};}ye.type==="throw"&&(Re=U,_e.method="throw",_e.arg=ye.arg);}})}),ee;}function z(ne,le,se){try{return{type:"normal",arg:ne.call(le,se)};}catch(fe){return{type:"throw",arg:fe};}}w.wrap=B;
123var te="suspendedStart",K="suspendedYield",V="executing",U="completed",Z={};function re(){}function ue(){}function q(){}var J={},oe=(H(J,M,function(){return this;}),Object.getPrototypeOf),oe=oe&&oe(oe($([]))),Q=(oe&&oe!==C&&I.call(oe,M)&&(J=oe),q.prototype=re.prototype=Object.create(J));function F(ne){["next","throw","return"].forEach(function(le){H(ne,le,function(se){return this._invoke(le,se);});});}function X(ne,le){var se;O(this,"_invoke",{value:function(fe,ge){function he(){return new le(function(_e,Re){(function ee(De,ae,de,ye){var Se,De=z(ne[De],ne,ae);if(De.type!=="throw")return(ae=(Se=De.arg).value)&&t(ae)=="object"&&I.call(ae,"__await")?le.resolve(ae.__await).then(function(Ue){ee("next",Ue,de,ye);},function(Ue){ee("throw",Ue,de,ye);}):le.resolve(ae).then(function(Ue){Se.value=Ue,de(Se);},function(Ue){return ee("throw",Ue,de,ye);});ye(De.arg);})(fe,ge,_e,Re);});}return se=se?se.then(he,he):he();}});}function Y(ne){var le={tryLoc:ne[0]};1 in ne&&(le.catchLoc=ne[1]),2 in ne&&(le.finallyLoc=ne[2],le.afterLoc=ne[3]),this.tryEntries.push(le);}function j(ne){var le=ne.completion||{};le.type="normal",delete le.arg,ne.completion=le;}function D(ne){this.tryEntries=[{tryLoc:"root"}],ne.forEach(Y,this),this.reset(!0);}function $(ne){if(ne||ne===""){var le,se=ne[M];if(se)return se.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length))return le=-1,(se=function fe(){for(;++le<ne.length;)if(I.call(ne,le))return fe.value=ne[le],fe.done=!1,fe;return fe.value=S,fe.done=!0,fe;}).next=se;}throw new TypeError(t(ne)+" is not iterable");}return O(Q,"constructor",{value:ue.prototype=q,configurable:!0}),O(q,"constructor",{value:ue,configurable:!0}),ue.displayName=H(q,G,"GeneratorFunction"),w.isGeneratorFunction=function(ne){return ne=typeof ne=="function"&&ne.constructor,!!ne&&(ne===ue||(ne.displayName||ne.name)==="GeneratorFunction");},w.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,q):(ne.__proto__=q,H(ne,G,"GeneratorFunction")),ne.prototype=Object.create(Q),ne;},w.awrap=function(ne){return{__await:ne};},F(X.prototype),H(X.prototype,N,function(){return this;}),w.AsyncIterator=X,w.async=function(ne,le,se,fe,ge){ge===void 0&&(ge=Promise);var he=new X(B(ne,le,se,fe),ge);return w.isGeneratorFunction(le)?he:he.next().then(function(_e){return _e.done?_e.value:he.next();});},F(Q),H(Q,G,"Generator"),H(Q,M,function(){return this;}),H(Q,"toString",function(){return"[object Generator]";}),w.keys=function(ne){var le,se=Object(ne),fe=[];for(le in se)fe.push(le);return fe.reverse(),function ge(){for(;fe.length;){var he=fe.pop();if(he in se)return ge.value=he,ge.done=!1,ge;}return ge.done=!0,ge;};},w.values=$,D.prototype={constructor:D,reset:function(ne){if(this.prev=0,this.next=0,this.sent=this._sent=S,this.done=!1,this.delegate=null,this.method="next",this.arg=S,this.tryEntries.forEach(j),!ne)for(var le in this)le.charAt(0)==="t"&&I.call(this,le)&&!isNaN(+le.slice(1))&&(this[le]=S);},stop:function(){this.done=!0;var ne=this.tryEntries[0].completion;if(ne.type==="throw")throw ne.arg;return this.rval;},dispatchException:function(ne){if(this.done)throw ne;var le=this;function se(ee,W){return he.type="throw",he.arg=ne,le.next=ee,W&&(le.method="next",le.arg=S),!!W;}for(var fe=this.tryEntries.length-1;0<=fe;--fe){var ge=this.tryEntries[fe],he=ge.completion;if(ge.tryLoc==="root")return se("end");if(ge.tryLoc<=this.prev){var _e=I.call(ge,"catchLoc"),Re=I.call(ge,"finallyLoc");if(_e&&Re){if(this.prev<ge.catchLoc)return se(ge.catchLoc,!0);if(this.prev<ge.finallyLoc)return se(ge.finallyLoc);}else if(_e){if(this.prev<ge.catchLoc)return se(ge.catchLoc,!0);}else{if(!Re)throw Error("try statement without catch or finally");if(this.prev<ge.finallyLoc)return se(ge.finallyLoc);}}}},abrupt:function(ne,le){for(var se=this.tryEntries.length-1;0<=se;--se){var fe=this.tryEntries[se];if(fe.tryLoc<=this.prev&&I.call(fe,"finallyLoc")&&this.prev<fe.finallyLoc){var ge=fe;break;}}var he=(ge=ge&&(ne==="break"||ne==="continue")&&ge.tryLoc<=le&&le<=ge.finallyLoc?null:ge)?ge.completion:{};return he.type=ne,he.arg=le,ge?(this.method="next",this.next=ge.finallyLoc,Z):this.complete(he);},complete:function(ne,le){if(ne.type==="throw")throw ne.arg;return ne.type==="break"||ne.type==="continue"?this.next=ne.arg:ne.type==="return"?(this.rval=this.arg=ne.arg,this.method="return",this.next="end"):ne.type==="normal"&&le&&(this.next=le),Z;},finish:function(ne){for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le];if(se.finallyLoc===ne)return this.complete(se.completion,se.afterLoc),j(se),Z;}},catch:function(ne){for(var le=this.tryEntries.length-1;0<=le;--le){var se,fe,ge=this.tryEntries[le];if(ge.tryLoc===ne)return(se=ge.completion).type==="throw"&&(fe=se.arg,j(ge)),fe;}throw Error("illegal catch attempt");},delegateYield:function(ne,le,se){return this.delegate={iterator:$(ne),resultName:le,nextLoc:se},this.method==="next"&&(this.arg=S),Z;}},w;}function E(S,w){for(var C=0;C<w.length;C++){var I=w[C];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(S,function(O){return O=function(M,N){if
123(t(M)!="object"||!M)return M;var G=M[Symbol.toPrimitive];if(G===void 0)return(N==="string"?String:Number)(M);if(G=G.call(M,N||"default"),t(G)!="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.");}(O,"string"),t(O)=="symbol"?O:O+"";}(I.key),I);}}function x(S,O,C){O=p(O);var I=S,O=h()?Reflect.construct(O,C||[],p(S).constructor):O.apply(S,C);if(O&&(t(O)=="object"||typeof O=="function"))return O;if(O!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(S=I,S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S;}function h(){try{var S=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!S;})();}function y(S,w,C,I){var O=b(p(1&I?S.prototype:S),w,C);return 2&I?function(M){return O.apply(C,M);}:O;}function b(){return(b=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(S,w,C){var I=function(O,M){for(;!{}.hasOwnProperty.call(O,M)&&(O=p(O))!==null;);return O;}(S,w);if(I)return(I=Object.getOwnPropertyDescriptor(I,w)).get?I.get.call(arguments.length<3?S:C):I.value;}).apply(null,arguments);}function p(S){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w);})(S);}function c(S,w){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,I){return C.__proto__=I,C;})(S,w);}var d=this&&this.__awaiter||function(S,w,C,I){return new(C=C||Promise)(function(O,M){function N(B){try{H(I.next(B));}catch(z){M(z);}}function G(B){try{H(I.throw(B));}catch(z){M(z);}}function H(B){var z;B.done?O(B.value):((z=B.value)instanceof C?z:new C(function(te){te(z);})).then(N,G);}H((I=I.apply(S,w||[])).next());});},m=(Object.defineProperty(r,"__esModule",{value:!0}),v(32)),a=v(5),s=v(19),l=v(256),g=v(73),f=v(106),v=function(S){function w(O,M){var N;if(!(this instanceof w))throw new TypeError("Cannot call a class as a function");(N=x(this,w,[O,M])).attributes=new l.ImageComponentCoreAttributesBuilder(O.attributes,N.scale).build(),O.src.url!==""&&(N.mediaURL=O.src.url);var G=(G=N.options)!=null&&G.containerId?f.default.getInstance(N.options.containerId):void 0;return G&&N.mediaURL&&G.reserve(N.getRegistryKey()),N.shouldWaitOnLoad=!M.nonBlockImageLoading,N.components=g.default.createComponents(O.components,M),N.baseVDom=N.buildVDOM(),N;}var C,I=w;if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");return I.prototype=Object.create(S&&S.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),S&&c(I,S),I=w,(S=[{key:"renderHtml",value:function(O){return d(this,void 0,void 0,_().mark(function M(){var N,G,H,B=this;return _().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(N=document.createElement("div"),this.element=N,O.appendChild(N),O.style.backfaceVisibility="hidden",O.style.webkitBackfaceVisibility="hidden",N.style.visibility="hidden",G="Could not load image: ".concat(this.mediaURL),z.prev=7,H=function(){return d(B,void 0,void 0,_().mark(function te(){return _().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return this.adjustWidthHeightAttributes(),this.applyStyle(N),K.next=4,this.applyVisualEffects(N);case 4:case"end":return K.stop();}},te,this);}));},this.shouldWaitOnLoad){z.next=13;break;}this.loadImage(N,H).catch(function(te){return a.default.error(G);}),z.next=17;break;case 13:return z.next=15,this.loadImage(N);case 15:return z.next=17,H();case 17:z.next=22;break;case 19:z.prev=19,z.t0=z.catch(7),a.default.error(G);case 22:case"end":return z.stop();}},M,this,[[7,19]]);}));}},{key:"applyStyle",value:function(O){y(w,"applyStyle",this,3)([O]),O.style.backgroundSize="contain",O.style.backgroundRepeat="no-repeat",O.style.backgroundPositionX="center",O.style.backgroundPositionY="center";}},{key:"getComputedSize",value:function(){var O={width:void 0,height:void 0};return this.imageWidth>this.imageHeight?(O.width=this.attributes.widthVal,O.height=this.imageHeight/this.imageWidth*O.width):(O.height=this.attributes.heightVal,O.width=this.imageWidth/this.imageHeight*O.height),O;}},{key:"reconstructWithRecycle",value:function(){return d(this,void 0,void 0,_().mark(function O(){return _().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=0,M.next=3,this.loadImage(this.element);case 3:a.default.debug("Finished assigning Image Component Elements!"),M.next=9;break;case 6:M.prev=6,M.t0=M.catch(0),a.default.warn("Error loading image: ".concat(this.mediaURL," and exception: ").concat(M.t0));case 9:case"end":return M.stop();}},O,this,[[0,6]]);}));}},{key:"buildVDOM",value:function(){return this.baseVDom=a.default.surpass(s.VDOMConstructor.builder(this)),y(w,"buildVDOM",this,3)([]);}},{key:"MediaURL",value:function(){return this.mediaURL;}},{key:"getRegistryKey",value:function(){var O=this.attributes.svgVariables;return 0<O?.length?"".concat(this.mediaURL,"::svg::").concat(JSON.stringify(O)):this.mediaURL;}},{key:"loadImage",value:function(O,M){var N;return d(this,void 0,void 0,_().mark(function G(){var H,B,z,te,K,V,U=this;return _().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(H=function(re){return a.default.debug("[fetchBlob] url: ".concat(re.slice(8,200))),fetch(re).then(function(ue){if(ue.ok)return ue.blob();throw new Error("[".concat(U.constructor.name,"]: HTTP error! status: ").concat(ue.status));});},B=function(re){return d(U,void 0,void 0,_().mark(function ue(){var q,J,oe,Q=this;return _().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.prev=0,q=document.createElement("style"),J=this.attributes.svgVariables.reduce(function(X,D){var D=n(Object.entries(D)[0],2),j=D[0],D=D[1];return"".concat(X,"--").concat(j,":").concat(a.default.scaleWithFormat(D,Q.scale),"!important;");},""),q.textContent="* {".concat(J,"}"),F.next=6,re.text();case 6:return J=F.sent,oe=new DOMParser(),(oe=oe.parseFromString(J,re.type)).documentElement.appendChild(q),oe=new XMLSerializer().serializeToString(oe),oe=new Blob([oe],{type:re.type}),F.abrupt("return",oe);case 15:throw F.prev=15,F.t0=F.catch(0),a.default.error("[".concat(this.constructor.name,"]: Could not add svg variables: ").concat(F.t0)),F.t0;case 19:case"end":return F.stop();}},ue,this,[[0,15]]);}));},z=function(re){return new Promise(function(ue,q){try{var J,oe;O.style.backgroundImage="url('".concat(re,"')"),a.default.imageSizeCache.has(U.mediaURL)?(J=a.default.imageSizeCache.get(U.mediaURL),U.imageWidth=J.width,U.imageHeight=J.height,M?M().then(ue).catch(q):ue()):((oe=new Image()).src=re,oe.onload=function(){return d(U,void 0,void 0,_().mark(function Q(){return _().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(F.prev=0,this.imageWidth=oe.width,this.imageHeight=oe.height,a.default.debug("Image: w: ".concat(this.imageWidth,", h: ").concat(this.imageHeight,", ").concat(this.mediaURL," loaded")),a.default.imageSizeCache.set(this.mediaURL,{width:oe.width,height:oe.height}),M)return F.next=8,M();F.next=8;break;case 8:ue(),F.next=14;break;case 11:F.prev=11,F.t0=F.catch(0),q(F.t0);case 14:case"end":return F.stop();}},Q,this,[[0,11]]);}));},oe.onerror=function(){return d(U,void 0,void 0,_().mark(function Q(){return _().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(F.prev=0,a.default.error("Error while loading image for saving dimensions in cache: ".concat(this.mediaURL)),M)return F.next=5,M();F.next=5;break;case 5:ue(),F.next=11;break;case 8:F.prev=8,F.t0=F.catch(0),q(F.t0);case 11:case"end":return F.stop();}},Q,this,[[0,8]]);}));});}
123catch(Q){q(Q);}});},K=(N=this.options)!=null&&N.containerId?f.default.getInstance(this.options.containerId):void 0,te=this.getRegistryKey(),Z.prev=5,K)return Z.next=9,K.getOrCreate(te,function(){return d(U,void 0,void 0,_().mark(function re(){var ue;return _().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,H(this.mediaURL);case 2:if((ue=q.sent).type==="image/svg+xml")return q.next=6,B(ue);q.next=7;break;case 6:ue=q.sent;case 7:return q.abrupt("return",ue);case 8:case"end":return q.stop();}},re,this);}));});Z.next=11;break;case 9:return K=Z.sent,Z.abrupt("return",z(K));case 11:return Z.next=13,H(this.mediaURL);case 13:if((V=Z.sent).type==="image/svg+xml")return Z.next=17,B(V);Z.next=18;break;case 17:V=Z.sent;case 18:return Z.abrupt("return",new Promise(function(re,ue){var q=new FileReader();q.onload=function(J){return d(U,void 0,void 0,_().mark(function oe(){var Q;return _().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.prev=0,Q=J.target.result,F.next=4,z(Q);case 4:re(),F.next=10;break;case 7:F.prev=7,F.t0=F.catch(0),ue(F.t0);case 10:case"end":return F.stop();}},oe,null,[[0,7]]);}));},q.onerror=function(){ue(new Error("[".concat(U.constructor.name,"]: Could not read blob: ").concat(q.error)));},q.readAsDataURL(V);}));case 21:throw Z.prev=21,Z.t0=Z.catch(5),a.default.error("[".concat(this.constructor.name,"]: Failed to load image. ").concat(Z.t0)),Z.t0;case 25:case"end":return Z.stop();}},G,this,[[5,21]]);}));}},{key:"adjustWidthHeightAttributes",value:function(){var O=this.attributes.widthVal,M=this.attributes.heightVal,N=this.imageWidth/this.imageHeight;O===0&&(O=this.imageWidth*this.scale),M===0&&(M=this.imageHeight*this.scale),O===-1?O=M*N:M===-1&&(M=O/N),0<=O&&this.attributes.setWidth(O),0<=M&&this.attributes.setHeight(M);}}])&&E(I.prototype,S),C&&E(I,C),Object.defineProperty(I,"prototype",{writable:!1}),I;}(m.default);r.default=v;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(s){return function(l){if(Array.isArray(l))return o(l);}(s)||function(l){if(typeof Symbol<"u"&&l[Symbol.iterator]!=null||l["@@iterator"]!=null)return Array.from(l);}(s)||function(l,g){if(l){if(typeof l=="string")return o(l,g);var f={}.toString.call(l).slice(8,-1);return(f=f==="Object"&&l.constructor?l.constructor.name:f)==="Map"||f==="Set"?Array.from(l):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?o(l,g):void 0;}}(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 124In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(s,l){(l==null||l>s.length)&&(l=s.length);for(var g=0,f=Array(l);g<l;g++)f[g]=s[g];return f;}function _(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function");}function E(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
124(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}function x(s,l,g){return l&&E(s.prototype,l),g&&E(s,g),Object.defineProperty(s,"prototype",{writable:!1}),s;}function h(s,v,g){v=b(v);var f=s,v=y()?Reflect.construct(v,g||[],b(s).constructor):v.apply(s,g);if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function y(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(y=function(){return!!s;})();}function b(s){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function p(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),l&&c(s,l);}function c(s,l){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}Object.defineProperty(r,"__esModule",{value:!0}),r.ImageComponentCoreAttributesBuilder=r.ImageComponentCoreAttributes=void 0;var d=a(49),m=function(){function s(l){var g;return _(this,s),(g=h(this,s,[l]))._vDom=g.buildVDOM(),g._backgroundSize=l.backgroundSize,g._svgVariables=l.svgVariables,g;}return p(s,d.GeneralAttributes),x(s,[{key:"backgroundSize",get:function(){return this._backgroundSize;}},{key:"svgVariables",get:function(){return this._svgVariables;}}]);}(),a=(r.ImageComponentCoreAttributes=m,function(){function s(l,g){return _(this,s),(g=h(this,s,[l,g]))._backgroundSize=l.backgroundSize||void 0,g._svgVariables=l.svgVariables?n(l.svgVariables):[],g;}return p(s,d.GeneralAttributesBuilder),x(s,[{key:"backgroundSize",get:function(){return this._backgroundSize;}},{key:"svgVariables",get:function(){return this._svgVariables;}},{key:"build",value:function(){return new m(this);}}]);}());r.ImageComponentCoreAttributesBuilder=a;},function(i,r,a){"use strict";function t(s,v,g){v=o(v);var f=s,v=n()?Reflect.construct(v,g||[],o(s).constructor):v.apply(s,g);if(v&&(x(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function n(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(n=function(){return!!s;})();}function o(s){return(o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function _(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),l&&E(s,l);}function E(s,l){return(E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}function x(s){return(x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function h(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function");}function y(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
124(x(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),x(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),x(v)=="symbol"?v:v+"";}(f.key),f);}}function b(s,l,g){return l&&y(s.prototype,l),g&&y(s,g),Object.defineProperty(s,"prototype",{writable:!1}),s;}Object.defineProperty(r,"__esModule",{value:!0}),r.HtmlSizeAttrib=r.HtmlPosAttrib=r.HtmlAttrib=r.isSizeSpecialCase=void 0;var p=a(5),c=new Set(["inherit-child"]);function d(s){return c.has(s);}r.isSizeSpecialCase=d;var m=function(){return b(function s(l){h(this,s),this._scaleFactor=l,this._numAttrib=0,this._strAttrib="";},[{key:"val",value:function(){return this._numAttrib;}},{key:"str",value:function(){return this._strAttrib;}},{key:"toPx",value:function(s){return s===-1?"auto":"".concat(s,"px");}},{key:"scale",value:function(s){return p.default.scale(s,this._scaleFactor);}},{key:"scaleFactor",get:function(){return this._scaleFactor;}},{key:"appendToAttrib",value:function(s){var l,g,f=parseFloat(this._strAttrib),v=parseFloat(s);{if(!isNaN(f)&&!isNaN(v))return(g=this._strAttrib.match(/[a-zA-Z%]+$/))&&(l=g[0]),typeof s=="string"&&(g=s.match(/[a-zA-Z%]+$/),l&&g&&l!==g[0]&&p.default.warn("Append to attrib params are not the same unit. ".concat(l," !== ").concat(g[0]))),f+v+(l=l||"");p.default.error("Append to attrib error one of params is not a number: ".concat(f,", ").concat(v));}}}]);}(),a=(r.HtmlAttrib=m,function(){function s(l){var g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;return h(this,s),(g=t(this,s,[g])).setAttrib(l=l===void 0?0:l),g;}return _(s,m),b(s,[{key:"setAttrib",value:function(l){var g=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];typeof l=="string"?this._numAttrib=parseFloat(g?p.default.scaleWithFormat(l,this.scaleFactor):l):(l=Number(l),this._numAttrib=g?this.scale(l):l),this._strAttrib=this.toPx(this._numAttrib);}},{key:"updateAttrib",value:function(l,g){g=g?this.appendToAttrib(l):l,this.setAttrib(g,!1);}}]);}()),a=(r.HtmlPosAttrib=a,function(){function s(l){var g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;return h(this,s),(g=t(this,s,[g])).setAttrib(l),g;}return _(s,m),b(s,[{key:"setAttrib",value:function(l){typeof l=="string"?d(l)?(this._strAttrib=l,this._numAttrib=void 0):(this._strAttrib=l,this._numAttrib=-2):(this._numAttrib=this.scale(l),this._strAttrib=l===0?"":this.toPx(this._numAttrib));}},{key:"updateAttrib",value:function(l,g){g=g?this.appendToAttrib(l):l,this.setAttrib(g);}}]);}());r.HtmlSizeAttrib=a;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function o(m,a,s){return a&&n(m.prototype,a),s&&n(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;}function _(m,a){if(!(m instanceof a))throw new TypeError("Cannot call a class as a function");}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(a&&a.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),a&&b(m,a);}function b(m,a){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}
124Object.defineProperty(r,"__esModule",{value:!0}),r.VideoComponentCoreAttributesBuilder=r.VideoComponentCoreAttributes=void 0;var p=d(49),c=function(){function m(a){return _(this,m),(a=E(this,m,[a]))._vDom=a.buildVDOM(),a;}return y(m,p.GeneralAttributes),o(m);}(),d=(r.VideoComponentCoreAttributes=c,function(){function m(a,s){return _(this,m),E(this,m,[a,s]);}return y(m,p.GeneralAttributesBuilder),o(m,[{key:"build",value:function(){return new c(this);}}]);}());r.VideoComponentCoreAttributesBuilder=d;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(){n=function(){return f;};var g,f={},v=Object.prototype,S=v.hasOwnProperty,w=Object.defineProperty||function(j,D,$){j[D]=$.value;},re=typeof Symbol=="function"?Symbol:{},C=re.iterator||"@@iterator",I=re.asyncIterator||"@@asyncIterator",O=re.toStringTag||"@@toStringTag";function M(j,D,$){return Object.defineProperty(j,D,{value:$,enumerable:!0,configurable:!0,writable:!0}),j[D];}try{M({},"");}catch{M=function(D,$,ne){return D[$]=ne;};}function N(j,he,$,_e){var le,se,fe,ge,he=he&&he.prototype instanceof V?he:V,he=Object.create(he.prototype),_e=new X(_e||[]);return w(he,"_invoke",{value:(le=j,se=$,fe=_e,ge=H,function(Re,ee){if(ge===z)throw Error("Generator is already running");if(ge===te){if(Re==="throw")throw ee;return{value:g,done:!0};}for(fe.method=Re,fe.arg=ee;;){var W=fe.delegate;if(W&&(W=function ae(de,ye){var Se=ye.method,De=de.iterator[Se];return De===g?(ye.delegate=null,Se==="throw"&&de.iterator.return&&(ye.method="return",ye.arg=g,ae(de,ye),ye.method==="throw")||Se!=="return"&&(ye.method="throw",ye.arg=new TypeError("The iterator does not provide a '"+Se+"' method")),K):(Se=G(De,de.iterator,ye.arg),Se.type==="throw"?(ye.method="throw",ye.arg=Se.arg,ye.delegate=null,K):(De=Se.arg,De?De.done?(ye[de.resultName]=De.value,ye.next=de.nextLoc,ye.method!=="return"&&(ye.method="next",ye.arg=g),ye.delegate=null,K):De:(ye.method="throw",ye.arg=new TypeError("iterator result is not an object"),ye.delegate=null,K)));}(W,fe),W)){if(W===K)continue;return W;}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(ge===H)throw ge=te,fe.arg;fe.dispatchException(fe.arg);}else fe.method==="return"&&fe.abrupt("return",fe.arg);if(ge=z,W=G(le,se,fe),W.type==="normal"){if(ge=fe.done?te:B,W.arg===K)continue;return{value:W.arg,done:fe.done};}W.type==="throw"&&(ge=te,fe.method="throw",fe.arg=W.arg);}})}),he;}function G(j,D,$){try{return{type:"normal",arg:j.call(D,$)};}catch(ne){return{type:"throw",arg:ne};}}f.wrap=N;var H="suspendedStart",B="suspendedYield",z="executing",te="completed",K={};function V(){}function U(){}function Z(){}var re={},ue=(M(re,C,function(){return this;}),Object.getPrototypeOf),ue=ue&&ue(ue(Y([]))),q=(ue&&ue!==v&&S.call(ue,C)&&(re=ue),Z.prototype=V.prototype=Object.create(re));function J(j){["next","throw","return"].forEach(function(D){M(j,D,function($){return this._invoke(D,$);});});}function oe(j,D){var $;w(this,"_invoke",{value:function(ne,le){function se(){return new D(function(fe,ge){(function he(de,Re,ee,W){var ae,de=G(j[de],j,Re);if(de.type!=="throw")return(Re=(ae=de.arg).value)&&t(Re)=="object"&&S.call(Re,"__await")?D.resolve(Re.__await).then(function(ye){he("next",ye,ee,W);},function(ye){he("throw",ye,ee,W);}):D.resolve(Re).then(function(ye){ae.value=ye,ee(ae);},function(ye){return he("throw",ye,ee,W);});W(de.arg);})(ne,le,fe,ge);});}return $=$?$.then(se,se):se();}});}function Q(j){var D={tryLoc:j[0]};1 in j&&(D.catchLoc=j[1]),2 in j&&(D.finallyLoc=j[2],D.afterLoc=j[3]),this.tryEntries.push(D);}function F(j){var D=j.completion||{};D.type="normal",delete D.arg,j.completion=D;}function X(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0);}function Y(j){if(j||j===""){var D,$=j[C];if($)return $.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length))return D=-1,($=function ne(){for(;++D<j.length;)if(S.call(j,D))return ne.value=j[D],ne.done=!1,ne;return ne.value=g,ne.done=!0,ne;}).next=$;}throw new TypeError(t(j)+" is not iterable");}return w(q,"constructor",{value:U.prototype=Z,configurable:!0}),w(Z,"constructor",{value:U,configurable:!0}),U.displayName=M(Z,O,"GeneratorFunction"),f.isGeneratorFunction=function(j){return j=typeof j=="function"&&j.constructor,!!j&&(j===U||(j.displayName||j.name)==="GeneratorFunction");},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,Z):(j.__proto__=Z,M(j,O,"GeneratorFunction")),j.prototype=Object.create(q),j;},f.awrap=function(j){return{__await:j};},J(oe.prototype),M(oe.prototype,I,function(){return this;}),f.AsyncIterator=oe,f.async=function(j,D,$,ne,le){le===void 0&&(le=Promise);var se=new oe(N(j,D,$,ne),le);return f.isGeneratorFunction(D)?se:se.next().then(function(fe){return fe.done?fe.value:se.next();});},J(q),M(q,O,"Generator"),M(q,C,function(){return this;}),M(q,"toString",function(){return"[object Generator]";}),f.keys=function(j){var D,$=Object(j),ne=[];for(D in $)ne.push(D);return ne.reverse(),function le(){for(;ne.length;){var se=ne.pop();if(se in $)return le.value=se,le.done=!1,le;}return le.done=!0,le;};},f.values=Y,X.prototype={constructor:X,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEac
vendor: 1,035 bytes, line 124
124h(F),!j)for(var D in this)D.charAt(0)==="t"&&S.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=g);},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval;},dispatchException:function(j){if(this.done)throw j;var D=this;function $(he,_e){return se.type="throw",se.arg=j,D.next=he,_e&&(D.method="next",D.arg=g),!!_e;}for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne],se=le.completion;if(le.tryLoc==="root")return $("end");if(le.tryLoc<=this.prev){var fe=S.call(le,"catchLoc"),ge=S.call(le,"finallyLoc");if(fe&&ge){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);if(this.prev<le.finallyLoc)return $(le.finallyLoc);}else if(fe){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);}else{if(!ge)throw Error("try statement without catch or finally");if(this.prev<le.finallyLoc)return $(le.finallyLoc);}}}},abrupt:function(j,D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.tryLoc<=this.prev&&S.call(ne,"finallyLoc")&&this.prev<ne.f
124inallyLoc){var le=ne;break;}}var se=(le=le&&(j==="break"||j==="continue")&&le.tryLoc<=D&&D<=le.finallyLoc?null:le)?le.completion:{};return se.type=j,se.arg=D,le?(this.method="next",this.next=le.finallyLoc,K):this.complete(se);},complete:function(j,D){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&D&&(this.next=D),K;},finish:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.finallyLoc===j)return this.complete($.completion,$.afterLoc),F($),K;}},catch:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $,ne,le=this.tryEntries[D];if(le.tryLoc===j)return($=le.completion).type==="throw"&&(ne=$.arg,F(le)),ne;}throw Error("illegal catch attempt");},delegateYield:function(j,D,$){return this.delegate={iterator:Y(j),resultName:D,nextLoc:$},this.method==="next"&&(this.arg=g),K;}},f;}function o(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}function _(g,w,v){w=y(w);var S=g,w=E()?Reflect.construct(w,v||[],y(g).constructor):w.apply(g,v);if(w&&(t(w)=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(g=S,g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g;}function E(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(E=function(){return!!g;})();}function x(g,f,v,S){var w=h(y(1&S?g.prototype:g),f,v);return 2&S?function(C){return w.apply(v,C);}:w;}function h(){return(h=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(g,f,v){var S=function(w,C){for(;!{}.hasOwnProperty.call(w,C)&&(w=y(w))!==null;);return w;}(g,f);if(S)return(S=Object.getOwnPropertyDescriptor(S,f)).get?S.get.call(arguments.length<3?g:v):S.value;}).apply(null,arguments);}function y(g){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f);})(g);}function b(g,f){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,S){return v.__proto__=S,v;})(g,f);}var p=this&&this.__awaiter||function(g,f,v,S){return new(v=v||Promise)(function(w,C){function I(N){try{M(S.next(N));}catch(G){C(G);}}function O(N){try{M(S.throw(N));}catch(G){C(G);}}function M(N){var G;N.done?w(N.value):((G=N.value)instanceof v?G:new v(function(H){H(G);})).then(I,O);}M((S=S.apply(g,f||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),l(32)),d=l(260),m=l(5),a=l(19),s=l(73),l=function(g){function f(w,C){var I;if(this instanceof f)return(I=_(this,f,[w,C]))._studioId=void 0,I.attributes=new d.ColorComponentCoreAttributesBuilder(w.attributes,I.scale).build(),I.components=s.default.createComponents(w.components,C),I.baseVDom=I.buildVDOM(),I;throw new TypeError("Cannot call a class as a function");}var v,S=f;if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");return S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),g&&b(S,g),S=f,(g=[{key:"renderHtml",value:function(w){var C=this,I=Object.create(null,{applyVisualEffects:{get:function(){return x(f,"applyVisualEffects",C,1);}}});return p(this,void 0,void 0,n().mark(function O(){var M;return n().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return M=document.createElement("div"),w.appendChild(M),this.applyStyle(M),N.next=5,I.applyVisualEffects.call(this,M);case 5:this.element=M;case 6:case"end":return N.stop();}},O,this);}));}},{key:"applyStyle",value:function(w){var C,I,O;x(f,"applyStyle",this,3)([w]),this.attributes.color&&(w.style.backgroundColor=this.attributes.color),this.attributes.background&&(I=(C=this.attributes.background).replace(/(linear|radial)-gradient/,"-webkit-$1-gradient"),O=C.replace(/(linear|radial)-gradient/,"-moz-$1-gradient"),w.style.background=C,w.style.background=I,w.style.background=O),w.style.lineHeight=this.attributes.lineHeight||"0px";}},{key:"buildVDOM",value:function(){return this.baseVDom=m.default.surpass(a.VDOMConstructor.builder(this)),x(f,"buildVDOM",this,3)([]);}},{key:"reconstructWithRecycle",value:function(){return p(this,void 0,void 0,n().mark(function w(){return n().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:case"end":return C.stop();}},w);}));}}])&&o(S.prototype,g),v&&o(S,v),Object.defineProperty(S,"prototype",{writable:!1}),S;}(c.default);r.default=l;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){if(!(m instanceof a))throw new TypeError("Cannot call a class as a function");}function o(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function _(m,a,s){return a&&o(m.prototype,a),s&&o(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}
124function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(a&&a.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),a&&b(m,a);}function b(m,a){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}Object.defineProperty(r,"__esModule",{value:!0}),r.ColorComponentCoreAttributesBuilder=r.ColorComponentCoreAttributes=void 0;var p=d(49),c=function(){function m(a){var s;return n(this,m),(s=E(this,m,[a]))._color=a.color,s._background=a.background,s._lineHeight=a.lineHeight,s._vDom=s.buildVDOM(),s;}return y(m,p.GeneralAttributes),_(m,[{key:"color",get:function(){return this._color;}},{key:"background",get:function(){return this._background;}},{key:"lineHeight",get:function(){return this._lineHeight;}}]);}(),d=(r.ColorComponentCoreAttributes=c,function(){function m(a,s){return n(this,m),(s=E(this,m,[a,s]))._color=a.color||"#000000",s._background=a.background||void 0,s._lineHeight=a.lineHeight||void 0,s;}return y(m,p.GeneralAttributesBuilder),_(m,[{key:"color",get:function(){return this._color;}},{key:"background",get:function(){return this._background;}},{key:"lineHeight",get:function(){return this._lineHeight;}},{key:"build",value:function(){return new c(this);}}]);}());r.ColorComponentCoreAttributesBuilder=d;},function(i,r,S){"use strict";function t(w){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C;}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C;})(w);}function n(){n=function(){return C;};var w,C={},I=Object.prototype,O=I.hasOwnProperty,M=Object.defineProperty||function(le,se,fe){le[se]=fe.value;},oe=typeof Symbol=="function"?Symbol:{},N=oe.iterator||"@@iterator",G=oe.asyncIterator||"@@asyncIterator",H=oe.toStringTag||"@@toStringTag";function B(le,se,fe){return Object.defineProperty(le,se,{value:fe,enumerable:!0,configurable:!0,writable:!0}),le[se];}try{B({},"");}catch{B=function(se,fe,ge){return se[fe]=ge;};}function z(le,W,fe,ae){var he,_e,Re,ee,W=W&&W.prototype instanceof ue?W:ue,W=Object.create(W.prototype),ae=new $(ae||[]);return M(W,"_invoke",{value:(he=le,_e=fe,Re=ae,ee=K,function(de,ye){if(ee===U)throw Error("Generator is already running");if(ee===Z){if(de==="throw")throw ye;return{value:w,done:!0};}for(Re.method=de,Re.arg=ye;;){var Se=Re.delegate;if(Se&&(Se=function De(Ue,Be){var nt=Be.method,it=Ue.iterator[nt];return it===w?(Be.delegate=null,nt==="throw"&&Ue.iterator.return&&(Be.method="return",Be.arg=w,De(Ue,Be),Be.method==="throw")||nt!=="return"&&(Be.method="throw",Be.arg=new TypeError("The iterator does not provide a '"+nt+"' method")),re):(nt=te(it,Ue.iterator,Be.arg),nt.type==="throw"?(Be.method="throw",Be.arg=nt.arg,Be.delegate=null,re):(it=nt.arg,it?it.done?(Be[Ue.resultName]=it.value,Be.next=Ue.nextLoc,Be.method!=="return"&&(Be.method="next",Be.arg=w),Be.delegate=null,re):it:(Be.method="throw",Be.arg=new TypeError("iterator result is not an object"),Be.delegate=null,re)));}(Se,Re),Se)){if(Se===re)continue;return Se;}if(Re.method==="next")Re.sent=Re._sent=Re.arg;else if(Re.method==="throw"){if(ee===K)throw ee=Z,Re.arg;Re.dispatchException(Re.arg);}else Re.method==="return"&&Re.abrupt("return",Re.arg);if(ee=U,Se=te(he,_e,Re),Se.type==="normal"){if(ee=Re.done?Z:V,Se.arg===re)continue;return{value:Se.arg,done:Re.done};}Se.type==="throw"&&(ee=Z,Re.method="throw",Re.arg=Se.arg);}})}),W;}function te(le,se,fe){try{return{type:"normal",arg:le.call(se,fe)};}catch(ge){return{type:"throw",arg:ge};}}C.wrap=z;var K="suspendedStart",V="suspendedYield",U="executing",Z="completed",re={};function ue(){}function q(){}function J(){}var oe={},Q=(B(oe,N,function(){return this;}),Object.getPrototypeOf),Q=Q&&Q(Q(ne([]))),F=(Q&&Q!==I&&O.call(Q,N)&&(oe=Q),J.prototype=ue.prototype=Object.create(oe));function X(le){["next","throw","return"].forEach(function(se){B(le,se,function(fe){return this._invoke(se,fe);});});}function Y(le,se){var fe;M(this,"_invoke",{value:function(ge,he){function _e(){return new se(function(Re,ee){(function W(Ue,de,ye,Se){var De,Ue=te(le[Ue],le,de);if(Ue.type!=="throw")return(de=(De=Ue.arg).value)&&t(de)=="object"&&O.call(de,"__await")?se.resolve(de.__await).then(function(Be){W("next",Be,ye,Se);},function(Be){W("throw",Be,ye,Se);}):se.resolve(de).then(function(Be){De.value=Be,ye(De);},function(Be){return W("throw",Be,ye,Se);});Se(Ue.arg);})(ge,he,Re,ee);});}return fe=fe?fe.then(_e,_e):_e();}});}function j(le){var se={tryLoc:le[0]};
1241 in le&&(se.catchLoc=le[1]),2 in le&&(se.finallyLoc=le[2],se.afterLoc=le[3]),this.tryEntries.push(se);}function D(le){var se=le.completion||{};se.type="normal",delete se.arg,le.completion=se;}function $(le){this.tryEntries=[{tryLoc:"root"}],le.forEach(j,this),this.reset(!0);}function ne(le){if(le||le===""){var se,fe=le[N];if(fe)return fe.call(le);if(typeof le.next=="function")return le;if(!isNaN(le.length))return se=-1,(fe=function ge(){for(;++se<le.length;)if(O.call(le,se))return ge.value=le[se],ge.done=!1,ge;return ge.value=w,ge.done=!0,ge;}).next=fe;}throw new TypeError(t(le)+" is not iterable");}return M(F,"constructor",{value:q.prototype=J,configurable:!0}),M(J,"constructor",{value:q,configurable:!0}),q.displayName=B(J,H,"GeneratorFunction"),C.isGeneratorFunction=function(le){return le=typeof le=="function"&&le.constructor,!!le&&(le===q||(le.displayName||le.name)==="GeneratorFunction");},C.mark=function(le){return Object.setPrototypeOf?Object.setPrototypeOf(le,J):(le.__proto__=J,B(le,H,"GeneratorFunction")),le.prototype=Object.create(F),le;},C.awrap=function(le){return{__await:le};},X(Y.prototype),B(Y.prototype,G,function(){return this;}),C.AsyncIterator=Y,C.async=function(le,se,fe,ge,he){he===void 0&&(he=Promise);var _e=new Y(z(le,se,fe,ge),he);return C.isGeneratorFunction(se)?_e:_e.next().then(function(Re){return Re.done?Re.value:_e.next();});},X(F),B(F,H,"Generator"),B(F,N,function(){return this;}),B(F,"toString",function(){return"[object Generator]";}),C.keys=function(le){var se,fe=Object(le),ge=[];for(se in fe)ge.push(se);return ge.reverse(),function he(){for(;ge.length;){var _e=ge.pop();if(_e in fe)return he.value=_e,he.done=!1,he;}return he.done=!0,he;};},C.values=ne,$.prototype={constructor:$,reset:function(le){if(this.prev=0,this.next=0,this.sent=this._sent=w,this.done=!1,this.delegate=null,this.method="next",this.arg=w,this.tryEntries.forEach(D),!le)for(var se in this)se.charAt(0)==="t"&&O.call(this,se)&&!isNaN(+se.slice(1))&&(this[se]=w);},stop:function(){this.done=!0;var le=this.tryEntries[0].completion;if(le.type==="throw")throw le.arg;return this.rval;},dispatchException:function(le){if(this.done)throw le;var se=this;function fe(W,ae){return _e.type="throw",_e.arg=le,se.next=W,ae&&(se.method="next",se.arg=w),!!ae;}for(var ge=this.tryEntries.length-1;0<=ge;--ge){var he=this.tryEntries[ge],_e=he.completion;if(he.tryLoc==="root")return fe("end");if(he.tryLoc<=this.prev){var Re=O.call(he,"catchLoc"),ee=O.call(he,"finallyLoc");if(Re&&ee){if(this.prev<he.catchLoc)return fe(he.catchLoc,!0);if(this.prev<he.finallyLoc)return fe(he.finallyLoc);}else if(Re){if(this.prev<he.catchLoc)return fe(he.catchLoc,!0);}else{if(!ee)throw Error("try statement without catch or finally");if(this.prev<he.finallyLoc)return fe(he.finallyLoc);}}}},abrupt:function(le,se){for(var fe=this.tryEntries.length-1;0<=fe;--fe){var ge=this.tryEntries[fe];if(ge.tryLoc<=this.prev&&O.call(ge,"finallyLoc")&&this.prev<ge.finallyLoc){var he=ge;break;}}var _e=(he=he&&(le==="break"||le==="continue")&&he.tryLoc<=se&&se<=he.finallyLoc?null:he)?he.completion:{};return _e.type=le,_e.arg=se,he?(this.method="next",this.next=he.finallyLoc,re):this.complete(_e);},complete:function(le,se){if(le.type==="throw")throw le.arg;return le.type==="break"||le.type==="continue"?this.next=le.arg:le.type==="return"?(this.rval=this.arg=le.arg,this.method="return",this.next="end"):le.type==="normal"&&se&&(this.next=se),re;},finish:function(le){for(var se=this.tryEntries.length-1;0<=se;--se){var fe=this.tryEntries[se];if(fe.finallyLoc===le)return this.complete(fe.completion,fe.afterLoc),D(fe),re;}},catch:function(le){for(var se=this.tryEntries.length-1;0<=se;--se){var fe,ge,he=this.tryEntries[se];if(he.tryLoc===le)return(fe=he.completion).type==="throw"&&(ge=fe.arg,D(he)),ge;}throw Error("illegal catch attempt");},delegateYield:function(le,se,fe){return this.delegate={iterator:ne(le),resultName:se,nextLoc:fe},this.method==="next"&&(this.arg=w),re;}},C;}function o(w,C){var I,O=typeof Symbol<"u"&&w[Symbol.iterator]||w["@@iterator"];
124if(!O){if(Array.isArray(w)||(O=function(H,B){if(H){if(typeof H=="string")return _(H,B);var z={}.toString.call(H).slice(8,-1);return(z=z==="Object"&&H.constructor?H.constructor.name:z)==="Map"||z==="Set"?Array.from(H):z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z)?_(H,B):void 0;}}(w))||C&&w&&typeof w.length=="number")return O&&(w=O),I=0,{s:C=function(){},n:function(){return I>=w.length?{done:!0}:{done:!1,value:w[I++]};},e:function(H){throw H;},f:C};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 125In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var M,N=!0,G=!1;return{s:function(){O=O.call(w);},n:function(){var H=O.next();return N=H.done,H;},e:function(H){G=!0,M=H;},f:function(){try{N||O.return==null||O.return();}finally{if(G)throw M;}}};}function _(w,C){(C==null||C>w.length)&&(C=w.length);for(var I=0,O=Array(C);I<C;I++)O[I]=w[I];return O;}function E(w,C){for(var I=0;I<C.length;I++){var O=C[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(w,function(M){return M=function(N,G){if(t(N)!="object"||!N)return N;var H=N[Symbol.toPrimitive];if(H===void 0)return(G==="string"?String:Number)(N);if(H=H.call(N,G||"default"),t(H)!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.");}(M,"string"),t(M)=="symbol"?M:M+"";}(O.key),O);}}function x(w,M,I){M=p(M);var O=w,M=h()?Reflect.construct(M,I||[],p(w).constructor):M.apply(w,I);if(M&&(t(M)=="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(w=O,w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w;}function h(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!w;})();}function y(w,C,I,O){var M=b(p(1&O?w.prototype:w),C,I);return 2&O?function(N){return M.apply(I,N);}:M;}function b(){return(b=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(w,C,I){var O=function(M,N){for(;!{}.hasOwnProperty.call(M,N)&&(M=p(M))!==null;);return M;}(w,C);if(O)return(O=Object.getOwnPropertyDescriptor(O,C)).get?O.get.call(arguments.length<3?w:I):O.value;}).apply(null,arguments);}function p(w){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(C){return C.__proto__||Object.getPrototypeOf(C);})(w);}function c(w,C){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(I,O){return I.__proto__=O,I;})(w,C);}var d=this&&this.__awaiter||function(w,C,I,O){return new(I=I||Promise)(function(M,N){function G(z){try{B(O.next(z));}catch(te){N(te);}}function H(z){try{B(O.throw(z));}catch(te){N(te);}}function B(z){var te;z.done?M(z.value):((te=z.value)instanceof I?te:new I(function(K){K(te);})).then(G,H);}B((O=O.apply(w,C||[])).next());});},m=(Object.defineProperty(r,"__esModule",{value:!0}),S(32)),a=S(308),s=S(262),l=S(5),g=S(264),f=S(19),v=S(265),S=function(w){function C(M,N){if(!(this instanceof C))throw new TypeError("Cannot call a class as a function");var G=x(this,C,[M,N]),H=N.scale||1,B=M.attributes.xAlignment||"left";if(G.attributes=new s.TextContainerComponentCoreAttributesBuilder(M.attributes,H).setPadding(M.attributes.padding).setXAlignment(B).build(),G.annotations=new a.TextContainerAnnotations(M.textAnnotations,G.scale),G.textComponents=[],M.components){var z,te=o(M.subComponents);try{for(te.s();!(z=te.n()).done;){var K=z.value,V=new v.default(K,G.annotations,B,G.scale,N);V&&G.textComponents.push(V);}}catch(U){te.e(U);}finally{te.f();}}return G.element=document.createElement("div"),G.fontsStyle=document.createElement("style"),G.baseVDom=G.buildVDOM(),G;}var I,O=C;if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");return O.prototype=Object.create(w&&w.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),w&&c(O,w),O=C,(w=[{key:"renderHtml",value:function(M){return d(this,void 0,void 0,n().mark(function N(){return n().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:M.appendChild(this.element);case 1:case"end":return G.stop();}},N,this);}));}},{key:"renderHtmlRecursively",value:function(){return d(this,void 0,void 0,n().mark(function M(){return n().wrap(function(N){for(;;
125)switch(N.prev=N.next){case 0:return this.propagateAttributes(void 0),N.next=3,this.renderComponents();case 3:return N.next=5,this.applyVisualEffects(this.element,{isRtlLayout:this._isRtlLayout});case 5:case"end":return N.stop();}},M,this);}));}},{key:"propagateAttributes",value:function(M){var N,G=o(this.textComponents);try{for(G.s();!(N=G.n()).done;){var H=N.value;this.handlePropAtts(H);}}catch(B){G.e(B);}finally{G.f();}}},{key:"renderComponents",value:function(){return d(this,void 0,void 0,n().mark(function M(){var N,G,H,B,z,te;return n().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:this.attributes.whiteSpace&&(this.element.style.whiteSpace=this.attributes.whiteSpace),N=this.attributes.widthVal,G=this.attributes.heightVal,B=H=0,z=o(this.textComponents),K.prev=6,z.s();case 8:if((te=z.n()).done){K.next=16;break;}return te=te.value,K.next=12,te.renderHtml(this.element);case 12:H=Math.max(H,te.width),B+=te.height;case 14:K.next=8;break;case 16:K.next=21;break;case 18:K.prev=18,K.t0=K.catch(6),z.e(K.t0);case 21:return K.prev=21,z.f(),K.finish(21);case 24:N?this.attributes.setWidth(N):this.attributes.setWidth(H),G?this.attributes.setHeight(G):this.attributes.setHeight(B),this.attributes.fitContent&&(this.attributes.setWidth(0),this.attributes.setHeight(0)),this.applyStyle(),g.default.parse(this.element,{callback:function(V,U){switch(V){case"a9":case"ae"
125:case"2122":return!1;}return"".concat(U.base,U.size.toString(),"/",V,U.ext);}});case 29:case"end":return K.stop();}},M,this,[[6,18,21,24]]);}));}},{key:"applyStyle",value:function(){y(C,"applyStyle",this,3)([this.element]),this.attributes.widthVal===0&&this.element.style.removeProperty("width"),this.attributes.heightVal===0&&this.element.style.removeProperty("height"),this.attributes.padding&&(this.element.style.padding=l.default.scaleWithFormat(this.attributes.padding.toString(),this.scale)),this.attributes.color&&(this.element.style.backgroundColor=this.attributes.color),this.element.style.textAlign=this.attributes.xAlignment,this.attributes.whiteSpace&&(this.element.style.whiteSpace=this.attributes.whiteSpace);}},{key:"reconstructWithRecycle",value:function(){return d(this,void 0,void 0,n().mark(function M(){var N;return n().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(l.default.debug("Entering Text Container special assignments"),this.element&&this.element.hasChildNodes())for(N=0;N<this.element.childNodes.length;N++)this.textComponents[N].element=this.element.childNodes[N],this.textComponents[N].clearAssignStyle();l.default.debug("Finished Assigning Text Container special Assignments!");case 3:case"end":return G.stop();}},M,this);}));}},{key:"buildVDOM",value:function(){return this.baseVDom=l.default.surpass(f.VDOMConstructor.builder(this)),y(C,"buildVDOM",this,3)([]);}}])&&E(O.prototype,w),I&&E(O,I),Object.defineProperty(O,"prototype",{writable:!1}),O;}(m.default);r.default=S;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.TextContainerComponentCoreAttributesBuilder=r.TextContainerComponentCoreAttributes=void 0;var p=m(49),c=m(263),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._padding=s.padding,l._xAlignment=s.xAlignment,l._color=s.color,l._whiteSpace=s.whiteSpace,l._vDom=l.buildVDOM(),l;}return y(a,p.GeneralAttributes),_(a,[{key:"color",get:function(){return this._color;}},{key:"padding",get:function(){return this._padding;}},{key:"xAlignment",get:function(){return this._xAlignment;}},{key:"whiteSpace",get:function(){return this._whiteSpace;}}]);}(),m=(r.TextContainerComponentCoreAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._color=void 0,l._xAlignment="left",l._whiteSpace=void 0,s.hasOwnProperty("color")&&(l._color=s.color),s.hasOwnProperty("padding")&&(l._padding=new c.Padding(s.padding)),s.hasOwnProperty("whiteSpace")&&typeof s.whiteSpace=="string"&&(l._whiteSpace=s.whiteSpace),l;}
125return y(a,p.GeneralAttributesBuilder),_(a,[{key:"color",get:function(){return this._color;}},{key:"setColor",value:function(s){return this._color=s,this;}},{key:"padding",get:function(){return this._padding;}},{key:"setPadding",value:function(s){return s&&(this._padding=new c.Padding(s)),this;}},{key:"xAlignment",get:function(){return this._xAlignment;}},{key:"setXAlignment",value:function(s){var l="left";return(s=s.toLowerCase())!=="left"&&s!=="center"&&s!=="right"||(l=s),this._xAlignment=l,this;}},{key:"whiteSpace",get:function(){return this._whiteSpace;},set:function(s){this._whiteSpace=s;}},{key:"build",value:function(){return new d(this);}}]);}());r.TextContainerComponentCoreAttributesBuilder=m;},function(i,r,e){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){return function(y){if(Array.isArray(y))return y;}(x)||function(y,b){var p=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(p!=null){var c,d,m,a,s=[],l=!0,g=!1;try{if(m=(p=p.call(y)).next,b===0){if(Object(p)!==p)return;l=!1;}else for(;!(l=(c=m.call(p)).done)&&(s.push(c.value),s.length!==b);l=!0);}catch(f){g=!0,d=f;}finally{try{if(!l&&p.return!=null&&(a=p.return(),Object(a)!==a))return;}finally{if(g)throw d;}}return s;}}(x,h)||function(y,b){if(y){if(typeof y=="string")return o(y,b);var p={}.toString.call(y).slice(8,-1);return(p=p==="Object"&&y.constructor?y.constructor.name:p)==="Map"||p==="Set"?Array.from(y):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?o(y,b):void 0;}}(x,h)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 126In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(x,h){(h==null||h>x.length)&&(h=x.length);for(var y=0,b=Array(h);y<h;y++)b[y]=x[y];return b;}function _(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.Padding=void 0;var E=function(){function x(p){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this.top=this.right=this.bottom=this.left="";var c=[];switch(typeof p=="string"?c=p.split(" "):Array.isArray(p)&&(c=p),c.length){case 4:var d=n(c,4);this.top=d[0],this.right=d[1],this.bottom=d[2],this.left=d[3];break;case 3:this.top=c[0],this.right=c[1],this.bottom=c[2],this.left=c[1];break;case 2:this.top=c[0],this.right=c[1],this.bottom=c[0],this.left=c[1];break;case 1:this.top=c[0],this.right=c[0],this.bottom=c[0],this.left=c[0];}}return h=x,(y=[{key:"toString",value:function(){return[this.top,this.right,this.bottom,this.left].join(" ");}}])&&_(h.prototype,y),b&&_(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.Padding=E;},function(i,r,b){"use strict";b.r(r),t={base:"https://twemoji.maxcdn.com/v/13.1.1/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(g){return g=typeof g=="string"?parseInt(g,16):g,g<65536?y(g):y(55296+((g-=65536)>>10),56320+(1023&g));},toCodePoint:l},onerror:function(){this.parentNode&&this.parentNode.replaceChild(p(this.alt,!1),this);},parse:function(g,f){return f&&typeof f!="function"||(f={callback:f}),(typeof g=="string"?function(v,S){return s(v,function(w){var C,I,O=w,M=d(w),N=S.callback(M,S);if(M&&N){for(I in O="<img ".concat('class="',S.className,'" ','draggable="false" ','alt="',w,'"',' src="',N,'"'),C=S.attributes(w,M))C.hasOwnProperty(I)&&I.indexOf("on")!==0&&O.indexOf(" "+I+"=")===-1&&(O=O.concat(" ",I,'="',C[I].replace(x,m),'"'));O=O.concat("/>");}return O;});}:function(v,S){for(var w,C,I,O,M,N,G,H,B,z,te,K=function U(Z,re){for(var ue,q,J=Z.childNodes,oe=J.length;oe--;)ue=J[oe],(q=ue.nodeType)===3?re.push(ue):q!==1||("ownerSVGElement"in ue)||h.test(ue.nodeName.toLowerCase())||U(ue,re);return re;}(v,[]),V=K.length;V--;){for(I=!1,O=document.createDocumentFragment(),M=K[V],N=M.nodeValue,G=0;B=o.exec(N);){if((te=B.index)!==G&&O.appendChild(p(N.slice(G,te),!0)),B=B[0],z=d(B),G=te+B.length,te=S.callback(z,S),z&&te){for(C in(H=new Image()).onerror=S.onerror,H.setAttribute("draggable","false"),w=S.attributes(B,z))w.hasOwnProperty(C)&&C.indexOf("on")!==0&&!H.hasAttribute(C)&&H.setAttribute(C,w[C]);
126H.className=S.className,H.alt=B,H.src=te,I=!0,O.appendChild(H);}H||O.appendChild(p(B,!1)),H=null;}I&&(G<N.length&&O.appendChild(p(N.slice(G),!0)),M.parentNode.replaceChild(O,M));}return v;})(g,{callback:f.callback||c,attributes:typeof f.attributes=="function"?f.attributes:a,base:(typeof f.base=="string"?f:t).base,ext:f.ext||t.ext,size:f.folder||function(v){return typeof v=="number"?v+"x"+v:v;}(f.size||t.size),className:f.className||t.className,onerror:f.onerror||t.onerror});},replace:s,test:function(g){return o.lastIndex=0,g=o.test(g),o.lastIndex=0,g;}},n={"&":"&","<":"<",">":">","'":"'",'"':"""},o=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u23
1261a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde
126-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,_=/\uFE0F/g,E="\u200D",x=/[&<>'"]/g,h=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,y=String.fromCharCode;var t,n,o,_,E,x,h,y,b=t;function p(g,f){return document.createTextNode(f?g.replace(_,""):g);}function c(g,f){return"".concat(f.base,f.size,"/",g,f.ext);}function d(g){return l(g.indexOf(E)<0?g.replace(_,""):g);}function m(g){return n[g];}function a(){return null;}function s(g,f){return String(g).replace(o,f);}function l(g,f){for(var v=[],S=0,w=0,C=0;C<g.length;)S=g.charCodeAt(C++),w?(v.push((65536+(w-55296<<10)+(S-56320)).toString(16)),w=0):55296<=S&&S<=56319?w=S:v.push(S.toString(16));return v.join(f||"-");}r.default=b;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(){n=function(){return s;};var a,s={},l=Object.prototype,g=l.hasOwnProperty,f=Object.defineProperty||function(F,X,Y){F[X]=Y.value;},V=typeof Symbol=="function"?Symbol:{},v=V.iterator||"@@iterator",S=V.asyncIterator||"@@asyncIterator",w=V.toStringTag||"@@toStringTag";function C(F,X,Y){return Object.defineProperty(F,X,{value:Y,enumerable:!0,configurable:!0,writable:!0}),F[X];}try{C({},"");}catch{C=function(X,Y,j){return X[Y]=j;};}function I(F,se,Y,fe){var D,$,ne,le,se=se&&se.prototype instanceof z?se:z,se=Object.create(se.prototype),fe=new oe(fe||[]);return f(se,"_invoke",{value:(D=F,$=Y,ne=fe,le=M,function(ge,he){if(le===G)throw Error("Generator is already running");if(le===H){if(ge==="throw")throw he;return{value:a,done:!0};}for(ne.method=ge,ne.arg=he;;){var _e=ne.delegate;if(_e&&(_e=function Re(ee,W){var ae=W.method,de=ee.iterator[ae];return de===a?(W.delegate=null,ae==="throw"&&ee.iterator.return&&(W.method="return",W.arg=a,Re(ee,W),W.method==="throw")||ae!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),B):(ae=O(de,ee.iterator,W.arg),ae.type==="throw"?(W.method="throw",W.arg=ae.arg,W.delegate=null,B):(de=ae.arg,de?de.done?(W[ee.resultName]=de.value,W.next=ee.nextLoc,W.method!=="return"&&(W.method="next",W.arg=a),W.delegate=null,B):de:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,B)));}(_e,ne),_e)){if(_e===B)continue;return _e;}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(le===M)throw le=H,ne.arg;ne.dispatchException(ne.arg);}else ne.method==="return"&&ne.abrupt("return",ne.arg);if(le=G,_e=O(D,$,ne),_e.type==="normal"){if(le=ne.done?H:N,_e.arg===B)continue;return{value:_e.arg,done:ne.done};}_e.type==="throw"&&(le=H,ne.method="throw",ne.arg=_e.arg);}})}),se;}function O(F,X,Y){try{return{type:"normal",arg:F.call(X,Y)};}catch(j){return{type:"throw",arg:j};}}s.wrap=I;var M="suspendedStart",N="suspendedYield",G="executing",H="completed",B={};function z(){}function te(){}function K(){}var V={},U=(C(V,v,function(){return this;}),Object.getPrototypeOf),U=U&&U(U(Q([]))),Z=(U&&U!==l&&g.call(U,v)&&(V=U),K.prototype=z.prototype=Object.create(V));function re(F){["next","throw","return"].forEach(function(X){C(F,X,function(Y){return this._invoke(X,Y);});});}function ue(F,X){var Y;f(this,"_invoke",{value:function(j,D){function $(){return new X(function(ne,le){(function se(ee,ge,he,_e){var Re,ee=O(F[ee],F,ge);if(ee.type!=="throw")return(ge=(Re=ee.arg).value)&&t(ge)=="object"&&g.call(ge,"__await")?X.resolve(ge.__await).then(function(W){se("next",W,he,_e);},function(W){se("throw",W,he,_e);}):X.resolve(ge).then(function(W){Re.value=W,he(Re);},function(W){return se("throw",W,he,_e);});_e(ee.arg);})(j,D,ne,le);});}return Y=Y?Y.then($,$):$();}});}function q(F){var X={tryLoc:F[0]};1 in F&&(X.catchLoc=F[1]),2 in F&&(X.finallyLoc=F[2],X.afterLoc=F[3]),this.tryEntries.push(X);}function J(F){var X=F.completion||{};X.type="normal",delete X.arg,F.completion=X;}function oe(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(q,this),this.reset(!0);}function Q(F){if(F||F===""){var X,Y=F[v];if(Y)return Y.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length))return X=-1,(Y=function j(){for(;++X<F.length;)if(g.call(F,X))return j.value=F[X],j.done=!1,j;return j.value=a,j.done=!0,j;}).next=Y;}throw new TypeError(t(F)+" is not iterable");}return f(Z,"constructor",{value:te.prototype=K,configurable:!0}),f(K,"constructor",{value:te,configurable:!0}),te.displayName=C(K,w,"GeneratorFunction"),s.isGeneratorFunction=function(F){return F=typeof F=="function"&&F.constructor,!!F&&(F===te||(F.displayName||F.name)==="GeneratorFunction");},s.mark=function(F){return Object.setPrototypeOf?Object.setPrototypeOf(F,K):(F.__proto__=K,C(F,w,"GeneratorFunction")),F.prototype=Object.create(Z),F;},s.awrap=function(F){return{__await:F};},re(ue.prototype),C(ue.prototype,S,function(){return this;}),s.AsyncIterator=ue,s.async=function(F,X,Y,j,D){D===void 0&&(D=Promise);var $=new ue(I(F,X,Y,j),D);return s.isGeneratorFunction(X)?$:$.next().then(function(ne){return ne.done?ne.value:$.next();});},re(Z),C(Z,w,"Generator"),C(Z,v,function(){return this;}),C(Z,"toString",function(){return"[object Generator]";}),s.keys=function(F){var X,Y=Object(F),j=[];for(X in Y)j.push(X);return j.reverse(),function D(){for(;j.length;){var $=j.pop();if($ in Y)return D.value=$,D.done=!1,D;}return D.done=!0,D;};},s.values=Q,oe.prototype={constructor:oe,reset:function(F){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEac
126h(J),!F)for(var X in this)X.charAt(0)==="t"&&g.call(this,X)&&!isNaN(+X.slice(1))&&(this[X]=a);},stop:function(){this.done=!0;var F=this.tryEntries[0].completion;if(F.type==="throw")throw F.arg;return this.rval;},dispatchException:function(F){if(this.done)throw F;var X=this;function Y(se,fe){return $.type="throw",$.arg=F,X.next=se,fe&&(X.method="next",X.arg=a),!!fe;}for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j],$=D.completion;if(D.tryLoc==="root")return Y("end");if(D.tryLoc<=this.prev){var ne=g.call(D,"catchLoc"),le=g.call(D,"finallyLoc");if(ne&&le){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}else if(ne){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);}else{if(!le)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}}}},abrupt:function(F,X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y];if(j.tryLoc<=this.prev&&g.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var D=j;break;}}var $=(D=D&&(F==="break"||F==="continue")&&D.tryLoc<=X&&X<=D.finallyLoc?null:D)?D.completion:{};return $.type=F,$.arg=X,D?(this.method="next",this.next=D.finallyLoc,B):this.complete($);},complete:function(F,X){if(F.type==="throw")throw F.arg;return F.type==="break"||F.type==="continue"?this.next=F.arg:F.type==="return"?(this.rval=this.arg=F.arg,this.method="return",this.next="end"):F.type==="normal"&&X&&(this.next=X),B;},finish:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X];if(Y.finallyLoc===F)return this.complete(Y.completion,Y.afterLoc),J(Y),B;}},catch:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y,j,D=this.tryEntries[X];if(D.tryLoc===F)return(Y=D.completion).type==="throw"&&(j=Y.arg,J(D)),j;}throw Error("illegal catch attempt");},delegateYield:function(F,X,Y){return this.delegate={iterator:Q(F),resultName:X,nextLoc:Y},this.method==="next"&&(this.arg=a),B;}},s;}function o(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=E(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 127In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function _(a,s){return function(l){if(Array.isArray(l))return l;}(a)||function(l,g){var f=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(f!=null){var v,S,w,C,I=[],O=!0,M=!1;try{if(w=(f=f.call(l)).next,g===0){if(Object(f)!==f)return;O=!1;}else for(;!(O=(v=w.call(f)).done)&&(I.push(v.value),I.length!==g);O=!0);}catch(N){M=!0,S=N;}finally{try{if(!O&&f.return!=null&&(C=f.return(),Object(C)!==C))return;}finally{if(M)throw S;}}return I;}}(a,s)||E(a,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 128In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function E(a,s){if(a){if(typeof a=="string")return x(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?x(a,s):void 0;}}function x(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function h(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}
128var y=this&&this.__awaiter||function(a,s,l,g){return new(l=l||Promise)(function(f,v){function S(I){try{C(g.next(I));}catch(O){v(O);}}function w(I){try{C(g.throw(I));}catch(O){v(O);}}function C(I){var O;I.done?f(I.value):((O=I.value)instanceof l?O:new l(function(M){M(O);})).then(S,w);}C((g=g.apply(a,s||[])).next());});},b=(Object.defineProperty(r,"__esModule",{value:!0}),m(266)),p=m(5),c=m(19),d=m(70),m=function(){function a(f,v,S,w,C){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.id=f.id,this.scaleFactor=w,this.annotations=v,this.minFontSize=this.scale(10),this.maxFontSize=1e3,w=new b.TextComponentCoreAttributesBuilder(f.attributes,this.scaleFactor),w.setXAlignment(S),this.attributes=w.build(),this._width=this.attributes.maxWidthVal,this._height=this.attributes.maxHeightVal,this.maxWidth=this.attributes.maxWidthVal,this.maxHeight=this.attributes.maxHeightVal,this.attributes.maxFontSize&&(this.maxFontSize=this.attributes.maxFontSize),v=_(d.CorePreviewerUtils.generateCoreEffects(f.effects,this.scaleFactor),2),this._visualEffects=v[0],this._animationEffects=v[1],this.vDOM=this.buildVDOM();}return s=a,(l=[{key:"scale",value:function(f){return p.default.scale(f,this.scaleFactor);}},{key:"renderHtml",value:function(f){return y(this,void 0,void 0,n().mark(function v(){var S,w,C,I,O,M,N,G,H;return n().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return this._element=document.createElement("div"),this._element.style.width="max-content",this._element.style.height="max-content",this._element.style.boxSizing="border-box",f.appendChild(this._element),S=document.createElement("span"),this._element.appendChild(S),B.next=9,this.setContainerStyle(this._element);case 9:return B.next=11,d.CorePreviewerUtils.applyVisualEffects(this.element,this._visualEffects);case 11:return B.next=13,this.setTextStyle(S);case 13:return B.next=15,this.buildSections(S);case 15:w=[],C=0;case 17:if(C<this.annotations.length)return B.t0=w,B.next=21,this.annotations.getAnnotation(C);B.next=26;break;case 21:B.t1=B.sent,B.t0.push.call(B.t0,B.t1);case 23:C++,B.next=17;break;case 26:I=o(this._animationEffects),B.prev=27,I.s();case 29:if((O=I.n()).done){B.next=37;break;}if((O=O.value).buildTextSections)return M={textElement:S,annotations:w,sections:this.attributes.sections,segmentation:this.attributes.segmentation},B.next=35,O.buildTextSections(M);B.next=35;break;case 35:B.next=29;break;case 37:B.next=42;break;case 39:B.prev=39,B.t2=B.catch(27),I.e(B.t2);case 42:return B.prev=42,I.f(),B.finish(42);case 45:return B.next=47,this.annotations.getAnnotation(0);case 47:O=B.sent,(M=this.attributes.fontSize||O.fontSize||0)?S.style.fontSize="".concat(M,"px"):(this._element.style.width="auto",this._element.style.height="auto",M=this.calculateFontSize(S),N=S.getBoundingClientRect(),this._element.style.width="".concat(N.width,"px"),this._element.style.height="".concat(N.height,"px"),p.default.debug("element.offsetWidth: ".concat(S.offsetWidth,", element.offsetHeight: ").concat(S.offsetHeight," , finalFont size: ").concat(M)),S.style.fontSize="calc(".concat(M,"px) ")),N=S.getBoundingClientRect(),S.style.removeProperty("box-sizing"),this._element.style.removeProperty("box-sizing"),N.width=Math.ceil(100*(N.width+.01+Number.EPSILON))/100,N.height=Math.ceil(100*(N.height+.01+Number.EPSILON))/100,G=S.style.display,H=S.style.whiteSpace,S.style.display="inline-block",S.style.whiteSpace="pre-wrap",S.style.width="".concat(N.width,"px"),S.style.height="".concat(N.height,"px"),this._width=Math.max(N.width,this._element.offsetWidth),this._height=Math.max(N.height,this._element.offsetHeight),this._width=Math.min(this._width,this.maxWidth),this._height=Math.min(this._height,this.maxHeight),S.style.display=G,S.style.whiteSpace=H,this._element.style.width="".concat(this._width,"px"),this._element.style.height="".concat(this._height,"px");case 69:case"end":return B.stop();}},v,this,[[27,39,42,45]]);}));}},{key:"setContainerStyle",value:function(f){return y(this,void 0,void 0,n().mark(function v(){var S,w,C,I,O,M,N,G,H;return n().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return S=function(z,te){switch(te){case"left":z.marginLeft=0,z.marginRight="auto";break;case"center":z.marginLeft="auto",z.marginRight="auto";break;case"right":z.marginLeft="auto",z.marginRight=0;}},f.style.margin="0px",S(this._element.style,this.attributes.xAlignment),f.style.visibility="hidden",f.style.fontSize="0",f.style.maxWidth="".concat(this.maxWidth,"px"),f.style.maxHeight="".concat(this.maxHeight,"px"),B.next=9,this.annotations.getAnnotation(0);case 9:if(S=B.sent,(N=S.lineHeight||this.attributes.lineHeight||0)&&(f.style.lineHeight="".concat(N)),S.letterSpacing&&(f.
128style.letterSpacing="".concat(S.letterSpacing)),this.attributes.textTransform&&(f.style.textTransform=this.attributes.textTransform),this.attributes.cssStyleDeclarations){w=o(this.attributes.cssStyleDeclarations);try{for(w.s();!(C=w.n()).done;)I=C.value,O=Object.keys(I)[0],M=p.default.scaleWithFormat(I[O],this.scaleFactor,O),f.style[O]=M;}catch(z){w.e(z);}finally{w.f();}}this.attributes.scale&&(N=f.style.transform,0<=(G=N.indexOf("scale"))?(H=N.indexOf(")",G),f.style.transform=N.slice(0,G)+"scale(".concat(this.attributes.scale,")")+N.slice(H+1),f.style.transform=f.style.transform.trim()):f.style.transform="".concat(N," scale(").concat(this.attributes.scale,")").trim());case 16:case"end":return B.stop();}},v,this);}));}},{key:"setTextStyle",value:function(f){return y(this,void 0,void 0,n().mark(function v(){var S,w,C,I,O,M,N,G;return n().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return f.style["-webkit-box-decoration-break"]="clone",f.style["box-decoration-break"]="clone",f.style.wordBreak="normal",f.style.overflowWrap="break-word",f.style.boxSizing="border-box",f.dir="auto",H.next=8,this.annotations.getAnnotation(0);case 8:if(((M=H.sent).padding||this.attributes.padding)&&(f.style.padding=p.default.scaleWithFormat(M.padding||this.attributes.padding.toString(),this.scaleFactor)),M.bgColor&&(f.style.backgroundColor=M.bgColor),M.borderRadius&&(f.style.borderRadius=p.default.scaleWithFormat(M.borderRadius.toString(),this.scaleFactor)),M.cssStyleDeclarations){S=o(M.cssStyleDeclarations);try{for(S.s();!(w=S.n()).done;)C=w.value,I=Object.keys(C)[0],O=p.default.scaleWithFormat(C[I],this.scaleFactor,I),f.style[I]=O;}catch(B){S.e(B);}finally{S.f();}}M.textTransform&&(f.style.textTransform=M.textTransform),M.fonts&&0<M.fonts.length&&(f.style.fontFamily=M.fonts.join(",")),f.style["-webkit-font-smoothing"]="antialiased",this.attributes.scale&&(M=f.style.transform,0<=(N=M.indexOf("scale"))?(G=M.indexOf(")",N),f.style.transform=M.slice(0,N)+"scale(".concat(this.attributes.scale,")")+M.slice(G+1),f.style.transform=f.style.transform.trim()):f.style.transform="".concat(M," scale(").concat(this.attributes.scale,")").trim());case 17:case"end":return H.stop();}},v,this);}));}},{key:"calculateFontSize",value:function(f){var v=function(C){return C;},S=function(C,I,O,M,N,G,H){var B;if(Math.abs(G-N)<=.1&&H)return N;if(Math.abs(G-N)<=.1)return C.style.fontSize="".concat(N,"px"),N;C.style.fontSize="".concat(M,"px");var z=C.offsetWidth,te=C.offsetHeight;return(H=z<=I&&te<=O)?(B=v((G+M)/2),S(C,I,O,B,M,G,H)):(B=v((N+M)/2),S(C,I,O,B,N,M,H));},w=v((this.maxFontSize+this.minFontSize)/2);return p.default.debug("Calculating text for ".concat(this.attributes.sections[0].text,", maxWidthScaled: ").concat(this.maxWidth,", ").concat(this.maxHeight)),S(f,this.maxWidth,this.maxHeight,w,this.minFontSize,this.maxFontSize,!1);}},{key:"buildSections",value:function(f){return y(this,void 0,void 0,n().mark(function v(){var S,w,C,I,O,M,N,G,H,B,z,te,K,V,U,Z,re,ue,q,J,oe,Q;return n().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:w=!(S=function(X){return X=(X=X&&X!==""?(X=X.replaceAll(` 129 `,` 130`)).replaceAll(` 131`,` 132`):X).split(/(\n)/g),1<X.length&&(X[0]===""&&X[1]===` 133`&&X.shift(),X[X.length-1]===""&&X[X.length-2]===` 134`&&X.pop()),X;}),C=o(this._animationEffects),F.prev=3,C.s();case 5:if((O=C.n()).done){F.next=12;break;}if(O.value.disableRegexTextAnnotations)return w=!0,F.abrupt("break",12);F.next=10;break;case 10:F.next=5;break;case 12:F.next=17;break;case 14:F.prev=14,F.t0=F.catch(3),C.e(F.t0);case 17:return F.prev=17,C.f(),F.finish(17);case 20:I=o(this.attributes.sections),F.prev=21,I.s();case 23:if((O=I.n()).done){F.next=62;break;}M=O.value,N=S(M.text),N=o(N),F.prev=27,N.s();case 29:if((G=N.n()).done){F.next=52;break;}if((G=G.value)!==` 135`){F.next=36;break;}z=document.createElement("br"),f.appendChild(z),F.next=50;break;case 36:return H=document.createElement("span"),B=w?0:M.annotationInd,F.next=40,this.annotations.getAnnotation(B);case 40:if(z=F.sent,H.dataset.annRgx=z.regex?btoa(z.regex):"",z.fgColor&&(H.style.color=z.fgColor),B!==0){if(z.bgColor&&(H.style.backgroundColor=z.bgColor),z.borderRadius&&(H.style.borderRadius=p.default.scaleWithFormat(z.borderRadius.toString(),this.scaleFactor)),z.cssStyleDeclarations){te=o(z.cssStyleDeclarations);try{for(te.s();!(K=te.n()).done;)V=K.value,U=Object.keys(V)[0],Z=p.default.scaleWithFormat(V[U],this.scaleFactor,U),H.style[U]=Z;}catch(X){te.e(X);}finally{te.f();}}z.padding&&(H.style.padding=p.default.scaleWithFormat(z.padding,this.scaleFactor)),this.attributes.scale&&(re=H.style.transform,0<=(ue=re.indexOf("scale"))?(q=re.indexOf(")",ue),H.style.transform=re.slice(0,ue)+"scale(".concat(this.attributes.scale,")")+re.slice(q+1),H.style.transform=H.style.transform.trim()):H.style.transform="".concat(re," scale(").concat(this.attributes.scale,")").trim());}z.shadow&&(H.style.textShadow=z.shadow),J=o(z.filters);try{for(J.s();!(oe=J.n()).done;)Q=oe.value,H.style.filter=(H.style.filter?H.style.filter+" ":"")+Q;}catch(X){J.e(X);}finally{J.f();}H.style.fontFamily=z.fonts.join(","),H.innerText=G,f.appendChild(H
135);case 50:F.next=29;break;case 52:F.next=57;break;case 54:F.prev=54,F.t1=F.catch(27),N.e(F.t1);case 57:return F.prev=57,N.f(),F.finish(57);case 60:F.next=23;break;case 62:F.next=67;break;case 64:F.prev=64,F.t2=F.catch(21),I.e(F.t2);case 67:return F.prev=67,I.f(),F.finish(67);case 70:case"end":return F.stop();}},v,this,[[3,14,17,20],[21,64,67,70],[27,54,57,60]]);}));}},{key:"width",get:function(){return this._width;}},{key:"height",get:function(){return this._height;}},{key:"element",get:function(){return this._element;},set:function(f){this._element=f;}},{key:"vDom",get:function(){return this.vDOM;}},{key:"visualEffects",get:function(){return this._visualEffects;},set:function(f){this._visualEffects=f;}},{key:"animationEffects",get:function(){return this._animationEffects;}},{key:"clearAssignStyle",value:function(){this._element&&(this.element.style.visibility="hidden");}},{key:"buildVDOM",value:function(){var f;return p.default.surpass((delete(f=c.VDOMConstructor.builder(this)).id,f));}}])&&h(s.prototype,l),g&&h(s,g),Object.defineProperty(s,"prototype",{writable:!1}),s;var s,l,g;}();r.default=m;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function");}function o(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function _(c,d,m){return d&&o(c.prototype,d),m&&o(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;}Object.defineProperty(r,"__esModule",{value:!0}),r.TextComponentCoreAttributesBuilder=r.TextComponentCoreAttributes=void 0;var E=p(5),x=p(19),h=p(263),y=p(257),b=function(){return _(function c(d){n(this,c),this._fontSize=d.fontSize,this._maxFontSize=d.maxFontSize,this._lineHeight=d.lineHeight,this._sections=d.sections,this._segmentation=d.segmentation,this._padding=d.padding,this._maxWidth=d.maxWidth,this._maxHeight=d.maxHeight,this._minWidth=d.minWidth,this._minHeight=d.minHeight,this._xAlignment=d.xAlignment,this._textTransform=d.textTransform,this._cssStyleDeclarations=d.cssStyleDeclarations,this._scale=d.scale,this._vDom=this.buildVDOM();},[{key:"fontSize",get:function(){return this._fontSize;}},{key:"maxFontSize",get:function(){return this._maxFontSize;}},{key:"lineHeight",get:function(){return this._lineHeight;}},{key:"sections",get:function(){return this._sections;}},{key:"segmentation",get:function(){return this._segmentation;}},{key:"padding",get:function(){return this._padding;}},{key:"maxWidth",get:function(){return this._maxWidth.str();}},{key:"maxHeight",get:function(){return this._maxHeight.str();}},{key:"maxWidthVal",get:function(){return this._maxWidth.val();}},{key:"maxHeightVal",get:function(){return this._maxHeight.val();}},{key:"minWidth",get:function(){return this._minWidth.str();}},{key:"minWidthVal",get:function(){return this._minWidth.val();}},{key:"minHeightVal",get:function(){return this._minHeight.val();}},{key:"minHeight",get:function(){return this._minHeight.str();}},{key:"setMinWidth",value:function(c){this._minWidth=new y.HtmlSizeAttrib(c);}},{key:"setMinHeight",value:function(c){this._minHeight=new y.HtmlSizeAttrib(c);}},{key:"setMaxWidth",value:function(c){this._maxWidth=new y.HtmlSizeAttrib(c);}},{key:"setMaxHeight",value:function(c){this._maxHeight=new y.HtmlSizeAttrib(c);}},{key:"xAlignment",get:function(){return this._xAlignment;}},{key:"textTransform",get:function(){return this._textTransform;}},{key:"cssStyleDeclarations",get:function(){return this._cssStyleDeclarations;}},{key:"scale",get:function(){return this._scale;}},{key:"buildVDOM",value:function(){return E.default.surpass(x.VDOMConstructor.builder(this));}},{key:"vDom",get:function(){return this._vDom;}}]);}(),p=(r.TextComponentCoreAttributes=b,function(){return _(function c(d,m){n(this,c),this.scaleFactor=m||1,this._fontSize=d.hasOwnProperty("fontSize")?d.fontSize:0,this._maxFontSize=d.hasOwnProperty("maxFontSize")?d.maxFontSize:0,this._textTransform=d.hasOwnProperty("textTransform")?d.textTransform:void 0,this._cssStyleDeclarations=d.hasOwnProperty("cssStyleDeclarations")?d.cssStyleDeclarations:void 0,this._sections=d.sections,this._segmentation=d.segmentation,this._maxWidth=new y.HtmlSizeAttrib(d.maxWidth,this.scaleFactor),this._minWidth=new y.HtmlSizeAttrib(d.minWidth,this.scaleFactor),this._maxHeight=new y.HtmlSizeAttrib(d.maxHeight,this.scaleFactor),this._minHeight=new y.HtmlSizeAttrib(d.minHeight,this.scaleFactor),this._xAlignment="left",this._lineHeight=0,d.hasOwnProperty("lineHeight")&&(this._lineHeight=d.lineHeight),d.hasOwnProperty("padding")&&(this._padding=new h.Padding(d.padding)),d.hasOwnProperty("scale")&&this.setScale(d.scale);},[{key:"scaleValue",value:function(c){return E.default.scale(c,this.scaleFactor);}},{key:"maxWidth",get:function(){return this._maxWidth;},set:function(c){this._maxWidth=c;}},{key:"maxHeight",get:function(){return this._maxHeight;},set:function(c){this._maxHeight=c;}},{key:"minWidth",get:function(){return this._minWidth;},set:function(c){this._minWidth=c;}},{key:"minHeight",get:function(){return this._minHeight;},set:function(c){this._minHeight=c;}},{key:"fontSize",get:function(){return this.scaleValue(this._fontSize);}},{key:"setFontSize",value:function(c){return this._fontSize=c,this;}},{key:"maxFontSize",get:function(){return this.scaleValue(this._maxFontSize);}},{key:"textTransform",get:function(){return this._textTransform;}},{key:"cssStyleDeclarations",get:function(){return this._cssStyleDeclarations;}},{key:"setMaxFontSize",value:function(c){return this._maxFontSize=c,this;}},{key:"lineHeight",get:function(){return this._lineHeight;}},{key:"setLineHeight",value:function(c){return this._lineHeight=c,this;}},{key:"sections",get:function(){return this._sections;}},{key:"segmentation",get:function(){return this._segmentation;}},{key:"setSections",value:function(c){return this._sections=c,this;}},{key:"padding",get:function(){return this._padding;}},{key:"setPadding",value:function(c){return this._padding=new h.Padding(c),this;}},{key:"xAlignment",get:function(){return this._xAlignment;}},{key:"setXAlignment",value:function(c){var d="left";return(c=c.toLowerCase())!=="left"&&c!=="center"&&c!=="right"||(d=c),this._xAlignment=d,this;}},{key:"setScale",value:function(c){this._scale=function(d){if(typeof d=="str
135ing"){var m=d.match(/\(([^)]+)\)/);if(m)return m[1];}return d;}(c);}},{key:"scale",get:function(){return this._scale;}},{key:"build",value:function(){return new b(this);}}]);}());r.TextComponentCoreAttributesBuilder=p;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(g,f){return function(v){if(Array.isArray(v))return v;}(g)||function(v,S){var w=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(w!=null){var C,I,O,M,N=[],G=!0,H=!1;try{if(O=(w=w.call(v)).next,S===0){if(Object(w)!==w)return;G=!1;}else for(;!(G=(C=O.call(w)).done)&&(N.push(C.value),N.length!==S);G=!0);}catch(B){H=!0,I=B;}finally{try{if(!G&&w.return!=null&&(M=w.return(),Object(M)!==M))return;}finally{if(H)throw I;}}return N;}}(g,f)||o(g,f)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 136In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(g,f){if(g){if(typeof g=="string")return _(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?_(g,f):void 0;}}function _(g,f){(f==null||f>g.length)&&(f=g.length);for(var v=0,S=Array(f);v<f;v++)S[v]=g[v];return S;}function E(){E=function(){return f;};var g,f={},v=Object.prototype,S=v.hasOwnProperty,w=Object.defineProperty||function(j,D,$){j[D]=$.value;},re=typeof Symbol=="function"?Symbol:{},C=re.iterator||"@@iterator",I=re.asyncIterator||"@@asyncIterator",O=re.toStringTag||"@@toStringTag";function M(j,D,$){return Object.defineProperty(j,D,{value:$,enumerable:!0,configurable:!0,writable:!0}),j[D];}try{M({},"");}catch{M=function(D,$,ne){return D[$]=ne;};}function N(j,he,$,_e){var le,se,fe,ge,he=he&&he.prototype instanceof V?he:V,he=Object.create(he.prototype),_e=new X(_e||[]);return w(he,"_invoke",{value:(le=j,se=$,fe=_e,ge=H,function(Re,ee){if(ge===z)throw Error("Generator is already running");if(ge===te){if(Re==="throw")throw ee;return{value:g,done:!0};}for(fe.method=Re,fe.arg=ee;;){var W=fe.delegate;if(W&&(W=function ae(de,ye){var Se=ye.method,De=de.iterator[Se];return De===g?(ye.delegate=null,Se==="throw"&&de.iterator.return&&(ye.method="return",ye.arg=g,ae(de,ye),ye.method==="throw")||Se!=="return"&&(ye.method="throw",ye.arg=new TypeError("The iterator does not provide a '"+Se+"' method")),K):(Se=G(De,de.iterator,ye.arg),Se.type==="throw"?(ye.method="throw",ye.arg=Se.arg,ye.delegate=null,K):(De=Se.arg,De?De.done?(ye[de.resultName]=De.value,ye.next=de.nextLoc,ye.method!=="return"&&(ye.method="next",ye.arg=g),ye.delegate=null,K):De:(ye.method="throw",ye.arg=new TypeError("iterator result is not an object"),ye.delegate=null,K)));}(W,fe),W)){if(W===K)continue;return W;}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(ge===H)throw ge=te,fe.arg;fe.dispatchException(fe.arg);}else fe.method==="return"&&fe.abrupt("return",fe.arg);if(ge=z,W=G(le,se,fe),W.type==="normal"){if(ge=fe.done?te:B,W.arg===K)continue;return{value:W.arg,done:fe.done};}W.type==="throw"&&(ge=te,fe.method="throw",fe.arg=W.arg);}})}),he;}function G(j,D,$){try{return{type:"normal",arg:j.call(D,$)};}catch(ne){return{type:"throw",arg:ne};}}f.wrap=N;var H="suspendedStart",B="suspendedYield",z="executing",te="completed",K={};function V(){}function U(){}function Z(){}var re={},ue=(M(re,C,function(){return this;}),Object.getPrototypeOf),ue=ue&&ue(ue(Y([]))),q=(ue&&ue!==v&&S.call(ue,C)&&(re=ue),Z.prototype=V.prototype=Object.create(re));function J(j){["next","throw","return"].forEach(function(D){M(j,D,function($){return this._invoke(D,$);});});}function oe(j,D){var $;w(this,"_invoke",{value:function(ne,le){function se(){return new D(function(fe,ge){(function he(de,Re,ee,W){var ae,de=G(j[de],j,Re);if(de.type!=="throw")return(Re=(ae=de.arg).value)&&t(Re)=="object"&&S.call(Re,"__await")?D.resolve(Re.__await).then(function(ye){he("next",ye,ee,W);},function(ye){he("throw",ye,ee,W);}):D.resolve(Re).then(function(ye){ae.value=ye,ee(ae);},function(ye){return he("throw",ye,ee,W);});W(de.arg);})(ne,le,fe,ge);});}return $=$?$.then(se,se):se();}});}function Q(j){var D={tryLoc:j[0]};
1361 in j&&(D.catchLoc=j[1]),2 in j&&(D.finallyLoc=j[2],D.afterLoc=j[3]),this.tryEntries.push(D);}function F(j){var D=j.completion||{};D.type="normal",delete D.arg,j.completion=D;}function X(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0);}function Y(j){if(j||j===""){var D,$=j[C];if($)return $.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length))return D=-1,($=function ne(){for(;++D<j.length;)if(S.call(j,D))return ne.value=j[D],ne.done=!1,ne;return ne.value=g,ne.done=!0,ne;}).next=$;}throw new TypeError(t(j)+" is not iterable");}return w(q,"constructor",{value:U.prototype=Z,configurable:!0}),w(Z,"constructor",{value:U,configurable:!0}),U.displayName=M(Z,O,"GeneratorFunction"),f.isGeneratorFunction=function(j){return j=typeof j=="function"&&j.constructor,!!j&&(j===U||(j.displayName||j.name)==="GeneratorFunction");},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,Z):(j.__proto__=Z,M(j,O,"GeneratorFunction")),j.prototype=Object.create(q),j;},f.awrap=function(j){return{__await:j};},J(oe.prototype),M(oe.prototype,I,function(){return this;}),f.AsyncIterator=oe,f.async=function(j,D,$,ne,le){le===void 0&&(le=Promise);var se=new oe(N(j,D,$,ne),le);return f.isGeneratorFunction(D)?se:se.next().then(function(fe){return fe.done?fe.value:se.next();});},J(q),M(q,O,"Generator"),M(q,C,function(){return this;}),M(q,"toString",function(){return"[object Generator]";}),f.keys=function(j){var D,$=Object(j),ne=[];for(D in $)ne.push(D);return ne.reverse(),function le(){for(;ne.length;){var se=ne.pop();if(se in $)return le.value=se,le.done=!1,le;}return le.done=!0,le;};},f.values=Y,X.prototype={constructor:X,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(F),!j)for(var D in this)D.charAt(0)==="t"&&S.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=g);},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval;},dispatchException:function(j){if(this.done)throw j;var D=this;function $(he,_e){return se.type="throw",se.arg=j,D.next=he,_e&&(D.method="next",D.arg=g),!!_e;}for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne],se=le.completion;if(le.tryLoc==="root")return $("end");if(le.tryLoc<=this.prev){var fe=S.call(le,"catchLoc"),ge=S.call(le,"finallyLoc");if(fe&&ge){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);if(this.prev<le.finallyLoc)return $(le.finallyLoc);}else if(fe){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);}else{if(!ge)throw Error("try statement without catch or finally");if(this.prev<le.finallyLoc)return $(le.finallyLoc);}}}},abrupt:function(j,D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.tryLoc<=this.prev&&S.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var le=ne;break;}}var se=(le=le&&(j==="break"||j==="continue")&&le.tryLoc<=D&&D<=le.finallyLoc?null:le)?le.completion:{};return se.type=j,se.arg=D,le?(this.method="next",this.next=le.finallyLoc,K):this.complete(se);},complete:function(j,D){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&D&&(this.next=D),K;},finish:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.finallyLoc===j)return this.complete($.completion,$.afterLoc),F($),K;}},catch:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $,ne,le=this.tryEntries[D];if(le.tryLoc===j)return($=le.completion).type==="throw"&&(ne=$.arg,F(le)),ne;}throw Error("illegal catch attempt");},delegateYield:function(j,D,$){return this.delegate={iterator:Y(j),resultName:D,nextLoc:$},this.method==="next"&&(this.arg=g),K;}},f;}function x(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];
136if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}function h(g,w,v){w=b(w);var S=g,w=y()?Reflect.construct(w,v||[],b(g).constructor):w.apply(g,v);if(w&&(t(w)=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(g=S,g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g;}function y(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(y=function(){return!!g;})();}function b(g){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f);})(g);}function p(g,f){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,S){return v.__proto__=S,v;})(g,f);}var c=this&&this.__awaiter||function(g,f,v,S){return new(v=v||Promise)(function(w,C){function I(N){try{M(S.next(N));}catch(G){C(G);}}function O(N){try{M(S.throw(N));}catch(G){C(G);}}function M(N){var G;N.done?w(N.value):((G=N.value)instanceof v?G:new v(function(H){H(G);})).then(I,O);}M((S=S.apply(g,f||[])).next());});},d=(Object.defineProperty(r,"__esModule",{value:!0}),l(268)),m=l(270),a=l(5),s=m,l=function(g){function f(w,C){if(this instanceof f)return(C=h(this,f,[w,C])).textList=w.inAnimationText||[],C.loop=w.loop===void 0||w.loop,C;throw new TypeError("Cannot call a class as a function");}var v,S=f;if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");return S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),g&&p(S,g),S=f,(g=[{key:"load",value:function(w){return c(this,void 0,void 0,E().mark(function C(){var I=this;return E().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.abrupt("return",new Promise(function(M,N){I.jsonUrl?(a.default.debug("Lottie component is loading..."),I._animation=s.loadAnimation({container:I.element,renderer:"svg",loop:I.loop,autoplay:!1,path:I.jsonUrl}),I._animation.addEventListener("data_failed",function(){a.default.debug("Failed to load lottie component data, rejecting async load"),N();}),I._animation.addEventListener("DOMLoaded",function(){return c(I,void 0,void 0,E().mark(function G(){return E().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:try{a.default.debug("Lottie component is loaded!");try{a.default.debug(JSON.stringify(this._animation.renderer)),a.default.debug(JSON.stringify(this._animation.renderer.layers));}catch{a.default.debug(this._animation.renderer),a.default.debug(this._animation.renderer.layers);}this._animationDuration=a.default.round(this._animation.getDuration(),3),a.default.debug("Duration of lottie animation: ".concat(this._animationDuration)),this.updateTextLayers(),M();}catch(B){N(B);}case 1:case"end":return H.stop();}},G,this);}));})):N();}));case 1:case"end":return O.stop();}},C);}));}},{key:"updateTextLayers",value:function(){return c(this,void 0,void 0,E().mark(function w(){var C,I,O,M,N,G;return E().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:C=this._animation.renderer.elements.filter(function(B){return typeof B.updateDocumentData=="function";}),a.default.debug("Found ".concat(C.length," text layers in the animation ").concat(this.jsonUrl)),C=a.default.zip(C,this.textList),I=function(B,z){var te,K=typeof Symbol<"u"&&B[Symbol.iterator]||B["@@iterator"];if(!K){if(Array.isArray(B)||(K=o(B))||z&&B&&typeof B.length=="number")return K&&(B=K),te=0,{s:z=function(){},n:function(){return te>=B.length?{done:!0}:{done:!1,value:B[te++]};},e:function(re){throw re;},f:z};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 137In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var V,U=!0,Z=!1;return{s:function(){K=K.call(B);},n:function(){var re=K.next();return U=re.done,re;},e:function(re){Z=!0,V=re;},f:function(){try{U||K.return==null||K.return();}finally{if(Z)throw V;}}};}(C);try{for(I.s();!(O=I.n()).done;)M=n(O.value,2),N=M[0],G=M[1],N.updateDocumentData({t:G});}catch(B){I.e(B);}finally{I.f();}case 5:case"end":return H.stop();}},w,this);}));}},{key:"reconstructWithRecycle",value:function(w){return c(this,void 0,void 0,E().mark(function C(){return E().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:w&&(this.animation=w.animation,this.animationDuration=w.animationDuration,w.animation=void 0);case 1:case"end":return I.stop();}},C,this);}));}},{key:"animation",get:function(){return this._animation;},set:function(w){this._animation=w;}},{key:"animationDuration",get:function(){return this._animationDuration;},set:function(w){this._animationDuration=w;}}])&&x(S.prototype,g),v&&x(S,v),Object.defineProperty(S,"prototype",{writable:!1}),S;}(d.default);r.default=l;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(){n=function(){return l;};var s,l={},g=Object.prototype,f=g.hasOwnProperty,v=Object.defineProperty||function(X,Y,j){X[Y]=j.value;},U=typeof Symbol=="function"?Symbol:{},S=U.iterator||"@@iterator",w=U.asyncIterator||"@@asyncIterator",C=U.toStringTag||"@@toStringTag";function I(X,Y,j){return Object.defineProperty(X,Y,{value:j,enumerable:!0,configurable:!0,writable:!0}),X[Y];}try{I({},"");}catch{I=function(Y,j,D){return Y[j]=D;};}function O(X,fe,j,ge){var $,ne,le,se,fe=fe&&fe.prototype instanceof te?fe:te,fe=Object.create(fe.prototype),ge=new Q(ge||[]);return v(fe,"_invoke",{value:($=X,ne=j,le=ge,se=N,function(he,_e){if(se===H)throw Error("Generator is already running");
137if(se===B){if(he==="throw")throw _e;return{value:s,done:!0};}for(le.method=he,le.arg=_e;;){var Re=le.delegate;if(Re&&(Re=function ee(W,ae){var de=ae.method,ye=W.iterator[de];return ye===s?(ae.delegate=null,de==="throw"&&W.iterator.return&&(ae.method="return",ae.arg=s,ee(W,ae),ae.method==="throw")||de!=="return"&&(ae.method="throw",ae.arg=new TypeError("The iterator does not provide a '"+de+"' method")),z):(de=M(ye,W.iterator,ae.arg),de.type==="throw"?(ae.method="throw",ae.arg=de.arg,ae.delegate=null,z):(ye=de.arg,ye?ye.done?(ae[W.resultName]=ye.value,ae.next=W.nextLoc,ae.method!=="return"&&(ae.method="next",ae.arg=s),ae.delegate=null,z):ye:(ae.method="throw",ae.arg=new TypeError("iterator result is not an object"),ae.delegate=null,z)));}(Re,le),Re)){if(Re===z)continue;return Re;}if(le.method==="next")le.sent=le._sent=le.arg;else if(le.method==="throw"){if(se===N)throw se=B,le.arg;le.dispatchException(le.arg);}else le.method==="return"&&le.abrupt("return",le.arg);if(se=H,Re=M($,ne,le),Re.type==="normal"){if(se=le.done?B:G,Re.arg===z)continue;return{value:Re.arg,done:le.done};}Re.type==="throw"&&(se=B,le.method="throw",le.arg=Re.arg);}})}),fe;}function M(X,Y,j){try{return{type:"normal",arg:X.call(Y,j)};}catch(D){return{type:"throw",arg:D};}}l.wrap=O;var N="suspendedStart",G="suspendedYield",H="executing",B="completed",z={};function te(){}function K(){}function V(){}var U={},Z=(I(U,S,function(){return this;}),Object.getPrototypeOf),Z=Z&&Z(Z(F([]))),re=(Z&&Z!==g&&f.call(Z,S)&&(U=Z),V.prototype=te.prototype=Object.create(U));function ue(X){["next","throw","return"].forEach(function(Y){I(X,Y,function(j){return this._invoke(Y,j);});});}function q(X,Y){var j;v(this,"_invoke",{value:function(D,$){function ne(){return new Y(function(le,se){(function fe(W,he,_e,Re){var ee,W=M(X[W],X,he);if(W.type!=="throw")return(he=(ee=W.arg).value)&&t(he)=="object"&&f.call(he,"__await")?Y.resolve(he.__await).then(function(ae){fe("next",ae,_e,Re);},function(ae){fe("throw",ae,_e,Re);}):Y.resolve(he).then(function(ae){ee.value=ae,_e(ee);},function(ae){return fe("throw",ae,_e,Re);});Re(W.arg);})(D,$,le,se);});}return j=j?j.then(ne,ne):ne();}});}function J(X){var Y={tryLoc:X[0]};1 in X&&(Y.catchLoc=X[1]),2 in X&&(Y.finallyLoc=X[2],Y.afterLoc=X[3]),this.tryEntries.push(Y);}function oe(X){var Y=X.completion||{};Y.type="normal",delete Y.arg,X.completion=Y;}function Q(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(J,this),this.reset(!0);}function F(X){if(X||X===""){var Y,j=X[S];if(j)return j.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length))return Y=-1,(j=function D(){for(;++Y<X.length;)if(f.call(X,Y))return D.value=X[Y],D.done=!1,D;return D.value=s,D.done=!0,D;}).next=j;}throw new TypeError(t(X)+" is not iterable");}return v(re,"constructor",{value:K.prototype=V,configurable:!0}),v(V,"constructor",{value:K,configurable:!0}),K.displayName=I(V,C,"GeneratorFunction"),l.isGeneratorFunction=function(X){return X=typeof X=="function"&&X.constructor,!!X&&(X===K||(X.displayName||X.name)==="GeneratorFunction");},l.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,V):(X.__proto__=V,I(X,C,"GeneratorFunction")),X.prototype=Object.create(re),X;},l.awrap=function(X){return{__await:X};},ue(q.prototype),I(q.prototype,w,function(){return this;}),l.AsyncIterator=q,l.async=function(X,Y,j,D,$){$===void 0&&($=Promise);var ne=new q(O(X,Y,j,D),$);return l.isGeneratorFunction(Y)?ne:ne.next().then(function(le){return le.done?le.value:ne.next();});},ue(re),I(re,C,"Generator"),I(re,S,function(){return this;}),I(re,"toString",function(){return"[object Generator]";}),l.keys=function(X){var Y,j=Object(X),D=[];for(Y in j)D.push(Y);return D.reverse(),function $(){for(;D.length;){var ne=D.pop();if(ne in j)return $.value=ne,$.done=!1,$;}return $.done=!0,$;};},l.values=F,Q.prototype={constructor:Q,reset:function(X){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(oe),!X)for(var Y in this)Y.charAt(0)==="t"&&f.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=s);},stop:function(){this.done=!0;
137var X=this.tryEntries[0].completion;if(X.type==="throw")throw X.arg;return this.rval;},dispatchException:function(X){if(this.done)throw X;var Y=this;function j(fe,ge){return ne.type="throw",ne.arg=X,Y.next=fe,ge&&(Y.method="next",Y.arg=s),!!ge;}for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D],ne=$.completion;if($.tryLoc==="root")return j("end");if($.tryLoc<=this.prev){var le=f.call($,"catchLoc"),se=f.call($,"finallyLoc");if(le&&se){if(this.prev<$.catchLoc)return j($.catchLoc,!0);if(this.prev<$.finallyLoc)return j($.finallyLoc);}else if(le){if(this.prev<$.catchLoc)return j($.catchLoc,!0);}else{if(!se)throw Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return j($.finallyLoc);}}}},abrupt:function(X,Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j];if(D.tryLoc<=this.prev&&f.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var $=D;break;}}var ne=($=$&&(X==="break"||X==="continue")&&$.tryLoc<=Y&&Y<=$.finallyLoc?null:$)?$.completion:{};return ne.type=X,ne.arg=Y,$?(this.method="next",this.next=$.finallyLoc,z):this.complete(ne);},complete:function(X,Y){if(X.type==="throw")throw X.arg;return X.type==="break"||X.type==="continue"?this.next=X.arg:X.type==="return"?(this.rval=this.arg=X.arg,this.method="return",this.next="end"):X.type==="normal"&&Y&&(this.next=Y),z;},finish:function(X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y];if(j.finallyLoc===X)return this.complete(j.completion,j.afterLoc),oe(j),z;}},catch:function(X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j,D,$=this.tryEntries[Y];if($.tryLoc===X)return(j=$.completion).type==="throw"&&(D=j.arg,oe($)),D;}throw Error("illegal catch attempt");},delegateYield:function(X,Y,j){return this.delegate={iterator:F(X),resultName:Y,nextLoc:j},this.method==="next"&&(this.arg=s),z;}},l;}function o(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
137(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}function _(s,v,g){v=h(v);var f=s,v=E()?Reflect.construct(v,g||[],h(s).constructor):v.apply(s,g);if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function E(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(E=function(){return!!s;})();}function x(){return(x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(s,l,g){var f=function(v,S){for(;!{}.hasOwnProperty.call(v,S)&&(v=h(v))!==null;);return v;}(s,l);if(f)return(f=Object.getOwnPropertyDescriptor(f,l)).get?f.get.call(arguments.length<3?s:g):f.value;}).apply(null,arguments);}function h(s){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function y(s,l){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}var b=this&&this.__awaiter||function(s,l,g,f){return new(g=g||Promise)(function(v,S){function w(O){try{I(f.next(O));}catch(M){S(M);}}function C(O){try{I(f.throw(O));}catch(M){S(M);}}function I(O){var M;O.done?v(O.value):((M=O.value)instanceof g?M:new g(function(N){N(M);})).then(w,C);}I((f=f.apply(s,l||[])).next());});},p=(Object.defineProperty(r,"__esModule",{value:!0}),a(32)),c=a(269),d=a(5),m=a(19),a=function(s){function l(v,S){if(this instanceof l)return(S=_(this,l,[v,S]))._studioId=void 0,S.attributes=new c.AnimationComponentCoreAttributesBuilder(v.attributes,S.scale).build(),v.src&&v.src.jsonUrl&&(S.jsonUrl=v.src.jsonUrl),S.baseVDom=S.buildVDOM(),S;throw new TypeError("Cannot call a class as a function");}var g,f=l;if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");return f.prototype=Object.create(s&&s.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),s&&y(f,s),f=l,(s=[{key:"renderHtml",value:function(v){return b(this,void 0,void 0,n().mark(function S(){return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return this.element=document.createElement("div"),this.element.style.visibility="hidden",v.appendChild(this.element),w.next=5,this.load(this.element);case 5:return this.applyStyle(this.element),w.next=8,this.applyVisualEffects(this.element);case 8:case"end":return w.stop();}},S,this);}));}},{key:"renderHtmlRecursively",value:function(){return b(this,void 0,void 0,n().mark(function v(){return n().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:case"end":return S.stop();}},v);}));}},{key:"buildVDOM",value:function(){return this.baseVDom=d.default.surpass(m.VDOMConstructor.builder(this)),v=l,S="buildVDOM",w=this,I=x(h(1&(C=3)?v.prototype:v),S,w),(2&C?function(O){return I.apply(w,O);}:I)([]);var v,S,w,C,I;}}])&&o(f.prototype,s),g&&o(f,g),Object.defineProperty(f,"prototype",{writable:!1}),f;}(p.default);r.default=a;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function o(m,a,s){return a&&n(m.prototype,a),s&&n(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;}function _(m,a){if(!(m instanceof a))throw new TypeError("Cannot call a class as a function");}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}
137function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(a&&a.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),a&&b(m,a);}function b(m,a){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}Object.defineProperty(r,"__esModule",{value:!0}),r.AnimationComponentCoreAttributesBuilder=r.AnimationComponentCoreAttributes=void 0;var p=d(49),c=function(){function m(a){return _(this,m),(a=E(this,m,[a]))._vDom=a.buildVDOM(),a;}return y(m,p.GeneralAttributes),o(m);}(),d=(r.AnimationComponentCoreAttributes=c,function(){function m(a,s){return _(this,m),E(this,m,[a,s]);}return y(m,p.GeneralAttributesBuilder),o(m,[{key:"build",value:function(){return new c(this);}}]);}());r.AnimationComponentCoreAttributesBuilder=d;},function(module,exports,__webpack_require__){typeof navigator<"u"&&function(i){module.exports=i();}(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(i){_useWebWorker=!!i;},getWebWorker=function(){return _useWebWorker;},setLocationHref=function(i){locationHref=i;},getLocationHref=function(){return locationHref;};function createTag(i){return document.createElement(i);}function extendPrototype(i,r){for(var e,t=i.length,n=0;n<t;n+=1)for(var o in e=i[n].prototype)Object.prototype.hasOwnProperty.call(e,o)&&(r.prototype[o]=e[o]);}function getDescriptor(i,r){return Object.getOwnPropertyDescriptor(i,r);}function createProxyFunction(i){function r(){}return r.prototype=i,r;}var audioControllerFactory=function(){function i(r){this.audios=[],this.audioFactory=r,this._volume=1,this._isMuted=!1;}return i.prototype={addAudio:function(r){this.audios.push(r);},pause:function(){for(var r=this.audios.length,e=0;e<r;e+=1)this.audios[e].pause();},resume:function(){for(var r=this.audios.length,e=0;e<r;e+=1)this.audios[e].resume();},setRate:function(r){for(var e=this.audios.length,t=0;t<e;t+=1)this.audios[t].setRate(r);},createAudio:function(r){return this.audioFactory?this.audioFactory(r):window.Howl?new window.Howl({src:[r]}):{isPlaying:!1,play:function(){this.isPlaying=!0;},seek:function(){this.isPlaying=!1;},playing:function(){},rate:function(){},setVolume:function(){}};},setAudioFactory:function(r){this.audioFactory=r;},setVolume:function(r){this._volume=r,this._updateVolume();},mute:function(){this._isMuted=!0,this._updateVolume();},unmute:function(){this._isMuted=!1,this._updateVolume();},getVolume:function(){return this._volume;},_updateVolume:function(){for(var r=this.audios.length,e=0;e<r;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1));}},function(){return new i();};}(),createTypedArray=function(){function i(r,e){var t,n=0,o=[];switch(r){case"int16":case"uint8c":t=1;break;default:t=1.1;}for(n=0;n<e;n+=1)o.push(t);return o;}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?function(r,e){return r==="float32"?new Float32Array(e):r==="int16"?new Int16Array(e):r==="uint8c"?new Uint8ClampedArray(e):i(r,e);}:i;}();function createSizedArray(i){return Array.apply(null,{length:i});}function _typeof$6(i){return(_typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){}(function(){for(var i=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=i.length,e=0;e<r;e+=1)BMMath[i[e]]=Math[i[e]];})(),BMMath.random=Math.random,BMMath.abs=function(i){if(_typeof$6(i)==="object"&&i.length){for(var r=createSizedArray(i.length),e=i.length,t=0;t<e;t+=1)r[t]=Math.abs(i[t]);return r;}return Math.abs(i);};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(i){_shouldRoundValues=!!i;}function bmRnd(i){if(_shouldRoundValues)return Math.round(i);}function styleDiv(i){i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.display="block",i.style.transformOrigin="0 0",i.style.webkitTransformOrigin="0 0",i.style.backfaceVisibility="visible",i.style.webkitBackfaceVisibility="visible",i.style.transformStyle="preserve-3d",i.style.webkitTransformStyle="preserve-3d",i.style.mozTransformStyle="preserve-3d";}function BMEnterFrameEvent(i,r,e,t){this.type=i,this.currentTime=r,this.totalTime=e,this.direction=t<0?-1:1;}function BMCompleteEvent(i,r){this.type=i,this.direction=r<0?-1:1;}function BMCompleteLoopEvent(i,r,e,t){this.type=i,this.currentLoop=e,this.totalLoops=r,this.direction=t<0?-1:1;}function BMSegmentStartEvent(i,r,e){this.type=i,this.firstFrame=r,this.totalFrames=e;}function BMDestroyEvent(i,r){this.type=i,this.target=r;}function BMRenderFrameErrorEvent(i,r){this.type="renderFrameError",this.nativeError=i,this.currentTime=r;}function BMConfigErrorEvent(i){this.type="configError",this.nativeError=i;}function BMAnimationConfigErrorEvent(i,r){this.type=i,this.nativeError=r;}var createElementID=function(){var i=0;return function(){return idPrefix$1+"__lottie_element_"+(i+=1);};}();function HSVtoRGB(E,r,e){var t,n,o,_=Math.floor(6*E),E=6*E-_,x=e*(1-r),h=e*(1-E*r),y=e*(1-(1-E)*r);switch(_%6){case 0:t=e,n=y,o=x;break;case 1:t=h,n=e,o=x;break;case 2:t=x,n=e,o=y;break;case 3:t=x,n=h,o=e;break;case 4:t=y,n=x,o=e;break;case 5:t=e,n=x,o=h;}return[t,n,o];}function RGBtoHSV(i,r,e){var t,n=Math.max(i,r,e),o=Math.min(i,r,e),_=n-o,E=n===0?0:_/n,x=n/255;switch(n){case o:t=0;break;case i:t=r-e+_*(r<e?6:0),t/=6*_;break;case r:t=e-i+2*_,t/=6*_;break;case e:t=i-r+4*_,t/=6*_;}return[t,E,x];}function addSaturationToRGB(i,r){return i=RGBtoHSV(255*i[0],255*i[1],255*i[2]),i[1]+=r,1<i[1]?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2]);}function addBrightnessToRGB(i,r){return i=RGBtoHSV(255*i[0],255*i[1],255*i[2]),i[2]+=r,1<i[2]?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2]);}function addHueToRGB(i,r){return i=RGBtoHSV(255*i[0],255*i[1],255*i[2]),i[0]+=r/360,1<i[0]?--i[0]:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2]);}var rgbToHex=function(){for(var i,r=[],e=0;e<256;e+=1)i=e.toString(16),r[e]=i.length===1?"0"+i:i;return function(t,n,o){return"#"+r[t=t<0?0:t]+r[n=n<0?0:n]+r[o=o<0?0:o];};}(),setSubframeEnabled=function(i){subframeEnabled=!!i;},getSubframeEnabled=function(){return subframeEnabled;},setExpressionsPlugin=function(i){expressionsPlugin=i;},getExpressionsPlugin=function(){return expressionsPlugin;},setExpressionInterfaces=function(i){expressionsInterfaces=i;},getExpressionInterfaces=function(){return expressionsInterfaces;},setDefaultCurveSegments=function(i){defaultCurveSegments=i;},getDefaultCurveSegments=function(){return defaultCurveSegments;},setIdPrefix=function(i){idPrefix$1=i;},getIdPrefix=function(){return idPrefix$1;};function createNS(i){return document.createElementNS(svgNS,i);}function _typeof$5(i){return(_typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var dataManager=function(){var i,r,e=1,t=[],n={onmessage:function(){},postMessage:function(x){i({data:x});}},o={postMessage:function(x){n.onmessage({data:x});}};function _(){var x,h;r||(x=function(y){function b(){function d(K,V){for(var U,Z,re,ue=K.length,q=0;q<ue;q+=1)if("ks"in(re=K[q])&&!re.completed){if(re.completed=!0,re.hasMask)for(var J=re.masksProperties,oe=J.length,Q=0;Q<oe;Q+=1)if(J[Q].pt.k.i)s(J[Q].pt.k);else for(Z=J[Q].pt.k.length,U=0;U<Z;U+=1)J[Q].pt.k[U].s&&s(J[Q].pt.k[U].s[0]),J[Q].pt.k[U].e&&s(J[Q].pt.k[U].e[0]);re.ty===0?(re.layers=m(re.refId,V),d(re.layers,V)):re.ty===4?a(re.shapes):re.ty===5&&(re=re).t.a.length===0&&0 in re.t.p;}}function m(K,V){return K=function(U,Z){for(var re=0,ue=Z.length;re<ue;){if(Z[re].id===U)return Z[re];re+=1;}return null;}(K,V),K?K.layers.__used?JSON.parse(JSON.stringify(K.layers)):(K.layers.__used=!0,K.layers):null;}function a(K){for(var V,U,Z=K.length-1;0<=Z;--Z)if(K[Z].ty==="sh"){if(K[Z].ks.k.i)s(K[Z].ks.k);else for(U=K[Z].ks.k.length,V=0;V<U;V+=1)K[Z].ks.k[V].s&&s(K[Z].ks.k[V].s[0]),K[Z].ks.k[V].e&&s(K[Z].ks.k[V].e[0]);}else K[Z].ty==="gr"&&a(K[Z].it);}function s(K){for(var V=K.i.length,U=0;U<V;U+=1)K.i[U][0]+=K.v[U][0],K.i[U][1]+=K.v[U][1],K.o[U][0]+=K.v[U][0],K.o[U][1]+=K.v[U][1];}function l(K,V){return V=V?V.split("."):[100,100,100],K[0]>V[0]||!(V[0]>K[0])&&(K[1]>V[1]||!(V[1]>K[1])&&(K[2]>V[2]||(V[2],void K[2])));}g=[4,4,14];var g,f=function(K){if(l(g,K.v)&&(v(K.layers),K.assets))for(var V=K.assets.length,U=0;U<V;U+=1)K.assets[U].layers&&v(K.assets[U].layers);};function v(K){for(var V,U,Z=K.length,re=0;re<Z;re+=1)K[re].ty===5&&(V=K[re],U=void 0,U=V.t.d,V.t.d={k:[{s:U,t:0}]});}S=[4,7,99];var S,w,C=function(K){if(K.chars&&!l(S,K.v))for(var V=K.chars.length,U=0;U<V;U+=1){var Z=K.chars[U];Z.data&&Z.data.shapes&&(a(Z.data.shapes),Z.data.ip=0,Z.data.op=99999,Z.data.st=0,Z.data.sr=1,Z.data.ks={p:{k:[0,0],a:0}
137,s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},K.chars[U].t||(Z.data.shapes.push({ty:"no"}),Z.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})));}},I=(w=[5,7,15],function(K){if(l(w,K.v)&&(O(K.layers),K.assets))for(var V=K.assets.length,U=0;U<V;U+=1)K.assets[U].layers&&O(K.assets[U].layers);});function O(K){for(var V,U=K.length,Z=0;Z<U;Z+=1)K[Z].ty===5&&(typeof(V=(V=K[Z]).t.p).a=="number"&&(V.a={a:0,k:V.a}),typeof V.p=="number"&&(V.p={a:0,k:V.p}),typeof V.r=="number"&&(V.r={a:0,k:V.r}));}M=[4,1,9];var M,N=function(K){if(l(M,K.v)&&(G(K.layers),K.assets))for(var V=K.assets.length,U=0;U<V;U+=1)K.assets[U].layers&&G(K.assets[U].layers);};function G(K){for(var V=K.length,U=0;U<V;U+=1)K[U].ty===4&&function Z(re){for(var ue,q,J=re.length,oe=0;oe<J;oe+=1)if(re[oe].ty==="gr")Z(re[oe].it);else if(re[oe].ty==="fl"||re[oe].ty==="st")if(re[oe].c.k&&re[oe].c.k[0].i)for(q=re[oe].c.k.length,ue=0;ue<q;ue+=1)re[oe].c.k[ue].s&&(re[oe].c.k[ue].s[0]/=255,re[oe].c.k[ue].s[1]/=255,re[oe].c.k[ue].s[2]/=255,re[oe].c.k[ue].s[3]/=255),re[oe].c.k[ue].e&&(re[oe].c.k[ue].e[0]/=255,re[oe].c.k[ue].e[1]/=255,re[oe].c.k[ue].e[2]/=255,re[oe].c.k[ue].e[3]/=255);else re[oe].c.k[0]/=255,re[oe].c.k[1]/=255,re[oe].c.k[2]/=255,re[oe].c.k[3]/=255;}(K[U].shapes);}H=[4,4,18];var H,B=function(K){if(l(H,K.v)&&(z(K.layers),K.assets))for(var V=K.assets.length,U=0;U<V;U+=1)K.assets[U].layers&&z(K.assets[U].layers);};function z(K){for(var V,U,Z,re=K.length,ue=0;ue<re;ue+=1){if((V=K[ue]).hasMask)for(var q=V.masksProperties,J=q.length,oe=0;oe<J;oe+=1)if(q[oe].pt.k.i)q[oe].pt.k.c=q[oe].cl;else for(Z=q[oe].pt.k.length,U=0;U<Z;U+=1)q[oe].pt.k[U].s&&(q[oe].pt.k[U].s[0].c=q[oe].cl),q[oe].pt.k[U].e&&(q[oe].pt.k[U].e[0].c=q[oe].cl);V.ty===4&&function Q(F){for(var X,Y,j=F.length-1;0<=j;--j)if(F[j].ty==="sh"){if(F[j].ks.k.i)F[j].ks.k.c=F[j].closed;else for(Y=F[j].ks.k.length,X=0;X<Y;X+=1)F[j].ks.k[X].s&&(F[j].ks.k[X].s[0].c=F[j].closed),F[j].ks.k[X].e&&(F[j].ks.k[X].e[0].c=F[j].closed);}else F[j].ty==="gr"&&Q(F[j].it);}(V.shapes);}}var te={};return te.completeData=function(K){if(!K.__complete){N(K),f(K),C(K),I(K),B(K),d(K.layers,K.assets);var V=K.chars,U=K.assets;if(V)for(var re=0,Z=V.length,re=0;re<Z;re+=1)V[re].t===1&&(V[re].data.layers=m(V[re].data.refId,U),d(V[re].data.layers,U));K.__complete=!0;}},te.checkColors=N,te.checkChars=C,te.checkPathProperties=I,te.checkShapes=B,te.completeLayers=d,te;}function p(d){var m=d.getResponseHeader("content-type");return m&&d.responseType==="json"&&m.indexOf("json")!==-1||d.response&&_typeof$5(d.response)==="object"?d.response:d.response&&typeof d.response=="string"?JSON.parse(d.response):d.responseText?JSON.parse(d.responseText):null;}var c;o.dataManager||(o.dataManager=b()),o.assetLoader||(o.assetLoader={load:function(d,m,a,s){var l,g=new XMLHttpRequest();try{g.responseType="json";}catch{}g.onreadystatechange=function(){if(g.readyState===4)if(g.status===200)l=p(g),a(l);else try{l=p(g),a(l);}catch(f){s&&s(f);}};try{g.open(["G","E","T"].join(""),d,!0);}catch{g.open(["G","E","T"].join(""),m+"/"+d,!0);}g.send();}}),y.data.type==="loadAnimation"?o.assetLoader.load(y.data.path,y.data.fullPath,function(d){o.dataManager.completeData(d),o.postMessage({id:y.data.id,payload:d,status:"success"});},function(){o.postMessage({id:y.data.id,status:"error"});}):y.data.type==="complete"?(c=y.data.animation,o.dataManager.completeData(c),o.postMessage({id:y.data.id,payload:c,status:"success"})):y.data.type==="loadData"&&o.assetLoader.load(y.data.path,y.data.fullPath,function(d){o.postMessage({id:y.data.id,payload:d,status:"success"});},function(){o.postMessage({id:y.data.id,status:"error"});});},(r=window.Worker&&window.Blob&&getWebWorker()?(h=new Blob(["var _workerSelf = self; self.onmessage = ",x.toString()],{type:"text/javascript"}),h=URL.createObjectURL(h),new Worker(h)):(i=x,n)).onmessage=function(b){var b=b.data,p=b.id,c=t[p];t[p]=null,b.status==="success"?c.onComplete(b.payload):c.onError&&c.onError();});}function E(x,h){var y="processId_"+(e+=1);return t[y]={onComplete:x,onError:h},y;}return{loadAnimation:function(x,h,y){_(),h=E(h,y),r.postMessage({type:"loadAnimation",path:x,fullPath:window.location.origin+window.location.pathname,id:h});},loadData:function(x,h,y){_(),h=E(h,y),r.postMessage({type:"loadData",path:x,fullPath:window.location.origin+window.location.pathname,id:h});},completeAnimation:function(x,h,y){_(),h=E(h,y),r.postMessage({type:"complete",animation:x,id:h});}};}(),ImagePreloader=function(){(i=createTag("canvas")).width=1,i.height=1,(r=i.getContext("2d")).fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1);var i,r,e=i;function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function o(E,x,h){var y="";return y=E.e?E.p:x?x+(x=(x=E.p).indexOf("images/")!==-1?x.split("/")[1]:x):(y=h,(y+=E.u||"")+E.p);}function _(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=function(E){var x=0,h=setInterval(function(){(E.getBBox().width||500<x)&&(this._imageLoaded(),clearInterval(h)),x+=1;}.bind(this),50);}.bind(this),this.createFootageData=function(h){var x={assetData:h},h=o(h,this.assetsPath,this.path);return dataManager.loadData(h,function(y){x.img=y,this._footageLoaded();}.bind(this),function(){x.img={},this._footageLoaded();}.bind(this)),x;}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[];}return _.prototype={loadAssets:function(E,x){this.imagesLoadedCb=x;for(var h=E.length,y=0;y<h;y+=1)E[y].layers||(E[y].t&&E[y].t!=="seq"?E[y].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(E[y]))):(this.totalImages+=1,this.images.push(this._createImageData(E[y]))));},setAssetsPath:function(E){this.assetsPath=E||"";},setPath:function(E){this.path=E||"";},loadedImages:function(){return this.totalImages===this.loadedAssets;},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount;},destroy:function(){this.imagesLoadedCb=null,this.images.length=0;},getAsset:function(E){for(var x=0,h=this.images.length;x<h;){if(this.images[x].assetData===E)return this.images[x].img;x+=1;}return null;},createImgData:function(E){var x=o(E,this.assetsPath,this.path),h=createTag("img"),y=(h.crossOrigin="anonymous",h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){y.img=e,this._imageLoaded();}.bind(this),!1),h.src=x,{img:h,assetData:E});return y;},createImageData:function(E){var x=o(E,this.assetsPath,this.path),h=createNS("image"),y=(isSafari?this.testImageLoaded(h):h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){y.img=e,this._imageLoaded();}.bind(this),!1),h.setAttributeNS("http://www.w3.org/1999/xlink","href",x),this._elementHelper.append?this._elementHelper.append(h):this._elementHelper.appendChild(h),{img:h,assetData:E});return y;},imageLoaded:t,footageLoaded:n,setCacheType:function(E,x){E==="svg"?(this._elementHelper=x,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this);}},_;}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(i,r){if(this._cbs[i])for(var e=this._cbs[i],t=0;t<e.length;t+=1)e[t](r);},addEventListener:function(i,r){return this._cbs[i]||(this._cbs[i]=[]),this._cbs[i].push(r),function(){this.removeEventListener(i,r);}.bind(this);},removeEventListener:function(i,r){if(r){if(this._cbs[i]){for(var e=0,t=this._cbs[i].length;e<t;)this._cbs[i][e]===r&&(this._cbs[i].splice(e,1),--e,--t),e+=1;this._cbs[i].length||(this._cbs[i]=null);}}else this._cbs[i]=null;}};var markerParser=function(i){for(var r=[],e=0;e<i.length;e+=1){var t=i[e],t={time:t.tm,duration:t.dr};try{t.payload=JSON.parse(i[e].cm);}catch{try{t.payload=function(o){for(var _,E=o.split(`\r 138`),x={},h=0,y=0;y<E.length;y+=1)(_=E[y].split(":")).length===2&&(x[_[0]]=_[1].trim(),h+=1);if(h===0)throw new Error();return x;}(i[e].cm);}catch{t.payload={name:i[e].cm};}}r.push(t);}return r;},ProjectInterface=function(){function i(r){this.compositions.push(r);}return function(){function r(e){for(var t=0,n=this.compositions.length;t<n;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1;}return null;}return r.compositions=[],r.currentFrame=0,r.registerComposition=i,r;};}(),renderers={},registerRenderer=function(i,r){renderers[i]=r;};function getRenderer(i){return renderers[i];}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var i in renderers)if(renderers[i])return i;return"";}function _typeof$4(i){return(_typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader(),this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=ne
138w BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin();},animationManager=(extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(i){(i.wrapper||i.container)&&(this.wrapper=i.wrapper||i.container);var r="svg",e=(i.animType?r=i.animType:i.renderer&&(r=i.renderer),getRenderer(r));this.renderer=new e(this,i.rendererSettings),this.imagePreloader.setCacheType(r,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=r,i.loop===""||i.loop===null||i.loop===void 0||i.loop===!0?this.loop=!0:i.loop===!1?this.loop=!1:this.loop=parseInt(i.loop,10),this.autoplay=!("autoplay"in i)||i.autoplay,this.name=i.name||"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(i,"autoloadSegments")||i.autoloadSegments,this.assetsPath=i.assetsPath,this.initialSegment=i.initialSegment,i.audioFactory&&this.audioController.setAudioFactory(i.audioFactory),i.animationData?this.setupAnimation(i.animationData):i.path&&(i.path.lastIndexOf("\\")!==-1?this.path=i.path.substr(0,i.path.lastIndexOf("\\")+1):this.path=i.path.substr(0,i.path.lastIndexOf("/")+1),this.fileName=i.path.substr(i.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(i.path,this.configAnimation,this.onSetupError));},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed");},AnimationItem.prototype.setupAnimation=function(i){dataManager.completeAnimation(i,this.configAnimation);},AnimationItem.prototype.setData=function(t,e){var e={wrapper:t,animationData:e=e&&_typeof$4(e)!=="object"?JSON.parse(e):e},t=t.attributes,n=(e.path=t.getNamedItem("data-animation-path")?t.getNamedItem("data-animation-path").value:t.getNamedItem("data-bm-path")?t.getNamedItem("data-bm-path").value:t.getNamedItem("bm-path")?t.getNamedItem("bm-path").value:"",e.animType=t.getNamedItem("data-anim-type")?t.getNamedItem("data-anim-type").value:t.getNamedItem("data-bm-type")?t.getNamedItem("data-bm-type").value:t.getNamedItem("bm-type")?t.getNamedItem("bm-type").value:t.getNamedItem("data-bm-renderer")?t.getNamedItem("data-bm-renderer").value:t.getNamedItem("bm-renderer")?t.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas",t.getNamedItem("data-anim-loop")?t.getNamedItem("data-anim-loop").value:t.getNamedItem("data-bm-loop")?t.getNamedItem("data-bm-loop").value:t.getNamedItem("bm-loop")?t.getNamedItem("bm-loop").value:""),n=(n==="false"?e.loop=!1:n==="true"?e.loop=!0:n!==""&&(e.loop=parseInt(n,10)),t.getNamedItem("data-anim-
138autoplay")?t.getNamedItem("data-anim-autoplay").value:t.getNamedItem("data-bm-autoplay")?t.getNamedItem("data-bm-autoplay").value:!t.getNamedItem("bm-autoplay")||t.getNamedItem("bm-autoplay").value);e.autoplay=n!=="false",e.name=t.getNamedItem("data-name")?t.getNamedItem("data-name").value:t.getNamedItem("data-bm-name")?t.getNamedItem("data-bm-name").value:t.getNamedItem("bm-name")?t.getNamedItem("bm-name").value:"",(t.getNamedItem("data-anim-prerender")?t.getNamedItem("data-anim-prerender").value:t.getNamedItem("data-bm-prerender")?t.getNamedItem("data-bm-prerender").value:t.getNamedItem("bm-prerender")?t.getNamedItem("bm-prerender").value:"")==="false"&&(e.prerender=!1),e.path?this.setParams(e):this.trigger("destroy");},AnimationItem.prototype.includeLayers=function(i){i.op>this.animationData.op&&(this.animationData.op=i.op,this.totalFrames=Math.floor(i.op-this.animationData.ip));for(var r,e=this.animationData.layers,t=e.length,n=i.layers,o=n.length,_=0;_<o;_+=1)for(r=0;r<t;){if(e[r].id===n[_].id){e[r]=n[_];break;}r+=1;}if((i.chars||i.fonts)&&(this.renderer.globalData.fontManager.addChars(i.chars),this.renderer.globalData.fontManager.addFonts(i.fonts,this.renderer.globalData.defs)),i.assets)for(t=i.assets.length,r=0;r<t;r+=1)this.animationData.assets.push(i.assets[r]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete);},AnimationItem.prototype.onSegmentComplete=function(i){this.animationData=i,i=getExpressionsPlugin(),i&&i.initExpressions(this),this.loadNextSegment();},AnimationItem.prototype.loadNextSegment=function(){var i=this.animationData.segments;i&&i.length!==0&&this.autoloadSegments?(i=i.shift(),this.timeCompleted=i.time*this.frameRate,i=this.path+this.fileName+"_"+this.segmentPos+".json",this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed");}.bind(this))):(this.trigger("data_ready"),this.timeCompleted=this.totalFrames);},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment();},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded();},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this));},AnimationItem.prototype.configAnimation=function(i){if(this.renderer)try{this.animationData=i,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(i),i.assets||(i.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(i.assets),this.markers=markerParser(i.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause();}catch(r){this.triggerConfigError(r);}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20));},AnimationItem.prototype.checkLoaded=function(){var i;!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,(i=getExpressionsPlugin())&&i.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded");}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play());},AnimationItem.prototype.resize=function(i,r){this.renderer.updateContainerSize(typeof i=="number"?i:void 0,typeof r=="number"?r:void 0);},AnimationItem.prototype.setSubframe=function(i){this.isSubframeEnabled=!!i;},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame");},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame
138(),this.renderer.renderFrame(this.currentFrame+this.firstFrame);}catch(i){this.triggerRenderFrameError(i);}},AnimationItem.prototype.play=function(i){i&&this.name!==i||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")));},AnimationItem.prototype.pause=function(i){i&&this.name!==i||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause());},AnimationItem.prototype.togglePause=function(i){i&&this.name!==i||(this.isPaused===!0?this.play():this.pause());},AnimationItem.prototype.stop=function(i){i&&this.name!==i||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0));},AnimationItem.prototype.getMarkerData=function(i){for(var r,e=0;e<this.markers.length;e+=1)if((r=this.markers[e]).payload&&r.payload.name===i)return r;return null;},AnimationItem.prototype.goToAndStop=function(i,r,e){e&&this.name!==e||(e=Number(i),isNaN(e)?(e=this.getMarkerData(i))&&this.goToAndStop(e.time,!0):r?this.setCurrentRawFrameValue(i):this.setCurrentRawFrameValue(i*this.frameModifier),this.pause());},AnimationItem.prototype.goToAndPlay=function(i,r,e){var t;e&&this.name!==e||(t=Number(i),isNaN(t)?(i=this.getMarkerData(i))&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0)):this.goToAndStop(t,r,e),this.play());},AnimationItem.prototype.advanceTime=function(i){var r;this.isPaused!==!0&&this.isLoaded!==!1&&(r=!1,(i=this.currentRawFrame+i*this.frameModifier)>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?i>=this.totalFrames?(this.playCount+=1,this.checkSegments(i%this.totalFrames)||(this.setCurrentRawFrameValue(i%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(i):this.checkSegments(i>this.totalFrames?i%this.totalFrames:0)||(r=!0,i=this.totalFrames-1):i<0?this.checkSegments(i%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(r=!0,i=0):(this.setCurrentRawFrameValue(this.totalFrames+i%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(i),r&&(this.setCurrentRawFrameValue(i),this.pause(),this.trigger("complete")));},AnimationItem.prototype.adjustSegment=function(i,r){this.playCount=0,i[1]<i[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=i[0]-i[1],this.timeCompleted=this.totalFrames,this.firstFrame=i[1],this.setCurrentRawFrameValue(this.totalFrames-.001-r)):i[1]>i[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=i[1]-i[0],this.timeCompleted=this.totalFrames,this.firstFrame=i[0],this.setCurrentRawFrameValue(.001+r)),this.trigger("segmentStart");},AnimationItem.prototype.setSegment=function(i,r){var e=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<i?e=i:this.currentRawFrame+this.firstFrame>r&&(e=r-i)),this.firstFrame=i,this.totalFrames=r-i,this.timeCompleted=this.totalFrames,e!==-1&&this.goToAndStop(e,!0);},AnimationItem.prototype.playSegments=function(i,r){if(r&&(this.segments.length=0),_typeof$4(i[0])==="object")for(var e=i.length,t=0;t<e;t+=1)this.segments.push(i[t]);else this.segments.push(i);this.segments.length&&r&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play();},AnimationItem.prototype.resetSegments=function(i){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),i&&this.checkSegments(0);},AnimationItem.prototype.checkSegments=function(i){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),i),!0);},AnimationItem.prototype.destroy=function(i){i&&this.name!==i||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null);}
vendor: 4,762 bytes, line 138
138,AnimationItem.prototype.setCurrentRawFrameValue=function(i){this.currentRawFrame=i,this.gotoFrame();},AnimationItem.prototype.setSpeed=function(i){this.playSpeed=i,this.updaFrameModifier();},AnimationItem.prototype.setDirection=function(i){this.playDirection=i<0?-1:1,this.updaFrameModifier();},AnimationItem.prototype.setLoop=function(i){this.loop=i;},AnimationItem.prototype.setVolume=function(i,r){r&&this.name!==r||this.audioController.setVolume(i);},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume();},AnimationItem.prototype.mute=function(i){i&&this.name!==i||this.audioController.mute();},AnimationItem.prototype.unmute=function(i){i&&this.name!==i||this.audioController.unmute();},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection);},AnimationItem.prototype.getPath=function(){return this.path;},AnimationItem.prototype.getAssetsPath=function(i){var r,e="";return e=i.e?i.p:this.assetsPath?((r=i.p).indexOf("images/")!==-1&&(r=r.split("/")[1]),this.assetsPath+r):(e=this.path,(e+=i.u||"")+i.p);},AnimationItem.prototype.getAssetData=function(i){for(var r=0,e=this.assets.length;r<e;){if(i===this.assets[r].id)return this.assets[r];r+=1;}return null;},AnimationItem.prototype.hide=function(){this.renderer.hide();},AnimationItem.prototype.show=function(){this.renderer.show();},AnimationItem.prototype.getDuration=function(i){return i?this.totalFrames:this.totalFrames/this.frameRate;},AnimationItem.prototype.updateDocumentData=function(i,r,e){try{this.renderer.getElementByPath(i).updateDocumentData(r,e);}catch{}},AnimationItem.prototype.trigger=function(i){if(this._cbs&&this._cbs[i])switch(i){case"enterFrame":this.triggerEvent(i,new BMEnterFrameEvent(i,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(i,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(i,new BMCompleteLoopEvent(i,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(i,new BMCompleteEvent(i,this.frameMult));break;case"segmentStart":this.triggerEvent(i,new BMSegmentStartEvent(i,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(i,new BMDestroyEvent(i,this));break;default:this.triggerEvent(i);}i==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(i,this.currentFrame,this.totalFrames,this.frameMult)),i==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(i,this.loop,this.playCount,this.frameMult)),i==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(i,this.frameMult)),i==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(i,this.firstFrame,this.totalFrames)),i==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(i,this));},AnimationItem.prototype.triggerRenderFrameError=function(i){i=new BMRenderFrameErrorEvent(i,this.currentFrame),this.triggerEvent("error",i),this.onError&&this.onError.call(this,i);},AnimationItem.prototype.triggerConfigError=function(i){i=new BMConfigErrorEvent(i,this.currentFrame),this.triggerEvent("error",i),this.onError&&this.onError.call(this,i);},function(){var i={},r=[],e=0,t=0,n=0,o=!0,_=!1;function E(m){for(var a=0,s=m.target;a<t;)r[a].animation===s&&(r.splice(a,1),--a,--t,s.isPaused||y()),a+=1;}function x(m,a){if(!m)return null;for(var s=0;s<t;){if(r[s].elem===m&&r[s].elem!==null)return r[s].animation;s+=1;}var l=new AnimationItem();return b(l,m),l.setData(m,a),l;}function h(){n+=1,d();}function y(){--n;}function b(m,a){m.addEventListener("destroy",E),m.addEventListener("_active",h),m.addEventListener("_idle",y),r.push({elem:a,animation:m}),t+=1;}function p(m){for(var a=m-e,s=0;s<t;s+=1)r[s].animation.advanceTime(a);e=m,n&&!_?window.requestAnimationFrame(p):o=!0;}function c(m){e=m,window.requestAnimationFrame(p);}function d(){!_&&n&&o&&(window.requestAnimationFrame(c),o=!1);}return i.registerAnimation=x,i.loadAnimation=function(m){var a=new AnimationItem();return b(a,null),a.setParams(m),a;},i.setSpeed=function(m,a){for(var s=0;s<t;s+=1)r[s].animation.setSpeed(m,a);},i.setDirection=function(m,a){for(var s=0;s<t;s+=1)r[s].animation.setDirection(m,a);},i.play=function(m){for(var a=0;a<t;a+=1)r[a].animation.play(m);},i.pause=function(m){for(var a=0;a<t;a+=1)r[a].animation.pause(m);},i.stop=function(m){for(var a=0;a<t;a+=1)r[a].animation.stop(m);},i.togglePause=function(m){for(var a=0;a<t;a+=1)r[a].animation.togglePause(m);}
138,i.searchAnimations=function(m,a,s){for(var l,g=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),f=g.length,v=0;v<f;v+=1)s&&g[v].setAttribute("data-bm-type",s),x(g[v],m);a&&f===0&&(s=s||"svg",(a=document.getElementsByTagName("body")[0]).innerText="",(l=createTag("div")).style.width="100%",l.style.height="100%",l.setAttribute("data-bm-type",s),a.appendChild(l),x(l,m));},i.resize=function(){for(var m=0;m<t;m+=1)r[m].animation.resize();},i.goToAndStop=function(m,a,s){for(var l=0;l<t;l+=1)r[l].animation.goToAndStop(m,a,s);},i.destroy=function(m){for(var a=t-1;0<=a;--a)r[a].animation.destroy(m);},i.freeze=function(){_=!0;},i.unfreeze=function(){_=!1,d();},i.setVolume=function(m,a){for(var s=0;s<t;s+=1)r[s].animation.setVolume(m,a);},i.mute=function(m){for(var a=0;a<t;a+=1)r[a].animation.mute(m);},i.unmute=function(m){for(var a=0;a<t;a+=1)r[a].animation.unmute(m);},i.getRegisteredAnimations=function(){for(var m=r.length,a=[],s=0;s<m;s+=1)a.push(r[s].animation);return a;},i;}()),BezierFactory=function(){var i={getBezierEasing:function(h,y,b,p,c){return c=c||("bez_"+h+"_"+y+"_"+b+"_"+p).replace(/\./g,"p"),r[c]?r[c]:(h=new x([h,y,b,p]),r[c]=h);}},r={},e=11,t=1/(e-1),n=typeof Float32Array=="function";function o(h,y){return 1-3*y+3*h;}function _(h,y,b){return((o(y,b)*h+(3*b-6*y))*h+3*y)*h;}function E(h,y,b){return 3*o(y,b)*h*h+2*(3*b-6*y)*h+3*y;}function x(h){this._p=h,this._mSampleValues=new(n?Float32Array:Array)(e),this._precomputed=!1,this.get=this.get.bind(this);}return x.prototype={get:function(h){var y=this._p[0],b=this._p[1],p=this._p[2],
138c=this._p[3];return this._precomputed||this._precompute(),y===b&&p===c?h:h===0?0:h===1?1:_(this._getTForX(h),b,c);},_precompute:function(){var h=this._p[0],y=this._p[1],b=this._p[2],p=this._p[3];this._precomputed=!0,h===y&&b===p||this._calcSampleValues();},_calcSampleValues:function(){for(var h=this._p[0],y=this._p[2],b=0;b<e;++b)this._mSampleValues[b]=_(b*t,h,y);},_getTForX:function(h){for(var y=this._p[0],b=this._p[2],p=this._mSampleValues,c=0,d=1,m=e-1;d!==m&&p[d]<=h;++d)c+=t;var a=c+(h-p[--d])/(p[d+1]-p[d])*t,s=E(a,y,b);if(.001<=s){for(var l=h,g=a,f=y,v=b,S=0;S<4;++S){var w=E(g,f,v);if(w===0)return g;g-=(_(g,f,v)-l)/w;}return g;}if(s===0)return a;for(var C,I,O=h,M=c,N=c+t,G=y,H=b,B=0;0<(C=_(I=M+(N-M)/2,G,H)-O)?N=I:M=I,1e-7<Math.abs(C)&&++B<10;);return I;}},i;}(),pooling={double:function(i){return i.concat(createSizedArray(i.length));}},poolFactory=function(i,r,e){var t=0,n=i,o=createSizedArray(n);return{newElement:function(){var _;return _=t?o[--t]:r(),_;},release:function(_){t===n&&(o=pooling.double(o),n*=2),e&&e(_),o[t]=_,t+=1;}};},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())};}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0};},function(i){for(var r=i.lengths.length,e=0;e<r;e+=1)bezierLengthPool.release(i.lengths[e]);i.lengths.length=0;});function bezFunction(){var i=Math;function r(h,y,b,p,c,d){return c=h*p+y*c+b*d-c*p-d*h-b*y,-.001<c&&c<.001;}var e=function(h,y,b,p){for(var c,d,m,a,s=getDefaultCurveSegments(),l=0,g=[],f=[],v=bezierLengthPool.newElement(),S=b.length,w=0;w<s;w+=1){for(m=w/(s-1),c=a=0;c<S;c+=1)d=bmPow(1-m,3)*h[c]+3*bmPow(1-m,2)*m*b[c]+3*(1-m)*bmPow(m,2)*p[c]+bmPow(m,3)*y[c],g[c]=d,f[c]!==null&&(a+=bmPow(g[c]-f[c],2)),f[c]=g[c];a&&(l+=a=bmSqrt(a)),v.percents[w]=m,v.lengths[w]=l;}return v.addedLength=l,v;};function t(h){this.segmentLength=0,this.points=new Array(h);}function n(h,y){this.partialLength=h,this.point=y;}function o(h,y,b,p){var c=(h[0]+"_"+h[1]+"_"+y[0]+"_"+y[1]+"_"+b[0]+"_"+b[1]+"_"+p[0]+"_"+p[1]).replace(/\./g,"p");if(!_[c]){for(var d,m,a,s,l,g=getDefaultCurveSegments(),f=0,v=null,S=new t(g=h.length===2&&(h[0]!==y[0]||h[1]!==y[1])&&r(h[0],h[1],y[0],y[1],h[0]+b[0],h[1]+b[1])&&r(h[0],h[1],y[0],y[1],y[0]+p[0],y[1]+p[1])?2:g),w=b.length,C=0;C<g;C+=1){for(l=createSizedArray(w),a=C/(g-1),d=s=0;d<w;d+=1)m=bmPow(1-a,3)*h[d]+3*bmPow(1-a,2)*a*(h[d]+b[d])+3*(1-a)*bmPow(a,2)*(y[d]+p[d])+bmPow(a,3)*y[d],l[d]=m,v!==null&&(s+=bmPow(l[d]-v[d],2));f+=s=bmSqrt(s),S.points[C]=new n(s,l),v=l;}S.segmentLength=f,_[c]=S;}return _[c];}var _;_={};function E(h,y){var b=y.percents,p=y.lengths,c=b.length,d=bmFloor((c-1)*h),m=h*y.addedLength,a=0;if(d===c-1||d===0||m===p[d])return b[d];for(var s=p[d]>m?-1:1,l=!0;l;)if(p[d]<=m&&p[d+1]>m?(a=(m-p[d])/(p[d+1]-p[d]),l=!1):d+=s,d<0||c-1<=d){if(d===c-1)return b[d];l=!1;}return b[d]+(b[d+1]-b[d])*a;}var x=createTypedArray("float32",8);return{getSegmentsLength:function(h){for(var y=segmentsLengthPool.newElement(),b=h.c,p=h.v,c=h.o,d=h.i,m=h._length,a=y.lengths,s=0,l=0;l<m-1;l+=1)a[l]=e(p[l],p[l+1],c[l],d[l+1]),s+=a[l].addedLength;return b&&m&&(a[l]=e(p[l],p[0],c[l],d[0]),s+=a[l].addedLength),y.totalLength=s,y;},getNewSegment:function(h,y,b,p,c,d,m){c<0?c=0:1<c&&(c=1);for(var c=E(c,m),d=E(d=1<d?1:d,m),a=h.length,s=1-d,l=(m=1-c)*m*m,g=c*m*m*3,f=c*c*m*3,v=c*c*c,S=m*m*s,w=c*m*s+m*c*s+m*m*d,C=c*c*s+m*c*d+c*m*d,I=c*c*d,O=m*s*s,M=c*s*s+m*d*s+m*s*d,N=c*d*s+m*d*d+c*s*d,G=c*d*d,H=s*s*s,B=d*s*s+s*d*s+s*s*d,z=d*d*s+s*d*d+d*s*d,te=d*d*d,K=0;K<a;K+=1)x[4*K]=i.round(1e3*(l*h[K]+g*b[K]+f*p[K]+v*y[K]))/1e3,x[4*K+1]=i.round(1e3*(S*h[K]+w*b[K]+C*p[K]+I*y[K]))/1e3,x[4*K+2]=i.round(1e3*(O*h[K]+M*b[K]+N*p[K]+G*y[K]))/1e3,x[4*K+3]=i.round(1e3*(H*h[K]+B*b[K]+z*p[K]+te*y[K]))/1e3;return x;},getPointInSegment:function(h,y,b,p,c,d){return c=E(c,d),d=1-c,[i.round(1e3*(d*d*d*h[0]+(c*d*d+d*c*d+d*d*c)*b[0]+(c*c*d+d*c*c+c*d*c)*p[0]+c*c*c*y[0]))/1e3,i.round(1e3*(d*d*d*h[1]+(c*d*d+d*c*d+d*d*c)*b[1]+(c*c*d+d*c*c+c*d*c)*p[1]+c*c*c*y[1]))/1e3];},buildBezierData:o,pointOnLine2D:r,pointOnLine3D:function(g,f,b,p,c,d,m,a,s){if(b===0&&d===0&&s===0)return r(g,f,p,c,m,a);var l=i.sqrt(i.pow(p-g,2)+i.pow(c-f,2)+i.pow(d-b,2)),g=i.sqrt(i.pow(m-g,2)+i.pow(a-f,2)+i.pow(s-b,2)),f=i.sqrt(i.pow(m-p,2)+i.pow(a-c,2)+i.pow(s-d,2));return-1e-4<(b=g<l?f<l?l-g-f:f-g-l:g<f?f-g-l:g-l-f)&&b<1e-4;}};}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(i,r){for(var e,t,n,o,_=this.offsetTime,E=(this.propType==="multidimensional"&&(e=createTypedArray("float32",this.pv.length)),r.lastIndex),x=E,h=this.keyframes.length-1,y=!0;y;){if(t=this.keyframes[x],n=this.keyframes[x+1],x===h-1&&i>=n.t-_){t.h&&(t=n),E=0;break;}if(n.t-_>i){E=x;break;}x<h-1?x+=1:(E=0,y=!1);}var b=this.keyframesMetadata[x]||{},p=n.t-_,c=t.t-_;if(t.to){b.bezierData||(b.bezierData=bez.buildBezierData(t.s,n.s||t.e,t.to,t.ti));var d=b.bezierData;if(p<=i||i<c)for(var m=p<=i?d.points.length-1:0,a=d.points[m].point.length,s=0;s<a;s+=1)e[s]=d.points[m].point[s];else{b.__fnct?o=b.__fnct:(o=BezierFactory.getBezierEasing(t.o.x,t.o.y,t.i.x,t.i.y,t.n).get,b.__fnct=o);for(var l,g=o((i-c)/(p-c)),f=d.segmentLength*g,v=r.lastFrame<i&&r._lastKeyframeIndex===x?r._lastAddedLe
vendor: 7,677 bytes, line 138
138ngth:0,S=r.lastFrame<i&&r._lastKeyframeIndex===x?r._lastPoint:0,y=!0,w=d.points.length;y;){if(v+=d.points[S].partialLength,f==0||g===0||S===d.points.length-1){for(a=d.points[S].point.length,s=0;s<a;s+=1)e[s]=d.points[S].point[s];break;}if(v<=f&&f<v+d.points[S+1].partialLength){for(l=(f-v)/d.points[S+1].partialLength,a=d.points[S].point.length,s=0;s<a;s+=1)e[s]=d.points[S].point[s]+(d.points[S+1].point[s]-d.points[S].point[s])*l;break;}S<w-1?S+=1:y=!1;}r._lastPoint=S,r._lastAddedLength=v-d.points[S].partialLength,r._lastKeyframeIndex=x;}}else{var C,I,O,M,N,h=t.s.length,G=n.s||t.e;if(this.sh&&t.h!==1)p<=i?(e[0]=G[0],e[1]=G[1],e[2]=G[2]):i<=c?(e[0]=t.s[0],e[1]=t.s[1],e[2]=t.s[2]):quaternionToEuler(e,slerp(createQuaternion(t.s),createQuaternion(G),(i-c)/(p-c)));else for(x=0;x<h;x+=1)t.h!==1&&(g=p<=i?1:i<c?0:(t.o.x.constructor===Array?(b.__fnct||(b.__fnct=[]),b.__fnct[x]?o=b.__fnct[x]:(C=t.o.x[x]===void 0?t.o.x[0]:t.o.x[x],I=t.o.y[x]===void 0?t.o.y[0]:t.o.y[x],O=t.i.x[x]===void 0?t.i.x[0]:t.i.x[x],M=t.i.y[x]===void 0?t.i.y[0]:t.i.y[x],o=BezierFactory.getBezierEasing(C,I,O,M).get,b.__fnct[x]=o)):b.__fnct?o=b.__fnct:(C=t.o.x,I=t.o.y,O=t.i.x,M=t.i.y,o=BezierFactory.getBezierEasing(C,I,O,M).get,t.keyframeMetadata=o),o((i-c)/(p-c)))),G=n.s||t.e,N=t.h===1?t.s[x]:t.s[x]+(G[x]-t.s[x])*g,this.propType==="multidimensional"?e[x]=N:e=N;}return r.lastIndex=E,e;}function slerp(h,c,e){var t,n,o=[],_=h[0],E=h[1],x=h[2],h=h[3],y=c[0],b=c[1],p=c[2],c=c[3],d=_*y+E*b+x*p+h*c;return d<0&&(d=-d,y=-y,b=-b,p=-p,c=-c),d=1e-6<1-d?(d=Math.acos(d),t=Math.sin(d),n=Math.sin((1-e)*d)/t,Math.sin(e*d)/t):(n=1-e,e),o[0]=n*_+d*y,o[1]=n*E+d*b,o[2]=n*x+d*p,o[3]=n*h+d*c,o;}function quaternionToEuler(i,E){var e=E[0],t=E[1],n=E[2],E=E[3],o=Math.atan2(2*t*E-2*e*n,1-2*t*t-2*n*n),_=Math.asin(2*e*t+2*n*E),E=Math.atan2(2*e*E-2*t*n,1-2*e*e-2*n*n);i[0]=o/degToRads,i[1]=_/degToRads,i[2]=E/degToRads;}function createQuaternion(_){var n=_[0]*degToRads,o=_[1]*degToRads,_=_[2]*degToRads,r=Math.cos(n/2),e=Math.cos(o/2),t=Math.cos(_/2),n=Math.sin(n/2),o=Math.sin(o/2),_=Math.sin(_/2);return[n*o*t+r*e*_,n*e*t+r*o*_,r*o*t-n*e*_,r*e*t-n*o*_];}function getValueAtCurrentTime(){var i=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,e=this.keyframes[this.keyframes.length-1].t-this.offsetTime;return i===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=e&&e<=i||this._caching.lastFrame<r&&i<r)||(this._caching.lastFrame>=i&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0),e=this.interpolateValue(i,this._caching),this.pv=e),this._caching.lastFrame=i,this.pv;}function setVValue(i){var r;if(this.propType==="unidimensional")r=i*this.mult,1e-5<mathAbs(this.v-r)&&(this.v=r,this._mdf=!0);else for(var e=0,t=this.v.length;e<t;)r=i[e]*this.mult,1e-5<mathAbs(this.v[e]-r)&&(this.v[e]=r,this._mdf=!0),e+=1;}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{this.lock=!0,this._mdf=this._isFirstFrame;for(var i=this.effectsSequence.length,r=this.kf?this.pv:this.data.k,e=0;e<i;e+=1)r=this.effectsSequence[e](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId;}}function addEffect(i){this.effectsSequence.push(i),this.container.addDynamicProperty(this);}function ValueProperty(i,r,e,t){this.propType="unidimensional",this.mult=e||1,this.data=r,this.v=e?r.k*e:r.k,this.pv=r.k,this._mdf=!1,this.elem=i,this.container=t,this.comp=i.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect;}function MultiDimensionalProperty(i,r,e,t){this.propType="multidimensional",this.mult=e||1,this.data=r,this._mdf=!1,this.elem=i,this.container=t,this.comp=i.comp,this.k=!1,this.kf=!1,this.frameId=-1;var n,o=r.k.length;for(this.v=createTypedArray("float32",o),this.pv=createTypedArray("float32",o),this.vel=createTypedArray("float32",o),n=0;n<o;n+=1)this.v[n]=r.k[n]*this.mult,this.pv[n]=r.k[n];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect;}function KeyframedValueProperty(i,r,e,t){this.propType="unidimensional",this.keyframes=r.k,this.keyframesMetadata=[],this.offsetTime=i.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=r,this.mult=e||1,this.elem=i,this.container=t,this.comp=i.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect;}function KeyframedMultidimensionalProperty(i,r,e,t){this.propType="multidimensional";for(var n,o,_,E,x=r.k.length,h=0;h<x-1;h+=1)r.k[h].to&&r.k[h].s&&r.k[h+1]&&r.k[h+1].s&&(n=r.k[h].s,o=r.k[h+1].s,_=r.k[h].to,E=r.k[h].ti,(n.length===2&&(n[0]!==o[0]||n[1]!==o[1])&&bez.pointOnLine2D(n[0],n[1],o[0],o[1],n[0]+_[0],n[1]+_[1])&&bez.pointOnLine2D(n[0],n[1],o[0],o[1],o[0]+E[0],o[1]+E[1])||n.length===3&&(n[0]!==o[0]||n[1]!==o[1]||n[2]!==o[2])&&bez.pointOnLine3D(n[0],n[1],n[2],o[0],o[1],o[2],n[0]+_[0],n[1]+_[1],n[2]+_[2])&&bez.pointOnLine3D(n[0],n[1],n[2],o[0],o[1],o[2],o[0]+E[0],o[1]+E[1],o[2]+E[2]))&&(r.k[h].to=null,r.k[h].ti=null),n[0]===o[0]&&n[1]===o[1]&&_[0]===0&&_[1]===0&&E[0]===0&&E[1]===0&&(n.length===2||n[2]===o[2]&&_[2]===0&&E[2]===0)&&(r.k[h].to=null,r.k[h].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=r,this.keyframes=r.k,this.keyframesMetadata=[],this.offsetTime=i.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=e||1,this.elem=i,this.container=t,this.comp=i.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var y=r.k[0].s.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),h=0;h<y;h+=1)this.v[h]=initFrame,this.pv[h]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",y)},this.addEffect=addEffect;}var PropertyFactory={getProp:function(i,r,e,t,n){var o;if((r=r.sid?i.globalData.slotManager.getProp(r):r).k.length){if(typeof r.k[0]=="number")o=new MultiDimensionalProperty(i,r,t,n);else switch(e){case 0:o=new KeyframedValueProperty(i,r,t,n);break;case 1:o=new KeyframedMultidimensionalProperty(i,r,t,n);}}else o=new ValueProperty(i,r,t,n);return o.effectsSequence.length&&n.addDynamicProperty(o),o;}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(i){this.dynamicProperties.indexOf(i)===-1&&(this.dynamicProperties.push(i),this.container.addDynamicProperty(this),this._isAnimated=!0);},iterateDynamicProperties:function(){this._mdf=!1;for(var i=this.dynamicProperties.length,r=0;r<i;r+=1)this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this._mdf=!0);},initDynamicPropertyContainer:function(i){this.container=i,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1;}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2);});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength);}ShapePath.prototype.setPathData=function(i,r){this.c=i,this.setLength(r);for(var e=0;e<r;)this.v[e]=pointPool.newElement(),this.o[e]=pointPool.newElement(),this.i[e]=pointPool.newElement(),e+=1;},ShapePath.prototype.setLength=function(i){for(;this._maxLength<i;
138)this.doubleArrayLength();this._length=i;},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2;},ShapePath.prototype.setXYAt=function(i,r,e,t,n){var o;switch(this._length=Math.max(this._length,t+1),this._length>=this._maxLength&&this.doubleArrayLength(),e){case"v":o=this.v;break;case"i":o=this.i;break;case"o":o=this.o;break;default:o=[];}o[t]&&(!o[t]||n)||(o[t]=pointPool.newElement()),o[t][0]=i,o[t][1]=r;},ShapePath.prototype.setTripleAt=function(i,r,e,t,n,o,_,E){this.setXYAt(i,r,"v",_,E),this.setXYAt(e,t,"o",_,E),this.setXYAt(n,o,"i",_,E);},ShapePath.prototype.reverse=function(){for(var i=new ShapePath(),r=(i.setPathData(this.c,this._length),this.v),e=this.o,t=this.i,n=0,o=(this.c&&(i.setTripleAt(r[0][0],r[0][1],t[0][0],t[0][1],e[0][0],e[0][1],0,!1),n=1),this._length-1),_=this._length,E=n;E<_;E+=1)i.setTripleAt(r[o][0],r[o][1],t[o][0],t[o][1],e[o][0],e[o][1],E,!1),--o;return i;},ShapePath.prototype.length=function(){return this._length;};var shapePool=function(){var i=poolFactory(4,function(){return new ShapePath();},function(r){for(var e=r._length,t=0;t<e;t+=1)pointPool.release(r.v[t]),pointPool.release(r.i[t]),pointPool.release(r.o[t]),r.v[t]=null,r.i[t]=null,r.o[t]=null;r._length=0,r.c=!1;});return i.clone=function(r){var e,t=i.newElement(),n=r._length===void 0?r.v.length:r._length;for(t.setLength(n),t.c=r.c,e=0;e<n;e+=1)t.setTripleAt(r.v[e][0],r.v[e][1],r.o[e][0],r.o[e][1],r.i[e][0],r.i[e][1],e);return t;},i;}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength);}ShapeCollection.prototype.addShape=function(i){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=i,this._length+=1;},ShapeCollection.prototype.releaseShapes=function(){for(var i=0;i<this._length;i+=1)shapePool.release(this.shapes[i]);this._length=0;};var shapeCollectionPool=function(){var i={newShapeCollection:function(){var n;return n=r?t[--r]:new ShapeCollection(),n;},release:function(n){var o,_=n._length;for(o=0;o<_;o+=1)shapePool.release(n.shapes[o]);n._length=0,r===e&&(t=pooling.double(t),e*=2),t[r]=n,r+=1;}},r=0,e=4,t=createSizedArray(e);return i;}(),ShapePropertyFactory=function(){var i=-999999;function r(a,s,l){var g,f,v,S,w,C,I,O=l.lastIndex,M=this.keyframes;if(a<M[0].t-this.offsetTime)g=M[0].s[0],f=!0,O=0;else if(a>=M[M.length-1].t-this.offsetTime)g=(M[M.length-1].s?M[M.length-1].s:M[M.length-2].e)[0],f=!0;else{for(var N,G,H,B,z,te,K=O,V=M.length-1,U=!0;U&&(N=M[K],!((G=M[K+1]).t-this.offsetTime>a));)K<V-1?K+=1:U=!1;H=this.keyframesMetadata[K]||{},O=K,(f=N.h===1)||(z=a>=G.t-this.offsetTime?1:a<N.t-this.offsetTime?0:(H.__fnct?B=H.__fnct:(B=BezierFactory.getBezierEasing(N.o.x,N.o.y,N.i.x,N.i.y).get,H.__fnct=B),B((a-(N.t-this.offsetTime))/(G.t-this.offsetTime-(N.t-this.offsetTime)))),te=(G.s||N.e)[0]),g=N.s[0];}for(w=s._length,C=g.i[0].length,l.lastIndex=O,v=0;v<w;v+=1)for(S=0;S<C;S+=1)I=f?g.i[v][S]:g.i[v][S]+(te.i[v][S]-g.i[v][S])*z,s.i[v][S]=I,I=f?g.o[v][S]:g.o[v][S]+(te.o[v][S]-g.o[v][S])*z,s.o[v][S]=I,I=f?g.v[v][S]:g.v[v][S]+(te.v[v][S]-g.v[v][S])*z,s.v[v][S]=I;}function e(){this.paths=this.localShapeCollection;}function t(a){!function(s,l){if(s._length===l._length&&s.c===l.c){for(var g=s._length,f=0;f<g;f+=1)if(s.v[f][0]!==l.v[f][0]||s.v[f][1]!==l.v[f][1]||s.o[f][0]!==l.o[f][0]||s.o[f][1]!==l.o[f][1]||s.i[f][0]!==l.i[f][0]||s.i[f][1]!==l.i[f][1])return;return 1;}}(this.v,a)&&(this.v=shapePool.clone(a),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection);}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length){if(this.lock)this.setVValue(this.pv);else{this.lock=!0,this._mdf=!1,a=this.kf?this.pv:(this.data.ks||this.data.pt).k;for(var a,s=this.effectsSequence.length,l=0;l<s;l+=1)a=this.effectsSequence[l](a);this.setVValue(a),this.lock=!1,this.frameId=this.elem.globalData.frameId;}}else this._mdf=!1;}function o(a,s,l){this.propType="shape",this.comp=a.comp,this.container=a,this.elem=a,this.data=s,this.k=!1,this.kf=!1,this._mdf=!1,a=(l===3?s.pt:s.ks).k,this.v=shapePool.clone(a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=e,this.effectsSequence=[];}function _(a){this.effectsSequence.push(a),this.container.addDynamicProperty(this);}function E(a,s,l){this.propType="shape",this.comp=a.comp,this.elem=a,this.container=a,this.offsetTime=a.data.st,this.keyframes=(l===3?s.pt:s.ks).k,this.keyframesMetadata=[],this.k=!0,this.kf=!0,a=this.keyframes[0].s[0].i.length,this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=i,this.reset=e,this._caching={lastFrame:i,lastIndex:0},this.effectsSequence=[function(){var g=this.comp.renderedFrame-this.offsetTime,f=this.keyframes[0].t
vendor: 7,618 bytes, line 138
138-this.offsetTime,v=this.keyframes[this.keyframes.length-1].t-this.offsetTime,S=this._caching.lastFrame;return S!==i&&(S<f&&g<f||v<S&&v<g)||(this._caching.lastIndex=S<g?this._caching.lastIndex:0,this.interpolateShape(g,this.pv,this._caching)),this._caching.lastFrame=g,this.pv;}.bind(this)];}o.prototype.interpolateShape=r,o.prototype.getValue=n,o.prototype.setVValue=t,o.prototype.addEffect=_,E.prototype.getValue=n,E.prototype.interpolateShape=r,E.prototype.setVValue=t,E.prototype.addEffect=_,x=roundCorner,y.prototype={reset:e,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath());},convertEllToPath:function(){var a=this.p.v[0],s=this.p.v[1],l=this.s.v[0]/2,g=this.s.v[1]/2,f=this.d!==3,v=this.v;v.v[0][0]=a,v.v[0][1]=s-g,v.v[1][0]=f?a+l:a-l,v.v[1][1]=s,v.v[2][0]=a,v.v[2][1]=s+g,v.v[3][0]=f?a-l:a+l,v.v[3][1]=s,v.i[0][0]=f?a-l*x:a+l*x,v.i[0][1]=s-g,v.i[1][0]=f?a+l:a-l,v.i[1][1]=s-g*x,v.i[2][0]=f?a+l*x:a-l*x,v.i[2][1]=s+g,v.i[3][0]=f?a-l:a+l,v.i[3][1]=s+g*x,v.o[0][0]=f?a+l*x:a-l*x,v.o[0][1]=s-g,v.o[1][0]=f?a+l:a-l,v.o[1][1]=s+g*x,v.o[2][0]=f?a-l*x:a+l*x,v.o[2][1]=s+g,v.o[3][0]=f?a-l:a+l,v.o[3][1]=s-g*x;}},extendPrototype([DynamicPropertyContainer],y);var x,h=y;function y(a,s){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=s.d,this.elem=a,this.comp=a.comp,this.frameId=-1,this.initDynamicPropertyContainer(a),this.p=PropertyFactory.getProp(a,s.p,1,0,this),this.s=PropertyFactory.getProp(a,s.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath());}p.prototype={reset:e,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath());},convertStarToPath:function(){for(var a=2*Math.floor(this.pt.v),s=2*Math.PI/a,l=!0,g=this.or.v,f=this.ir.v,v=this.os.v,S=this.is.v,w=2*Math.PI*g/(2*a),C=2*Math.PI*f/(2*a),I=-Math.PI/2,O=(I+=this.r.v,this.data.d===3?-1:1),M=this.v._length=0;M<a;M+=1){var N=l?v:S,G=l?w:C,H=(B=l?g:f)*Math.cos(I),B=B*Math.sin(I),z=H===0&&B===0?0:B/Math.sqrt(H*H+B*B),te=H===0&&B===0?0:-H/Math.sqrt(H*H+B*B);H+=+this.p.v[0],B+=+this.p.v[1],this.v.setTripleAt(H,B,H-z*G*N*O,B-te*G*N*O,H+z*G*N*O,B+te*G*N*O,M,!0),l=!l,I+=s*O;}},convertPolygonToPath:function(){var a,s=Math.floor(this.pt.v),l=2*Math.PI/s,g=this.or.v,f=this.os.v,v=2*Math.PI*g/(4*s),S=.5*-Math.PI,w=this.data.d===3?-1:1;for(S+=this.r.v,a=this.v._length=0;a<s;a+=1){var C=g*Math.cos(S),I=g*Math.sin(S),O=C===0&&I===0?0:I/Math.sqrt(C*C+I*I),M=C===0&&I===0?0:-C/Math.sqrt(C*C+I*I);C+=+this.p.v[0],I+=+this.p.v[1],this.v.setTripleAt(C,I,C-O*v*f*w,I-M*v*f*w,C+O*v*f*w,I+M*v*f*w,a,!0),S+=l*w;}this.paths.length=0,this.paths[0]=this.v;}},extendPrototype([DynamicPropertyContainer],p);var b=p;function p(a,s){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=a,this.comp=a.comp,this.data=s,this.frameId=-1,this.d=s.d,this.initDynamicPropertyContainer(a),s.sy===1?(this.ir=PropertyFactory.getProp(a,s.ir,0,0,this),this.is=PropertyFactory.getProp(a,s.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(a,s.pt,0,0,this),this.p=PropertyFactory.getProp(a,s.p,1,0,this),this.r=PropertyFactory.getProp(a,s.r,0,degToRads,this),this.or=PropertyFactory.getProp(a,s.or,0,0,this),this.os=PropertyFactory.getProp(a,s.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath());}d.prototype={convertRectToPath:function(){var a=this.p.v[0],s=this.p.v[1],l=this.s.v[0]/2,g=this.s.v[1]/2,f=bmMin(l,g,this.r.v),v=f*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(a+l,s-g+f,a+l,s-g+f,a+l,s-g+v,0,!0),this.v.setTripleAt(a+l,s+g-f,a+l,s+g-v,a+l,s+g-f,1,!0),f!==0?(this.v.setTripleAt(a+l-f,s+g,a+l-f,s+g,a+l-v,s+g,2,!0),this.v.setTripleAt(a-l+f,s+g,a-l+v,s+g,a-l+f,s+g,3,!0),this.v.setTripleAt(a-l,s+g-f,a-l,s+g-f,a-l,s+g-v,4,!0),this.v.setTripleAt(a-l,s-g+f,a-l,s-g+v,a-l,s-g+f,5,!0),this.v.setTripleAt(a-l+f,s-g,a-l+f,s-g,a-l+v,s-g,6,!0),this.v.setTripleAt(a+l-f,s-g,a+l-v,s-g,a+l-f,s-g,7,!0)):(this.v.setTripleAt(a-l,s+g,a-l+v,s+g,a-l,s+g,2),this.v.setTripleAt(a-l,s-g,a-l,s-g+v,a-l,s-g,3))):(this.v.setTripleAt(a+l,s-g+f,a+l,s-g+v,a+l,s-g+f,0,!0),f!==0?(this.v.setTripleAt(a+l-f,s-g,a+l-f,s-g,a+l-v,s-g,1,!0),this.v.setTripleAt(a-l+f,s-g,a-l+v,s-g,a-l+f,s-g,2,!0),this.v.setTripleAt(a-l,s-g+f,a-l,s-g+f,a-l,s-g+v,3,!0),this.v.setTripleAt(a-l,s+g-f,a-l,s+g-v,a-l,s+g-f,4,!0),this.v.setTripleAt(a-l+f,s+g,a-l+f,s+g,a-l+v,s+g,5,!0),this.v.setTripleAt(a+l-f,s+g,a+l-v,s+g,a+l-f,s+g,6,!0),this.v.setTripleAt(a+l,s+g-f,a+l,s+g-f,a+l,s+g-v,7,!0)):(this.v.setTripleAt(a-l,s-g,a-l+v,s-g,a-l,s-g,1,!0),this.v.setTripleAt(a-l,s+g,a-l,s+g-v,a-l,s+g,2,!0),this.v.setTripleAt(a+l,s+g,a+l-v,s+g,a+l,s+g,3,!0)));},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath());},reset:e},extendPrototype([DynamicPropertyContainer],d);var c=d;function d(a,s){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=a,this.comp=a.comp,this.frameId=-1,this.d=s.d,this.initDynamicPropertyContainer(a),this.p=PropertyFactory.getProp(a,s.p,1,0,this),this.s=PropertyFactory.getProp(a,s.s,1,0,this),this.r=PropertyFactory.getProp(a,s.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath());}var m={getShapeProp:function(a,s,l){var g;return l===3||l===4?g=new((l===3?s.pt:s.ks).k.length?E:o)(a,s,l):l===5?g=new c(a,s):l===6?g=new h(a,s):l===7&&(g=new b(a,s)),g.k&&a.addDynamicProperty(g),g;},getConstructorFunction:function(){return o;},getKeyframedConstructorFunction:function(){return E;}};return m;}(),Matrix=function(){var i=Math.cos,r=Math.sin,e=Math.tan,t=Math.round;function n(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this;}function o(U){if(U===0)return this;var V=i(U),U=r(U);return this._t(V,-U,0,0,U,V,0,0,0,0,1,0,0,0,0,1);}function _(U){if(U===0)return this;var V=i(U),U=r(U);return this._t(1,0,0,0,0,V,-U,0,0,U,V,0,0,0,0,1);}function E(U){if(U===0)return this;var V=i(U),U=r(U);return this._t(V,0,U,0,0,1,0,0,-U,0,V,0,0,0,0,1);}function x(U){if(U===0)return this;var V=i(U),U=r(U);return this._t(V,-U,0,0,U,V,0,0,0,0,1,0,0,0,0,1);}function h(K,V){return this._t(1,V,K,1,0,0);}function y(K,V){return this.shear(e(K),e(V));}function b(K,Z){var U=i(Z),Z=r(Z);return this._t(U,Z,0,0,-Z,U,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,e(K),1,0,0,0,0,1,0,0,0,0,1)._t(U,-Z,0,0,Z,U,0,0,0,0,1,0,0,0,0,1);}function p(K,V,U){return U||U===0||(U=1),K===1&&V===1&&U===1?this:this._t(K,0,0,0,0,V,0,0,0,0,U,0,0,0,0,1);}function c(K,V,U,Z,re,ue,q,J,oe,Q,F,X,Y,j,D,$){return this.props[0]=K,this.props[1]=V,this.props[2]=U,this.props[3]=Z,this.props[4]=re,this.props[5]=ue,this.props[6]=q,this.props[7]=J,this.props[8]=oe,this.props[9]=Q,this.props[10]=
138F,this.props[11]=X,this.props[12]=Y,this.props[13]=j,this.props[14]=D,this.props[15]=$,this;}function d(K,V,U){return U=U||0,K!==0||V!==0||U!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,K,V,U,1):this;}function m(K,V,U,Z,re,ue,q,J,oe,Q,F,X,Y,j,D,$){var ne,le,se,fe,ge,he,_e,Re,ee,W,ae,de,ye,Se,De,Ue,Be=this.props;return K===1&&V===0&&U===0&&Z===0&&re===0&&ue===1&&q===0&&J===0&&oe===0&&Q===0&&F===1&&X===0?(Be[12]=Be[12]*K+Be[15]*Y,Be[13]=Be[13]*ue+Be[15]*j,Be[14]=Be[14]*F+Be[15]*D,Be[15]*=$,this._identityCalculated=!1):(ne=Be[0],le=Be[1],se=Be[2],fe=Be[3],ge=Be[4],he=Be[5],_e=Be[6],Re=Be[7],ee=Be[8],W=Be[9],ae=Be[10],de=Be[11],ye=Be[12],Se=Be[13],De=Be[14],Ue=Be[15],Be[0]=ne*K+le*re+se*oe+fe*Y,Be[1]=ne*V+le*ue+se*Q+fe*j,Be[2]=ne*U+le*q+se*F+fe*D,Be[3]=ne*Z+le*J+se*X+fe*$,Be[4]=ge*K+he*re+_e*oe+Re*Y,Be[5]=ge*V+he*ue+_e*Q+Re*j,Be[6]=ge*U+he*q+_e*F+Re*D,Be[7]=ge*Z+he*J+_e*X+Re*$,Be[8]=ee*K+W*re+ae*oe+de*Y,Be[9]=ee*V+W*ue+ae*Q+de*j,Be[10]=ee*U+W*q+ae*F+de*D,Be[11]=ee*Z+W*J+ae*X+de*$,Be[12]=ye*K+Se*re+De*oe+Ue*Y,Be[13]=ye*V+Se*ue+De*Q+Ue*j,Be[14]=ye*U+Se*q+De*F+Ue*D,Be[15]=ye*Z+Se*J+De*X+Ue*$,this._identityCalculated=!1),this;}function a(K){return K=K.props,this.transform(K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],K[8],K[9],K[10],K[11],K[12],K[13],K[14],K[15]);}function s(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity;}function l(K){for(var V=0;V<16;){if(K.props[V]!==this.props[V])return!1;V+=1;}return!0;}function g(K){for(var V=0;V<16;V+=1)K.props[V]=this.props[V];return K;}function f(K){for(var V=0;V<16;V+=1)this.props[V]=K[V];}function v(K,V,U){return{x:K*this.props[0]+V*this.props[4]+U*this.props[8]+this.props[12],y:K*this.props[1]+V*this.props[5]+U*this.props[9]+this.props[13],z:K*this.props[2]+V*this.props[6]+U*this.props[10]+this.props[14]};}function S(K,V,U){return K*this.props[0]+V*this.props[4]+U*this.props[8]+this.props[12];}function w(K,V,U){return K*this.props[1]+V*this.props[5]+U*this.props[9]+this.props[13];}function C(K,V,U){return K*this.props[2]+V*this.props[6]+U*this.props[10]+this.props[14];}function I(){var ue=this.props[0]*this.props[5]-this.props[1]*this.props[4],K=this.props[5]/ue,V=-this.props[1]/ue,U=-this.props[4]/ue,Z=this.props[0]/ue,re=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/ue,ue=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/ue,q=new Matrix();return q.props[0]=K,q.props[1]=V,q.props[4]=U,q.props[5]=Z,q.props[12]=re,q.props[13]=ue,q;}function O(K){return this.getInverseMatrix().applyToPointArray(K[0],K[1],K[2]||0);}function M(K){for(var V=K.length,U=[],Z=0;Z<V;Z+=1)U[Z]=O(K[Z]);return U;}function N(K,V,U){var Z,re,ue,q,J,oe,Q=createTypedArray("float32",6);return this.isIdentity()?(Q[0]=K[0],Q[1]=K[1],Q[2]=V[0],Q[3]=V[1],Q[4]=U[0],Q[5]=U[1]):(Z=this.props[0],re=this.props[1],ue=this.props[4],q=this.props[5],J=this.props[12],oe=this.props[13],Q[0]=K[0]*Z+K[1]*ue+J,Q[1]=K[0]*re+K[1]*q+oe,Q[2]=V[0]*Z+V[1]*ue+J,Q[3]=V[0]*re+V[1]*q+oe,Q[4]=U[0]*Z+U[1]*ue+J,Q[5]=U[0]*re+U[1]*q+oe),Q;}function G(K,V,U){return K=this.isIdentity()?[K,V,U]:[K*this.props[0]+V*this.props[4]+U*this.props[8]+this.props[12],K*this.props[1]+V*this.props[5]+U*this.props[9]+this.props[13],K*this.props[2]+V*this.props[6]+U*this.props[10]+this.props[14]],K;}function H(K,V){if(this.isIdentity())return K+","+V;var U=this.props;return Math.round(100*(K*U[0]+V*U[4]+U[12]))/100+","+Math.round(100*(K*U[1]+V*U[5]+U[13]))/100;}function B(){for(var K=0,V=this.props,U="matrix3d(";K<16;)U=U+t(1e4*V[K])/1e4+(K===15?")":","),K+=1;return U;}function z(K){return K<1e-6&&0<K||-1e-6<K&&K<0?t(1e4*K)/1e4:K;}function te(){var K=this.props;return"matrix("+z(K[0])+","+z(K[1])+","+z(K[4])+","+z(K[5])+","+z(K[12])+","+z(K[13])+")";}return function(){this.reset=n,this.rotate=o,this.rotateX=_,this.rotateY=E,this.rotateZ=x,this.skew=y,this.skewFromAxis=b,this.shear=h,this.scale=p,this.setTransform=c,this.translate=d,this.transform=m,this.multiply=a,this.applyToPoint=v,this.applyToX=S,this.applyToY=w,this.applyToZ=C,this.applyToPointArray=G,this.applyToTriplePoints=N,this.applyToPointStringified=H,this.toCSS=B,this.to2dCSS=te,this.clone=g,this.cloneFromProps=f,this.equals=l,this.inversePoints=M,this.inversePoint=O,this.getInverseMatrix=I,this._t=this.transform,this.isIdentity=s,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset();};}();function _typeof$3(i){return(_typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(i){setLocationHref(i);}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations();}function setSubframeRendering(i){setSubframeEnabled(i);}function setPrefix(i){setIdPrefix(i);}function loadAnimation(i){return standalone===!0&&(i.animationData=JSON.parse(animationData)),animationManager.loadAnimation(i);}
138function setQuality(i){if(typeof i=="string")switch(i){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);}else!isNaN(i)&&1<i&&setDefaultCurveSegments(i);50<=getDefaultCurveSegments()?roundValues(!1):roundValues(!0);}function inBrowser(){return typeof navigator<"u";}function installPlugin(i,r){i==="expressions"&&setExpressionsPlugin(r);}function getFactory(i){switch(i){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null;}}function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations());}function getQueryVariable(i){for(var r=queryString.split("&"),e=0;e<r.length;e+=1){var t=r[e].split("=");if(decodeURIComponent(t[0])==i)return decodeURIComponent(t[1]);}return null;}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="",scripts,index,myScript,queryString,renderer,readyStateCheckInterval=(standalone&&(scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""},queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")),setInterval(checkReady,100));try{_typeof$3(exports)==="object"&&module!==void 0||__webpack_require__(311)||(window.bodymovin=lottie);}catch(i){}var ShapeModifiers=function(){var i={},r={};return i.registerModifier=function(e,t){r[e]||(r[e]=t);},i.getModifier=function(e,t,n){return new r[e](t,n);},i;}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(i){var r;this.closed||(i.sh.container.addDynamicProperty(i.sh),r={shape:i.sh,data:i,localShapeCollection:shapeCollectionPool.newShapeCollection()},this.shapes.push(r),this.addShapeToModifier(r),this._isAnimated&&i.setAsAnimated());},ShapeModifier.prototype.init=function(i,r){this.shapes=[],this.elem=i,this.initDynamicPropertyContainer(i),this.initModifierProperties(i,r),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0);},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties());},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(i,r){this.s=PropertyFactory.getProp(i,r.s,0,.01,this),this.e=PropertyFactory.getProp(i,r.e,0,.01,this),this.o=PropertyFactory.getProp(i,r.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=r.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length;},TrimModifier.prototype.addShapeToModifier=function(i){i.pathsData=[];},TrimModifier.prototype.calculateShapeEdges=function(i,r,e,t,n){for(var o,_,E=[],x=(r<=1?E.push({s:i,e:r}):1<=i?E.push({s:i-1,e:r-1}):(E.push({s:i,e:1}),E.push({s:0,e:r-1})),[]),h=E.length,y=0;y<h;y+=1)(_=E[y]).e*n<t||_.s*n>t+e||(o=_.s*n<=t?0:(_.s*n-t)/e,_=_.e*n>=t+e?1:(_.e*n-t)/e,x.push([o,_]));return x.length||x.push([0,0]),x;},TrimModifier.prototype.releasePathsData=function(i){for(var r=i.length,e=0;e<r;e+=1)segmentsLengthPool.release(i[e]);return i.length=0,i;},TrimModifier.prototype.processShapes=function(i){this._mdf||i?((r=this.o.v%360/360)<0&&(r+=1),e=1<this.s.v?1+r:this.s.v<0?0+r:this.s.v+r,(t=1<this.e.v?1+r:this.e.v<0?0+r:this.e.v+r)<e&&(r=e,e=t,t=r),e=1e-4*Math.round(1e4*e),t=1e-4*Math.round(1e4*t),this.sValue=e,this.eValue=t):(e=this.sValue,t=this.eValue);var r,e,t,n,o,_,E,x,h,y=this.shapes.length,b=0;if(t===e)for(m=0;m<y;m+=1)this.shapes[m].localShapeCollection.releaseShapes(),this.shapes[m].shape._mdf=!0,this.shapes[m].shape.paths=this.shapes[m].localShapeCollection,this._mdf&&(this.shapes[m].pathsData.length=0);else if(t===1&&e===0||t===0&&e===1){if(this._mdf)for(m=0;m<y;m+=1)this.shapes[m].pathsData.length=0,this.shapes[m].shape._mdf=!0;}else{for(var p,c,d=[],m=0;m<y;m+=1)if((p=this.shapes[m]).shape._mdf||this._mdf||i||this.m===2){if(_=(n=
vendor: 12,086 bytes, line 138
138p.shape.paths)._length,h=0,!p.shape._mdf&&p.pathsData.length)h=p.totalShapeLength;else{for(E=this.releasePathsData(p.pathsData),o=0;o<_;o+=1)x=bez.getSegmentsLength(n.shapes[o]),E.push(x),h+=x.totalLength;p.totalShapeLength=h,p.pathsData=E;}b+=h,p.shape._mdf=!0;}else p.shape.paths=p.localShapeCollection;var a,s=e,l=t,g=0;for(m=y-1;0<=m;--m)if((p=this.shapes[m]).shape._mdf){for((c=p.localShapeCollection).releaseShapes(),this.m===2&&1<y?(a=this.calculateShapeEdges(e,t,p.totalShapeLength,g,b),g+=p.totalShapeLength):a=[[s,l]],_=a.length,o=0;o<_;o+=1){s=a[o][0],l=a[o][1],d.length=0,l<=1?d.push({s:p.totalShapeLength*s,e:p.totalShapeLength*l}):1<=s?d.push({s:p.totalShapeLength*(s-1),e:p.totalShapeLength*(l-1)}):(d.push({s:p.totalShapeLength*s,e:p.totalShapeLength}),d.push({s:0,e:p.totalShapeLength*(l-1)}));var f,v=this.addShapes(p,d[0]);d[0].s!==d[0].e&&(1<d.length&&(v=p.shape.paths.shapes[p.shape.paths._length-1].c?(f=v.pop(),this.addPaths(v,c),this.addShapes(p,d[1],f)):(this.addPaths(v,c),this.addShapes(p,d[1]))),this.addPaths(v,c));}p.shape.paths=c;}}},TrimModifier.prototype.addPaths=function(i,r){for(var e=i.length,t=0;t<e;t+=1)r.addShape(i[t]);},TrimModifier.prototype.addSegment=function(i,r,e,t,n,o,_){n.setXYAt(r[0],r[1],"o",o),n.setXYAt(e[0],e[1],"i",o+1),_&&n.setXYAt(i[0],i[1],"v",o),n.setXYAt(t[0],t[1],"v",o+1);},TrimModifier.prototype.addSegmentFromArray=function(i,r,e,t){r.setXYAt(i[1],i[5],"o",e),r.setXYAt(i[2],i[6],"i",e+1),t&&r.setXYAt(i[0],i[4],"v",e),r.setXYAt(i[3],i[7],"v",e+1);},TrimModifier.prototype.addShapes=function(i,r,e){var t,n,o,_,E,x,h,y,b=i.pathsData,p=i.shape.paths.shapes,c=i.shape.paths._length,d=0,m=[],a=!0,s=e?(_=e._length,e._length):(e=shapePool.newElement(),_=0);for(m.push(e),t=0;t<c;t+=1){for(E=b[t].lengths,e.c=p[t].c,o=p[t].c?E.length:E.length+1,n=1;n<o;n+=1)if(d+(y=E[n-1]).addedLength<r.s)d+=y.addedLength,e.c=!1;else{if(d>r.e){e.c=!1;break;}r.s<=d&&r.e>=d+y.addedLength?(this.addSegment(p[t].v[n-1],p[t].o[n-1],p[t].i[n],p[t].v[n],e,_,a),a=!1):(x=bez.getNewSegment(p[t].v[n-1],p[t].v[n],p[t].o[n-1],p[t].i[n],(r.s-d)/y.addedLength,(r.e-d)/y.addedLength,E[n-1]),this.addSegmentFromArray(x,e,_,a),e.c=a=!1),d+=y.addedLength,_+=1;}if(p[t].c&&E.length&&(y=E[n-1],d<=r.e?(h=E[n-1].addedLength,r.s<=d&&r.e>=d+h?(this.addSegment(p[t].v[n-1],p[t].o[n-1],p[t].i[0],p[t].v[0],e,_,a),a=!1):(x=bez.getNewSegment(p[t].v[n-1],p[t].v[0],p[t].o[n-1],p[t].i[0],(r.s-d)/h,(r.e-d)/h,E[n-1]),this.addSegmentFromArray(x,e,_,a),e.c=a=!1)):e.c=!1,d+=y.addedLength,_+=1),e._length&&(e.setXYAt(e.v[s][0],e.v[s][1],"i",s),e.setXYAt(e.v[e._length-1][0],e.v[e._length-1][1],"o",e._length-1)),d>r.e)break;t<c-1&&(e=shapePool.newElement(),a=!0,m.push(e),_=0);}return m;},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(i,r){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(i,r.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length;},PuckerAndBloatModifier.prototype.processPath=function(i,r){for(var e=r/100,t=[0,0],n=i._length,o=0,o=0;o<n;o+=1)t[0]+=i.v[o][0],t[1]+=i.v[o][1];t[0]/=n,t[1]/=n;var _,E,x,h,y,b,p=shapePool.newElement();for(p.c=i.c,o=0;o<n;o+=1)_=i.v[o][0]+(t[0]-i.v[o][0])*e,E=i.v[o][1]+(t[1]-i.v[o][1])*e,x=i.o[o][0]+(t[0]-i.o[o][0])*-e,h=i.o[o][1]+(t[1]-i.o[o][1])*-e,y=i.i[o][0]+(t[0]-i.i[o][0])*-e,b=i.i[o][1]+(t[1]-i.i[o][1])*-e,p.setTripleAt(_,E,x,h,y,b,o);return p;},PuckerAndBloatModifier.prototype.processShapes=function(i){var r,e,t,n=this.shapes.length,o=this.amount.v;if(o!==0)for(var _,E,x=0;x<n;x+=1){if(E=(_=this.shapes[x]).localShapeCollection,_.shape._mdf||this._mdf||i)for(E.releaseShapes(),_.shape._mdf=!0,r=_.shape.paths.shapes,t=_.shape.paths._length,e=0;e<t;e+=1)E.addShape(this.processPath(r[e],o));_.shape.paths=_.localShapeCollection;}this.dynamicProperties.length||(this._mdf=!1);};var TransformPropertyFactory=function(){var i=[0,0];function r(e,t,n){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix(),this.pre=new Matrix(),this.appliedTransformations=0,this.initDynamicPropertyContainer(n||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti)for(var o=t.or.k.length,_=0;_<o;_+=1)t.or.k[_].to=null,t.or.k[_].ti=null;this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0;}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0);}return r.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2]);},getValue:function(e){var t,n,o,_;this.elem.globalData.frameId!==this.frameId&&(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),(this._mdf||e)&&(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime?n=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(t=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(t=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(t=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime)):this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime?(t=[],n=[],o=this.px,_=this.py,o._caching.lastFrame+o.offsetTime<=o.keyframes[0].t?(t[0]=o.getValueAtTime((o.keyframes[0].t+.01)/e,0),t[1]=_.getValueAtTime((_.keyframes[0].t+.01)/e,0),n[0]=o.getValueAtTime(o.keyframes[0].t/e,0),n[1]=_.getValueAtTime(_.keyframes[0].t/e,0)):o._caching.lastFrame+o.offsetTime>=o.keyframes[o.keyframes.length-1].t?(t[0]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/e,0),t[1]=_.getValueAtTime(_.keyframes[_.keyframes.length-1].t/e,0),n[0]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/e,0),n[1]=_.getValueAtTime((_.keyframes[_.keyframes.length-1].t-.01)/e,0)):(t=[o.pv,_.pv],n[0]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/e,o.offsetTime),n[1]=_.getValueAtTime((_._caching.lastFrame+_.offsetTime-.01)/e,_.offsetTime))):t=n=i,this.v.rotate(-Math.atan2(t[1]-n[1],t[0]-n[0]))),this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),this.frameId=this.elem.globalData.frameId);},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4);}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],r),r.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0;},r.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,t,n){return new r(e,t,n);}};}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(i,r){return 1e5*Math.abs(i-r)<=Math.min(Math.abs(i),Math.abs(r));}function floatZero(i){return Math.abs(i)<=1e-5;}function lerp(i,r,e){return i*(1-e)+r*e;}function lerpPoint(i,r,e){return[lerp(i[0],r[0],e),lerp(i[1],r[1],e)];}function quadRoots(i,r,e){return i===0?[]:(e=r*r-4*i*e,e<0?[]:(r=-r/(2*i),e==0?[r]:(e=Math.sqrt(e)/(2*i),[r-e,r+e])));}function polynomialCoefficients(i,r,e,t){return[3*r-i-3*e+t,3*i-6*r+3*e,-3*i+3*r,i];}function singlePoint(i){return new PolynomialBezier(i,i,i,i,!1);}function PolynomialBezier(i,r,e,t,o){o&&pointEqual(i,r)&&(r=lerpPoint(i,t,1/3)),o&&pointEqual(e,t)&&(e=lerpPoint(i,t,2/3));var o=polynomialCoefficients(i[0],r[0],e[0],t[0]),_=polynomialCoefficients(i[1],r[1],e[1],t[1]);this.a=[o[0],_[0]],this.b=[o[1],_[1]],this.c=[o[2],_[2]],this.d=[o[3],_[3]],this.points=[i,r,e,t];}function extrema(i,r){for(var e,t,n=i.points[0][r],o=i.points[i.points.length-1][r],_=(o<n&&(e=o,o=n,n=e),quadRoots(3*i.a[r],2*i.b[r],i.c[r])),E=0;E<_.length;E+=1)0<_[E]&&_[E]<1&&((t=i.point(_[E])[r])<n?n=t:o<t&&(o=t));return{min:n,max:o};}function intersectData(i,r,e){var t=i.boundingBox();return{cx:t.cx,cy:t.cy,width:t.width,height:t.height,bez:i,t:(r+e)/2,t1:r,t2:e};}function splitData(i){var r=i.bez.split(.5);return[intersectData(r[0],i.t1,i.t),intersectData(r[1],i.t,i.t2)];}function boxIntersect(i,r){return 2*Math.abs(i.cx-r.cx)<i.width+r.width&&2*Math.abs(i.cy-r.cy)<i.height+r.height;}function intersectsImpl(i,r,e,t,n,o){boxIntersect(i,r)&&(o<=e||i.width<=t&&i.height<=t&&r.width<=t&&r.height<=t?n.push([i.t,r.t]):(i=splitData(i),r=splitData(r),intersectsImpl(i[0],r[0],e+1,t,n,o),intersectsImpl(i[0],r[1],e+1,t,n,o),intersectsImpl(i[1],r[0],e+1,t,n,o),intersectsImpl(i[1],r[1],e+1,t,n,o)));}function crossProduct(i,r){return[i[1]*r[2]-i[2]*r[1],i[2]*r[0]-i[0]*r[2],i[0]*r[1]-i[1]*r[0]];}function lineIntersection(i,r,e,t){return i=[i[0],i[1],1],r=[r[0],r[1],1],e=[e[0],e[1],1],t=[t[0],t[1],1],i=crossProduct(crossProduct(i,r),crossProduct(e,t)),floatZero(i[2])?null:[i[0]/i[2],i[1]/i[2]];}function polarOffset(i,r,e){return[i[0]+Math.cos(r)*e,i[1]-Math.sin(r)*e];}function pointDistance(i,r){return Math.hypot(i[0]-r[0],i[1]-r[1]);}function pointEqual(i,r){return floatEqual(i[0],r[0])&&floatEqual(i[1],r[1]);}function ZigZagModifier(){}function setPoint(i,y,e,t,n,o,_){var E=e-Math.PI/2,x=e+Math.PI/2,h=y[0]+Math.cos(e)*t*n,y=y[1]-Math.sin(e)*t*n;i.setTripleAt(h,y,h+Math.cos(E)*o,y-Math.sin(E)*o,h+Math.cos(x)*_,y-Math.sin(x)*_,i.length());}function getPerpendicularVector(i,r){return r=[r[0]-i[0],r[1]-i[1]],i=.5*-Math.PI,[Math.
vendor: 5,556 bytes, line 138
138cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]];}function getProjectingAngle(i,e){var t=e===0?i.length()-1:e-1,e=(e+1)%i.length(),t=getPerpendicularVector(i.v[t],i.v[e]);return Math.atan2(0,1)-Math.atan2(t[1],t[0]);}function zigZagCorner(i,r,e,t,n,o,_){var E=getProjectingAngle(r,e),y=r.v[e%r._length],h=r.v[e===0?r._length-1:e-1],x=r.v[(e+1)%r._length],h=o===2?Math.sqrt(Math.pow(y[0]-h[0],2)+Math.pow(y[1]-h[1],2)):0,y=o===2?Math.sqrt(Math.pow(y[0]-x[0],2)+Math.pow(y[1]-x[1],2)):0;setPoint(i,r.v[e%r._length],E,_,t,y/(2*(n+1)),h/(2*(n+1)),o);}function zigZagSegment(i,r,e,t,n,o){for(var _=0;_<t;_+=1){var E=(_+1)/(t+1),x=n===2?Math.sqrt(Math.pow(r.points[3][0]-r.points[0][0],2)+Math.pow(r.points[3][1]-r.points[0][1],2)):0,h=r.normalAngle(E);setPoint(i,r.point(E),h,o,e,x/(2*(t+1)),x/(2*(t+1)),n),o=-o;}return o;}function linearOffset(i,r,e){var t=Math.atan2(r[0]-i[0],r[1]-i[1]);return[polarOffset(i,t,e),polarOffset(r,t,e)];}function offsetSegment(o,_){var E=linearOffset(o.points[0],o.points[1],_),e=E[0],x=E[1],t=(E=linearOffset(o.points[1],o.points[2],_))[0],n=E[1],o=(E=linearOffset(o.points[2],o.points[3],_))[0],_=E[1],E=lineIntersection(e,x,t,n),x=(E===null&&(E=x),lineIntersection(o,_,t,n));return new PolynomialBezier(e,E,x=x===null?o:x,_);}function joinLines(i,r,e,t,n){var o,_=r.points[3],E=e.points[0];if(t===3||pointEqual(_,E))return _;if(t===2)return t=-r.tangentAngle(1),x=-e.tangentAngle(0)+Math.PI,o=lineIntersection(_,polarOffset(_,t+Math.PI/2,100),E,polarOffset(E,t+Math.PI/2,100)),o=polarOffset(_,t,2*(t=o?pointDistance(o,_):pointDistance(_,E)/2)*roundCorner),i.setXYAt(o[0],o[1],"o",i.length()-1),o=polarOffset(E,x,2*t*roundCorner),i.setTripleAt(E[0],E[1],E[0],E[1],o[0],o[1],i.length()),E;var x=lineIntersection(pointEqual(_,r.points[2])?r.points[0]:r.points[2],_,E,pointEqual(E,e.points[1])?e.points[3]:e.points[1]);return x&&pointDistance(x,_)<n?(i.setTripleAt(x[0],x[1],x[0],x[1],x[0],x[1],i.length()),x):_;}function getIntersection(i,r){return i=i.intersections(r),i.length&&floatEqual(i[0][0],1)&&i.shift(),i.length?i[0]:null;}function pruneSegmentIntersection(i,r){var e=i.slice(),t=r.slice(),n=getIntersection(i[i.length-1],r[0]);return n&&(e[i.length-1]=i[i.length-1].split(n[0])[0],t[0]=r[0].split(n[1])[1]),1<i.length&&1<r.length&&(n=getIntersection(i[0],r[r.length-1]))?[[i[0].split(n[0])[0]],[r[r.length-1].split(n[1])[1]]]:[e,t];}function pruneIntersections(i){for(var r,e=1;e<i.length;e+=1)r=pruneSegmentIntersection(i[e-1],i[e]),i[e-1]=r[0],i[e]=r[1];return 1<i.length&&(r=pruneSegmentIntersection(i[i.length-1],i[0]),i[i.length-1]=r[0],i[0]=r[1]),i;}function offsetSegmentSplit(n,r){var o=n.inflectionPoints();if(o.length===0)return[offsetSegment(n,r)];if(o.length===1||floatEqual(o[1],1))return t=(e=n.split(o[0]))[0],_=e[1],[offsetSegment(t,r),offsetSegment(_,r)];var e,t=(e=n.split(o[0]))[0],n=(o[1]-o[0])/(1-o[0]),o=(e=e[1].split(n))[0],_=e[1];return[offsetSegment(t,r),offsetSegment(o,r),offsetSegment(_,r)];}function OffsetPathModifier(){}function getFontProperties(i){for(var r=i.fStyle?i.fStyle.split(" "):[],e="normal",t="normal",n=r.length,o=0;o<n;o+=1)switch(r[o].toLowerCase()){case"italic":t="italic";break;case"bold":e="700";break;case"black":e="900";break;case"medium":e="500";break;case"regular":case"normal":e="400";break;case"light":case"thin":e="200";}return{style:t,weight:i.fWeight||e};}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(i,r){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(i,r.c,0,null,this),this.o=PropertyFactory.getProp(i,r.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(i,r.tr,this),this.so=PropertyFactory.getProp(i,r.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(i,r.tr.eo,0,.01,this),this.data=r,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix(),this.rMatrix=new Matrix(),this.sMatrix=new Matrix(),this.tMatrix=new Matrix(),this.matrix=new Matrix();},RepeaterModifier.prototype.applyTransforms=function(i,r,e,t,n,o){var _=o?-1:1,E=t.s.v[0]+(1-t.s.v[0])*(1-n),x=t.s.v[1]+(1-t.s.v[1])*(1-n);i.translate(t.p.v[0]*_*n,t.p.v[1]*_*n,t.p.v[2]),r.translate(-t.a.v[0],-t.a.v[1],t.a.v[2]),r.rotate(-t.r.v*_*n),r.translate(t.a.v[0],t.a.v[1],t.a.v[2]),e.translate(-t.a.v[0],-t.a.v[1],t.a.v[2]),e.scale(o?1/E:E,o?1/x:x),e.translate(t.a.v[0],t.a.v[1],t.a.v[2]);},RepeaterModifier.prototype.init=function(i,r,e,t){for(this.elem=i,this.arr=r,this.pos=e,this.elemsData=t,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(i),this.initModifierProperties(i,r[e]);0<e;)this._elements.unshift(r[--e]);this.dynamicProperties.length?this.k=!0:this.getValue(!0);},RepeaterModifier.prototype.resetElements=function(i){for(var r=i.length,e=0;e<r;e+=1)i[e]._processed=!1,i[e].ty==="gr"&&this.resetElements(i[e].it);},RepeaterModifier.prototype.cloneElements=function(i){return i=JSON.parse(JSON.stringify(i)),this.resetElements(i),i;},RepeaterModifier.prototype.changeGroupRender=function(i,r){for(var e=i.length,t=0;t<e;t+=1)i[t]._render=r,i[t].ty==="gr"&&this.changeGroupRender(i[t].it,r);},RepeaterModifier.prototype.processShapes=function(i){var r,e,t,n,o,_=!1;if(this._mdf||i){var E,x=Math.ceil(this.c.v);if(this._groups.length<x){for(;this._groups.length<x;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]}
138,s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1;}this.elem.reloadShapes(),_=!0;}for(t=o=0;t<=this._groups.length-1;t+=1)this._groups[t]._render=E=o<x,this.changeGroupRender(this._groups[t].it,E),E||((E=(E=this.elemsData[t].it)[E.length-1]).transform.op.v!==0?(E.transform.op._mdf=!0,E.transform.op.v=0):E.transform.op._mdf=!1),o+=1;this._currentCopies=x;var y,b,i=this.o.v,p=i%1,c=0<i?Math.floor(i):Math.ceil(i),d=this.pMatrix.props,m=this.rMatrix.props,a=this.sMatrix.props,s=(this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset(),0);if(0<i){for(;s<c;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),s+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),s+=p);}else if(i<0){for(;c<s;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),--s;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),s-=p);}for(t=this.data.m===1?0:this._currentCopies-1,n=this.data.m===1?1:-1,o=this._currentCopies;o;){if(b=(e=(r=this.elemsData[t].it)[r.length-1].transform.mProps.v.props).length,r[r.length-1].transform.mProps._mdf=!0,r[r.length-1].transform.op._mdf=!0,r[r.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(t/(this._currentCopies-1)),s!==0){for((t!==0&&n===1||t!==this._currentCopies-1&&n===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),this.matrix.transform(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),y=0;y<b;y+=1)e[y]=this.matrix.props[y];this.matrix.reset();}else for(this.matrix.reset(),y=0;y<b;y+=1)e[y]=this.matrix.props[y];s+=1,--o,t+=n;}}else for(o=this._currentCopies,t=0,n=1;o;)e=(r=this.elemsData[t].it)[r.length-1].transform.mProps.v.props,r[r.length-1].transform.mProps._mdf=!1,r[r.length-1].transform.op._mdf=!1,--o,t+=n;return _;},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(i,r){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(i,r.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length;},RoundCornersModifier.prototype.processPath=function(i,r){for(var e,t,n,o,_,E,x,h,y,b,p=shapePool.newElement(),c=(p.c=i.c,i._length),d=0,m=0;m<c;m+=1)e=i.v[m],n=i.o[m],t=i.i[m],e[0]===n[0]&&e[1]===n[1]&&e[0]===t[0]&&e[1]===t[1]?m!==0&&m!==c-1||i.c?(o=m===0?i.v[c-1]:i.v[m-1],E=(_=Math.sqrt(Math.pow(e[0]-o[0],2)+Math.pow(e[1]-o[1],2)))?Math.min(_/2,r)/_:0,y=e[0]+(o[0]-e[0])*E,b=e[1]-(e[1]-o[1])*E,x=y-(y-e[0])*roundCorner,h=b-(b-e[1])*roundCorner,p.setTripleAt(y,b,x,h,y,b,d),d+=1,o=m===c-1?i.v[0]:i.v[m+1],E=(_=Math.sqrt(Math.pow(e[0]-o[0],2)+Math.pow(e[1]-o[1],2)))?Math.min(_/2,r)/_:0,x=e[0]+(o[0]-e[0])*E,h=e[1]+(o[1]-e[1])*E,y=x-(x-e[0])*roundCorner,b=h-(h-e[1])*roundCorner,p.setTripleAt(x,h,x,h,y,b,d)):p.setTripleAt(e[0],e[1],n[0],n[1],t[0],t[1],d):p.setTripleAt(i.v[m][0],i.v[m][1],i.o[m][0],i.o[m][1],i.i[m][0],i.i[m][1],d),d+=1;return p;},RoundCornersModifier.prototype.processShapes=function(i){var r,e,t,n=this.shapes.length,o=this.rd.v;if(o!==0)for(var _,E,x=0;x<n;x+=1){if(E=(_=this.shapes[x]).localShapeCollection,_.shape._mdf||this._mdf||i)for(E.releaseShapes(),_.shape._mdf=!0,r=_.shape.paths.shapes,t=_.shape.paths._length,e=0;e<t;e+=1)E.addShape(this.processPath(r[e],o));_.shape.paths=_.localShapeCollection;}this.dynamicProperties.length||(this._mdf=!1);},PolynomialBezier.prototype.point=function(i){return[((this.a[0]*i+this.b[0])*i+this.c[0])*i+this.d[0],((this.a[1]*i+this.b[1])*i+this.c[1])*i+this.d[1]];},PolynomialBezier.prototype.derivative=function(i){return[(3*i*this.a[0]+2*this.b[0])*i+this.c[0],(3*i*this.a[1]+2*this.b[1])*i+this.c[1]];},PolynomialBezier.prototype.tangentAngle=function(i){return i=this.derivative(i),Math.atan2(i[1],i[0]);},PolynomialBezier.prototype.normalAngle=function(i){return i=this.derivative(i),Math.atan2(i[0],i[1]);},PolynomialBezier.prototype.inflectionPoints=function(){var r=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(r))return[];var i=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/r,r=i*i-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/r;return r<0?[]:(r=Math.sqrt(r),floatZero(r)?0<r&&r<1?[i]:[]:[i-r,i+r].filter(function(e){return 0<e&&e<1;}));}
vendor: 4,279 bytes, line 138
138,PolynomialBezier.prototype.split=function(o){if(o<=0)return[singlePoint(this.points[0]),this];if(1<=o)return[this,singlePoint(this.points[this.points.length-1])];var r=lerpPoint(this.points[0],this.points[1],o),n=lerpPoint(this.points[1],this.points[2],o),e=lerpPoint(this.points[2],this.points[3],o),t=lerpPoint(r,n,o),n=lerpPoint(n,e,o),o=lerpPoint(t,n,o);return[new PolynomialBezier(this.points[0],r,t,o,!0),new PolynomialBezier(o,n,e,this.points[3],!0)];},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)};},PolynomialBezier.prototype.boundingBox=function(){var i=this.bounds();return{left:i.x.min,right:i.x.max,top:i.y.min,bottom:i.y.max,width:i.x.max-i.x.min,height:i.y.max-i.y.min,cx:(i.x.max+i.x.min)/2,cy:(i.y.max+i.y.min)/2};},PolynomialBezier.prototype.intersections=function(i,r,e){r===void 0&&(r=2),e===void 0&&(e=7);var t=[];return intersectsImpl(intersectData(this,0,1),intersectData(i,0,1),0,r,t,e),t;},PolynomialBezier.shapeSegment=function(i,r){var e=(r+1)%i.length();return new PolynomialBezier(i.v[r],i.o[r],i.i[e],i.v[e],!0);},PolynomialBezier.shapeSegmentInverted=function(i,r){var e=(r+1)%i.length();return new PolynomialBezier(i.v[e],i.i[e],i.o[r],i.v[r],!0);},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(i,r){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(i,r.s,0,null,this),this.frequency=PropertyFactory.getProp(i,r.r,0,null,this),this.pointsType=PropertyFactory.getProp(i,r.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0;},ZigZagModifier.prototype.processPath=function(i,r,e,t){var n=i._length,o=shapePool.newElement();if(o.c=i.c,i.c||--n,n!==0){var _=-1,E=PolynomialBezier.shapeSegment(i,0);zigZagCorner(o,i,0,r,e,t,_);for(var x=0;x<n;x+=1)_=zigZagSegment(o,E,r,e,t,-_),E=x!==n-1||i.c?PolynomialBezier.shapeSegment(i,(x+1)%n):null,zigZagCorner(o,i,x+1,r,e,t,_);}return o;},ZigZagModifier.prototype.processShapes=function(i){var r,e,t,n=this.shapes.length,o=this.amplitude.v,_=Math.max(0,Math.round(this.frequency.v)),E=this.pointsType.v;if(o!==0)for(var x,h,y=0;y<n;y+=1){if(h=(x=this.shapes[y]).localShapeCollection,x.shape._mdf||this._mdf||i)for(h.releaseShapes(),x.shape._mdf=!0,r=x.shape.paths.shapes,t=x.shape.paths._length,e=0;e<t;e+=1)h.addShape(this.processPath(r[e],o,_,E));x.shape.paths=x.localShapeCollection;}this.dynamicProperties.length||(this._mdf=!1);},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(i,r){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(i,r.a,0,null,this),this.miterLimit=PropertyFactory.getProp(i,r.ml,0,null,this),this.lineJoin=r.lj,this._isAnimated=this.amount.effectsSequence.length!==0;},OffsetPathModifier.prototype.processPath=function(i,r,e,t){for(var n,o,_=shapePool.newElement(),E=(_.c=i.c,i.length()),h=(i.c||--E,[]),x=0;x<E;x+=1)o=PolynomialBezier.shapeSegment(i,x),h.push(offsetSegmentSplit(o,r));if(!i.c)for(x=E-1;0<=x;--x)o=PolynomialBezier.shapeSegmentInverted(i,x),h.push(offsetSegmentSplit(o,r));var h=pruneIntersections(h),y=null,b=null;for(x=0;x<h.length;x+=1){var p=h[x];for(b&&(y=joinLines(_,b,p[0],e,t)),b=p[p.length-1],n=0;n<p.length;n+=1)o=p[n],y&&pointEqual(o.points[0],y)?_.setXYAt(o.points[1][0],o.points[1][1],"o",_.length()-1):_.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],_.length()),_.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],_.length()),y=o.points[3];}return h.length&&joinLines(_,b,h[0][0],e,t),_;},OffsetPathModifier.prototype.processShapes=function(i){var r,e,t,n=this.shapes.length,o=this.amount.v,_=this.miterLimit.v,E=this.lineJoin;if(o!==0)for(var x,h,y=0;y<n;y+=1){if(h=(x=this.shapes[y]).localShapeCollection,x.shape._mdf||this._mdf||i)for(h.releaseShapes(),x.shape._mdf=!0,r=x.shape.paths.shapes,t=x.shape.paths._length,e=0;e<t;e+=1)h.addShape(this.processPath(r[e],o,E,_));x.shape.paths=x.localShapeCollection;}this.dynamicProperties.length||(this._mdf=!1);};var FontManager=function(){var i={w:0,size:0,shapes:[],data:{shapes:[]}}
138,r=(r=[]).concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]),e=127462,t=127487,n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function o(b,p){var c=createTag("span"),d=(c.setAttribute("aria-hidden",!0),c.style.fontFamily=p,createTag("span")),m=(d.innerText="giItT1WQy@!-/#",c.style.position="absolute",c.style.left="-10000px",c.style.top="-10000px",c.style.fontSize="300px",c.style.fontVariant="normal",c.style.fontStyle="normal",c.style.fontWeight="normal",c.style.letterSpacing="0",c.appendChild(d),document.body.appendChild(c),d.offsetWidth);return d.style.fontFamily=function(a){for(var s=a.split(","),l=s.length,g=[],f=0;f<l;f+=1)s[f]!=="sans-serif"&&s[f]!=="monospace"&&g.push(s[f]);return g.join(",");}(b)+", "+p,{node:d,w:m,parent:c};}function _(b,p){var c,d,m=document.body&&p?"svg":"canvas",a=getFontProperties(b);return c=m=="svg"?((d=createNS("text")).style.fontSize="100px",d.setAttribute("font-family",b.fFamily),d.setAttribute("font-style",a.style),d.setAttribute("font-weight",a.weight),d.textContent="1",b.fClass?(d.style.fontFamily="inherit",d.setAttribute("class",b.fClass)):d.style.fontFamily=b.fFamily,p.appendChild(d),d):((p=new OffscreenCanvas(500,500).getContext("2d")).font=a.style+" "+a.weight+" 100px "+b.fFamily,p),{measureText:function(s){return m=="svg"?(c.textContent=s,c.getComputedTextLength()):c.measureText(s).width;}};}function E(b){var p=0,c=b.charCodeAt(0);return 55296<=c&&c<=56319&&56320<=(b=b.charCodeAt(1))&&b<=57343&&(p=1024*(c-55296)+b-56320+65536),p;}function x(b){return b=E(b),e<=b&&b<=t;}function h(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this);}h.isModifier=function(b,p){return b=b.toString(16)+p.toString(16),n.indexOf(b)!==-1;},h.isZeroWidthJoiner=function(b){return b===8205;},h.isFlagEmoji=function(b){return x(b.substr(0,2))&&x(b.substr(2,2));},h.isRegionalCode=x,h.isCombinedCharacter=function(b){return r.indexOf(b)!==-1;},h.isRegionalFlag=function(b,p){var c;if(E(b.substr(p,2))!==127988)return!1;var d=0;for(p+=2;d<5;){if((c=E(b.substr(p,2)))<917601||917626<c)return!1;d+=1,p+=2;}return E(b.substr(p,2))===917631;},h.isVariationSelector=function(b){return b===65039;},h.BLACK_FLAG_CODE_POINT=127988;var y={addChars:function(b){if(b){this.chars||(this.chars=[]);for(var p,c,d=b.length,m=this.chars.length,a=0;a<d;a+=1){for(p=0,c=!1;p<m;)this.chars[p].style===b[a].style&&this.chars[p].fFamily===b[a].fFamily&&this.chars[p].ch===b[a].ch&&(c=!0),p+=1;c||(this.chars.push(b[a]),m+=1);}}},addFonts:function(b,p){if(b){if(this.chars)this.isLoaded=!0,this.fonts=b.list;else if(document.body){for(var c=b.list,d=c.length,m=d,a=0;a<d;a+=1){var s,l,g,f,v=!0;if(c[a].loaded=!1,c[a].monoCase=o(c[a].fFamily,"monospace"),c[a].sansCase=o(c[a].fFamily,"sans-serif"),c[a].fPath){if(c[a].fOrigin==="p"||c[a].origin===3)(v=0<(l=document.querySelectorAll('style[f-forigin="p"][f-family="'+c[a].fFamily+'"], style[f-origin="3"][f-family="'+c[a].fFamily+'"]')).length?!1:v)&&((g=createTag("style")).setAttribute("f-forigin",c[a].fOrigin),g.setAttribute("f-origin",c[a].origin),g.setAttribute("f-family",c[a].fFamily),g.type="text/css",g.innerText="@font-face {font-family: "+c[a].fFamily+"; font-style: normal; src: url('"+c[a].fPath+"');}",p.appendChild(g));else if(c[a].fOrigin==="g"||c[a].origin===1){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),s=0;s<l.length;s+=1)l[s].href.indexOf(c[a].fPath)!==-1&&(v=!1);v&&((g=createTag("link")).setAttribute("f-forigin",c[a].fOrigin),g.setAttribute("f-origin",c[a].origin),g.type="text/css",g.rel="stylesheet",g.href=c[a].fPath,document.body.appendChild(g));}else if(c[a].fOrigin==="t"||c[a].origin===2){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),s=0;s<l.length;s+=1)c[a].fPath===l[s].src&&(v=!1);v&&((f=createTag("link")).setAttribute("f-forigin",c[a].fOrigin),f.setAttribute("f-origin",c[a].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",c[a].fPath),p.appendChild(f));}}else c[a].loaded=!0,--m;c[a].helper=_(c[a],p),c[a].cache={},this.fonts.push(c[a]);}m===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100);}else this.isLoaded=!0,b.list.forEach(function(S){S.helper=_(S),S.cache={};}),this.fonts=b.list;}else this.isLoaded=!0;},getCharData:function(b,p,c){for(var d=0,m=this.chars.length;d<m;){if(this.chars[d].ch===b&&this.chars[d].style===p&&this.chars[d].fFamily===c)return this.chars[d];d+=1;}return(typeof b=="string"&&b.charCodeAt(0)!==13||!b)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",b,p,c)),i;},getFontByName:function(b){for(var p=0,c=this.fonts.length;p<c;){if(this.fonts[p].fName===b)return this.fonts[p];p+=1;}return this.fonts[0];},measureText:function(b,s,c){var d,m,a,s=this.getFontByName(s),l=b;return s.cache[l]||(d=s.helper,b===" "?(m=d.measureText("|"+b+"|"),a=d.measureText("||"),s.cache[l]=(m-a)/100):s.cache[l]=d.measureText(b)/100),s.cache[l]*c;},checkLoadedFonts:function(){for(var b,p,c=this.fonts.length,d=c,m=0;m<c;m+=1)this.fonts[m].loaded?--d:this.fonts[m].fOrigin==="n"||this.fonts[m].origin===0?this.fonts[m].loaded=!0:(b=this.fonts[m].monoCase.node,p=this.fonts[m].monoCase.w,b.offsetWidth!==p?(--d,this.fonts[m].loaded=!0):(b=this.fonts[m].sansCase.node,p=this.fonts[m].sansCase.w,b.offsetWidth!==p&&(--d,this.fonts[m].loaded=!0)),this.fonts[m].loaded&&(this.fonts[m].sansCase.parent.parentNode.removeChild(this.fonts[m].sansCase.parent),this.fonts[m].monoCase.parent.parentNode.removeChild(this.fonts[m].monoCase.parent)));d!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10);},setIsLoaded:function(){this.isLoaded=!0;}};return h.prototype=y,h;}();function SlotManager(i){this.animationData=i;}function slotFactory(i){return new SlotManager(i);}
vendor: 15,738 bytes, line 138
138function RenderableElement(){}SlotManager.prototype.getProp=function(i){return this.animationData.slots&&this.animationData.slots[i.sid]?Object.assign(i,this.animationData.slots[i.sid].p):i;},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[];},addRenderableComponent:function(i){this.renderableComponents.indexOf(i)===-1&&this.renderableComponents.push(i);},removeRenderableComponent:function(i){this.renderableComponents.indexOf(i)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(i),1);},prepareRenderableFrame:function(i){this.checkLayerLimits(i);},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show());},checkLayerLimits:function(i){this.data.ip-this.data.st<=i&&this.data.op-this.data.st>i?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide());},renderRenderable:function(){for(var i=this.renderableComponents.length,r=0;r<i;r+=1)this.renderableComponents[r].renderFrame(this._isFirstFrame);},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100};},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height};}};var getBlendMode=function(){var i={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(r){return i[r]||"";};}();function SliderEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,0,0,e);}function AngleEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,0,0,e);}function ColorEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,1,0,e);}function PointEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,1,0,e);}function LayerIndexEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,0,0,e);}function MaskIndexEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,0,0,e);}function CheckboxEffect(i,r,e){this.p=PropertyFactory.getProp(r,i.v,0,0,e);}function NoValueEffect(){this.p={};}function EffectsManager(i,r){for(var e,t=i.ef||[],n=(this.effectElements=[],t.length),o=0;o<n;o+=1)e=new GroupEffect(t[o],r),this.effectElements.push(e);}function GroupEffect(i,r){this.init(i,r);}function BaseElement(){}function FrameElement(){}function FootageElement(i,r,e){this.initFrame(),this.initRenderable(),this.assetData=r.getAssetData(i.refId),this.footageData=r.imageLoader.getAsset(this.assetData),this.initBaseData(i,r,e);}function AudioElement(i,r,e){this.initFrame(),this.initRenderable(),this.assetData=r.getAssetData(i.refId),this.initBaseData(i,r,e),this._isPlaying=!1,this._canPlay=!1,e=this.globalData.getAssetsPath(this.assetData),this.audio=this.globalData.audioController.createAudio(e),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=i.tm?PropertyFactory.getProp(this,i.tm,0,r.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,i.au&&i.au.lv?i.au.lv:{k:[100]},1,.01,this);}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(i,r){this.data=i,this.effectElements=[],this.initDynamicPropertyContainer(r);for(var e,t=this.data.ef.length,n=this.data.ef,o=0;o<t;o+=1){switch(e=null,n[o].ty){case 0:e=new SliderEffect(n[o],r,this);break;case 1:e=new AngleEffect(n[o],r,this);break;case 2:e=new ColorEffect(n[o],r,this);break;case 3:e=new PointEffect(n[o],r,this);break;case 4:case 7:e=new CheckboxEffect(n[o],r,this);break;case 10:e=new LayerIndexEffect(n[o],r,this);break;case 11:e=new MaskIndexEffect(n[o],r,this);break;case 5:e=new EffectsManager(n[o],r,this);break;default:e=new NoValueEffect(n[o],r,this);}e&&this.effectElements.push(e);}},BaseElement.prototype={checkMasks:function(){if(this.data.hasMask)for(var i=0,r=this.data.masksProperties.length;i<r;){if(this.data.masksProperties[i].mode!=="n"&&this.data.masksProperties[i].cl!==!1)return!0;i+=1;}return!1;},initExpressions:function(){var i,r,e,t,n=getExpressionInterfaces();n&&(t=n("layer"),i=n("effects"),r=n("shape"),e=n("text"),n=n("comp"),this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager),t=i.createEffectsInterface(this,this.layerInterface),this.layerInterface.registerEffectsInterface(t),this.data.ty===0||this.data.xt?this.compInterface=n(this):this.data.ty===4?(this.layerInterface.shapeInterface=r(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=e(this),this.layerInterface.text=this.layerInterface.textInterface));},setBlendMode:function(){var i=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=i;},initBaseData:function(i,r,e){this.globalData=r,this.comp=e,this.data=i,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties);},getType:function(){return this.type;},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1;},prepareProperties:function(i,r){for(var e=this.dynamicProperties.length,t=0;t<e;t+=1)(r||this._isParent&&this.dynamicProperties[t].propType==="transform")&&(this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this.globalData._mdf=!0,this._mdf=!0));},addDynamicProperty:function(i){this.dynamicProperties.indexOf(i)===-1&&this.dynamicProperties.push(i);}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null;},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var i=getExpressionInterfaces();i&&(i=i("footage"),this.layerInterface=i(this));},FootageElement.prototype.getFootageData=function(){return this.footageData;},AudioElement.prototype.prepareFrame=function(i){this.prepareRenderableFrame(i,!0),this.prepareProperties(i,!0),this.tm._placeholder?this._currentTime=i/this.data.sr:(i=this.tm.v,this._currentTime=i),this._volume=this.lv.v[0],i=this._volume*this._volumeMultiplier,this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i));},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0));},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1;},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1;},AudioElement.prototype.resume=function(){this._canPlay=!0;},AudioElement.prototype.setRate=function(i){this.audio.rate(i);},AudioElement.prototype.volume=function(i){this._volumeMultiplier=i,this._previousVolume=i*this._volume,this.audio.volume(this._previousVolume);},AudioElement.prototype.getBaseElement=function(){return null;},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(i){var r,e,t=this.layers.length;for(this.completeLayers=!0,r=t-1;0<=r;--r)this.elements[r]||(e=this.layers[r]).ip-e.st<=i-this.layers[r].st&&e.op-e.st>i-this.layers[r].st&&this.buildItem(r),this.completeLayers=!!this.elements[r]&&this.completeLayers;this.checkPendingElements();},BaseRenderer.prototype.createItem=function(i){switch(i.ty){case 2:return this.createImage(i);case 0:return this.createComp(i);case 1:return this.createSolid(i);case 3:return this.createNull(i);case 4:return this.createShape(i);case 5:return this.createText(i);case 6:return this.createAudio(i);case 13:return this.createCamera(i);case 15:return this.createFootage(i);default:return this.createNull(i);}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.");},BaseRenderer.prototype.createAudio=function(i){return new AudioElement(i,this.globalData,this);},BaseRenderer.prototype.createFootage=function(i){return new FootageElement(i,this.globalData,this);},BaseRenderer.prototype.buildAllItems=function(){for(var i=this.layers.length,r=0;r<i;r+=1)this.buildItem(r);this.checkPendingElements();},BaseRenderer.prototype.includeLayers=function(i){this.completeLayers=!1;for(var r,e=i.length,t=this.layers.length,n=0;n<e;n+=1)for(r=0;r<t;){if(this.layers[r].id===i[n].id){this.layers[r]=i[n];break;}r+=1;}},BaseRenderer.prototype.setProjectInterface=function(i){this.globalData.projectInterface=i;},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems();},BaseRenderer.prototype.buildElementParenting=function(i,r,e){for(var t=this.elements,n=this.layers,o=0,_=n.length;o<_;)n[o].ind==r&&(t[o]&&t[o]!==!0?(e.push(t[o]),t[o].setAsParent(),n[o].parent!==void 0?this.buildElementParenting(i,n[o].parent,e):i.setHierarchy(e)):(this.buildItem(o),this.addPendingElement(i))),o+=1;},BaseRenderer.prototype.addPendingElement=function(i){this.pendingElements.push(i);},BaseRenderer.prototype.searchExtraCompositions=function(i){for(var r,e=i.length,t=0;t<e;t+=1)i[t].xt&&((r=this.createComp(i[t])).initExpressions(),this.globalData.projectInterface.registerComposition(r));},BaseRenderer.prototype.getElementById=function(i){for(var r=this.elements.length,e=0;e<r;e+=1)if(this.elements[e].data.ind===i)return this.elements[e];return null;},BaseRenderer.prototype.getElementByPath=function(i){var r,e=i.shift();if(typeof e=="number")r=this.elements[e];else for(var t=this.elements.length,n=0;n<t;n+=1)if(this.elements[n].data.nm===e){r=this.elements[n];break;}return i.length===0?r:r.getElementByPath(i);},BaseRenderer.prototype.setupGlobalData=function(i,r){this.globalData.fontManager=new FontManager(),this.globalData.slotManager=slotFactory(i),this.globalData.fontManager.addChars(i.chars),this.globalData.fontManager.addFonts(i.fonts,r),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=i.fr,this.globalData.nm=i.nm,this.globalData.compSize={w:i.w,h:i.h};};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(i,r,e){this.data=i,this.element=r,this.globalData=e,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;for(var t,n,o,_,E,x=this.globalData.defs,h=this.masksProperties?this.masksProperties.length:0,y=(this.viewData=createSizedArray(h),this.solidPath="",this.masksProperties),b=0,p=[],c=createElementID(),d="clipPath",m="clip-path",a=0;a<h;a+=1)if((y[a].mode!=="a"&&y[a].mode!=="n"||y[a].inv||y[a].o.k!==100||y[a].o.x)&&(m=d="mask"),y[a].mode!=="s"&&y[a].mode!=="i"||b!==0?n=null:((n=createNS("rect")).setAttribute("fill","#ffffff"),n.setAttribute("width",this.element.comp.data.w||0),n.setAttribute("height",this.element.comp.data.h||0),p.push(n)),t=createNS("path"),y[a].mode==="n")this.viewData[a]={op:PropertyFactory.getProp(this.element,y[a].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,y[a],3),elem:t,lastPath:""},x.appendChild(t);else{if(b+=1,t.setAttribute("fill",y[a].mode==="s"?"#000000":"#ffffff"),t.setAttribute("clip-rule","nonzero"),y[a].x.k!==0?(m=d="mask",_=PropertyFactory.getProp(this.element,y[a].x,0,null,this.element),E=createElementID(),(f=createNS("filter")).setAttribute("id",E),(o=createNS("feMorphology")).setAttribute("operator","erode"),o.setAttribute("in","SourceGraphic"),o.setAttribute("radius","0"),f.appendChild(o),x.appendChild(f),t.setAttribute("stroke",y[a].mode==="s"?"#000000":"#ffffff")):_=o=null,this.storedData[a]={elem:t,x:_,expan:o,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},y[a].mode==="i"){for(var s=p.length,l=createNS("g"),g=0;g<s;g+=1)l.appendChild(p[g]);var f=createNS("mask");f.setAttribute("mask-type","alpha"),f.setAttribute("id",c+"_"+b),f.appendChild(t),x.appendChild(f),l.setAttribute("mask","url("+getLocationHref()+"#"+c+"_"+b+")"),p.length=0,p.push(l);}else p.push(t);y[a].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[a]={elem:t,lastPath:"",op:PropertyFactory.getProp(this.element,y[a].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,y[a],3),invRect:n},this.viewData[a].prop.k||this.drawPath(y[a],this.viewData[a].prop.v,this.viewData[a]);}for(this.maskElement=createNS(d),h=p.length,a=0;a<h;a+=1)this.maskElement.appendChild(p[a]);0<b&&(this.maskElement.setAttribute("id",c),this.element.maskedElement.setAttribute(m,"url("+getLocationHref()+"#"+c+")"),x.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this);}TransformElement.prototype={initTransform:function(){var i=new Matrix();this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:i,localMat:i,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty;},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var i,r=this.finalTransform.mat,e=0,t=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;e<t;){if(this.hierarchy[e].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break;}e+=1;}if(this.finalTransform._matMdf)for(i=this.finalTransform.mProp.v.props,r.cloneFromProps(i),e=0;e<t;e+=1)r.multiply(this.hierarchy[e].finalTransform.mProp.v);}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v);},renderLocalTransform:function(){if(this.localTransforms){var i=0,r=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;i<r;)this.localTransforms[i]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[i]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),i+=1;if(this.finalTransform._localMatMdf){var e=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(e),i=1;i<r;i+=1){var t=this.localTransforms[i].matrix;e.multiply(t);}e.multiply(this.finalTransform.mat);}if(this.finalTransform._opMdf){for(var n=this.finalTransform.localOpacity,i=0;i<r;i+=1)n*=.01*this.localTransforms[i].opacity;this.finalTransform.localOpacity=n;}}}
138,searchEffectTransforms:function(){if(this.renderableEffectsManager){var i=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(i.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix();for(var e=0,r=i.length,e=0;e<r;e+=1)this.localTransforms.push(i[e]);}}},globalToLocal:function(i){for(var r=[],e=(r.push(this.finalTransform),!0),t=this.comp;e;)t.finalTransform?(t.data.hasMask&&r.splice(0,0,t.finalTransform),t=t.comp):e=!1;for(var n,o=r.length,_=0;_<o;_+=1)n=r[_].mat.applyToPointArray(0,0,0),i=[i[0]-n[0],i[1]-n[1],0];return i;},mHelper:new Matrix()},MaskElement.prototype.getMaskProperty=function(i){return this.viewData[i].prop;},MaskElement.prototype.renderFrame=function(i){for(var r,e=this.element.finalTransform.mat,t=this.masksProperties.length,n=0;n<t;n+=1)(this.viewData[n].prop._mdf||i)&&this.drawPath(this.masksProperties[n],this.viewData[n].prop.v,this.viewData[n]),(this.viewData[n].op._mdf||i)&&this.viewData[n].elem.setAttribute("fill-opacity",this.viewData[n].op.v),this.masksProperties[n].mode!=="n"&&(this.viewData[n].invRect&&(this.element.finalTransform.mProp._mdf||i)&&this.viewData[n].invRect.setAttribute("transform",e.getInverseMatrix().to2dCSS()),this.storedData[n].x&&(this.storedData[n].x._mdf||i)&&(r=this.storedData[n].expan,this.storedData[n].x.v<0?(this.storedData[n].lastOperator!=="erode"&&(this.storedData[n].lastOperator="erode",this.storedData[n].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[n].filterId+")")),r.setAttribute("radius",-this.storedData[n].x.v)):(this.storedData[n].lastOperator!=="dilate"&&(this.storedData[n].lastOperator="dilate",this.storedData[n].elem.setAttribute("filter",null)),this.storedData[n].elem.setAttribute("stroke-width",2*this.storedData[n].x.v))));},MaskElement.prototype.getMaskelement=function(){return this.maskElement;},MaskElement.prototype.createLayerSolidPath=function(){var i="M0,0 ";return(i+=" h"+this.globalData.compSize.w)+(" v"+this.globalData.compSize.h)+(" h-"+this.globalData.compSize.w)+(" v-"+this.globalData.compSize.h+" ");},MaskElement.prototype.drawPath=function(i,r,e){for(var t,n=" M"+r.v[0][0]+","+r.v[0][1],o=r._length,_=1;_<o;_+=1)n+=" C"+r.o[_-1][0]+","+r.o[_-1][1]+" "+r.i[_][0]+","+r.i[_][1]+" "+r.v[_][0]+","+r.v[_][1];r.c&&1<o&&(n+=" C"+r.o[_-1][0]+","+r.o[_-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.lastPath!==n&&(t="",e.elem&&(r.c&&(t=i.inv?this.solidPath+n:n),e.elem.setAttribute("d",t)),e.lastPath=n);},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null;};var filtersFactory=function(){var i={};return i.createFilter=function(r,e){var t=createNS("filter");return t.setAttribute("id",r),e!==!0&&(t.setAttribute("filterUnits","objectBoundingBox"),t.setAttribute("x","0%"),t.setAttribute("y","0%"),t.setAttribute("width","100%"),t.setAttribute("height","100%")),t;},i.createAlphaToLuminanceFilter=function(){var r=createNS("feColorMatrix");return r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),r;},i;}(),featureSupport=function(){var i={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(i.maskType=!1),/firefox/i.test(navigator.userAgent)&&(i.svgLumaHidden=!1),i;}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(i){var r,e="SourceGraphic",t=i.data.ef?i.data.ef.length:0,n=createElementID(),o=filtersFactory.createFilter(n,!0),_=0;for(this.filters=[],r=0;r<t;r+=1){E=null;var E,x=i.data.ef[r].ty;registeredEffects$1[x]&&(E=new registeredEffects$1[x].effect(o,i.effectsManager.effectElements[r],i,idPrefix+_,e),e=idPrefix+_,registeredEffects$1[x].countsAsEffect&&(_+=1)),E&&this.filters.push(E);}_&&(i.globalData.defs.appendChild(o),i.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+n+")")),this.filters.length&&i.addRenderableComponent(this);}function registerEffect$1(i,r,e){registeredEffects$1[i]={effect:r,countsAsEffect:e};}function SVGBaseElement(){}function HierarchyElement(){}
138function RenderableDOMElement(){}function IImageElement(i,r,e){this.assetData=r.getAssetData(i.refId),this.assetData&&this.assetData.sid&&(this.assetData=r.slotManager.getProp(this.assetData)),this.initElement(i,r,e),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h};}function ProcessedElement(i,r){this.elem=i,this.pos=r;}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(i){for(var r=this.filters.length,e=0;e<r;e+=1)this.filters[e].renderFrame(i);},SVGEffects.prototype.getEffects=function(i){for(var r=this.filters.length,e=[],t=0;t<r;t+=1)this.filters[t].type===i&&e.push(this.filters[t]);return e;},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g");},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var i,r,e,t=null;this.data.td?(this.matteMasks={},(i=createNS("g")).setAttribute("id",this.layerId),i.appendChild(this.layerElement),this.globalData.defs.appendChild(t=i)):this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty!==0||this.data.hd||(i=createNS("clipPath"),(e=createNS("path")).setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z"),r=createElementID(),i.setAttribute("id",r),i.appendChild(e),this.globalData.defs.appendChild(i),this.checkMasks()?((e=createNS("g")).setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),e.appendChild(this.layerElement),this.transformedElement=e,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement):this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")")),this.data.bm!==0&&this.setBlendMode();},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity);},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy();},getBaseElement:function(){return this.data.hd?null:this.baseElement;},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms();},getMatte:function(i){var r,e,t,n,o,_,E,x,h;return this.matteMasks||(this.matteMasks={}),this.matteMasks[i]||(r=this.layerId+"_"+i,i===1||i===3?((_=createNS("mask")).setAttribute("id",r),_.setAttribute("mask-type",i===3?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),_.appendChild(n),this.globalData.defs.appendChild(_),featureSupport.maskType||i!==1||(_.setAttribute("mask-type","luminance"),e=createElementID(),t=filtersFactory.createFilter(e),this.globalData.defs.appendChild(t),t.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(o=createNS("g")).appendChild(n),_.appendChild(o),o.setAttribute("filter","url("+getLocationHref()+"#"+e+")"))):i===2&&((_=createNS("mask")).setAttribute("id",r),_.setAttribute("mask-type","alpha"),E=createNS("g"),_.appendChild(E),e=createElementID(),t=filtersFactory.createFilter(e),(h=createNS("feComponentTransfer")).setAttribute("in","SourceGraphic"),t.appendChild(h),(x=createNS("feFuncA")).setAttribute("type","table"),x.setAttribute("tableValues","1.0 0.0"),h.appendChild(x),this.globalData.defs.appendChild(t),(h=createNS("rect")).setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),E.setAttribute("filter","url("+getLocationHref()+"#"+e+")"),E.appendChild(h),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),E.appendChild(n),featureSupport.maskType||(_.setAttribute("mask-type","luminance"),t.appendChild(filtersFactory.createAlphaToLuminanceFilter()),o=createNS("g"),E.appendChild(h),o.appendChild(this.layerElement),E.appendChild(o)),this.globalData.defs.appendChild(_)),this.matteMasks[i]=r),this.matteMasks[i];},setMatte:function(i){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+i+")");}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting();},setHierarchy:function(i){this.hierarchy=i;},setAsParent:function(){this._isParent=!0;},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[]);}}
vendor: 7,574 bytes, line 138
138,extendPrototype([RenderableElement,createProxyFunction({initElement:function(i,r,e){this.initFrame(),this.initBaseData(i,r,e),this.initTransform(i,r,e),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide();},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0);},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0);},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1));},renderInnerContent:function(){},prepareFrame:function(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.checkTransparency();},destroy:function(){this.innerElem=null,this.destroyBaseElement();}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var i=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this.layerElement.appendChild(this.innerElem);},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect;},IShapeElement.prototype={addShapeToModifiers:function(i){for(var r=this.shapeModifiers.length,e=0;e<r;e+=1)this.shapeModifiers[e].addShape(i);},isShapeInAnimatedModifiers:function(i){for(var r=this.shapeModifiers.length;0<r;)if(this.shapeModifiers[0].isAnimatedWithShape(i))return!0;return!1;},renderModifiers:function(){if(this.shapeModifiers.length){for(var i=this.shapes.length,r=0;r<i;r+=1)this.shapes[r].sh.reset();for(r=(i=this.shapeModifiers.length)-1;0<=r&&!this.shapeModifiers[r].processShapes(this._isFirstFrame);--r);}},searchProcessedElement:function(i){for(var r=this.processedElements,e=0,t=r.length;e<t;){if(r[e].elem===i)return r[e].pos;e+=1;}return 0;},addProcessedElement:function(i,r){for(var e=this.processedElements,t=e.length;t;)if(e[--t].elem===i)return void(e[t].pos=r);e.push(new ProcessedElement(i,r));},prepareFrame:function(i){this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange);}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(i,r,e){this.caches=[],this.styles=[],this.transformers=i,this.lStr="",this.sh=e,this.lvl=r,this._isAnimated=!!e.k;for(var t=0,n=i.length;t<n;){if(i[t].mProps.dynamicProperties.length){this._isAnimated=!0;break;}t+=1;}}function SVGStyleData(i,r){this.data=i,this.type=i.ty,this.d="",this.lvl=r,this._mdf=!1,this.closed=i.hd===!0,this.pElem=createNS("path"),this.msElem=null;}function DashProperty(i,r,e,t){this.elem=i,this.frameId=-1,this.dataProps=createSizedArray(r.length),this.renderer=e,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",r.length?r.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(t);for(var n,o=r.length||0,_=0;_<o;_+=1)n=PropertyFactory.getProp(i,r[_].v,0,0,this),this.k=n.k||this.k,this.dataProps[_]={n:r[_].n,p:n};this.k||this.getValue(!0),this._isAnimated=this.k;}function SVGStrokeStyleData(i,r,e){this.initDynamicPropertyContainer(i),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(i,r.o,0,.01,this),this.w=PropertyFactory.getProp(i,r.w,0,null,this),this.d=new DashProperty(i,r.d||{},"svg",this),this.c=PropertyFactory.getProp(i,r.c,1,255,this),this.style=e,this._isAnimated=!!this._isAnimated;}function SVGFillStyleData(i,r,e){this.initDynamicPropertyContainer(i),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(i,r.o,0,.01,this),this.c=PropertyFactory.getProp(i,r.c,1,255,this),this.style=e;}function SVGNoStyleData(i,r,e){this.initDynamicPropertyContainer(i),this.getValue=this.iterateDynamicProperties,this.style=e;}function GradientProperty(i,r,e){this.data=r,this.c=createTypedArray("uint8c",4*r.p);var t=r.k.k[0].s?r.k.k[0].s.length-4*r.p:r.k.k.length-4*r.p;this.o=createTypedArray("float32",t),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=t,this.initDynamicPropertyContainer(e),this.prop=PropertyFactory.getProp(i,r.k,1,null,this),this.k=this.prop.k,this.getValue(!0);}function SVGGradientFillStyleData(i,r,e){this.initDynamicPropertyContainer(i),this.getValue=this.iterateDynamicProperties,this.initGradientData(i,r,e);}function SVGGradientStrokeStyleData(i,r,e){this.initDynamicPropertyContainer(i),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(i,r.w,0,null,this),this.d=new DashProperty(i,r.d||{},"svg",this),this.initGradientData(i,r,e),this._isAnimated=!!this._isAnimated;}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g");}function SVGTransformData(i,r,e){this.transform={mProps:i,op:r,container:e},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length;}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0;},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1;},DashProperty.prototype.getValue=function(i){if((this.elem.globalData.frameId!==this.frameId||i)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||i,this._mdf)){var r=0,e=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),r=0;r<e;r+=1)this.dataProps[r].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[r].p.v:this.dashArray[r]=this.dataProps[r].p.v:this.dashoffset[0]=this.dataProps[r].p.v;}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(i,r){for(var e=0,t=this.o.length/2;e<t;){if(.01<Math.abs(i[4*e]-i[4*r+2*e]))return!1;e+=1;}return!0;},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var i=0,r=this.data.k.k.length;i<r;){if(!this.comparePoints(this.data.k.k[i].s,this.data.p))return!1;i+=1;}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0;},GradientProperty.prototype.getValue=function(i){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||i){for(var r,e,t=4*this.data.p,n=0;n<t;n+=1)r=n%4==0?100:255,e=Math.round(this.prop.v[n]*r),this.c[n]!==e&&(this.c[n]=e,this._cmdf=!i);if(this.o.length)for(t=this.prop.v.length,n=4*this.data.p;n<t;n+=1)r=n%2==0?100:1,e=n%2==0?Math.round(100*this.prop.v[n]):this.prop.v[n],this.o[n-4*this.data.p]!==e&&(this.o[n-4*this.data.p]=e,this._omdf=!i);this._mdf=!i;}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(i,r,e){this.o=PropertyFactory.getProp(i,r.o,0,.01,this),this.s=PropertyFactory.getProp(i,r.s,1,null,this),this.e=Pro
138pertyFactory.getProp(i,r.e,1,null,this),this.h=PropertyFactory.getProp(i,r.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(i,r.a||{k:0},0,degToRads,this),this.g=new GradientProperty(i,r.g,this),this.style=e,this.stops=[],this.setGradientData(e.pElem,r),this.setGradientOpacity(r,e),this._isAnimated=!!this._isAnimated;},SVGGradientFillStyleData.prototype.setGradientData=function(i,r){for(var e,t=createElementID(),n=createNS(r.t===1?"linearGradient":"radialGradient"),o=(n.setAttribute("id",t),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse"),[]),_=4*r.g.p,E=0;E<_;E+=4)e=createNS("stop"),n.appendChild(e),o.push(e);i.setAttribute(r.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+t+")"),this.gf=n,this.cst=o;},SVGGradientFillStyleData.prototype.setGradientOpacity=function(i,r){if(this.g._hasOpacity&&!this.g._collapsable){for(var e,t,n=createNS("mask"),o=createNS("path"),_=(n.appendChild(o),createElementID()),E=createElementID(),x=(n.setAttribute("id",E),createNS(i.t===1?"linearGradient":"radialGradient")),h=(x.setAttribute("id",_),x.setAttribute("spreadMethod","pad"),x.setAttribute("gradientUnits","userSpaceOnUse"),t=(i.g.k.k[0].s||i.g.k.k).length,this.stops),y=4*i.g.p;y<t;y+=2)(e=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),x.appendChild(e),h.push(e);o.setAttribute(i.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+_+")"),i.ty==="gs"&&(o.setAttribute("stroke-linecap",lineCapEnum[i.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[i.lj||2]),i.lj===1&&o.setAttribute("stroke-miterlimit",i.ml)),this.of=x,this.ms=n,this.ost=h,this.maskId=E,r.msElem=o;}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(i,r,e,t){if(r===0)return"";for(var n=i.o,o=i.i,_=i.v,E=" M"+t.applyToPointStringified(_[0][0],_[0][1]),x=1;x<r;x+=1)E+=" C"+t.applyToPointStringified(n[x-1][0],n[x-1][1])+" "+t.applyToPointStringified(o[x][0],o[x][1])+" "+t.applyToPointStringified(_[x][0],_[x][1]);return E=e&&r?E+(" C"+t.applyToPointStringified(n[x-1][0],n[x-1][1])+" "+t.applyToPointStringified(o[0][0],o[0][1])+" "+t.applyToPointStringified(_[0][0],_[0][1]))+"z":E;},SVGElementsRenderer=function(){var i=new Matrix(),r=new Matrix();function e(h,y,b){(b||y.transform.op._mdf)&&y.transform.container.setAttribute("opacity",y.transform.op.v),(b||y.transform.mProps._mdf)&&y.transform.container.setAttribute("transform",y.transform.mProps.v.to2dCSS());}function t(){}function n(h,y,b){for(var p,c,d,m,a,s,l,g,f,v=y.styles.length,S=y.lvl,w=0;w<v;w+=1){if(m=y.sh._mdf||b,y.styles[w].lvl<S){for(l=r.reset(),g=S-y.styles[w].lvl,f=y.transformers.length-1;!m&&0<g;)m=y.transformers[f].mProps._mdf||m,--g,--f;if(m)for(g=S-y.styles[w].lvl,f=y.transformers.length-1;0<g;)l.multiply(y.transformers[f].mProps.v),--g,--f;}else l=i;if(c=(s=y.sh.paths)._length,m){for(d="",p=0;p<c;p+=1)(a=s.shapes[p])&&a._length&&(d+=buildShapeString(a,a._length,a.c,l));y.caches[w]=d;}else d=y.caches[w];y.styles[w].d+=h.hd===!0?"":d,y.styles[w]._mdf=m||y.styles[w]._mdf;}}function o(h,y,b){var p=y.style;(y.c._mdf||b)&&p.pElem.setAttribute("fill","rgb("+bmFloor(y.c.v[0])+","+bmFloor(y.c.v[1])+","+bmFloor(y.c.v[2])+")"),(y.o._mdf||b)&&p.pElem.setAttribute("fill-opacity",y.o.v);}function _(h,y,b){E(h,y,b),x(0,y,b);}function E(h,y,b){var p,c,d,m,a=y.gf,s=y.g._hasOpacity,l=y.s.v,g=y.e.v;if((y.o._mdf||b)&&(d=h.ty==="gf"?"fill-opacity":"stroke-opacity",y.style.pElem.setAttribute(d,y.o.v)),(y.s._mdf||b)&&(m=(d=h.t===1?"x1":"cx")=="x1"?"y1":"cy",a.setAttribute(d,l[0]),a.setAttribute(m,l[1]),s&&!y.g._collapsable&&(y.of.setAttribute(d,l[0]),y.of.setAttribute(m,l[1]))),y.g._cmdf||b)for(var f=y.cst,v=y.g.c,S=f.length,w=0;w<S;w+=1)(p=f[w]).setAttribute("offset",v[4*w]+"%"),p.setAttribute("stop-color","rgb("+v[4*w+1]+","+v[4*w+2]+","+v[4*w+3]+")");if(s&&(y.g._omdf||b)){var C=y.g.o;for(S=(f=y.g._collapsable?y.cst:y.ost).length,w=0;w<S;w+=1)p=f[w],y.g._collapsable||p.setAttribute("offset",C[2*w]+"%"),p.setAttribute("stop-opacity",C[2*w+1]);}h.t===1?(y.e._mdf||b)&&(a.setAttribute("x2",g[0]),a.setAttribute("y2",g[1]),s&&!y.g._collapsable&&(y.of.setAttribute("x2",g[0]),y.of.setAttribute("y2",g[1]))):((y.s._mdf||y.e._mdf||b)&&(c=Math.sqrt(Math.pow(l[0]-g[0],2)+Math.pow(l[1]-g[1],2)),a.setAttribute("r",c),s&&!y.g._collapsable&&y.of.setAttribute("r",c)),(y.e._mdf||y.h._mdf||y.a._mdf||b)&&(c=c||Math.sqrt(Math.pow(l[0]-g[0],2)+Math.pow(l[1]-g[1],2)),d=Math.atan2(g[1]-l[1],g[0]-l[0]),1<=(m=y.h.v)?m=.99:m<=-1&&(m=-.99),h=c*m,b=Math.cos(d+y.a.v)*h+l[0],g=Math.sin(d+y.a.v)*h+l[1],a.setAttribute("fx",b),a.setAttribute("fy",g),s&&!y.g._collapsable&&(y.of.setAttribute("fx",b),y.of.setAttribute("fy",g))));}function x(h,y,b){var p=y.style,c=y.d;c&&(c._mdf||b)&&c.dashStr&&(p.pElem.setAttribute("stroke-dasharray",c.dashStr),p.pElem.setAttribute("stroke-dashoffset",c.dashoffset[0])),y.c&&(y.c._mdf||b)&&p.pElem.setAttribute("stroke","rgb("+bmFloor(y.c.v[0])+","+bmFloor(y.c.v[1])+","+bmFloor(y.c.v[2])+")"),(y.o._mdf||b)&&p.pElem.setAttribute("stroke-opacity",y.o.v),(y.w._mdf||b)&&(p.pElem.setAttribute("stroke-width",y.w.v),p.msElem&&p.msElem.setAttribute("stroke-width",y.w.v));}return{createRenderFunction:function(h){switch(h.ty){case"fl":return o;case"gf":return E;case"gs":return _;case"st":return x;case"sh":case"el":case"rc":case"sr":return n;case"tr":return e;case"no":return t;default:return null;}}};}();function SVGShapeElement(i,r,e){this.shapes=[],this.shapesData=i.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(i,r,e),this.prevViewData=[];}function LetterProps(i,r,e,t,n,o){this.o=i,this.sw=r,this.sc=e,this.fc=t,this.m=n,this.p=o,this._mdf={o:!0,sw:!!r,sc:!!e,fc:!!t,m:!0,p:!0};}function TextProperty(i,r){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,r.d&&r.d.sid&&(r.d=i.globalData.slotManager.getProp(r.d)),this.data=r,this.elem=i,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData);}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix(),SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes();},SVGShapeElement.prototype.filterUniqueShapes=function(){for(var i,r,e,t=this.shapes.length,n=this.stylesList.length,o=[],_=!1,E=0;E<n;E+=1){for(e=this.stylesList[E],_=!1,i=o.length=0;i<t;i+=1)(r=this.shapes[i]).styles.indexOf(e)!==-1&&(o.push(r),_=r._isAnimated||_);1<o.length&&_&&this.setShapesAsAnimated(o);}},SVGShapeElement.prototype.setShapesAsAnimated=function(i){for(var r=i.length,e=0;e<r;e+=1)i[e].setAsAnimated();},SVGShapeElement.prototype.createStyleElement=function(i,t){var e,t=new SVGStyleData(i,t),n=t.pElem;return i.ty==="st"?e=new SVGStrokeStyleData(this,i,t):i.ty==="fl"?e=new SVGFillStyleData(this,i,t):i.ty==="gf"||i.ty==="gs"?(e=new(i.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,i,t),this.globalData.defs.appendChild(e.gf),e.maskId&&(this.globalData.defs.appendChild(e.ms),this.globalData.defs.appendChild(e.of),n.setAttribute("mask","url("+getLocationHref()+"#"+e.maskId+")"))):i.ty==="no"&&(e=new SVGNoStyleData(this,i,t)),i.ty!=="st"&&i.ty!=="gs"||(n.setAttribute("stroke-linecap",lineCapEnum[i.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[i.lj||2]),n.setAttribute("fill-opacity","0"),i.lj===1&&n.setAttribute("stroke-miterlimit",i.ml)),i.r===2&&n.setAttribute("fill-rule","evenodd"),i.ln&&n.setAttribute("id",i.ln),i.cl&&n.setAttribute("class",i.cl),i.bm&&(n.style["mix-blend-mode"]=getBlendM
vendor: 6,328 bytes, line 138
138ode(i.bm)),this.stylesList.push(t),this.addToAnimatedContents(i,e),e;},SVGShapeElement.prototype.createGroupElement=function(i){var r=new ShapeGroupData();return i.ln&&r.gr.setAttribute("id",i.ln),i.cl&&r.gr.setAttribute("class",i.cl),i.bm&&(r.gr.style["mix-blend-mode"]=getBlendMode(i.bm)),r;},SVGShapeElement.prototype.createTransformElement=function(i,r){var e=TransformPropertyFactory.getTransformProperty(this,i,this),e=new SVGTransformData(e,e.o,r);return this.addToAnimatedContents(i,e),e;},SVGShapeElement.prototype.createShapeElement=function(i,r,e){var t=4;return i.ty==="rc"?t=5:i.ty==="el"?t=6:i.ty==="sr"&&(t=7),r=new SVGShapeData(r,e,ShapePropertyFactory.getShapeProp(this,i,t,this)),this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(i,r),r;},SVGShapeElement.prototype.addToAnimatedContents=function(i,r){for(var e=0,t=this.animatedContents.length;e<t;){if(this.animatedContents[e].element===r)return;e+=1;}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(i),element:r,data:i});},SVGShapeElement.prototype.setElementStyles=function(i){for(var r=i.styles,e=this.stylesList.length,t=0;t<e;t+=1)this.stylesList[t].closed||r.push(this.stylesList[t]);},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;for(var i=this.itemsData.length,r=0;r<i;r+=1)this.prevViewData[r]=this.itemsData[r];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),i=this.dynamicProperties.length,r=0;r<i;r+=1)this.dynamicProperties[r].getValue();this.renderModifiers();},SVGShapeElement.prototype.searchShapes=function(i,r,e,t,n,o,_){for(var E,x,h,y,b,p=[].concat(o),c=i.length-1,d=[],m=[],a=c;0<=a;--a){if((b=this.searchProcessedElement(i[a]))?r[a]=e[b-1]:i[a]._render=_,i[a].ty==="fl"||i[a].ty==="st"||i[a].ty==="gf"||i[a].ty==="gs"||i[a].ty==="no")b?r[a].style.closed=!1:r[a]=this.createStyleElement(i[a],n),i[a]._render&&r[a].style.pElem.parentNode!==t&&t.appendChild(r[a].style.pElem),d.push(r[a].style);else if(i[a].ty==="gr"){if(b)for(x=r[a].it.length,E=0;E<x;E+=1)r[a].prevViewData[E]=r[a].it[E];else r[a]=this.createGroupElement(i[a]);this.searchShapes(i[a].it,r[a].it,r[a].prevViewData,r[a].gr,n+1,p,_),i[a]._render&&r[a].gr.parentNode!==t&&t.appendChild(r[a].gr);}else i[a].ty==="tr"?(b||(r[a]=this.createTransformElement(i[a],t)),h=r[a].transform,p.push(h)):i[a].ty==="sh"||i[a].ty==="rc"||i[a].ty==="el"||i[a].ty==="sr"?(b||(r[a]=this.createShapeElement(i[a],p,n)),this.setElementStyles(r[a])):i[a].ty==="tm"||i[a].ty==="rd"||i[a].ty==="ms"||i[a].ty==="pb"||i[a].ty==="zz"||i[a].ty==="op"?(b?(y=r[a]).closed=!1:((y=ShapeModifiers.getModifier(i[a].ty)).init(this,i[a]),r[a]=y,this.shapeModifiers.push(y)),m.push(y)):i[a].ty==="rp"&&(b?(y=r[a]).closed=!0:(y=ShapeModifiers.getModifier(i[a].ty),(r[a]=y).init(this,i,a,r),this.shapeModifiers.push(y),_=!1),m.push(y));this.addProcessedElement(i[a],a+1);}for(c=d.length,a=0;a<c;a+=1)d[a].closed=!0;for(c=m.length,a=0;a<c;a+=1)m[a].closed=!0;},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();for(var i=this.stylesList.length,r=0;r<i;r+=1)this.stylesList[r].reset();for(this.renderShape(),r=0;r<i;r+=1)(this.stylesList[r]._mdf||this._isFirstFrame)&&(this.stylesList[r].msElem&&(this.stylesList[r].msElem.setAttribute("d",this.stylesList[r].d),this.stylesList[r].d="M0 0"+this.stylesList[r].d),this.stylesList[r].pElem.setAttribute("d",this.stylesList[r].d||"M0 0"));},SVGShapeElement.prototype.renderShape=function(){for(var i,r=this.animatedContents.length,e=0;e<r;e+=1)i=this.animatedContents[e],(this._isFirstFrame||i.element._isAnimated)&&i.data!==!0&&i.fn(i.data,i.element,this._isFirstFrame);},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null;},LetterProps.prototype.update=function(i,r,e,t,n,o){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var _=this._mdf.p=!1;return this.o!==i&&(this.o=i,_=this._mdf.o=!0),this.sw!==r&&(this.sw=r,_=this._mdf.sw=!0),this.sc!==e&&(this.sc=e,_=this._mdf.sc=!0),this.fc!==t&&(this.fc=t,_=this._mdf.fc=!0),this.m!==n&&(this.m=n,_=this._mdf.m=!0),!o.length||this.p[0]===o[0]&&this.p[1]===o[1]&&this.p[4]===o[4]&&this.p[5]===o[5]&&this.p[12]===o[12]&&this.p[13]===o[13]||(this.p=o,_=this._mdf.p=!0),_;},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(i,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e]);return i;},TextProperty.prototype.setCurrentData=function(i){i.__complete||this.completeTextData(i),this.currentData=i,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0;},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes();},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf;},TextProperty.prototype.addEffect=function(i){this.effectsSequence.push(i),this.elem.addDynamicProperty(this);},TextProperty.prototype.getValue=function(i){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||i){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var r=this.currentData,e=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{this.lock=!0,this._mdf=!1;for(var t=this.effectsSequence.length,n=i||this.data.d.k[this.keysIndex].s,o=0;o<t;o+=1)n=e!==this.keysIndex?this.effectsSequence[o](n,n.t):this.effectsSequence[o](this.currentData,n.t);r!==n&&this.setCurrentData(n),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId;}}},TextProperty.prototype.getKeyframeValue=function(){for(var i=this.data.d.k,r=this.elem.comp.renderedFrame,e=0,t=i.length;e<=t-1&&!(e===t-1||i[e+1].t>r);)e+=1;return this.keysIndex!==e&&(this.keysIndex=e),this.data.d.k[this.keysIndex].s;},TextProperty.prototype.buildFinalText=function(i){for(var r,e,t=[],n=0,o=i.length,_=!1,E=!1,x="";n<o;)_=E,E=!1,r=i.charCodeAt(n),x=i.charAt(n),FontManager.isCombinedCharacter(r)?_=!0:55296<=r&&r<=56319?FontManager.isRegionalFlag(i,n)?x=i.substr(n,14):56320<=(e=i.charCodeAt(n+1))&&e<=57343&&(FontManager.isModifier(r,e)?(x=i.substr(n,2),_=!0):x=FontManager.isFlagEmoji(i.substr(n,4))?i.substr(n,4):i.substr(n,2)):
13856319<r?(e=i.charCodeAt(n+1),FontManager.isVariationSelector(r)&&(_=!0)):FontManager.isZeroWidthJoiner(r)&&(E=_=!0),_?(t[t.length-1]+=x,_=!1):t.push(x),n+=x.length;return t;},TextProperty.prototype.completeTextData=function(i){i.__complete=!0;var r,e,t,n,o=this.elem.globalData.fontManager,_=this.data,E=[],x=0,h=_.m.g,y=0,b=0,p=0,c=[],d=0,m=0,a=o.getFontByName(i.f),N=0,s=getFontProperties(a),l=(i.fWeight=s.weight,i.fStyle=s.style,i.finalSize=i.s,i.finalText=this.buildFinalText(i.t),C=i.finalText.length,i.finalLineHeight=i.lh,i.tr/1e3*i.finalSize);if(i.sz)for(var g=!0,f=i.sz[0],v=i.sz[1];g;){for(var S,w=0,d=0,C=(S=this.buildFinalText(i.t)).length,l=i.tr/1e3*i.finalSize,I=-1,O=0;O<C;O+=1)n=S[O].charCodeAt(0),r=!1,S[O]===" "?I=O:n!==13&&n!==3||(r=!(d=0),w+=i.finalLineHeight||1.2*i.finalSize),d=f<d+(N=o.chars?(t=o.getCharData(S[O],a.fStyle,a.fFamily),r?0:t.w*i.finalSize/100):o.measureText(S[O],i.f,i.finalSize))&&S[O]!==" "?(I===-1?C+=1:O=I,w+=i.finalLineHeight||1.2*i.finalSize,S.splice(O,I===O?1:0,"\r"),I=-1,0):d+N+l;w+=a.ascent*i.finalSize/100,this.canResize&&i.finalSize>this.minimumFontSize&&v<w?(--i.finalSize,i.finalLineHeight=i.finalSize*i.lh/i.s):(i.finalText=S,C=i.finalText.length,g=!1);}d=-l;var M,N=0,G=0;for(O=0;O<C;O+=1)if(r=!1,(n=(M=i.finalText[O]).charCodeAt(0))===13||n===3?(G=0,c.push(d),m=m<d?d:m,d=-2*l,r=!(e=""),p+=1):e=M,N=o.chars?(t=o.getCharData(M,a.fStyle,o.getFontByName(i.f).fFamily),r?0:t.w*i.finalSize/100):o.measureText(e,i.f,i.finalSize),M===" "?G+=N+l:(d+=N+l+G,G=0),E.push({l:N,an:N,add:y,n:r,anIndexes:[],val:e,line:p,animatorJustifyOffset:0}),h==2){if(y+=N,e===""||e===" "||O===C-1){for(e!==""&&e!==" "||(y-=N);b<=O;)E[b].an=y,E[b].ind=x,E[b].extra=N,b+=1;x+=1,y=0;}}else if(h==3){if(y+=N,e===""||O===C-1){for(e===""&&(y-=N);b<=O;)E[b].an=y,E[b].ind=x,E[b].extra=N,b+=1;y=0,x+=1;}}else E[x].ind=x,E[x].extra=0,x+=1;if(i.l=E,m=m<d?d:m,c.push(d),i.sz)i.boxWidth=i.sz[0],i.justifyOffset=0;else switch(i.boxWidth=m,i.j){case 1:i.justifyOffset=-i.boxWidth;break;case 2:i.justifyOffset=-i.boxWidth/2;break;default:i.justifyOffset=0;}i.lineWidths=c;for(var H,B,z,te,K=_.a,V=K.length,U=[],Z=0;Z<V;Z+=1){for((H=K[Z]).a.sc&&(i.strokeColorAnim=!0),H.a.sw&&(i.strokeWidthAnim=!0),(H.a.fc||H.a.fh||H.a.fs||H.a.fb)&&(i.fillColorAnim=!0),z=H.s.b,O=te=0;O<C;O+=1)(B=E[O]).anIndexes[Z]=te,(z==1&&B.val!==""||z==2&&B.val!==""&&B.val!==" "||z==3&&(B.n||B.val==" "||O==C-1)||z==4&&(B.n||O==C-1))&&(H.s.rn===1&&U.push(te),te+=1);_.a[Z].s.totalChars=te;var re,ue=-1;if(H.s.rn===1)for(O=0;O<C;O+=1)ue!=(B=E[O]).anIndexes[Z]&&(ue=B.anIndexes[Z],re=U.splice(Math.floor(Math.random()*U.length),1)[0]),B.anIndexes[Z]=re;}i.yOffset=i.finalLineHeight||1.2*i.finalSize,i.ls=i.ls||0,i.ascent=a.ascent*i.finalSize/100;},TextProperty.prototype.updateDocumentData=function(i,r){r=r===void 0?this.keysIndex:r;var e=this.copyData({},this.data.d.k[r].s),e=this.copyData(e,i);this.data.d.k[r].s=e,this.recalculate(r),this.setCurrentData(e),this.elem.addDynamicProperty(this);},TextProperty.prototype.recalculate=function(i){i=this.data.d.k[i].s,i.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(i);},TextProperty.prototype.canResizeFont=function(i){this.canResize=i,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this);},TextProperty.prototype.setMinimumFontSize=function(i){this.minimumFontSize=Math.floor(i)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this);};var TextSelectorProp=function(){var i=Math.max,r=Math.min,e=Math.floor;function t(n,o){this._currentTextLength=-1,this.k=!1,this.data=o,this.elem=n,this.comp=n.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(n),this.s=PropertyFactory.getProp(n,o.s||{k:0},0,0,this),"e"in o?this.e=PropertyFactory.getProp(n,o.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(n,o.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(n,o.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(n,o.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(n,o.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(n,o.a,0,.01,this),this.dynamicProperties.length||this.getValue();}return t.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var o,_=0,E=0,x=1,h=1,_=(0<this.ne.v?_=this.ne.v/100:E=-this.ne.v/100,0<this.xe.v?x=1-this.xe.v/100:h=1+this.xe.v/100,BezierFactory.getBezierEasing(_,E,x,h).get),E=0,x=this.finalS,h=this.finalE,y=this.data.sh;
138return E=y===2?_(E=h===x?h<=n?1:0:i(0,r(.5/(h-x)+(n-x)/(h-x),1))):y===3?_(E=h===x?h<=n?0:1:1-i(0,r(.5/(h-x)+(n-x)/(h-x),1))):y===4?(h===x?E=0:(E=i(0,r(.5/(h-x)+(n-x)/(h-x),1)))<.5?E*=2:E=1-2*(E-.5),_(E)):_(E=y===5?h===x?0:(o=-(_=h-x)/2+(n=r(i(0,n+.5-x),h-x)),_=_/2,Math.sqrt(1-o*o/(_*_))):y===6?h===x?0:(n=r(i(0,n+.5-x),h-x),(1+Math.cos(Math.PI+2*Math.PI*n/(h-x)))/2):n>=e(x)?i(0,r(n-x<0?r(h,1)-(x-n):h-n,1)):E),this.sm.v!==100&&(E<(_=.5-.5*(o=(o=.01*this.sm.v)===0?1e-8:o))?E=0:1<(E=(E-_)/o)&&(E=1)),E*this.a.v;},getValue:function(E){this.iterateDynamicProperties(),this._mdf=E||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,E&&this.data.r===2&&(this.e.v=this._currentTextLength);var E=this.data.r===2?1:100/this.data.totalChars,o=this.o.v/E,_=this.s.v/E+o,E=this.e.v/E+o;E<_&&(o=_,_=E,E=o),this.finalS=_,this.finalE=E;}},extendPrototype([DynamicPropertyContainer],t),{getTextSelectorProp:function(n,o,_){return new t(n,o);}};}();function TextAnimatorDataProperty(i,r,e){var t={propType:!1},n=PropertyFactory.getProp,o=r.a;this.a={r:o.r?n(i,o.r,0,degToRads,e):t,rx:o.rx?n(i,o.rx,0,degToRads,e):t,ry:o.ry?n(i,o.ry,0,degToRads,e):t,sk:o.sk?n(i,o.sk,0,degToRads,e):t,sa:o.sa?n(i,o.sa,0,degToRads,e):t,s:o.s?n(i,o.s,1,.01,e):t,a:o.a?n(i,o.a,1,0,e):t,o:o.o?n(i,o.o,0,.01,e):t,p:o.p?n(i,o.p,1,0,e):t,sw:o.sw?n(i,o.sw,0,0,e):t,sc:o.sc?n(i,o.sc,1,0,e):t,fc:o.fc?n(i,o.fc,1,0,e):t,fh:o.fh?n(i,o.fh,0,0,e):t,fs:o.fs?n(i,o.fs,0,.01,e):t,fb:o.fb?n(i,o.fb,0,.01,e):t,t:o.t?n(i,o.t,0,0,e):t},this.s=TextSelectorProp.getTextSelectorProp(i,r.s,e),this.s.t=r.s.t;}function TextAnimatorProperty(i,r,e){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=i,this._renderType=r,this._elem=e,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(e);}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){for(var i,r=this._textData.a.length,e=PropertyFactory.getProp,t=0;t<r;t+=1)i=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,i,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:e(this._elem,this._textData.p.a,0,0,this),f:e(this._elem,this._textData.p.f,0,0,this),l:e(this._elem,this._textData.p.l,0,0,this),r:e(this._elem,this._textData.p.r,0,0,this),p:e(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=e(this._elem,this._textData.m.a,1,0,this);},TextAnimatorProperty.prototype.getMeasures=function(i,r){if(this.lettersChangedFlag=r,this._mdf||this._isFirstFrame||r||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var e,t,n,o,_,E,x,h,y,b,p,c,d,m=this._moreOptions.alignment.v,a=this._animatorsData,s=this._textData,l=this.mHelper,g=this._renderType,f=this.renderedLetters.length,v=i.l;if(this._hasMaskedPath){if(d=this._pathData.m,!this._pathData.n||this._pathData._mdf){for(var S,w=d.v,C={tLength:0,segments:[]},I=(w=this._pathData.r.v?w.reverse():w)._length-1,O=p=0;O<I;O+=1)S=bez.buildBezierData(w.v[O],w.v[O+1],[w.o[O][0]-w.v[O][0],w.o[O][1]-w.v[O][1]],[w.i[O+1][0]-w.v[O+1][0],w.i[O+1][1]-w.v[O+1][1]]),C.tLength+=S.segmentLength,C.segments.push(S),p+=S.segmentLength;O=I,d.v.c&&(S=bez.buildBezierData(w.v[O],w.v[0],[w.o[O][0]-w.v[O][0],w.o[O][1]-w.v[O][1]],[w.i[0][0]-w.v[0][0],w.i[0][1]-w.v[0][1]]),C.tLength+=S.segmentLength,C.segments.push(S),p+=S.segmentLength),this._pathData.pi=C;}if(C=this._pathData.pi,e=this._pathData.f.v,_=1,o=!(n=E=0),y=C.segments,e<0&&d.v.c)for(C.tLength<Math.abs(e)&&(e=-Math.abs(e)%C.tLength),_=(h=y[E=y.length-1].points).length-1;e<0;)e+=h[_].partialLength,--_<0&&(_=(h=y[--E].points).length-1);x=(h=y[E].points)[_-1],b=(t=h[_]).partialLength;}I=v.length;var M,N,G,H,B,z,te,K,V,U,Z,re,ue,q,J,oe,Q=0,F=0,X=1.2*i.finalSize*.714,Y=!0,j=a.length,D=-1,$=e,ne=E,le=_,se=-1,fe="",ge=this.defaultPropsArray;if(i.j===2||i.j===1){var he=0,_e=0,Re=i.j===2?-.5:-1,ee=0,W=!0;for(O=0;O<I;O+=1)if(v[O].n){for(he&&(he+=_e);ee<O;)v[ee].animatorJustifyOffset=he,ee+=1;W=!(he=0);}else{for(de=0;de<j;
vendor: 4,164 bytes, line 138
138de+=1)(M=a[de].a).t.propType&&(W&&i.j===2&&(_e+=M.t.v*Re),(G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars)).length?he+=M.t.v*G[0]*Re:he+=M.t.v*G*Re);W=!1;}for(he&&(he+=_e);ee<O;)v[ee].animatorJustifyOffset=he,ee+=1;}for(O=0;O<I;O+=1){if(l.reset(),te=1,v[O].n)Q=0,F=F+i.yOffset+(Y?1:0),e=$,Y=!1,this._hasMaskedPath&&(x=(h=y[E=ne].points)[(_=le)-1],b=(t=h[_]).partialLength,n=0),J=re=q=fe="",ge=this.defaultPropsArray;else{if(this._hasMaskedPath){if(se!==v[O].line){switch(i.j){case 1:e+=p-i.lineWidths[v[O].line];break;case 2:e+=(p-i.lineWidths[v[O].line])/2;}se=v[O].line;}D!==v[O].ind&&(v[D]&&(e+=v[D].extra),e+=v[O].an/2,D=v[O].ind),e+=m[0]*v[O].an*.005;for(var ae=0,de=0;de<j;de+=1)(M=a[de].a).p.propType&&((G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars)).length?ae+=M.p.v[0]*G[0]:ae+=M.p.v[0]*G),M.a.propType&&((G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars)).length?ae+=M.a.v[0]*G[0]:ae+=M.a.v[0]*G);for(o=!0,this._pathData.a.v&&(e=.5*v[0].an+(p-this._pathData.f.v-.5*v[0].an-.5*v[v.length-1].an)*D/(I-1),e+=this._pathData.f.v);o;)e+ae<=n+b||!h?(c=(e+ae-n)/t.partialLength,B=x.point[0]+(t.point[0]-x.point[0])*c,z=x.point[1]+(t.point[1]-x.point[1])*c,l.translate(-m[0]*v[O].an*.005,-m[1]*X*.01),o=!1):h&&(n+=t.partialLength,(_+=1)>=h.length&&(_=0,h=y[E+=1]?y[E].points:d.v.c?y[E=_=0].points:(n-=t.partialLength,null)),h&&(x=t,b=(t=h[_]).partialLength));H=v[O].an/2-v[O].add,l.translate(-H,0,0);}else H=v[O].an/2-v[O].add,l.translate(-H,0,0),l.translate(-m[0]*v[O].an*.005,-m[1]*X*.01,0);for(de=0;de<j;de+=1)(M=a[de].a).t.propType&&(G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars),Q===0&&i.j===0||(this._hasMaskedPath?G.length?e+=M.t.v*G[0]:e+=M.t.v*G:G.length?Q+=M.t.v*G[0]:Q+=M.t.v*G));for(i.strokeWidthAnim&&(V=i.sw||0),i.strokeColorAnim&&(K=i.sc?[i.sc[0],i.sc[1],i.sc[2]]:[0,0,0]),i.fillColorAnim&&i.fc&&(U=[i.fc[0],i.fc[1],i.fc[2]]),de=0;de<j;de+=1)(M=a[de].a).a.propType&&((G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars)).length?l.translate(-M.a.v[0]*G[0],-M.a.v[1]*G[1],M.a.v[2]*G[2]):l.translate(-M.a.v[0]*G,-M.a.v[1]*G,M.a.v[2]*G));for(de=0;de<j;de+=1)(M=a[de].a).s.propType&&((G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars)).length?l.scale(1+(M.s.v[0]-1)*G[0],1+(M.s.v[1]-1)*G[1],1):l.scale(1+(M.s.v[0]-1)*G,1+(M.s.v[1]-1)*G,1));for(de=0;de<j;de+=1){if(M=a[de].a,G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars),M.sk.propType&&(G.length?l.skewFromAxis(-M.sk.v*G[0],M.sa.v*G[1]):l.skewFromAxis(-M.sk.v*G,M.sa.v*G)),M.r.propType&&(G.length?l.rotateZ(-M.r.v*G[2]):l.rotateZ(-M.r.v*G)),M.ry.propType&&(G.length?l.rotateY(M.ry.v*G[1]):l.rotateY(M.ry.v*G)),M.rx.propType&&(G.length?l.rotateX(M.rx.v*G[0]):l.rotateX(M.rx.v*G)),M.o.propType&&(G.length?te+=(M.o.v*G[0]-te)*G[0]:te+=(M.o.v*G-te)*G),i.strokeWidthAnim&&M.sw.propType&&(G.length?V+=M.sw.v*G[0]:V+=M.sw.v*G),i.strokeColorAnim&&M.sc.propType)for(Z=0;Z<3;Z+=1)G.length?K[Z]+=(M.sc.v[Z]-K[Z])*G[0]:K[Z]+=(M.sc.v[Z]-K[Z])*G;if(i.fillColorAnim&&i.fc){if(M.fc.propType)for(Z=0;Z<3;Z+=1)G.length?U[Z]+=(M.fc.v[Z]-U[Z])*G[0]:U[Z]+=(M.fc.v[Z]-U[Z])*G;M.fh.propType&&(U=G.length?addHueToRGB(U,M.fh.v*G[0]):addHueToRGB(U,M.fh.v*G)),M.fs.propType&&(U=G.length?addSaturationToRGB(U,M.fs.v*G[0]):addSaturationToRGB(U,M.fs.v*G)),M.fb.propType&&(U=G.length?addBrightnessToRGB(U,M.fb.v*G[0]):addBrightnessToRGB(U,M.fb.v*G));}}for(de=0;de<j;de+=1)(M=a[de].a).p.propType&&(G=a[de].s.getMult(v[O].anIndexes[de],s.a[de].s.totalChars),this._hasMaskedPath?G.length?l.translate(0,M.p.v[1]*G[0],-M.p.v[2]*G[1]):l.translate(0,M.p.v[1]*G,-M.p.v[2]*G):G.length?l.translate(M.p.v[0]*G[0],M.p.v[1]*G[1],-M.p.v[2]*G[2]):l.translate(M.p.v[0]*G,M.p.v[1]*G,-M.p.v[2]*G));if(i.strokeWidthAnim&&(re=V<0?0:V),i.strokeColorAnim&&(ue="rgb("+Math.round(255*K[0])+","+Math.round(255*K[1])+","+Math.round(255*K[2])+")"),i.fillColorAnim&&i.fc&&(q="rgb("+Math.round(255*U[0])+","+Math.round(255*U[1])+","+Math.round(255*U[2])+")"),this._hasMaskedPath)l.translate(0,-i.ls),l.translate(0,m[1]*X*.01+F,0),this._pathData.p.v&&(oe=(t.point[1]-x.point[1])/(t.point[0]-x.point[0]),oe=180*Math.atan(oe)/Math.PI,t.point[0]<x.point[0]&&(oe+=180),l.rotate(-oe*Math.PI/180)
vendor: 4,722 bytes, line 138
138),l.translate(B,z,0),e-=m[0]*v[O].an*.005,v[O+1]&&D!==v[O+1].ind&&(e=(e+=v[O].an/2)+.001*i.tr*i.finalSize);else{switch(l.translate(Q,F,0),i.ps&&l.translate(i.ps[0],i.ps[1]+i.ascent,0),i.j){case 1:l.translate(v[O].animatorJustifyOffset+i.justifyOffset+(i.boxWidth-i.lineWidths[v[O].line]),0,0);break;case 2:l.translate(v[O].animatorJustifyOffset+i.justifyOffset+(i.boxWidth-i.lineWidths[v[O].line])/2,0,0);}l.translate(0,-i.ls),l.translate(H,0,0),l.translate(m[0]*v[O].an*.005,m[1]*X*.01,0),Q+=v[O].l+.001*i.tr*i.finalSize;}g==="html"?fe=l.toCSS():g==="svg"?fe=l.to2dCSS():ge=[l.props[0],l.props[1],l.props[2],l.props[3],l.props[4],l.props[5],l.props[6],l.props[7],l.props[8],l.props[9],l.props[10],l.props[11],l.props[12],l.props[13],l.props[14],l.props[15]],J=te;}f<=O?(N=new LetterProps(J,re,ue,q,fe,ge),this.renderedLetters.push(N),f+=1,this.lettersChangedFlag=!0):(N=this.renderedLetters[O],this.lettersChangedFlag=N.update(J,re,ue,q,fe,ge)||this.lettersChangedFlag);}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties());},TextAnimatorProperty.prototype.mHelper=new Matrix(),TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(i,r,e){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(i,r,e),this.textProperty=new TextProperty(this,i.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(i.t,this.renderType,this),this.initTransform(i,r,e),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties);},ITextElement.prototype.prepareFrame=function(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange);},ITextElement.prototype.createPathShape=function(i,r){for(var e,t=r.length,n="",o=0;o<t;o+=1)r[o].ty==="sh"&&(e=r[o].ks.k,n+=buildShapeString(e,e.i.length,!0,i));return n;},ITextElement.prototype.updateDocumentData=function(i,r){this.textProperty.updateDocumentData(i,r);},ITextElement.prototype.canResizeFont=function(i){this.textProperty.canResizeFont(i);},ITextElement.prototype.setMinimumFontSize=function(i){this.textProperty.setMinimumFontSize(i);},ITextElement.prototype.applyTextPropertiesToMatrix=function(i,r,e,t,n){switch(i.ps&&r.translate(i.ps[0],i.ps[1]+i.ascent,0),r.translate(0,-i.ls,0),i.j){case 1:r.translate(i.justifyOffset+(i.boxWidth-i.lineWidths[e]),0,0);break;case 2:r.translate(i.justifyOffset+(i.boxWidth-i.lineWidths[e])/2,0,0);}r.translate(t,n,0);},ITextElement.prototype.buildColor=function(i){return"rgb("+Math.round(255*i[0])+","+Math.round(255*i[1])+","+Math.round(255*i[2])+")";},ITextElement.prototype.emptyProp=new LetterProps(),ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1);};var emptyShapeData={shapes:[]};function SVGTextLottieElement(i,r,e){this.textSpans=[],this.renderType="svg",this.initElement(i,r,e);}function ISolidElement(i,r,e){this.initElement(i,r,e);}function NullElement(i,r,e){this.initFrame(),this.initBaseData(i,r,e),this.initFrame(),this.initTransform(i,r,e),this.initHierarchy();}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(i,r,e){this.layers=i.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(i,r,e),this.tm=i.tm?PropertyFactory.getProp(this,i.tm,0,r.frameRate,this):{_placeholder:!0};}function SVGRenderer(e,r){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var e="",t=(r&&r.title&&(t=createNS("title"),n=createElementID(),t.setAttribute("id",n),t.textContent=r.title,this.svgElement.appendChild(t),e+=n),r&&r.description&&(t=createNS("desc"),n=createElementID(),t.setAttribute("id",n),t.textContent=r.description,this.svgElement.appendChild(t),e+=" "+n),e&&this.svgElement.setAttribute("aria-labelledby",e),createNS("defs")),n=(this.svgElement.appendChild(t),createNS("g"));this.svgElement.appendChild(n),this.layerElement=n,this.renderConfig={preserveAspectRatio:r&&r.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:r&&r.contentVisibility||"visible",progressiveLoad:r&&r.progressiveLoad||!1,hideOnTransparent:!(r&&r.hideOnTransparent===!1),viewB
vendor: 5,597 bytes, line 138
138oxOnly:r&&r.viewBoxOnly||!1,viewBoxSize:r&&r.viewBoxSize||!1,className:r&&r.className||"",id:r&&r.id||"",focusable:r&&r.focusable,filterSize:{width:r&&r.filterSize&&r.filterSize.width||"100%",height:r&&r.filterSize&&r.filterSize.height||"100%",x:r&&r.filterSize&&r.filterSize.x||"0%",y:r&&r.filterSize&&r.filterSize.y||"0%"},width:r&&r.width,height:r&&r.height,runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:t,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg";}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0;}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"));},SVGTextLottieElement.prototype.buildTextContents=function(i){for(var r=0,e=i.length,t=[],n="";r<e;)i[r]==="\r"||i[r]==="�"?(t.push(n),n=""):n+=i[r],r+=1;return t.push(n),t;},SVGTextLottieElement.prototype.buildShapeData=function(i,r){var e;return i.shapes&&i.shapes.length&&(e=i.shapes[0]).it&&(e=e.it[e.it.length-1]).s&&(e.s.k[0]=r,e.s.k[1]=r),i;},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var i,r,e=this.textProperty.currentData,t=(this.renderedLetters=createSizedArray(e?e.l.length:0),e.fc?this.layerElement.setAttribute("fill",this.buildColor(e.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),e.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(e.sc)),this.layerElement.setAttribute("stroke-width",e.sw)),this.layerElement.setAttribute("font-size",e.finalSize),this.globalData.fontManager.getFontByName(e.f)),n=(t.fClass?this.layerElement.setAttribute("class",t.fClass):(this.layerElement.setAttribute("font-family",t.fFamily),i=e.fWeight,r=e.fStyle,this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",i)),this.layerElement.setAttribute("aria-label",e.t),e.l||[]),o=!!this.globalData.fontManager.chars,_=(f=n.length,this.mHelper),E=this.data.singleShape,x=0,h=0,y=!0,b=.001*e.tr*e.finalSize;if(!E||o||e.sz){var p,c,d,m,a=this.textSpans.length;for(v=0;v<f;v+=1)this.textSpans[v]||(this.textSpans[v]={span:null,childSpan:null,glyph:null}),o&&E&&v!==0||(p=v<a?this.textSpans[v].span:createNS(o?"g":"text"),a<=v&&(p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.textSpans[v].span=p,o&&(m=createNS("g"),p.appendChild(m),this.textSpans[v].childSpan=m),this.textSpans[v].span=p,this.layerElement.appendChild(p)),p.style.display="inherit"),_.reset(),E&&(n[v].n&&(x=-b,h=h+e.yOffset+(y?1:0),y=!1),this.applyTextPropertiesToMatrix(e,_,n[v].line,x,h),x=x+(n[v].l||0)+b),o?(c=(m=this.globalData.fontManager.getCharData(e.finalText[v],t.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily)).t===1?new SVGCompElement(m.data,this.globalData,this):(c=emptyShapeData,new SVGShapeElement(c=m.data&&m.data.shapes?this.buildShapeData(m.data,e.finalSize):c,this.globalData,this)),this.textSpans[v].glyph&&(d=this.textSpans[v].glyph,this.textSpans[v].childSpan.removeChild(d.layerElement),d.destroy()),(this.textSpans[v].glyph=c)._debug=!0,c.prepareFrame(0),c.renderFrame(),this.textSpans[v].childSpan.appendChild(c.layerElement),m.t===1&&this.textSpans[v].childSpan.setAttribute("transform","scale("+e.finalSize/100+","+e.finalSize/100+")")):(E&&p.setAttribute("transform","translate("+_.props[12]+","+_.props[13]+")"),p.textContent=n[v].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));E&&p&&p.setAttribute("d","");}else{var s=this.textContainer,l="start";switch(e.j){case 1:l="end";break;case 2:l="middle";break;default:l="start";}s.setAttribute("text-anchor",l),s.setAttribute("letter-spacing",b);for(var g=this.buildTextContents(e.finalText),f=g.length,h=e.ps?e.ps[1]+e.ascent:0,v=0;v<f;v+=1)(p=this.textSpans[v].span||createNS("tspan")).textContent=g[v],p.setAttribute("x",0),p.setAttribute("y",h),p.style.display="inherit",s.appendChild(p),this.textSpans[v]||(this.textSpans[v]={span:null,glyph:null}),this.textSpans[v].span=p,h+=e.finalLineHeight;this.layerElement.appendChild(s);}for(;v<this.textSpans.length;)this.textSpans[v].span.style.display="none",v+=1;this._sizeChanged=!0;},SVGTextLottieElement.prototype.sourceRectAtTime=function(){var i;return this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged&&(this._sizeChanged=!1,i=this.layerElement.getBBox(),this.bbox={top:i.y,left:i.x,width:i.width,height:i.height}),this.bbox;},SVGTextLottieElement.prototype.getValue=function(){var i,r,e=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,i=0;i<e;i+=1)(r=this.textSpans[i].glyph)&&(r.prepareFrame(this.comp.renderedFrame-this.data.st),r._mdf&&(this._mdf=!0));},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;for(var i,r,e,t=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l,o=n.length,_=0;_<o;_+=1)n[_].n||(i=t[_],r=this.textSpans[_].span,(e=this.textSpans[_].glyph)&&e.renderFrame(),i._mdf.m&&r.setAttribute("transform",i.m),i._mdf.o&&r.setAttribute("op
138acity",i.o),i._mdf.sw&&r.setAttribute("stroke-width",i.sw),i._mdf.sc&&r.setAttribute("stroke",i.sc),i._mdf.fc&&r.setAttribute("fill",i.fc));}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var i=createNS("rect");i.setAttribute("width",this.data.sw),i.setAttribute("height",this.data.sh),i.setAttribute("fill",this.data.sc),this.layerElement.appendChild(i);},NullElement.prototype.prepareFrame=function(i){this.prepareProperties(i,!0);},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null;},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(i){return new NullElement(i,this.globalData,this);},SVGRendererBase.prototype.createShape=function(i){return new SVGShapeElement(i,this.globalData,this);},SVGRendererBase.prototype.createText=function(i){return new SVGTextLottieElement(i,this.globalData,this);},SVGRendererBase.prototype.createImage=function(i){return new IImageElement(i,this.globalData,this);},SVGRendererBase.prototype.createSolid=function(i){return new ISolidElement(i,this.globalData,this);},SVGRendererBase.prototype.configAnimation=function(i){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+i.w+" "+i.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",i.w),this.svgElement.setAttribute("height",i.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var r=this.globalData.defs,e=(this.setupGlobalData(i,r),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=i,createNS("clipPath")),t=createNS("rect"),n=(t.setAttribute("width",i.w),t.setAttribute("height",i.h),t.setAttribute("x",0),t.setAttribute("y",0),createElementID());e.setAttribute("id",n),e.appendChild(t),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")"),r.appendChild(e),this.layers=i.layers,this.elements=createSizedArray(i.layers.length);},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;for(var i=this.layers?this.layers.length:0,r=0;r<i;r+=1)this.elements[r]&&this.elements[r].destroy&&this.elements[r].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null;},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(i){for(var e=0,r=this.layers.length,e=0;e<r;e+=1)if(this.layers[e].ind===i)return e;return-1;},SVGRendererBase.prototype.buildItem=function(i){var r,e,t=this.elements;t[i]||this.layers[i].ty===99||(t[i]=!0,r=this.createItem(this.layers[i]),t[i]=r,getExpressionsPlugin()&&(this.layers[i].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,i),this.layers[i].tt&&(e="tp"in this.layers[i]?this.findIndexByInd(this.layers[i].tp):i-1)!==-1&&(this.elements[e]&&this.elements[e]!==!0?(t=t[e].getMatte(this.layers[i].tt),r.setMatte(t)):(this.buildItem(e),this.addPendingElement(r))));},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var i=this.pendingElements.pop();if(i.checkParenting(),i.data.tt)for(var r=0,e=this.elements.length;r<e;){if(this.elements[r]===i){var t="tp"in i.data?this.findIndexByInd(i.data.tp):r-1,t=this.elements[t].getMatte(this.layers[r].tt);i.setMatte(t);break;}r+=1;}}},SVGRendererBase.prototype.renderFrame=function(i){if(this.renderedFrame!==i&&!this.destroyed){
vendor: 4,136 bytes, line 138
138i===null?i=this.renderedFrame:this.renderedFrame=i,this.globalData.frameNum=i,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=i,this.globalData._mdf=!1;var r,e=this.layers.length;for(this.completeLayers||this.checkLayers(i),r=e-1;0<=r;--r)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(i-this.layers[r].st);if(this.globalData._mdf)for(r=0;r<e;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();}},SVGRendererBase.prototype.appendElementInPos=function(i,r){if(i=i.getBaseElement(),i){for(var e,t=0;t<r;)this.elements[t]&&this.elements[t]!==!0&&this.elements[t].getBaseElement()&&(e=this.elements[t].getBaseElement()),t+=1;e?this.layerElement.insertBefore(i,e):this.layerElement.appendChild(i);}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none";},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block";},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(i,r,e){this.initFrame(),this.initBaseData(i,r,e),this.initTransform(i,r,e),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&r.progressiveLoad||this.buildAllItems(),this.hide();},ICompElement.prototype.prepareFrame=function(i){if(this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.isInRange||this.data.xt){this.tm._placeholder?this.renderedFrame=i/this.data.sr:((i=this.tm.v)===this.data.op&&(i=this.data.op-1),this.renderedFrame=i);var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;--r)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0));}},ICompElement.prototype.renderInnerContent=function(){for(var i=this.layers.length,r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();},ICompElement.prototype.setElements=function(i){this.elements=i;},ICompElement.prototype.getElements=function(){return this.elements;},ICompElement.prototype.destroyElements=function(){for(var i=this.layers.length,r=0;r<i;r+=1)this.elements[r]&&this.elements[r].destroy();},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement();},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(i){return new SVGCompElement(i,this.globalData,this);},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(i){return new SVGCompElement(i,this.globalData,this);},ShapeTransformManager.prototype={addTransformSequence:function(i){for(var r=i.length,e="_",t=0;t<r;t+=1)e+=i[t].transform.key+"_";var n=this.sequences[e];return n||(n={transforms:[].concat(i),finalTransform:new Matrix(),_mdf:!1},this.sequences[e]=n,this.sequenceList.push(n)),n;},processSequence:function(i,r){for(var e=0,t=i.transforms.length,n=r;e<t&&!r;){if(i.transforms[e].transform.mProps._mdf){n=!0;break;}e+=1;}if(n)for(i.finalTransform.reset(),e=t-1;0<=e;--e)i.finalTransform.multiply(i.transforms[e].transform.mProps.v);i._mdf=n;},processSequences:function(i){for(var r=this.sequenceList.length,e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],i);},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count;}};var lumaLoader=function(){var i="__lottie_element_luma_buffer",r=null,e=null,t=null;function n(){var o,_,E;r||(o=createNS("svg"),_=createNS("filter"),E=createNS("feColorMatrix"),_.setAttribute("id",i),E.setAttribute("type","matrix"),E.setAttribute("color-interpolation-filters","sRGB"),E.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),_.appendChild(E),o.appendChild(_),o.setAttribute("id",i+"_svg"),featureSupport.svgLumaHidden&&(o.style.display="none"),t=o,document.body.appendChild(t),r=createTag("canvas"),(e=r.getContext("2d")).filter="url
138(#"+i+")",e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1));}return{load:n,get:function(o){return r||n(),r.width=o.width,r.height=o.height,e.filter="url(#"+i+")",r;}};};function createCanvas(i,r){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(i,r);var e=createTag("canvas");return e.width=i,e.height=r,e;}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas},registeredEffects={};function CVEffects(i){var r,e=i.data.ef?i.data.ef.length:0;for(this.filters=[],r=0;r<e;r+=1){t=null;var t,n=i.data.ef[r].ty;(t=registeredEffects[n]?new registeredEffects[n].effect(i.effectsManager.effectElements[r],i):t)&&this.filters.push(t);}this.filters.length&&i.addRenderableComponent(this);}function registerEffect(i,r){registeredEffects[i]={effect:r};}function CVMaskElement(i,r){this.data=i,this.element=r,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);for(var e=this.masksProperties.length,t=!1,n=0;n<e;n+=1)this.masksProperties[n].mode!=="n"&&(t=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);(this.hasMasks=t)&&this.element.addRenderableComponent(this);}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(i){for(var r=this.filters.length,e=0;e<r;e+=1)this.filters[e].renderFrame(i);},CVEffects.prototype.getEffects=function(i){for(var r=this.filters.length,e=[],t=0;t<r;t+=1)this.filters[t].type===i&&e.push(this.filters[t]);return e;},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var i,r,e,t,n=this.element.finalTransform.mat,o=this.element.canvasContext,_=this.masksProperties.length;for(o.beginPath(),i=0;i<_;i+=1)if(this.masksProperties[i].mode!=="n"){this.masksProperties[i].inv&&(o.moveTo(0,0),o.lineTo(this.element.globalData.compSize.w,0),o.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),o.lineTo(0,this.element.globalData.compSize.h),o.lineTo(0,0)),t=this.viewData[i].v,r=n.applyToPointArray(t.v[0][0],t.v[0][1],0),o.moveTo(r[0],r[1]);for(var E=t._length,x=1;x<E;x+=1)e=n.applyToTriplePoints(t.o[x-1],t.i[x],t.v[x]),o.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);e=n.applyToTriplePoints(t.o[x-1],t.i[0],t.v[0]),o.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);}this.element.globalData.renderer.save(!0),o.clip();}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null;};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(i,r,e,t){this.styledShapes=[],this.tr=[0,0,0,0,0,0];for(var n,o=4,_=(r.ty==="rc"?o=5:r.ty==="el"?o=6:r.ty==="sr"&&(o=7),this.sh=ShapePropertyFactory.getShapeProp(i,r,o,i),e.length),E=0;E<_;E+=1)e[E].closed||(n={transforms:t.addTransformSequence(e[E].transforms),trNodes:[]},this.styledShapes.push(n),e[E].elements.push(n));}function CVShapeElement(i,r,e){this.shapes=[],this.shapesData=i.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager(),this.initElement(i,r,e);}function CVTextElement(i,r,e){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(i,r,e);}function CVImageElement(i,r,e){this.assetData=r.getAssetData(i.refId),this.img=r.imageLoader.getAsset(this.assetData),this.initElement(i,r,e);}function CVSolidElement(i,r,e){this.initElement(i,r,e);}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random();}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix();for(var i=0;i<15;i+=1){var r=new CanvasContext();this.stack[i]=r;}
vendor: 1,473 bytes, line 138
138this._length=15,this.nativeContext=null,this.transformMat=new Matrix(),this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit="";}function CVCompElement(i,r,e){this.completeLayers=!1,this.layers=i.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(i,r,e),this.tm=i.tm?PropertyFactory.getProp(this,i.tm,0,r.frameRate,this):{_placeholder:!0};}function CanvasRenderer(i,r){this.animationItem=i,this.renderConfig={clearCanvas:!r||r.clearCanvas===void 0||r.clearCanvas,context:r&&r.context||null,progressiveLoad:r&&r.progressiveLoad||!1,preserveAspectRatio:r&&r.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:r&&r.contentVisibility||"visible",className:r&&r.className||"",id:r&&r.id||"",runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.renderConfig.dpr=r&&r.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=r&&r.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData(),this.elements=[],this.pendingElements=[],this.transformMat=ne
138w Matrix(),this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData));}function HBaseElement(){}function HSolidElement(i,r,e){this.initElement(i,r,e);}function HShapeElement(i,r,e){this.shapes=[],this.shapesData=i.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(i,r,e),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0};}function HTextElement(i,r,e){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(i,r,e);}function HCameraElement(i,r,e){if(this.initFrame(),this.initBaseData(i,r,e),this.initHierarchy(),r=PropertyFactory.getProp,this.pe=r(this,i.pe,0,0,this),i.ks.p.s?(this.px=r(this,i.ks.p.x,1,0,this),this.py=r(this,i.ks.p.y,1,0,this),this.pz=r(this,i.ks.p.z,1,0,this)):this.p=r(this,i.ks.p,1,0,this),i.ks.a&&(this.a=r(this,i.ks.a,1,0,this)),i.ks.or.k.length&&i.ks.or.k[0].to)for(var t=i.ks.or.k.length,n=0;n<t;n+=1)i.ks.or.k[n].to=null,i.ks.or.k[n].ti=null;this.or=r(this,i.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,i.ks.rx,0,degToRads,this),this.ry=r(this,i.ks.ry,0,degToRads,this),this.rz=r(this,i.ks.rz,0,degToRads,this),this.mat=new Matrix(),this._prevMat=new Matrix(),this._isFirstFrame=!0,this.finalTransform={mProp:this};}function HImageElement(i,r,e){this.assetData=r.getAssetData(i.refId),this.initElement(i,r,e);}function HybridRendererBase(i,r){this.animationItem=i,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:r&&r.className||"",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(r&&r.hideOnTransparent===!1),filterSize:{width:r&&r.filterSize&&r.filterSize.width||"400%",height:r&&r.filterSize&&r.filterSize.height||"400%",x:r&&r.filterSize&&r.filterSize.x||"-100%",y:r&&r.filterSize&&r.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html";}function HCompElement(i,r,e){this.layers=i.layers,this.supports3d=!i.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(i,r,e),this.tm=i.tm?PropertyFactory.getProp(this,i.tm,0,r.frameRate,this):{_placeholder:!0};}function HybridRenderer(i,r){this.animationItem=i,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:r&&r.className||"",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(r&&r.hideOnTransparent===!1),filterSize:{width:r&&r.filterSize&&r.filterSize.width||"400%",height:r&&r.filterSize&&r.filterSize.height||"400%",x:r&&r.filterSize&&r.filterSize.x||"-100%",y:r&&r.filterSize&&r.filterSize.y||"-100%"},runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html";}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){var i,r;1<=this.data.tt&&(this.buffers=[],i=this.globalData.canvasContext,r=assetLoader.createCanvas(i.canvas.width,i.canvas.height),this.buffers.push(r),r=assetLoader.createCanvas(i.canvas.width,i.canvas.height),this.buffers.push(r),3<=this.data.tt&&!document._isProxy&&assetLoader.loadLumaCanvas()),this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffe
138ctsManager=new CVEffects(this),this.searchEffectTransforms();},createContent:function(){},setBlendMode:function(){var i,r=this.globalData;r.blendMode!==this.data.bm&&(r.blendMode=this.data.bm,i=getBlendMode(this.data.bm),r.canvasContext.globalCompositeOperation=i);},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0);},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0);},clearCanvas:function(i){i.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy);},prepareLayer:function(){var i;1<=this.data.tt&&(i=this.buffers[0].getContext("2d"),this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform));},exitLayer:function(){var i,r;1<=this.data.tt&&(r=(i=this.buffers[1]).getContext("2d"),this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),3<=this.data.tt&&!document._isProxy&&((r=assetLoader.getLumaCanvas(this.canvasContext.canvas)).getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)),this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(i,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over");},renderFrame:function(i){this.hidden||this.data.hd||this.data.td===1&&!i||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode(),i=this.data.ty===0,this.prepareLayer(),this.globalData.renderer.save(i),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(i),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1));},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy();},mHelper:new Matrix()},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]);},CVShapeElement.prototype.createStyleElement=function(i,t){var e,t={data:i,type:i.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:i.hd===!0},n={};return i.ty==="fl"||i.ty==="st"?(n.c=PropertyFactory.getProp(this,i.c,1,255,this),n.c.k||(t.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):i.ty!=="gf"&&i.ty!=="gs"||(n.s=PropertyFactory.getProp(this,i.s,1,null,this),n.e=PropertyFactory.getProp(this,i.e,1,null,this),n.h=PropertyFactory.getProp(this,i.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,i.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,i.g,this)),n.o=PropertyFactory.getProp(this,i.o,0,.01,this),i.ty==="st"||i.ty==="gs"?(t.lc=lineCapEnum[i.lc||2],t.lj=lineJoinEnum[i.lj||2],i.lj==1&&(t.ml=i.ml),n.w=PropertyFactory.getProp(this,i.w,0,null,this),n.w.k||(t.wi=n.w.v),i.d&&(e=new DashProperty(this,i.d,"canvas",this),n.d=e,n.d.k||(t.da=n.d.dashArray,t.do=n.d.dashoffset[0]))):t.r=i.r===2?"evenodd":"nonzero",this.stylesList.push(t),n.style=t,n;},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]};},CVShapeElement.prototype.createTransformElement=function(i){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,i.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,i,this)}};},CVShapeElement.prototype.createShapeElement=function(i){return i=new CVShapeData(this,i,this.stylesList,this.transformsManager),this.shapes.push(i),this.addShapeToModifiers(i),i;},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;for(var i=this.itemsData.length,r=0;r<i;r+=1)this.prevViewData[r]=this.itemsData[r];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),i=this.dynamicProperties.length,r=0;r<i;r+=1)this.dynamicProperties[r].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame);},CVShapeElement.prototype.addTransformToStyleList=function(i){for(var r=this.stylesList.length,e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(i);},CVShapeElement.prototype.removeTransformFromStyleList=function(){for(var i=this.stylesList.length,r=0;r<i;r+=1)this.stylesList[r].closed||this.stylesList[r].transforms.pop();},CVShapeElement.prototype.closeStyles=function(i){for(var r=i.length,e=0;e<r;e+=1)i[e].closed=!0;},CVShapeElement.prototype.searchShapes=function(i,r,e,t,n){for(var o,_,E,x,h,y=i.length-1,b=[],p=[],c=[].concat(n),d=y;0<=d;
vendor: 2,634 bytes, line 138
138--d){if((E=this.searchProcessedElement(i[d]))?r[d]=e[E-1]:i[d]._shouldRender=t,i[d].ty==="fl"||i[d].ty==="st"||i[d].ty==="gf"||i[d].ty==="gs")E?r[d].style.closed=!1:r[d]=this.createStyleElement(i[d],c),b.push(r[d].style);else if(i[d].ty==="gr"){if(E)for(_=r[d].it.length,o=0;o<_;o+=1)r[d].prevViewData[o]=r[d].it[o];else r[d]=this.createGroupElement(i[d]);this.searchShapes(i[d].it,r[d].it,r[d].prevViewData,t,c);}else i[d].ty==="tr"?(E||(h=this.createTransformElement(i[d]),r[d]=h),c.push(r[d]),this.addTransformToStyleList(r[d])):i[d].ty==="sh"||i[d].ty==="rc"||i[d].ty==="el"||i[d].ty==="sr"?E||(r[d]=this.createShapeElement(i[d])):i[d].ty==="tm"||i[d].ty==="rd"||i[d].ty==="pb"||i[d].ty==="zz"||i[d].ty==="op"?(E?(x=r[d]).closed=!1:((x=ShapeModifiers.getModifier(i[d].ty)).init(this,i[d]),r[d]=x,this.shapeModifiers.push(x)),p.push(x)):i[d].ty==="rp"&&(E?(x=r[d]).closed=!0:(x=ShapeModifiers.getModifier(i[d].ty),(r[d]=x).init(this,i,d,r),this.shapeModifiers.push(x),t=!1),p.push(x));this.addProcessedElement(i[d],d+1);}for(this.removeTransformFromStyleList(),this.closeStyles(b),y=p.length,d=0;d<y;d+=1)p[d].closed=!0;},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0);},CVShapeElement.prototype.renderShapeTransform=function(i,r){(i._opMdf||r.op._mdf||this._isFirstFrame)&&(r.opacity=i.opacity,r.opacity*=r.op.v,r._opMdf=!0);},CVShapeElement.prototype.drawLayer=function(){for(var i,r,e,t,n,o,_,E,x=this.stylesList.length,h=this.globalData.renderer,y=this.globalData.canvasContext,b=0;b<x;b+=1)if(((_=(E=this.stylesList[b]).type)!=="st"&&_!=="gs"||E.wi!==0)&&E.data._shouldRender&&E.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(h.save(),n=E.elements,_==="st"||_==="gs"?(h.ctxStrokeStyle(_==="st"?E.co:E.grd),h.ctxLineWidth(E.wi),h.ctxLineCap(E.lc),h.ctxLineJoin(E.lj),h.ctxMiterLimit(E.ml||0)):h.ctxFillStyle(_==="fl"?E.co:E.grd),h.ctxOpacity(E.coOp),_!=="st"&&_!=="gs"&&y.beginPath(),h.ctxTransform(E.preTransforms.finalTransform.props),r=n.length,i=0;i<r;i+=1){for(_!=="st"&&_!=="gs"||(y.beginPath(),E.da&&(y.setLineDash(E.da),y.lineDashOffset=E.do)),t=(o=n[i].trNodes).length,e=0;e<t;e+=1)o[e].t==="m"?y.moveTo(o[e].p[0],o[e].p[1]):o[e].t==="c"?y.bezierCurveTo(o[e].pts[0],o[e].pts[1],o[e].pts[2],o[e].pts[3],o[e].pts[4],o[e].pts[5]):y.closePath();_!=="st"&&_!=="gs"||(h.ctxStroke(),E.da&&y.setLineDash(this.dashResetter));}_!=="st"&&_!=="gs"&&this.globalData.renderer.ctxFill(E.r),h.restore(
138);}},CVShapeElement.prototype.renderShape=function(i,r,e,t){for(var n=i,o=r.length-1;0<=o;--o)r[o].ty==="tr"?(n=e[o].transform,this.renderShapeTransform(i,n)):r[o].ty==="sh"||r[o].ty==="el"||r[o].ty==="rc"||r[o].ty==="sr"?this.renderPath(r[o],e[o]):r[o].ty==="fl"?this.renderFill(r[o],e[o],n):r[o].ty==="st"?this.renderStroke(r[o],e[o],n):r[o].ty==="gf"||r[o].ty==="gs"?this.renderGradientFill(r[o],e[o],n):r[o].ty==="gr"?this.renderShape(n,r[o].it,e[o].it):r[o].ty;t&&this.drawLayer();},CVShapeElement.prototype.renderStyledShape=function(i,r){if(this._isFirstFrame||r._mdf||i.transforms._mdf){for(var e,t,n=i.trNodes,o=r.paths,_=o._length,E=(n.length=0,i.transforms.finalTransform),x=0;x<_;x+=1){var h=o.shapes[x];if(h&&h.v){for(t=h._length,e=1;e<t;e+=1)e===1&&n.push({t:"m",p:E.applyToPointArray(h.v[0][0],h.v[0][1],0)}),n.push({t:"c",pts:E.applyToTriplePoints(h.o[e-1],h.i[e],h.v[e])});t===1&&n.push({t:"m",p:E.applyToPointArray(h.v[0][0],h.v[0][1],0)}),h.c&&t&&(n.push({t:"c",pts:E.applyToTriplePoints(h.o[e-1],h.i[0],h.v[0])}),n.push({t:"z"}));}}i.trNodes=n;}},CVShapeElement.prototype.renderPath=function(i,r){if(i.hd!==!0&&i._shouldRender)for(var e=r.styledShapes.length,t=0;t<e;t+=1)this.renderStyledShape(r.styledShapes[t],r.sh);},CVShapeElement.prototype.renderFill=function(i,r,e){var t=r.style;(r.c._mdf||this._isFirstFrame)&&(t.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"),(r.o._mdf||e._opMdf||this._isFirstFrame)&&(t.coOp=r.o.v*e.opacity);},CVShapeElement.prototype.renderGradientFill=function(i,r,e){var t=r.style;if(!t.grd||r.g._mdf||r.s._mdf||r.e._mdf||i.t!==1&&(r.h._mdf||r.a._mdf)){for(var n,o,_,E,x=this.globalData.canvasContext,h=r.s.v,y=r.e.v,b=(E=i.t===1?x.createLinearGradient(h[0],h[1],y[0],y[1]):(n=Math.sqrt(Math.pow(h[0]-y[0],2)+Math.pow(h[1]-y[1],2)),y=Math.atan2(y[1]-h[1],y[0]-h[0]),1<=(o=r.h.v)?o=.99:o<=-1&&(o=-.99),o=n*o,_=Math.cos(y+r.a.v)*o+h[0],y=Math.sin(y+r.a.v)*o+h[1],x.createRadialGradient(_,y,0,h[0],h[1],n)),i.g.p),p=r.g.c,c=1,d=0;d<b;d+=1)r.g._hasOpacity&&r.g._collapsable&&(c=r.g.o[2*d+1]),E.addColorStop(p[4*d]/100,"rgba("+p[4*d+1]+","+p[4*d+2]+","+p[4*d+3]+","+c+")");t.grd=E;}t.coOp=r.o.v*e.opacity;},CVShapeElement.prototype.renderStroke=function(i,r,e){var t=r.style,n=r.d;n&&(n._mdf||this._isFirstFrame)&&(t.da=n.dashArray,t.do=n.dashoffset[0]),(r.c._mdf||this._isFirstFrame)&&(t.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"),(r.o._mdf||e._opMdf||this._isFirstFrame)&&(t.coOp=r.o.v*e.opacity),(r.w._mdf||this._isFirstFrame)&&(t.wi=r.w.v);},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0;},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){for(var i,r,e,t,n,o,_,E,x=this.textProperty.currentData,h=(this.renderedLetters=createSizedArray(x.l?x.l.length:0),!1),h=(x.fc?(h=!0,this.values.fill=this.buildColor(x.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=h,!1),y=(x.sc&&(h=!0,this.values.stroke=this.buildColor(x.sc),this.values.sWidth=x.sw),this.globalData.fontManager.getFontByName(x.f)),b=x.l,p=this.mHelper,c=(this.stroke=h,this.values.fValue=x.finalSize+"px "+this.globalData.fontManager.getFontByName(x.f).fFamily,i=x.finalText.length,this.data.singleShape),d=.001*x.tr*x.finalSize,m=0,a=0,s=!0,l=0,g=0;g<i;g+=1){r=(r=this.globalData.fontManager.getCharData(x.finalText[g],y.fStyle,this.globalData.fontManager.getFontByName(x.f).fFamily))&&r.data||{},p.reset(),c&&b[g].n&&(m=-d,a=a+x.yOffset+(s?1:0),s=!1),o=(n=r.shapes?r.shapes[0].it:[]).length,p.scale(x.finalSize/100,x.finalSize/100),c&&this.applyTextPropertiesToMatrix(x,p,b[g].line,m,a);for(var f=createSizedArray(o-1),v=0,S=0;S<o;S+=1)if(n[S].ty==="sh"){for(t=n[S].ks.k.i.length,_=n[S].ks.k,E=[],e=1;e<t;e+=1)e===1&&E.push(p.applyToX(_.v[0][0],_.v[0][1],0),p.applyToY(_.v[0][0],_.v[0][1],0)),E.push(p.applyToX(_.o[e-1][0],_.o[e-1][1],0),p.applyToY(_.o[e-1][0],_.o[e-1][1],0),p.applyToX(_.i[e][0],_.i[e][1],0),p.applyToY(_.i[e][0],_.i[e][1],0),p.applyToX(_.v[e][0],_.v[e][1],0),p.applyToY(_.v[e][0],_.v[e][1],0));E.push(p.applyToX(_.o[e-1][0],_.o[e-1][1],0),p.applyToY(_.o[e-1][0],_.o[e-1][1],0),p.applyToX(_.i[0][0],_.i[0][1],0),p.applyToY(_.i[0][0],_.i[0][1],0),p.applyToX(_.v[0][0],_.v[0][1],0),p.applyToY(_.v[0][0],_.v[0][1],0)),f[v]=E,v+=1;}c&&(m=m+b[g].l+d),this.textSpans[l]?this.textSpans[l].elem=f:this.textSpans[l]={elem:f},l+=1;}},CVTextElement.prototype.renderInnerContent=function(){this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);for(var i,r,e,t,n,o,_,E=this.textAnimator.renderedLetters,x=this.textProperty.currentData.l,h=x.length,y=null,b=null,p=null,c=this.globalData.renderer,d=0;d<h;d+=1)if(!x[d].n){if((n=E[d])&&(c.save(),c.ctxTransform(n.p),c.ctxOpacity(n.o)),this.fill){for(n&&n.fc?y!==n.fc&&(c.ctxFillStyle(n.fc),y=n.fc):y!==this.values.fill&&(y=this.values.fill,c.ctxFillStyle(this.values.fill)),r=(o=this.textSpans[d].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<r;i+=1)for(t=(_=o[i]).length,this.globalData.canvasContext.moveTo(_[0],_[1]),e=2;e<t;e+=6)this.globalData.canvasContext.bezierCurveTo(_[e],_[e+1],_[e+2],_[e+3],_[e+4],_[e+5]);this.globalData.canvasContext.closePath(),c.ctxFill();}if(this.stroke){for(n&&n.sw?p!==n.sw&&(p=n.sw,c.ctxLineWidth(n.sw)):p!==this.values.sWidth&&(p=this.values.sWidth,c.ctxLineWidth(this.values.sWidth)),n&&n.sc?b!==n.sc&&(b=n.sc,c.ctxStrokeStyle(n.sc)):b!==this.values.stroke&&(b=this.values.stroke,c.ctxStrokeStyle(this.values.stroke)),r=(o=this.textSpans[d].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<r;i+=1)for(t=(_=o[i]).length,this.globalData.canvasContext.moveTo(_[0],_[1]),e=2;e<t;e+=6)this.globalData.canvasContext.bezierCurveTo(_[e],_[e+1],_[e+2],_[e+3],_[e+4],_[e+5]);this.globalData.canvasContext.closePath(),c.ctxStroke();}
138n&&this.globalData.renderer.restore();}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){var i,r,e,t,n,o,_,E,x;!this.img.width||this.assetData.w===this.img.width&&this.assetData.h===this.img.height||((i=createTag("canvas")).width=this.assetData.w,i.height=this.assetData.h,r=i.getContext("2d"),e=this.img.width,t=this.img.height,o=this.assetData.w/this.assetData.h,x=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio,o<(n=e/t)&&x==="xMidYMid slice"||n<o&&x!=="xMidYMid slice"?_=(E=t)*o:E=(_=e)/o,r.drawImage(this.img,(e-_)/2,(t-E)/2,_,E,0,0,this.assetData.w,this.assetData.h),this.img=i);},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0);},CVImageElement.prototype.destroy=function(){this.img=null;},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh);},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(i){return new CVShapeElement(i,this.globalData,this);},CanvasRendererBase.prototype.createText=function(i){return new CVTextElement(i,this.globalData,this);},CanvasRendererBase.prototype.createImage=function(i){return new CVImageElement(i,this.globalData,this);},CanvasRendererBase.prototype.createSolid=function(i){return new CVSolidElement(i,this.globalData,this);},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(i){i[0]===1&&i[1]===0&&i[4]===0&&i[5]===1&&i[12]===0&&i[13]===0||this.canvasContext.transform(i[0],i[1],i[4],i[5],i[12],i[13]);},CanvasRendererBase.prototype.ctxOpacity=function(i){this.canvasContext.globalAlpha*=i<0?0:i;},CanvasRendererBase.prototype.ctxFillStyle=function(i){this.canvasContext.fillStyle=i;},CanvasRendererBase.prototype.ctxStrokeStyle=function(i){this.canvasContext.strokeStyle=i;},CanvasRendererBase.prototype.ctxLineWidth=function(i){this.canvasContext.lineWidth=i;},CanvasRendererBase.prototype.ctxLineCap=function(i){this.canvasContext.lineCap=i;},CanvasRendererBase.prototype.ctxLineJoin=function(i){this.canvasContext.lineJoin=i;},CanvasRendererBase.prototype.ctxMiterLimit=function(i){this.canvasContext.miterLimit=i;},CanvasRendererBase.prototype.ctxFill=function(i){this.canvasContext.fill(i);},CanvasRendererBase.prototype.ctxFillRect=function(i,r,e,t){this.canvasContext.fillRect(i,r,e,t);},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke();},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore();},CanvasRendererBase.prototype.save=function(){this.canvasContext.save();},CanvasRendererBase.prototype.restore=function(i){this.renderConfig.clearCanvas?(i&&(this.globalData.blendMode="source-over"),this.contextData.restore(i)):this.canvasContext.restore();},CanvasRendererBase.prototype.configAnimation=function(i){var r,e;this.animationItem.wrapper?(this.animationItem.container=createTag("canvas"),(r=this.animationItem.container.style).width="100%",r.height="100%",r.transformOrigin=e="0px 0px 0px",r.mozTransformOrigin=e,r.webkitTransformOrigin=e,r["-webkit-transform"]=e,r.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)):this.canvasContext=this.renderConfig.context,this.contextData.setContext(this.canvasContext),this.data=i,this.layers=i.layers,this.transformCanvas={w:i.w,h:i.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(i,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(i.layers.length),this.updateContainerSize();},CanvasRendererBase.prototype.updateContainerSize=function(i,r){var e,t,n,o,_;this.reset(),i?(t=r,this.canvasContext.canvas.width=e=i,this.canvasContext.canvas.height=t):(t=this.animationItem.wrapper&&this.animationItem.container?(e=this.animationItem.wrapper.offsetWidth,this.animationItem.wrapper.offsetHeight):(e=this.canvasContext.canvas.width,this.canvasContext.canvas.height),this.canvasContext.canvas.width=e*this.renderConfig.dpr,this.canvasContext.canvas.height=t*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1?(i=(r=this.renderConfig.preserveAspectRatio.split(" "))[1]||"meet",n=(r=r[0]||"xMidYMid").substr(0,4),r=r.substr(4),(o=e/t)<(_=this.transformCanvas.w/this.transformCanvas.h)&&i==="meet"||_<o&&i==="slice"?(this.transformCanvas.sx=e/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=t/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx=n==="xMid"&&(_<o&&i==="meet"||o<_&&i==="slice")?(e-this.transformCanvas.w*(t/this.transformCanvas.h))/2*this.renderConfig.dpr:n==="xMax"&&(_<o&&i==="meet"||o<_&&i==="slice")?(e-this.transformCanvas.w*(t/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.t
138y=r==="YMid"&&(o<_&&i==="meet"||_<o&&i==="slice")?(t-this.transformCanvas.h*(e/this.transformCanvas.w))/2*this.renderConfig.dpr:r==="YMax"&&(o<_&&i==="meet"||_<o&&i==="slice")?(t-this.transformCanvas.h*(e/this.transformCanvas.w))*this.renderConfig.dpr:0):(this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=e/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0),this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0);},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");for(var i=(this.layers?this.layers.length:0)-1;0<=i;--i)this.elements[i]&&this.elements[i].destroy&&this.elements[i].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0;},CanvasRendererBase.prototype.renderFrame=function(i,r){if((this.renderedFrame!==i||this.renderConfig.clearCanvas!==!0||r)&&!this.destroyed&&i!==-1){this.renderedFrame=i,this.globalData.frameNum=i-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||r,this.globalData.projectInterface.currentFrame=i;var e,r=this.layers.length;for(this.completeLayers||this.checkLayers(i),e=r-1;0<=e;--e)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(i-this.layers[e].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),e=r-1;0<=e;--e)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore();}}},CanvasRendererBase.prototype.buildItem=function(i){var r,e=this.elements;e[i]||this.layers[i].ty===99||(r=this.createItem(this.layers[i],this,this.globalData),(e[i]=r).initExpressions());},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting();},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none";},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block";},CVContextData.prototype.duplicate=function(){for(var i=2*this._length,r=0,r=this._length;r<i;r+=1)this.stack[r]=new CanvasContext();this._length=i;},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1;},CVContextData.prototype.restore=function(i){--this.cArrPos;for(var r,e=this.stack[this.cArrPos],t=e.transform,n=this.cTr.props,o=0;o<16;o+=1)n[o]=t[o];i&&(this.nativeContext.restore(),r=this.stack[this.cArrPos+1],this.appliedFillStyle=r.fillStyle,this.appliedStrokeStyle=r.strokeStyle,this.appliedLineWidth=r.lineWidth,this.appliedLineCap=r.lineCap,this.appliedLineJoin=r.lineJoin,this.appliedMiterLimit=r.miterLimit),this.nativeContext.setTransform(t[0],t[1],t[4],t[5],t[12],t[13]),(i||e.opacity!==-1&&this.currentOpacity!==e.opacity)&&(this.nativeContext.globalAlpha=e.opacity,this.currentOpacity=e.opacity),this.currentFillStyle=e.fillStyle,this.currentStrokeStyle=e.strokeStyle,this.currentLineWidth=e.lineWidth,this.currentLineCap=e.lineCap,this.currentLineJoin=e.lineJoin,this.currentMiterLimit=e.miterLimit;},CVContextData.prototype.save=function(i){i&&this.nativeContext.save();for(var r=this.cTr.props,e=(this._length<=this.cArrPos&&this.duplicate(),this.stack[this.cArrPos]),t=0;t<16;t+=1)e.transform[t]=r[t];this.cArrPos+=1,i=this.stack[this.cArrPos],i.opacity=e.opacity,i.fillStyle=e.fillStyle,i.strokeStyle=e.strokeStyle,i.lineWidth=e.lineWidth,i.lineCap=e.lineCap,i.lineJoin=e.lineJoin,i.miterLimit=e.miterLimit;},CVContextData.prototype.setOpacity=function(i){this.stack[this.cArrPos].opacity=i;},CVContextData.prototype.setContext=function(i){this.nativeContext=i;},CVContextData.prototype.fillStyle=function(i){this.stack[this.cArrPos].fillStyle!==i&&(this.currentFillStyle=i,this.stack[this.cArrPos].fillStyle=i);},CVContextData.prototype.strokeStyle=function(i){this.stack[this.cArrPos].strokeStyle!==i&&(this.currentStrokeStyle=i,this.stack[this.cArrPos].strokeStyle=i);},CVContextData.prototype.lineWidth=function(i){this.stack[this.cArrPos].lineWidth!==i&&(this.currentLineWidth=i,this.stack[this.cArrPos].lineWidth=i);},CVContextData.prototype.lineCap=function(i){this.stack[this.cArrPos].lineCap!==i&&(this.currentLineCap=i,this.stack[this.cArrPos].lineCap=i);},CVContextData.prototype.lineJoin=function(i){this.stack[this.cArrPos].lineJoin!==i&&(this.currentLineJoin=i,this.stack[this.cArrPos].lineJoin=i);},CVContextData.prototype.miterLimit=function(i){this.stack[this.cArrPos].miterLimit!==i&&(this.currentMiterLimit=i,this.stack[this.cArrPos].miterLimit=i);},CVContextData.prototype.transform=function(i){this.transformMat.cloneFromProps(i),i=this.cTr,this.transformMat.multiply(i),i.cloneFromProps(this.transformMat.props),i=i.props,this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]);},CVContextData.prototype.opacity=function(i){var r=this.stack[this.cArrPos].opacity;this.stack[this.cArrPos].opacity!==(r*=i<0?0:i)&&(this.currentOpacity!==i&&(this.nativeContext.globalAlpha=i,this.currentOpacity=i),this.stack[this.cArrPos].opacity=r);},CVContextData.prototype.fill=function(i){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(i);},CVContextData.prototype.fillRect=function(i,r,e,t){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(i,r,e,t);},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWi
vendor: 23,651 bytes, line 138
138dth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke();},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var i=this.canvasContext;i.beginPath(),i.moveTo(0,0),i.lineTo(this.data.w,0),i.lineTo(this.data.w,this.data.h),i.lineTo(0,this.data.h),i.lineTo(0,0),i.clip();for(var r=this.layers.length-1;0<=r;--r)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();},CVCompElement.prototype.destroy=function(){for(var i=this.layers.length-1;0<=i;--i)this.elements[i]&&this.elements[i].destroy();this.layers=null,this.elements=null;},CVCompElement.prototype.createComp=function(i){return new CVCompElement(i,this.globalData,this);},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(i){return new CVCompElement(i,this.globalData,this);},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement);},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode();},renderElement:function(){var i,r=this.transformedElement?this.transformedElement.style:{};this.finalTransform._matMdf&&(i=this.finalTransform.mat.toCSS(),r.transform=i,r.webkitTransform=i),this.finalTransform._opMdf&&(r.opacity=this.finalTransform.mProp.o.v);},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1));},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null);},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData);},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var i;this.data.hasMask?((i=createNS("rect")).setAttribute("width",this.data.sw),i.setAttribute("height",this.data.sh),i.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((i=createTag("div")).style.width=this.data.sw+"px",i.style.height=this.data.sh+"px",i.style.backgroundColor=this.data.sc),this.layerElement.appendChild(i);},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var i,r;this.baseElement.style.fontSize=0,this.data.hasMask?(this.layerElement.appendChild(this.shapesContainer),i=this.svgElement):(i=createNS("svg"),r=this.comp.data||this.globalData.compSize,i.setAttribute("width",r.w),i.setAttribute("height",r.h),i.appendChild(this.shapesContainer),this.layerElement.appendChild(i)),this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=i;},HShapeElement.prototype.getTransformedPoint=function(i,r){for(var e=i.length,t=0;t<e;t+=1)r=i[t].mProps.v.applyToPointArray(r[0],r[1],0);return r;},HShapeElement.prototype.calculateShapeBoundingBox=function(i,r){var e,t,n,o,_,E=i.sh.v,x=i.transformers,h=E._length;if(!(h<=1)){for(e=0;e<h-1;e+=1)t=this.getTransformedPoint(x,E.v[e]),n=this.getTransformedPoint(x,E.o[e]),o=this.getTransformedPoint(x,E.i[e+1]),_=this.getTransformedPoint(x,E.v[e+1]),this.checkBounds(t,n,o,_,r);E.c&&(t=this.getTransformedPoint(x,E.v[e]),n=this.getTransformedPoint(x,E.o[e]),o=this.getTransformedPoint(x,E.i[0]),_=this.getTransformedPoint(x,E.v[0]),this.checkBounds(t,n,o,_,r));}},HShapeElement.prototype.checkBounds=function(i,r,e,t,n){this.getBoundsOfCurve(i,r,e,t),i=this.shapeBoundingBox,n.x=bmMin(i.left,n.x),n.xMax=bmMax(i.right,n.xMax),n.y=bmMin(i.top,n.y),n.yMax=bmMax(i.bottom,n.yMax);},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(i,r,e,t){for(var n,o,_,E,x=[[i[0],t[0]],[i[1],t[1]]],h=0;h<2;++h)o=6*i[h]-12*r[h]+6*e[h],n=-3*i[h]+9*r[h]-9*e[h]+3*t[h],E=3*r[h]-3*i[h],o|=0,E|=0,(n|=0)==0&&o==0||(n==0?0<(_=-E/o)&&_<1&&x[h].push(this.calculateF(_,i,r,e,t,h)):0<=(_=o*o-4*E*n)&&(0<(E=(-o+bmSqrt(_))/(2*n))&&E<1&&x[h].push(this.calculateF(E,i,r,e,t,h)),0<(E=(-o-bmSqrt(_))/(2*n))&&E<1&&x[h].push(this.calculateF(E,i,r,e,t,h))));this.shapeBoundingBox.left=bmMin.apply(null,x[0]),this.shapeBoundingBox.top=bmMin.apply(null,x[1]),this.shapeBoundingBox.right=bmMax.apply(null,x[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,x[1]);},HShapeElement.prototype.calculateF=function(i,r,e,t,n,o){return bmPow(1-i,3)*r[o]+3*bmPow(1-i,2)*i*e[o]+3*(1-i)*bmPow(i,2)*t[o]+bmPow(i,3)*n[o];},HShapeElement.prototype.calculateBoundingBox=function(i,r){for(var e=i.length,t=0;t<e;t+=1)i[t]&&i[t].sh?this.calculateShapeBoundingBox(i[t],r):i[t]&&i[t].it?this.calculateBoundingBox(i[t].it,r):i[t]&&i[t].style&&i[t].w&&this.expandStrokeBoundingBox(i[t].w,r);},HShapeElement.prototype.expandStrokeBoundingBox=function(i,r){var e=0;if(i.keyframes){for(var t=0;t<i.keyframes.length;t+=1){var n=i.keyframes[t].s;e<n&&(e=n);}e*=i.mult;}else e=i.v*i.mult;r.x-=e,r.xMax+=e,r.y-=e,r.yMax+=e;},HShapeElement.prototype.currentBoxContains=function(i){return this.currentBBox.x<=i.x&&this.currentBBox.y<=i.y&&this.currentBBox.width+this.currentBBox.x>=i.x+i.width&&this.currentBBox.height+this.currentBBox.y>=i.y+i.height;},HShapeElement.prototype.renderInnerContent=function(){var i,r;this._renderShapeFrame(),this.hidden||!this._isFirstFrame&&!this._mdf||((r=this.tempBoundingBox).x=i=999999,r.xMax=-i,r.y=i,r.yMax=-i,this.calculateBoundingBox(this.itemsData,r),r.width=r.xMax<r.x?0:r.xMax-r.x,r.height=r.yMax<r.y?0:r.yMax-r.y,this.currentBoxContains(r)||(i=!1,this.currentBBox.w!==r.width&&(this.currentBBox.w=r.width,this.shapeCont.setAttribute("width",r.width),i=!0),this.currentBBox.h!==r.height&&(this.currentBBox.h=r.height,this.shapeCont.setAttribute("height",r.height),i=!0),!i&&this.currentBBox.x===r.x&&this.currentBBox.y===r.y||(this.currentBBox.w=r.width,this.currentBBox.h=r.height,this.currentBBox.x=r.x,this.currentBBox.y=r.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),i=this.shapeCont.style,r="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)",i.transform=r,i.webkitTransform=r)));},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){var i;this.isMasked=this.checkMasks(),this.isMasked?(this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH),i=createNS("g"),this.maskedElement.appendChild(i),this.innerElem=i):(this.renderType="html",this.innerElem=this.layerElement),this.checkParenting();},HTextElement.prototype.buildNewText=function(){for(var i,r,e,t,n,o,_,E=this.textProperty.currentData,x=(this.renderedLetters=createSizedArray(E.l?E.l.length:0),this.innerElem.style),h=E.fc?this.buildColor(E.fc):"rgba(0,0,0,0)",y=(x.fill=h,x.color=h,E.sc&&(x.stroke=this.buildColor(E.sc),x.strokeWidth=E.sw+"px"),this.globalData.fontManager.getFontByName(E.f)),b=(this.globalData.fontManager.chars||(x.fontSize=E.finalSize+"px",x.lineHeight=E.finalSize+"px",y.fClass?this.innerElem.className=y.fClass:(x.fontFamily=y.fFamily,h=E.fWeight,i=E.fStyle,x.fontStyle=i,x.fontWeight=h)),E.l),p=b.length,c=this.mHelper,d=0,m=0;m<p;m+=1)this.globalData.fontManager.chars?(this.textPaths[d]?r=this.textPaths[d]:((r=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),r.setAttribute("stroke-linejoin",lineJoinEnum[2]),r.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[d]?t=(e=this.textSpans[d]).children[0]:((e=createTag("div")).style.lineHeight=0,(t=createNS("svg")).appendChild(r),styleDiv(e)))):this.isMasked?r=this.textPaths[d]||createNS("text"):this.textSpans[d]?(e=this.textSpans[d],r=this.textPaths[d]):(styleDiv(e=createTag("span")),styleDiv(r=createTag("span")),e.appendChild(r)),this.globalData.fontManager.chars?(o=(o=this.globalData.fontManager.getCharData(E.finalText[m],y.fStyle,this.globalData.fontManager.getFontByName(E.f).fFamily))?o.data:null,c.reset(),o&&o.shapes&&o.shapes.length&&(n=o.shapes[0].it,c.scale(E.finalSize/100,E.finalSize/100),n=this.createPathShape(c,n),r.setAttribute("d",n)),this.isMasked?this.innerElem.appendChild(r):(this.innerElem.appendChild(e),o&&o.shapes?(document.body.appendChild(t),n=t.getBBox(),t.setAttribute("width",n.width+2),t.setAttribute("height",n.height+2),t.setAttribute("viewBox",n.x-1+" "+(n.y-1)+" "+(n.width+2)+" "+(n.height+2)),o=t.style,_="translate("+(n.x-1)+"px,"+(n.y-1)+"px)",o.transform=_,o.webkitTransform=_,b[m].yOffset=n.y-1):(t.setAttribute("width",1),t.setAttribute("height",1)),e.appendChild(t))):(r.textContent=b[m].val,r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked?this.innerElem.appendChild(r):(this.innerElem.appendChild(e),o=r.style,_="translate3d(0,"+-E.finalSize/1.2+"px,0)",o.transform=_,o.webkitTransform=_)),this.isMasked?this.textSpans[d]=r:this.textSpans[d]=e,this.textSpans[d].style.display="block",this.textPaths[d]=r,d+=1;for(;d<this.textSpans.length;)this.textSpans[d].style.display="none",d+=1;},HTextElement.prototype.renderInnerContent=function(){var i;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;this.isMasked&&this.finalTransform._matMdf&&(this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),i=this.svgElement.style,n="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)",i.transform=n,i.webkitTransform=n);}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){for(var r,e,t,n,o=0,_=this.textAnimator.renderedLetters,E=this.textProperty.currentData.l,x=E.length,h=0;h<x;h+=1)E[h].n?o+=1:(e=this.textSpans[h],t=this.textPaths[h],r=_[o],o+=1,r._mdf.m&&(this.isMasked?e.setAttribute("transform",r.m):(e.style.webkitTransform=r.m,e.style.transform=r.m)),e.style.opacity=r.o,r.sw&&r._mdf.sw&&t.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&t.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(t.setAttribute("fill",r.fc),t.style.color=r.fc));this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)&&(n=this.innerElem.getBBox(),this.currentBBox.w!==n.width&&(this.currentBBox.w=n.width,this.svgElement.setAttribute("width",n.width)),this.currentBBox.h!==n.height&&(this.currentBBox.h=n.height,this.svgElement.setAttribute("height",n.height)),this.currentBBox.w===n.width+2&&this.currentBBox.h===n.height+2&&this.currentBBox.x===n.x-1&&this.currentBBox.y===n.y-1||(this.currentBBox.w=n.width+2,this.currentBBox.h=n.height+2,this.currentBBox.x=n.x-1,this.currentBBox.y=n.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),i=this.svgElement.style,n="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)",i.transform=n,i.webkitTransform=n));}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){for(var i,r,e,t,n,o=this.comp.threeDElements.length,_=0;_<o;_+=1)(n=this.comp.threeDElements[_]).type==="3d"&&(i=n.perspectiveElem.style,n=n.container.style,r=this.pe.v+"px",e="0px 0px 0px",t="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",i.perspective=r,i.webkitPerspective=r,n.transformOrigin=e,n.mozTransformOrigin=e,n.webkitTransformOrigin=e,i.transform=t,i.webkitTransform=t);},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var i=this._isFirstFrame;if(this.hierarchy)for(x=this.hierarchy.length,h=0;h<x;h+=1)i=this.hierarchy[h].finalTransform.mProp._mdf||i;if(i||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(h=x=this.hierarchy.length-1;0<=h;--h){var r=this.hierarchy[h].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2]);}this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a&&(t=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]],e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)),t=[t[0]/e,t[1]/e,t[2]/e],e=Math.sqrt(t[2]*t[2]+t[0]*t[0]),e=Math.atan2(t[1],e),t=Math.atan2(t[0],-t[2]),this.mat.rotateY(t).rotateX(-e)),this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var e,t,n=!this._prevMat.equals(this.mat);if((n||this.pe._mdf)&&this.comp.threeDElements){for(var o,_,E,x=this.comp.threeDElements.length,h=0;h<x;h+=1)(E=this.comp.threeDElements[h]).type==="3d"&&(n&&(o=this.mat.toCSS(),(_=E.container.style).transform=o,_.webkitTransform=o),this.pe._mdf&&((_=E.perspectiveElem.style).perspective=this.pe.v+"px",_.webkitPerspective=this.pe.v+"px"));this.mat.clone(this._prevMat);}}this._isFirstFrame=!1;},HCameraElement.prototype.prepareFrame=function(i){this.prepareProperties(i,!0);},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null;},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var i=this.globalData.getAssetsPath(this.assetData),r=new Image();this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(r),r.crossOrigin="anonymous",r.src=i,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln);},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting();},HybridRendererBase.prototype.appendElementInPos=function(i,r){if(i=i.getBaseElement(),i){var e=this.layers[r];if(e.ddd&&this.supports3d)this.addTo3dContainer(i,r);else if(this.threeDElements)this.addTo3dContainer(i,r);else{for(var t,n,o=0;o<r;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement&&(n=this.elements[o],t=(this.layers[o].ddd?this.getThreeDContainerByPos(o):n.getBaseElement())||t),o+=1;t?e.ddd&&this.supports3d||this.layerElement.insertBefore(i,t):e.ddd&&this.supports3d||this.layerElement.appendChild(i);}}},HybridRendererBase.prototype.createShape=function(i){return new(this.supports3d?HShapeElement:SVGShapeElement)(i,this.globalData,this);},HybridRendererBase.prototype.createText=function(i){return new(this.supports3d?HTextElement:SVGTextLottieElement)(i,this.globalData,this);},HybridRendererBase.prototype.createCamera=function(i){return this.camera=new HCameraElement(i,this.globalData,this),this.camera;},HybridRendererBase.prototype.createImage=function(i){return new(this.supports3d?HImageElement:IImageElement)(i,this.globalData,this);},HybridRendererBase.prototype.createSolid=function(i){return new(this.supports3d?HSolidElement:ISolidElement)(i,this.globalData,this);},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(i){for(var r=0,e=this.threeDElements.length;r<e;){if(this.threeDElements[r].startPos<=i&&this.threeDElements[r].endPos>=i)return this.threeDElements[r].perspectiveElem;r+=1;}return null;},HybridRendererBase.prototype.createThreeDContainer=function(i,r){var e,t=createTag("div"),n=(styleDiv(t),createTag("div")),o=(styleDiv(n),r==="3d"&&((o=t.style).width=this.globalData.compSize.w+"px",o.height=this.globalData.compSize.h+"px",o.webkitTransformOrigin=e="50% 50%",o.mozTransformOrigin=e,o.transformOrigin=e,(o=n.style).transform=e="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",o.webkitTransform=e),t.appendChild(n),{container:n,perspectiveElem:t,startPos:i,endPos:i,type:r});return this.threeDElements.push(o),o;},HybridRendererBase.prototype.build3dContainers=function(){for(var i,r=this.layers.length,e="",t=0;t<r;t+=1)this.layers[t].ddd&&this.layers[t].ty!==3?(i=e!=="3d"?this.createThreeDContainer(t,e="3d"):i).endPos=Math.max(i.endPos,t):(i=e!=="2d"?this.createThreeDContainer(t,e="2d"):i).endPos=Math.max(i.endPos,t);for(t=(r=this.threeDElements.length)-1;0<=t;--t)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem);},HybridRendererBase.prototype.addTo3dContainer=function(i,r){for(var e=0,t=this.threeDElements.length;e<t;){if(r<=this.threeDElements[e].endPos){for(var n,o=this.threeDElements[e].startPos;o<r;)this.elements[o]&&this.elements[o].getBaseElement&&(n=this.elements[o].getBaseElement()),o+=1;n?this.threeDElements[e].container.insertBefore(i,n):this.threeDElements[e].container.appendChild(i);break;}e+=1;}},HybridRendererBase.prototype.configAnimation=function(i){var t=createTag("div"),e=this.animationItem.wrapper,r=t.style,e=(r.width=i.w+"px",r.height=i.h+"px",styleDiv(this.resizerElem=t),r.transformStyle="flat",r.mozTransformStyle="flat",r.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),e.appendChild(t),r.overflow="hidden",createNS("svg")),t=(e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),this.resizerElem.appendChild(e),createNS("defs"));e.appendChild(t),this.data=i,this.setupGlobalData(i,e),this.globalData.defs=t,this.layers=i.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize();},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;for(var i=this.layers?this.layers.length:0,r=0;r<i;r+=1)this.elements[r]&&this.elements[r].destroy&&this.elements[r].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null;},HybridRendererBase.prototype.updateContainerSize=function(){var i,r,e,t=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight,t=t/n<this.globalData.compSize.w/this.globalData.compSize.h?(i=t/this.globalData.compSize.w,r=t/this.globalData.compSize.w,e=0,(n-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(i=n/this.globalData.compSize.h,r=n/this.globalData.compSize.h,e=(t-this.globalData.compSize.w*(n/this.globalData.compSize.h))/2,0),n=this.resizerElem.style;n.webkitTransform="matrix3d("+i+",0,0,0,0,"+r+",0,0,0,0,1,0,"+e+","+t+",0,1)",n.transform=n.webkitTransform;},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none";},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block";},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else for(var i=this.globalData.compSize.w,r=this.globalData.compSize.h,e=this.threeDElements.length,t=0;t<e;t+=1){var n=this.threeDElements[t].perspectiveElem.style;n.webkitPerspective=Math.sqrt(Math.pow(i,2)+Math.pow(r,2))+"px",n.perspective=n.webkitPerspective;}},HybridRendererBase.prototype.searchExtraCompositions=function(i){for(var r,e=i.length,t=createTag("div"),n=0;n<e;n+=1)i[n].xt&&((r=this.createComp(i[n],t,this.globalData.comp,null)).initExpressions(),this.globalData.projectInterface.registerComposition(r));},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement;},HCompElement.prototype.addTo3dContainer=function(i,r){for(var e,t=0;t<r;)this.elements[t]&&this.elements[t].getBaseElement&&(e=this.elements[t].getBaseElement()),t+=1;e?this.layerElement.insertBefore(i,e):this.layerElement.appendChild(i);},HCompElement.prototype.createComp=function(i){return new(this.supports3d?HCompElement:SVGCompElement)(i,this.globalData,this);},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(i){return new(this.supports3d?HCompElement:SVGCompElement)(i,this.globalData,this);};var CompExpressionInterface=function(i){function r(e){for(var t=0,n=i.layers.length;t<n;){if(i.layers[t].nm===e||i.layers[t].ind===e)return i.elements[t].layerInterface;t+=1;}return null;}return Object.defineProperty(r,"_name",{value:i.data.nm}),(r.layer=r).pixelAspect=1,r.height=i.data.h||i.globalData.compSize.h,r.width=i.data.w||i.globalData.compSize.w,r.pixelAspect=1,r.frameDuration=1/i.globalData.frameRate,r.dis
138playStartTime=0,r.numLayers=i.layers.length,r;};function _typeof$2(i){return(_typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}function seedRandom(i,r){var e,t=this,n=256,o=6,_="random",E=r.pow(n,o),x=r.pow(2,52),h=2*x,y=n-1;function b(m){var a,s=m.length,l=this,g=0,f=l.i=l.j=0,v=l.S=[];for(s||(m=[s++]);g<n;)v[g]=g++;for(g=0;g<n;g++)v[g]=v[f=y&f+m[g%s]+(a=v[g])],v[f]=a;l.g=function(S){for(var w,C=0,I=l.i,O=l.j,M=l.S;S--;)w=M[I=y&I+1],C=C*n+M[y&(M[I]=M[O=y&O+w])+(M[O]=w)];return l.i=I,l.j=O,C;};}function p(m,a){return a.i=m.i,a.j=m.j,a.S=m.S.slice(),a;}function c(m,a){for(var s,l=m+"",g=0;g<l.length;)a[y&g]=y&(s^=19*a[y&g])+l.charCodeAt(g++);return d(a);}function d(m){return String.fromCharCode.apply(0,m);}r["seed"+_]=function(f,a,s){function l(){for(var S=v.g(o),w=E,C=0;S<x;)S=(S+C)*n,w*=n,C=v.g(1);for(;h<=S;)S/=2,w/=2,C>>>=1;return(S+C)/w;}var g=[],f=c(function S(w,C){var I,O=[],M=_typeof$2(w);if(C&&M=="object")for(I in w)try{O.push(S(w[I],C-1));}catch{}return O.length?O:M=="string"?w:w+"\0";}((a=a===!0?{entropy:!0}:a||{}).entropy?[f,d(i)]:f===null?function(){try{if(e)return d(e.randomBytes(n));var S=new Uint8Array(n);return(t.crypto||t.msCrypto).getRandomValues(S),d(S);}catch{return S=t.navigator,S=S&&S.plugins,[+new Date(),t,S,t.screen,d(i)];}}():f,3),g),v=new b(g);return l.int32=function(){return 0|v.g(4);},l.quick=function(){return v.g(4)/4294967296;},l.double=l,c(d(v.S),i),(a.pass||s||function(S,w,C,I){return I&&(I.S&&p(I,v),S.state=function(){return p(v,{});}),C?(r[_]=S,w):S;})(l,f,"global"in a?a.global:this==r,a.state);},c(r.random(),i);}function initialize$2(i){seedRandom([],i);}var propTypes={SHAPE:"shape"};function _typeof$1(i){return(_typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={};}function $bm_isInstanceOfArray(i){return i.constructor===Array||i.constructor===Float32Array;}function isNumerable(i,r){return i==="number"||r instanceof Number||i==="boolean"||i==="string";}function $bm_neg(i){var r=_typeof$1(i);if(r==="number"||i instanceof Number||r==="boolean")return-i;if($bm_isInstanceOfArray(i)){for(var e=i.length,t=[],n=0;n<e;n+=1)t[n]=-i[n];return t;}return i.propType?i.v:-i;}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(i,r){var e=_typeof$1(i),t=_typeof$1(r);if(isNumerable(e,i)&&isNumerable(t,r)||e==="string"||t==="string")return i+r;if($bm_isInstanceOfArray(i)&&isNumerable(t,r))return(i=i.slice(0))[0]+=r,i;if(isNumerable(e,i)&&$bm_isInstanceOfArray(r))return(r=r.slice(0))[0]=i+r[0],r;if($bm_isInstanceOfArray(i)&&$bm_isInstanceOfArray(r)){for(var n=0,o=i.length,_=r.length,E=[];n<o||n<_;)(typeof i[n]=="number"||i[n]instanceof Number)&&(typeof r[n]=="number"||r[n]instanceof Number)?E[n]=i[n]+r[n]:E[n]=r[n]===void 0?i[n]:i[n]||r[n],n+=1;return E;}return 0;}var add=sum;function sub(i,r){var e=_typeof$1(i),t=_typeof$1(r);if(isNumerable(e,i)&&isNumerable(t,r))return(i=e==="string"?parseInt(i,10):i)-(r=t==="string"?parseInt(r,10):r);if($bm_isInstanceOfArray(i)&&isNumerable(t,r))return(i=i.slice(0))[0]-=r,i;if(isNumerable(e,i)&&$bm_isInstanceOfArray(r))return(r=r.slice(0))[0]=i-r[0],r;if($bm_isInstanceOfArray(i)&&$bm_isInstanceOfArray(r)){for(var n=0,o=i.length,_=r.length,E=[];n<o||n<_;)(typeof i[n]=="number"||i[n]instanceof Number)&&(typeof r[n]=="number"||r[n]instanceof Number)?E[n]=i[n]-r[n]:E[n]=r[n]===void 0?i[n]:i[n]||r[n],n+=1;return E;}return 0;}function mul(i,r){var e,t,n,o=_typeof$1(i),_=_typeof$1(r);if(isNumerable(o,i)&&isNumerable(_,r))return i*r;if($bm_isInstanceOfArray(i)&&isNumerable(_,r)){for(n=i.length,e=createTypedArray("float32",n),t=0;t<n;t+=1)e[t]=i[t]*r;return e;}if(isNumerable(o,i)&&$bm_isInstanceOfArray(r)){for(n=r.length,e=createTypedArray("float32",n),t=0;t<n;t+=1)e[t]=i*r[t];return e;}return 0;}function div(i,r){var e,t,n,o=_typeof$1(i),_=_typeof$1(r);if(isNumerable(o,i)&&isNumerable(_,r))return i/r;if($bm_isInstanceOfArray(i)&&isNumerable(_,r)){for(n=i.length,e=createTypedArray("float32",n),t=0;t<n;t+=1)e[t]=i[t]/r;return e;}if(isNumerable(o,i)&&$bm_isInstanceOfArray(r)){for(n=r.length,e=createTypedArray("float32",n),t=0;t<n;t+=1)e[t]=i/r[t];return e;}return 0;}function mod(i,r){return(i=typeof i=="string"?parseInt(i,10):i)%(r=typeof r=="string"?parseInt(r,10):r);}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(i,r,e){var t;return e<r&&(t=e,e=r,r=t),Math.min(Math.max(i,r),e);}function radiansToDegrees(i){return i/degToRads;}var radians_to_degrees=radiansToDegrees;function degreesToRadians(i){return i*degToRads;}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(i,r){if(typeof i=="number"||i instanceof Number)return Math.abs(i-(r=r||0));for(var e=Math.min(i.length,(r=r||helperLengthArray).length),t=0,n=0;n<e;n+=1)t+=Math.pow(r[n]-i[n],2);return Math.sqrt(t);}function normalize(i){return div(i,length(i));}function rgbToHsl(i){var r,e=i[0],t=i[1],n=i[2],o=Math.max(e,t,n
138),_=Math.min(e,t,n),E=(o+_)/2;if(o===_)h=r=0;else{var x=o-_,h=.5<E?x/(2-o-_):x/(o+_);switch(o){case e:r=(t-n)/x+(t<n?6:0);break;case t:r=(n-e)/x+2;break;case n:r=(e-t)/x+4;}r/=6;}return[r,h,E,i[3]];}function hue2rgb(i,r,e){return e<0&&(e+=1),1<e&&--e,e<1/6?i+6*(r-i)*e:e<.5?r:e<2/3?i+(r-i)*(2/3-e)*6:i;}function hslToRgb(i){var r,e,t,n=i[0],o=i[1],_=i[2];return o===0?e=t=r=_:(r=hue2rgb(o=2*_-(_=_<.5?_*(1+o):_+o-_*o),_,n+1/3),e=hue2rgb(o,_,n),t=hue2rgb(o,_,n-1/3)),[r,e,t,i[3]];}function linear(i,r,e,t,n){var o;if(t!==void 0&&n!==void 0||(t=r,n=e,r=0,e=1),e<r&&(o=e,e=r,r=o),i<=r)return t;if(e<=i)return n;var _=e===r?0:(i-r)/(e-r);if(!t.length)return t+(n-t)*_;for(var E=t.length,x=createTypedArray("float32",E),h=0;h<E;h+=1)x[h]=t[h]+(n[h]-t[h])*_;return x;}function random(i,r){if(r===void 0&&(i===void 0?(i=0,r=1):(r=i,i=void 0)),r.length){for(var e=r.length,t=(i=i||createTypedArray("float32",e),createTypedArray("float32",e)),n=BMMath.random(),o=0;o<e;o+=1)t[o]=i[o]+n*(r[o]-i[o]);return t;}return(i=i===void 0?0:i)+BMMath.random()*(r-i);}function createPath(i,r,e,t){for(var n,o,_=i.length,E=shapePool.newElement(),x=(E.setPathData(!!t,_),[0,0]),h=0;h<_;h+=1)n=r&&r[h]?r[h]:x,o=e&&e[h]?e[h]:x,E.setTripleAt(i[h][0],i[h][1],o[0]+i[h][0],o[1]+i[h][1],n[0]+i[h][0],n[1]+i[h][1],h,!0);return E;}function initiateExpression(elem,data,property){function noOp(i){return i;}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property,inPoint=(thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v;}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0,elem.data.ip/elem.comp.globalData.frameRate),outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw||0,height=elem.data.sh||0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(i,r){for(var e=this.pv.length||1,t=createTypedArray("float32",e),n=Math.floor(5*time),o=0,_=0;o<n;){for(_=0;_<e;_+=1)t[_]+=-r+2*r*BMMath.random();o+=1;}var E=5*time,x=E-Math.floor(E),h=createTypedArray("float32",e);if(1<e){for(_=0;_<e;_+=1)h[_]=this.pv[_]+t[_]+(-r+2*r*BMMath.random())*x;return h;}return this.pv+t[0]+(-r+2*r*BMMath.random())*x;}.bind(this);function loopInDuration(i,r){return loopIn(i,r,!0);}function loopOutDuration(i,r){return loopOut(i,r,!0);}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(i,r){return r=[r[0]-i[0],r[1]-i[1],r[2]-i[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,[-Math.atan2(r[1],r[2])/degToRads,i,0];}function easeOut(i,r,e,t,n){return applyEase(easeOutBez,i,r,e,t,n);}function easeIn(i,r,e,t,n){return applyEase(easeInBez,i,r,e,t,n);}function ease(i,r,e,t,n){return applyEase(easeInOutBez,i,r,e,t,n);}function applyEase(i,r,e,t,n,o){n===void 0?(n=e,o=t):r=(r-e)/(t-e),1<r?r=1:r<0&&(r=0);var _=i(r);if($bm_isInstanceOfArray(n)){for(var E=n.length,x=createTypedArray("float32",E),h=0;h<E;h+=1)x[h]=(o[h]-n[h])*_+n[h];return x;}return(o-n)*_+n;}function nearestKey(i){var r,e,t,n=data.k.length;if(data.k.length&&typeof data.k[0]!="number"){if(e=-1,(i*=elem.comp.globalData.frameRate)<data.k[0].t)e=1,t=data.k[0].t;else{for(r=0;r<n-1;r+=1){if(i===data.k[r].t){e=r+1,t=data.k[r].t;break;}if(i>data.k[r].t&&i<data.k[r+1].t){t=i-data.k[r].t>data.k[r+1].t-i?(e=r+2,data.k[r+1].t):(e=r+1,data.k[r].t);break;}}e===-1&&(e=r+1,t=data.k[r].t);}}else t=e=0;var o={};return o.index=e,o.time=t/elem.comp.globalData.frameRate,o;}function key(i){if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+i);for(var r={time:data.k[--i].t/elem.comp.globalData.frameRate,value:[]},e=Object.prototype.hasOwnProperty.call(data.k[i],"s")?data.k[i].s:data.k[i-1].e,t=e.length,n=0;n<t;n+=1)r[n]=e[n],r.value[n]=e[n];return r;}function framesToTime(i,r){return i/(r=r||elem.comp.globalData.frameRate);}function timeToFrames(i,r){return(i=i||i===0?i:time)*(r=r||elem.comp.globalData.frameRate);}function seedRandom(i){BMMath.seedrandom(randSeed+i);}function sourceRectAtTime(){return elem.sourceRectAtTime();}function substring(i,r){return typeof value=="string"?r===void 0?value.substring(i):value.substring(i,r):"";}function substr(i,r){return typeof value=="string"?r===void 0?value.substr(i):value.substr(i,r):"";}function posterizeTime(i){time=i===0?0:Math.floor(time*i)/i,value=valueAtTime(time);}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(i){return value=i,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),elemType!==4||c
138ontent||(content=thisLayer("ADBE Root Vectors Group")),effect=effect||thisLayer(4),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt);}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression;}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob;}(),Expressions=function(){var i={};return i.initExpressions=function(r){var e=0,t=[];r.renderer.compInterface=CompExpressionInterface(r.renderer),r.renderer.globalData.projectInterface.registerComposition(r.renderer),r.renderer.globalData.pushExpression=function(){e+=1;},r.renderer.globalData.popExpression=function(){if(--e===0){var n,o=t.length;for(n=0;n<o;n+=1)t[n].release();t.length=0;}},r.renderer.globalData.registerExpressionProperty=function(n){t.indexOf(n)===-1&&t.push(n);};},i.resetFrame=ExpressionManager.resetFrame,i;}(),MaskManagerInterface=function(){function i(r,e){this._mask=r,this._data=e;}return Object.defineProperty(i.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop;}}),Object.defineProperty(i.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v;}}),function(r){for(var e=createSizedArray(r.viewData.length),t=r.viewData.length,n=0;n<t;n+=1)e[n]=new i(r.viewData[n],r.masksProperties[n]);return function(o){for(n=0;n<t;){if(r.masksProperties[n].nm===o)return e[n];n+=1;}return null;};};}(),ExpressionPropertyInterface=function(){var i={pv:0,v:0,mult:1},r={pv:[0,0,0],v:[0,0,0],mult:1};function e(n,o,_){Object.defineProperty(n,"velocity",{get:function(){return o.getVelocityAtTime(o.comp.currentFrame);}}),n.numKeys=o.keyframes?o.keyframes.length:0,n.key=function(E){if(!n.numKeys)return 0;var x="",x="s"in o.keyframes[E-1]?o.keyframes[E-1].s:"e"in o.keyframes[E-2]?o.keyframes[E-2].e:o.keyframes[E-2].s,h=_==="unidimensional"?new Number(x):Object.assign({},x);return h.time=o.keyframes[E-1].t/o.elem.comp.globalData.frameRate,h.value=_==="unidimensional"?x[0]:x,h;},n.valueAtTime=o.getValueAtTime,n.speedAtTime=o.getSpeedAtTime,n.velocityAtTime=o.getVelocityAtTime,n.propertyGroup=o.propertyGroup;}function t(){return i;}return function(n){return n?n.propType==="unidimensional"?(_=1/(o=(o=n)&&"pv"in o?o:i).mult,E=o.pv*_,(x=new Number(E)).value=E,e(x,o,"unidimensional"),function(){return o.k&&o.getValue(),E=o.v*_,x.value!==E&&((x=new Number(E)).value=E,e(x,o,"unidimensional")),x;}):(y=1/(h=(h=n)&&"pv"in h?h:r).mult,b=h.data&&h.data.l||h.pv.length,p=createTypedArray("float32",b),c=createTypedArray("float32",b),p.value=c,e(p,h,"multidimensional"),function(){h.k&&h.getValue();for(var d=0;d<b;d+=1)c[d]=h.v[d]*y,p[d]=c[d];return p;}):t;var o,_,E,x,h,y,b,p,c;};}(),TransformExpressionInterface=function(i){function r(_){switch(_){case"scale":case"Scale":case"ADBE Scale":case 6:return r.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return r.rotation;case"ADBE Rotate X":return r.xRotation;case"ADBE Rotate Y":return r.yRotation;case"position":case"Position":case"ADBE Position":case 2:return r.position;case"ADBE Position_0":return r.xPosition;case"ADBE Position_1":return r.yPosition;case"ADBE Position_2":return r.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return r.anchorPoint;case"opacity":case"Opacity":case 11:return r.opacity;default:return null;}}var e,t,n,o;return Object.defineProperty(r,"rotation",{get:ExpressionPropertyInterface(i.r||i.rz)}),Object.defineProperty(r,"zRotation",{get:ExpressionPropertyInterface(i.rz||i.r)}),Object.defineProperty(r,"xRotation",{get:ExpressionPropertyInterface(i.rx)}),Object.defineProperty(r,"yRotation",{get:ExpressionPropertyInterface(i.ry)}),Object.defineProperty(r,"scale",{get:ExpressionPropertyInterface(i.s)}),i.p?o=ExpressionPropertyInterface(i.p):(e=ExpressionPropertyInterface(i.px),t=ExpressionPropertyInterface(i.py),i.pz&&(n=ExpressionPropertyInterface(i.pz))),Object.defineProperty(r,"position",{get:function(){return i.p?o():[e(),t(),n?n():0];}}),Object.defineProperty(r,"xPosition",{get:ExpressionPropertyInterface(i.px)}),Object.defineProperty(r,"yPosition",{get:ExpressionPropertyInterface(i.py)}),Object.defineProperty(r,"zPosition",{get:ExpressionPropertyInterface(i.pz)}),Object.defineProperty(r,"anchorPoint",{get:ExpressionPropertyInterface(i.a)}),Object.defineProperty(r,"opacity",{get:ExpressionPropertyInterface(i.o)}),Object.defineProperty(r,"skew",{get:ExpressionPropertyInterface(i.sk)}),Object.defineProperty(r,"skewAxis",{get:ExpressionPropertyInterface(i.sa)}),Object.defineProperty(r,"orientation",{get:ExpressionPropertyInterface(i.or)}),r;},LayerExpressionInterface=function(){function i(h){var y=new Matrix();return h!==void 0?this._elem.finalTransform.mProp.getValueAtTime(h).clone(y):this._elem.finalTransform.mProp.applyToMatrix(y),y;}function r(h,y){return y=this.getMatrix(y),y.props[12]=0,y.props[13]=0,y.props[14]=0,this.applyPoint(y,h);}function e(h,y){return y=this.getMatrix(y),this.applyPoint(y,h);}function t(h,y){return y=this.getMatrix(y),y.props[12]=0,y.props[13]=0,y.props[14]=0,this.invertPoint(y,h);}function n(h,y){return y=this.getMatrix(y),this.invertPoint(y,h);}
138function o(h,y){if(this._elem.hierarchy&&this._elem.hierarchy.length)for(var b=this._elem.hierarchy.length,p=0;p<b;p+=1)this._elem.hierarchy[p].finalTransform.mProp.applyToMatrix(h);return h.applyToPointArray(y[0],y[1],y[2]||0);}function _(h,y){if(this._elem.hierarchy&&this._elem.hierarchy.length)for(var b=this._elem.hierarchy.length,p=0;p<b;p+=1)this._elem.hierarchy[p].finalTransform.mProp.applyToMatrix(h);return h.inversePoint(y);}function E(h){var y=new Matrix();if(y.reset(),this._elem.finalTransform.mProp.applyToMatrix(y),this._elem.hierarchy&&this._elem.hierarchy.length)for(var b=this._elem.hierarchy.length,p=0;p<b;p+=1)this._elem.hierarchy[p].finalTransform.mProp.applyToMatrix(y);return y.inversePoint(h);}function x(){return[1,1,1,1];}return function(h){function y(c){switch(c){case"ADBE Root Vectors Group":case"Contents":case 2:return y.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return b;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return y.effect;case"ADBE Text Properties":return y.textInterface;default:return null;}}y.getMatrix=i,y.invertPoint=_,y.applyPoint=o,y.toWorld=e,y.toWorldVec=r,y.fromWorld=n,y.fromWorldVec=t,y.toComp=e,y.fromComp=E,y.sampleImage=x,y.sourceRectAtTime=h.sourceRectAtTime.bind(h);var b,p=getDescriptor(b=TransformExpressionInterface((y._elem=h).finalTransform.mProp),"anchorPoint");return Object.defineProperties(y,{hasParent:{get:function(){return h.hierarchy.length;}},parent:{get:function(){return h.hierarchy[0].layerInterface;}},rotation:getDescriptor(b,"rotation"),scale:getDescriptor(b,"scale"),position:getDescriptor(b,"position"),opacity:getDescriptor(b,"opacity"),anchorPoint:p,anchor_point:p,transform:{get:function(){return b;}},active:{get:function(){return h.isInRange;}}}),y.startTime=h.data.st,y.index=h.data.ind,y.source=h.data.refId,y.height=h.data.ty===0?h.data.h:100,y.width=h.data.ty===0?h.data.w:100,y.inPoint=h.data.ip/h.comp.globalData.frameRate,y.outPoint=h.data.op/h.comp.globalData.frameRate,y._name=h.data.nm,y.registerMaskInterface=function(c){y.mask=new MaskManagerInterface(c,h);},y.registerEffectsInterface=function(c){y.effect=c;},y;};}(),propertyGroupFactory=function(i,r){return function(e){return(e=e===void 0?1:e)<=0?i:r(e-1);};},PropertyInterface=function(i,r){var e={_name:i};return function(t){return(t=t===void 0?1:t)<=0?e:r(t-1);};},EffectsExpressionInterface=function(){function i(r,e,t,n){var o=ExpressionPropertyInterface(r.p);return r.p.setGroupProperty&&r.p.setGroupProperty(PropertyInterface("",n)),function(){return e===10?t.comp.compInterface(r.p.v):o();};}return{createEffectsInterface:function(r,e){if(r.effectsManager){var t,n=[],o=r.data.ef,_=r.effectsManager.effectElements.length;for(t=0;t<_;t+=1)n.push(function h(y,b,p,c){function d(g){for(var f=y.ef,v=0,S=f.length;v<S;){if(g===f[v].nm||g===f[v].mn||g===f[v].ix)return f[v].ty===5?a[v]:a[v]();v+=1;}throw new Error();}var m=propertyGroupFactory(d,p),a=[],s,l=y.ef.length;for(s=0;s<l;s+=1)y.ef[s].ty===5?a.push(h(y.ef[s],b.effectElements[s],b.effectElements[s].propertyGroup,c)):a.push(i(b.effectElements[s],y.ef[s].ty,c,m));return y.mn==="ADBE Color Control"&&Object.defineProperty(d,"color",{get:function(){return a[0]();}}),Object.defineProperties(d,{numProperties:{get:function(){return y.np;}},_name:{value:y.nm},propertyGroup:{value:m}}),d.enabled=y.en!==0,d.active=d.enabled,d;}(o[t],r.effectsManager.effectElements[t],e,r));var E=r.data.ef||[],x=function(h){for(t=0,_=E.length;t<_;){if(h===E[t].nm||h===E[t].mn||h===E[t].ix)return n[t];t+=1;}return null;};return Object.defineProperty(x,"numProperties",{get:function(){return E.length;}}),x;}return null;}};}(),ShapePathInterface=function(i,r,e){var t=r.sh;function n(o){return o==="Shape"||o==="shape"||o==="Path"||o==="path"||o==="ADBE Vector Shape"||o===2?n.path:null;}return r=propertyGroupFactory(n,e),t.setGroupProperty(PropertyInterface("Path",r)),Object.defineProperties(n,{path:{get:function(){return t.k&&t.getValue(),t;}},shape:{get:function(){return t.k&&t.getValue(),t;}},_name:{value:i.nm},ix:{value:i.ix},propertyIndex:{value:i.ix},mn:{value:i.mn},propertyGroup:{value:e}}),n;},ShapeExpressionInterface=function(){function i(e,t,n){for(var o=[],_=e?e.length:0,E=0;E<_;E+=1)e[E].ty==="gr"?o.push(function(x,h,y){function b(p){switch(p){case"ADBE Vectors Group":case"Contents":case 2:return b.content;default:return b.transform;}}return b.propertyGroup=propertyGroupFactory(b,y),y=function(p,c,s){function m(l){for(var g=0,f=a.length;g<f;){if(a[g]._name===l||a[g].mn===l||a[g].propertyIndex===l||a[g].ix===l||a[g].ind===l)return a[g];g+=1;}return typeof l=="number"?a[l-1]:null;}m.propertyGroup=propertyGroupFactory(m,s),a=i(p.it,c.it,m.propertyGroup),m.numProperties=a.length;var a,s=r(p.it[p.it.length-1],c.it[c.it.length-1],m.propertyGroup);return m.transform=s,m.propertyIndex=p.cix,m._name=p.nm,m;}(x,h,b.propertyGroup),h=r(x.it[x.it.length-1],h.it[h.it.length-1],b.propertyGroup),b.content=y,b.transform=h,Object.defineProperty(b,"_name",{get:function(){return x.nm;}}),b.numProperties=x.np,b.propertyIndex=x.ix,b.nm=x.nm,b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="fl"?o.push(function(x,h,y){function b(p){return p==="Color"||p==="color"?b.color:p==="Opacity"||p==="opacity"?b.opacity:null;}return Object.defineProperties(b,{color:{get:ExpressionPropertyInterface(h.c)},opacity:{get:ExpressionPropertyInterface(h.o)},_name:{value:x.nm},mn:{value:x.mn}}),h.c.setGroupProperty(PropertyInterface("Color",y)),h.o.setGroupProperty(PropertyInterface("Opacity",y)),b;}(e[E],t[E],n)):e[E].ty==="st"?o.push(function(x,h,p){var b,p=propertyGroupFactory(a,p),c=propertyGroupFactory(void 0,p),d=x.d?x.d.length:0,m={};for(b=0;b<d;b+=1)(function(s){Object.defineProperty(m,x.d[s].nm,{get:ExpressionPropertyInterface(h.d.dataProps[s].p)});})(b),h.d.dataProps[b].p.setGroupProperty(c);function a(s){return s==="Color"||s==="color"?a.color:s==="Opacity"||s==="opacity"?a.opacity:s==="Stroke Width"||s==="stroke width"?a.strokeWidth:null;}return Object.defineProperties(a,{color:{get:ExpressionPropertyInterface(h.c)},opacity:{get:ExpressionPropertyInterface(h.o)},strokeWidth:{get:ExpressionPropertyInterface(h.w)},dash:{get:function(){return m;}},_name:{value:x.nm},mn:{value:x.mn}}),h.c.setGroupProperty(PropertyInterface("Color",p)),h.o.setGroupProperty(PropertyInterface("Opacity",p)),h.w.setGroupProperty(PropertyInterface("Stroke Width",p)),a;}(e[E],t[E],n)):e[E].ty==="tm"?o.push(function(x,h,y){function b(c){return c===x.e.ix||c==="End"||c==="end"?b.end:c===x.s.ix?b.start:c===x.o.ix?b.offset:null;}var p=propertyGroupFactory(b,y);return b.propertyIndex=x.ix,h.s.setGroupProperty(PropertyInterface("Start",p)),h.e.setGroupProperty(PropertyInterface("End",p)),h.o.setGroupProperty(PropertyInterface("Offset",p)),b.propertyIndex=x.ix,b.propertyGroup=y,Object.defineProperties(b,{start:{get:ExpressionPropertyInterface(h.s)},end:{get:ExpressionPropertyInterface(h.e)},offset:{get:ExpressionPropertyInterface(h.o)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty!=="tr"&&(e[E].ty==="el"?o.push(function(x,h,y){function b(p){return x.p.ix===p?b.position:x.s.ix===p?b.size:null;}return y=propertyGroupFactory(b,y),b.propertyIndex=x.ix,h=h.sh.ty==="tm"?h.sh.prop:h.sh,h.s.setGroupProperty(PropertyInterface("Size",y)),h.p.setGroupProperty(PropertyInterface("Position",y)),Object.defineProperties(b,{size:{get:ExpressionPropertyInterface(h.s)},position:{get:ExpressionPropertyInterface(h.p)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="sr"?o.push(function(x,h,y){function b(p){return x.p.ix===p?b.position:x.r.ix===p?b.rotation:x.pt.ix===p?b.points:x.or.ix===p||p==="ADBE Vector Star Outer Radius"?b.outerRadius:x.os.ix===p?b.outerRoundness:!x.ir||x.ir.ix!==p&&p!=="ADBE Vector Star Inner Radius"?x.is&&x.is.ix===p?b.innerRoundness:null:b.innerRadius;}return y=propertyGroupFactory(b,y),h=h.sh.ty==="tm"?h.sh.prop:h.sh,b.propertyIndex=x.ix,h.or.setGroupProperty(PropertyInterface("Outer Radius",y)),h.os.setGroupProperty(PropertyInterface("Outer Roundness",y)),h.pt.setGroupProperty(PropertyInterface("Points",y)),h.p.setGroupProperty(PropertyInterface("Position",y)),h.r.setGroupProperty(PropertyInterface("Rotation",y)),x.ir&&(h.ir.setGroupProperty(PropertyInterface("Inner Radius",y)),h.is.setGroupProperty(PropertyInterface("Inner Roundness",y))),Object.defineProperties(b,{position:{get:ExpressionPropertyInterface(h.p)},rotation:{get:ExpressionPropertyInterface(h.r)},points:{get:ExpressionPropertyInterface(h.pt)},outerRadius:{get:ExpressionPropertyInterface(h.or)},outerRoundness:{get:ExpressionPropertyInterface(h.os)},innerRadius:{get:ExpressionPropertyInterface(h.ir)},innerRoundness:{get:ExpressionPropertyInterface(h.is)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="sh"?o.push(ShapePathInterface(e[E],t[E],n)):e[E].ty==="rc"?o.push(function(x,h,y){function b(p){return x.p.ix===p?b.position:x.r.ix===p?b.roundness:x.s.ix===p||p==="Size"||p==="ADBE Vector Rect Size"?b.size:null;}return y=propertyGroupFactory(b,y),h=h.sh.ty==="tm"?h.sh.prop:h.sh,b.propertyIndex=x.ix,h.p.setGroupProperty(PropertyInterface("Position",y)),h.s.setGroupProperty(PropertyInterface("Size",y)),h.r.setGroupProperty(PropertyInterface("Rotation",y)),Object.defineProperties(b,{position:{get:ExpressionPropertyInterface(h.p)},roundness:{get:ExpressionPropertyInterface(h.r)},size:{get:ExpressionPropertyInterface(h.s)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="rd"?o.push(function(x,h,y){function b(p){return x.r.ix===p||p==="Round Corners 1"?b.radiu
138s:null;}return y=propertyGroupFactory(b,y),b.propertyIndex=x.ix,h.rd.setGroupProperty(PropertyInterface("Radius",y)),Object.defineProperties(b,{radius:{get:ExpressionPropertyInterface(h.rd)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="rp"?o.push(function(x,h,y){function b(p){return x.c.ix===p||p==="Copies"?b.copies:x.o.ix===p||p==="Offset"?b.offset:null;}return y=propertyGroupFactory(b,y),b.propertyIndex=x.ix,h.c.setGroupProperty(PropertyInterface("Copies",y)),h.o.setGroupProperty(PropertyInterface("Offset",y)),Object.defineProperties(b,{copies:{get:ExpressionPropertyInterface(h.c)},offset:{get:ExpressionPropertyInterface(h.o)},_name:{value:x.nm}}),b.mn=x.mn,b;}(e[E],t[E],n)):e[E].ty==="gf"?o.push(function(x,h,y){function b(p){return p==="Start Point"||p==="start point"?b.startPoint:p==="End Point"||p==="end point"?b.endPoint:p==="Opacity"||p==="opacity"?b.opacity:null;}return Object.defineProperties(b,{startPoint:{get:ExpressionPropertyInterface(h.s)},endPoint:{get:ExpressionPropertyInterface(h.e)},opacity:{get:ExpressionPropertyInterface(h.o)},type:{get:function(){return"a";}},_name:{value:x.nm},mn:{value:x.mn}}),h.s.setGroupProperty(PropertyInterface("Start Point",y)),h.e.setGroupProperty(PropertyInterface("End Point",y)),h.o.setGroupProperty(PropertyInterface("Opacity",y)),b;}(e[E],t[E],n)):o.push((e[E],t[E],function(){return null;})));return o;}function r(e,t,n){function o(E){return e.a.ix===E||E==="Anchor Point"?o.anchorPoint:e.o.ix===E||E==="Opacity"?o.opacity:e.p.ix===E||E==="Position"?o.position:e.r.ix===E||E==="Rotation"||E==="ADBE Vector Rotation"?o.rotation:e.s.ix===E||E==="Scale"?o.scale:e.sk&&e.sk.ix===E||E==="Skew"?o.skew:e.sa&&e.sa.ix===E||E==="Skew Axis"?o.skewAxis:null;}var _=propertyGroupFactory(o,n);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",_)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",_)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",_)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",_)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",_)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",_)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",_))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",_)),Object.defineProperties(o,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),o.ty="tr",o.mn=e.mn,o.propertyGroup=n,o;}return function(e,t,n){var o;function _(E){if(typeof E=="number")return(E=E===void 0?1:E)===0?n:o[E-1];for(var x=0,h=o.length;x<h;){if(o[x]._name===E)return o[x];x+=1;}return null;}return _.propertyGroup=propertyGroupFactory(_,function(){return n;}),o=i(e,t,_.propertyGroup),_.numProperties=o.length,_._name="Contents",_;};}(),TextExpressionInterface=function(i){var r;function e(t){return t!=="ADBE Text Document"?null:e.sourceText;}return Object.defineProperty(e,"sourceText",{get:function(){i.textProperty.getValue();var t=i.textProperty.currentData.t;return r&&t===r.value||((r=new String(t)).value=t||new String(t),Object.defineProperty(r,"style",{get:function(){return{fillColor:i.textProperty.currentData.fc};}})),r;}}),e;};function _typeof(i){return(_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r;}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r;})(i);}var FootageInterface=function(){function i(r){function e(E){return E==="Outline"?e.outlineInterface():null;}function t(E){if(_[E])return _typeof(_=_[o=E])==="object"?t:_;var x=E.indexOf(o);return x!==-1?(E=parseInt(E.substr(x+o.length),10),_typeof(_=_[E])==="object"?t:_):"";}var n,o,_;return e._name="Outline",e.outlineInterface=(o="",_=(n=r).getFootageData(),function(){return o="",_=n.getFootageData(),t;}),e;}return function(r){function e(t){return t==="Data"?e.dataInterface:null;}return e._name="Data",e.dataInterface=i(r),e;};}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(i){return interfaces[i]||null;}var expressionHelpers={searchExpressions:function(i,r,e){r.x&&(e.k=!0,e.x=!0,e.initiateExpression=ExpressionManager.initiateExpression,e.effectsSequence.push(e.initiateExpression(i,r,e).bind(e)));}
138,getSpeedAtTime:function(i){var r=this.getValueAtTime(i),e=this.getValueAtTime(i+-.01),t=0;if(r.length){for(var n=0;n<r.length;n+=1)t+=Math.pow(e[n]-r[n],2);t=100*Math.sqrt(t);}else t=0;return t;},getVelocityAtTime:function(i){if(this.vel!==void 0)return this.vel;var r=this.getValueAtTime(i),e=this.getValueAtTime(i+-.001);if(r.length)for(var t=createTypedArray("float32",r.length),n=0;n<r.length;n+=1)t[n]=(e[n]-r[n])/-.001;else t=(e-r)/-.001;return t;},getValueAtTime:function(i){return(i=(i*=this.elem.globalData.frameRate)-this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<i?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(i,this._cachingAtTime),this._cachingAtTime.lastFrame=i),this._cachingAtTime.value;},getStaticValueAtTime:function(){return this.pv;},setGroupProperty:function(i){this.propertyGroup=i;}};function addPropertyDecorator(){function i(h,y,b){if(!this.k||!this.keyframes)return this.pv;h=h?h.toLowerCase():"";var p,c,d,m,a,s=this.comp.renderedFrame,l=this.keyframes,g=l[l.length-1].t;if(s<=g)return this.pv;if(b?c=g-(p=y?Math.abs(g-this.elem.comp.globalData.frameRate*y):Math.max(0,g-this.elem.data.ip)):((!y||y>l.length-1)&&(y=l.length-1),p=g-(c=l[l.length-1-y].t)),h==="pingpong"){if(Math.floor((s-c)/p)%2!=0)return this.getValueAtTime((p-(s-c)%p+c)/this.comp.globalData.frameRate,0);}else{if(h==="offset"){var f=this.getValueAtTime(c/this.comp.globalData.frameRate,0),v=this.getValueAtTime(g/this.comp.globalData.frameRate,0),S=this.getValueAtTime(((s-c)%p+c)/this.comp.globalData.frameRate,0),w=Math.floor((s-c)/p);if(this.pv.length){for(m=(a=new Array(f.length)).length,d=0;d<m;d+=1)a[d]=(v[d]-f[d])*w+S[d];return a;}return(v-f)*w+S;}if(h==="continue"){var C=this.getValueAtTime(g/this.comp.globalData.frameRate,0),I=this.getValueAtTime((g-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(m=(a=new Array(C.length)).length,d=0;d<m;d+=1)a[d]=C[d]+(C[d]-I[d])*((s-g)/this.comp.globalData.frameRate)/5e-4;return a;}return C+(s-g)/.001*(C-I);}}return this.getValueAtTime(((s-c)%p+c)/this.comp.globalData.frameRate,0);}function r(h,y,b){if(!this.k)return this.pv;h=h?h.toLowerCase():"";var p,c,d,m,a,s=this.comp.renderedFrame,l=this.keyframes,g=l[0].t;if(g<=s)return this.pv;if(b?c=g+(p=y?Math.abs(this.elem.comp.globalData.frameRate*y):Math.max(0,this.elem.data.op-g)):p=(c=l[y=!y||y>l.length-1?l.length-1:y].t)-g,h==="pingpong"){if(Math.floor((g-s)/p)%2==0)return this.getValueAtTime(((g-s)%p+g)/this.comp.globalData.frameRate,0);}else{if(h==="offset"){var f=this.getValueAtTime(g/this.comp.globalData.frameRate,0),v=this.getValueAtTime(c/this.comp.globalData.frameRate,0),S=this.getValueAtTime((p-(g-s)%p+g)/this.comp.globalData.frameRate,0),w=Math.floor((g-s)/p)+1;if(this.pv.length){for(m=(a=new Array(f.length)).length,d=0;d<m;d+=1)a[d]=S[d]-(v[d]-f[d])*w;return a;}return S-(v-f)*w;}if(h==="continue"){var C=this.getValueAtTime(g/this.comp.globalData.frameRate,0),I=this.getValueAtTime((g+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(m=(a=new Array(C.length)).length,d=0;d<m;d+=1)a[d]=C[d]+(C[d]-I[d])*(g-s)/.001;return a;}return C+(C-I)*(g-s)/.001;}}return this.getValueAtTime((p-((g-s)%p+g))/this.comp.globalData.frameRate,0);}function e(h,y){if(!this.k)return this.pv;if(h=.5*(h||.4),(y=Math.floor(y||5))<=1)return this.pv;for(var b,p=this.comp.renderedFrame/this.comp.globalData.frameRate,c=p-h,d=1<y?(p+h-c)/(y-1):1,m=0,a=0,s=this.pv.length?createTypedArray("float32",this.pv.length):0;m<y;){if(b=this.getValueAtTime(c+m*d),this.pv.length)for(a=0;a<this.pv.length;a+=1)s[a]+=b[a];else s+=b;m+=1;}if(this.pv.length)for(a=0;a<this.pv.length;a+=1)s[a]/=y;else s/=y;return s;}var t=TransformPropertyFactory.getTransformProperty,n=(TransformPropertyFactory.getTransformProperty=function(h,y,b){return h=t(h,y,b),h.dynamicProperties.length?h.getValueAtTime=function(p){this._transformCachingAtTime||(this._transformCachingAtTime={v:ne
138w Matrix()});var c,d,m,a,s=this._transformCachingAtTime.v;return s.cloneFromProps(this.pre.props),this.appliedTransformations<1&&(d=this.a.getValueAtTime(p),s.translate(-d[0]*this.a.mult,-d[1]*this.a.mult,d[2]*this.a.mult)),this.appliedTransformations<2&&(d=this.s.getValueAtTime(p),s.scale(d[0]*this.s.mult,d[1]*this.s.mult,d[2]*this.s.mult)),this.sk&&this.appliedTransformations<3&&(d=this.sk.getValueAtTime(p),c=this.sa.getValueAtTime(p),s.skewFromAxis(-d*this.sk.mult,c*this.sa.mult)),this.r&&this.appliedTransformations<4?(d=this.r.getValueAtTime(p),s.rotate(-d*this.r.mult)):!this.r&&this.appliedTransformations<4&&(c=this.rz.getValueAtTime(p),d=this.ry.getValueAtTime(p),m=this.rx.getValueAtTime(p),a=this.or.getValueAtTime(p),s.rotateZ(-c*this.rz.mult).rotateY(d*this.ry.mult).rotateX(m*this.rx.mult).rotateZ(-a[2]*this.or.mult).rotateY(a[1]*this.or.mult).rotateX(a[0]*this.or.mult)),this.data.p&&this.data.p.s?(c=this.px.getValueAtTime(p),d=this.py.getValueAtTime(p),this.data.p.z?(m=this.pz.getValueAtTime(p),s.translate(c*this.px.mult,d*this.py.mult,-m*this.pz.mult)):s.translate(c*this.px.mult,d*this.py.mult,0)):(a=this.p.getValueAtTime(p),s.translate(a[0]*this.p.mult,a[1]*this.p.mult,-a[2]*this.p.mult)),s;}.bind(h):h.getValueAtTime=function(){return this.v.clone(new Matrix());}.bind(h),h.setGroupProperty=expressionHelpers.setGroupProperty,h;},PropertyFactory.getProp);PropertyFactory.getProp=function(h,y,b,d,c){var d=n(h,y,b,d,c),m=(d.kf?d.getValueAtTime=expressionHelpers.getValueAtTime.bind(d):d.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(d),d.setGroupProperty=expressionHelpers.setGroupProperty,d.loopOut=i,d.loopIn=r,d.smooth=e,d.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(d),d.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(d),d.numKeys=y.a===1?y.k.length:0,d.propertyIndex=y.ix,0);return b!==0&&(m=createTypedArray("float32",(y.a===1?y.k[0].s:y.k).length)),d._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:m},expressionHelpers.searchExpressions(h,y,d),d.k&&c.addDynamicProperty(d),d;};var o=ShapePropertyFactory.getConstructorFunction(),_=ShapePropertyFactory.getKeyframedConstructorFunction();function E(){}E.prototype={vertices:function(h,y){this.k&&this.getValue();for(var b=this.v,p=(b=y!==void 0?this.getValueAtTime(y,0):b)._length,c=b[h],d=b.v,m=createSizedArray(p),a=0;a<p;a+=1)m[a]=h==="i"||h==="o"?[c[a][0]-d[a][0],c[a][1]-d[a][1]]:[c[a][0],c[a][1]];return m;},points:function(h){return this.vertices("v",h);},inTangents:function(h){return this.vertices("i",h);},outTangents:function(h){return this.vertices("o",h);},isClosed:function(){return this.v.c;},pointOnPath:function(h,y){for(var b=this.v,y=(y!==void 0&&(b=this.getValueAtTime(y,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(b)),this._segmentsLength),p=y.lengths,c=y.totalLength*h,d=0,m=p.length,a=0;d<m;){if(a+p[d].addedLength>c){var s=d,l=b.c&&d===m-1?0:d+1,g=(c-a)/p[d].addedLength,f=bez.getPointInSegment(b.v[s],b.v[l],b.o[s],b.i[l],g,p[d]);break;}a+=p[d].addedLength,d+=1;}return f=f||(b.c?[b.v[0][0],b.v[0][1]]:[b.v[b._length-1][0],b.v[b._length-1][1]]);},vectorOnPath:function(c,p,b){c==1?c=this.v.c:c==0&&(c=.999);var d=this.pointOnPath(c,p),c=this.pointOnPath(c+.001,p),p=c[0]-d[0],c=c[1]-d[1],d=Math.sqrt(Math.pow(p,2)+Math.pow(c,2));return d===0?[0,0]:b==="tangent"?[p/d,c/d]:[-c/d,p/d];},tangentOnPath:function(h,y){return this.vectorOnPath(h,y,"tangent");},normalOnPath:function(h,y){return this.vectorOnPath(h,y,"normal");},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([E],o),extendPrototype([E],_),_.prototype.getValueAtTime=function(h){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),(h=(h*=this.elem.globalData.frameRate)-this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<h?this._caching.lastIndex:0,this._cachingAtTime.lastTime=h,this.interpolateShape(h,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue;},_.prototype.initiateExpression=ExpressionManager.initiateExpression;var x=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(h,y,b,p,c){return p=x(h,y,b,p,c),p.propertyIndex=y.ix,p.lock=!1,b===3?expressionHelpers.searchExpressions(h,y.pt,p):b===4&&expressionHelpers.searchExpressions(h,y.ks,p),p.k&&h.addDynamicProperty(p),p;};}function initialize$1(){addPropertyDecorator();}function addDecorator(){TextProperty.prototype.getExpressionValue=function(i,t){var e,t=this.calculateExpression(t);return i.t!==t?(this.copyData(e={},i),e.t=t.toString(),e.__complete=!1,e):i;},TextProperty.prototype.searchProperty=function(){var i=this.searchKeyframes(),r=this.searchExpressions();return this.kf=i||r,this.kf;},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null;};}function initialize(){addDecorator();}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(i,r){var e,t,n=createNS("feMerge");for(n.setAttribute("result",i),t=0;t<r.length;t+=1)(e=createNS("feMergeNode")).setAttribute("in",r[t]),n.appendChild(e),n.appendChild(e);return n;}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(i,r,e,t,n){this.filterManager=r,r=createNS("feColorMatrix"),r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values",linearFilterValue+" 1 0"),(this.linearFilter=r).setAttribute("result",t+"_tint_1"),i.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",t+"_tint_2"),i.appendChild(r),this.matrixFilter=r,r=this.createMergeNode(t,[n,t+"_tint_1",t+"_tint_2"]),i.appendChild(r);}function SVGFillFilter(i,r,e,t){this.filterManager=r,r=createNS("feColorMatrix"),r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",t),i.appendChild(r),this.matrixFilter=r;}function SVGStrokeEffect(i,r,e){this.initialized=!1,this.filterManager=r,this.elem=e,this.paths=[];}function SVGTritoneFilter(i,r,e,t){this.filterManager=r,r=createNS("feColorMatrix"),r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),i.appendChild(r),r=createNS("feComponentTransfer"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("result",t),this.matrixFilter=r,t=createNS("feFuncR"),t.setAttribute("type","table"),r.appendChild(t),this.feFuncR=t,t=createNS("feFuncG"),t.setAttribute("type","table"),r.appendChild(t),this.feFuncG=t,t=createNS("feFuncB"),t.setAttribute("type","table"),r.appendChild(t),this.feFuncB=t,i.appendChild(r);}function SVGProLevelsFilter(i,n,e,t){this.filterManager=n;var n=this.filterManager.effectElements,o=createNS("feComponentTransfer");(n[10].p.k||n[10].p.v!==0||n[11].p.k||n[11].p.v!==1||n[12].p.k||n[12].p.v!==1||n[13].p.k||n[13].p.v!==0||n[14].p.k||n[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",o)),(n[17].p.k||n[17].p.v!==0||n[18].p.k||n[18].p.v!==1||n[19].p.k||n[19].p.v!==1||n[20].p.k||n[20].p.v!==0||n[21].p.k||n[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",o)),(n[24].p.k||n[24].p.v!==0||n[25].p.k||n[25].p.v!==1||n[26].p.k||n[26].p.v!==1||n[27].p.k||n[27].p.v!==0||n[28].p.k||n[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",o)),(n[31].p.k||n[31].p.v!==0||n[32].p.k||n[32].p.v!==1||n[33].p.k||n[33].p.v!==1||n[34].p.k||n[34].p.v!==0||n[35].p.k||n[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",o)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(o.setAttribute("color-interpolation-filters","sRGB"),i.appendChild(o)),(n[3].p.k||n[3].p.v!==0||n[4].p.k||n[4].p.v!==1||n[5].p.k||n[5].p.v!==1||n[6].p.k||n[6].p.v!==0||n[7].p.k||n[7].p.v!==1)&&((o=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("result",t),i.appendChild(o),this.feFuncRComposed=this.createFeFunc("feFuncR",o),this.feFuncGComposed=this.createFeFunc("feFuncG",o),this.feFuncBComposed=this.createFeFunc("feFuncB",o));}function SVGDropShadowEffect(i,o,e,t,n){var E=o.container.globalData.renderConfig.filterSize,_=o.data.fs||E,_=(i.setAttribute("x",_.x||E.x),i.setAttribute("y",_.y||E.y),i.setAttribute("width",_.width||E.width),i.setAttribute("height",_.height||E.height),this.filterManager=o,createNS("feGaussianBlur")),E=(_.setAttribute("in","SourceAlpha"),_.setAttribute("result",t+"_drop_shadow_1"),_.setAttribute("stdDeviation","0"),this.feGaussianBlur=_,i.appendChild(_),createNS("feOffset")),o=(E.setAttribute("dx","25"),E.setAttribute("dy","0"),E.setAttribute("in",t+"_drop_shadow_1"),E.setAttribute("result",t+"_drop_shadow_2"),this.feOff
138set=E,i.appendChild(E),createNS("feFlood")),_=(o.setAttribute("flood-color","#00ff00"),o.setAttribute("flood-opacity","1"),o.setAttribute("result",t+"_drop_shadow_3"),this.feFlood=o,i.appendChild(o),createNS("feComposite")),E=(_.setAttribute("in",t+"_drop_shadow_3"),_.setAttribute("in2",t+"_drop_shadow_2"),_.setAttribute("operator","in"),_.setAttribute("result",t+"_drop_shadow_4"),i.appendChild(_),this.createMergeNode(t,[t+"_drop_shadow_4",n]));i.appendChild(E);}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(i){var r,e;(i||this.filterManager._mdf)&&(i=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,e=this.filterManager.effectElements[2].p.v/100,this.linearFilter.setAttribute("values",linearFilterValue+" "+e+" 0"),this.matrixFilter.setAttribute("values",r[0]-i[0]+" 0 0 0 "+i[0]+" "+(r[1]-i[1])+" 0 0 0 "+i[1]+" "+(r[2]-i[2])+" 0 0 0 "+i[2]+" 0 0 0 1 0"));},SVGFillFilter.prototype.renderFrame=function(i){var r;(i||this.filterManager._mdf)&&(i=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v,this.matrixFilter.setAttribute("values","0 0 0 0 "+i[0]+" 0 0 0 0 "+i[1]+" 0 0 0 0 "+i[2]+" 0 0 0 "+r+" 0"));},SVGStrokeEffect.prototype.initialize=function(){var i,r,e,t,n=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(this.filterManager.effectElements[1].p.v===1?(t=this.elem.maskManager.masksProperties.length,e=0):t=(e=this.filterManager.effectElements[0].p.v-1)+1,(r=createNS("g")).setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset",1);e<t;e+=1)i=createNS("path"),r.appendChild(i),this.paths.push({p:i,m:e});if(this.filterManager.effectElements[10].p.v===3){var o=createNS("mask"),_=createElementID(),E=(o.setAttribute("id",_),o.setAttribute("mask-type","alpha"),o.appendChild(r),this.elem.globalData.defs.appendChild(o),createNS("g"));for(E.setAttribute("mask","url("+getLocationHref()+"#"+_+")");n[0];)E.appendChild(n[0]);this.elem.layerElement.appendChild(E),this.masker=o,r.setAttribute("stroke","#fff");}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(n=this.elem.layerElement.children||this.elem.layerElement.childNodes;n.length;)this.elem.layerElement.removeChild(n[0]);this.elem.layerElement.appendChild(r),this.elem.layerElement.removeAttribute("mask"),r.setAttribute("stroke","#fff");}this.initialized=!0,this.pathMasker=r;},SVGStrokeEffect.prototype.renderFrame=function(i){this.initialized||this.initialize();for(var r,e,t=this.paths.length,n=0;n<t;n+=1)if(this.paths[n].m!==-1&&(o=this.elem.maskManager.viewData[this.paths[n].m],r=this.paths[n].p,(i||this.filterManager._mdf||o.prop._mdf)&&r.setAttribute("d",o.lastPath),i||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||o.prop._mdf)){if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){for(var o=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),_=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),E=r.getTotalLength(),x="0 0 0 "+E*o+" ",h=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,y=Math.floor(E*(_-o)/h),b=0;b<y;b+=1)x+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";x+="0 "+10*E+" 0 0";}else x="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;r.setAttribute("stroke-dasharray",x);}(i||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(i||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),this.filterManager.effectElements[10].p.v!==1&&this.filterManager.effectElements[10].p.v!==2||(i||this.filterManager.effectElements[3].p._mdf)&&(e=this.filterManager.effectElements[3].p.v,this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*e[0])+","+bmFloor(255*e[1])+","+bmFloor(255*e[2])+")"));},SVGTritoneFilter.prototype.renderFrame=function(i){var r,e,t,n;(i||this.filterManager._mdf)&&(i=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,e=(n=this.filterManager.effectElements[2].p.v)[0]+" "+r[0]+" "+i[0],t=n[1]+" "+r[1]+" "+i[1],n=n[2]+" "+r[2]+" "+i[2],this.feFuncR.setAttribute("tableValues",e),this.feFuncG.setAttribute("tableValues",t),this.feFuncB.setAttribute("tableValues",n));},SVGProLevelsFilter.prototype.createFeFunc=function(i,r){return i=createNS(i),i.setAttribute("type","table"),r.appendChild(i),i;},SVGProLevelsFilter.prototype.getTableValue=function(i,r,e,t,n){for(var o,_=0,E=Math.min(i,r),x=Math.max(i,r),h=Array.call(null,{length:256}),y=0,b=n-t,p=r-i;_<=256;)o=(o=_/256)<=E?p<0?n:t:x<=o?p<0?t:n:t+b*Math.pow((o-i)/p,1/e),h[y]=o,y+=1,_+=256/255;return h.join(" ");},SVGProLevelsFilter.prototype.renderFrame=function(i){var r,e;(i||this.filterManager._mdf)&&(e=this.filterManager.effectElements,this.feFuncRComposed&&(i||e[3].p._mdf||e[4].p._mdf||e[5].p._mdf||e[6].p._mdf||e[7].p._mdf)&&(r=this.getTableValue(e[3].p.v,e[4].p.v,e[5].p.v,e[6].p.v,e[7].p.v),this.feFuncRComposed.setAttribute("tableValues",r),this.feFuncGComposed.setAttribute("tableValues",r),this.feFuncBComposed.setAttribute("tableValues",r)),this.feFuncR&&(i||e[10
138].p._mdf||e[11].p._mdf||e[12].p._mdf||e[13].p._mdf||e[14].p._mdf)&&(r=this.getTableValue(e[10].p.v,e[11].p.v,e[12].p.v,e[13].p.v,e[14].p.v),this.feFuncR.setAttribute("tableValues",r)),this.feFuncG&&(i||e[17].p._mdf||e[18].p._mdf||e[19].p._mdf||e[20].p._mdf||e[21].p._mdf)&&(r=this.getTableValue(e[17].p.v,e[18].p.v,e[19].p.v,e[20].p.v,e[21].p.v),this.feFuncG.setAttribute("tableValues",r)),this.feFuncB&&(i||e[24].p._mdf||e[25].p._mdf||e[26].p._mdf||e[27].p._mdf||e[28].p._mdf)&&(r=this.getTableValue(e[24].p.v,e[25].p.v,e[26].p.v,e[27].p.v,e[28].p.v),this.feFuncB.setAttribute("tableValues",r)),this.feFuncA&&(i||e[31].p._mdf||e[32].p._mdf||e[33].p._mdf||e[34].p._mdf||e[35].p._mdf)&&(r=this.getTableValue(e[31].p.v,e[32].p.v,e[33].p.v,e[34].p.v,e[35].p.v),this.feFuncA.setAttribute("tableValues",r)));},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(i){var r,e;(i||this.filterManager._mdf)&&((i||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),(i||this.filterManager.effectElements[0].p._mdf)&&(e=this.filterManager.effectElements[0].p.v,this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))),(i||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),(i||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf)&&(e=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,r=e*Math.cos(i),e=e*Math.sin(i),this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",e)));};var _svgMatteSymbols=[];function SVGMatte3Effect(i,r,e){this.initialized=!1,this.filterManager=r,this.filterElem=i,(this.elem=e).matteElement=createNS("g"),e.matteElement.appendChild(e.layerElement),e.matteElement.appendChild(e.transformedElement),e.baseElement=e.matteElement;}function SVGGaussianBlurEffect(i,r,e,t){i.setAttribute("x","-100%"),i.setAttribute("y","-100%"),i.setAttribute("width","300%"),i.setAttribute("height","300%"),this.filterManager=r,r=createNS("feGaussianBlur"),r.setAttribute("result",t),i.appendChild(r),this.feGaussianBlur=r;}function TransformEffect(){}function SVGTransformEffect(i,r){this.init(r);}function CVTransformEffect(i){this.init(i);}return SVGMatte3Effect.prototype.findSymbol=function(i){for(var r=0,e=_svgMatteSymbols.length;r<e;){if(_svgMatteSymbols[r]===i)return _svgMatteSymbols[r];r+=1;}return null;},SVGMatte3Effect.prototype.replaceInParent=function(i,r){var e=i.layerElement.parentNode;if(e){for(var t,n=e.children,o=0,_=n.length;o<_&&n[o]!==i.layerElement;)o+=1;o<=_-2&&(t=n[o+1]);var E=createNS("use");E.setAttribute("href","#"+r),t?e.insertBefore(E,t):e.appendChild(E);}},SVGMatte3Effect.prototype.setElementAsMask=function(i,r){var e,t,n,o;this.findSymbol(r)||(e=createElementID(),(t=createNS("mask")).setAttribute("id",r.layerId),t.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(r),(o=i.globalData.defs).appendChild(t),(n=createNS("symbol")).setAttribute("id",e),this.replaceInParent(r,e),n.appendChild(r.layerElement),o.appendChild(n),(o=createNS("use")).setAttribute("href","#"+e),t.appendChild(o),r.data.hd=!1,r.show()),i.setMatte(r.layerId);},SVGMatte3Effect.prototype.initialize=function(){for(var i=this.filterManager.effectElements[0].p.v,r=this.elem.comp.elements,e=0,t=r.length;e<t;)r[e]&&r[e].data.ind===i&&this.setElementAsMask(this.elem,r[e]),e+=1;this.initialized=!0;},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize();},SVGGaussianBlurEffect.prototype.renderFrame=function(i){var r;(i||this.filterManager._mdf)&&(i=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,this.feGaussianBlur.setAttribute("stdDeviation",(r==3?0:i)+" "+(r==2?0:i)),r=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate",this.feGaussianBlur.setAttribute("edgeMode",r));},TransformEffect.prototype.init=function(i){this.effectsManager=i,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix(),this.opacity=-1,this._mdf=!1,this._opMdf=!1;},TransformEffect.prototype.renderFrame=function(i){var r,e,t,n,o,_,E;this._opMdf=!1,this._mdf=!1,(i||this.effectsManager._mdf)&&(r=(i=this.effectsManager.effectElements)[0].p.v,e=i[1].p.v,n=i[2].p.v===1,t=i[3].p.v,
138n=n?t:i[4].p.v,o=i[5].p.v,_=i[6].p.v,E=i[7].p.v,this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(.01*n,.01*t,1),this.matrix.rotate(-E*degToRads),this.matrix.skewFromAxis(-o*degToRads,(_+90)*degToRads),this.matrix.translate(e[0],e[1],0),this._mdf=!0,this.opacity!==i[8].p.v&&(this.opacity=i[8].p.v,this._opMdf=!0));},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie;});},function(i,r,e){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){var y,b=typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(!b){if(Array.isArray(x)||(b=function(m,a){if(m){if(typeof m=="string")return o(m,a);var s={}.toString.call(m).slice(8,-1);return(s=s==="Object"&&m.constructor?m.constructor.name:s)==="Map"||s==="Set"?Array.from(m):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(m,a):void 0;}}(x))||h&&x&&typeof x.length=="number")return b&&(x=b),y=0,{s:h=function(){},n:function(){return y>=x.length?{done:!0}:{done:!1,value:x[y++]};},e:function(m){throw m;},f:h};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 139In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var p,c=!0,d=!1;return{s:function(){b=b.call(x);},n:function(){var m=b.next();return c=m.done,m;},e:function(m){d=!0,p=m;},f:function(){try{c||b.return==null||b.return();}finally{if(d)throw p;}}};}function o(x,h){(h==null||h>x.length)&&(h=x.length);for(var y=0,b=Array(h);y<h;y++)b[y]=x[y];return b;}function _(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.CorePreviewerEffectUtils=void 0;var E=function(){function x(){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");}return h=x,b=[{key:"transformEffects",value:function(p,c){if(Array.isArray(p)){var d,m=n(p);try{for(m.s();!(d=m.n()).done;){var a=d.value;a.attributes=Object.assign(a.attributes,c);}}catch(s){m.e(s);}finally{m.f();}}}}],(y=null)&&_(h.prototype,y),b&&_(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.CorePreviewerEffectUtils=E;},function(i,r,O){"use strict";function t(M){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N;}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N;})(M);}function n(){n=function(){return N;};var M,N={},G=Object.prototype,H=G.hasOwnProperty,B=Object.defineProperty||function(he,_e,Re){he[_e]=Re.value;},Y=typeof Symbol=="function"?Symbol:{},z=Y.iterator||"@@iterator",te=Y.asyncIterator||"@@asyncIterator",K=Y.toStringTag||"@@toStringTag";function V(he,_e,Re){return Object.defineProperty(he,_e,{value:Re,enumerable:!0,configurable:!0,writable:!0}),he[_e];}try{V({},"");}catch{V=function(_e,Re,ee){return _e[Re]=ee;};}function U(he,Se,Re,De){var W,ae,de,ye,Se=Se&&Se.prototype instanceof Q?Se:Q,Se=Object.create(Se.prototype),De=new fe(De||[]);return B(Se,"_invoke",{value:(W=he,ae=Re,de=De,ye=re,function(Ue,Be){if(ye===q)throw Error("Generator is already running");if(ye===J){if(Ue==="throw")throw Be;return{value:M,done:!0};}for(de.method=Ue,de.arg=Be;;){var nt=de.delegate;if(nt&&(nt=function it(ot,ht){var Et=ht.method,At=ot.iterator[Et];return At===M?(ht.delegate=null,Et==="throw"&&ot.iterator.return&&
139(ht.method="return",ht.arg=M,it(ot,ht),ht.method==="throw")||Et!=="return"&&(ht.method="throw",ht.arg=new TypeError("The iterator does not provide a '"+Et+"' method")),oe):(Et=Z(At,ot.iterator,ht.arg),Et.type==="throw"?(ht.method="throw",ht.arg=Et.arg,ht.delegate=null,oe):(At=Et.arg,At?At.done?(ht[ot.resultName]=At.value,ht.next=ot.nextLoc,ht.method!=="return"&&(ht.method="next",ht.arg=M),ht.delegate=null,oe):At:(ht.method="throw",ht.arg=new TypeError("iterator result is not an object"),ht.delegate=null,oe)));}(nt,de),nt)){if(nt===oe)continue;return nt;}if(de.method==="next")de.sent=de._sent=de.arg;else if(de.method==="throw"){if(ye===re)throw ye=J,de.arg;de.dispatchException(de.arg);}else de.method==="return"&&de.abrupt("return",de.arg);if(ye=q,nt=Z(W,ae,de),nt.type==="normal"){if(ye=de.done?J:ue,nt.arg===oe)continue;return{value:nt.arg,done:de.done};}nt.type==="throw"&&(ye=J,de.method="throw",de.arg=nt.arg);}})}),Se;}function Z(he,_e,Re){try{return{type:"normal",arg:he.call(_e,Re)};}catch(ee){return{type:"throw",arg:ee};}}N.wrap=U;var re="suspendedStart",ue="suspendedYield",q="executing",J="completed",oe={};function Q(){}function F(){}function X(){}var Y={},j=(V(Y,z,function(){return this;}),Object.getPrototypeOf),j=j&&j(j(ge([]))),D=(j&&j!==G&&H.call(j,z)&&(Y=j),X.prototype=Q.prototype=Object.create(Y));function $(he){["next","throw","return"].forEach(function(_e){V(he,_e,function(Re){return this._invoke(_e,Re);});});}function ne(he,_e){var Re;B(this,"_invoke",{value:function(ee,W){function ae(){return new _e(function(de,ye){(function Se(ot,Ue,Be,nt){var it,ot=Z(he[ot],he,Ue);if(ot.type!=="throw")return(Ue=(it=ot.arg).value)&&t(Ue)=="object"&&H.call(Ue,"__await")?_e.resolve(Ue.__await).then(function(ht){Se("next",ht,Be,nt);},function(ht){Se("throw",ht,Be,nt);}):_e.resolve(Ue).then(function(ht){it.value=ht,Be(it);},function(ht){return Se("throw",ht,Be,nt);});nt(ot.arg);})(ee,W,de,ye);});}return Re=Re?Re.then(ae,ae):ae();}});}function le(he){var _e={tryLoc:he[0]};1 in he&&(_e.catchLoc=he[1]),2 in he&&(_e.finallyLoc=he[2],_e.afterLoc=he[3]),this.tryEntries.push(_e);}function se(he){var _e=he.completion||{};_e.type="normal",delete _e.arg,he.completion=_e;}function fe(he){this.tryEntries=[{tryLoc:"root"}],he.forEach(le,this),this.reset(!0);}function ge(he){if(he||he===""){var _e,Re=he[z];if(Re)return Re.call(he);if(typeof he.next=="function")return he;if(!isNaN(he.length))return _e=-1,(Re=function ee(){for(;++_e<he.length;)if(H.call(he,_e))return ee.value=he[_e],ee.done=!1,ee;return ee.value=M,ee.done=!0,ee;}).next=Re;}throw new TypeError(t(he)+" is not iterable");}return B(D,"constructor",{value:F.prototype=X,configurable:!0}),B(X,"constructor",{value:F,configurable:!0}),F.displayName=V(X,K,"GeneratorFunction"),N.isGeneratorFunction=function(he){return he=typeof he=="function"&&he.constructor,!!he&&(he===F||(he.displayName||he.name)==="GeneratorFunction");},N.mark=function(he){return Object.setPrototypeOf?Object.setPrototypeOf(he,X):(he.__proto__=X,V(he,K,"GeneratorFunction")),he.prototype=Object.create(D),he;},N.awrap=function(he){return{__await:he};},$(ne.prototype),V(ne.prototype,te,function(){return this;}),N.AsyncIterator=ne,N.async=function(he,_e,Re,ee,W){W===void 0&&(W=Promise);var ae=new ne(U(he,_e,Re,ee),W);return N.isGeneratorFunction(_e)?ae:ae.next().then(function(de){return de.done?de.value:ae.next();});},$(D),V(D,K,"Generator"),V(D,z,function(){return this;}),V(D,"toString",function(){return"[object Generator]";}),N.keys=function(he){var _e,Re=Object(he),ee=[];for(_e in Re)ee.push(_e);return ee.reverse(),function W(){for(;ee.length;){var ae=ee.pop();if(ae in Re)return W.value=ae,W.done=!1,W;}return W.done=!0,W;};},N.values=ge,fe.prototype={constructor:fe,reset:function(he){if(this.prev=0,this.next=0,this.sent=this._sent=M,this.done=!1,this.delegate=null,this.method="next",this.arg=M,this.tryEntries.forEach(se),!he)for(var _e in this)_e.charAt(0)==="t"&&H.call(this,_e)&&!isNaN(+_e.slice(1))&&(this[_e]=M);},stop:function(){this.done=!0;var he=this.tryEntries[0].completion;if(he.type==="throw")throw he.arg;return this.rval;},dispatchException:function(he){if(this.done)throw he;var _e=this;function Re(Se,De){return ae.type="throw",ae.arg=he,_e.next=Se,De&&(_e.method="next",_e.arg=M),!!De;}for(var ee=this.tryEntries.length-1;0<=ee;--ee){var W=this.tryEntries[ee],ae=W.completion;if(W.tryLoc==="root")return Re("end");if(W.tryLoc<=this.prev){var de=H.call(W,"catchLoc"),ye=H.call(W,"finallyLoc");if(de&&ye){if(this.prev<W.catchLoc)return Re(W.catchLoc,!0);if(this.prev<W.finallyLoc)return Re(W.finallyLoc);}else if(de){if(this.prev<W.catchLoc)return Re(W.catchLoc,!0);}else{if(!ye)throw Error("try statement without catch or finally");if(this.prev<W.finallyLoc)return Re(W.finallyLoc);}}}},abrupt:function(he,_e){for(var Re=this.tryEntries.length-1;0<=Re;--Re){var ee=this.tryEntries[Re];if(ee.tryLoc<=this.prev&&H.call(ee,"finallyLoc")&&this.prev<ee.finallyLoc){var W=ee;break;}}var ae=(W=W&&(he==="break"||he==="continue")&&W.tryLoc<=_e&&_e<=W.finallyLoc?null:W)?W.completion:{};return ae.type=he,ae.arg=_e,W?(this.method="next",this.next=W.finallyLoc,oe):this.complete(ae);},complete:function(he,_e){if(he.type==="throw")throw he.arg;return he.type==="break"||he.type==="continue"?this.next=he.arg:he.type==="return"?(this.rval=this.arg=he.arg,this.method="return",this.next="end"):he.type==="normal"&&_e&&(this.next=_e),oe;},finish:function(he){for(var _e=this.tryEntries.length-1;0<=_e;--_e){var Re=this.tryEntries[_e];if(Re.finallyLoc===he)return this.complete(Re.completion,Re.afterLoc),se(Re),oe;}},catch:function(he){for(var _e=this.tryEntries.length-1;0<=_e;--_e){var Re,ee,W=this.tryEntries[_e];if(W.tryLoc===he)return(Re=W.completion).type==="throw"&&(ee=Re.arg,se(W)),ee;}throw Error("illegal catch attempt");},delegateYield:function(he,_e,Re){return this.delegate={iterator:ge(he),resultName:_e,nextLoc:Re},this.method==="next"&&(this.arg=M),oe;}},N;}function o(M,N){return function(G){if(Array.isArray(G))return G;}(M)||function(G,H){var B=G==null?null:typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(B!=null){var z,te,K,V,U=[],Z=!0,re=!1;try{if(K=(B=B.call(G)).next,H===0){if(Object(B)!==B)return;Z=!1;}else for(;!(Z=(z=K.call(B)).done)&&(U.push(z.value),U.length!==H);Z=!0);}catch(ue){re=!0,te=ue;}
139finally{try{if(!Z&&B.return!=null&&(V=B.return(),Object(V)!==V))return;}finally{if(re)throw te;}}return U;}}(M,N)||E(M,N)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 140In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(M,N){var G,H=typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(!H){if(Array.isArray(M)||(H=E(M))||N&&M&&typeof M.length=="number")return H&&(M=H),G=0,{s:N=function(){},n:function(){return G>=M.length?{done:!0}:{done:!1,value:M[G++]};},e:function(K){throw K;},f:N};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 141In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var B,z=!0,te=!1;return{s:function(){H=H.call(M);},n:function(){var K=H.next();return z=K.done,K;},e:function(K){te=!0,B=K;},f:function(){try{z||H.return==null||H.return();}finally{if(te)throw B;}}};}function E(M,N){if(M){if(typeof M=="string")return x(M,N);var G={}.toString.call(M).slice(8,-1);return(G=G==="Object"&&M.constructor?M.constructor.name:G)==="Map"||G==="Set"?Array.from(M):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?x(M,N):void 0;}}function x(M,N){(N==null||N>M.length)&&(N=M.length);for(var G=0,H=Array(N);G<N;G++)H[G]=M[G];return H;}function h(M,N){for(var G=0;G<N.length;G++){var H=N[G];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(M,function(B){return B=function(z,te){if(t(z)!="object"||!z)return z;var K=z[Symbol.toPrimitive];if(K===void 0)return(te==="string"?String:Number)(z);if(K=K.call(z,te||"default"),t(K)!="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.");}(B,"string"),t(B)=="symbol"?B:B+"";}(H.key),H);}}function y(M,B,G){B=c(B);var H=M,B=b()?Reflect.construct(B,G||[],c(M).constructor):B.apply(M,G);if(B&&(t(B)=="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(M=H,M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M;}function b(){try{var M=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(b=function(){return!!M;})();}function p(){return(p=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(M,N,G){var H=function(B,z){for(;!{}.hasOwnProperty.call(B,z)&&(B=c(B))!==null;);return B;}(M,N);if(H)return(H=Object.getOwnPropertyDescriptor(H,N)).get?H.get.call(arguments.length<3?M:G):H.value;}).apply(null,arguments);}function c(M){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(N){return N.__proto__||Object.getPrototypeOf(N);})(M);}function d(M,N){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(G,H){return G.__proto__=H,G;})(M,N);}var m=this&&this.__awaiter||function(M,N,G,H){return new(G=G||Promise)(function(B,z){function te(U){try{V(H.next(U));}catch(Z){z(Z);}}function K(U){try{V(H.throw(U));}catch(Z){z(Z);}}function V(U){var Z;U.done?B(U.value):((Z=U.value)instanceof G?Z:new G(function(re){re(Z);})).then(te,K);}V((H=H.apply(M,N||[])).next());});},a=(Object.defineProperty(r,"__esModule",{value:!0}),O(46)),s=O(319),l=O(5),g=O(2),f=O(114),v=O(12),S=O(107),w=O(13),C=O(72),I=O(74),O=function(M){function N(V,z){var te;if(!(this instanceof N))throw new TypeError("Cannot call a class as a function");(te=y(this,N,[V,z])).bufferWaitingCallback=function(Z){var re,ue;Z!==te._guid?l.default.error("[VideoComponent]: bufferWaitingCallback is being called with different guid, ignoring... "):(Z=te.mainTimelineSync)!=null&&Z.timeline&&(Z=te.mainTimelineSync)!=null&&Z.isSyncedToGsapTicker&&(te.mainTimelineSync.isWaitingOnBuffering=!0,Z=te.mainTimelineSync.timeline,Array.isArray((re=te.mainTimelineSync)==null?void 0:re.onBuffering)&&(ue=l.default.round(Z.time(),w.ROUND_PRECISION),te.mainTimelineSync.onBuffering.forEach(function(q){return q(ue);})));},te.bufferPlayingCallback=function(Z){var re,ue;Z!==te._guid?l.default.error("[VideoComponent]: bufferPlayingCallback is being called with different guid, ignoring... "):te.mainTimelineSync&&!te.mainTimelineSync.isWaitingForVideoToShow&&(Z=te.mainTimelineSync.isWaitingOnBuffering,te.mainTimelineSync.isWaitingOnBuffering=!1,Z&&(Z=te.mainTimelineSync)!=null&&Z.timeline&&(Z=te.mainTimelineSync)!=null&&Z.isSyncedToGsapTicker&&(Z=te.mainTimelineSync.timeline,Array.isArray((re=te.mainTimelineSync)==null?void 0:re.onVDMReady)&&(ue=l.default.round(Z.time(),w.ROUND_PRECISION),te.mainTimelineSync.onVDMReady.forEach(function(q){return q(ue);}))));},te.tickerHandler=function(Z,re,ue){var q,J,oe,Q,F,X=(X=te.mainTimelineSync)==null?void 0:X.timeline;(q=te.mainTimelineSync)!=null&&q.isSyncedToGsapTicker?te.player===void 0||te.player===null?(l.default.warn("[VideoComponent] GSAP ticker triggers sync video component with no video player"),te.stopTickerHandler()):(q=X.time(),X=te.startTime(),F=te.endTime(),J=l.default.round(q,w.ROUND_PRECISION),oe=te.player.currentTime(),J<X||F<=J?(l.default.warn("[VideoComponent] GSAP ticker triggers non-playing video component (out of time bounds), removing from the ticker."),te.stopTickerHandler()):te.mainTimelineSync.timeline.paused()&&te.state===f.VideoComponentState.PLAYING&&(!te.mainTimelineSync.isWaitingOnBuffering||v.MediaPlayerCache.isSafari&&!te.mainTimelineSync.isWaitingForVideoToShow)?te.player.paused()===!1&&te.pausePlayer():te.mainTimelineSync.timeline.paused()||te.state!==f.VideoComponentState.PLAYING||te.player.paused()!==!0?(te.state!==f.VideoComponentState.PLAYING&&te.state!==f.VideoComponentState.PAUSED&&te.mainTimelineSync.timeline.paused()&&te.player.paused()===!0&&l.default.error("[VideoComponent] tickerHandler entered a paused zone while not playing or paused"),te.state===f.VideoComponentState.PLAYING&&te.player.paused()===!1&&(F=function(Y){return l.default.round(Y,w.ROUND_PRECISION);},Math.abs(F(J-te.lastDrawingTime.fg))>=F(1/w.DRAW_VIDEO_FG_FPS)&&(te.drawVideoOnCanvas(te.videoElement,te.foregroundCanvasContext,f.CanvasLayer.FG),te.lastDrawingTime.fg=J,te.showTimeco
141de&&te.updatePlayerFrameTimes(J)),te.backgroundCanvasContext&&Math.abs(F(J-te.lastDrawingTime.bg))>=F(1/w.DRAW_VIDEO_BG_FPS)&&(te.drawVideoOnCanvas(te.videoElement,te.backgroundCanvasContext,f.CanvasLayer.BG),te.lastDrawingTime.bg=J)),te.state===f.VideoComponentState.PLAYING&&te.player.paused()===!1&&te.player.readyState()>=HTMLMediaElement.HAVE_FUTURE_DATA&&(te.playerObject.seeking||(F=J>te.lastSyncTime&&Math.abs(J-te.lastSyncTime-te.syncIntervalSec)<=.005,Q=Math.abs(J-X-(oe-te.playerStartTime))>te.syncThresholdSec,!F&&Q&&(l.default.debug("[".concat(te.constructor.name,"] tickerHandler: Timeline time BEFORE sync. video player=").concat(oe," timeline=").concat(q)),F=J-X+te.playerStartTime+te.syncThresholdSec+1/w.GSAP_FPS,te.player.currentTime(F),l.default.debug("[".concat(te.constructor.name,"] tickerHandler: Timeline time AFTER sync. video player=").concat(oe," timeline=").concat(q)),te.lastSyncTime=J)))):te.player.play()):(l.default.error("[VideoComponent] GSAP ticker triggers none sync video component, removing from the ticker."),te.stopTickerHandler());},te._lastDrawnThumbnailTime=-1,te.imageSmoothingEnabled=z.imageSmoothingEnabled,te.showTimecode=z.showTimecode,te.bufferWaitingCallback.guid=te._guid,te.bufferPlayingCallback.guid=te._guid,te.player=void 0,te.playerObject=void 0,te.attributes=new s.VideoComponentAttributesBuilder(V.attributes,te.scale).build(),te._timeBasedComponent=new a.default(te,z,te.attributes),te.syncThresholdSec=z.sync.video.thresholdMS/1e3,te.syncIntervalSec=z.sync.video.sampleRateMS/1e3;var K,V=l.default.round(te._timeBasedComponent.endTime-te._timeBasedComponent.startTime,w.ROUND_PRECISION),U=(te.playerStartTime=l.default.round(te._seek,w.ROUND_PRECISION),te.playerEndTime=l.default.round(te.playerStartTime+V,w.ROUND_PRECISION),te.mainTimelineSync=void 0,te.lastSyncTime=te.startTime(),te.lastDrawingTime={bg:0,fg:0},_(te._timeBasedComponent.behavioralEffects));try{for(U.s();!(K=U.n()).done;)K.value.apply(te);}catch(Z){U.e(Z);}finally{U.f();}return te;}var G,H=N;if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");return H.prototype=Object.create(M&&M.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),M&&d(H,M),H=N,(M=[{key:"playVideo",value:function(){var B,z,te,K,V,U,Z=this,re=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0;l.default.useDebug&&(te=this.startTime(),B=this.endTime(),z=(z=this.mainTimelineSync)==null?void 0:z.timeline,l.default.debug("[".concat(this.constructor.name,"] playVideo :::: VidComp: start time : ").concat(te,", slide end time: ").concat(B,", seek: ").concat(re)),l.default.debug("[".concat(this.constructor.name,"] Timeline Against Video Player : Timeline ").concat(z.time()," Video Player : ").concat(this.player.currentTime())),(te=this.player)!=null&&te.tech_.hls&&l.default.debug("[".concat(this.constructor.name,"] Current resolution: ").concat(JSON.stringify(this.player.tech_.hls.playlists.media().attributes.RESOLUTION)))),this.state=f.VideoComponentState.PLAYING,Math.abs(l.default.round(re-this.player.currentTime(),w.ROUND_PRECISION))>this.syncThresholdSec&&(l.default.debug("[".concat(this.constructor.name,"] Starting playing video at time seek: ").concat(re)),this.player.currentTime(re),l.default.debug("[".concat(this.constructor.name,"] Video buffered percent ").concat(100*this.player.bufferedPercent(),"% and currentTime: ").concat(this.player.currentTime()))),!this.player.paused()||(B=this.mainTimelineSync)!=null&&B.isWaitingOnBuffering||(z=Math.abs(re-this._lastDrawnThumbnailTime)<this.syncThresholdSec,(te=this.mainTimelineSync)!=null&&te.timeline&&(B=this.mainTimelineSync)!=null&&B.isSyncedToGsapTicker&&!z&&(v.MediaPlayerCache.isSafari&&l.default.isLocalUrl(this.mediaURL)&&(this.mainTimelineSync.isWaitingOnBuffering=!0,this.mainTimelineSync.isWaitingForVideoToShow=!0,te=this.mainTimelineSync.timeline,Array.isArray((B=this.mainTimelineSync)==null?void 0:B.onBuffering)&&(K=l.default.round(te.time(),w.ROUND_PRECISION),this.mainTimelineSync.onBuffering.forEach(function(ue){return ue(K);})),V=function(){Z.player.currentTime()>=re+Z.syncThresholdSec/2&&(Z.player.off("timeupdate",V),Z.mainTimelineSync.isWaitingForVideoToShow=!1,clearTimeout(U),Z.bufferPlayingCallback(Z._guid));},U=setTimeout(function(){Z.player.off("timeupdate",V),Z.mainTimelineSync.isWaitingForVideoToShow=!1,Z.bufferPlayingCallback(Z._guid);},2e3),this.player.on("timeupdate",V)),this.player.currentTime(re)),this.player.play());}},{key:"preloadVideo",value:function(){var B;l.default.debug("[".concat(this.constructor.name,"] preloadVideo :::: VidComp: start time : ").concat(this.startTime(),", slide end time: ").concat(this.endTime(),", seek: ").concat(this.playerStartTime)),this.player&&this.player.paused()&&this.shouldPreload&&(l.default.useDebug&&(B=(B=this.mainTimelineSync)==null?void 0:B.timeline,l.default.debug("[".concat(this.constructor.name,"] preloadVideo Pre seek video at time: ").concat(B?.time(),", seek: ").concat(this.playerStartTime))),Math.abs(l.default.round(this.player.currentTime()-this.playerStartTime,w.ROUND_PRECISION))>this.syncThresholdSec&&(l.default.debug("[".concat(this.constructor.name,"] preloadVideo seeking...currentTime:").concat(this.player.currentTime(),", time:").concat(this.playerStartTime)),this.player.currentTime(this.playerStartTime)),this.state!==f.VideoComponentState.PAUSED&&this.state!==f.VideoComponentState.READY&&l.default.error("[VideoComponent]: preloadVideo called when state: ".concat(this.state)),this.state=f.VideoComponentState.PAUSED,this.drawThumbnail());}},{key:"handleSpatialInfo",value:function(){var B,z=this;this.player&&(B=function(){z.videoWidth=z.player.videoWidth(),z.videoHeight=z.player.videoHeight(),z.drawingStats=z.fitMediaOnCanvas(z.videoCanvas,z.videoWidth||0,z.videoHeight||0);},this.player.one&&this.player.readyState()<=HTMLMediaElement.HAVE_NOTHING?this.player.one("loadedmetadata",function(){B(),l.default.debug("[".concat(z.constructor.name,"] Spatial Info Computed (from event): W:").concat(z.videoWidth,", H:").concat(z.videoHeight));}):(B(),l.default.debug("[".concat(this.constructor.name,"] Spatial Info Computed: W:").concat(this.videoWidth,", H:").concat(this.videoHeight))));}},{key:"renderTimeline",value:function(B){var z=this,te=this.videoCanvas.getContext("2d"),K=this.backgroundCanvasContext;if(te&&(te.imageSmoothingEnabled=this.imageSmoothingEnabled),K&&(K.imageSmoothingEnabled=this.imageSmoothingEnabled),this.drawingStats||(this.drawingStats=this.fitMediaOnCanvas(this.videoCanvas,this.videoWidth||0,this.videoHeight||0)),this.state!==f.VideoComponentState.ERROR){var V,te=S.LoadingScheduler.getInstance(),K="[".concat(this._urlId,"][").concat(this.mediaURL,"]"),te=te.getMediaTimeline(K),U=(te&&te.contains(this.playerEndTime)?this.pauseOnEnd=!1:this.pauseOnEnd=!0,te&&(te.isUsedAsMasterTimelineForAudio||te.within(this.playerStartTime))?this.shouldPreload=!1:this.shouldPreload=!0,this.startTime()),Z=this.endTime(),re=g.gsap.timeline({onUpdate:function(){var oe,Q;z.player&&z.mainTimelineSync!==void 0&&(oe=l.default.round(re.time(),w.ROUND_PRECISION),U<=oe&&oe<Z&&(z.mainTimelineSync.isSyncedToGsapTicker===!1&&z.startTickerHandler(),z.state!==f.VideoComponentState.ERROR&&z.state!==f.VideoComponentState.PLAYING&&(Q=oe-U+z.playerStartTime,z.playVideo(Q))),oe<U&&(Q=l.default.round(Math.max(U-w.VIDEO_MAX_PRELOAD_TIME,0),w.ROUND_PRECISION),z.shouldPreload&&Math.abs(oe-Q)<=z.syncThresholdSec&&z.state!==f.VideoComponentState.ERROR&&z.state!==f.VideoComponentState.PLAYING&&z.player.paused()===!0&&z.player.currentTime()!==z.playerStartTime&&z.preloadVideo()),Z<=oe&&z.pauseOnEnd&&z.state===f.VideoComponentState.PLAYING&&z.player.paused()===!1&&(l.default.debug("[".concat(z.constructor.name,"] Pausing video as it playing beyond its time slot, ts: ").concat(oe)),z.pause()));}}),ue=(re.set(this.element,{visibility:"visible"},U).set(this.element,{visibility:"inherit"},Z),_(this.animationEffects));try{for(ue.s();!(V=ue.n()).done;)V.value.apply(this.element,re,U);}catch(oe){ue.e(oe);}finally{ue.f();}B.add(re,0);}}},{key:"drawer",value:function(B,z,te,K,V,U,Z,re,ue,q){this.state===f.VideoComponentState.PLAYING&&(this._lastDrawnThumbnailTime=l.default.round(this.player.currentTime(),w.ROUND_PRECISION)),z.drawImage(B,te,K,V,U,Z,re,ue,q),this.showTimeco
141de&&this.mainTimelineSync&&(z.font="24px Arial",B=this.updatePlayerFrameTimes()!==void 0?"".concat(this.updatePlayerFrameTimes(),"fps"):"",te="".concat(l.default.formatTimeHHMMSS(this.mainTimelineSync.timeline.time())," ").concat(B," ").concat(this.playerObject.seeking?"Seeking...":""),K=z.measureText("".concat(te)).width,z.clearRect(0,0,2*K,25),z.fillStyle="rgba(0, 0, 0, 0.65)",z.fillRect(0,0,K,25),z.fillStyle="white",z.fillText(te,0,20));}},{key:"drawVideoOnCanvas",value:function(B,z,te){var J=o(this.drawingStats,8),K=J[0],V=J[1],U=J[2],Z=J[3],re=J[4],ue=J[5],q=J[6],J=J[7];te!==f.CanvasLayer.FG&&(ue=re=0,q=this.backgroundCanvasElement.width,J=this.backgroundCanvasElement.height),this.state!==f.VideoComponentState.PLAYING&&this.state!==f.VideoComponentState.PAUSED||(this._backgroundRemovalEffect?te===f.CanvasLayer.FG&&(te=this._backgroundRemovalEffect)!=null&&te.isReady()&&(this._backgroundRemovalEffect.drawWithMask(B),(te=C.MediaPipeSegmenterProvider.getInstance().consumeCommittedPersonBbox(this._canvasUniqueId))&&this.options.containerId&&I.VDMPreviewerEvents.getInstance(this.options.containerId).dispatchEvent(new CustomEvent(I.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS.PERSON_BOUNDING_BOX_DETECTED,{detail:{personBoundingBox:te,slideIndex:this._slideIndex,mediaId:this._mediaId}}))):this.drawer(B,z,K,V,U,Z,re,ue,q,J));}},{key:"drawThumbnail",value:function(){return m(this,void 0,void 0,n().mark(function B(){var z,te,K,V,U,Z=this;return n().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(this.loadingThumbnailUrl){re.next=2;break;}return re.abrupt("return");case 2:return z=function(ue,q,J){var $=o(Z.fitMediaOnCanvas(Z.videoCanvas,ue.width||0,ue.height||0),8),oe=$[0],Q=$[1],F=$[2],X=$[3],Y=$[4],j=$[5],D=$[6],$=$[7];J!==f.CanvasLayer.FG&&(j=Y=0,D=Z.backgroundCanvasElement.width,$=Z.backgroundCanvasElement.height),Z.drawer(ue,q,oe,Q,F,X,Y,j,D,$);},te=this.loadingThumbnailUrl,K=new Image(),re.next=7,new Promise(function(ue,q){l.default.debug("loading thumbnail: ".concat(te)),K.onload=function(){l.default.debug("thumbnail: ".concat(K.src," loaded")),ue();},K.onerror=function(){l.default.warn("[".concat(Z.constructor.name,"] Could not load thumbnail: ").concat(te)),q();},K.src=te;});case 7:V=this.videoCanvas,V=V.getContext("2d"),U=this.backgroundCanvasContext,z(K,V,f.CanvasLayer.FG),U&&z(K,U,f.CanvasLayer.BG);case 12:case"end":return re.stop();}},B,this);}));}},{key:"displayPreview",value:function(){return m(this,void 0,void 0,n().mark(function B(){return n().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(!this.player){z.next=6;break;}if(this.player.paused()){z.next=4;break;}return z.next=4,this.pause(this.startTime());case 4:return z.next=6,this.drawThumbnail();case 6:case"end":return z.stop();}},B,this);}));}},{key:"updatePlayerFrameTimes",value:function(B){var z;return B!==void 0&&(B<this.playerObject.frameTimes.slice(-1)[0]?this.playerObject.frameTimes=[B]:this.playerObject.frameTimes.push(B),z=B-1,this.playerObject.frameTimes=this.playerObject.frameTimes.filter(function(te){return z<te;})),1<this.playerObject.frameTimes.length?+this.playerObject.frameTimes.length:void 0;}},{key:"startTickerHandler",value:function(){l.default.debug("[".concat(this.constructor.name,"] startTickerHandler: Starting the syncing event, src : ").concat(this.mediaURL)),this.mainTimelineSync===void 0?l.default.error("[VideoComponent] Cannot start sync with main timeline because timeline is not available."):this.mainTimelineSync.isSyncedToGsapTicker?l.default.warn("[VideoComponent] Trying to start main timeline sync that is already running."):(this.mainTimelineSync.isSyncedToGsapTicker=!0,this.enableBufferingHandlers(),g.gsap.ticker.add(this.tickerHandler));}},{key:"stopTickerHandler",value:function(){l.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Canceling the syncing event, src : ").concat(this.mediaURL)),this.mainTimelineSync&&(this.disableBufferingHandlers(),this.mainTimelineSync.isSyncedToGsapTicker=!1),g.gsap.ticker.remove(this.tickerHandler),l.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Hop hop"));}},{key:"enableBufferingHandlers",value:function(){var B;(B=this.mainTimelineSync)!=null&&B.isSyncedToGsapTicker?this.player&&this.playerObject&&(this.playerObject.waitingCallback=this.bufferWaitingCallback,this.playerObject.playingCallback=this.bufferPlayingCallback,this.playerObject.isControlledByVideoComponent=!0):l.default.error("[VideoComponent] GSAP ticker triggers none sync video component, remov
141ing from the ticker.");}},{key:"disableBufferingHandlers",value:function(){var B;this.playerObject&&this.bufferPlayingCallback.guid===((B=this.playerObject.playingCallback)==null?void 0:B.guid)&&(this.playerObject.waitingCallback=void 0,this.playerObject.playingCallback=void 0,this.playerObject.isControlledByVideoComponent=!1);}},{key:"sync",value:function(B,z,te){this.mainTimelineSync={timeline:B,onBuffering:z,onVDMReady:te,isSyncedToGsapTicker:!1,isWaitingOnBuffering:!1,isWaitingForVideoToShow:!1};}},{key:"pause",value:function(){var B,z,te=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,K=1<arguments.length?arguments[1]:void 0;return m(this,void 0,void 0,n().mark(function V(){var U,Z;return n().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(this.state=f.VideoComponentState.PAUSED,!this.player){re.next=18;break;}if(!this.player.paused()&&(B=this.mainTimelineSync)!=null&&B.isSyncedToGsapTicker)return l.default.debug("Player paused !"),this.stopTickerHandler(),re.next=7,this.pausePlayer();re.next=7;break;case 7:if(!(te!==void 0&&0<=te)){re.next=16;break;}if(!(te>=this.startTime()&&te<this.endTime())){re.next=16;break;}if(l.default.debug("Pausing at time ".concat(te,", this.startTime(): ").concat(this.startTime(),", this.endTime(): ").concat(this.endTime()," timelineTime: ").concat((z=(B=this.mainTimelineSync)==null?void 0:B.timeline)==null?void 0:z.time()," playerTime: ").concat(this.player.currentTime()," lastDrawnThumbnailTime: ").concat(this._lastDrawnThumbnailTime)),U=l.default.round(this._seek+(te-this.startTime()),w.ROUND_PRECISION),l.default.debug("Updating video position to ".concat(U)),Z=Math.abs(U-this._lastDrawnThumbnailTime)<this.syncThresholdSec,K||Z){re.next=16;break;}return re.next=16,this.setVideoTime(U);case 16:re.next=19;break;case 18:l.default.debug("No player found !");case 19:case"end":return re.stop();}},V,this);}));}},{key:"pausePlayer",value:function(){return m(this,void 0,void 0,n().mark(function B(){return n().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return v.MediaPlayerCache.isSafari&&this.player.muted(!0),z.next=3,this.player.pause();case 3:case"end":return z.stop();}},B,this);}));}},{key:"refreshViewOnCanvas",value:function(){!this.player||this.player.isDisposed()||this.player&&!this.player.paused()||(this.drawVideoOnCanvas(this.videoElement,this.foregroundCanvasContext,f.CanvasLayer.FG),this.drawVideoOnCanvas(this.videoElement,this.backgroundCanvasContext,f.CanvasLayer.BG));}},{key:"setVideoTime",value:function(B){var z=this;return this._backgroundRemovalEffect&&this._backgroundRemovalEffect.resetCache(),new Promise(function(te){var K,V,U,Z;z.player?(K=function(){l.default.debug("[".concat(z.constructor.name,"] Video component seeking!"));},V=function(){l.default.debug("[".concat(z.constructor.name,"] Video component seeked!")),l.default.debug("[".concat(z.constructor.name,"] video time updated to: ").concat(z.player.currentTime())),l.default.debug("[".concat(z.constructor.name,"] this.player state: ").concat(z.player.readyState())),l.default.debug("[".concat(z.constructor.name,"] buffered percent: ").concat(100*z.player.bufferedPercent())),U();},U=function(){z.player.off("seeked",V),z.player.off("seeking",K),z.refreshViewOnCanvas(),z.mainTimelineSync&&(z.lastSyncTime=l.default.round(z.mainTimelineSync.timeline.time(),w.ROUND_PRECISION)),te();},l.default.round(B,w.ROUND_PRECISION)===l.default.round(z.player.currentTime(),w.ROUND_PRECISION)?U():(z.player.one("seeking",K),z.player.one("seeked",V),z.player.one("canplay",function(){l.default.debug("[".concat(z.constructor.name,"] Video component can play!")),v.MediaPlayerCache.isSafari&&!v.MediaPlayerCache.isUserEngaged&&setTimeout(function(){z.refreshViewOnCanvas();},100);}),!v.MediaPlayerCache.isSafari||v.MediaPlayerCache.isUserEngaged||B<=1?z.player.currentTime(B):(Z=l.default.isRangeInTimeRanges(B,B,z.player.buffered()),l.default.debug("[".concat(z.constructor.name,"] timestampInBuffer=").concat(Z)),Z?z.player.currentTime(B):(z.videoElement.src=z.mediaURL,z.videoElement.currentTime=B)))):te();});}},{key:"clear",value:function(){var B,z,te,K,V;B=N,z="clear",te=this,V=p(c(1&(K=3)?B.prototype:B),z,te),(2&K?function(U){return V.apply(te,U);}:V)([]),this.player&&(this.disableBufferingHandlers(),this.playerObject&&(this.playerObject.isControlledByVideoComponent=!1),this.player=void 0,this.playerObject=void 0);}},{key:"backgroundCanvasElement",get:function(){return this._backgroundCanvasElement||(this._backgroundCanvasElement=this.element.getElementsByClassName("canvas-blur")[0]),this._backgroundCanvasElement;}},{key:"foregroundCanvasContext",get:function(){return this._foregroundCanvasContext||(this._foregroundCanvasContext=this.videoCanvas.getContext("2d")),this._foregroundCanvasContext;}},{key:"backgroundCanvasContext",get:function(){var B,z;return this._backgroundCanvasContext||((B=this.backgroundCanvasElement)&&B instanceof HTMLCanvasElement&&(z=B.getContext("2d")),this._backgroundCanvasContext=z),this._backgroundCanvasContext;}},{key:"endTime",value:function(){return l.default.round(this._timeBasedComponent.endTime,w.ROUND_PRECISION);}},{key:"startTime",value:function(){return l.default.round(this._timeBasedComponent.startTime,w.ROUND_PRECISION);}},{key:"getAllEffects",value:function(){return this._timeBasedComponent.getAllEffects();}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}}])&&h(H.prototype,M),G&&h(H,G),Object.defineProperty(H,"prototype",{writable:!1}),H;}(f.default);r.default=O;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(){n=function(){return f;};var g,f={},v=Object.prototype,S=v.hasOwnProperty,w=Object.defineProperty||function(j,D,$){j[D]=$.value;},re=typeof Symbol=="function"?Symbol:{},C=re.iterator||"@@iterator",I=re.asyncIterator||"@@asyncIterator",O=re.toStringTag||"@@toStringTag";function M(j,D,$){return Object.defineProperty(j,D,{value:$,enumerable:!0,configurable:!0,writable:!0}),j[D];}try{M({},"");}catch{M=function(D,$,ne){return D[$]=ne;};}function N(j,he,$,_e){var le,se,fe,ge,he=he&&he.prototype instanceof V?he:V,he=Object.create(he.prototype),_e=new X(_e||[]);return w(he,"_invoke",{value:(le=j,se=$,fe=_e,ge=H,function(Re,ee){if(ge===z)throw Error("Generator is already running");if(ge===te){if(Re==="throw")throw ee;return{value:g,done:!0};}for(fe.method=Re,fe.arg=ee;;){var W=fe.delegate;if(W&&(W=function ae(de,ye){var Se=ye.method,De=de.iterator[Se];return De===g?(ye.delegate=null,Se==="throw"&&de.iterator.return&&
141(ye.method="return",ye.arg=g,ae(de,ye),ye.method==="throw")||Se!=="return"&&(ye.method="throw",ye.arg=new TypeError("The iterator does not provide a '"+Se+"' method")),K):(Se=G(De,de.iterator,ye.arg),Se.type==="throw"?(ye.method="throw",ye.arg=Se.arg,ye.delegate=null,K):(De=Se.arg,De?De.done?(ye[de.resultName]=De.value,ye.next=de.nextLoc,ye.method!=="return"&&(ye.method="next",ye.arg=g),ye.delegate=null,K):De:(ye.method="throw",ye.arg=new TypeError("iterator result is not an object"),ye.delegate=null,K)));}(W,fe),W)){if(W===K)continue;return W;}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(ge===H)throw ge=te,fe.arg;fe.dispatchException(fe.arg);}else fe.method==="return"&&fe.abrupt("return",fe.arg);if(ge=z,W=G(le,se,fe),W.type==="normal"){if(ge=fe.done?te:B,W.arg===K)continue;return{value:W.arg,done:fe.done};}W.type==="throw"&&(ge=te,fe.method="throw",fe.arg=W.arg);}})}),he;}function G(j,D,$){try{return{type:"normal",arg:j.call(D,$)};}catch(ne){return{type:"throw",arg:ne};}}f.wrap=N;var H="suspendedStart",B="suspendedYield",z="executing",te="completed",K={};function V(){}function U(){}function Z(){}var re={},ue=(M(re,C,function(){return this;}),Object.getPrototypeOf),ue=ue&&ue(ue(Y([]))),q=(ue&&ue!==v&&S.call(ue,C)&&(re=ue),Z.prototype=V.prototype=Object.create(re));function J(j){["next","throw","return"].forEach(function(D){M(j,D,function($){return this._invoke(D,$);});});}function oe(j,D){var $;w(this,"_invoke",{value:function(ne,le){function se(){return new D(function(fe,ge){(function he(de,Re,ee,W){var ae,de=G(j[de],j,Re);if(de.type!=="throw")return(Re=(ae=de.arg).value)&&t(Re)=="object"&&S.call(Re,"__await")?D.resolve(Re.__await).then(function(ye){he("next",ye,ee,W);},function(ye){he("throw",ye,ee,W);}):D.resolve(Re).then(function(ye){ae.value=ye,ee(ae);},function(ye){return he("throw",ye,ee,W);});W(de.arg);})(ne,le,fe,ge);});}return $=$?$.then(se,se):se();}});}function Q(j){var D={tryLoc:j[0]};1 in j&&(D.catchLoc=j[1]),2 in j&&(D.finallyLoc=j[2],D.afterLoc=j[3]),this.tryEntries.push(D);}function F(j){var D=j.completion||{};D.type="normal",delete D.arg,j.completion=D;}function X(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0);}function Y(j){if(j||j===""){var D,$=j[C];if($)return $.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length))return D=-1,($=function ne(){for(;++D<j.length;)if(S.call(j,D))return ne.value=j[D],ne.done=!1,ne;return ne.value=g,ne.done=!0,ne;}).next=$;}throw new TypeError(t(j)+" is not iterable");}return w(q,"constructor",{value:U.prototype=Z,configurable:!0}),w(Z,"constructor",{value:U,configurable:!0}),U.displayName=M(Z,O,"GeneratorFunction"),f.isGeneratorFunction=function(j){return j=typeof j=="function"&&j.constructor,!!j&&(j===U||(j.displayName||j.name)==="GeneratorFunction");},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,Z):(j.__proto__=Z,M(j,O,"GeneratorFunction")),j.prototype=Object.create(q),j;},f.awrap=function(j){return{__await:j};},J(oe.prototype),M(oe.prototype,I,function(){return this;}),f.AsyncIterator=oe,f.async=function(j,D,$,ne,le){le===void 0&&(le=Promise);var se=new oe(N(j,D,$,ne),le);return f.isGeneratorFunction(D)?se:se.next().then(function(fe){return fe.done?fe.value:se.next();});},J(q),M(q,O,"Generator"),M(q,C,function(){return this;}),M(q,"toString",function(){return"[object Generator]";}),f.keys=function(j){var D,$=Object(j),ne=[];for(D in $)ne.push(D);return ne.reverse(),function le(){for(;ne.length;){var se=ne.pop();if(se in $)return le.value=se,le.done=!1,le;}return le.done=!0,le;};},f.values=Y,X.prototype={constructor:X,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(F),!j)for(var D in this)D.charAt(0)==="t"&&S.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=g);},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval;},dispatchException:function(j){if(this.done)throw j;var D=this;function $(he,_e){return se.type="throw",se.arg=j,D.next=he,_e&&(D.method="next",D.arg=g),!!_e;}for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne],se=le.completion;if(le.tryLoc==="root")return $("end");if(le.tryLoc<=this.prev){var fe=S.call(le,"catchLoc"),ge=S.call(le,"finallyLoc");if(fe&&ge){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);if(this.prev<le.finallyLoc)return $(le.finallyLoc);}else if(fe){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);}else{if(!ge)throw Error("try statement without catch or finally");if(this.prev<le.finallyLoc)return $(le.finallyLoc);}}}},abrupt:function(j,D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];
141if(ne.tryLoc<=this.prev&&S.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var le=ne;break;}}var se=(le=le&&(j==="break"||j==="continue")&&le.tryLoc<=D&&D<=le.finallyLoc?null:le)?le.completion:{};return se.type=j,se.arg=D,le?(this.method="next",this.next=le.finallyLoc,K):this.complete(se);},complete:function(j,D){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&D&&(this.next=D),K;},finish:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.finallyLoc===j)return this.complete($.completion,$.afterLoc),F($),K;}},catch:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $,ne,le=this.tryEntries[D];if(le.tryLoc===j)return($=le.completion).type==="throw"&&(ne=$.arg,F(le)),ne;}throw Error("illegal catch attempt");},delegateYield:function(j,D,$){return this.delegate={iterator:Y(j),resultName:D,nextLoc:$},this.method==="next"&&(this.arg=g),K;}},f;}function o(g,f){var v,S=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!S){if(Array.isArray(g)||(S=x(g))||f&&g&&typeof g.length=="number")return S&&(g=S),v=0,{s:f=function(){},n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]};},e:function(O){throw O;},f};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 142In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var w,C=!0,I=!1;return{s:function(){S=S.call(g);},n:function(){var O=S.next();return C=O.done,O;},e:function(O){I=!0,w=O;},f:function(){try{C||S.return==null||S.return();}finally{if(I)throw w;}}};}function _(g){return function(f){if(Array.isArray(f))return h(f);}(g)||function(f){if(typeof Symbol<"u"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f);}(g)||x(g)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 143In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function E(g,f){return function(v){if(Array.isArray(v))return v;}(g)||function(v,S){var w=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(w!=null){var C,I,O,M,N=[],G=!0,H=!1;try{if(O=(w=w.call(v)).next,S===0){if(Object(w)!==w)return;G=!1;}else for(;!(G=(C=O.call(w)).done)&&(N.push(C.value),N.length!==S);G=!0);}catch(B){H=!0,I=B;}finally{try{if(!G&&w.return!=null&&(M=w.return(),Object(M)!==M))return;}finally{if(H)throw I;}}return N;}}(g,f)||x(g,f)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 144In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(g,f){if(g){if(typeof g=="string")return h(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?h(g,f):void 0;}}function h(g,f){(f==null||f>g.length)&&(f=g.length);for(var v=0,S=Array(f);v<f;v++)S[v]=g[v];return S;}function y(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}var b=this&&this.__awaiter||function(g,f,v,S){return new(v=v||Promise)(function(w,C){function I(N){try{M(S.next(N));}catch(G){C(G);}}function O(N){try{M(S.throw(N));}catch(G){C(G);}}function M(N){var G;N.done?w(N.value):((G=N.value)instanceof v?G:new v(function(H){H(G);})).then(I,O);}M((S=S.apply(g,f||[])).next());});},p=(Object.defineProperty(r,"__esModule",{value:!0}),l(49)),c=l(5),d=l(19),m=l(24),a=l(70),s=l(73),l=function(){function g(w,C){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");this.scale=C.scale||1,this.attributes=new p.GeneralAttributesBuilder(w.attributes,this.scale).build(),this.shouldTag=!!C.tagElements||!1,this._refLayer=w,this.components=[],this.buildComponents(w,C),this._visualEffects=[],this._animationEffects=[],this.buildEffects(w,this.scale),this.vDOM=this.buildVDOM(),this.binds=w.binds,this.isLegacyLayer=w.isLegacyLayer;}return f=g,(v=[{key:"buildComponents",value:function(w,C){this.components=s.default.createComponents(w.components,C);}},{key:"isViewRendered",value:function(){return this._element!==void 0;}},{key:"buildEffects",value:function(w,C){var I;w.effects&&(C=(w=E(a.CorePreviewerUtils.generateCoreEffects(w.effects,C),2))[0],w=w[1],(I=this._visualEffects).push.apply(I,_(C)),(I=this._animationEffects).push.apply(I,_(w)));}},{key:"applyBinds",value:function(){return b(this,void 0,void 0,n().mark(function w(){var C,I,O,M,N,G,H,B,z,te,K,V,U,Z=this;return n().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:C=[],I=function(ue,q,J){switch(ue){case"<":return q<J;case"<=":return q<=J;case">":return J<q;case">=":return J<=q;case"==":return q==J;case"!=":return q!=J;case"===":return q===J;case"!==":return q!==J;case"&&":return q&&J;case"||":return q||J;case"??":return q??J;default:return void c.default.error("Bind error: ".concat(ue," is not a valid condition"));}},O=function(ue){var q=typeof ue=="string"?ue.split("."):[];if(q.length===3&&q[1]==="attributes"){var J,oe=q[0],Q=q[2],F=o(Z.components);try{for(F.s();!(J=F.n()).done;){var X,Y=J.value;if(Y.alphabeticalId===oe)return(X=Y.getAttributeValue(Q))!==void 0?X:void c.default.error("Bind error: ".concat(ue," does not exist"));}}catch(fe){F.e(fe);}finally{F.f();}}else if(q.length===3&&q[1]==="style"){var j,D=q[0],$=q[2],ne=o(Z.components);try{for(ne.s();!(j=ne.n()).done;){var le,se=j.value;if(se.alphabeticalId===D)return(le=se.getElement())&&$ in le.style?window.getComputedStyle(le)[$]:void c.default.error("Bind error: ".concat($," style key does not exist in element style"));}}catch(fe){ne.e(fe);}finally{ne.f();}}else if(q.length<=1&&!isNaN(parseFloat(ue)))return c.default.scaleWithFormat(ue,Z.scale);},M=o(this.binds);try{for(M.s();!(N=M.n()).done;)G=N.value,H=O(G.src),G.cond&&G.cond.length===3&&(B=G.cond[0],z=O(G.cond[1]),te=O(G.cond[2]),H=z!==void 0&&te!==void 0&&I(B,parseFloat(z),parseFloat(te))?O(G.src):void 0),H!==void 0&&(G.value=H);}catch(ue){M.e(ue);}finally{M.f();}C.length=0,K=o(this.components);try{for(K.s();!(V=K.n()).done;)U=V.value,C.push(U.applyBinds(this.binds));}catch(ue){K.e(ue);}finally{K.f();}return re.next=10,Promise.all(C);case 10:case"end":return re.stop();}},w,this);}));}},{key:"renderHtml",value:function(w){return b(this,void 0,void 0,n().mark(function C(){var I,O,M,N,G,H,B,z,te,K,V;return n().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:this._element=document.createElement("div"),w.appendChild(this._element),I=[],O=o(this.components);try{for(O.s();!(M=O.n()).done;)(N=M.value).isLegacyComponent=this.isLegacyLayer,I.push(N.renderView(this._element));}catch(Z){O.e(Z);}finally{O.f();}return U.next=7,Promise.all(I);case 7:G=[],H=o(this.binds);try{for(H.s();!(B=H.n()).done;)z=B.value,te=z.src.split("."),K=te[0],G.push(K);}catch(Z){H.e(Z);}finally{H.f();}V=0;case 11:if(V<_(new Set(G)).length)return U.next=14,this.applyBinds();U.next=17;break;case 14:V++,U.next=11;break;
144case 17:this.shouldTag&&(this.components.forEach(function(Z){Z.shouldTag&&Z.tagElementWithTemplateID();}),this.tagElementWithTemplateID()),this.applyStyle(this._element);case 19:case"end":return U.stop();}},C,this);}));}},{key:"applyStyle",value:function(w){function C(F,X){var Y,j,D=X==="width"?"offsetLeft":X==="height"?"offsetTop":null;if(D)return Y=F.map(function($){return parseFloat($.getElement()[D]);}),j=Math.max.apply(Math,Y),F=F[Y.findIndex(function($){return $===Math.max.apply(Math,Y);})].getElement(),j=j+parseFloat(F.getBoundingClientRect()[X])+1,w.style[X]="".concat(j,"px"),j;}w.style.position="absolute",w.style.visibility="hidden";var I,O=this.attributes.width,M=this.attributes.height;if(this.attributes.maxWidthVal&&this.attributes.widthVal>this.attributes.maxWidthVal&&(O=this.attributes.maxWidth),this.attributes.maxHeightVal&&this.attributes.heightVal>this.attributes.maxHeightVal&&(M=this.attributes.maxHeight),w.style.width=O,w.style.height=M,w.style.left=this.attributes.x,w.style.top=this.attributes.y,w.style.overflow="hidden",this.attributes.zIndex&&(w.style.zIndex="".concat(this.attributes.zIndex)),this.attributes.fitContent&&(I=C(this.components,"width"),oe=C(this.components,"height"),this.attributes.setWidth(I),this.attributes.setHeight(oe)),this.attributes.shadow&&(w.style.boxShadow=this.attributes.shadow),this.attributes.borderRadius&&(w.style.borderRadius=this.attributes.borderRadius),this.attributes.cssStyleDeclarations){var N,G=o(this.attributes.cssStyleDeclarations);try{for(G.s();!(N=G.n()).done;){var H=N.value,B=Object.keys(H)[0],z=c.default.scaleWithFormat(H[B],this.scale,B);w.style[B]=z;}}catch(F){G.e(F);}finally{G.f();}}this.attributes.scale&&(0<=(oe=(I=w.style.transform).indexOf("scale"))?(Q=I.indexOf(")",oe),w.style.transform=I.slice(0,oe)+"scale(".concat(this.attributes.scale,")")+I.slice(Q+1),w.style.transform=w.style.transform.trim()):w.style.transform="".concat(I," scale(").concat(this.attributes.scale,")").trim());var te=w.style,K=this.attributes;switch(K.yGravity){case m.YGravity.UNSET:break;case m.YGravity.TOP:te.top=K.y;break;case m.YGravity.MIDDLE:var V=K.heightVal,U=(V===0&&(V=w.clientHeight),K.yVal);te.top=U-V/2+"px";break;case m.YGravity.BOTTOM:te.bottom=K.y,te.removeProperty("top");}var Z=w.style,re=this.attributes;switch(re.xGravity){case m.XGravity.UNSET:break;case m.XGravity.LEFT:Z.left=re.x;break;case m.XGravity.CENTER:var ue=re.widthVal,q=(ue!==-1&&ue!==0||(ue=w.clientWidth),re.xVal);Z.left=q-ue/2+"px";break;case m.XGravity.RIGHT:Z.right=re.x,Z.removeProperty("left");}w.style.pointerEvents="none";function J(F){if(F!=null&&F!=="")return typeof F=="number"?"".concat(F,"px"):F!=="auto"&&F!=="inherit-child"?(F=F.trim(),/^(calc|min|max|clamp|var)\s*\(/.test(F)||/[a-zA-Z%]+$/.test(F)?F:c.default.isNumericString(F)?"".concat(F,"px"):void 0):void 0;}var oe=J(O),Q=J(M);oe?w.style.setProperty("--layer-width",oe):w.style.removeProperty("--layer-width"),Q?w.style.setProperty("--layer-height",Q):w.style.removeProperty("--layer-height");}},{key:"tagElementWithTemplateID",value:function(){this.element&&this.element.setAttribute("templateIdentifier",this._refLayer.alphabeticalId||"");}},{key:"clear",value:function(){var w,C=o(this.components);try{for(C.s();!(w=C.n()).done;)w.value.clear();}catch(I){C.e(I);}finally{C.f();}}},{key:"buildVDOM",value:function(){var w;return c.default.surpass((delete(w=d.VDOMConstructor.builder(this))._refLayer,w));}},{key:"element",get:function(){return this._element;},set:function(w){this._element=w;}},{key:"Components",get:function(){return this.components;}},{key:"animationEffects",get:function(){return this._animationEffects;},set:function(w){this._animationEffects=w;}},{key:"vDom",get:function(){return this.vDOM;}}])&&y(f.prototype,v),S&&y(f,S),Object.defineProperty(f,"prototype",{writable:!1}),f;var f,v,S;}();r.default=l;},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){var p,c=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!c){if(Array.isArray(y)||(c=function(s,l){if(s){if(typeof s=="string")return o(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?o(s,l):void 0;}}(y))||b&&y&&typeof y.length=="number")return c&&(y=c),p=0,{s:b=function(){},n:function(){return p>=y.length?{done:!0}:{done:!1,value:y[p++]};},e:function(s){throw s;},f:b};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var d,m=!0,a=!1;return{s:function(){c=c.call(y);},n:function(){var s=c.next();return m=s.done,s;},e:function(s){a=!0,d=s;},f:function(){try{m||c.return==null||c.return();}finally{if(a)throw d;}}};}function o(y,b){(b==null||b>y.length)&&(b=y.length);for(var p=0,c=Array(b);p<b;p++)c[p]=y[p];return c;}function _(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];
145if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0});var E=h(50),x=h(5),h=function(){function y(d,m,a){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");this.slide=d,this.width=m,this.height=a;}return b=y,(p=[{key:"adaptAttributes",value:function(d,m){for(var a in m)m[a]=d.parseVal(m[a]);}},{key:"adaptEffect",value:function(d,m){this.adaptEffectsRecursively(d,m.attributes),this.adaptAttributes(d,m.attributes);}},{key:"adaptEffectsRecursively",value:function(d,m){if(m instanceof Object)for(var a in m)this.adaptEffectsRecursively(d,m[a]),m[a]instanceof Object&&this.adaptAttributes(d,m[a]);}},{key:"adaptAnnotation",value:function(d,m){for(var a in m)m[a]=d.parseVal(m[a]);}},{key:"adaptSubComponent",value:function(d,m){this.adaptAttributes(d,m.attributes);var a,s=n(m.effects);try{for(s.s();!(a=s.n()).done;){var l=a.value;this.adaptEffect(d,l);}}catch(g){s.e(g);}finally{s.f();}}},{key:"adaptComponent",value:function(d,m){var a,s=this,l=(this.adaptAttributes(d,m.attributes),n(m.effects));try{for(l.s();!(a=l.n()).done;){var g=a.value;this.adaptEffect(d,g);}}catch(M){l.e(M);}finally{l.f();}if(Array.isArray(m.components)&&m.components.forEach(function(M){var N=s.generateComponentValueParser(d,m);s.adaptComponent(N,M);}),Array.isArray(m.subComponents)&&m.subComponents){var f,v=n(m.subComponents);try{for(v.s();!(f=v.n()).done;){var S=f.value,w=this.generateComponentValueParser(d,m);this.adaptSubComponent(w,S);}}catch(M){v.e(M);}finally{v.f();}}if(m.textAnnotations){var C,I=n(m.textAnnotations);try{for(I.s();!(C=I.n()).done;){var O=C.value;this.adaptAnnotation(d,O),O.activeWordAnnotation&&this.adaptAnnotation(d,O.activeWordAnnotation),O.filters&&this.adaptAnnotation(d,O.filters);}}catch(M){I.e(M);}finally{I.f();}}}},{key:"adaptLayer",value:function(d,m){this.adaptAttributes(d,m.attributes);var a,s=this.generateViewValues(m.attributes),l=n(m.components);try{for(l.s();!(a=l.n()).done;){var g=a.value,f=new E.ValueParser(d.slideAspectRatio,s,void 0,void 0,d.paramLookUp,d.globalAtts);this.adaptComponent(f,g);}}catch(I){l.e(I);}finally{l.f();}s.width=d.getWidth(),s.height=d.getHeight();var v=new E.ValueParser(d.slideAspectRatio,s,void 0,void 0,d.paramLookUp,d.globalAtts);if(m.effects){var S,w=n(m.effects);try{for(w.s();!(S=w.n()).done;){var C=S.value;this.adaptEffect(v,C);}}catch(I){w.e(I);}finally{w.f();}}}},{key:"generateComponentValueParser",value:function(d,m){return m=this.generateViewValues(m.attributes),isNaN(m.height)&&(m.height=d.height),isNaN(m.width)&&(m.width=d.width),new E.ValueParser(d.slideAspectRatio,m,void 0,void 0,d.paramLookUp,d.globalAtts);}},{key:"generateViewValues",value:function(d){return{width:Number(d.width),height:Number(d.height),maxWidth:Number(d.maxWidth)||this.width,maxHeight:Number(d.maxHeight)||this.height,minWidth:Number(d.minWidth)||0,minHeight:Number(d.minHeight)||0};}},{key:"generateSlideValueParser",value:function(){var d={width:this.width,height:this.height},m={width:this.width,height:this.height};return new E.ValueParser(this.slide.aspectRatio,m,void 0,void 0,void 0,d);}},{key:"adapt",value:function(){var d,s=this.slide.toVDMObject(),m=this.slide.templateId2name2parameter,a=this.generateSlideValueParser(),s=x.default.cloneDeep(s),l=n(s);try{for(l.s();!(d=l.n()).done;){var g=d.value;g.templateId&&(a.paramLookUp=m.get(g.templateId)),this.adaptLayer(a,g);}}catch(f){l.e(f);}finally{l.f();}return s;}}])&&_(b.prototype,p),c&&_(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p){return function(c){if(Array.isArray(c))return x(c);}(p)||function(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c);}(p)||E(p)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 146In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(p,c){return function(d){if(Array.isArray(d))return d;}
146(p)||function(d,m){var a=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(a!=null){var s,l,g,f,v=[],S=!0,w=!1;try{if(g=(a=a.call(d)).next,m===0){if(Object(a)!==a)return;S=!1;}else for(;!(S=(s=g.call(a)).done)&&(v.push(s.value),v.length!==m);S=!0);}catch(C){w=!0,l=C;}finally{try{if(!S&&a.return!=null&&(f=a.return(),Object(f)!==f))return;}finally{if(w)throw l;}}return v;}}(p,c)||E(p,c)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 147In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(p,c){var d,m=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!m){if(Array.isArray(p)||(m=E(p))||c&&p&&typeof p.length=="number")return m&&(p=m),d=0,{s:c=function(){},n:function(){return d>=p.length?{done:!0}:{done:!1,value:p[d++]};},e:function(g){throw g;},f:c};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 148In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a,s=!0,l=!1;return{s:function(){m=m.call(p);},n:function(){var g=m.next();return s=g.done,g;},e:function(g){l=!0,a=g;},f:function(){try{s||m.return==null||m.return();}finally{if(l)throw a;}}};}function E(p,c){if(p){if(typeof p=="string")return x(p,c);var d={}.toString.call(p).slice(8,-1);return(d=d==="Object"&&p.constructor?p.constructor.name:d)==="Map"||d==="Set"?Array.from(p):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?x(p,c):void 0;}}function x(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function h(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}Object.defineProperty(r,"__esModule",{value:!0});var y=b(5),b=function(){function p(a,s){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");this.map=new Map(),this._startTime=a,this._endTime=s,this.updateKeys();}return c=p,m=[{key:"contained",value:function(a,s){return a.start>=s.start&&a.end<=s.end;}},{key:"findIntersection",value:function(a){return{start:Math.max.apply(Math,n(a.map(function(s){return s.start;}))),end:Math.min.apply(Math,n(a.map(function(s){return s.end;})))};}}],(d=[{key:"startTime",get:function(){return this._startTime;}},{key:"endTime",get:function(){return this._endTime;}},{key:"updateKeys",value:function(){this._keys=Array.from(this.map.keys());}},{key:"keys",get:function(){return this._keys;}},{key:"has",value:function(a){if(!a)return!1;var s,l=!1,g=_(this.map.entries());try{for(g.s();!(s=g.n()).done;){var f=o(s.value,2),v=f[0];if(f[1],a.start>=v.start&&a.end<=v.end){l=!0;break;}}}catch(S){g.e(S);}finally{g.f();}return l;}},{key:"set",value:function(a,s){if(this.isWithinRange(a))return this.map=this.map.set(a,s),this.map=new Map(n(this.map.entries()).sort(function(l,g){return l[0].start-g[0].start;})),this;}},{key:"addEntry",value:function(a,s){return!!this.isWithinRange(a)&&(this.merger(a,s),this.updateKeys(),!0);}},{key:"merger",value:function(a,s){var l,g=y.default.cloneDeep(a),f=s,v=_(this.map.keys());try{for(v.s();!(l=v.n()).done;){var S=l.value,w=p.findIntersection([a,S]);w.end>=w.start&&(f=f.concat(this.map.get(S)),g={start:Math.min(a.start,S.start),end:Math.max(a.end,S.end)},this.map.delete(S));}}catch(C){v.e(C);}finally{v.f();}g.start=Math.max(this.startTime,g.start),g.end=Math.min(this.endTime,g.end),this.set(g,f);}},{key:"addValueToListByTime",value:function(a,s){return a=this.timeToInterval(a),this.addEntry(a,s);}},{key:"getByTime",value:function(a){return a=this.timeToInterval(a),this.getByInterval(a);}},{key:"getByInterval",value:function(a){var s=1<arguments.length&&arguments[1]!==void 0&&arguments[1];if(a&&this.isWithinRange(a)&&this.has(a)){var l=this.map.get(a);
148if(!l&&s){var g,f=_(this.map.keys());try{for(f.s();!(g=f.n()).done;){var v=g.value;if(p.contained(a,v)){l=this.map.get(v);break;}}}catch(S){f.e(S);}finally{f.f();}}return l;}}},{key:"unSqueezeToInterval",value:function(a){if(!this.timeToInterval(a)){var s,l={start:this._startTime,end:this._endTime},g=_(this._keys);try{for(g.s();!(s=g.n()).done;){var f=s.value;a>=f.end?l.start=f.end:a<f.start&&(l.end=f.start);}}catch(v){g.e(v);}finally{g.f();}return l;}}},{key:"timeToInterval",value:function(g){var s=this._keys,l=s.map(function(f){return[f.start,f.end];}),l=o(y.default.intervalBinarySearch(l,g),2),g=l[0];return l[1],s[g];}},{key:"union",value:function(a){if(a){var s={start:a._startTime,end:a._endTime};if(this.isWithinRange(s)){var l,g=_(a.map.entries());try{for(g.s();!(l=g.n()).done;){var f=o(l.value,2),v=f[0],S=f[1];this.addEntry(v,S);}}catch(w){g.e(w);}finally{g.f();}return this;}}}},{key:"isWithinRange",value:function(a){return!!a&&a.start>=this._startTime&&a.end<=this._endTime;}},{key:"toString",value:function(){var a=[];if(0<this.map.size){var s,l=_(this.map.entries());try{for(l.s();!(s=l.n()).done;){var g=o(s.value,2),f=g[0],v=g[1];a.push("".concat(JSON.stringify(f)," ==> ").concat(JSON.stringify(v)));}}catch(S){l.e(S);}finally{l.f();}}return"Inner map: ".concat(a.join(` 149`),` 150 151 startTime: `).concat(this._startTime,` 152 153 endTime: `).concat(this._endTime);}}])&&h(c.prototype,d),m&&h(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}();r.default=b;},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0});var o=_(47),_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"isVideoComponent",value:function(b){return this.compComparator(b,"video");}},{key:"isImageComponent",value:function(b){return this.compComparator(b,"image");}},{key:"compComparator",value:function(b,p){return b&&b.componentTemplate.type===p;}},{key:"isAnimationEffect",value:function(b){return b&&b.type===o.EffectType.ANIMATION;}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();r.default=_;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(){n=function(){return d;};var c,d={},m=Object.prototype,a=m.hasOwnProperty,s=Object.defineProperty||function(J,oe,Q){J[oe]=Q.value;},z=typeof Symbol=="function"?Symbol:{},l=z.iterator||"@@iterator",g=z.asyncIterator||"@@asyncIterator",f=z.toStringTag||"@@toStringTag";function v(J,oe,Q){return Object.defineProperty(J,oe,{value:Q,enumerable:!0,configurable:!0,writable:!0}),J[oe];}try{v({},"");}catch{v=function(oe,Q,F){return oe[Q]=F;};}function S(J,$,Q,ne){var X,Y,j,D,$=$&&$.prototype instanceof G?$:G,$=Object.create($.prototype),ne=new ue(ne||[]);return s($,"_invoke",{value:(X=J,Y=Q,j=ne,D=C,function(le,se){if(D===O)throw Error("Generator is already running");if(D===M){if(le==="throw")throw se;return{value:c,done:!0};}for(j.method=le,j.arg=se;;){var fe=j.delegate;if(fe&&(fe=function ge(he,_e){var Re=_e.method,ee=he.iterator[Re];return ee===c?(_e.delegate=null,Re==="throw"&&he.iterator.return&&(_e.method="return",_e.arg=c,ge(he,_e),_e.method==="throw")||Re!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+Re+"' method")),N):(Re=w(ee,he.iterator,_e.arg),Re.type==="throw"?(_e.method="throw",_e.arg=Re.arg,_e.delegate=null,N):(ee=Re.arg,ee?ee.done?(_e[he.resultName]=ee.value,_e.next=he.nextLoc,_e.method!=="return"&&(_e.method="next",_e.arg=c),_e.delegate=null,N):ee:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,N)));}(fe,j),fe)){if(fe===N)continue;return fe;}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(D===C)throw D=M,j.arg;j.dispatchException(j.arg);}else j.method==="return"&&j.abrupt("return",j.arg);if(D=O,fe=w(X,Y,j),fe.type==="normal"){if(D=j.done?M:I,fe.arg===N)continue;return{value:fe.arg,done:j.done};}fe.type==="throw"&&(D=M,j.method="throw",j.arg=fe.arg);}})}),$;}function w(J,oe,Q){try{return{type:"normal",arg:J.call(oe,Q)};}catch(F){return{type:"throw",arg:F};}}d.wrap=S;var C="suspendedStart",I="suspendedYield",O="executing",M="completed",N={};function G(){}function H(){}function B(){}var z={},te=(v(z,l,function(){return this;}),Object.getPrototypeOf),te=te&&te(te(q([]))),K=(te&&te!==m&&a.call(te,l)&&(z=te),B.prototype=G.prototype=Object.create(z));
153function V(J){["next","throw","return"].forEach(function(oe){v(J,oe,function(Q){return this._invoke(oe,Q);});});}function U(J,oe){var Q;s(this,"_invoke",{value:function(F,X){function Y(){return new oe(function(j,D){(function $(he,le,se,fe){var ge,he=w(J[he],J,le);if(he.type!=="throw")return(le=(ge=he.arg).value)&&t(le)=="object"&&a.call(le,"__await")?oe.resolve(le.__await).then(function(_e){$("next",_e,se,fe);},function(_e){$("throw",_e,se,fe);}):oe.resolve(le).then(function(_e){ge.value=_e,se(ge);},function(_e){return $("throw",_e,se,fe);});fe(he.arg);})(F,X,j,D);});}return Q=Q?Q.then(Y,Y):Y();}});}function Z(J){var oe={tryLoc:J[0]};1 in J&&(oe.catchLoc=J[1]),2 in J&&(oe.finallyLoc=J[2],oe.afterLoc=J[3]),this.tryEntries.push(oe);}function re(J){var oe=J.completion||{};oe.type="normal",delete oe.arg,J.completion=oe;}function ue(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(Z,this),this.reset(!0);}function q(J){if(J||J===""){var oe,Q=J[l];if(Q)return Q.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length))return oe=-1,(Q=function F(){for(;++oe<J.length;)if(a.call(J,oe))return F.value=J[oe],F.done=!1,F;return F.value=c,F.done=!0,F;}).next=Q;}throw new TypeError(t(J)+" is not iterable");}return s(K,"constructor",{value:H.prototype=B,configurable:!0}),s(B,"constructor",{value:H,configurable:!0}),H.displayName=v(B,f,"GeneratorFunction"),d.isGeneratorFunction=function(J){return J=typeof J=="function"&&J.constructor,!!J&&(J===H||(J.displayName||J.name)==="GeneratorFunction");},d.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,B):(J.__proto__=B,v(J,f,"GeneratorFunction")),J.prototype=Object.create(K),J;},d.awrap=function(J){return{__await:J};},V(U.prototype),v(U.prototype,g,function(){return this;}),d.AsyncIterator=U,d.async=function(J,oe,Q,F,X){X===void 0&&(X=Promise);var Y=new U(S(J,oe,Q,F),X);return d.isGeneratorFunction(oe)?Y:Y.next().then(function(j){return j.done?j.value:Y.next();});},V(K),v(K,f,"Generator"),v(K,l,function(){return this;}),v(K,"toString",function(){return"[object Generator]";}),d.keys=function(J){var oe,Q=Object(J),F=[];for(oe in Q)F.push(oe);return F.reverse(),function X(){for(;F.length;){var Y=F.pop();if(Y in Q)return X.value=Y,X.done=!1,X;}return X.done=!0,X;};},d.values=q,ue.prototype={constructor:ue,reset:function(J){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(re),!J)for(var oe in this)oe.charAt(0)==="t"&&a.call(this,oe)&&!isNaN(+oe.slice(1))&&(this[oe]=c);},stop:function(){this.done=!0;var J=this.tryEntries[0].completion;if(J.type==="throw")throw J.arg;return this.rval;},dispatchException:function(J){if(this.done)throw J;var oe=this;function Q($,ne){return Y.type="throw",Y.arg=J,oe.next=$,ne&&(oe.method="next",oe.arg=c),!!ne;}for(var F=this.tryEntries.length-1;0<=F;--F){var X=this.tryEntries[F],Y=X.completion;if(X.tryLoc==="root")return Q("end");if(X.tryLoc<=this.prev){var j=a.call(X,"catchLoc"),D=a.call(X,"finallyLoc");if(j&&D){if(this.prev<X.catchLoc)return Q(X.catchLoc,!0);if(this.prev<X.finallyLoc)return Q(X.finallyLoc);}else if(j){if(this.prev<X.catchLoc)return Q(X.catchLoc,!0);}else{if(!D)throw Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return Q(X.finallyLoc);}}}},abrupt:function(J,oe){for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q];if(F.tryLoc<=this.prev&&a.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var X=F;break;}}var Y=(X=X&&(J==="break"||J==="continue")&&X.tryLoc<=oe&&oe<=X.finallyLoc?null:X)?X.completion:{};return Y.type=J,Y.arg=oe,X?(this.method="next",this.next=X.finallyLoc,N):this.complete(Y);},complete:function(J,oe){if(J.type==="throw")throw J.arg;return J.type==="break"||J.type==="continue"?this.next=J.arg:J.type==="return"?(this.rval=this.arg=J.arg,this.method="return",this.next="end"):J.type==="normal"&&oe&&(this.next=oe),N;},finish:function(J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),re(Q),N;}},catch:function(J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q,F,X=this.tryEntries[oe];if(X.tryLoc===J)return(Q=X.completion).type==="throw"&&(F=Q.arg,re(X)),F;}throw Error("illegal catch attempt");},delegateYield:function(J,oe,Q){return this.delegate={iterator:q(J),resultName:oe,nextLoc:Q},this.method==="next"&&(this.arg=c),N;}},d;}function o(c,d){var m,a=typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(!a){if(Array.isArray(c)||(a=function(f,v){if(f){if(typeof f=="string")return _(f,v);var S={}.toString.call(f).slice(8,-1);return(S=S==="Object"&&f.constructor?f.constructor.name:S)==="Map"||S==="Set"?Array.from(f):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?_(f,v):void 0;}}(c))||d&&c&&typeof c.length=="number")return a&&(c=a),m=0,{s:d=function(){},n:function(){return m>=c.length?{done:!0}:{done:!1,value:c[m++]};},e:function(f){throw f;},f:d};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 154In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var s,l=!0,g=!1;return{s:function(){a=a.call(c);},n:function(){var f=a.next();return l=f.done,f;},e:function(f){g=!0,s=f;},f:function(){try{l||a.return==null||a.return();}finally{if(g)throw s;}}};}function _(c,d){(d==null||d>c.length)&&(d=c.length);for(var m=0,a=Array(d);m<d;m++)a[m]=c[m];return a;}function E(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}var x=this&&this.__awaiter||function(c,d,m,a){return new(m=m||Promise)(function(s,l){function g(S){try{v(a.next(S));}catch(w){l(w);}}function f(S){try{v(a.throw(S));}catch(w){l(w);}}function v(S){var w;S.done?s(S.value):((w=S.value)instanceof m?w:new m(function(C){C(w);})).then(g,f);}v((a=a.apply(c,d||[])).next());});}
154,h=(Object.defineProperty(r,"__esModule",{value:!0}),p(13)),y=p(274),b=p(273),p=function(){function c(s,l,g,f,v){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this._refSlide=s,this._zIndex=s.zIndex,this.index=l,this.mediaId=v.mediaId||"",this.layers=[],this._element=document.createElement("div"),this._element.className="vdm-slide",this._element.setAttribute("mediaId",this.mediaId),this._element.setAttribute("idx",this.index.toString()),this._isViewRendered=!1,this._isViewRendering=!1,this.buildLayers(s,g,f,v);}return d=c,(m=[{key:"buildLayers",value:function(S,l,g,f){var v,S=new y.default(S,l,g).adapt(),w=(this.layers.splice(0,this.layers.length),o(S));try{for(w.s();!(v=w.n()).done;){var C=v.value;this.layers.push(new b.default(C,f));}}catch(I){w.e(I);}finally{w.f();}}},{key:"render",value:function(s){for(var l=arguments.length,g=new Array(1<l?l-1:0),f=1;f<l;f++)g[f-1]=arguments[f];return x(this,void 0,void 0,n().mark(function v(){return n().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return this._isViewRendering=!0,S.next=3,this.renderHtml.apply(this,[s].concat(g));case 3:this._isViewRendered=!0,this._isViewRendering=!1;case 5:case"end":return S.stop();}},v,this);}));}},{key:"renderHtml",value:function(s){for(var l=arguments.length,g=new Array(1<l?l-1:0),f=1;f<l;f++)g[f-1]=arguments[f];return x(this,void 0,void 0,n().mark(function v(){var S,w,C,I;return n().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:!g[0]&&s.appendChild(this._element),S=[],w=o(this.layers);try{for(w.s();!(C=w.n()).done;)I=C.value,S.push(I.renderHtml(this._element));}catch(M){w.e(M);}finally{w.f();}return O.next=7,Promise.all(S);case 7:this.applyStyle(this._element);case 8:case"end":return O.stop();}},v,this);}));}},{key:"applyStyle",value:function(s){s.style.position="absolute",s.style.visibility="hidden",this._zIndex==h.DisplayPriority.MASTER_ORDER&&(s.style.zIndex=h.GlobalConstants.MASTER_ZINDEX);}},{key:"preReconstructWithRecycle",value:function(){this._isViewRendered=!1,this._isViewRendering=!1;}},{key:"reconstructWithRecycle",value:function(s){this._isViewRendered=!0,this._isViewRendering=!1;}},{key:"clear",value:function(){var s,l=o(this.layers);try{for(l.s();!(s=l.n()).done;)s.value.clear();}catch(g){l.e(g);}finally{l.f();}}},{key:"Element",get:function(){return this._element;},set:function(s){this._element=s;}},{key:"Layers",get:function(){return this.layers;}},{key:"Index",get:function(){return this.index;}},{key:"isViewRendered",get:function(){return this._isViewRendered;}},{key:"isViewRendering",get:function(){return this._isViewRendering;}},{key:"setIsViewRendering",value:function(s){this._isViewRendering=s;}},{key:"setIsViewRendered",value:function(s){this._isViewRendered=s;}}])&&E(d.prototype,m),a&&E(d,a),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,m,a;}();r.default=p;},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(){n=function(){return b;};var y,b={},p=Object.prototype,c=p.hasOwnProperty,d=Object.defineProperty||function(re,ue,q){re[ue]=q.value;},G=typeof Symbol=="function"?Symbol:{},m=G.iterator||"@@iterator",a=G.asyncIterator||"@@asyncIterator",s=G.toStringTag||"@@toStringTag";function l(re,ue,q){return Object.defineProperty(re,ue,{value:q,enumerable:!0,configurable:!0,writable:!0}),re[ue];}try{l({},"");}catch{l=function(ue,q,J){return ue[q]=J;};}function g(re,Y,q,j){var oe,Q,F,X,Y=Y&&Y.prototype instanceof O?Y:O,Y=Object.create(Y.prototype),j=new U(j||[]);return d(Y,"_invoke",{value:(oe=re,Q=q,F=j,X=v,function(D,$){if(X===w)throw Error("Generator is already running");if(X===C){if(D==="throw")throw $;return{value:y,done:!0};}for(F.method=D,F.arg=$;;){var ne=F.delegate;if(ne&&(ne=function le(se,fe){var ge=fe.method,he=se.iterator[ge];return he===y?(fe.delegate=null,ge==="throw"&&se.iterator.return&&(fe.method="return",fe.arg=y,le(se,fe),fe.method==="throw")||ge!=="return"&&(fe.method="throw",fe.arg=new TypeError("The iterator does not provide a '"+ge+"' method")),I):(ge=f(he,se.iterator,fe.arg),ge.type==="throw"?(fe.method="throw",fe.arg=ge.arg,fe.delegate=null,I):(he=ge.arg,he?he.done?(fe[se.resultName]=he.value,fe.next=se.nextLoc,fe.method!=="return"&&(fe.method="next",fe.arg=y),fe.delegate=null,I):he:(fe.method="throw",fe.arg=new TypeError("iterator result is not an object"),fe.delegate=null,I)));}(ne,F),ne)){if(ne===I)continue;return ne;}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(X===v)throw X=C,F.arg;
154F.dispatchException(F.arg);}else F.method==="return"&&F.abrupt("return",F.arg);if(X=w,ne=f(oe,Q,F),ne.type==="normal"){if(X=F.done?C:S,ne.arg===I)continue;return{value:ne.arg,done:F.done};}ne.type==="throw"&&(X=C,F.method="throw",F.arg=ne.arg);}})}),Y;}function f(re,ue,q){try{return{type:"normal",arg:re.call(ue,q)};}catch(J){return{type:"throw",arg:J};}}b.wrap=g;var v="suspendedStart",S="suspendedYield",w="executing",C="completed",I={};function O(){}function M(){}function N(){}var G={},H=(l(G,m,function(){return this;}),Object.getPrototypeOf),H=H&&H(H(Z([]))),B=(H&&H!==p&&c.call(H,m)&&(G=H),N.prototype=O.prototype=Object.create(G));function z(re){["next","throw","return"].forEach(function(ue){l(re,ue,function(q){return this._invoke(ue,q);});});}function te(re,ue){var q;d(this,"_invoke",{value:function(J,oe){function Q(){return new ue(function(F,X){(function Y(se,D,$,ne){var le,se=f(re[se],re,D);if(se.type!=="throw")return(D=(le=se.arg).value)&&t(D)=="object"&&c.call(D,"__await")?ue.resolve(D.__await).then(function(fe){Y("next",fe,$,ne);},function(fe){Y("throw",fe,$,ne);}):ue.resolve(D).then(function(fe){le.value=fe,$(le);},function(fe){return Y("throw",fe,$,ne);});ne(se.arg);})(J,oe,F,X);});}return q=q?q.then(Q,Q):Q();}});}function K(re){var ue={tryLoc:re[0]};1 in re&&(ue.catchLoc=re[1]),2 in re&&(ue.finallyLoc=re[2],ue.afterLoc=re[3]),this.tryEntries.push(ue);}function V(re){var ue=re.completion||{};ue.type="normal",delete ue.arg,re.completion=ue;}function U(re){this.tryEntries=[{tryLoc:"root"}],re.forEach(K,this),this.reset(!0);}function Z(re){if(re||re===""){var ue,q=re[m];if(q)return q.call(re);if(typeof re.next=="function")return re;if(!isNaN(re.length))return ue=-1,(q=function J(){for(;++ue<re.length;)if(c.call(re,ue))return J.value=re[ue],J.done=!1,J;return J.value=y,J.done=!0,J;}).next=q;}throw new TypeError(t(re)+" is not iterable");}return d(B,"constructor",{value:M.prototype=N,configurable:!0}),d(N,"constructor",{value:M,configurable:!0}),M.displayName=l(N,s,"GeneratorFunction"),b.isGeneratorFunction=function(re){return re=typeof re=="function"&&re.constructor,!!re&&(re===M||(re.displayName||re.name)==="GeneratorFunction");},b.mark=function(re){return Object.setPrototypeOf?Object.setPrototypeOf(re,N):(re.__proto__=N,l(re,s,"GeneratorFunction")),re.prototype=Object.create(B),re;},b.awrap=function(re){return{__await:re};},z(te.prototype),l(te.prototype,a,function(){return this;}),b.AsyncIterator=te,b.async=function(re,ue,q,J,oe){oe===void 0&&(oe=Promise);var Q=new te(g(re,ue,q,J),oe);return b.isGeneratorFunction(ue)?Q:Q.next().then(function(F){return F.done?F.value:Q.next();});},z(B),l(B,s,"Generator"),l(B,m,function(){return this;}),l(B,"toString",function(){return"[object Generator]";}),b.keys=function(re){var ue,q=Object(re),J=[];for(ue in q)J.push(ue);return J.reverse(),function oe(){for(;J.length;){var Q=J.pop();if(Q in q)return oe.value=Q,oe.done=!1,oe;}return oe.done=!0,oe;};},b.values=Z,U.prototype={constructor:U,reset:function(re){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(V),!re)for(var ue in this)ue.charAt(0)==="t"&&c.call(this,ue)&&!isNaN(+ue.slice(1))&&(this[ue]=y);},stop:function(){this.done=!0;var re=this.tryEntries[0].completion;if(re.type==="throw")throw re.arg;return this.rval;},dispatchException:function(re){if(this.done)throw re;var ue=this;function q(Y,j){return Q.type="throw",Q.arg=re,ue.next=Y,j&&(ue.method="next",ue.arg=y),!!j;}for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J],Q=oe.completion;if(oe.tryLoc==="root")return q("end");if(oe.tryLoc<=this.prev){var F=c.call(oe,"catchLoc"),X=c.call(oe,"finallyLoc");if(F&&X){if(this.prev<oe.catchLoc)return q(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return q(oe.finallyLoc);}else if(F){if(this.prev<oe.catchLoc)return q(oe.catchLoc,!0);}else{if(!X)throw Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return q(oe.finallyLoc);}}}},abrupt:function(re,ue){for(var q=this.tryEntries.length-1;0<=q;--q){var J=this.tryEntries[q];
154if(J.tryLoc<=this.prev&&c.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var oe=J;break;}}var Q=(oe=oe&&(re==="break"||re==="continue")&&oe.tryLoc<=ue&&ue<=oe.finallyLoc?null:oe)?oe.completion:{};return Q.type=re,Q.arg=ue,oe?(this.method="next",this.next=oe.finallyLoc,I):this.complete(Q);},complete:function(re,ue){if(re.type==="throw")throw re.arg;return re.type==="break"||re.type==="continue"?this.next=re.arg:re.type==="return"?(this.rval=this.arg=re.arg,this.method="return",this.next="end"):re.type==="normal"&&ue&&(this.next=ue),I;},finish:function(re){for(var ue=this.tryEntries.length-1;0<=ue;--ue){var q=this.tryEntries[ue];if(q.finallyLoc===re)return this.complete(q.completion,q.afterLoc),V(q),I;}},catch:function(re){for(var ue=this.tryEntries.length-1;0<=ue;--ue){var q,J,oe=this.tryEntries[ue];if(oe.tryLoc===re)return(q=oe.completion).type==="throw"&&(J=q.arg,V(oe)),J;}throw Error("illegal catch attempt");},delegateYield:function(re,ue,q){return this.delegate={iterator:Z(re),resultName:ue,nextLoc:q},this.method==="next"&&(this.arg=y),I;}},b;}function o(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}var _=this&&this.__awaiter||function(y,b,p,c){return new(p=p||Promise)(function(d,m){function a(g){try{l(c.next(g));}catch(f){m(f);}}function s(g){try{l(c.throw(g));}catch(f){m(f);}}function l(g){var f;g.done?d(g.value):((f=g.value)instanceof p?f:new p(function(v){v(f);})).then(a,s);}l((c=c.apply(y,b||[])).next());});},E=(Object.defineProperty(r,"__esModule",{value:!0}),h(5)),x=h(13),h=function(){function y(d,m){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");this._width=d.global.width,this._height=d.global.height;var a=this.calcScale(m);a!==1&&(this._width=E.default.scale(d.global.width,a),this._height=E.default.scale(d.global.height,a)),this.mediaId=m.mediaId||"",x.GlobalConstants.setStoryDimensions(this._width,this._height),this._element=document.createElement("div"),this._element.className="vdm-story",this._element.setAttribute("mediaId",this.mediaId);}return b=y,(p=[{key:"calcScale",value:function(d){var m=1;return d.scale?m=d.scale:d.container&&d.container.height&&(m=d.container.height/this._height,d.container.width&&this._width*m>d.container.width&&(m=d.container.width/this._width)),d.scale=m;}},{key:"render",value:function(d,m){return _(this,void 0,void 0,n().mark(function a(){return n().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this.renderHtml_(d,m);case 2:x.GlobalConstants.setVDMContainerRect(d.getBoundingClientRect());case 3:case"end":return s.stop();}},a,this);}));}},{key:"renderHtml_",value:function(d,m){return _(this,void 0,void 0,n().mark(function a(){return n().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:m||d.appendChild(this._element),this.applyStyle(this._element),d.style.width=this._width+"px",d.style.height=this._height+"px",d.style.overflow="hidden";case 5:case"end":return s.stop();}},a,this);}));}},{key:"applyStyle",value:function(d){d.style.position="absolute",d.style.visibility="hidden",d.style.width=this._width+"px",d.style.height=this._height+"px",d.style.cursor="default",d.style.overflow="hidden",d.style.fontFamily="Montserrat,sans-serif";}},{key:"element",value:function(){return this._element;}},{key:"getMediaId",value:function(){return this.mediaId;}},{key:"width",get:function(){return this._width;}},{key:"height",get:function(){return this._height;}}])&&o(b.prototype,p),c&&o(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,e){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){var y,b=typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(!b){if(Array.isArray(x)||(b=function(m,a){if(m){if(typeof m=="string")return o(m,a);var s={}.toString.call(m).slice(8,-1);return(s=s==="Object"&&m.constructor?m.constructor.name:s)==="Map"||s==="Set"?Array.from(m):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(m,a):void 0;}}(x))||h&&x&&typeof x.length=="number")return b&&(x=b),y=0,{s:h=function(){},n:function(){return y>=x.length?{done:!0}:{done:!1,value:x[y++]};},e:function(m){throw m;},f:h};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 155In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var p,c=!0,d=!1;return{s:function(){b=b.call(x);},n:function(){var m=b.next();return c=m.done,m;},e:function(m){d=!0,p=m;},f:function(){try{c||b.return==null||b.return();}finally{if(d)throw p;}}};}function o(x,h){(h==null||h>x.length)&&(h=x.length);for(var y=0,b=Array(h);y<h;y++)b[y]=x[y];return b;}function _(x,h){for(var y=0;
155y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseTransitionCoordinator=void 0;var E=function(){function x(p,c,d,m){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this.first=p,this.second=d,this.firStatus=c,this.secStatus=m;}return h=x,(y=[{key:"defaultCoordination",value:function(){var p=this.firStatus.layer;if(this.first&&this.first.TimeLine){var c,d=this.first.TimeLine,m=n(this.first.Layers);try{for(m.s();!(c=m.n()).done;){var a=c.value;a!==p&&d.set(a.element,{visibility:"inherit"},a.endTime);}}catch(s){m.e(s);}finally{m.f();}}}}])&&_(h.prototype,y),b&&_(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.BaseTransitionCoordinator=E;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){return function(a){if(Array.isArray(a))return a;}(d)||function(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var g,f,v,S,w=[],C=!0,I=!1;try{if(v=(l=l.call(a)).next,s===0){if(Object(l)!==l)return;C=!1;}else for(;!(C=(g=v.call(l)).done)&&(w.push(g.value),w.length!==s);C=!0);}catch(O){I=!0,f=O;}finally{try{if(!C&&l.return!=null&&(S=l.return(),Object(S)!==S))return;}finally{if(I)throw f;}}return w;}}(d,m)||o(d,m)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 156In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(d,m){if(d){if(typeof d=="string")return _(d,m);var a={}.toString.call(d).slice(8,-1);return(a=a==="Object"&&d.constructor?d.constructor.name:a)==="Map"||a==="Set"?Array.from(d):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(d,m):void 0;}}function _(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function E(){E=function(){return m;};var d,m={},a=Object.prototype,s=a.hasOwnProperty,l=Object.defineProperty||function(oe,Q,F){oe[Q]=F.value;},te=typeof Symbol=="function"?Symbol:{},g=te.iterator||"@@iterator",f=te.asyncIterator||"@@asyncIterator",v=te.toStringTag||"@@toStringTag";function S(oe,Q,F){return Object.defineProperty(oe,Q,{value:F,enumerable:!0,configurable:!0,writable:!0}),oe[Q];}try{S({},"");}catch{S=function(Q,F,X){return Q[F]=X;};}function w(oe,ne,F,le){var Y,j,D,$,ne=ne&&ne.prototype instanceof H?ne:H,ne=Object.create(ne.prototype),le=new q(le||[]);return l(ne,"_invoke",{value:(Y=oe,j=F,D=le,$=I,function(se,fe){if($===M)throw Error("Generator is already running");if($===N){if(se==="throw")throw fe;return{value:d,done:!0};}for(D.method=se,D.arg=fe;;){var ge=D.delegate;if(ge&&(ge=function he(_e,Re){var ee=Re.method,W=_e.iterator[ee];return W===d?(Re.delegate=null,ee==="throw"&&_e.iterator.return&&(Re.method="return",Re.arg=d,he(_e,Re),Re.method==="throw")||ee!=="return"&&(Re.method="throw",Re.arg=new TypeError("The iterator does not provide a '"+ee+"' method")),G):(ee=C(W,_e.iterator,Re.arg),ee.type==="throw"?(Re.method="throw",Re.arg=ee.arg,Re.delegate=null,G):(W=ee.arg,W?W.done?(Re[_e.resultName]=W.value,Re.next=_e.nextLoc,Re.method!=="return"&&(Re.method="next",Re.arg=d),Re.delegate=null,G):W:(Re.method="throw",Re.arg=new TypeError("iterator result is not an object"),Re.delegate=null,G)));}(ge,D),ge)){if(ge===G)continue;return ge;}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if($===I)throw $=N,D.arg;D.dispatchException(D.arg);}else D.method==="return"&&D.abrupt("return",D.arg);if($=M,ge=C(Y,j,D),ge.type==="normal"){if($=D.done?N:O,ge.arg===G)continue;return{value:ge.arg,done:D.done};}ge.type==="throw"&&($=N,D.method="throw",D.arg=ge.arg);}})}),ne;}function C(oe,Q,F){try{return{type:"normal",arg:oe.call(Q,F)};}catch(X){return{type:"throw",arg:X};}}m.wrap=w;var I="suspendedStart",O="suspendedYield",M="executing",N="completed",G={};function H(){}function B(){}function z(){}var te={},K=(S(te,g,function(){return this;}),Object.getPrototypeOf),K=K&&K(K(J([]))),V=(K&&K!==a&&s.call(K,g)&&(te=K),z.prototype=H.prototype=Object.create(te));function U(oe){["next","throw","return"].forEach(function(Q){S(oe,Q,function(F){return this._invoke(Q,F);});});}function Z(oe,Q){var F;l(this,"_invoke",{value:function(X,Y){function j(){return new Q(function(D,$){(function ne(_e,se,fe,ge){var he,_e=C(oe[_e],oe,se);if(_e.type!=="throw")return(se=(he=_e.arg).value)&&t(se)=="object"&&s.call(se,"__await")?Q.resolve(se.__await).then(function(Re){ne("next",Re,fe,ge);},function(Re){ne("throw",Re,fe,ge);}):Q.resolve(se).then(function(Re){he.value=Re,fe(he);},function(Re){return ne("throw",Re,fe,ge);});ge(_e.arg);})(X,Y,D,$);});}return F=F?F.then(j,j):j();}});}function re(oe){var Q={tryLoc:oe[0]};1 in oe&&(Q.catchLoc=oe[1]),2 in oe&&(Q.finallyLoc=oe[2],Q.afterLoc=oe[3]),this.tryEntries.push(Q
156);}function ue(oe){var Q=oe.completion||{};Q.type="normal",delete Q.arg,oe.completion=Q;}function q(oe){this.tryEntries=[{tryLoc:"root"}],oe.forEach(re,this),this.reset(!0);}function J(oe){if(oe||oe===""){var Q,F=oe[g];if(F)return F.call(oe);if(typeof oe.next=="function")return oe;if(!isNaN(oe.length))return Q=-1,(F=function X(){for(;++Q<oe.length;)if(s.call(oe,Q))return X.value=oe[Q],X.done=!1,X;return X.value=d,X.done=!0,X;}).next=F;}throw new TypeError(t(oe)+" is not iterable");}return l(V,"constructor",{value:B.prototype=z,configurable:!0}),l(z,"constructor",{value:B,configurable:!0}),B.displayName=S(z,v,"GeneratorFunction"),m.isGeneratorFunction=function(oe){return oe=typeof oe=="function"&&oe.constructor,!!oe&&(oe===B||(oe.displayName||oe.name)==="GeneratorFunction");},m.mark=function(oe){return Object.setPrototypeOf?Object.setPrototypeOf(oe,z):(oe.__proto__=z,S(oe,v,"GeneratorFunction")),oe.prototype=Object.create(V),oe;},m.awrap=function(oe){return{__await:oe};},U(Z.prototype),S(Z.prototype,f,function(){return this;}),m.AsyncIterator=Z,m.async=function(oe,Q,F,X,Y){Y===void 0&&(Y=Promise);var j=new Z(w(oe,Q,F,X),Y);return m.isGeneratorFunction(Q)?j:j.next().then(function(D){return D.done?D.value:j.next();});},U(V),S(V,v,"Generator"),S(V,g,function(){return this;}),S(V,"toString",function(){return"[object Generator]";}),m.keys=function(oe){var Q,F=Object(oe),X=[];for(Q in F)X.push(Q);return X.reverse(),function Y(){for(;X.length;){var j=X.pop();if(j in F)return Y.value=j,Y.done=!1,Y;}return Y.done=!0,Y;};},m.values=J,q.prototype={constructor:q,reset:function(oe){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(ue),!oe)for(var Q in this)Q.charAt(0)==="t"&&s.call(this,Q)&&!isNaN(+Q.slice(1))&&(this[Q]=d);},stop:function(){this.done=!0;var oe=this.tryEntries[0].completion;if(oe.type==="throw")throw oe.arg;return this.rval;},dispatchException:function(oe){if(this.done)throw oe;var Q=this;function F(ne,le){return j.type="throw",j.arg=oe,Q.next=ne,le&&(Q.method="next",Q.arg=d),!!le;}for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X],j=Y.completion;if(Y.tryLoc==="root")return F("end");if(Y.tryLoc<=this.prev){var D=s.call(Y,"catchLoc"),$=s.call(Y,"finallyLoc");if(D&&$){if(this.prev<Y.catchLoc)return F(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return F(Y.finallyLoc);}else if(D){if(this.prev<Y.catchLoc)return F(Y.catchLoc,!0);}else{if(!$)throw Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return F(Y.finallyLoc);}}}},abrupt:function(oe,Q){for(var F=this.tryEntries.length-1;0<=F;--F){var X=this.tryEntries[F];if(X.tryLoc<=this.prev&&s.call(X,"finallyLoc")&&this.prev<X.finallyLoc){var Y=X;break;}}var j=(Y=Y&&(oe==="break"||oe==="continue")&&Y.tryLoc<=Q&&Q<=Y.finallyLoc?null:Y)?Y.completion:{};return j.type=oe,j.arg=Q,Y?(this.method="next",this.next=Y.finallyLoc,G):this.complete(j);},complete:function(oe,Q){if(oe.type==="throw")throw oe.arg;return oe.type==="break"||oe.type==="continue"?this.next=oe.arg:oe.type==="return"?(this.rval=this.arg=oe.arg,this.method="return",this.next="end"):oe.type==="normal"&&Q&&(this.next=Q),G;},finish:function(oe){for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q];if(F.finallyLoc===oe)return this.complete(F.completion,F.afterLoc),ue(F),G;}},catch:function(oe){for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F,X,Y=this.tryEntries[Q];if(Y.tryLoc===oe)return(F=Y.completion).type==="throw"&&(X=F.arg,ue(Y)),X;}throw Error("illegal catch attempt");},delegateYield:function(oe,Q,F){return this.delegate={iterator:J(oe),resultName:Q,nextLoc:F},this.method==="next"&&(this.arg=d),G;}},m;}function x(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}var h=this&&this.__awaiter||function(d,m,a,s){return new(a=a||Promise)(function(l,g){function f(w){try{S(s.next(w));}catch(C){g(C);}}function v(w){try{S(s.throw(w));}catch(C){g(C);}}function S(w){var C;w.done?l(w.value):((C=w.value)instanceof a?C:new a(function(I){I(C);})).then(f,v);}S((s=s.apply(d,m||[])).next());});}
156,y=(Object.defineProperty(r,"__esModule",{value:!0}),c(108)),b=c(352),p=c(5),c=function(){function d(l){var g=this;if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this.isExistEqualSlide=function(f,v){function S(C){return C.reduce(function(I,O){return I.concat(O.Components);},[]).reduce(function(I,O){return(0,y.isMediaSource)(O)?I.concat("".concat(O.urlId?O.urlId+"#":"").concat(O.MediaURL())):I;},[]);}var w=S(f.Layers);return v.find(function(C){return I=w,O=S(C.Layers),I.reduce(function(M,N){return M&&O.includes(N);},!0);var I,O;});},this.diffLayers=function(f,v){var S,w=[];for(S in f.Layers){var C=v.Layers[S],C=b.deepDifferMapper.map(C?C.vDom:void 0,f.Layers[S]?f.Layers[S].vDom:void 0),I={layer:f.Layers[S],index:S,needsRender:!0};C&&C.hasOwnProperty("status")?I.needsRender=C.status:p.default.debug("Diff didn't has status key"),w.push(I);}return w;},this.assignChildrenElement=function(f,v,S){return h(g,void 0,void 0,E().mark(function w(){var C,I;return E().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:C=0;case 1:if(C<f.childNodes.length)return I=f.childNodes[C],v[C].setElement(I),this.setComponentVisibility(v[C]),O.next=7,v[C].reconstructWithRecycle(S[C]);O.next=14;break;case 7:if(0<v[C].innerComponents().length)return p.default.debug("Diving into recursive components"),O.next=11,this.assignChildrenElement(I,v[C].innerComponents(),S);O.next=11;break;case 11:C++,O.next=1;break;case 14:case"end":return O.stop();}},w,this);}));},this.stealAttachAssign=function(f,v,S){return h(g,void 0,void 0,E().mark(function w(){var C;return E().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return C=v.Layers[S.index].element,f.Element.appendChild(C),S.layer.element=C,this.setLayerVisibility(f,S.layer),C=v.Layers[S.index].Components,I.next=7,this.assignChildrenElement(S.layer.element,S.layer.Components,C);case 7:case"end":return I.stop();}},w,this);}));},this.replaceDOMStory=function(f){var v,S;if(f.stash)try{(S=(v=f.vdmHolder)==null?void 0:v.vdmSlidesDiv)!=null&&S.replaceChild(f.stash.stashedStory.element(),f.story.element());}catch(w){p.default.debug("Couldn't replace! ".concat(w));}},this.previewer=l;}return m=d,(a=[{key:"reconcile",value:function(l){var g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,f=2<arguments.length?arguments[2]:void 0;return h(this,void 0,void 0,E().mark(function v(){var S,w,C,I,O,M,N,G,H=this;return E().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:f=f===void 0?l.slides.length:f,S=this.previewer,w=l.slides,this.replaceDOMStory(S),O=I=C=0,M=function(z){return h(H,void 0,void 0,E().mark(function te(){var K,V,U;return E().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(C+=z.Layers.length,K=this.isExistEqualSlide(z,S.slidesBeforeRender))return Z.next=5,this.handleEqualSlide(z,K,S);Z.next=13;break;case 5:K=Z.sent,U=n(K,2),V=U[0],U=U[1],I+=V,O+=U,Z.next=17;break;case 13:return Z.t0=I,Z.next=16,this.handleNotEqualSlide(l,z);case 16:I=Z.t0+=Z.sent;
156case 17:z.applyStyle(z.Element);case 18:case"end":return Z.stop();}},te,this);}));},N=g;case 7:if(N<f&&N<w.length)return G=w[N],B.next=11,M(G);B.next=14;break;case 11:N++,B.next=7;break;case 14:p.default.debug("%c[".concat(this.constructor.name,"]: Total-layers:").concat(C," for ").concat(w.length," slides, total rendered after reconcile: ").concat(I,", total recycled: ").concat(O),["background: #222; color: #00ff00"]);case 15:case"end":return B.stop();}},v,this);}));}},{key:"handleEqualSlide",value:function(l,g,f){return h(this,void 0,void 0,E().mark(function v(){var S,w,C,I;return E().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:w=S=0,f.stash.stashedStory.element().appendChild(l.Element),C=this.diffLayers(l,g),C=function(M,N){var G,H=typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(!H){if(Array.isArray(M)||(H=o(M))||N&&M&&typeof M.length=="number")return H&&(M=H),G=0,{s:N=function(){},n:function(){return G>=M.length?{done:!0}:{done:!1,value:M[G++]};},e:function(K){throw K;},f:N};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 157In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var B,z=!0,te=!1;return{s:function(){H=H.call(M);},n:function(){var K=H.next();return z=K.done,K;},e:function(K){te=!0,B=K;},f:function(){try{z||H.return==null||H.return();}finally{if(te)throw B;}}};}(C),O.prev=4,C.s();case 6:if((I=C.n()).done){O.next=26;break;}if(I=I.value,O.prev=8,I.needsRender)return O.next=12,I.layer.renderHtml(l.Element);O.next=15;break;case 12:S++,O.next=18;break;case 15:return O.next=17,this.stealAttachAssign(l,f.slides[g.Index],I);case 17:w++;case 18:O.next=24;break;case 20:throw O.prev=20,O.t0=O.catch(8),p.default.debug("Exception: ".concat(O.t0)),new Error("Problem occurred while assigning/rendering layers");case 24:O.next=6;break;case 26:O.next=31;break;case 28:O.prev=28,O.t1=O.catch(4),C.e(O.t1);case 31:return O.prev=31,C.f(),O.finish(31);case 34:return l.reconstructWithRecycle(g),f.slidesBeforeRender=f.slidesBeforeRender.filter(function(M){return M.Index!==g.Index;}),O.abrupt("return",[S,w]);case 37:case"end":return O.stop();}},v,this,[[4,28,31,34],[8,20]]);}));}},{key:"handleNotEqualSlide",value:function(l,g){return h(this,void 0,void 0,E().mark(function f(){var v;return E().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(v=0,l)return p.default.debug("Equal slide didn't found"),S.next=5,g.render(l.stashedStory.element());S.next=8;break;case 5:v+=g.Layers.length,S.next=9;break;case 8:throw new Error("Stash is undefined");case 9:return S.abrupt("return",v);case 10:case"end":return S.stop();}},f);}));}},{key:"setLayerVisibility",value:function(l,g){g.element.style.visibility="hidden";}},{key:"setComponentVisibility",value:function(l){l.getElement().style.visibility="hidden";}}])&&x(m.prototype,a),s&&x(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();r.default=c;},function(i,r,e){"use strict";e.r(r),e.d(r,"gsap",function(){return Ut;}),e.d(r,"default",function(){return Ut;}),e.d(r,"CSSPlugin",function(){return Nt;}),e.d(r,"TweenMax",function(){return bi;}),e.d(r,"TweenLite",function(){return U.TweenLite;}),e.d(r,"TimelineMax",function(){return U.TimelineMax;}),e.d(r,"TimelineLite",function(){return U.TimelineLite;}),e.d(r,"Power0",function(){return U.Power0;}),e.d(r,"Power1",function(){return U.Power1;}),e.d(r,"Power2",function(){return U.Power2;}),e.d(r,"Power3",function(){return U.Power3;}),e.d(r,"Power4",function(){return U.Power4;}),e.d(r,"Linear",function(){return U.Linear;}),e.d(r,"Quad",function(){return U.Quad;}),e.d(r,"Cubic",function(){return U.Cubic;}),e.d(r,"Quart",function(){return U.Quart;}),e.d(r,"Quint",function(){return U.Quint;}),e.d(r,"Strong",function(){return U.Strong;}),e.d(r,"Elastic",function(){return U.Elastic;}),e.d(r,"Back",function(){return U.Back;}),e.d(r,"SteppedEase",function(){return U.SteppedEase;}),e.d(r,"Bounce",function(){return U.Bounce;}),e.d(r,"Sine",function(){return U.Sine;}),e.d(r,"Expo",function(){return U.Expo;}),e.d(r,"Circ",function(){return U.Circ;});function t(Ge,qe){return qe.set(qe.t,qe.p,Math.round(1e4*(qe.s+qe.c*Ge))/1e4+qe.u,qe);}function n(Ge,qe){return qe.set(qe.t,qe.p,Ge===1?qe.e:Math.round(1e4*(qe.s+qe.c*Ge))/1e4+qe.u,qe);}function o(Ge,qe){return qe.set(qe.t,qe.p,Ge?Math.round(1e4*(qe.s+qe.c*Ge))/1e4+qe.u:qe.b,qe);}function _(Ge,qe){Ge=qe.s+qe.c*Ge,qe.set(qe.t,qe.p,~~(Ge+(Ge<0?-.5:.5))+qe.u,qe);}function E(Ge,qe){return qe.set(qe.t,qe.p,Ge?qe.e:qe.b,qe);}function x(Ge,qe){return qe.set(qe.t,qe.p,Ge!==1?qe.b:qe.e,qe);}function h(Ge,qe,yt){return Ge.style[qe]=yt;}function y(Ge,qe,yt){return Ge.style.setProperty(qe,yt);}function b(Ge,qe,yt){return Ge._gsap[qe]=yt;}function p(Ge,qe,yt){return Ge._gsap.scaleX=Ge._gsap.scaleY=yt;}function c(Ge,qe,yt,bt,gt){(Ge=Ge._gsap).scaleX=Ge.scaleY=yt,Ge.renderTransform(gt,Ge);}function d(Ge,qe,yt,bt,gt){(Ge=Ge._gsap)[qe]=yt,Ge.renderTransform(gt,Ge);}function m(Ge,qe){var yt=this,bt=this.target,gt=bt.style,Ot=bt._gs
157ap;if(Ge in re&>){if(this.tfm=this.tfm||{},Ge==="transform")return X.transform.split(",").forEach(function(Mt){return m.call(yt,Mt,qe);});if(~(Ge=X[Ge]||Ge).indexOf(",")?Ge.split(",").forEach(function(Mt){return yt.tfm[Mt]=ae(bt,Mt);}):this.tfm[Ge]=Ot.x?Ot[Ge]:ae(bt,Ge),Ge===j&&(this.tfm.zOrigin=Ot.zOrigin),0<=this.props.indexOf(Y))return;Ot.svg&&(this.svgo=bt.getAttribute("data-svg-origin"),this.props.push(j,qe,"")),Ge=Y;}(gt||qe)&&this.props.push(Ge,qe,gt[Ge]);}function a(){for(var Ge,qe=this.props,yt=this.target,bt=yt.style,gt=yt._gsap,Ot=0;Ot<qe.length;Ot+=3)qe[Ot+1]?yt[qe[Ot]]=qe[Ot+2]:qe[Ot+2]?bt[qe[Ot]]=qe[Ot+2]:bt.removeProperty(qe[Ot].substr(0,2)==="--"?qe[Ot]:qe[Ot].replace(oe,"-$1").toLowerCase());if(this.tfm){for(Ge in this.tfm)gt[Ge]=this.tfm[Ge];gt.svg&&(gt.renderTransform(),yt.setAttribute("data-svg-origin",this.svgo||"")),(Ot=te())&&Ot.isStart||bt[Y]||(D(bt),gt.zOrigin&&bt[j]&&(bt[j]+=" "+gt.zOrigin+"px",gt.zOrigin=0,gt.renderTransform()),gt.uncache=1);}}function s(Ge,qe){var yt={target:Ge,props:[],revert:a,save:m};return Ge._gsap||U.gsap.core.getCache(Ge),qe&&qe.split(",").forEach(function(bt){return yt.save(bt);}),yt;}function l(){Z()&&window.document&&(M=window,N=M.document,G=N.documentElement,B=$("div")||{style:{}},$("div"),Y=se(Y),j=Y+"Origin",B.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",K=!!se("perspective"),te=U.gsap.core.reverting,H=1);}function g(Ge){var qe,yt=$("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),bt=this.parentNode,gt=this.nextSibling,Ot=this.style.cssText;if(G.appendChild(yt),yt.appendChild(this),this.style.display="block",Ge)try{qe=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=g;}catch{}else this._gsapBBox&&(qe=this._gsapBBox());return bt&&(gt?bt.insertBefore(this,gt):bt.appendChild(this)),G.removeChild(yt),this.style.cssText=Ot,qe;}function f(Ge,qe){for(var yt=qe.length;yt--;)if(Ge.hasAttribute(qe[yt]))return Ge.getAttribute(qe[yt]);}function v(Ge,qe,yt,bt){yt&&yt!=="none"||((gt=(Ot=se(qe,Ge,1))&&ne(Ge,Ot,1))&>!==yt?(qe=Ot,yt=gt):qe==="borderColor"&&(yt=ne(Ge,"borderTopColor")));var gt,Ot,Mt,Lt,Kt,Dt,tn,si,ci,gi,Oi=new U.PropTween(this._pt,Ge.style,qe,0,1,U._renderComplexString),Pi=0,Fi=0;if(Oi.b=yt,Oi.e=bt,yt+="",(bt+="")=="auto"&&(Dt=Ge.style[qe],Ge.style[qe]=bt,bt=ne(Ge,qe)||bt,Dt?Ge.style[qe]=Dt:he(Ge,qe)),Ot=[yt,bt],Object(U._colorStringFilter)(Ot),bt=Ot[1],Mt=(yt=Ot[0]).match(U._numWithUnitExp)||[],(bt.match(U._numWithUnitExp)||[]).length){for(;si=U._numWithUnitExp.exec(bt);)ci=si[0],si=bt.substring(Pi,si.index),Kt?Kt=(Kt+1)%5:si.substr(-5)!=="rgba("&&si.substr(-5)!=="hsla("||(Kt=1),ci!==(Dt=Mt[Fi++]||"")&&(Lt=parseFloat(Dt)||0,gi=Dt.substr((Lt+"").length),ci.charAt(1)==="="&&(ci=Object(U._parseRelative)(Lt,ci)+gi),tn=p
157arseFloat(ci),ci=ci.substr((tn+"").length),Pi=U._numWithUnitExp.lastIndex-ci.length,ci||(ci=ci||U._config.units[qe]||gi,Pi===bt.length&&(bt+=ci,Oi.e+=ci)),gi!==ci&&(Lt=W(Ge,qe,Dt,ci)||0),Oi._pt={_next:Oi._pt,p:si||Fi===1?si:",",s:Lt,c:tn-Lt,m:Kt&&Kt<4||qe==="zIndex"?Math.round:0});Oi.c=Pi<bt.length?bt.substring(Pi,bt.length):"";}else Oi.r=qe==="display"&&bt==="none"?x:E;return U._relExp.test(bt)&&(Oi.e=0),this._pt=Oi;}function S(Ge,qe){if(qe.tween&&qe.tween._time===qe.tween._dur){var yt,bt,gt,Ot=qe.t,Mt=Ot.style,Lt=qe.u,qe=Ot._gsap;if(Lt==="all"||Lt===!0)Mt.cssText="",bt=1;else for(gt=(Lt=Lt.split(",")).length;-1<--gt;)yt=Lt[gt],re[yt]&&(bt=1,yt=yt==="transformOrigin"?j:Y),he(Ot,yt);bt&&(he(Ot,Y),qe&&(qe.svg&&Ot.removeAttribute("transform"),nt(Ot,1),qe.uncache=1,D(Mt)));}}function w(Ge){return Ge==="matrix(1, 0, 0, 1, 0, 0)"||Ge==="none"||!Ge;}function C(Ge,qe,yt,bt,Kt,Ot){var Mt,Lt=Ge._gsap,Kt=Kt||Be(Ge,!0),Dt=Lt.xOrigin||0,tn=Lt.yOrigin||0,si=Lt.xOffset||0,ci=Lt.yOffset||0,gi=Kt[0],Oi=Kt[1],Pi=Kt[2],Fi=Kt[3],wn=Kt[4],ln=Kt[5],ji=qe.split(" "),Ii=parseFloat(ji[0])||0,Ui=parseFloat(ji[1])||0;yt?Kt!==Se&&(Kt=gi*Fi-Oi*Pi)&&(Mt=Ii*(-Oi/Kt)+Ui*(gi/Kt)-(gi*ln-Oi*wn)/Kt,Ii=Ii*(Fi/Kt)+Ui*(-Pi/Kt)+(Pi*ln-Fi*wn)/Kt,Ui=Mt):(Ii=(Kt=fe(Ge)).x+(~ji[0].indexOf("%")?Ii/100*Kt.width:Ii),Ui=Kt.y+(~(ji[1]||ji[0]).indexOf("%")?Ui/100*Kt.height:Ui)),bt||bt!==!1&&Lt.smooth?(Lt.xOffset=si+((wn=Ii-Dt)*gi+(ln=Ui-tn)*Pi)-wn,Lt.yOffset=ci+(wn*Oi+ln*Fi)-ln):Lt.xOffset=Lt.yOffset=0,Lt.xOrigin=Ii,Lt.yOrigin=Ui,Lt.smooth=!!bt,Lt.origin=qe,Lt.originIsAbsolute=!!yt,Ge.style[j]="0px 0px",Ot&&(_e(Ot,Lt,"xOrigin",Dt,Ii),_e(Ot,Lt,"yOrigin",tn,Ui),_e(Ot,Lt,"xOffset",si,Lt.xOffset),_e(Ot,Lt,"yOffset",ci,Lt.yOffset)),Ge.setAttribute("data-svg-origin",Ii+" "+Ui);}function I(Ge,qe,yt){var bt=Object(U.getUnit)(qe);return Object(U._round)(parseFloat(qe)+parseFloat(W(Ge,"x",yt+"px",bt)))+bt;}function O(Ge,qe){for(var yt in qe)Ge[yt]=qe[yt];return Ge;}var M,N,G,H,B,z,te,K,V,U=e(2),Z=function(){return typeof window<"u";},re={},ue=180/Math.PI,q=Math.PI/180,J=Math.atan2,oe=/([A-Z])/g,Q=/(left|right|width|margin|padding|x)/i,F=/[\s,\(]\S/,X={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Y="transform",j=Y+"Origin",D=function(Ge){Ge.translate&&(Ge.removeProperty("translate"),Ge.removeProperty("scale"),Ge.removeProperty("rotate"));},$=function(Ge,qe){return qe=N.createElementNS?N.createElementNS((qe||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),Ge):N.createElement(Ge),qe&&qe.style?qe:N.createElement(Ge);},ne=function Ge(qe,yt,bt){var gt=getComputedStyle(qe);return gt[yt]||gt.getPropertyValue(yt.replace(oe,"-$1").toLowerCase())||gt.getPropertyValue(yt)||!bt&&Ge(qe,se(yt)||yt,1)||"";},le="O,Moz,ms,Ms,Webkit".split(","),se=function(Ge,qe,yt){var bt=(qe||B).style,gt=5;if(Ge in bt&&!yt)return Ge;for(Ge=Ge.charAt(0).toUpperCase()+Ge.substr(1);gt--&&!(le[gt]+Ge in bt););return gt<0?null:(gt===3?"ms":0<=gt?le[gt]:"")+Ge;},fe=function(Ge){var qe;try{qe=Ge.getBBox();}catch{qe=g.call(Ge,!0);}return!(qe=qe&&(qe.width||qe.height)||Ge.getBBox===g?qe:g.call(Ge,!0))||qe.width||qe.x||qe.y?qe:{x:+f(Ge,["x","cx","x1"])||0,y:+f(Ge,["y","cy","y1"])||0,width:0,height:0};},ge=function(Ge){return!(!Ge.getCTM||Ge.parentNode&&!Ge.ownerSVGElement||!fe(Ge));},he=function(Ge,qe){var yt;qe&&(Ge=Ge.style,qe in re&&qe!==j&&(qe=Y),Ge.removeProperty?((yt=qe.substr(0,2))!=="ms"&&qe.substr(0,6)!=="webkit"||(qe="-"+qe),Ge.removeProperty(yt==="--"?qe:qe.replace(oe,"-$1").toLowerCase())):Ge.removeAttribute(qe));},_e=function(Ge,qe,yt,bt,gt,Ot){return qe=new U.PropTween(Ge._pt,qe,yt,0,1,Ot?x:E),(Ge._pt=qe).b=bt,qe.e=gt,Ge._props.push(yt),qe;},Re={deg:1,rad:1,turn:1},ee={grid:1,flex:1},W=function Ge(qe,yt,bt,gt){var Ot,Mt,Lt=parseFloat(bt)||0,Kt=(bt+"").trim().substr((Lt+"").length)||"px",Dt=B.style,tn=Q.test(yt),si=qe.tagName.toLowerCase()==="svg",ci=(si?"client":"offset")+(tn?"Width":"Height"),gi=gt==="px",Oi=gt==="%";return gt===Kt||!Lt||Re[gt]||Re[Kt]?Lt:(Kt==="px"||gi||(Lt=Ge(qe,yt,bt,"px")),bt=qe.getCTM&&ge(qe),!Oi&&Kt!=="%"||!re[yt]&&!~yt.indexOf("adius")?(Dt[tn?"width":"height"]=100+(gi?Kt:gt),si=~yt.indexOf("adius")||gt==="em"&&qe.appendChild&&!si?qe:qe.parentNode,(Mt=(si=(si=bt?(qe.ownerSVGElement||{}).parentNode:si)&&si!==N&&si.appendChild?si:N.body)._gsap)&&Oi&&Mt.width&&tn&&Mt.time===U._ticker.time&&!Mt.uncache?Object(U._roun
157d)(Lt/Mt.width*100):(!Oi||yt!=="height"&&yt!=="width"?(!Oi&&Kt!=="%"||ee[ne(si,"display")]||(Dt.position=ne(qe,"position")),si===qe&&(Dt.position="static"),si.appendChild(B),Ot=B[ci],si.removeChild(B),Dt.position="absolute"):(Kt=qe.style[yt],qe.style[yt]=100+gt,Ot=qe[ci],Kt?qe.style[yt]=Kt:he(qe,yt)),tn&&Oi&&((Mt=Object(U._getCache)(si)).time=U._ticker.time,Mt.width=si[ci]),Object(U._round)(gi?Ot*Lt/100:Ot&&Lt?100/Ot*Lt:0))):(Ot=bt?qe.getBBox()[tn?"width":"height"]:qe[ci],Object(U._round)(Oi?Lt/Ot*100:Lt/100*Ot)));},ae=function(Ge,qe,yt,bt){var gt;return H||l(),qe in X&&qe!=="transform"&&~(qe=X[qe]).indexOf(",")&&(qe=qe.split(",")[0]),re[qe]&&qe!=="transform"?(gt=nt(Ge,bt),gt=qe!=="transformOrigin"?gt[qe]:gt.svg?gt.origin:it(ne(Ge,j))+" "+gt.zOrigin+"px"):(gt=Ge.style[qe])&>!=="auto"&&!bt&&!~(gt+"").indexOf("calc(")||(gt=ye[qe]&&ye[qe](Ge,qe,yt)||ne(Ge,qe)||Object(U._getProperty)(Ge,qe)||(qe==="opacity"?1:0)),yt&&!~(gt+"").trim().indexOf(" ")?W(Ge,qe,gt,yt)+yt:gt;},de={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ye={clearProps:function(Ge,qe,yt,bt,gt){if(gt.data!=="isFromStart")return(qe=Ge._pt=new U.PropTween(Ge._pt,qe,yt,0,0,S)).u=bt,qe.pr=-10,qe.tween=gt,Ge._props.push(yt),1;}},Se=[1,0,0,1,0,0],De={},Ue=function(Ge){return Ge=ne(Ge,Y),w(Ge)?Se:Ge.substr(7).match(U._numExp).map(U._round);},Be=function(Ge,qe){var yt,bt,gt,Ot=Ge._gsap||Object(U._getCache)(Ge),Mt=Ge.style,Lt=Ue(Ge);return Ot.svg&&Ge.getAttribute("transform")?(Lt=[(bt=Ge.transform.baseVal.consolidate().matrix).a,bt.b,bt.c,bt.d,bt.e,bt.f]).join(",")==="1,0,0,1,0,0"?Se:Lt:(Lt!==Se||Ge.offsetParent||Ge===G||Ot.svg||(bt=Mt.display,Mt.display="block",(Ot=Ge.parentNode)&&Ge.offsetParent||(gt=1,yt=Ge.nextElementSibling,G.appendChild(Ge)),Lt=Ue(Ge),bt?Mt.display=bt:he(Ge,"display"),gt&&(yt?Ot.insertBefore(Ge,yt):Ot?Ot.appendChild(Ge):G.removeChild(Ge))),qe&&6<Lt.length?[Lt[0],Lt[1],Lt[4],Lt[5],Lt[12],Lt[13]]:Lt);},nt=function(Ge,qe){var yt,bt,gt,Ot,Mt,Lt,Kt,Dt,tn,si,ci,gi,Oi,Pi,Fi,wn,ln,ji,Ii,Ui,nn,un,Pn,$n,or,Wr,wr,kr,pn,yn,hr,xi=Ge._gsap||new U.GSCache(Ge);return"x"in xi&&!qe&&!xi.uncache||(yt=Ge.style,bt=xi.scaleX<0,gi=getComputedStyle(Ge),gt=ne(Ge,j)||"0",yn=Ot=Mt=Kt=Dt=tn=si=ci=0,hr=Lt=1,xi.svg=!(!Ge.getCTM||!ge(Ge)),gi.translate&&(gi.translate==="none"&&gi.scale==="none"&&gi.rotate==="none"||(yt[Y]=(gi.translate!=="none"?"translate3d("+(gi.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(gi.rotate!=="none"?"rotate("+gi.rotate+") ":"")+(gi.scale!=="none"?"scale("+gi.scale.split(" ").join(",")+") ":"")+(gi[Y]!=="none"?gi[Y]:"")),yt.scale=yt.rotate=yt.translate="none"),gi=Be(Ge,xi.svg),xi.svg&&(nn=xi.uncache?(un=Ge.getBBox(),gt=xi.xOrigin-un.x+"px "+(xi.yOrigin-un.y)+"px",""):!qe&&Ge.getAttribute("data-svg-origin"),C(Ge,nn||gt,!!nn||xi.originIsAbsolute,xi.smooth!==!1,gi)),pn=xi.xOrigin||0,wr=xi.yOrigin||0,gi!==Se&&(Fi=gi[0],wn=gi[1],ln=gi[2],ji=gi[3],yn=Ii=gi[4],Ot=Ui=gi[5],gi.length===6?(hr=Math.sqrt(Fi*Fi+wn*wn),Lt=Math.sqrt(ji*ji+ln*ln),Kt=Fi||wn?J(wn,Fi)*ue:0,(si=ln||ji?J(ln,ji)*ue+Kt:0)&&(Lt*=Math.abs(Math.cos(si*q))),xi.svg&&(yn-=pn-(pn*Fi+wr*ln),Ot-=wr-(pn*wn+wr*ji))):(pn=gi[6],wr=gi[7],$n=gi[8],or=gi[9],Wr=gi[10],kr=gi[11],yn=gi[12],Ot=gi[13],Mt=gi[14],Dt=(gi=J(pn,Wr))*ue,gi&&
157(nn=Ii*(Oi=Math.cos(-gi))+$n*(Pi=Math.sin(-gi)),un=Ui*Oi+or*Pi,Pn=pn*Oi+Wr*Pi,$n=Ii*-Pi+$n*Oi,or=Ui*-Pi+or*Oi,Wr=pn*-Pi+Wr*Oi,kr=wr*-Pi+kr*Oi,Ii=nn,Ui=un,pn=Pn),tn=(gi=J(-ln,Wr))*ue,gi&&(Oi=Math.cos(-gi),kr=ji*(Pi=Math.sin(-gi))+kr*Oi,Fi=nn=Fi*Oi-$n*Pi,wn=un=wn*Oi-or*Pi,ln=Pn=ln*Oi-Wr*Pi),Kt=(gi=J(wn,Fi))*ue,gi&&(nn=Fi*(Oi=Math.cos(gi))+wn*(Pi=Math.sin(gi)),un=Ii*Oi+Ui*Pi,wn=wn*Oi-Fi*Pi,Ui=Ui*Oi-Ii*Pi,Fi=nn,Ii=un),Dt&&359.9<Math.abs(Dt)+Math.abs(Kt)&&(Dt=Kt=0,tn=180-tn),hr=Object(U._round)(Math.sqrt(Fi*Fi+wn*wn+ln*ln)),Lt=Object(U._round)(Math.sqrt(Ui*Ui+pn*pn)),gi=J(Ii,Ui),si=2e-4<Math.abs(gi)?gi*ue:0,ci=kr?1/(kr<0?-kr:kr):0),xi.svg&&(nn=Ge.getAttribute("transform"),xi.forceCSS=Ge.setAttribute("transform","")||!w(ne(Ge,Y)),nn&&Ge.setAttribute("transform",nn))),90<Math.abs(si)&&Math.abs(si)<270&&(bt?(hr*=-1,si+=Kt<=0?180:-180,Kt+=Kt<=0?180:-180):(Lt*=-1,si+=si<=0?180:-180)),qe=qe||xi.uncache,xi.x=yn-((xi.xPercent=yn&&(!qe&&xi.xPercent||(Math.round(Ge.offsetWidth/2)===Math.round(-yn)?-50:0)))?Ge.offsetWidth*xi.xPercent/100:0)+"px",xi.y=Ot-((xi.yPercent=Ot&&(!qe&&xi.yPercent||(Math.round(Ge.offsetHeight/2)===Math.round(-Ot)?-50:0)))?Ge.offsetHeight*xi.yPercent/100:0)+"px",xi.z=Mt+"px",xi.scaleX=Object(U._round)(hr),xi.scaleY=Object(U._round)(Lt),xi.rotation=Object(U._round)(Kt)+"deg",xi.rotationX=Object(U._round)(Dt)+"deg",xi.rotationY=Object(U._round)(tn)+"deg",xi.skewX=si+"deg",xi.skewY="0deg",xi.transformPerspective=ci+"px",(xi.zOrigin=parseFloat(gt.split(" ")[2])||!qe&&xi.zOrigin||0)&&(yt[j]=it(gt)),xi.xOffset=xi.yOffset=0,xi.force3D=U._config.force3D,xi.renderTransform=xi.svg?At:K?Et:ot,xi.uncache=0),xi;},it=function(Ge){return(Ge=Ge.split(" "))[0]+" "+Ge[1];},ot=function(Ge,qe){qe.z="0px",qe.rotationY=qe.rotationX="0deg",qe.force3D=0,Et(Ge,qe);},ht="0deg",Et=function(nn,Ii){var yt,bt,gt,Ii=Ii||this,Ot=Ii.xPercent,Mt=Ii.yPercent,Lt=Ii.x,Kt=Ii.y,Dt=Ii.z,tn=Ii.rotation,si=Ii.rotationY,ci=Ii.rotationX,gi=Ii.skewX,Oi=Ii.skewY,Pi=Ii.scaleX,Fi=Ii.scaleY,wn=Ii.transformPerspective,ln=Ii.force3D,ji=Ii.target,Ii=Ii.zOrigin,Ui="",nn=ln==="auto"&&nn&&nn!==1||ln===!0;!Ii||ci===ht&&si===ht||(ln=parseFloat(si)*q,yt=Math.sin(ln),bt=Math.cos(ln),ln=parseFloat(ci)*q,gt=Math.cos(ln),Lt=I(ji,Lt,yt*gt*-Ii),Kt=I(ji,Kt,-Math.sin(ln)*-Ii),Dt=I(ji,Dt,bt*gt*-Ii+Ii)),wn!=="0px"&&(Ui+="perspective("+wn+") "),(Ot||Mt)&&(Ui+="translate("+Ot+"%, "+Mt+"%) "),!nn&&Lt==="0px"&&Kt==="0px"&&Dt==="0px"||(Ui+=Dt!=="0px"||nn?"translate3d("+Lt+", "+Kt+", "+Dt+") ":"translate("+Lt+", "+Kt+") "),tn!==ht&&(Ui+="rotate("+tn+") "),si!==ht&&(Ui+="rotateY("+si+") "),ci!==ht&&(Ui+="rotateX("+ci+") "),gi===ht&&Oi===ht||(Ui+="skew("+gi+", "+Oi+") "),Pi===1&&Fi===1||(Ui+="scale("+Pi+", "+Fi+") "),ji.style[Y]=Ui||"translate(0, 0)";},At=function(Ge,ji){var yt,bt,gt,Ot,Mt,ji=ji||this,Lt=ji.xPercent,Kt=ji.yPercent,Dt=ji.x,tn=ji.y,nn=ji.rotation,un=ji.skewX,si=ji.skewY,ci=ji.scaleX,gi=ji.scaleY,Oi=ji.target,Pi=ji.xOrigin,Fi=ji.yOrigin,wn=ji.xOffset,ln=ji.yOffset,ji=ji.forceCSS,Ii=parseFloat(Dt),Ui=parseFloat(tn),nn=parseFloat(nn),un=parseFloat(un);(si=parseFloat(si))&&(un+=si=parseFloat(si),nn+=si),nn||un?(nn*=q,un*=q,yt=Math.cos(nn)*ci,bt=Math.sin(nn)*ci,gt=Math.sin(nn-un)*-gi,Ot=Math.cos(nn-un)*gi,un&&(si*=q,Mt=Math.tan(un-si),gt*=Mt=Math.sqrt(1+Mt*Mt),Ot*=Mt,si&&(Mt=Math.tan(si),yt*=Mt=Math.sqrt(1+Mt*Mt),bt*=Mt)),yt=Object(U._round)(yt),bt=Object(U._round)(bt),gt=Object(U._round)(gt),Ot=Object(U._round)(Ot)):(yt=ci,Ot=gi,bt=gt=0),(Ii&&!~(Dt+"").indexOf("px")||Ui&&!~(tn+"").indexOf("px"))&&(Ii=W(Oi,"x",Dt,"px"),Ui=W(Oi,"y",tn,"px")),(Pi||Fi||wn||ln)&&(Ii=Object(U._round)(Ii+Pi-(Pi*yt+Fi*gt)+wn),Ui=Object(U._round)(Ui+Fi-(Pi*bt+Fi*Ot)+ln)),(Lt||Kt)&&(Mt=Oi.getBBox(),Ii=Object(U._round)(Ii+Lt/100*Mt.width),Ui=Object(U._round)(Ui+Kt/100*Mt.height)),Oi.setAttribute("transform",Mt="matrix("+yt+","+bt+","+gt+","+Ot+","+Ii+","+Ui+")"),ji&&(Oi.style[Y]=Mt);},Nt=(Object(U._forEachName)("padding,margin,Width,Radius",function(Ge,qe){var yt="Bottom",bt=(qe<3?["Top","Right",yt,"Left"]:["TopLeft","TopRight",yt+"Right",yt+"Left"]).map(function(gt){return qe<2?Ge+gt:"border"+gt+Ge;});ye[1<qe?"border"+Ge:Ge]=function(gt,Ot,Mt,Lt,Kt){var Dt,tn;if(arguments.length<4)return Dt=bt.map(function(si){return ae(gt,si,Mt);}),(tn=Dt.join(" ")).split(Dt[0]).length===5?Dt[0]:tn;Dt=(Lt+"").split(" "),tn={},bt.forEach(function(si,ci){return tn[si]=Dt[ci]=Dt[ci]||Dt[(ci-1)/2|0];}),gt.init(Ot,tn,Kt);};}),{name:"css",register:l,targetTest:function(Ge){return Ge.style&&Ge.nodeType;},init:function(Ge,qe,yt,bt,gt){var Ot,Mt,Lt,Kt,Dt,tn,si,ci,gi,Oi,Pi,Fi,wn,ln,ji,Ii,Ui,nn,un,Pn,$n=this._props,or=Ge.style,Wr=yt.vars.startAt;for(Dt in H||l(),this.styles=this.styles||s(Ge),ln=this.styles.props,this.tween=yt,qe)if(Dt!=="autoRound"&&(Mt=qe[Dt],!U._plugins[Dt]||!Object(U._checkPlugin)(Dt,qe,yt,bt,Ge,gt))){if(ci=typeof Mt,Kt=ye[Dt],(ci=ci==="function"?typeof(Mt=Mt.call(yt,bt,Ge,gt)):ci)==="str
157ing"&&~Mt.indexOf("random(")&&(Mt=Object(U._replaceRandom)(Mt)),Kt)Kt(this,Ge,Dt,Mt,yt)&&(wn=1);else if(Dt.substr(0,2)==="--")Ot=(getComputedStyle(Ge).getPropertyValue(Dt)+"").trim(),Mt+="",U._colorExp.lastIndex=0,U._colorExp.test(Ot)||(tn=Object(U.getUnit)(Ot),si=Object(U.getUnit)(Mt)),si?tn!==si&&(Ot=W(Ge,Dt,Ot,si)+si):tn&&(Mt+=tn),this.add(or,"setProperty",Ot,Mt,bt,gt,0,0,Dt),$n.push(Dt),ln.push(Dt,0,or[Dt]);else if(ci!=="undefined"){if(Wr&&Dt in Wr?(Ot=typeof Wr[Dt]=="function"?Wr[Dt].call(yt,bt,Ge,gt):Wr[Dt],Object(U._isString)(Ot)&&~Ot.indexOf("random(")&&(Ot=Object(U._replaceRandom)(Ot)),Object(U.getUnit)(Ot+"")||Ot==="auto"||(Ot+=U._config.units[Dt]||Object(U.getUnit)(ae(Ge,Dt))||""),(Ot+"").charAt(1)==="="&&(Ot=ae(Ge,Dt))):Ot=ae(Ge,Dt),Kt=parseFloat(Ot),(ci=ci==="string"&&Mt.charAt(1)==="="&&Mt.substr(0,2))&&(Mt=Mt.substr(2)),Lt=parseFloat(Mt),Dt in X&&(Dt==="autoAlpha"&&(Kt===1&&ae(Ge,"visibility")==="hidden"&&Lt&&(Kt=0),ln.push("visibility",0,or.visibility),_e(this,or,"visibility",Kt?"inherit":"hidden",Lt?"inherit":"hidden",!Lt)),Dt!=="scale"&&Dt!=="transform"&&~(Dt=X[Dt]).indexOf(",")&&(Dt=Dt.split(",")[0])),gi=Dt in re){if(this.styles.save(Dt),Oi||((Pi=Ge._gsap).renderTransform&&!qe.parseTransform||nt(Ge,qe.parseTransform),Fi=qe.smoothOrigin!==!1&&Pi.smooth,(Oi=this._pt=new U.PropTween(this._pt,or,Y,0,1,Pi.renderTransform,Pi,0,-1)).dep=1),Dt==="scale")this._pt=new U.PropTween(this._pt,Pi,"scaleY",Pi.scaleY,(ci?Object(U._parseRelative)(Pi.scaleY,ci+Lt):Lt)-Pi.scaleY||0,t),this._pt.u=0,$n.push("scaleY",Dt),Dt+="X";else{if(Dt==="transformOrigin"){ln.push(j,0,or[j]),Pn=un=nn=void 0,nn=(Ui=Mt).split(" "),un=nn[0],Pn=nn[1]||"50%",un!=="top"&&un!=="bottom"&&Pn!=="left"&&Pn!=="right"||(Ui=un,un=Pn,Pn=Ui),nn[0]=de[un]||un,nn[1]=de[Pn]||Pn,Mt=nn.join(" "),Pi.svg?C(Ge,Mt,0,Fi,0,this):((si=parseFloat(Mt.split(" ")[2])||0)!==Pi.zOrigin&&_e(this,Pi,"zOrigin",Pi.zOrigin,si),_e(this,or,Dt,it(Ot),it(Mt)));continue;}if(Dt==="svgOrigin"){C(Ge,Mt,1,Fi,0,this);continue;}if(Dt in De){Ui=this,un=Pi,Pn=Dt,nn=Kt,ji=ci?Object(U._parseRelative)(Kt,ci+Mt):Mt,Ii=Un=Er=void 0,Er=Object(U._isString)(ji),Un=parseFloat(ji)*(Er&&~ji.indexOf("rad")?ue:1)-nn,Ii=nn+Un+"deg",Er&&((Er=ji.split("_")[1])==="short"&&(Un%=360)!==Un%180&&(Un+=Un<0?360:-360),Er==="cw"&&Un<0?Un=(Un+36e9)%360-360*~~(Un/360):Er==="ccw"&&0<Un&&(Un=(Un-36e9)%360-360*~~(Un/360))),Ui._pt=ji=new U.PropTween(Ui._pt,un,Pn,nn,Un,n),ji.e=Ii,ji.u="deg",Ui._props.push(Pn);continue;}if(Dt==="smoothOrigin"){_e(this,Pi,"smooth",Pi.smooth,Mt);continue;}if(Dt==="force3D"){Pi[Dt]=Mt;continue;}if(Dt==="transform"){xi=hr=yn=hr=pn=kr=wr=Er=pr=void 0;var wr,kr,pn,yn,hr,xi,Pa=this,Un=Mt,ho=Ge,pr=O({},ho._gsap),Er=ho.style;for(kr in pr.svg?(pn=ho.getAttribute("transform"),ho.setAttribute("transform",""),Er[Y]=Un,wr=nt(ho,1),he(ho,Y),ho.setAttribute("transform",pn)):(pn=getComputedStyle(ho)[Y],Er[Y]=Un,wr=nt(ho,1),Er[Y]=pn),re)(pn=pr[kr])!==(hr=wr[kr])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(kr)<0&&(yn=Object(U.getUnit)(pn)!==(xi=Object(U.getUnit)(hr))?W(ho,kr,pn,xi):parseFloat(pn),hr=parseFloat(hr),Pa._pt=new U.PropTween(Pa._pt,wr,kr,yn,hr-yn,t),Pa._pt.u=xi||0,Pa._props.push(kr));O(wr,pr);continue;}}}else Dt in or||(Dt=se(Dt)||Dt);if(gi||(Lt||Lt===0)&&(Kt||Kt===0)&&!F.test(Mt)&&Dt in or)Lt=Lt||0,(tn=(Ot+"").substr((Kt+"").length))!==(si=Object(U.getUnit)(Mt)||(Dt in U._config.units?U._config.units[Dt]:tn))&&(Kt=W(Ge,Dt,Ot,si)),this._pt=new U.PropTween(this._pt,gi?Pi:or,Dt,Kt,(ci?Object(U._parseRelative)(Kt,ci+Lt):Lt)-Kt,gi||si!=="px"&&Dt!=="zIndex"||qe.autoRound===!1?t:_),this._pt.u=si||0,tn!==si&&si!=="%"&&(this._pt.b=Ot,this._pt.r=o);else if(Dt in or)v.call(this,Ge,Dt,Ot,ci?ci+Mt:Mt);else if(Dt in Ge)this.add(Ge,Dt,Ot||Ge[Dt],ci?ci+Mt:Mt,bt,gt);else if(Dt!=="parseTransform"){Object(U._missingPlugin)(Dt,Mt);continue;}gi||(Dt in or?ln.push(Dt,0,or[Dt]):ln.push(Dt,1,Ot||Ge[Dt])),$n.push(Dt);}}wn&&Object(U._sortPropTweensByPriority)(this);},render:function(Ge,qe){if(qe.tween._time||!te())for(var yt=qe._pt;yt;)yt.r(Ge,yt.d),yt=yt._next;else qe.styles.revert();},get:ae,aliases:X,getSetter:function(Ge,qe,yt){var bt=X[qe];return(qe=bt&&bt.indexOf(",")<0?bt:qe)in re&&qe!==j&&(Ge._gsap.x||ae(Ge,"x"))?yt&&z===yt?qe==="scale"?p:b:(z=yt||{})&&(qe==="scale"?c:d):Ge.style&&!Object(U._isUndefined)(Ge.style[qe])?h:~qe.indexOf("-")?y:Object(U._getSetter)(Ge,qe);},core:{_removeProperty:he,_getMatrix:Be}}
157),Ut=(U.gsap.utils.checkPrefix=se,U.gsap.core.getStyleSaver=s,r="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",e="rotation,rotationX,rotationY,skewX,skewY",V=Object(U._forEachName)(r+","+e+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(Ge){re[Ge]=1;}),Object(U._forEachName)(e,function(Ge){U._config.units[Ge]="deg",De[Ge]=1;}),X[V[13]]=r+","+e,Object(U._forEachName)("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(Ge){Ge=Ge.split(":"),X[Ge[1]]=V[Ge[0]];}),Object(U._forEachName)("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(Ge){U._config.units[Ge]="px";}),U.gsap.registerPlugin(Nt),U.gsap.registerPlugin(Nt)||U.gsap),bi=Ut.core.Tween;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(){n=function(){return a;};var m,a={},s=Object.prototype,l=s.hasOwnProperty,g=Object.defineProperty||function(Q,F,X){Q[F]=X.value;},K=typeof Symbol=="function"?Symbol:{},f=K.iterator||"@@iterator",v=K.asyncIterator||"@@asyncIterator",S=K.toStringTag||"@@toStringTag";function w(Q,F,X){return Object.defineProperty(Q,F,{value:X,enumerable:!0,configurable:!0,writable:!0}),Q[F];}try{w({},"");}catch{w=function(F,X,Y){return F[X]=Y;};}function C(Q,le,X,se){var j,D,$,ne,le=le&&le.prototype instanceof B?le:B,le=Object.create(le.prototype),se=new J(se||[]);return g(le,"_invoke",{value:(j=Q,D=X,$=se,ne=O,function(fe,ge){if(ne===N)throw Error("Generator is already running");if(ne===G){if(fe==="throw")throw ge;return{value:m,done:!0};}for($.method=fe,$.arg=ge;;){var he=$.delegate;if(he&&(he=function _e(Re,ee){var W=ee.method,ae=Re.iterator[W];return ae===m?(ee.delegate=null,W==="throw"&&Re.iterator.return&&(ee.method="return",ee.arg=m,_e(Re,ee),ee.method==="throw")||W!=="return"&&(ee.method="throw",ee.arg=new TypeError("The iterator does not provide a '"+W+"' method")),H):(W=I(ae,Re.iterator,ee.arg),W.type==="throw"?(ee.method="throw",ee.arg=W.arg,ee.delegate=null,H):(ae=W.arg,ae?ae.done?(ee[Re.resultName]=ae.value,ee.next=Re.nextLoc,ee.method!=="return"&&(ee.method="next",ee.arg=m),ee.delegate=null,H):ae:(ee.method="throw",ee.arg=new TypeError("iterator result is not an object"),ee.delegate=null,H)));}(he,$),he)){if(he===H)continue;return he;}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(ne===O)throw ne=G,$.arg;$.dispatchException($.arg);}else $.method==="return"&&$.abrupt("return",$.arg);if(ne=N,he=I(j,D,$),he.type==="normal"){if(ne=$.done?G:M,he.arg===H)continue;return{value:he.arg,done:$.done};}he.type==="throw"&&(ne=G,$.method="throw",$.arg=he.arg);}})}),le;}function I(Q,F,X){try{return{type:"normal",arg:Q.call(F,X)};}catch(Y){return{type:"throw",arg:Y};}}a.wrap=C;var O="suspendedStart",M="suspendedYield",N="executing",G="completed",H={};function B(){}function z(){}function te(){}var K={},V=(w(K,f,function(){return this;}),Object.getPrototypeOf),V=V&&V(V(oe([]))),U=(V&&V!==s&&l.call(V,f)&&(K=V),te.prototype=B.prototype=Object.create(K));function Z(Q){["next","throw","return"].forEach(function(F){w(Q,F,function(X){return this._invoke(F,X);});});}function re(Q,F){var X;g(this,"_invoke",{value:function(Y,j){function D(){return new F(function($,ne){(function le(Re,fe,ge,he){var _e,Re=I(Q[Re],Q,fe);if(Re.type!=="throw")return(fe=(_e=Re.arg).value)&&t(fe)=="object"&&l.call(fe,"__await")?F.resolve(fe.__await).then(function(ee){le("next",ee,ge,he);},function(ee){le("throw",ee,ge,he);}):F.resolve(fe).then(function(ee){_e.value=ee,ge(_e);},function(ee){return le("throw",ee,ge,he);});he(Re.arg);})(Y,j,$,ne);});}return X=X?X.then(D,D):D();}});}function ue(Q){var F={tryLoc:Q[0]};1 in Q&&(F.catchLoc=Q[1]),2 in Q&&(F.finallyLoc=Q[2],F.afterLoc=Q[3]),this.tryEntries.push(F);}function q(Q){var F=Q.completion||{};F.type="normal",delete F.arg,Q.completion=F;}function J(Q){this.tryEntries=[{tryLoc:"root"}],Q.forEach(ue,this),this.reset(!0);}
157function oe(Q){if(Q||Q===""){var F,X=Q[f];if(X)return X.call(Q);if(typeof Q.next=="function")return Q;if(!isNaN(Q.length))return F=-1,(X=function Y(){for(;++F<Q.length;)if(l.call(Q,F))return Y.value=Q[F],Y.done=!1,Y;return Y.value=m,Y.done=!0,Y;}).next=X;}throw new TypeError(t(Q)+" is not iterable");}return g(U,"constructor",{value:z.prototype=te,configurable:!0}),g(te,"constructor",{value:z,configurable:!0}),z.displayName=w(te,S,"GeneratorFunction"),a.isGeneratorFunction=function(Q){return Q=typeof Q=="function"&&Q.constructor,!!Q&&(Q===z||(Q.displayName||Q.name)==="GeneratorFunction");},a.mark=function(Q){return Object.setPrototypeOf?Object.setPrototypeOf(Q,te):(Q.__proto__=te,w(Q,S,"GeneratorFunction")),Q.prototype=Object.create(U),Q;},a.awrap=function(Q){return{__await:Q};},Z(re.prototype),w(re.prototype,v,function(){return this;}),a.AsyncIterator=re,a.async=function(Q,F,X,Y,j){j===void 0&&(j=Promise);var D=new re(C(Q,F,X,Y),j);return a.isGeneratorFunction(F)?D:D.next().then(function($){return $.done?$.value:D.next();});},Z(U),w(U,S,"Generator"),w(U,f,function(){return this;}),w(U,"toString",function(){return"[object Generator]";}),a.keys=function(Q){var F,X=Object(Q),Y=[];for(F in X)Y.push(F);return Y.reverse(),function j(){for(;Y.length;){var D=Y.pop();if(D in X)return j.value=D,j.done=!1,j;}return j.done=!0,j;};},a.values=oe,J.prototype={constructor:J,reset:function(Q){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(q),!Q)for(var F in this)F.charAt(0)==="t"&&l.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=m);},stop:function(){this.done=!0;var Q=this.tryEntries[0].completion;if(Q.type==="throw")throw Q.arg;return this.rval;},dispatchException:function(Q){if(this.done)throw Q;var F=this;function X(le,se){return D.type="throw",D.arg=Q,F.next=le,se&&(F.method="next",F.arg=m),!!se;}for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y],D=j.completion;if(j.tryLoc==="root")return X("end");if(j.tryLoc<=this.prev){var $=l.call(j,"catchLoc"),ne=l.call(j,"finallyLoc");if($&&ne){if(this.prev<j.catchLoc)return X(j.catchLoc,!0);if(this.prev<j.finallyLoc)return X(j.finallyLoc);}else if($){if(this.prev<j.catchLoc)return X(j.catchLoc,!0);}else{if(!ne)throw Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return X(j.finallyLoc);}}}},abrupt:function(Q,F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X];if(Y.tryLoc<=this.prev&&l.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var j=Y;break;}}var D=(j=j&&(Q==="break"||Q==="continue")&&j.tryLoc<=F&&F<=j.finallyLoc?null:j)?j.completion:{};return D.type=Q,D.arg=F,j?(this.method="next",this.next=j.finallyLoc,H):this.complete(D);},complete:function(Q,F){if(Q.type==="throw")throw Q.arg;return Q.type==="break"||Q.type==="continue"?this.next=Q.arg:Q.type==="return"?(this.rval=this.arg=Q.arg,this.method="return",this.next="end"):Q.type==="normal"&&F&&(this.next=F),H;},finish:function(Q){for(var F=this.tryEntries.length-1;0<=F;--F){var X=this.tryEntries[F];if(X.finallyLoc===Q)return this.complete(X.completion,X.afterLoc),q(X),H;}},catch:function(Q){for(var F=this.tryEntries.length-1;0<=F;--F){var X,Y,j=this.tryEntries[F];if(j.tryLoc===Q)return(X=j.completion).type==="throw"&&(Y=X.arg,q(j)),Y;}throw Error("illegal catch attempt");},delegateYield:function(Q,F,X){return this.delegate={iterator:oe(Q),resultName:F,nextLoc:X},this.method==="next"&&(this.arg=m),H;}},a;}function o(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function _(m,g,s){g=x(g);var l=m,g=E()?Reflect.construct(g,s||[],x(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function E(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(E=function(){return!!m;})();}
157function x(m){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function h(m,a){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}var y=this&&this.__awaiter||function(m,a,s,l){return new(s=s||Promise)(function(g,f){function v(C){try{w(l.next(C));}catch(I){f(I);}}function S(C){try{w(l.throw(C));}catch(I){f(I);}}function w(C){var I;C.done?g(C.value):((I=C.value)instanceof s?I:new s(function(O){O(I);})).then(v,S);}w((l=l.apply(m,a||[])).next());});},b=(Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundRemovalEffect=void 0,d(25)),p=d(72),c=d(5),d=function(m){function a(g){if(this instanceof a)return(g=_(this,a,[g]))._render=null,g._resetCache=null,g._videoCanvas=null,g._isRtlLayout=!1,g._canvasUniqueId=null,g._personTransform=null,g;throw new TypeError("Cannot call a class as a function");}var s,l=a;if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");return l.prototype=Object.create(m&&m.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),m&&h(l,m),l=a,m=[{key:"getPersonScale",value:function(){return p.MediaPipeSegmenterProvider.getPersonScale();}}],(s=[{key:"apply",value:function(g,f){return y(this,void 0,void 0,n().mark(function v(){return n().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f!=null&&f.backgroundRemovalEffectData){S.next=3;break;}return c.default.debug("[BackgroundRemovalEffect] No effect data provided, skipping initialization"),S.abrupt("return");case 3:this._render=f.backgroundRemovalEffectData.render,this._resetCache=f.backgroundRemovalEffectData.resetCache,this._videoCanvas=f.backgroundRemovalEffectData.videoCanvas,this._isRtlLayout=f.backgroundRemovalEffectData.isRtlLayout,this._canvasUniqueId=f.backgroundRemovalEffectData.canvasUniqueId,c.default.debug("[BackgroundRemovalEffect] Initialized successfully");case 9:case"end":return S.stop();}},v,this);}));}},{key:"isReady",value:function(){return this._render!==null&&this._videoCanvas!==null&&!!p.MediaPipeSegmenterProvider.getInstance().isInitialized();}},{key:"drawWithMask",value:function(g){return!!(this.isReady()&&this._render&&this._videoCanvas)&&(this._canvasUniqueId&&p.MediaPipe
157SegmenterProvider.getInstance().setPersonTransform(this._canvasUniqueId,this._personTransform),this._render(g,this._videoCanvas,this._isRtlLayout));}},{key:"resetCache",value:function(){this._resetCache&&this._resetCache();}},{key:"getPersonRenderedRect",value:function(){return this._canvasUniqueId?p.MediaPipeSegmenterProvider.getInstance().getPersonRenderedRect(this._canvasUniqueId):null;}},{key:"setPersonTransform",value:function(g){this._personTransform=g;}},{key:"rerenderFrame",value:function(g,f){return!!this._canvasUniqueId&&(p.MediaPipeSegmenterProvider.getInstance().setPersonTransform(this._canvasUniqueId,this._personTransform),p.MediaPipeSegmenterProvider.getInstance().rerenderPerson(this._canvasUniqueId,g,f));}},{key:"getPersonTransform",value:function(){return this._personTransform;}},{key:"getCanvasDimensions",value:function(){return this._videoCanvas?{width:this._videoCanvas.width,height:this._videoCanvas.height}:null;}},{key:"isRtlLayout",get:function(){return this._isRtlLayout;}},{key:"dispose",value:function(){c.default.debug("[BackgroundRemovalEffect] Disposing..."),this._render=null,this._resetCache=null,this._videoCanvas=null,this._canvasUniqueId=null,this._personTransform=null,c.default.debug("[BackgroundRemovalEffect] Disposed");}}])&&o(l.prototype,s),m&&o(l,m),Object.defineProperty(l,"prototype",{writable:!1}),l;}(b.VisualEffect);r.BackgroundRemovalEffect=d;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(){n=function(){return c;};var p,c={},d=Object.prototype,m=d.hasOwnProperty,a=Object.defineProperty||function(q,J,oe){q[J]=oe.value;},B=typeof Symbol=="function"?Symbol:{},s=B.iterator||"@@iterator",l=B.asyncIterator||"@@asyncIterator",g=B.toStringTag||"@@toStringTag";function f(q,J,oe){return Object.defineProperty(q,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}),q[J];}try{f({},"");}catch{f=function(J,oe,Q){return J[oe]=Q;};}function v(q,D,oe,$){var F,X,Y,j,D=D&&D.prototype instanceof N?D:N,D=Object.create(D.prototype),$=new re($||[]);return a(D,"_invoke",{value:(F=q,X=oe,Y=$,j=w,function(ne,le){if(j===I)throw Error("Generator is already running");if(j===O){if(ne==="throw")throw le;return{value:p,done:!0};}for(Y.method=ne,Y.arg=le;;){var se=Y.delegate;if(se&&(se=function fe(ge,he){var _e=he.method,Re=ge.iterator[_e];return Re===p?(he.delegate=null,_e==="throw"&&ge.iterator.return&&(he.method="return",he.arg=p,fe(ge,he),he.method==="throw")||_e!=="return"&&(he.method="throw",he.arg=new TypeError("The iterator does not provide a '"+_e+"' method")),M):(_e=S(Re,ge.iterator,he.arg),_e.type==="throw"?(he.method="throw",he.arg=_e.arg,he.delegate=null,M):(Re=_e.arg,Re?Re.done?(he[ge.resultName]=Re.value,he.next=ge.nextLoc,he.method!=="return"&&(he.method="next",he.arg=p),he.delegate=null,M):Re:(he.method="throw",he.arg=new TypeError("iterator result is not an object"),he.delegate=null,M)));}(se,Y),se)){if(se===M)continue;return se;}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(j===w)throw j=O,Y.arg;Y.dispatchException(Y.arg);}else Y.method==="return"&&Y.abrupt("return",Y.arg);if(j=I,se=S(F,X,Y),se.type==="normal"){if(j=Y.done?O:C,se.arg===M)continue;return{value:se.arg,done:Y.done};}se.type==="throw"&&(j=O,Y.method="throw",Y.arg=se.arg);}})}),D;}function S(q,J,oe){try{return{type:"normal",arg:q.call(J,oe)};}catch(Q){return{type:"throw",arg:Q};}}c.wrap=v;var w="suspendedStart",C="suspendedYield",I="executing",O="completed",M={};function N(){}function G(){}function H(){}var B={},z=(f(B,s,function(){return this;}),Object.getPrototypeOf),z=z&&z(z(ue([]))),te=(z&&z!==d&&m.call(z,s)&&(B=z),H.prototype=N.prototype=Object.create(B));function K(q){["next","throw","return"].forEach(function(J){f(q,J,function(oe){return this._invoke(J,oe);});});}function V(q,J){var oe;a(this,"_invoke",{value:function(Q,F){function X(){return new J(function(Y,j){(function D(ge,ne,le,se){var fe,ge=S(q[ge],q,ne);
157if(ge.type!=="throw")return(ne=(fe=ge.arg).value)&&t(ne)=="object"&&m.call(ne,"__await")?J.resolve(ne.__await).then(function(he){D("next",he,le,se);},function(he){D("throw",he,le,se);}):J.resolve(ne).then(function(he){fe.value=he,le(fe);},function(he){return D("throw",he,le,se);});se(ge.arg);})(Q,F,Y,j);});}return oe=oe?oe.then(X,X):X();}});}function U(q){var J={tryLoc:q[0]};1 in q&&(J.catchLoc=q[1]),2 in q&&(J.finallyLoc=q[2],J.afterLoc=q[3]),this.tryEntries.push(J);}function Z(q){var J=q.completion||{};J.type="normal",delete J.arg,q.completion=J;}function re(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(U,this),this.reset(!0);}function ue(q){if(q||q===""){var J,oe=q[s];if(oe)return oe.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length))return J=-1,(oe=function Q(){for(;++J<q.length;)if(m.call(q,J))return Q.value=q[J],Q.done=!1,Q;return Q.value=p,Q.done=!0,Q;}).next=oe;}throw new TypeError(t(q)+" is not iterable");}return a(te,"constructor",{value:G.prototype=H,configurable:!0}),a(H,"constructor",{value:G,configurable:!0}
157),G.displayName=f(H,g,"GeneratorFunction"),c.isGeneratorFunction=function(q){return q=typeof q=="function"&&q.constructor,!!q&&(q===G||(q.displayName||q.name)==="GeneratorFunction");},c.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,H):(q.__proto__=H,f(q,g,"GeneratorFunction")),q.prototype=Object.create(te),q;},c.awrap=function(q){return{__await:q};},K(V.prototype),f(V.prototype,l,function(){return this;}),c.AsyncIterator=V,c.async=function(q,J,oe,Q,F){F===void 0&&(F=Promise);var X=new V(v(q,J,oe,Q),F);return c.isGeneratorFunction(J)?X:X.next().then(function(Y){return Y.done?Y.value:X.next();});},K(te),f(te,g,"Generator"),f(te,s,function(){return this;}),f(te,"toString",function(){return"[object Generator]";}),c.keys=function(q){var J,oe=Object(q),Q=[];for(J in oe)Q.push(J);return Q.reverse(),function F(){for(;Q.length;){var X=Q.pop();if(X in oe)return F.value=X,F.done=!1,F;}return F.done=!0,F;};},c.values=ue,re.prototype={constructor:re,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,this.tryEntries.forEach(Z),!q)for(var J in this)J.charAt(0)==="t"&&m.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=p);},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval;},dispatchException:function(q){if(this.done)throw q;var J=this;function oe(D,$){return X.type="throw",X.arg=q,J.next=D,$&&(J.method="next",J.arg=p),!!$;}for(var Q=this.tryEntries.length-1;0<=Q;--Q){var F=this.tryEntries[Q],X=F.completion;if(F.tryLoc==="root")return oe("end");if(F.tryLoc<=this.prev){var Y=m.call(F,"catchLoc"),j=m.call(F,"finallyLoc");if(Y&&j){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}else if(Y){if(this.prev<F.catchLoc)return oe(F.catchLoc,!0);}else{if(!j)throw Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return oe(F.finallyLoc);}}}},abrupt:function(q,J){for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe];if(Q.tryLoc<=this.prev&&m.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var F=Q;break;}}var X=(F=F&&(q==="break"||q==="continue")&&F.tryLoc<=J&&J<=F.finallyLoc?null:F)?F.completion:{};return X.type=q,X.arg=J,F?(this.method="next",this.next=F.finallyLoc,M):this.complete(X);},complete:function(q,J){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&J&&(this.next=J),M;},finish:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J];if(oe.finallyLoc===q)return this.complete(oe.completion,oe.afterLoc),Z(oe),M;}},catch:function(q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe,Q,F=this.tryEntries[J];if(F.tryLoc===q)return(oe=F.completion).type==="throw"&&(Q=oe.arg,Z(F)),Q;}throw Error("illegal catch attempt");},delegateYield:function(q,J,oe){return this.delegate={iterator:ue(q),resultName:J,nextLoc:oe},this.method==="next"&&(this.arg=p),M;}},c;}function o(p,c){var d,m=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!m){if(Array.isArray(p)||(m=function(g,f){if(g){if(typeof g=="string")return _(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?_(g,f):void 0;}}(p))||c&&p&&typeof p.length=="number")return m&&(p=m),d=0,{s:c=function(){},n:function(){return d>=p.length?{done:!0}:{done:!1,value:p[d++]};},e:function(g){throw g;},f:c};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 158In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a,s=!0,l=!1;return{s:function(){m=m.call(p);},n:function(){var g=m.next();return s=g.done,g;},e:function(g){l=!0,a=g;},f:function(){try{s||m.return==null||m.return();}finally{if(l)throw a;}}};}function _(p,c){(c==null||c>p.length)&&(c=p.length);for(var d=0,m=Array(c);d<c;d++)m[d]=p[d];return m;}function E(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}var x=this&&this.__awaiter||function(p,c,d,m){return new(d=d||Promise)(function(a,s){function l(v){try{f(m.next(v));}catch(S){s(S);}}function g(v){try{f(m.throw(v));}catch(S){s(S);}}function f(v){var S;
158v.done?a(v.value):((S=v.value)instanceof d?S:new d(function(w){w(S);})).then(l,g);}f((m=m.apply(p,c||[])).next());});},h=(Object.defineProperty(r,"__esModule",{value:!0}),b(5)),y=void 0,y=b(309),b=function(){function p(){if(!(this instanceof p))throw new TypeError("Cannot call a class as a function");this.fontsStyle=document.createElement("style"),document.head.appendChild(this.fontsStyle),this.fonts=[],this.loadFontsPromise=new Map();}return c=p,m=[{key:"getInstance",value:function(){return this._instance||(this._instance=new this());}}],(d=[{key:"addAnnotationFont",value:function(a){return x(this,void 0,void 0,n().mark(function s(){var l,g,f,v;return n().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:l="",g=a.fonts||[],f=o(a.fontUrls),S.prev=3,f.s();case 5:if((v=f.n()).done){S.next=13;break;}return v=v.value,S.next=9,this.addFontStyle(this.fontsStyle,v);case 9:l=S.sent,g.push(l);case 11:S.next=5;break;case 13:S.next=18;break;case 15:S.prev=15,S.t0=S.catch(3),f.e(S.t0);case 18:return S.prev=18,f.f(),S.finish(18);case 21:a.fonts=g;case 22:case"end":return S.stop();}},s,this,[[3,15,18,21]]);}));}},{key:"addAnnotationFonts",value:function(a){return x(this,void 0,void 0,n().mark(function s(){var l,g,f,v,S;return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:l="",g=[],f=0;case 3:if(!(f<a.length)){w.next=19;break;}(v=a.getAnnotationWithoutLoad(f)).fonts=[],S=0;case 7:if(S<v.fontUrls.length)return w.next=10,this.addFontStyle(this.fontsStyle,v.fontUrls[S]);w.next=16;break;case 10:l=w.sent,v.fonts.push(l),g.push(l);case 13:S++,w.next=7;break;case 16:f++,w.next=3;break;case 19:case"end":return w.stop();}},s,this);}));}},{key:"addFontStyle",value:function(a,s){return x(this,void 0,void 0,n().mark(function l(){var g,f,v,S,w=this;return n().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g=function(I,O){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:3;return x(w,void 0,void 0,n().mark(function N(){return n().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.prev=0,G.next=3,I;case 3:return G.abrupt("return",G.sent);case 6:if(G.prev=6,G.t0=G.catch(0),0<M)return--M,I=this.loadFont(O),h.default.debug("Retry num ".concat(M,", loading font ").concat(O)),G.next=14,g(I,O,M);G.next=17;break;case 14:return G.abrupt("return",G.sent);case 17:throw new Error("FontManager couldn't load ".concat(O,` after all retries 159 160 leaving the font unloaded, css will transform it to default`));case 18:case"end":return G.stop();}},N,this,[[0,6]]);}));},f=this.getFontAsset(s),S=f?(v=f.family,this.loadFontsPromise.get(v)):(h.default.debug("[".concat(this.constructor.name,"]: could not found on cache: ").concat(s)),S=h.default.randomStr(),f={url:s,family:"font_".concat(S)},this.fonts.push(f),a.appendChild(document.createTextNode("@font-face { font-family: '"+f.family+"'; src: url('"+s+"');}")),v=f.family,this.loadFont(v)),C.prev=3,C.next=6,g(S,v);case 6:C.next=11;break;case 8:C.prev=8,C.t0=C.catch(3),h.default.warn(C.t0.message);case 11:return C.abrupt("return",f.family);case 12:case"end":return C.stop();}},l,this,[[3,8]]);}));}},{key:"getFontAsset",value:function(a){var s,l=void 0,g=o(this.fonts);try{for(g.s();!(s=g.n()).done;){var f=s.value;f.url===a&&(l=f);}}catch(v){g.e(v);}finally{g.f();}return l;}},{key:"loadFont",value:function(a){var s,l,g=a;return this.loadFontsPromise.has(g)?(h.default.warn("[".concat(this.constructor.name,"]: found promise with key: ").concat(g)),this.loadFontsPromise.get(g)):(l=new Promise(function(f,v){y.load({classes:!1,custom:{families:[a]},timeout:h.default.isRendering?2e4:4e3,active:function(){s?(h.default.error(s),v()):(h.default.debug("WebFont has loaded fonts"),f());},inactive:function(){s&&(h.default.error("All families: ".concat(a," passed failed to load")),v());},fontloading:function(S){h.default.debug("Font ".concat(S," is loading"));},fontinactive:function(S){s="Font ".concat(S," failed to load"),h.default.error(s);},fontactive:function(S){h.default.debug("Font ".concat(S," is active"));}});}),this.loadFontsPromise.set(g,l),l);}},{key:"clear",value:function(){var a;(a=this.loadFontsPromise)!=null&&a.clear(),(a=this.fontsStyle)!=null&&a.remove(),this.fonts=[];}},{key:"dispose",value:function(){this.clear(),p._instance=null;}}])&&E(c.prototype,d),m&&E(c,m),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,d,m;}();r.default=b;},,,function(i,r,e){"use strict";function t(){t=function(){return J;};var q,J={},oe=Object.prototype,Q=oe.hasOwnProperty,F=Object.defineProperty||function(it,ot,ht){it[ot]=ht.value;},W=typeof Symbol=="function"?Symbol:{},X=W.iterator||"@@iterator",Y=W.asyncIterator||"@@asyncIterator",j=W.toStringTag||"@@toStringTag";function D(it,ot,ht){return Object.defineProperty(it,ot,{value:ht,enumerable:!0,configurable:!0,writable:!0}),it[ot];}try{D({},"");}catch{D=function(ot,ht,Et){return ot[ht]=Et;};}function $(it,Ge,ht,qe){var At,Nt,Ut,bi,Ge=Ge&&Ge.prototype instanceof _e?Ge:_e,Ge=Object.create(Ge.prototype),qe=new Be(qe||[]);return F(Ge,"_invoke",{value:(At=it,Nt=ht,Ut=qe,bi=le,function(yt,bt){if(bi===fe)throw Error("Generator is already running");if(bi===ge){if(yt==="throw")throw bt;return{value:q,done:!0};}for(Ut.method=yt,Ut.arg=bt;;){var gt=Ut.delegate;if(gt&&(gt=function Ot(Mt,Lt){var Kt=Lt.method,Dt=Mt.iterator[Kt];return Dt===q?(Lt.delegate=null,Kt==="throw"&&Mt.iterator.return&&
160(Lt.method="return",Lt.arg=q,Ot(Mt,Lt),Lt.method==="throw")||Kt!=="return"&&(Lt.method="throw",Lt.arg=new TypeError("The iterator does not provide a '"+Kt+"' method")),he):(Kt=ne(Dt,Mt.iterator,Lt.arg),Kt.type==="throw"?(Lt.method="throw",Lt.arg=Kt.arg,Lt.delegate=null,he):(Dt=Kt.arg,Dt?Dt.done?(Lt[Mt.resultName]=Dt.value,Lt.next=Mt.nextLoc,Lt.method!=="return"&&(Lt.method="next",Lt.arg=q),Lt.delegate=null,he):Dt:(Lt.method="throw",Lt.arg=new TypeError("iterator result is not an object"),Lt.delegate=null,he)));}(gt,Ut),gt)){if(gt===he)continue;return gt;}if(Ut.method==="next")Ut.sent=Ut._sent=Ut.arg;else if(Ut.method==="throw"){if(bi===le)throw bi=ge,Ut.arg;Ut.dispatchException(Ut.arg);}else Ut.method==="return"&&Ut.abrupt("return",Ut.arg);if(bi=fe,gt=ne(At,Nt,Ut),gt.type==="normal"){if(bi=Ut.done?ge:se,gt.arg===he)continue;return{value:gt.arg,done:Ut.done};}gt.type==="throw"&&(bi=ge,Ut.method="throw",Ut.arg=gt.arg);}})}),Ge;}function ne(it,ot,ht){try{return{type:"normal",arg:it.call(ot,ht)};}catch(Et){return{type:"throw",arg:Et};}}J.wrap=$;var le="suspendedStart",se="suspendedYield",fe="executing",ge="completed",he={};function _e(){}function Re(){}function ee(){}var W={},ae=(D(W,X,function(){return this;}),Object.getPrototypeOf),ae=ae&&ae(ae(nt([]))),de=(ae&&ae!==oe&&Q.call(ae,X)&&(W=ae),ee.prototype=_e.prototype=Object.create(W));function ye(it){["next","throw","return"].forEach(function(ot){D(it,ot,function(ht){return this._invoke(ot,ht);});});}function Se(it,ot){var ht;F(this,"_invoke",{value:function(Et,At){function Nt(){return new ot(function(Ut,bi){(function Ge(Mt,yt,bt,gt){var Ot,Mt=ne(it[Mt],it,yt);if(Mt.type!=="throw")return(yt=(Ot=Mt.arg).value)&&s(yt)=="object"&&Q.call(yt,"__await")?ot.resolve(yt.__await).then(function(Lt){Ge("next",Lt,bt,gt);},function(Lt){Ge("throw",Lt,bt,gt);}):ot.resolve(yt).then(function(Lt){Ot.value=Lt,bt(Ot);},function(Lt){return Ge("throw",Lt,bt,gt);});gt(Mt.arg);})(Et,At,Ut,bi);});}return ht=ht?ht.then(Nt,Nt):Nt();}});}function De(it){var ot={tryLoc:it[0]};1 in it&&(ot.catchLoc=it[1]),2 in it&&(ot.finallyLoc=it[2],ot.afterLoc=it[3]),this.tryEntries.push(ot);}function Ue(it){var ot=it.completion||{};ot.type="normal",delete ot.arg,it.completion=ot;}function Be(it){this.tryEntries=[{tryLoc:"root"}],it.forEach(De,this),this.reset(!0);}function nt(it){if(it||it===""){var ot,ht=it[X];if(ht)return ht.call(it);if(typeof it.next=="function")return it;if(!isNaN(it.length))return ot=-1,(ht=function Et(){for(;++ot<it.length;)if(Q.call(it,ot))return Et.value=it[ot],Et.done=!1,Et;return Et.value=q,Et.done=!0,Et;}).next=ht;}throw new TypeError(s(it)+" is not iterable");}return F(de,"constructor",{value:Re.prototype=ee,configurable:!0}),F(ee,"constructor",{value:Re,configurable:!0}),Re.displayName=D(ee,j,"GeneratorFunction"),J.isGeneratorFunction=function(it){return it=typeof it=="function"&&it.constructor,!!it&&(it===Re||(it.displayName||it.name)==="GeneratorFunction");},J.mark=function(it){return Object.setPrototypeOf?Object.setPrototypeOf(it,ee):(it.__proto__=ee,D(it,j,"GeneratorFunction")),it.prototype=Object.create(de),it;},J.awrap=function(it){return{__await:it};},ye(Se.prototype),D(Se.prototype,Y,function(){return this;}),J.AsyncIterator=Se,J.async=function(it,ot,ht,Et,At){At===void 0&&(At=Promise);var Nt=new Se($(it,ot,ht,Et),At);return J.isGeneratorFunction(ot)?Nt:Nt.next().then(function(Ut){return Ut.done?Ut.value:Nt.next();});},ye(de),D(de,j,"Generator"),D(de,X,function(){return this;}),D(de,"toString",function(){return"[object Generator]";}),J.keys=function(it){var ot,ht=Object(it),Et=[];for(ot in ht)Et.push(ot);return Et.reverse(),function At(){for(;Et.length;){var Nt=Et.pop();if(Nt in ht)return At.value=Nt,At.done=!1,At;}return At.done=!0,At;};},J.values=nt,Be.prototype={constructor:Be,reset:function(it){if(this.prev=0,this.next=0,this.sent=this._sent=q,this.done=!1,this.delegate=null,this.method="next",this.arg=q,this.tryEntries.forEach(Ue),!it)for(var ot in this)ot.charAt(0)==="t"&&Q.call(this,ot)&&!isNaN(+ot.slice(1))&&(this[ot]=q);},stop:function(){this.done=!0;
160var it=this.tryEntries[0].completion;if(it.type==="throw")throw it.arg;return this.rval;},dispatchException:function(it){if(this.done)throw it;var ot=this;function ht(Ge,qe){return Nt.type="throw",Nt.arg=it,ot.next=Ge,qe&&(ot.method="next",ot.arg=q),!!qe;}for(var Et=this.tryEntries.length-1;0<=Et;--Et){var At=this.tryEntries[Et],Nt=At.completion;if(At.tryLoc==="root")return ht("end");if(At.tryLoc<=this.prev){var Ut=Q.call(At,"catchLoc"),bi=Q.call(At,"finallyLoc");if(Ut&&bi){if(this.prev<At.catchLoc)return ht(At.catchLoc,!0);if(this.prev<At.finallyLoc)return ht(At.finallyLoc);}else if(Ut){if(this.prev<At.catchLoc)return ht(At.catchLoc,!0);}else{if(!bi)throw Error("try statement without catch or finally");if(this.prev<At.finallyLoc)return ht(At.finallyLoc);}}}},abrupt:function(it,ot){for(var ht=this.tryEntries.length-1;0<=ht;--ht){var Et=this.tryEntries[ht];if(Et.tryLoc<=this.prev&&Q.call(Et,"finallyLoc")&&this.prev<Et.finallyLoc){var At=Et;break;}}var Nt=(At=At&&(it==="break"||it==="continue")&&At.tryLoc<=ot&&ot<=At.finallyLoc?null:At)?At.completion:{};return Nt.type=it,Nt.arg=ot,At?(this.method="next",this.next=At.finallyLoc,he):this.complete(Nt);},complete:function(it,ot){if(it.type==="throw")throw it.arg;return it.type==="break"||it.type==="continue"?this.next=it.arg:it.type==="return"?(this.rval=this.arg=it.arg,this.method="return",this.next="end"):it.type==="normal"&&ot&&(this.next=ot),he;},finish:function(it){for(var ot=this.tryEntries.length-1;0<=ot;--ot){var ht=this.tryEntries[ot];if(ht.finallyLoc===it)return this.complete(ht.completion,ht.afterLoc),Ue(ht),he;}},catch:function(it){for(var ot=this.tryEntries.length-1;0<=ot;--ot){var ht,Et,At=this.tryEntries[ot];if(At.tryLoc===it)return(ht=At.completion).type==="throw"&&(Et=ht.arg,Ue(At)),Et;}throw Error("illegal catch attempt");},delegateYield:function(it,ot,ht){return this.delegate={iterator:nt(it),resultName:ot,nextLoc:ht},this.method==="next"&&(this.arg=q),he;}},J;}function n(q,J){return function(oe){if(Array.isArray(oe))return oe;}(q)||function(oe,Q){var F=oe==null?null:typeof Symbol<"u"&&oe[Symbol.iterator]||oe["@@iterator"];if(F!=null){var X,Y,j,D,$=[],ne=!0,le=!1;try{if(j=(F=F.call(oe)).next,Q===0){if(Object(F)!==F)return;ne=!1;}else for(;!(ne=(X=j.call(F)).done)&&($.push(X.value),$.length!==Q);ne=!0);}catch(se){le=!0,Y=se;}finally{try{if(!ne&&F.return!=null&&(D=F.return(),Object(D)!==D))return;}finally{if(le)throw Y;}}return $;}}(q,J)||_(q,J)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 161In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(q,J){var oe,Q=typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(!Q){if(Array.isArray(q)||(Q=_(q))||J&&q&&typeof q.length=="number")return Q&&(q=Q),oe=0,{s:J=function(){},n:function(){return oe>=q.length?{done:!0}:{done:!1,value:q[oe++]};},e:function(j){throw j;},f:J};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 162In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var F,X=!0,Y=!1;return{s:function(){Q=Q.call(q);},n:function(){var j=Q.next();return X=j.done,j;},e:function(j){Y=!0,F=j;},f:function(){try{X||Q.return==null||Q.return();}finally{if(Y)throw F;}}};}function _(q,J){if(q){if(typeof q=="string")return E(q,J);var oe={}.toString.call(q).slice(8,-1);return(oe=oe==="Object"&&q.constructor?q.constructor.name:oe)==="Map"||oe==="Set"?Array.from(q):oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(oe)?E(q,J):void 0;}}function E(q,J){(J==null||J>q.length)&&(J=q.length);for(var oe=0,Q=Array(J);oe<J;oe++)Q[oe]=q[oe];return Q;}function x(q,J){if(!(q instanceof J))throw new TypeError("Cannot call a class as a function");}function h(q,J){for(var oe=0;oe<J.length;oe++){var Q=J[oe];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(q,function(F){return F=function(X,Y){if(s(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j===void 0)return(Y==="string"?String:Number)(X);if(j=j.call(X,Y||"default"),s(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.");}(F,"string"),s(F)=="symbol"?F:F+"";}(Q.key),Q);}}function y(q,J,oe){return J&&h(q.prototype,J),oe&&h(q,oe),Object.defineProperty(q,"prototype",{writable:!1}),q;}function b(q,F,oe){F=m(F);var Q=q,F=p()?Reflect.construct(F,oe||[],m(q).constructor):F.apply(q,oe);if(F&&(s(F)=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(q=Q,q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q;}function p(){try{var q=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(p=function(){return!!q;})();}function c(q,J,oe,Q){var F=d(m(1&Q?q.prototype:q),J,oe);return 2&Q?function(X){return F.apply(oe,X);}:F;}function d(){return(d=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(q,J,oe){var Q=function(F,X){for(;!{}.hasOwnProperty.call(F,X)&&(F=m(F))!==null;);return F;}(q,J);if(Q)return(Q=Object.getOwnPropertyDescriptor(Q,J)).get?Q.get.call(arguments.length<3?q:oe):Q.value;}).apply(null,arguments);}function m(q){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J);})(q);}
162function a(q,J){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(oe,Q){return oe.__proto__=Q,oe;})(q,J);}function s(q){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J;}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J;})(q);}var l,g=this&&this.__decorate||function(q,J,oe,Q){var F,X=arguments.length,Y=X<3?J:Q===null?Q=Object.getOwnPropertyDescriptor(J,oe):Q;if((typeof Reflect>"u"?"undefined":s(Reflect))==="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(q,J,oe,Q);else for(var j=q.length-1;0<=j;j--)(F=q[j])&&(Y=(X<3?F(Y):3<X?F(J,oe,Y):F(J,oe))||Y);return 3<X&&Y&&Object.defineProperty(J,oe,Y),Y;},f=this&&this.__awaiter||function(q,J,oe,Q){return new(oe=oe||Promise)(function(F,X){function Y($){try{D(Q.next($));}catch(ne){X(ne);}}function j($){try{D(Q.throw($));}catch(ne){X(ne);}}function D($){var ne;$.done?F($.value):((ne=$.value)instanceof oe?ne:new oe(function(le){le(ne);})).then(Y,j);}D((Q=Q.apply(q,J||[])).next());});},v=(Object.defineProperty(r,"__esModule",{value:!0}),r.VDMPluginPreviewer=r.isOfTypeSlideCallback=r.VDM_PREVIEWER_EVENT_LISTENERS=r.VDMPreviewerEvents=r.VDMPluginState=void 0,e(287)),S=e(5),w=e(328),C=e(335),I=e(336),O=e(12),M=e(338),N=e(340),G=e(345),H=(e(349),e(350)),B=e(106),z=e(353),te=e(33),K=e(354),V=e(13),U=e(74),Z=(Object.defineProperty(r,"VDMPreviewerEvents",{enumerable:!0,get:function(){return U.VDMPreviewerEvents;}}),Object.defineProperty(r,"VDM_PREVIEWER_EVENT_LISTENERS",{enumerable:!0,get:function(){return U.VDM_PREVIEWER_EVENT_LISTENERS;}}),e(20)),re=e(45),ue=((e=l=r.VDMPluginState||(r.VDMPluginState={}))[e.PLAYING=0]="PLAYING",e[e.PAUSED=1]="PAUSED",e[e.STALLED=2]="STALLED",e[e.ENDED=3]="ENDED",e[e.ERROR=4]="ERROR",e[e.READY=5]="READY",e[e.BUILDING=6]="BUILDING",e[e.FORCEBUFFERING=7]="FORCEBUFFERING",e[e.PAUSING=8]="PAUSING",new Set(["start","update","ended","slide","buffering","ready"]));r.isOfTypeSlideCallback=function(q){return ue.has(q);},e=function(q){function J(Q){var F;return x(this,J),(F=b(this,J,[Q])).needReset=!1,F._state=l.BUILDING,F._previewerEvents=U.VDMPreviewerEvents.getInstance(Q),F.vdmHolder&&(F.vdmHolder.onLostVisibility=function(){F._state===l.PLAYING&&F.pause();}),F._timelinePlayer=new C.default(),F.callbacks=new Map(),ue.forEach(function(X){return F.callbacks.set(X,[]);}),F._previewerEvents.addEventListener(U.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS.HEAD_BOUNDING_BOX_DETECTED,function(X){if(X.detail.mediaId===void 0)throw new Error("Got head bounding box detected event with undefined mediaId");if(X.detail.slideIndex===void 0)throw new Error("Got head bounding box detected event with undefined slideIndex");if(X.detail.headBoundingBox===void 0||S.default.isEmptyObject(X.detail.headBoundingBox))throw new Error("Got head bounding box detected event with empty headBoundingBox");var Y,j,D=(F.stash||F).slides;D!==void 0&&D.length!==0&&(j=((j=D[0].refSlide)==null?void 0:j.type)===Z.VDMSlideType.VDMContextSlide,Y=X.detail.slideIndex,(j=j?Y+1:Y)>=D.length||(D=(j=(D=D[j].refSlide)==null?void 0:D.media)==null?void 0:j.findIndex(function($){return $.mediaId===X.detail.mediaId;}))===-1||D===void 0||Y>=F.story.initialAdapterStory.media.length||D>=((j=F.story.initialAdapterStory.media[Y].media)==null?void 0:j.length)||(j={slideIndex:Y,mediaIndex:D,headBoundingBox:X.detail.headBoundingBox},F._previewerEvents.dispatchEvent(new CustomEvent(U.VDM_PREVIEWER_EVENT_LISTENERS.HEAD_BOUNDING_BOX_DETECTED,{detail:j}))));}),F._previewerEvents.addEventListener(U.VDM_PREVIEWER_INTERNAL_EVENT_LISTENERS.PERSON_BOUNDING_BOX_DETECTED,function(X){if(X.detail.mediaId===void 0)throw new Error("Got person bounding box detected event with undefined mediaId");if(X.detail.slideIndex===void 0)throw new Error("Got person bounding box detected event with undefined slideIndex");if(X.detail.personBoundingBox===void 0||S.default.isEmptyObject(X.detail.personBoundingBox))throw new Error("Got person bounding box detected event with empty personBoundingBox");var Y,j,D=(F.stash||F).slides;D!==void 0&&D.length!==0&&(j=((j=D[0].refSlide)==null?void 0:j.type)===Z.VDMSlideType.VDMContextSlide,Y=X.detail.slideIndex,(j=j?Y+1:Y)>=D.length||(D=(j=(D=D[j].refSlide)==null?void 0:D.media)==null?void 0:j.findIndex(function($){return $.mediaId===X.detail.mediaId;}))===-1||D===void 0||Y>=F.story.initialAdapterStory.media.length||D>=((j=F.story.initialAdapterStory.media[Y].media)==null?void 0:j.length)||(j={slideIndex:Y,mediaIndex:D,personBoundingBox:X.detail.personBoundingBox},F._previewerEvents.dispatchEvent(new CustomEvent(U.VDM_PREVIEWER_EVENT_LISTENERS.PERSON_BOUNDING_BOX_DETECTED,{detail:j}))));}),F;}var oe=J;if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");return oe.prototype=Object.create(q&&q.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),q&&a(oe,q),y(J,[{key:"Holder",get:function(){return this.vdmHolder;}},{key:"Story",get:function(){return this._story;}},{key:"Slides",get:function(){return this._slides;}},{key:"dispose",value:function(){this.clear(),this._storyAudios&&this._storyAudios.clear(),B.default.disposeInstance(this.containerId),this.containerId&&U.VDMPreviewerEvents.disposeInstance(this.containerId),this._previewerEvents=void 0;}},{key:"clear",value:function(){this._state=l.BUILDING,this._timelinePlayer&&this._timelinePlayer.clear(),this._story&&this._story.clear();var Q,F=o(this._slides);try{for(F.s();!(Q=F.n()).done;)Q.value.clear();}catch(X){F.e(X);}finally{F.f();}this._storyAudios&&this._storyAudios.reset(),this.vdmHolder&&this.vdmHolder.clear(),this._blobURLRegistry&&this._blobURLRegistry.revokeAll(),this._slides=[];}},{key:"clearCallbacks",value:function(){if(this.callbacks){var Q,F=o(this.callbacks);try{for(F.s();!(Q=F.n()).done;){var X=n(Q.value,2);X[0],X[1].length=0;}}catch(Y){F.e(Y);}finally{F.f();}}this.containerId&&U.VDMPreviewerEvents.disposeInstance(this.containerId);}},{key:"state",get:function(){return this._state;}},{key:"setDefaultOptionValues",value:function(Q){var F;"disableSmoothing"in Q&&S.default.error("disableSmoothing option is deprecated, please use imageSmoothingEnabled."),"syncDelta"in Q&&S.default.error("syncDelta option is deprecated, not in use anymore."),Q.render=(F=Q.render)!=null&&F,Q.startMediaMuted=(F=Q.startMediaMuted)!=null&&F,Q.isUsedByCollections=(F=Q.isUsedByCollections)!=null&&F,Q.imageSmoothingEnabled=(F=Q.imageSmoothingEnabled)==null||F,Q.containerId=this.containerId,Q.mediaId=Q.mediaId||this.generateMediaId(),Q.debug=(F=Q.debug)!=null&&F,Q.showTimeco
162de=(F=Q.showTimecode)!=null&&F,Q.isSafari=(F=Q.isSafari)!=null&&F,Q.useGainVolume=(F=Q.useGainVolume)!=null&&F,Q.useVideoPlayersAudio=(F=Q.useVideoPlayersAudio)==null||F,Q.sync={audio:{sampleRateMS:(F=(F=(F=Q.sync)==null?void 0:F.audio)==null?void 0:F.sampleRateMS)!=null?F:20,thresholdMS:(F=(F=(F=Q.sync)==null?void 0:F.audio)==null?void 0:F.thresholdMS)!=null?F:V.VIDEO_FRAME_AMOUNT_THRESHOLD/V.GSAP_FPS*1e3},video:{sampleRateMS:(F=(F=(F=Q.sync)==null?void 0:F.video)==null?void 0:F.sampleRateMS)!=null?F:1e3/V.GSAP_FPS,thresholdMS:(F=(F=(F=Q.sync)==null?void 0:F.video)==null?void 0:F.thresholdMS)!=null?F:V.VIDEO_FRAME_AMOUNT_THRESHOLD/V.GSAP_FPS*1e3}},this._options=Q,O.MediaPlayerCache.isSafari=this._options.isSafari,O.MediaPlayerCache.startMediaMuted=this._options.startMediaMuted,O.MediaPlayerCache.useGainVolume=this._options.useGainVolume,O.MediaPlayerCache.getInstance(this.containerId).useVideoPlayersAudio=this._options.useVideoPlayersAudio,S.default.useDebug=this._options.debug,S.default.isRendering=this._options.render;}},{key:"_manageSetStory",value:function(Q){this.clear();try{this._setStory(Q,this._options),this._storyAudios=this.generateStoryAudios(Q,this._options);}catch(F){return this.clear(),this._state=l.ERROR,console.error("Could not build story: ".concat(F.message)),console.error("stack:",F.stack),!1;}}},{key:"setStory",value:function(Q){var F=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return f(this,void 0,void 0,t().mark(function X(){return t().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(this._state===l.PLAYING)return S.default.warn("Cannot modify story while plugin is playing. Pause or stop playback before making changes."),Y.next=4,this.pause();Y.next=4;break;case 4:this.setDefaultOptionValues(F),this._story===void 0||this._options.disableReconcile?this._manageSetStory(Q,this._options):this._setStash(Q,this._options);case 6:case"end":return Y.stop();}},X,this);}));}},{key:"_setStash",value:function(Q,F){var X=new I.default(Q,this._options),Y=this._createSlides(Q,this._options,X);if(this._options.slidingWindow){for(var j=S.default.slideIndexFromTime(this._timelinePlayer.time(),Y),j=(j=j===void 0?0:j)<=this._options.slidingWindow/2?0:j-Math.floor(this._options.slidingWindow/2),D=j+this._options.slidingWindow,$=j;$<D&&$<Y.length;$++)Y[$].buildLazyLayers();N.default.CoordinateTransitions(this.slides),N.default.CoordinateMaster(this.slides);}this._stash={preBuildStory:Q,stashedStory:X,slides:Y,options:S.default.cloneDeep(this._options)};}},{key:"_setStory",value:function(Q,F){if(this._story=new I.default(Q,this._options),!Q)throw new Error("Cannot create story - error in story object");this._slides=this._createSlides(Q,this._options,this._story),this._slidesBeforeRender=S.default.cloneDeep(this._slides);}},{key:"_createSlides",value:function(Q,F,X){for(var Y=this,j=[],D=Q.global.width,$=Q.global.height,ne=0;ne<Q.slides.length;ne++){var se=Q.slides[ne],le=S.default.cloneDeep(this._options),se=(le.mediaId=this.generateMediaId(),new v.default(se,ne,D,$,le));if(!se)throw new Error("Cannot create story - error in one or more slides");se.on("start",function(fe){Y._options.slidingWindow&&Y.onCurrentSlide(fe),Y.callCallbacks("slide",fe);}),j.push(se);}return j;}},{key:"onCurrentSlide",value:function(Q){return f(this,void 0,void 0,t().mark(function F(){var X,Y,j,D;return t().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(Q+1<this.slides.length&&this.slides[Q+1].isViewRendering)return S.default.warn("Slide ".concat(Q+1," is still rendering, pausing the player")),$.next=4,this.pause();$.next=5;break;case 4:return $.abrupt("return");case 5:if(!((X=Q+Math.floor((this._options.slidingWindow-1)/2))<this.slides.length)){$.next=17;break;}for(Y=[],j=[],D=Q;D<=X&&D<this.slides.length;D++)this.slides[D].isViewRendered||this.slides[D].isViewRendering||(this.slides[D].Layers.length===0&&(this.slides[D].buildLazyLayers(),this._slidesBeforeRender[D].updateLayers(S.default.cloneDeep(this.slides[D].Layers))),Y.push(this.slides[D].render(this._story.element(),this._timelinePlayer.videoTimeline)),this._options.render||j.push(this.slides[D].sync(this._timelinePlayer.mainTimeline,this.callbacks.get("buffering"),this.callbacks.get("ready"))));if(0<Y.length)return $.next=13,Promise.all(Y);$.next=17;break;case 13:return $.next=15,Promise.all(j);case 15:N.default.CoordinateTransitions(this.slides),N.default.CoordinateMaster(this.slides);case 17:case"end":return $.stop();}},F,this);}));}},{key:"generateStoryAudios",value:function(Q,F,X){if(Q.audios&&(O.MediaPlayerCache.getInstance(this.containerId).useVideoPlayersAudio=F.useVideoPlayersAudio,!F.render&&!F.isUsedByCollections))return new w.default(Q.audios,this.vdmHolder.element(),F,X);}},{key:"insertSlide_",value:function(Q,F){(F=F===void 0?this._slides.length:F)>=this._slides.length+1&&(console.warn("position not exists, adding to the end of video"),F=this._slides.length),this.stop(),0<this._slides.length?this._slides.splice(F,0,Q):this._slides.push(Q
162),this.needReset=!0;}},{key:"clearAllAudioTimelines",value:function(){this.vdmHolder.clearAudioPlayers();}},{key:"propagateRenderInfo",value:function(Q){return this.renderOracle.searchRenderInfoByTime(Q);}},{key:"createPartitions",value:function(Q){return this.renderOracle.splitToTasksByPriority(Q);}},{key:"createRenderStrategy",value:function(){return G.RenderStrategyFactory.createStrategy(this._options.renderingStrategy,this).decompose();}},{key:"prepareRender",value:function(Y){var F=void 0,Y=n(this.renderOracle.canOverlayRender(Y),2),X=Y[0],Y=Y[1];return F=X&&Y!==void 0?this.renderOracle.prepare(Y):F;}},{key:"mutateStateWithStash",value:function(Q){if(this.story=Q.stashedStory,this.slides=Q.slides,this._options=Q.options,this.slidesBeforeRender=this._createSlides(Q.preBuildStory,this._options,this.story),this._options.slidingWindow)for(var F=S.default.slideIndexFromTime(this._timelinePlayer.time(),this.slidesBeforeRender),F=F<=this._options.slidingWindow/2?0:F-Math.floor(this._options.slidingWindow/2),X=F+this._options.slidingWindow,Y=F;Y<X&&Y<this.slidesBeforeRender.length;Y++)this.slidesBeforeRender[Y].buildLazyLayers();this._storyAudios=Q.audios;}},{key:"createReconciler",value:function(){return new z.default(this);}},{key:"reRenderStory",value:function(Q){return f(this,void 0,void 0,t().mark(function F(){return t().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Q.render(this.vdmHolder.element(),this.timelinePlayer.videoTimeline,!0);case 2:case"end":return X.stop();}},F,this);}));}},{key:"rebuild",value:function(){var Q=this,F=Object.create(null,{rebuild:{get:function(){return c(J,"rebuild",Q,1);}}});return f(this,void 0,void 0,t().mark(function X(){return t().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return this._currentTimeBeforeRebuild=this._timelinePlayer.time(),Y.next=3,this.pause();case 3:return this.timelinePlayer.clear(),Y.next=6,F.rebuild.call(this);case 6:this.timelinePlayer.reset();case 7:case"end":return Y.stop();}},X,this);}));}},{key:"build",value:function(){var Q,F=this,X=Object.create(null,{build:{get:function(){return c(J,"build",F,1);}}});return f(this,void 0,void 0,t().mark(function Y(){return t().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(this._state===l.PLAYING)return S.default.warn("You should not build story while plugin is playing. Pause or stop playback before."),j.next=4,this.pause();j.next=4;break;case 4:return this._state=l.BUILDING,K.ListenerStorage.getInstance().removeAllListeners(K.StorageType.QUALITYCHANGE).clear(K.StorageType.QUALITYCHANGE),j.next=8,X.build.call(this);case 8:return this._slides?(N.default.CoordinateTransitions(this._slides),N.default.CoordinateMaster(this._slides)):S.default.debug("ERROR: Couldn't Coordinate slides transitions!"),this._options.render||this.syncAllComponents(this._timelinePlayer.mainTimeline,this.callbacks.get("buffering"),this.callbacks.get("ready")),this._state=l.READY,this._blobURLRegistry&&(Q=this._options)!=null&&Q.debug&&(this._blobURLRegistry.printStorageMap(),this._blobURLRegistry.printPendingRevoke()),j.abrupt("return",this);case 13:case"end":return j.stop();}},Y,this);}));}},{key:"_build",value:function(){return f(this,void 0,void 0,t().mark(function Q(){var F,X,Y,j,D;return t().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(S.default.debug("Building previewer elements!!"),this._state===l.READY)return $.abrupt("return");$.next=3;break;case 3:return this._timelinePlayer.clear(),this._state=l.BUILDING,F=performance.now(),$.next=8,this._story.render(this.vdmHolder.element(),this._timelinePlayer.videoTimeline);case 8:if(this._options.slidingWindow){$.next=16;break;}X=[],Y=o(this._slides);try{for(Y.s();!(j=Y.n()).done;)D=j.value,X.push(D.render(this._story.element(),this._timelinePlayer.videoTimeline));}catch(ne){Y.e(ne);}finally{Y.f();}return $.next=14,Promise.all(X);case 14:return $.next=16,this.renderStoryAudios();case 16:this._timelinePlayer.reset(),S.default.debug("%c[".concat(this.constructor.name,"]: total time taken to build and render (seconds) : ").concat(.001*(performance.now()-F)),["background: #222; color: #D8BFD8"]);case 18:case"end":return $.stop();}},Q,this);}));}},{key:"renderStoryAudios",value:function(){return f(this,void 0,void 0,t().mark(function Q(){var F;return t().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(this._options.render)return X.abrupt("return");X.next=2;break;case 2:if(this._storyAudios&&!this._storyAudios.isRendered)return F=performance.now(),X.next=6,this._storyAudios.render(this._timelinePlayer.audioTimeline);X.next=7;break;case 6:S.default.debug("[".concat(this.constructor.name,"]: total time taken for audio building: ").concat(.001*(performance.now()-F)));case 7:case"end":return X.stop();}},Q,this);}));}},{key:"play",value:function(){var Q=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,F=1<arguments.length&&arguments[1]!==void 0?arguments[1]:void 0,X=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return f(this,void 0,void 0,t().mark(function Y(){var j,D,$,ne,le,se=this;return t().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(this._state!==l.READY&&this._state!==l.PAUSED){fe.next=31;break;}j=o(this.timelinePlayer.mainTimeline.getChildren(!0,!0,!1));try{for(j.s();!(D=j.n()).done;)($=D.value).data==="isPause"&&$.kill();}catch(ge){j.e(ge);}finally{j.f();}if(Q===void 0&&(Q=this._timelinePlayer.time()),!this._options.slidingWindow){fe.next=16;break;}if((ne=S.default.slideIndexFromTime(Q,this.slides))+1<this.slides.length&&this.slides[ne+1].isViewRendering)return S.default.warn("Slide ".concat(ne+1," is still rendering, pausing the player")),fe.next=10,this.pause();fe.next=11;break;case 10:return fe.abrupt("return");case 11:if(ne=!1,ne=this._state===l.READY||2<Math.abs(Q-this._timelinePlayer.time())||ne)return fe.next=16,this.pause(Q);fe.next=16;break;case 16:if(S.default.debug("Playing on startTime : ".concat(Q," and endTime : ").concat(F)),this._state=l.PLAYING,this._timelinePlayer.onComplete=function(){se.callCallbacks("ended");},this._timelinePlayer.onStart=function(){S.default.debug("Number of video players : ".concat(O.MediaPlayerCache.getInstance(se.containerId).playersSize())),se.callCallbacks("start");},this._timelinePlayer.onUpdate=function(){se.callCallbacks("update");},X)return fe.next=24,this.scheduleUnMute(Q);fe.next=24;break;case 24:if(!O.MediaPlayerCache.useGainVolume){fe.next=30;break;}if(le=re.AudioContextSingleton.getInstance(),(le=le.getAudioContext())&&le.state!=="running")return fe.next=30,le.resume();fe.next=30;break;case 30:this._timelinePlayer.play(Q,F);case 31:case"end":return fe.stop();}},Y,this);}));}},{key:"stop",value:function(){return f(this,void 0,void 0,t().mark(function Q(){return t().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(this._state===l.PLAYING||this._state===l.PAUSED)return this._state=l.ENDED,F.next=4,this.pause(0);F.next=4;break;case 4:case"end":return F.stop();}},Q,this);}));}},{key:"pause",value:function(){var Q=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,F=1<arguments.length?arguments[1]:void 0;return f(this,void 0,void 0,t().mark(function X(){var Y,j,D,$,ne,le;return t().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(this._state!==l.PLAYING&&this._state!==l.FORCEBUFFERING&&this._state!==l.PAUSED&&this._state!==l.READY){se.next=24;break;}if(Q===void 0&&(Q=this._timelinePlayer.time()),!this._options.slidingWindow){se.next=17;break;}for(le=S.default.slideIndexFromTime(Q,this.slides),Y=!1,le=le<=this._options.slidingWindow/2?0:le-Math.floor(this._options.slidingWindow/2),j=le+this._options.slidingWindow,D=[],$=[],ne=le;ne<j&&ne<this.slides.length;ne++)this.slides[ne].isViewRendered||this.slides[ne].isViewRendering||(this.slides[ne].Layers.length===0&&(this.slides[ne].buildLazyLayers(),this._slidesBeforeRender[ne].updateLayers(S.default.cloneDeep(this.slides[ne].Layers))),D.push(this.slides[ne].render(this._story.element
162(),this._timelinePlayer.videoTimeline)),this._options.render||$.push(this.slides[ne].sync(this._timelinePlayer.mainTimeline,this.callbacks.get("buffering"),this.callbacks.get("ready"))),Y=!0);return se.next=12,Promise.all(D);case 12:return se.next=14,Promise.all($);case 14:return se.next=16,this.renderStoryAudios();case 16:Y&&(N.default.CoordinateTransitions(this.slides),N.default.CoordinateMaster(this.slides),this._state===l.PAUSED&&this._timelinePlayer.pause(0));case 17:return this._state=l.PAUSED,this._timelinePlayer.pause(Q),(le=[]).push(this.pauseAudio(Q)),le.push(this.pauseVideo(Q,F)),se.next=24,Promise.all(le);case 24:case"end":return se.stop();}},X,this);}));}},{key:"syncAllComponents",value:function(Q,F,X){if(this._storyAudios&&this._storyAudios.sync(Q,F,X),this._slides&&0<this._slides.length){var Y,j=o(this._slides);try{for(j.s();!(Y=j.n()).done;)Y.value.sync(Q,F,X);}catch(D){j.e(D);}finally{j.f();}}}},{key:"pauseAudio",value:function(){var Q=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;return f(this,void 0,void 0,t().mark(function F(){return t().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(this._storyAudios)return X.next=3,this._storyAudios.pause(Q);X.next=3;break;case 3:case"end":return X.stop();}},F,this);}));}},{key:"pauseVideo",value:function(){var Q=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,F=1<arguments.length?arguments[1]:void 0;return f(this,void 0,void 0,t().mark(function X(){var Y,j,D;return t().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(!(this._slides&&0<this._slides.length)){$.next=24;break;}Y=[],j=o(this._slides),$.prev=3,j.s();case 5:if((D=j.n()).done){$.next=14;break;}return D=D.value,$.t0=Y,$.next=10,D.pause(Q,F);case 10:$.t1=$.sent,$.t0.push.call($.t0,$.t1);case 12:$.next=5;break;case 14:$.next=19;break;case 16:$.prev=16,$.t2=$.catch(3),j.e($.t2);case 19:return $.prev=19,j.f(),$.finish(19);case 22:return $.next=24,Promise.all(Y);case 24:case"end":return $.stop();}},X,this,[[3,16,19,22]]);}));}},{key:"isMuted",value:function(){if(this._options.isUsedByCollections){var Q=this.timelinePlayer.time();if(this.story)return te.default.getAllContainedPlayers(Q,this.story.mediaTimeLines,this.containerId).reduce(function(F,X){return X.element.muted&&F;},!0);}}},{key:"scheduleUnMute",value:function(Q){return f(this,void 0,void 0,t().mark(function F(){var X;return t().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(!this._options.isUsedByCollections){Y.next=7;break;}if(this.story)return Q===void 0&&(Q=this.timelinePlayer.time()),X=te.default.getAllContainedPlayers(Q,this.story.mediaTimeLines,this.containerId),X=X.map(function(j){return j.element;}),Y.next=7,Promise.all(X.map(function(j,D){return j.play().then(function(){j.pause(),j.muted=!1;});}));Y.next=7;break;case 7:case"end":return Y.stop();}},F,this);}));}},{key:"pauseOnSlideThumbnail",value:function(Q){return f(this,void 0,void 0,t().mark(function F(){var X;return t().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(!(X=this.slides[Q])){Y.next=13;break;}if(this._state!==l.PLAYING&&this._state!==l.FORCEBUFFERING&&this._state!==l.PAUSED&&this._state!==l.READY){Y.next=13;break;}if(this._state=l.PAUSED,!this._options.slidingWindow){Y.next=8;break;}if(X.render){Y.next=8;break;}return Y.next=8,X.render(this._story.element(),this._timelinePlayer.videoTimeline);case 8:return Y.next=10,this.renderStoryAudios();case 10:return this._timelinePlayer.pause(X.StartTime),Y.next=13,X.displayPreview();case 13:case"end":return Y.stop();}},F,this);}));}},{key:"deMute",value:function(Q){var F;this._options.isUsedByCollections&&this._state===l.PLAYING&&(F=O.MediaPlayerCache.getInstance(this.containerId).players.filter(function(X){return!X.player.paused();}),S.default.warn("Number of not paused players found: ".concat(F.length)),F.forEach(function(X){var Y=Q;Q===void 0&&(Y=!X.element.muted),X.player.muted(Y);}));}},{key:"volume",value:function(Q){if(this._storyAudios)typeof Q=="number"&&(Q={maintrack:{volume:Q}}),Object.prototype.toString.call(Q)==="[object Object]"&&this._storyAudios.volume(Q);else if(Object.prototype.toString.call(Q)==="[object Object]")for(var F=0,X=Object.entries(Q);F<X.length;F++){var j=n(X[F],2),Y=j[0],j=j[1];if(Y==="maintrack"){O.MediaPlayerCache.getInstance(this.containerId).setVolumeGlobally(j.volume);break;}}else typeof Q=="number"&&O.MediaPlayerCache.getInstance(this.containerId).setVolumeGlobally(Q);}},{key:"duration",value:function(){var Q=0;return Q=this._timelinePlayer?this._timelinePlayer.duration():Q;}}
162,{key:"on",value:function(Q,F){return!!this.callbacks.has(Q)&&(this.callbacks.get(Q).push(F),!0);}},{key:"callCallbacks",value:function(Q,F){if(this.callbacks.has(Q)){var X,Y=o(this.callbacks.get(Q));try{for(Y.s();!(X=Y.n()).done;)(0,X.value)(this._timelinePlayer.time(),F);}catch(j){Y.e(j);}finally{Y.f();}}}},{key:"timelinePlayer",get:function(){return this._timelinePlayer;}},{key:"story",get:function(){return this._story;},set:function(Q){this._story=Q;}},{key:"slides",get:function(){return this._slides;},set:function(Q){this._slides=Q;}},{key:"stash",get:function(){return this._stash;},set:function(Q){this._stash=Q;}},{key:"slidesBeforeRender",get:function(){return this._slidesBeforeRender;},set:function(Q){this._slidesBeforeRender=Q;}},{key:"storyAudios",get:function(){return this._storyAudios;}},{key:"currentTime",get:function(){return this._timelinePlayer.time();}},{key:"currentTimeBeforeRebuild",get:function(){return this._currentTimeBeforeRebuild;}}]);}(H.VDMCorePreviewer),e.VERSION="3.1.0",e.MEDIAID_PREFIX_="mid-",g([(0,M.AsyncGuard)(!0)],e.prototype,"build",null),g([(0,M.AsyncGuard)(!0)],e.prototype,"pause",null),r.VDMPluginPreviewer=e;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(){n=function(){return s;};var a,s={},l=Object.prototype,g=l.hasOwnProperty,f=Object.defineProperty||function(F,X,Y){F[X]=Y.value;},V=typeof Symbol=="function"?Symbol:{},v=V.iterator||"@@iterator",S=V.asyncIterator||"@@asyncIterator",w=V.toStringTag||"@@toStringTag";function C(F,X,Y){return Object.defineProperty(F,X,{value:Y,enumerable:!0,configurable:!0,writable:!0}),F[X];}try{C({},"");}catch{C=function(X,Y,j){return X[Y]=j;};}function I(F,se,Y,fe){var D,$,ne,le,se=se&&se.prototype instanceof z?se:z,se=Object.create(se.prototype),fe=new oe(fe||[]);return f(se,"_invoke",{value:(D=F,$=Y,ne=fe,le=M,function(ge,he){if(le===G)throw Error("Generator is already running");if(le===H){if(ge==="throw")throw he;return{value:a,done:!0};}for(ne.method=ge,ne.arg=he;;){var _e=ne.delegate;if(_e&&(_e=function Re(ee,W){var ae=W.method,de=ee.iterator[ae];return de===a?(W.delegate=null,ae==="throw"&&ee.iterator.return&&(W.method="return",W.arg=a,Re(ee,W),W.method==="throw")||ae!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),B):(ae=O(de,ee.iterator,W.arg),ae.type==="throw"?(W.method="throw",W.arg=ae.arg,W.delegate=null,B):(de=ae.arg,de?de.done?(W[ee.resultName]=de.value,W.next=ee.nextLoc,W.method!=="return"&&(W.method="next",W.arg=a),W.delegate=null,B):de:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,B)));}(_e,ne),_e)){if(_e===B)continue;return _e;}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(le===M)throw le=H,ne.arg;ne.dispatchException(ne.arg);}else ne.method==="return"&&ne.abrupt("return",ne.arg);if(le=G,_e=O(D,$,ne),_e.type==="normal"){if(le=ne.done?H:N,_e.arg===B)continue;return{value:_e.arg,done:ne.done};}_e.type==="throw"&&(le=H,ne.method="throw",ne.arg=_e.arg);}})}),se;}function O(F,X,Y){try{return{type:"normal",arg:F.call(X,Y)};}catch(j){return{type:"throw",arg:j};}}s.wrap=I;var M="suspendedStart",N="suspendedYield",G="executing",H="completed",B={};function z(){}function te(){}function K(){}var V={},U=(C(V,v,function(){return this;}),Object.getPrototypeOf),U=U&&U(U(Q([]))),Z=(U&&U!==l&&g.call(U,v)&&(V=U),K.prototype=z.prototype=Object.create(V));function re(F){["next","throw","return"].forEach(function(X){C(F,X,function(Y){return this._invoke(X,Y);});});}function ue(F,X){var Y;f(this,"_invoke",{value:function(j,D){function $(){return new X(function(ne,le){(function se(ee,ge,he,_e){var Re,ee=O(F[ee],F,ge);if(ee.type!=="throw")return(ge=(Re=ee.arg).value)&&t(ge)=="object"&&g.call(ge,"__await")?X.resolve(ge.__await).then(function(W){se("next",W,he,_e);},function(W){se("throw",W,he,_e);}):X.resolve(ge).then(function(W){Re.value=W,he(Re);},function(W){return se("throw",W,he,_e);});_e(ee.arg);})(j,D,ne,le);});}return Y=Y?Y.then($,$):$();}});}function q(F){var X={tryLoc:F[0]};1 in F&&(X.catchLoc=F[1]),2 in F&&(X.finallyLoc=F[2],X.afterLoc=F[3]),this.tryEntries.push(X);}function J(F){var X=F.completion||{};X.type="normal",delete X.arg,F.completion=X;}function oe(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(q,this),this.reset(!0);}function Q(F){if(F||F===""){var X,Y=F[v];if(Y)return Y.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length))return X=-1,(Y=function j(){for(;++X<F.length;)if(g.call(F,X))return j.value=F[X],j.done=!1,j;return j.value=a,j.done=!0,j;}).next=Y;}throw new TypeError(t(F)+" is not iterable");}return f(Z,"constructor",{value:te.prototype=K,configurable:!0}),f(K,"constructor",{value:te,configurable:!0}),te.displayName=C(K,w,"GeneratorFunction"),s.isGeneratorFunction=function(F){return F=typeof F=="function"&&F.constructor,!!F&&(F===te||(F.displayName||F.name)==="GeneratorFunction");},s.mark=function(F){return Object.setPrototypeOf?Object.setPrototypeOf(F,K):(F.__proto__=K,C(F,w,"GeneratorFunction")),F.prototype=Object.create(Z),F;},s.awrap=function(F){return{__await:F};},re(ue.prototype),C(ue.prototype,S,function(){return this;}),s.AsyncIterator=ue,s.async=function(F,X,Y,j,D){D===void 0&&(D=Promise);var $=new ue(I(F,X,Y,j),D);return s.isGeneratorFunction(X)?$:$.next().then(function(ne){return ne.done?ne.value:$.next();});},re(Z),C(Z,w,"Generator"),C(Z,v,function(){return this;}),C(Z,"toString",function(){return"[object Generator]";}),s.keys=function(F){var X,Y=Object(F),j=[];for(X in Y)j.push(X);return j.reverse(),function D(){for(;j.length;){var $=j.pop();if($ in Y)return D.value=$,D.done=!1,D;}return D.done=!0,D;};},s.values=Q,oe.prototype={constructor:oe,reset:function(F){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEac
162h(J),!F)for(var X in this)X.charAt(0)==="t"&&g.call(this,X)&&!isNaN(+X.slice(1))&&(this[X]=a);},stop:function(){this.done=!0;var F=this.tryEntries[0].completion;if(F.type==="throw")throw F.arg;return this.rval;},dispatchException:function(F){if(this.done)throw F;var X=this;function Y(se,fe){return $.type="throw",$.arg=F,X.next=se,fe&&(X.method="next",X.arg=a),!!fe;}for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j],$=D.completion;if(D.tryLoc==="root")return Y("end");if(D.tryLoc<=this.prev){var ne=g.call(D,"catchLoc"),le=g.call(D,"finallyLoc");if(ne&&le){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}else if(ne){if(this.prev<D.catchLoc)return Y(D.catchLoc,!0);}else{if(!le)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return Y(D.finallyLoc);}}}},abrupt:function(F,X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y];if(j.tryLoc<=this.prev&&g.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var D=j;break;}}var $=(D=D&&(F==="break"||F==="continue")&&D.tryLoc<=X&&X<=D.finallyLoc?null:D)?D.completion:{};return $.type=F,$.arg=X,D?(this.method="next",this.next=D.finallyLoc,B):this.complete($);},complete:function(F,X){if(F.type==="throw")throw F.arg;return F.type==="break"||F.type==="continue"?this.next=F.arg:F.type==="return"?(this.rval=this.arg=F.arg,this.method="return",this.next="end"):F.type==="normal"&&X&&(this.next=X),B;},finish:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X];if(Y.finallyLoc===F)return this.complete(Y.completion,Y.afterLoc),J(Y),B;}},catch:function(F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y,j,D=this.tryEntries[X];if(D.tryLoc===F)return(Y=D.completion).type==="throw"&&(j=Y.arg,J(D)),j;}throw Error("illegal catch attempt");},delegateYield:function(F,X,Y){return this.delegate={iterator:Q(F),resultName:X,nextLoc:Y},this.method==="next"&&(this.arg=a),B;}},s;}function o(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=function(w,C){if(w){if(typeof w=="string")return _(w,C);var I={}.toString.call(w).slice(8,-1);return(I=I==="Object"&&w.constructor?w.constructor.name:I)==="Map"||I==="Set"?Array.from(w):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?_(w,C):void 0;}}(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 163In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function _(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function E(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function x(a,f,l){f=y(f);var g=a,f=h()?Reflect.construct(f,l||[],y(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function h(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!a;})();}function y(a){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}
163var p=this&&this.__awaiter||function(a,s,l,g){return new(l=l||Promise)(function(f,v){function S(I){try{C(g.next(I));}catch(O){v(O);}}function w(I){try{C(g.throw(I));}catch(O){v(O);}}function C(I){var O;I.done?f(I.value):((O=I.value)instanceof l?O:new l(function(M){M(O);})).then(S,w);}C((g=g.apply(a,s||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),m(288)),d=m(323),m=(m(324),function(a){function s(f,v,S,w,C){if(this instanceof s)return(v=x(this,s,[f,v,S,w,C]))._options=C,v.startTime=f.startTime,v.endTime=f.endTime,v.adapterLayers===void 0&&(C=new d.default(f,S,w),v.adapterLayers=C.adapt()),v.callbacks=new Map(),v.callbacks.set("start",void 0),v.callbacks.set("ended",void 0),v;throw new TypeError("Cannot call a class as a function");}var l,g=s;if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");return g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&b(g,a),g=s,(a=[{key:"_buildLayers",value:function(f){var v,S=o(this.adapterLayers);try{for(S.s();!(v=S.n()).done;){var w=v.value;this.layers.push(new c.default(w,f));}}catch(C){S.e(C);}finally{S.f();}}},{key:"buildLazyLayers",value:function(){this._buildLayers(this._options);}},{key:"updateLayers",value:function(f){this.layers.splice(0,this.layers.length);var v,S=o(f);try{for(S.s();!(v=S.n()).done;){var w=v.value;this.layers.push(w);}}catch(C){S.e(C);}finally{S.f();}}},{key:"buildLayers",value:function(f,v,S,w){w.slidingWindow||(f=new d.default(f,v,S),this.adapterLayers=f.adapt(),this._buildLayers(w));}},{key:"frontViewExist",get:function(){return this._frontViewExist;}},{key:"frontViewChanges",get:function(){return this._frontViewChanges;}},{key:"mainViewChanges",get:function(){return this._mainViewChanges;}},{key:"refSlide",get:function(){return this._refSlide;}},{key:"zIndex",get:function(){return this._zIndex;}},{key:"StartTime",get:function(){return this.startTime;}},{key:"EndTime",get:function(){return this.endTime;}},{key:"Layers",get:function(){return this.layers;}},{key:"TimeLine",get:function(){return this.timeline;}},{key:"renderVideo",value:function(f){var v,S=this,w=((this.timeline=f).add(function(){var C=S.callbacks.get("start");C&&C(S.index);},this.startTime).set(this._element,{visibility:"visible"},this.startTime),o(this.layers));try{for(w.s();!(v=w.n()).done;)v.value.renderTimeline(f);}catch(C){w.e(C);}finally{w.f();}}},{key:"render",value:function(f,v){return p(this,void 0,void 0,n().mark(function S(){return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(this.isViewRendered||this.isViewRendering)return w.abrupt("return");w.next=2;break;case 2:return this.setIsViewRendering(!0),w.next=5,this.renderHtml(f);case 5:v&&this.renderVideo(v),this.setIsViewRendered(!0),this.setIsViewRendering(!1);case 8:case"end":return w.stop();}},S,this);}));}},{key:"pause",value:function(f,v){return p(this,void 0,void 0,n().mark(function S(){var w,C,I,O;return n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(this.isViewRendered){M.next=2;break;}return M.abrupt("return");case 2:w=[],C=o(this.layers);try{for(C.s();!(I=C.n()).done;)O=I.value,w.push(O.pause(f,v));}catch(N){C.e(N);}finally{C.f();}return M.next=7,Promise.all(w);case 7:case"end":return M.stop();}},S,this);}));}},{key:"sync",value:function(f,v,S){function w(G,H){G<O.startTime&&G>O.endTime||(M===0&&(f.pause(),Array.isArray(v)&&v.forEach(function(B){return B(G,H);})),M++);}function C(G,H){G<O.startTime&&G>O.endTime||--M<=0&&(M=0,f.resume(),Array.isArray(S)&&S.forEach(function(B){return B(G,H);}));}var I,O=this,M=0,N=o(this.layers);try{for(N.s();!(I=N.n()).done;)I.value.sync(f,[w],[C]);}catch(G){N.e(G);}finally{N.f();}}},{key:"displayPreview",value:function(){return p(this,void 0,void 0,n().mark(function f(){var v,S,w,C;return n().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:v=[],S=o(this.layers);try{for(S.s();!(w=S.n()).done;)C=w.value,v.push(C.displayPreview());}catch(O){S.e(O);}finally{S.f();}return I.next=5,Promise.all(v);case 5:case"end":return I.stop();}},f,this);}));}},{key:"on",value:function(f,v){switch(f){case"start":this.callbacks.set("start",v);break;case"ended":this.callbacks.set("ended",v);break;default:return!1;}return!0;}}])&&E(g.prototype,a),l&&E(g,l),Object.defineProperty(g,"prototype",{writable:!1}),g;}(m(277).default));r.default=m;},function(i,r,g){"use strict";function t(f){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v;}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v;})(f);}function n(){n=function(){return v;};var f,v={},S=Object.prototype,w=S.hasOwnProperty,C=Object.defineProperty||function(D,$,ne){D[$]=ne.value;},ue=typeof Symbol=="function"?Symbol:{},I=ue.iterator||"@@iterator",O=ue.asyncIterator||"@@asyncIterator",M=ue.toStringTag||"@@toStringTag";function N(D,$,ne){return Object.defineProperty(D,$,{value:ne,enumerable:!0,configurable:!0,writable:!0}),D[$];}try{N({},"");}catch{N=function($,ne,le){return $[ne]=le;};}function G(D,_e,ne,Re){var se,fe,ge,he,_e=_e&&_e.prototype instanceof U?_e:U,_e=Object.create(_e.prototype),Re=new Y(Re||[]);return C(_e,"_invoke",{value:(se=D,fe=ne,ge=Re,he=B,function(ee,W){if(he===te)throw Error("Generator is already running");if(he===K){if(ee==="throw")throw W;return{value:f,done:!0};}for(ge.method=ee,ge.arg=W;;){var ae=ge.delegate;if(ae&&(ae=function de(ye,Se){var De=Se.method,Ue=ye.iterator[De];return Ue===f?(Se.delegate=null,De==="throw"&&ye.iterator.return&&
163(Se.method="return",Se.arg=f,de(ye,Se),Se.method==="throw")||De!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+De+"' method")),V):(De=H(Ue,ye.iterator,Se.arg),De.type==="throw"?(Se.method="throw",Se.arg=De.arg,Se.delegate=null,V):(Ue=De.arg,Ue?Ue.done?(Se[ye.resultName]=Ue.value,Se.next=ye.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=f),Se.delegate=null,V):Ue:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,V)));}(ae,ge),ae)){if(ae===V)continue;return ae;}if(ge.method==="next")ge.sent=ge._sent=ge.arg;else if(ge.method==="throw"){if(he===B)throw he=K,ge.arg;ge.dispatchException(ge.arg);}else ge.method==="return"&&ge.abrupt("return",ge.arg);if(he=te,ae=H(se,fe,ge),ae.type==="normal"){if(he=ge.done?K:z,ae.arg===V)continue;return{value:ae.arg,done:ge.done};}ae.type==="throw"&&(he=K,ge.method="throw",ge.arg=ae.arg);}})}),_e;}function H(D,$,ne){try{return{type:"normal",arg:D.call($,ne)};}catch(le){return{type:"throw",arg:le};}}v.wrap=G;var B="suspendedStart",z="suspendedYield",te="executing",K="completed",V={};function U(){}function Z(){}function re(){}var ue={},q=(N(ue,I,function(){return this;}),Object.getPrototypeOf),q=q&&q(q(j([]))),J=(q&&q!==S&&w.call(q,I)&&(ue=q),re.prototype=U.prototype=Object.create(ue));function oe(D){["next","throw","return"].forEach(function($){N(D,$,function(ne){return this._invoke($,ne);});});}function Q(D,$){var ne;C(this,"_invoke",{value:function(le,se){function fe(){return new $(function(ge,he){(function _e(ye,ee,W,ae){var de,ye=H(D[ye],D,ee);if(ye.type!=="throw")return(ee=(de=ye.arg).value)&&t(ee)=="object"&&w.call(ee,"__await")?$.resolve(ee.__await).then(function(Se){_e("next",Se,W,ae);},function(Se){_e("throw",Se,W,ae);}):$.resolve(ee).then(function(Se){de.value=Se,W(de);},function(Se){return _e("throw",Se,W,ae);});ae(ye.arg);})(le,se,ge,he);});}return ne=ne?ne.then(fe,fe):fe();}});}function F(D){var $={tryLoc:D[0]};1 in D&&($.catchLoc=D[1]),2 in D&&($.finallyLoc=D[2],$.afterLoc=D[3]),this.tryEntries.push($);}function X(D){var $=D.completion||{};$.type="normal",delete $.arg,D.completion=$;}function Y(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(F,this),this.reset(!0);}function j(D){if(D||D===""){var $,ne=D[I];if(ne)return ne.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length))return $=-1,(ne=function le(){for(;++$<D.length;)if(w.call(D,$))return le.value=D[$],le.done=!1,le;return le.value=f,le.done=!0,le;}).next=ne;}throw new TypeError(t(D)+" is not iterable");}return C(J,"constructor",{value:Z.prototype=re,configurable:!0}),C(re,"constructor",{value:Z,configurable:!0}),Z.displayName=N(re,M,"GeneratorFunction"),v.isGeneratorFunction=function(D){return D=typeof D=="function"&&D.constructor,!!D&&(D===Z||(D.displayName||D.name)==="GeneratorFunction");},v.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,re):(D.__proto__=re,N(D,M,"GeneratorFunction")),D.prototype=Object.create(J),D;},v.awrap=function(D){return{__await:D};},oe(Q.prototype),N(Q.prototype,O,function(){return this;}),v.AsyncIterator=Q,v.async=function(D,$,ne,le,se){se===void 0&&(se=Promise);var fe=new Q(G(D,$,ne,le),se);return v.isGeneratorFunction($)?fe:fe.next().then(function(ge){return ge.done?ge.value:fe.next();});},oe(J),N(J,M,"Generator"),N(J,I,function(){return this;}),N(J,"toString",function(){return"[object Generator]";}),v.keys=function(D){var $,ne=Object(D),le=[];for($ in ne)le.push($);return le.reverse(),function se(){for(;le.length;){var fe=le.pop();if(fe in ne)return se.value=fe,se.done=!1,se;}return se.done=!0,se;};},v.values=j,Y.prototype={constructor:Y,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var $ in this)$.charAt(0)==="t"&&w.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=f);},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval;},dispatchException:function(D){if(this.done)throw D;var $=this;function ne(_e,Re){return fe.type="throw",fe.arg=D,$.next=_e,Re&&($.method="next",$.arg=f),!!Re;}for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le],fe=se.completion;if(se.tryLoc==="root")return ne("end");if(se.tryLoc<=this.prev){var ge=w.call(se,"catchLoc"),he=w.call(se,"finallyLoc");if(ge&&he){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);
163if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}else if(ge){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);}else{if(!he)throw Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}}}},abrupt:function(D,$){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne];if(le.tryLoc<=this.prev&&w.call(le,"finallyLoc")&&this.prev<le.finallyLoc){var se=le;break;}}var fe=(se=se&&(D==="break"||D==="continue")&&se.tryLoc<=$&&$<=se.finallyLoc?null:se)?se.completion:{};return fe.type=D,fe.arg=$,se?(this.method="next",this.next=se.finallyLoc,V):this.complete(fe);},complete:function(D,$){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&$&&(this.next=$),V;},finish:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.finallyLoc===D)return this.complete(ne.completion,ne.afterLoc),X(ne),V;}},catch:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne,le,se=this.tryEntries[$];if(se.tryLoc===D)return(ne=se.completion).type==="throw"&&(le=ne.arg,X(se)),le;}throw Error("illegal catch attempt");},delegateYield:function(D,$,ne){return this.delegate={iterator:j(D),resultName:$,nextLoc:ne},this.method==="next"&&(this.arg=f),V;}},v;}function o(f,v){return function(S){if(Array.isArray(S))return S;}(f)||function(S,w){var C=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(C!=null){var I,O,M,N,G=[],H=!0,B=!1;try{if(M=(C=C.call(S)).next,w===0){if(Object(C)!==C)return;H=!1;}else for(;!(H=(I=M.call(C)).done)&&(G.push(I.value),G.length!==w);H=!0);}catch(z){B=!0,O=z;}finally{try{if(!H&&C.return!=null&&(N=C.return(),Object(N)!==N))return;}finally{if(B)throw O;}}return G;}}(f,v)||E(f,v)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 164In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(f,v){var S,w=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!w){if(Array.isArray(f)||(w=E(f))||v&&f&&typeof f.length=="number")return w&&(f=w),S=0,{s:v=function(){},n:function(){return S>=f.length?{done:!0}:{done:!1,value:f[S++]};},e:function(M){throw M;},f:v};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 165In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var C,I=!0,O=!1;return{s:function(){w=w.call(f);},n:function(){var M=w.next();return I=M.done,M;},e:function(M){O=!0,C=M;},f:function(){try{I||w.return==null||w.return();}finally{if(O)throw C;}}};}function E(f,v){if(f){if(typeof f=="string")return x(f,v);var S={}.toString.call(f).slice(8,-1);return(S=S==="Object"&&f.constructor?f.constructor.name:S)==="Map"||S==="Set"?Array.from(f):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?x(f,v):void 0;}}function x(f,v){(v==null||v>f.length)&&(v=f.length);for(var S=0,w=Array(v);S<v;S++)w[S]=f[S];return w;}function h(f,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,function(C){return C=function(I,O){if(t(I)!="object"||!I)return I;var M=I[Symbol.toPrimitive];if(M===void 0)return(O==="string"?String:Number)(I);if(M=M.call(I,O||"default"),t(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.");}(C,"string"),t(C)=="symbol"?C:C+"";}(w.key),w);}}function y(f,C,S){C=p(C);var w=f,C=b()?Reflect.construct(C,S||[],p(f).constructor):C.apply(f,S);if(C&&(t(C)=="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(f=w,f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f;}function b(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(b=function(){return!!f;})();}function p(f){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v);})(f);}
165function c(f,v){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,w){return S.__proto__=w,S;})(f,v);}var d=this&&this.__awaiter||function(f,v,S,w){return new(S=S||Promise)(function(C,I){function O(G){try{N(w.next(G));}catch(H){I(H);}}function M(G){try{N(w.throw(G));}catch(H){I(H);}}function N(G){var H;G.done?C(G.value):((H=G.value)instanceof S?H:new S(function(B){B(H);})).then(O,M);}N((w=w.apply(f,v||[])).next());});},m=(Object.defineProperty(r,"__esModule",{value:!0}),g(249)),a=g(5),s=g(273),l=g(271),g=function(f){function v(C,I){if(this instanceof v)return C=y(this,v,[C,I]),l.CorePreviewerEffectUtils.transformEffects(C._animationEffects,{startTime:C.startTime}),0<C._animationEffects.length&&a.default.sortDescendingTimeOffset(C._animationEffects),C;throw new TypeError("Cannot call a class as a function");}var S,w=v;if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");return w.prototype=Object.create(f&&f.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),Object.defineProperty(w,"prototype",{writable:!1}),f&&c(w,f),w=v,(f=[{key:"buildComponents",value:function(C,I){function O(N){var G,H=_(C.components);try{for(H.s();!(G=H.n()).done;)(function(){var B,z,te=G.value,te=m.default.createComponent(te,I);te&&(B=te.startTime(),z=te.endTime(),N.reduce(function(K,Z){var Z=o(Z,2),U=Z[0],Z=Z[1];return K||B<=Z&&U<=z;},!1)&&(te.width||(te.width=M.attributes.widthVal),te.height||(te.height=M.attributes.heightVal),M.components.push(te),M.startTime=Math.min(M.startTime,te.startTime()),M.endTime=Math.max(M.endTime,te.endTime())));})();}catch(B){H.e(B);}finally{H.f();}}var M=this;this.startTime=v.MAXTIME,this.endTime=0,I.render&&I.renderIntervals&&0<I.renderIntervals.length?O(I.renderIntervals):(I.render&&I.renderIntervals&&I.renderIntervals.length<=0&&a.default.warn("".concat(this.constructor.name,": RenderingOptions: render is true, but renderIntervals not given")),O([[I.minTime||0,I.maxTime||v.MAXTIME]]));}},{key:"renderTimeline",value:function(C){C.set(this._element,{visibility:"visible"},this.startTime);var I,O=_(this._animationEffects);try{for(O.s();!(I=O.n()).done;)I.value.apply(this._element,C,this.startTime);}catch(G){O.e(G);}finally{O.f();}var M,N=_(this.components);try{for(N.s();!(M=N.n()).done;)M.value.renderTimeline(C);}catch(G){N.e(G);}finally{N.f();}}},{key:"getAllEffects",value:function(){var C=this.animationEffects||[],I=this.visualEffects||[];return C.concat(I);}},{key:"pause",value:function(C,I){return d(this,void 0,void 0,n().mark(function O(){var M,N,G,H,B;return n().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:M=function(te){return te.pause!==void 0;},N=[],G=_(this.components);try{for(G.s();!(H=G.n()).done;)B=H.value,M(B)&&N.push(B.pause(C,I));}catch(te){G.e(te);}finally{G.f();}return z.next=6,Promise.all(N);case 6:case"end":return z.stop();}},O,this);}));}},{key:"sync",value:function(C,I,O){var M,N=_(this.components);try{for(N.s();!(M=N.n()).done;){var G=M.value;G.sync!==void 0&&G.sync(C,I,O);}}catch(H){N.e(H);}finally{N.f();}}},{key:"displayPreview",value:function(){return d(this,void 0,void 0,n().mark(function C(){var I,O,M,N,G;return n().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:I=function(B){return B.displayPreview!==void 0;},O=[],M=_(this.components);try{for(M.s();!(N=M.n()).done;)G=N.value,I(G)&&O.push(G.displayPreview());}catch(B){M.e(B);}finally{M.f();}return H.next=6,Promise.all(O);case 6:case"end":return H.stop();}},C,this);}));}},{key:"animationEffects",get:function(){return this._animationEffects;}},{key:"refLayer",get:function(){return this._refLayer;}},{key:"Components",get:function(){return this.components;}}])&&h(w.prototype,f),S&&h(w,S),Object.defineProperty(w,"prototype",{writable:!1}),w;}(s.default);(r.default=g).MAXTIME=3600;},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;
165y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.EffectFactory=void 0;var o=E(290),_=E(252),E=function(){function x(){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");}return h=x,b=[{key:"createEffect",value:function(p){switch(p.type){case"position":return new o.CanvasPositionEffect(p);case"canvasScale":return new _.CanvasScaleEffect(p);default:return;}}}],(y=null)&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.EffectFactory=E;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasPositionEffect=void 0,e=function(h){function y(c){if(this instanceof y)return(c=o(this,y,[c]))._fromTop=c.attributes.fromTop,c._fromLeft=c.attributes.fromLeft,c._fromRight=c.attributes.fromRight,c._fromBot=c.attributes.fromBot,c;throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"apply",value:function(c){var d;c&&this.data&&(d={position:{fromLeft:this._fromLeft,fromTop:this._fromTop,fromRight:this._fromRight,fromBot:this._fromBot}},Object.assign(c,d));}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(251).BehavioralEffect),r.CanvasPositionEffect=e;},function(i,r,f){"use strict";function t(v){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S;}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S;})(v);}function n(v,S){for(var w=0;w<S.length;w++){var C=S[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(v,function(I){return I=function(O,M){if(t(O)!="object"||!O)return O;var N=O[Symbol.toPrimitive];if(N===void 0)return(M==="string"?String:Number)(O);if(N=N.call(O,M||"default"),t(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.");}(I,"string"),t(I)=="symbol"?I:I+"";}(C.key),C);}}
165Object.defineProperty(r,"__esModule",{value:!0}),r.CoreEffectFactory=void 0;var o=f(292),_=f(293),E=f(294),x=f(295),h=f(296),y=f(253),b=f(297),p=f(254),c=f(298),d=f(299),m=f(301),a=f(302),s=f(303),l=f(304),g=f(282),f=function(){function v(){if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");}return S=v,C=[{key:"createEffect",value:function(I){switch(I.type){case"circleCrop":return new o.CircleCropEffect(I);case"crop":return new _.CropEffect(I);case"scale":return new E.ScaleEffect(I);case"videoBackground":return new x.VideoBackgroundEffect(I);case"blur":return new h.BlurEffect(I);case"rotate":return new a.RotateEffect(I);case"fade":return new y.FadeEffect(I);case"zoomPan":return new b.ZoomPanEffect(I);case"translate":return new p.TranslateEffect(I);case"timelineBased":return new c.TimelineBasedEffect(I);case"scaleAnimations":return new m.ScaleAnimationsEffect(I);case"activeWordAnnotation":return new d.ActiveWordAnnotationEffect(I);case"transform":return new s.TransformEffect(I);case"headCentering":return new l.HeadCenteringEffect(I);case"backgroundRemoval":return new g.BackgroundRemovalEffect(I);default:return;}}}],(w=null)&&n(S.prototype,w),C&&n(S,C),Object.defineProperty(S,"prototype",{writable:!1}),S;var S,w,C;}();r.CoreEffectFactory=f;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.CircleCropEffect=void 0,e=function(h){function y(c){if(this instanceof y)return o(this,y,[c]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"apply",value:function(c){c.style.borderRadius="50%",c.style.width=c.style.height;}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(25).VisualEffect),r.CircleCropEffect=e;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){return function(s){if(Array.isArray(s))return s;}(m)||function(s,l){var g=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(g!=null){var f,v,S,w,C=[],I=!0,O=!1;try{if(S=(g=g.call(s)).next,l===0){if(Object(g)!==g)return;I=!1;}else for(;!(I=(f=S.call(g)).done)&&(C.push(f.value),C.length!==l);I=!0);}catch(M){O=!0,v=M;}
165finally{try{if(!I&&g.return!=null&&(w=g.return(),Object(w)!==w))return;}finally{if(O)throw v;}}return C;}}(m,a)||function(s,l){if(s){if(typeof s=="string")return o(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?o(s,l):void 0;}}(m,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 166In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(m,a){(a==null||a>m.length)&&(a=m.length);for(var s=0,l=Array(a);s<a;s++)l[s]=m[s];return l;}function _(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}Object.defineProperty(r,"__esModule",{value:!0}),r.CropEffect=void 0;var b,p=d(25),c=d(5),d=((d=b=b||{})[d.CIRCLE=0]="CIRCLE",d[d.RECTANGLE=1]="RECTANGLE",function(m){function a(g){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var f=(g=E(this,a,[g])).attributes.shape;return g._shape=b.CIRCLE,f!=="CIRCLE"&&f!=="RECTANGLE"||(g._shape=b[f]),g._params=[],g.attributes.hasOwnProperty("params")&&(g._params=g.attributes.params),g;}var s,l=a;if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");return l.prototype=Object.create(m&&m.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),m&&y(l,m),l=a,(m=[{key:"apply",value:function(g){switch(this._shape){case b.CIRCLE:this.cropCircle(g);break;case b.RECTANGLE:this.cropRectangle(g);}}},{key:"cropCircle",value:function(g){var f,S=this.parseCss(g.style.width).num,v=this.parseCss(g.style.height).num,S=Math.min(S,v);this._params.length!==3?(g.style.borderRadius=S+"px",g.style.width=S+"px",g.style.height=S+"px"):(S=(v=n(c.default.scale(this._params,this.scale),3))[0],f=v[1],v=v[2],g.style.clipPath="circle(".concat(v,"px at ").concat(S,"px ").concat(f,"px"),c.default.debug("circle(".concat(v,"px at ").concat(S,"px ").concat(f,"px")));}},{key:"cropRectangle",value:function(g){var w=n(c.default.scale(this._params,this.scale),4),f=w[0],v=w[1],S=w[2],w=w[3];
166g.style.clipPath="polygon(".concat(f,"px ").concat(v,"px, ").concat(S,"px ").concat(v,"px, ").concat(S,"px ").concat(w,"px, ").concat(f,"px ").concat(w,"px");}}])&&_(l.prototype,m),s&&_(l,s),Object.defineProperty(l,"prototype",{writable:!1}),l;}(p.VisualEffect));r.CropEffect=d;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0}),r.ScaleEffect=void 0;var h,y=p(25),b=p(5),p=((p=h=h||{})[p.FILL=0]="FILL",p[p.FIT=1]="FIT",p[p.ZOOM=2]="ZOOM",function(c){function d(s){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");(s=o(this,d,[s]))._width=b.default.scale(s.attributes.width,s.scale),s._height=b.default.scale(s.attributes.height,s.scale);var l=s.attributes.style;return s._style=s.setScaleStyle(l),s;}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"setScaleStyle",value:function(s){var l=h.FILL;return l=s!=="FILL"&&s!=="FIT"&&s!=="ZOOM"?l:h[s];}},{key:"apply",value:function(s){this._width!==-1&&(s.style.width=this._width+"px"),this._height!==-1&&(s.style.height=this._height+"px"),s.tagName==="VIDEO"?this.adjustVideo(s):this.adjustImage(s);}},{key:"adjustImage",value:function(s){switch(this._style){case h.FILL:s.style.backgroundSize="100% 100%";break;case h.FIT:s.style.backgroundSize="contain";break;case h.ZOOM:s.style.backgroundSize="cover";}}},{key:"adjustVideo",value:function(s){switch(this._style){case h.FILL:s.style.objectFit="fill";break;case h.FIT:s.style.objectFit="contain";break;case h.ZOOM:s.style.objectFit="cover";}}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(y.VisualEffect));r.ScaleEffect=p;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
166p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.VideoBackgroundEffect=void 0;var h=b(25),y=b(5),b=function(p){function c(a){if(this instanceof c)return(a=o(this,c,[a])).blur=a.attributes.blur,a.width=y.default.scale(a.attributes.width,a.scale),a.height=y.default.scale(a.attributes.height,a.scale),a;throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"apply",value:function(a){var s=document.createElement("canvas");s.className="canvas-blur",a.insertBefore(s,a.firstChild),this.applyCanvasStyle(s);}},{key:"applyCanvasStyle",value:function(a){a.style.width="100%",a.style.height="100%",a.style.zIndex="1",a.style.position="absolute",a.width=this.width,a.height=this.height,a.style.filter="blur(".concat(this.blur,"px)"),a.style.webkitFilter="blur(".concat(this.blur,"px)");}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.VisualEffect);r.VideoBackgroundEffect=b;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.BlurEffect=void 0,e=function(h){function y(c){if(this instanceof y)return(c=o(this,y,[c]))._value=c.attributes.value,c;throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"apply",value:function(c){c.style.filter=(c.style.filter?c.style.filter+" ":"")+"blur(".concat(this._value,"px)"),c.style.webkitFilter="blur(".concat(this._value,"px)");}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(25).VisualEffect),r.BlurEffect=e;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=E(l);var s=d,l=_()?Reflect.construct(l,a||[],E(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}
166function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function x(d,m){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0}),r.ZoomPanEffect=void 0;var h=c(48),y=c(5),b=c(71),p=c(2),c=function(d){function m(l){if(this instanceof m)return(l=o(this,m,[l]))._panX=!1,l._panY=!1,l._fromVal=1,l.attributes.fromVal&&(l._fromVal=y.default.clamp(l.attributes.fromVal,0,10)),l._toVal=1,l.attributes.toVal&&(l._toVal=y.default.clamp(l.attributes.toVal,0,10)),l._fromX=0,l._toX=0,l._fromY=0,l._toY=0,(l.attributes.hasOwnProperty("fromX")||l.attributes.hasOwnProperty("toX"))&&(l._panX=!0),(l.attributes.hasOwnProperty("fromY")||l.attributes.hasOwnProperty("toY"))&&(l._panY=!0),l.attributes.hasOwnProperty("fromX")&&(l._fromX=y.default.scale(l.attributes.fromX,l.scale)),l.attributes.hasOwnProperty("toX")&&(l._toX=y.default.scale(l.attributes.toX,l.scale)),l._easeX=b.default.byName("linear"),l.attributes.hasOwnProperty("easeX")&&(l._easeX=l.attributes.easeX),l.attributes.hasOwnProperty("fromY")&&(l._fromY=l.attributes.fromY),l.attributes.hasOwnProperty("toY")&&(l._toY=l.attributes.toY),l._easeY=b.default.byName("linear"),l.attributes.hasOwnProperty("easeY")&&(l._easeY=l.attributes.easeY),l;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&x(s,d),s=m,(d=[{key:"build",value:function(){function l(O){return Math.ceil(100*O)+"%";}var g=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,f=this.element.offsetWidth,v=this.element.offsetHeight,C=f*(this._fromVal-1)/2,S=v*(this._fromVal-1)/2,I=f*(this._toVal-1)/2,w=v*(this._toVal-1)/2,C=(this._panX&&(l((C-this._fromX*this._fromVal)/(f*this._fromVal)),l((I-this._toX*this._toVal)/(f*this._toVal))),this._panY&&(l((S-this._fromY*this._fromVal)/(v*this._fromVal)),l((w-this._toY*this._toVal)/(f*this._toVal))),{force3D:!0,scale:this._toVal,duration:this.duration}),I=(typeof this.ease=="string"&&0<this.ease.length&&(C.ease=this.ease),p.gsap.fromTo(this.element,{force3D:!0,scale:this._fromVal},C));return this.timeline.add(I,g+this.timeOffset),I;}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(h.AnimationEffect);r.ZoomPanEffect=c;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(g,f){var v,S=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!S){if(Array.isArray(g)||(S=_(g))||f&&g&&typeof g.length=="number")return S&&(g=S),v=0,{s:f=function(){},n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]};},e:function(O){throw O;},f};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 167In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var w,C=!0,I=!1;return{s:function(){S=S.call(g);},n:function(){var O=S.next();return C=O.done,O;},e:function(O){I=!0,w=O;},f:function(){try{C||S.return==null||S.return();}finally{if(I)throw w;}}};}function o(g){return function(f){if(Array.isArray(f))return E(f);}(g)||function(f){if(typeof Symbol<"u"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f);}(g)||_(g)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 168In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(g,f){if(g){if(typeof g=="string")return E(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?E(g,f):void 0;}}function E(g,f){(f==null||f>g.length)&&(f=g.length);for(var v=0,S=Array(f);v<f;v++)S[v]=g[v];return S;}function x(){x=function(){return f;};var g,f={},v=Object.prototype,S=v.hasOwnProperty,w=Object.defineProperty||function(j,D,$){j[D]=$.value;},re=typeof Symbol=="function"?Symbol:{},C=re.iterator||"@@iterator",I=re.asyncIterator||"@@asyncIterator",O=re.toStringTag||"@@toStringTag";function M(j,D,$){return Object.defineProperty(j,D,{value:$,enumerable:!0,configurable:!0,writable:!0}),j[D];}try{M({},"");}catch{M=function(D,$,ne){return D[$]=ne;};}function N(j,he,$,_e){var le,se,fe,ge,he=he&&he.prototype instanceof V?he:V,he=Object.create(he.prototype),_e=new X(_e||[]);return w(he,"_invoke",{value:(le=j,se=$,fe=_e,ge=H,function(Re,ee){if(ge===z)throw Error("Generator is already running");if(ge===te){if(Re==="throw")throw ee;return{value:g,done:!0};}for(fe.method=Re,fe.arg=ee;;){var W=fe.delegate;if(W&&(W=function ae(de,ye){var Se=ye.method,De=de.iterator[Se];return De===g?(ye.delegate=null,Se==="throw"&&de.iterator.return&&
168(ye.method="return",ye.arg=g,ae(de,ye),ye.method==="throw")||Se!=="return"&&(ye.method="throw",ye.arg=new TypeError("The iterator does not provide a '"+Se+"' method")),K):(Se=G(De,de.iterator,ye.arg),Se.type==="throw"?(ye.method="throw",ye.arg=Se.arg,ye.delegate=null,K):(De=Se.arg,De?De.done?(ye[de.resultName]=De.value,ye.next=de.nextLoc,ye.method!=="return"&&(ye.method="next",ye.arg=g),ye.delegate=null,K):De:(ye.method="throw",ye.arg=new TypeError("iterator result is not an object"),ye.delegate=null,K)));}(W,fe),W)){if(W===K)continue;return W;}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(ge===H)throw ge=te,fe.arg;fe.dispatchException(fe.arg);}else fe.method==="return"&&fe.abrupt("return",fe.arg);if(ge=z,W=G(le,se,fe),W.type==="normal"){if(ge=fe.done?te:B,W.arg===K)continue;return{value:W.arg,done:fe.done};}W.type==="throw"&&(ge=te,fe.method="throw",fe.arg=W.arg);}})}),he;}function G(j,D,$){try{return{type:"normal",arg:j.call(D,$)};}catch(ne){return{type:"throw",arg:ne};}}f.wrap=N;var H="suspendedStart",B="suspendedYield",z="executing",te="completed",K={};function V(){}function U(){}function Z(){}var re={},ue=(M(re,C,function(){return this;}),Object.getPrototypeOf),ue=ue&&ue(ue(Y([]))),q=(ue&&ue!==v&&S.call(ue,C)&&(re=ue),Z.prototype=V.prototype=Object.create(re));function J(j){["next","throw","return"].forEach(function(D){M(j,D,function($){return this._invoke(D,$);});});}function oe(j,D){var $;w(this,"_invoke",{value:function(ne,le){function se(){return new D(function(fe,ge){(function he(de,Re,ee,W){var ae,de=G(j[de],j,Re);if(de.type!=="throw")return(Re=(ae=de.arg).value)&&t(Re)=="object"&&S.call(Re,"__await")?D.resolve(Re.__await).then(function(ye){he("next",ye,ee,W);},function(ye){he("throw",ye,ee,W);}):D.resolve(Re).then(function(ye){ae.value=ye,ee(ae);},function(ye){return he("throw",ye,ee,W);});W(de.arg);})(ne,le,fe,ge);});}return $=$?$.then(se,se):se();}});}function Q(j){var D={tryLoc:j[0]};1 in j&&(D.catchLoc=j[1]),2 in j&&(D.finallyLoc=j[2],D.afterLoc=j[3]),this.tryEntries.push(D);}function F(j){var D=j.completion||{};D.type="normal",delete D.arg,j.completion=D;}function X(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0);}function Y(j){if(j||j===""){var D,$=j[C];if($)return $.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length))return D=-1,($=function ne(){for(;++D<j.length;)if(S.call(j,D))return ne.value=j[D],ne.done=!1,ne;return ne.value=g,ne.done=!0,ne;}).next=$;}throw new TypeError(t(j)+" is not iterable");}return w(q,"constructor",{value:U.prototype=Z,configurable:!0}),w(Z,"constructor",{value:U,configurable:!0}),U.displayName=M(Z,O,"GeneratorFunction"),f.isGeneratorFunction=function(j){return j=typeof j=="function"&&j.constructor,!!j&&(j===U||(j.displayName||j.name)==="GeneratorFunction");},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,Z):(j.__proto__=Z,M(j,O,"GeneratorFunction")),j.prototype=Object.create(q),j;},f.awrap=function(j){return{__await:j};},J(oe.prototype),M(oe.prototype,I,function(){return this;}),f.AsyncIterator=oe,f.async=function(j,D,$,ne,le){le===void 0&&(le=Promise);var se=new oe(N(j,D,$,ne),le);return f.isGeneratorFunction(D)?se:se.next().then(function(fe){return fe.done?fe.value:se.next();});},J(q),M(q,O,"Generator"),M(q,C,function(){return this;}),M(q,"toString",function(){return"[object Generator]";}),f.keys=function(j){var D,$=Object(j),ne=[];for(D in $)ne.push(D);return ne.reverse(),function le(){for(;ne.length;){var se=ne.pop();if(se in $)return le.value=se,le.done=!1,le;}return le.done=!0,le;};},f.values=Y,X.prototype={constructor:X,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(F),!j)for(var D in this)D.charAt(0)==="t"&&S.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=g);},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval;},dispatchException:function(j){if(this.done)throw j;var D=this;function $(he,_e){return se.type="throw",se.arg=j,D.next=he,_e&&(D.method="next",D.arg=g),!!_e;}for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne],se=le.completion;if(le.tryLoc==="root")return $("end");if(le.tryLoc<=this.prev){var fe=S.call(le,"catchLoc"),ge=S.call(le,"finallyLoc");if(fe&&ge){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);if(this.prev<le.finallyLoc)return $(le.finallyLoc);}else if(fe){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);}else{if(!ge)throw Error("try statement without catch or finally");if(this.prev<le.finallyLoc)return $(le.finallyLoc);}}}},abrupt:function(j,D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];
168if(ne.tryLoc<=this.prev&&S.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var le=ne;break;}}var se=(le=le&&(j==="break"||j==="continue")&&le.tryLoc<=D&&D<=le.finallyLoc?null:le)?le.completion:{};return se.type=j,se.arg=D,le?(this.method="next",this.next=le.finallyLoc,K):this.complete(se);},complete:function(j,D){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&D&&(this.next=D),K;},finish:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.finallyLoc===j)return this.complete($.completion,$.afterLoc),F($),K;}},catch:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $,ne,le=this.tryEntries[D];if(le.tryLoc===j)return($=le.completion).type==="throw"&&(ne=$.arg,F(le)),ne;}throw Error("illegal catch attempt");},delegateYield:function(j,D,$){return this.delegate={iterator:Y(j),resultName:D,nextLoc:$},this.method==="next"&&(this.arg=g),K;}},f;}function h(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}function y(g,w,v){w=p(w);var S=g,w=b()?Reflect.construct(w,v||[],p(g).constructor):w.apply(g,v);if(w&&(t(w)=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(g=S,g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g;}function b(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(b=function(){return!!g;})();}function p(g){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f);})(g);}function c(g,f){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,S){return v.__proto__=S,v;})(g,f);}var d=this&&this.__awaiter||function(g,f,v,S){return new(v=v||Promise)(function(w,C){function I(N){try{M(S.next(N));}catch(G){C(G);}}function O(N){try{M(S.throw(N));}catch(G){C(G);}}function M(N){var G;N.done?w(N.value):((G=N.value)instanceof v?G:new v(function(H){H(G);})).then(I,O);}M((S=S.apply(g,f||[])).next());});},m=(Object.defineProperty(r,"__esModule",{value:!0}),r.TimelineBasedEffect=void 0,l(48)),a=l(2),s=l(12),l=function(g){function f(w){var C;if(this instanceof f)return w.attributes.diffValue=new Date(),(w=y(this,f,[w])).containerEffect=(C=w.attributes.container)!=null?C:[],w.charsEffect=(C=w.attributes.chars)!=null?C:[],w.wordsEffect=(C=w.attributes.words)!=null?C:[],w.backgroundsEffect=(C=w.attributes.backgrounds)!=null?C:[],w;throw new TypeError("Cannot call a class as a function");}var v,S=f;if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");return S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),g&&c(S,g),S=f,(g=[{key:"buildTextSections",value:function(w){return d(this,void 0,void 0,x().mark(function C(){return x().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:this.textWrapElm=w.textElement,this.splitData=this.splitText(w.textElement);case 2:case"end":return I.stop();}},C,this);}));}},{key:"build",value:function(){var w,C,I=this,O=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,M=(this.splitData===void 0&&(C=(w=function(G){if(G!=null)return G.nodeName==="SPAN"?G:w((G=G.childNodes)==null?void 0:G[0]);})(this.element),this.buildTextSections({textElement:C})),this.splitData.backgrounds.forEach(function(G){var H=G.nextSibling.getBoundingClientRect(),B=window.getComputedStyle(G);G.style.width="".concat((100+100*parseFloat(B.paddingLeft)/H.width+100*parseFloat(B.paddingRight)/H.width).toFixed(2),"%"),G.style.height="100%",G.style.marginLeft="".concat(-parseFloat(B.paddingLeft),"px"),G.style.top="".concat(parseFloat(B.paddingTop),"px"),I.wordsEffect.length===0&&(H=G.parentElement.getBoundingClientRect(),G.style.width="".concat((100+100*parseFloat(B.paddingLeft)/H.width+100*parseFloat(B.paddingRight)/H.width).toFixed(2),"%"),G.nextSibling.style.display="inline",H=G.nextSibling.getBoundingClientRect(),G.nextSibling.style.display="inline-block",G.style.height="".concat(H.height,"px")),G.style.removeProperty("padding");}),a.gsap.timeline()),N=a.gsap.timeline();return this.textWrapElm.style.backgroundColor===""||function(G){return G=window.getComputedStyle(G).backgroundColor,G.includes("rgba")&&parseFloat(G.split(",")[3])===0;}(this.textWrapElm)?(0<this.splitData.words.length&&this.wordsEffect.forEach(function(G){M[G.func]instanceof Function&&M[G.func].apply(M,[I.splitData.words].concat(o((G=G.vars)!=null?G:[])));}),0<this.splitData.chars.length&&this.charsEffect.forEach(function(G){M[G.func]instanceof Function&&M[G.func].apply(M,[I.splitData.chars].concat(o((G=G.vars)!=null?G:[])));}),0<this.splitData.backgrounds.length&&this.backgroundsEffect.forEach(function(G){var H,B,z,te,K;N[G.func]instanceof Function&&(G.vars.length===1&&"stagger"in G.vars[0]&&G.vars[0].stagger==="effectStagger"?(H=G,B=N,z=I.duration-H.vars[0].delay-H.vars[0].duration,te=0,I.splitData.backgrounds.forEach(function(V){te+=V.getBoundingClientRect().width;}),K=z/te,"maxDurationPerPx"in H.vars[0]&&K>H.vars[0].maxDurationPerPx&&(K=H.vars[0].maxDurationPerPx),delete H.vars[0].stagger,delete H.vars[0].duration,delete H.vars[0].maxDurationPerPx,I.splitData.backgrounds.forEach(function(V){H.vars[0].duration=K*V.getBoundingClientRect().width,B[H.func](V,H.vars[0]),delete H.vars[0].delay;})):N[G.func].apply(N,[I.splitData.backgrounds].concat(o((z=G.vars)!=null?z:[]))));}),this.containerEffect.forEach(function(G){M[G.func]instanceof Function&&M[G.func].apply(M,[I.textWrapElm].concat(o((G=G.vars)!=null?G:[])));})):this.wordsEffect.forEach(function(G){M[G.func]instanceof Function&&M[G.func].apply(M,[I.textWrapElm].concat(o((G=G.vars)!=null?G:[])));}),this.textWrapElm.parentElement.style.width=parseFloat(this.textWrapElm.parentElement.style.width)+"px",this.timeline.add(M,O+this.timeOffset),this.timeline.add(N,O+this.timeOffset),M;}},{key:"splitText",value:function(w){return w=this.getTextNodes(w),this.modifyTextElements(w);}},{key:"getTextNodes",value:function(w){var C=[];if(w!=null){var I,O=n(w.childNodes);try{for(O.s();!(I=O.n()).done;){var M=I.value;M.nodeName==="#text"?C.push(M):C=C.concat(this.getTextNodes(M));}}catch(N){O.e(N);}finally{O.f();}}return C;}},{key:"createCharacterElement",value:function(w){var C=document.createElement("span");return C.textContent=w,C.style.fontFamily="inherit",C.style.display="inline-block",C;}},{key:"createWordElement",value:function(w){var C=document.createElement("div"),I=(C.style.display="inline-block",C.style.position="relative",C.style.fontFamily="inherit",document.createElement("span"));return I.textContent=w,I.style.fontFamily="inherit",C.append(I),w.trim()===""&&(s.MediaPlayerCache.isSafari?C.style.whiteSpace="pre-wrap":C.style.whiteSpace="pre"),C;}},{key:"splitCharacters",value:function(w){var C=this,I=w.parentNode,O=w.textContent,M=[];return o(O).forEach(function(N){N=C.createCharacterElement(N),I.append(N),M.push(N);}),I.removeChild(w),M;}},{key:"splitWords",value:function(w){var C=w.parentNode,I=w.nodeValue.toString().split(/(\s+)/),O=(I[I.length-1]===""&&I.pop(),[]),M=[],N=void 0,G=(C.style.backgroundColor!==""&&(N=C.style.backgroundColor,C.style.backgroundColor=""),void 0);C.style.borderRadius!==""&&(G=C.style.borderRadius,C.style.borderRadius="");for(var H=0;H<I.length;H++){var B,z,te=I[H],K=this.createWordElement(te);G&&(K.firstChild.style.borderRadius=G),N&&this.backgroundsEffect.length===0?(K.firstChild.style.backgroundColor=N,K.firstChild.style.padding=C.style.padding,K.style.marginLeft="-0.5px"):N&&(0<this.backgroundsEffect.length||0<this.charsEffect.length)&&(B=window.getComputedStyle(C),(z=document.createElement("span")).style.fontFamily="inherit",z.style.position="absolute",z.style.backgroundColor=N,z.style.zIndex="-1",z.style.paddingTop=B.paddingTop,te.trim()!==""?(H===0&&(z.style.paddingLeft=B.paddingLeft),H===I.length-1&&(z.style.paddingRight=B.paddingRight)):(z.style.paddingRight="0.25px",z.style.paddingLeft="0.25px"),K.prepend(z),M.push(z)),O.push(K),C.append(K);}return C.removeChild(w),{wordsElements:O,backgroundElements:M};}},{key:"modifyTextElements",value:function(w){var C,I={words:[],chars:[],backgrounds:[]},O=n(w);try{for(O.s();!(C=O.n()).done;){var M=C.value;if(0<this.wordsEffect.length&&this.charsEffect.length===0){var N=this.splitWords(M),G=N.wordsElements,H=N.backgroundElements;I.words=I.words.concat(G),I.backgrounds=I.backgrounds.concat(H);}else if(0<this.charsEffect.length){for(var B=this.splitWords(M),z=B.wordsElements,te=B.backgroundElements,K=0;K<z.length;K++){var V=z[K],U=this.splitCharacters(V.lastChild);I.chars=I.chars.concat(U);}I.backgrounds=I.backgrounds.concat(te);}}}catch(Z){O.e(Z);}finally{O.f();}return I;}}])&&h(S.prototype,g),v&&h(S,v),Object.defineProperty(S,"prototype",{writable:!1}),S;}(m.AnimationEffect);r.TimelineBasedEffect=l;},function(i,r,g){"use strict";function t(f){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v;}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v;})(f);}function n(f,v){var S,w=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];
168if(!w){if(Array.isArray(f)||(w=function(M,N){if(M){if(typeof M=="string")return o(M,N);var G={}.toString.call(M).slice(8,-1);return(G=G==="Object"&&M.constructor?M.constructor.name:G)==="Map"||G==="Set"?Array.from(M):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?o(M,N):void 0;}}(f))||v&&f&&typeof f.length=="number")return w&&(f=w),S=0,{s:v=function(){},n:function(){return S>=f.length?{done:!0}:{done:!1,value:f[S++]};},e:function(M){throw M;},f:v};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 169In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var C,I=!0,O=!1;return{s:function(){w=w.call(f);},n:function(){var M=w.next();return I=M.done,M;},e:function(M){O=!0,C=M;},f:function(){try{I||w.return==null||w.return();}finally{if(O)throw C;}}};}function o(f,v){(v==null||v>f.length)&&(v=f.length);for(var S=0,w=Array(v);S<v;S++)w[S]=f[S];return w;}function _(){_=function(){return v;};var f,v={},S=Object.prototype,w=S.hasOwnProperty,C=Object.defineProperty||function(D,$,ne){D[$]=ne.value;},ue=typeof Symbol=="function"?Symbol:{},I=ue.iterator||"@@iterator",O=ue.asyncIterator||"@@asyncIterator",M=ue.toStringTag||"@@toStringTag";function N(D,$,ne){return Object.defineProperty(D,$,{value:ne,enumerable:!0,configurable:!0,writable:!0}),D[$];}try{N({},"");}catch{N=function($,ne,le){return $[ne]=le;};}function G(D,_e,ne,Re){var se,fe,ge,he,_e=_e&&_e.prototype instanceof U?_e:U,_e=Object.create(_e.prototype),Re=new Y(Re||[]);return C(_e,"_invoke",{value:(se=D,fe=ne,ge=Re,he=B,function(ee,W){if(he===te)throw Error("Generator is already running");if(he===K){if(ee==="throw")throw W;return{value:f,done:!0};}for(ge.method=ee,ge.arg=W;;){var ae=ge.delegate;if(ae&&(ae=function de(ye,Se){var De=Se.method,Ue=ye.iterator[De];return Ue===f?(Se.delegate=null,De==="throw"&&ye.iterator.return&&(Se.method="return",Se.arg=f,de(ye,Se),Se.method==="throw")||De!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+De+"' method")),V):(De=H(Ue,ye.iterator,Se.arg),De.type==="throw"?(Se.method="throw",Se.arg=De.arg,Se.delegate=null,V):(Ue=De.arg,Ue?Ue.done?(Se[ye.resultName]=Ue.value,Se.next=ye.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=f),Se.delegate=null,V):Ue:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,V)));}(ae,ge),ae)){if(ae===V)continue;return ae;}if(ge.method==="next")ge.sent=ge._sent=ge.arg;else if(ge.method==="throw"){if(he===B)throw he=K,ge.arg;ge.dispatchException(ge.arg);}else ge.method==="return"&&ge.abrupt("return",ge.arg);if(he=te,ae=H(se,fe,ge),ae.type==="normal"){if(he=ge.done?K:z,ae.arg===V)continue;return{value:ae.arg,done:ge.done};}ae.type==="throw"&&(he=K,ge.method="throw",ge.arg=ae.arg);}})}),_e;}function H(D,$,ne){try{return{type:"normal",arg:D.call($,ne)};}catch(le){return{type:"throw",arg:le};}}v.wrap=G;var B="suspendedStart",z="suspendedYield",te="executing",K="completed",V={};function U(){}function Z(){}function re(){}var ue={},q=(N(ue,I,function(){return this;}),Object.getPrototypeOf),q=q&&q(q(j([]))),J=(q&&q!==S&&w.call(q,I)&&(ue=q),re.prototype=U.prototype=Object.create(ue));function oe(D){["next","throw","return"].forEach(function($){N(D,$,function(ne){return this._invoke($,ne);});});}function Q(D,$){var ne;C(this,"_invoke",{value:function(le,se){function fe(){return new $(function(ge,he){(function _e(ye,ee,W,ae){var de,ye=H(D[ye],D,ee);if(ye.type!=="throw")return(ee=(de=ye.arg).value)&&t(ee)=="object"&&w.call(ee,"__await")?$.resolve(ee.__await).then(function(Se){_e("next",Se,W,ae);},function(Se){_e("throw",Se,W,ae);}):$.resolve(ee).then(function(Se){de.value=Se,W(de);},function(Se){return _e("throw",Se,W,ae);});ae(ye.arg);})(le,se,ge,he);});}return ne=ne?ne.then(fe,fe):fe();}});}function F(D){var $={tryLoc:D[0]};1 in D&&($.catchLoc=D[1]),2 in D&&($.finallyLoc=D[2],$.afterLoc=D[3]),this.tryEntries.push($);}function X(D){var $=D.completion||{};$.type="normal",delete $.arg,D.completion=$;}function Y(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(F,this),this.reset(!0);}
169function j(D){if(D||D===""){var $,ne=D[I];if(ne)return ne.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length))return $=-1,(ne=function le(){for(;++$<D.length;)if(w.call(D,$))return le.value=D[$],le.done=!1,le;return le.value=f,le.done=!0,le;}).next=ne;}throw new TypeError(t(D)+" is not iterable");}return C(J,"constructor",{value:Z.prototype=re,configurable:!0}),C(re,"constructor",{value:Z,configurable:!0}),Z.displayName=N(re,M,"GeneratorFunction"),v.isGeneratorFunction=function(D){return D=typeof D=="function"&&D.constructor,!!D&&(D===Z||(D.displayName||D.name)==="GeneratorFunction");},v.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,re):(D.__proto__=re,N(D,M,"GeneratorFunction")),D.prototype=Object.create(J),D;},v.awrap=function(D){return{__await:D};},oe(Q.prototype),N(Q.prototype,O,function(){return this;}),v.AsyncIterator=Q,v.async=function(D,$,ne,le,se){se===void 0&&(se=Promise);var fe=new Q(G(D,$,ne,le),se);return v.isGeneratorFunction($)?fe:fe.next().then(function(ge){return ge.done?ge.value:fe.next();});},oe(J),N(J,M,"Generator"),N(J,I,function(){return this;}),N(J,"toString",function(){return"[object Generator]";}),v.keys=function(D){var $,ne=Object(D),le=[];for($ in ne)le.push($);return le.reverse(),function se(){for(;le.length;){var fe=le.pop();if(fe in ne)return se.value=fe,se.done=!1,se;}return se.done=!0,se;};},v.values=j,Y.prototype={constructor:Y,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var $ in this)$.charAt(0)==="t"&&w.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=f);},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval;},dispatchException:function(D){if(this.done)throw D;var $=this;function ne(_e,Re){return fe.type="throw",fe.arg=D,$.next=_e,Re&&($.method="next",$.arg=f),!!Re;}for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le],fe=se.completion;if(se.tryLoc==="root")return ne("end");if(se.tryLoc<=this.prev){var ge=w.call(se,"catchLoc"),he=w.call(se,"finallyLoc");if(ge&&he){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}else if(ge){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);}else{if(!he)throw Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}}}},abrupt:function(D,$){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne];if(le.tryLoc<=this.prev&&w.call(le,"finallyLoc")&&this.prev<le.finallyLoc){var se=le;break;}}var fe=(se=se&&(D==="break"||D==="continue")&&se.tryLoc<=$&&$<=se.finallyLoc?null:se)?se.completion:{};return fe.type=D,fe.arg=$,se?(this.method="next",this.next=se.finallyLoc,V):this.complete(fe);},complete:function(D,$){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&$&&(this.next=$),V;},finish:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.finallyLoc===D)return this.complete(ne.completion,ne.afterLoc),X(ne),V;}},catch:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne,le,se=this.tryEntries[$];if(se.tryLoc===D)return(ne=se.completion).type==="throw"&&(le=ne.arg,X(se)),le;}throw Error("illegal catch attempt");},delegateYield:function(D,$,ne){return this.delegate={iterator:j(D),resultName:$,nextLoc:ne},this.method==="next"&&(this.arg=f),V;}},v;}function E(f,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,function(C){return C=function(I,O){if(t(I)!="object"||!I)return I;var M=I[Symbol.toPrimitive];if(M===void 0)return(O==="string"?String:Number)(I);if(M=M.call(I,O||"default"),t(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.");}(C,"string"),t(C)=="symbol"?C:C+"";}(w.key),w);}}function x(f,C,S){C=b(C);var w=f,C=h()?Reflect.construct(C,S||[],b(f).constructor):C.apply(f,S);if(C&&(t(C)=="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(f=w,f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f;}function h(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!f;})();}function y(){return(y=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(f,v,S){var w=function(C,I){for(;!{}.hasOwnProperty.call(C,I)&&(C=b(C))!==null;);return C;}(f,v);if(w)return(w=Object.getOwnPropertyDescriptor(w,v)).get?w.get.call(arguments.length<3?f:S):w.value;}).apply(null,arguments);}function b(f){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v);})(f);}
169function p(f,v){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,w){return S.__proto__=w,S;})(f,v);}var c=this&&this.__awaiter||function(f,v,S,w){return new(S=S||Promise)(function(C,I){function O(G){try{N(w.next(G));}catch(H){I(H);}}function M(G){try{N(w.throw(G));}catch(H){I(H);}}function N(G){var H;G.done?C(G.value):((H=G.value)instanceof S?H:new S(function(B){B(H);})).then(O,M);}N((w=w.apply(f,v||[])).next());});},d=(Object.defineProperty(r,"__esModule",{value:!0}),r.ActiveWordAnnotationEffect=void 0,g(48)),m=g(2),a=g(5),s=g(12),l=g(300),g=function(f){function v(C){var I;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");switch(C.attributes.diffValue=new Date(),(I=x(this,v,[C]))._isStudioMode=!1,I.wordsElements=[],I.spacesElements=[],I.annotations=[],I.locale=C.locale,I.attributes.type){case"highlightWord":case"reveal":I._disableRegexTextAnnotations=!1;break;case"singleWord":I._disableRegexTextAnnotations=!1,I.preserveInStudio=!0;break;case"boxHighlight":I._disableRegexTextAnnotations=!0;}return I;}var S,w=v;if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");return w.prototype=Object.create(f&&f.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),Object.defineProperty(w,"prototype",{writable:!1}),f&&p(w,f),w=v,(f=[{key:"buildTextSections",value:function(C){var I;return c(this,void 0,void 0,_().mark(function O(){var M,N,G,H,B,z,te,K,V,U,Z,re,ue;return _().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(this.textWrapElm=C.textElement,C.annotations&&(this.annotations=C.annotations),H=this.splitTextToWordsAndSpaces(C.textElement),this.wordsElements=H.wordsElements,this.spacesElements=H.spacesElements,H=(H=(I=(I=C.sections)==null?void 0:I.map(function(J){return J.text;}).join(" "))!=null?I:"").replace(/\n/g," "),this._wordTimings=l.SpeechTextSynchronizer.synchronize(H,this.attributes.startTime,this.attributes.startTime+this.duration,this.locale,C.segmentation),this._wordTimings&&this._wordTimings.length!==0){q.next=10;break;}return q.abrupt("return");case 10:if(this.wordsElements&&this.wordsElements.length!==0){q.next=13;break;}return this._wordTimings=[],q.abrupt("return");case 13:if(this._wordTimings.length===this.wordsElements.length){q.next=44;break;}M=[],G=N=0;case 17:if(!(G<this.wordsElements.length)){q.next=37;break;}if(H=this.wordsElements[G],(B=H.textContent)&&B.trim()){q.next=22;break;}return q.abrupt("continue",34);case 22:if(z=l.SpeechTextSynchronizer.splitWordsFromText(B,this.locale).filter(function(J){return J.trim()!=="";}),N>=this._wordTimings.length)return a.default.error("Remapping timing index ".concat(N,' out of bounds. Element: "').concat(B,'"')),q.abrupt("break",37);q.next=26;break;case 26:if(te=[],ue=this._wordTimings.length-N,z.length>ue)return a.default.error("Remapping timing mismatch: element has ".concat(z.length," words but only ").concat(ue,' timings remain. Element: "').concat(B,'"')),q.abrupt("break",37);q.next=31;break;case 31:for(K=z.length,V=0;V<K;V++)U=this._wordTimings[N],re=z[V],Z=U.word.trim(),re=re.trim(),Z!==re&&a.default.warn("Remapping word timing mismatch at element ".concat(G,", word ").concat(V,': timing="').concat(Z,'" vs element="').concat(re,'"')),te.push(U),N++;0<te.length?(ue={word:B,start:te[0].start,end:te[te.length-1].end,duration:te[te.length-1].end-te[0].start},M.push(ue)):a.default.warn('Remapping cannot find timings for element: "'.concat(B,'"'));case 34:G++,q.next=17;break;case 37:if(N!==this._wordTimings.length)return a.default.error("Remapping word timing synchronization error: consumed ".concat(N," timings but expected ").concat(this._wordTimings.length,". Keeping original timings.")),q.abrupt("return");q.next=40;break;case 40:if(M.length===0)return a.default.error("Remapping produced no timings. Keeping original timings."),q.abrupt("return");q.next=43;break;case 43:this._wordTimings=M;case 44:case"end":return q.stop();}},O,this);}));}},{key:"highlightWordTimelineBuilder",value:function(){for(var C,I,O=this,M=m.gsap.timeline(),N=document.createElement("div"),G=(this.textWrapElm.prepe
169nd(N),N.style.position="absolute",0);G<this.wordsElements.length;G++)(function(){var H,B=O.wordsElements[G],z=O._wordTimings[G].duration,te={top:B.offsetTop,left:B.offsetLeft,width:B.offsetWidth,height:B.offsetHeight},K={top:B.offsetTop,left:B.offsetLeft,width:B.offsetWidth,height:B.offsetHeight,duration:z},V=(B.dataset.annRgx===""?(te.opacity=1,K.opacity=1,Object.keys((C=O.annotations[0])==null?void 0:C.activeWordAnnotation).forEach(function(U){var Z,re=(Z=O.annotations[0])==null?void 0:Z.activeWordAnnotation[U];switch(U){case"strokeColor":case"fgColor":break;case"bgColor":te.backgroundColor=re,K.backgroundColor=re;break;case"shadow":te.boxShadow=re,K.boxShadow=re;break;case"top":case"left":case"width":case"height":te[U]+=re,K[U]+=re;break;default:te[U]=re,K[U]=re;}})):(te.opacity=0,K.opacity=0),m.gsap.fromTo(N,te,K));M.add(V,O._wordTimings[G].start),B.dataset.annRgx===""&&((I=(C=O.annotations[0])==null?void 0:C.activeWordAnnotation)!=null&&I.fgColor&&(M.add(m.gsap.set(B,{color:O.annotations[0].activeWordAnnotation.fgColor.toString()}),V.startTime()),M.add(m.gsap.set(B,{color:(I=O.annotations[0])==null?void 0:I.fgColor}),V.startTime()+z)),(I=(I=O.annotations[0])==null?void 0:I.activeWordAnnotation)!=null&&I.strokeColor&&(H=(I=O.annotations[1])==null?void 0:I.generateStroke(O.annotations[0].activeWordAnnotation.strokeColor,(
169I=(I=O.annotations[1])==null?void 0:I.stroke)==null?void 0:I.steps,(I=(I=O.annotations[1])==null?void 0:I.stroke)==null?void 0:I.width),M.add(m.gsap.set(B,{textShadow:H}),V.startTime()),M.add(m.gsap.set(B,{textShadow:(I=O.annotations[0])==null?void 0:I.shadow}),V.startTime()+z)));})();return M;}},{key:"singleWordTimelineBuilder",value:function(){this.element.parentElement.hasAttribute("center-x")||(this.element.style.width="max-content",this.element.parentElement.style.width="max-content");for(var C=m.gsap.timeline(),I=0;I<this.spacesElements.length;I++){var O=this.spacesElements[I];O.parentElement&&(O.parentElement.childElementCount===1?O.parentElement:O).remove();}var M=document.createElement("div");for(M.style.width="100%",M.style.height="100%",M.style.display="flex",M.style.justifyContent="center",M.style.alignItems="center";this.textWrapElm.firstChild;){var N=this.textWrapElm.firstChild;if(this.textWrapElm.style.borderRadius&&!N.style.borderRadius&&(N.style.borderRadius=this.textWrapElm.style.borderRadius),this.textWrapElm.style.padding&&!N.style.padding&&(N.style.padding=this.textWrapElm.style.padding),this.textWrapElm.style.backgroundColor&&!N.style.backgroundColor&&(N.style.backgroundColor=this.textWrapElm.style.backgroundColor),0<N.children.length){for(var G=0,H=Array.from(N.children);G<H.length;G++){var B=H[G];B.style.cssText=N.style.cssText,M.appendChild(B);}N.remove();}else M.appendChild(N);}if(this.textWrapElm.appendChild(M),this._isStudioMode){for(var z=this._studioCurrentTime-this.attributes.startTime,te=0,K=0;K<this._wordTimings.length;K++)this._wordTimings[K].start<=z&&(te=K);for(var V,te=Math.min(te,this.wordsElements.length-1),U=0;U<this.wordsElements.length;U++){var Z=this.wordsElements[U];U===te?(Z.style.display="",Z.style.transform="scale(1)",Z.style.opacity="1"):Z.style.display="none";}this.textWrapElm.style.removeProperty("border-radius"),this.textWrapElm.style.removeProperty("padding"),this.textWrapElm.style.removeProperty("background-color"),this.element.style.width="max-content",this.element.parentElement.style.width="max-content",this.element.parentElement.hasAttribute("center-x")&&(V=this.element.parentElement.getBoundingClientRect().width,this.element.parentElement.style.left="calc((var(--layer-width) - ".concat(V,"px) / 2)"));}else{for(var re=0;re<this.wordsElements.length;re++){var q=this.wordsElements[re],ue=this._wordTimings[re].duration,q=m.gsap.from(q,{display:"none",scale:.9,opacity:.35,duration:ue,ease:"power4.out"});C.add(q,this._wordTimings[re].start),0<re&&C.add(m.gsap.set(this.wordsElements[re-1],{display:"none"}),q.startTime());}this.textWrapElm.style.removeProperty("border-radius"),this.textWrapElm.style.removeProperty("padding"),this.textWrapElm.style.removeProperty("background-color");}return C;}},{key:"revealWordTimelineBuilder",value:function(){for(var C=m.gsap.timeline(),I=0;I<this.wordsElements.length;I++){var M=this.wordsElements[I],O=this._wordTimings[I].duration,M=m.gsap.fromTo(M,{opacity:"0"},{opacity:"1",duration:O,ease:"power4.out"});C.add(M,this._wordTimings[I].start);}return C;}},{key:"boxHighlightTimelineBuilder",value:function(){for(var C=this,I=m.gsap.timeline(),O=document.createElement("div"),M=(O.style.backgroundColor=(M=this.attributes.box)!=null&&M.bgColor?this.attributes.box.bgColor:"#AA58EE",O.style.borderRadius=(M=this.attributes.box)!=null&&M.borderRadius?a.default.scaleWithFormat(this.attributes.box.borderRadius,this.scale):a.default.scaleWithFormat("20px",this.scale),(M=this.attributes.box)!=null&&M.shadow?this.attributes.box.shadow:"0 0 20px #000000"),N=(O.style.boxShadow=M.split(" ").map(function(Z){return a.default.scaleWithFormat(Z,C.scale);}).join(" "),this.textWrapElm.prepend(O),O.style.position="absolute",(M=this.attributes.box)!=null&&M.scale?parseFloat(this.attributes.box.scale):1.05),G=0;G<this.wordsElements.length;G++){var H,B=this.wordsElements[G],z=B.parentElement.style.filter,te=(B.parentElement.style.filter="",this._wordTimings[G].duration),K={top:B.offsetTop,left:B.offsetLeft,width:B.offsetWidth,height:B.offsetHeight,scale:.9,opacity:.3},V={top:B.offsetTop,left:B.offsetLeft,width:B.offsetWidth,height:B.offsetHeight,scale:N,opacity:1,ease:"back.out(0.5)",duration:te};for(H in B.parentElement.style.filter=z,this.attributes.box){var U=this.attributes.box[H];switch(H){case"top":case"left":case"width":case"height":K[H]+=a.default.scaleWithFormat(U,this.scale),V[H]+=a.default.scaleWithFormat(U,this.scale);}}te=m.gsap.fromTo(O,K,V),I.add(te,this._wordTimings[G].start);}return I;}},{key:"build",value:function(){var C,I=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0;if(((C=this.annotations[0])==null?void 0:C.activeWordAnnotation)===void 0||this.wordsElements.length===0)return null;var O=null;switch(this.attributes.type){case"highlightWord":O=this.highlightWordTimelineBuilder();break;case"singleWord":O=this.singleWordTimelineBuilder();break;case"reveal":O=this.revealWordTimelineBuilder();break;case"boxHighlight":O=this.boxHighlightTimelineBuilder();}return O&&this.timeline.add(O,I+this.timeOffset),O;}},{key:"onStudioReady",value:function(C){var I,O,M,N,G;I=v,O="onStudioReady",M=this,G=y(b(1&(N=3)?I.prototype:I),O,M),(2&N?function(H){return G.apply(M,H);}:G)([C]),this._isStudioMode=!0;}},{key:"getTextNodes",value:function(C){var I=[];if(C!=null){var O,M=n(C.childNodes);try{for(M.s();!(O=M.n()).done;){var N=O.value;N.nodeName==="#text"?I.push(N):I=I.concat(this.getTextNodes(N));}}
169catch(G){M.e(G);}finally{M.f();}}return I;}},{key:"createWordElement",value:function(C,I){var O=document.createElement("span");return O.dataset.annRgx=I,O.style.position="relative",O.style.fontFamily="inherit",(O.textContent=C).trim()===""&&(s.MediaPlayerCache.isSafari?O.style.whiteSpace="pre-wrap":O.style.whiteSpace="pre"),O;}},{key:"splitWordsAndSpaces",value:function(C){for(var I=C.parentNode,O=C.nodeValue.toString(),M=l.SpeechTextSynchronizer.splitWordsFromText(O,this.locale),N=(M[0]===""&&M.shift(),M[M.length-1]===""&&M.pop(),[]),G=[],H=0;H<M.length;H++){var B=M[H],z=void 0;C.parentElement.dataset.annRgx===""&&(z=this.createWordElement(B,I.dataset.annRgx),I.append(z)),B.trim()!==""?C.parentElement.dataset.annRgx===""?N.push(z):N.push(C.parentElement):z&&G.push(z);}return C.nodeValue.toString().trim()!==""&&C.parentElement.dataset.annRgx===""&&I.removeChild(C),O=new Set(N),{wordsElements:N=Array.from(O),spacesElements:G};}},{key:"splitTextToWordsAndSpaces",value:function(C){var I,O=[],M=[],N=n(this.getTextNodes(C));try{for(N.s();!(I=N.n()).done;)var G=I.value,H=this.splitWordsAndSpaces(G),O=O.concat(H.wordsElements),M=M.concat(H.spacesElements);}catch(B){N.e(B);}finally{N.f();}return{wordsElements:O,spacesElements:M};}}])&&E(w.prototype,f),S&&E(w,S),Object.defineProperty(w,"prototype",{writable:!1}),w;}(d.AnimationEffect);r.ActiveWordAnnotationEffect=g;},function(i,r,e){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){var y,b=typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(!b){if(Array.isArray(x)||(b=function(m,a){if(m){if(typeof m=="string")return o(m,a);var s={}.toString.call(m).slice(8,-1);return(s=s==="Object"&&m.constructor?m.constructor.name:s)==="Map"||s==="Set"?Array.from(m):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(m,a):void 0;}}(x))||h&&x&&typeof x.length=="number")return b&&(x=b),y=0,{s:h=function(){},n:function(){return y>=x.length?{done:!0}:{done:!1,value:x[y++]};},e:function(m){throw m;},f:h};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 170In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var p,c=!0,d=!1;return{s:function(){b=b.call(x);},n:function(){var m=b.next();return c=m.done,m;},e:function(m){d=!0,p=m;},f:function(){try{c||b.return==null||b.return();}finally{if(d)throw p;}}};}function o(x,h){(h==null||h>x.length)&&(h=x.length);for(var y=0,b=Array(h);y<h;y++)b[y]=x[y];return b;}function _(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0}),r.SpeechTextSynchronizer=void 0;var E=function(){function x(){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");}return h=x,b=[{key:"synchronize",value:function(p,c,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:"en",a=4<arguments.length?arguments[4]:void 0;if(p){var p=this.splitWordsFromText(p,m),m=d-c,s=[];if(0<a?.length){var l,d=p.filter(function(I){return I.trim()!=="";}),g=n(this.alignByPrefixSuffix(c,d,a));try{for(g.s();!(l=g.n()).done;){var f=l.value,v={word:f.word,start:f.start,end:f.end,duration:f.end-f.start};s.push(v);}}catch(I){g.e(I);}finally{g.f();}}else s=this.synchronizeWithCharCount(p,m);return s;}}},{key:"synchronizeWithCharCount",value:function(p,c){var d=[],m=c/p.reduce(function(s,l){return s+l.trim().length;},0),a=0;return p.filter(function(s){return s.trim()!=="";}).forEach(function(s){var l=s.trim().length*m;d.push({word:s,start:a,end:a+l,duration:l}),a+=l;}),d;}},{key:"alignByPrefixSuffix",value:function(p,c,d){for(var m=d.map(function(H){return H.word;}),a=0;a<c.length&&a<m.length&&c[a]===m[a];)a++;for(var s=0;s<c.length-a&&s<m.length-a&&c[c.length-1-s]===m[m.length-1-s];)s++;for(var l=[],g=0;g<a;g++){var f=d[g];l.push({word:c[g],start:f.start-p,end:f.end-p,matched:!0});}var v=a,S=c.length-s-1;if(v<=S){var w,C=0<a?d[a-1].end:d[0].start,I=0<s?d[d.length-s].start:d[d.length-1].end,v=c.slice(v,1+S),O=n(this.synchronizeWithCharCount(v,I-C));try{for(O.s();!(w=O.n()).done;){var M=w.value;l.push({word:M.word,start:M.start+C-p,end:M.end+C-p,matched:!1});}}catch(B){O.e(B);}finally{O.f();}}for(var N=c.length-s;N<c.length;N++){var G=d[d.length-(c.length-N)];l.push({word:c[N],start:G.start-p,end:G.end-p,matched:!0});}return l;}},{key:"splitWordsFromText",value:function(p,c){var d=[];if(0<(c&&typeof Intl?.Segmenter=="function"?Intl.Segmenter.supportedLocalesOf([c]):[]).length){for(var c=new Intl.Segmenter(c,{granularity:"word"}).segment(p),m=Array.from(c),a=[],s="",l=0;l<m.length;l++){var g=m[l],f=0<l?m[l-1]:void 0;g.isWordLike?f&&!f.isWordLike&&f.segment.trim()!==""&&this.shouldConnectToNextWord(s,f.segment,g)?s+=g.segment:(s&&a.push(s),s=g.segment):g.segment.trim()===""?(s&&(a.push(s),s=""),a.push(g.segment)):s+=g.segment;}s&&a.push(s),d=a;}else d=p.split(/(\s+)/);return d;}},{key:"shouldConnectToNextWord",value:function(p,c,d){if(!d||!d.isWordLike)return!1;var m=d.segment;switch(c){case".":return m.match(/^[A-Z]$/i)!==null||m.match(/^\d+$/)!==null;case"/":case"-":case"_":return 0<p.length;case",":return p.match(/\d+$/)!==null&&m.match(/^\d+/)!==null;default:return!1;}}}],(y=null)&&_(h.prototype,y),b&&_(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.SpeechTextSynchronizer=E;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
170p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.ScaleAnimationsEffect=void 0;var h=b(48),y=b(2),b=function(p){function c(a){var s;if(this instanceof c)return(a=o(this,c,[a])).scaleType=(s=a.attributes.type)!=null?s:void 0,a;throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"build",value:function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,s=y.gsap.timeline();switch(this.scaleType){case"up-hor-center-v0":s.fromTo(this.element,{scaleX:0,transformOrigin:"center center"},{scaleX:1,duration:this.duration});break;case"down-hor-center-v0":s.to(this.element,{scaleX:0,duration:this.duration-.3});break;case"up-hor-center-v1":s.fromTo(this.element,{scaleX:.02,scaleY:0},{scaleY:1,transformOrigin:"center center",duration:.3}),s.to(this.element,{scaleX:1,duration:this.duration-.3});break;case"down-hor-center-v1":s.to(this.element,{scaleX:.02,duration:this.duration-.3}),s.fromTo(this.element,{scaleY:1},{scaleY:0,transformOrigin:"center center",duration:.3});break;case"up-hor-left-v0":s.fromTo(this.element,{scaleX:0,transformOrigin:"center left"},{scaleX:1,duration:this.duration});}return this.timeline.add(s,a+this.timeOffset),s;}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.AnimationEffect);r.ScaleAnimationsEffect=b;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.RotateEffect=void 0;var h=b(25),y=b(5),b=function(p){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");(a=o(this,c,[a])).DEFAULT_ROTATE_VALUE="6.5deg";var s=a.attributes.rotate||a.DEFAULT_ROTATE_VALUE;return a.theta=y.default.parseCssAngleToRadians(s),a.rotate="".concat(a.theta,"rad"),a;}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"apply",value:function(a){var s=a.getBoundingClientRect(),g=a.style.transform,f=g.indexOf("rotate"),f=(0<=f?(l=g.indexOf(")",f),a.style.transform=g.slice(0,f)+"rotate(".concat(this.rotate,")")+g.slice(l+1),a.style.transform=a.style.transform.trim()):a.style.transform="".concat(g," rotate(").concat(this.rotate,")").trim(),Math.abs(s.width*Math.cos(this.theta))+Math.abs(s.height*Math.sin(this.theta))),l=Math.abs(s.width*Math.sin(this.theta))+Math.abs(s.height*Math.cos(this.theta)),g=(f-s.width)/2,f=(l-s.height)/2;a.style.bottom&&(a.style.bottom="".concat(f+parseFloat(a.style.bottom),"px")),a.style.top&&(a.style.top.includes("calc")?a.style.top="calc(".concat(a.style.top," + calc(").concat(f+parseFloat(a.style.top),"px))"):a.style.top="".concat(f+parseFloat(a.style.top),"px")),a.style.left&&(a.style.left.includes("calc")?a.style.left="calc(".concat(a.style.left," + calc(").concat(g+parseFloat(a.style.left),"px))"):a.style.left="".concat(g+parseFloat(a.style.left),"px")),a.style.right&&(a.style.right="".concat(g+parseFloat(a.style.right),"px"));}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.VisualEffect);
170r.RotateEffect=b;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0}),r.TransformEffect=void 0;var h=p(25),y=p(5),b=p(13),p=function(c){function d(s){var l;if(this instanceof d)return(s=o(this,d,[s]))._x=(l=s.attributes)==null?void 0:l.x,s._y=(l=s.attributes)==null?void 0:l.y,s._centerX=(l=s.attributes)==null?void 0:l.centerX,s._centerY=(l=s.attributes)==null?void 0:l.centerY,s._scale=(l=s.attributes)==null?void 0:l.scale,s._previewerScale=parseFloat((l=s.attributes)==null?void 0:l.previewerScale)||1,((l=s.attributes)==null?void 0:l.width)!==void 0&&(s._width=s._previewerScale*parseFloat(s.attributes.width)),((l=s.attributes)==null?void 0:l.height)!==void 0&&(s._height=s._previewerScale*parseFloat(s.attributes.height)),typeof s._x=="number"&&(s._x="".concat(s._x,"px")),s._x&&(s._x="".concat(s._previewerScale*parseFloat(s._x),"px")),typeof s._y=="number"&&(s._y="".concat(s._y,"px")),s._y&&(s._y="".concat(s._previewerScale*parseFloat(s._y),"px")),s;throw new TypeError("Cannot call a class as a function");}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"apply",value:function(s,f){var g,S=s.getBoundingClientRect(),f=(f=f?.isRtlLayout)!=null&&f,S=(this._x===void 0&&(this._x="".concat(f?b.GlobalConstants.VDM_CONTAINER_RIGHT-S.right:S.left-b.GlobalConstants.VDM_CONTAINER_X,"px")),this._y===void 0&&(this._y="".concat(S.top-b.GlobalConstants.VDM_CONTAINER_Y,"px")),(this._centerX||this._centerY)&&(this._centerX&&(s.setAttribute("center-x",""),v=this._width!==void 0?this._width:S.width*(parseFloat(this._scale)||1),this._x="calc((var(--layer-width) - ".concat(v,"px) / 2)")),this._centerY&&(s.setAttribute("center-y",""),v=this._height!==void 0?this._height:S.height*(parseFloat(this._scale)||1),this._y="calc((var(--layer-height) - ".concat(v,"px) / 2)"))),s.style.transform),v=S.indexOf("translate3d("),v=(0<=v&&(g=S.indexOf(")",v),s.style.transform="".concat(S.slice(0,v)," translate3d(0, 0, 0) ").concat(S.slice(g+1)).trim()),0<=(v=(S=s.style.transform).indexOf("translate("))&&(g=S.indexOf(")",v),s.style.transform="".concat(S.slice(0,v)," translate(0, 0, 0) ").concat(S.slice(g+1)).trim()),!1),S=!1;s.style.right&&(v=!0,s.style.right=""),s.style.left&&(S=!0,s.style.left=""),v&&S&&y.default.error("Transform effect cannot apply right position to an element with a non-empty left style"),f?s.style.right="".concat(this._x):s.style.left="".concat(this._x),s.style.top="".concat(this._y),s.style.bottom="",this._width!==void 0&&(s.style.width="".concat(this._width,"px")),this._height!==void 0&&(s.style.height="".concat(this._height,"px")),this._scale&&(s.style.scale&&y.default.error("Transform effect cannot apply scale to an element with a non-empty scale style, all transformation should be used within transform property"),s.style.transformOrigin=b.STUDIO_TRANSFORM_ORIGIN,0<=(v=(g=s.style.transform).indexOf("scale"))?(S=g.
170indexOf(")",v),s.style.transform="".concat(g.slice(0,v)," scale(").concat(this._scale,") ").concat(g.slice(S+1)).trim()):s.style.transform="".concat(g," scale(").concat(this._scale,")").trim(),f&&!this._centerX&&(v=parseFloat(this._scale),s.style.right="".concat(s.offsetWidth*(v-1)+parseFloat(this._x),"px")));}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.VisualEffect);r.TransformEffect=p;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(){n=function(){return l;};var s,l={},g=Object.prototype,f=g.hasOwnProperty,v=Object.defineProperty||function(X,Y,j){X[Y]=j.value;},U=typeof Symbol=="function"?Symbol:{},S=U.iterator||"@@iterator",w=U.asyncIterator||"@@asyncIterator",C=U.toStringTag||"@@toStringTag";function I(X,Y,j){return Object.defineProperty(X,Y,{value:j,enumerable:!0,configurable:!0,writable:!0}),X[Y];}try{I({},"");}catch{I=function(Y,j,D){return Y[j]=D;};}function O(X,fe,j,ge){var $,ne,le,se,fe=fe&&fe.prototype instanceof te?fe:te,fe=Object.create(fe.prototype),ge=new Q(ge||[]);return v(fe,"_invoke",{value:($=X,ne=j,le=ge,se=N,function(he,_e){if(se===H)throw Error("Generator is already running");if(se===B){if(he==="throw")throw _e;return{value:s,done:!0};}for(le.method=he,le.arg=_e;;){var Re=le.delegate;if(Re&&(Re=function ee(W,ae){var de=ae.method,ye=W.iterator[de];return ye===s?(ae.delegate=null,de==="throw"&&W.iterator.return&&(ae.method="return",ae.arg=s,ee(W,ae),ae.method==="throw")||de!=="return"&&(ae.method="throw",ae.arg=new TypeError("The iterator does not provide a '"+de+"' method")),z):(de=M(ye,W.iterator,ae.arg),de.type==="throw"?(ae.method="throw",ae.arg=de.arg,ae.delegate=null,z):(ye=de.arg,ye?ye.done?(ae[W.resultName]=ye.value,ae.next=W.nextLoc,ae.method!=="return"&&(ae.method="next",ae.arg=s),ae.delegate=null,z):ye:(ae.method="throw",ae.arg=new TypeError("iterator result is not an object"),ae.delegate=null,z)));}(Re,le),Re)){if(Re===z)continue;return Re;}if(le.method==="next")le.sent=le._sent=le.arg;else if(le.method==="throw"){if(se===N)throw se=B,le.arg;le.dispatchException(le.arg);}else le.method==="return"&&le.abrupt("return",le.arg);if(se=H,Re=M($,ne,le),Re.type==="normal"){if(se=le.done?B:G,Re.arg===z)continue;return{value:Re.arg,done:le.done};}Re.type==="throw"&&(se=B,le.method="throw",le.arg=Re.arg);}})}),fe;}function M(X,Y,j){try{return{type:"normal",arg:X.call(Y,j)};}catch(D){return{type:"throw",arg:D};}}l.wrap=O;var N="suspendedStart",G="suspendedYield",H="executing",B="completed",z={};function te(){}function K(){}function V(){}var U={},Z=(I(U,S,function(){return this;}),Object.getPrototypeOf),Z=Z&&Z(Z(F([]))),re=(Z&&Z!==g&&f.call(Z,S)&&(U=Z),V.prototype=te.prototype=Object.create(U));function ue(X){["next","throw","return"].forEach(function(Y){I(X,Y,function(j){return this._invoke(Y,j);});});}function q(X,Y){var j;v(this,"_invoke",{value:function(D,$){function ne(){return new Y(function(le,se){(function fe(W,he,_e,Re){var ee,W=M(X[W],X,he);if(W.type!=="throw")return(he=(ee=W.arg).value)&&t(he)=="object"&&f.call(he,"__await")?Y.resolve(he.__await).then(function(ae){fe("next",ae,_e,Re);},function(ae){fe("throw",ae,_e,Re);}):Y.resolve(he).then(function(ae){ee.value=ae,_e(ee);},function(ae){return fe("throw",ae,_e,Re);});Re(W.arg);})(D,$,le,se);});}return j=j?j.then(ne,ne):ne();}});}function J(X){var Y={tryLoc:X[0]};1 in X&&(Y.catchLoc=X[1]),2 in X&&(Y.finallyLoc=X[2],Y.afterLoc=X[3]),this.tryEntries.push(Y);}function oe(X){var Y=X.completion||{};Y.type="normal",delete Y.arg,X.completion=Y;}function Q(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(J,this),this.reset(!0);}function F(X){if(X||X===""){var Y,j=X[S];if(j)return j.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length))return Y=-1,(j=function D(){for(;++Y<X.length;)if(f.call(X,Y))return D.value=X[Y],D.done=!1,D;return D.value=s,D.done=!0,D;}).next=j;}throw new TypeError(t(X)+" is not iterable");}return v(re,"constructor",{value:K.prototype=V,configurable:!0}),v(V,"constructor",{value:K,configurable:!0}),K.displayName=I(V,C,"GeneratorFunction"),l.isGeneratorFunction=function(X){return X=typeof X=="function"&&X.constructor,!!X&&(X===K||(X.displayName||X.name)==="GeneratorFunction");},l.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,V):(X.__proto__=V,I(X,C,"GeneratorFunction")),X.prototype=Object.create(re),X;},l.awrap=function(X){return{__await:X};},ue(q.prototype),I(q.prototype,w,function(){return this;}),l.AsyncIterator=q,l.async=function(X,Y,j,D,$){$===void 0&&($=Promise);var ne=new q(O(X,Y,j,D),$);return l.isGeneratorFunction(Y)?ne:ne.next().then(function(le){return le.done?le.value:ne.next();});},ue(re),I(re,C,"Generator"),I(re,S,function(){return this;}),I(re,"toString",function(){return"[object Generator]";}),l.keys=function(X){var Y,j=Object(X),D=[];for(Y in j)D.push(Y);return D.reverse(),function $(){for(;D.length;){var ne=D.pop();if(ne in j)return $.value=ne,$.done=!1,$;}return $.done=!0,$;};},l.values=F,Q.prototype={constructor:Q,reset:function(X){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEac
170h(oe),!X)for(var Y in this)Y.charAt(0)==="t"&&f.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=s);},stop:function(){this.done=!0;var X=this.tryEntries[0].completion;if(X.type==="throw")throw X.arg;return this.rval;},dispatchException:function(X){if(this.done)throw X;var Y=this;function j(fe,ge){return ne.type="throw",ne.arg=X,Y.next=fe,ge&&(Y.method="next",Y.arg=s),!!ge;}for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D],ne=$.completion;if($.tryLoc==="root")return j("end");if($.tryLoc<=this.prev){var le=f.call($,"catchLoc"),se=f.call($,"finallyLoc");if(le&&se){if(this.prev<$.catchLoc)return j($.catchLoc,!0);if(this.prev<$.finallyLoc)return j($.finallyLoc);}else if(le){if(this.prev<$.catchLoc)return j($.catchLoc,!0);}else{if(!se)throw Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return j($.finallyLoc);}}}},abrupt:function(X,Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j];if(D.tryLoc<=this.prev&&f.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var $=D;break;}}var ne=($=$&&(X==="break"||X==="continue")&&$.tryLoc<=Y&&Y<=$.finallyLoc?null:$)?$.completion:{};return ne.type=X,ne.arg=Y,$?(this.method="next",this.next=$.finallyLoc,z):this.complete(ne);},complete:function(X,Y){if(X.type==="throw")throw X.arg;return X.type==="break"||X.type==="continue"?this.next=X.arg:X.type==="return"?(this.rval=this.arg=X.arg,this.method="return",this.next="end"):X.type==="normal"&&Y&&(this.next=Y),z;},finish:function(X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y];if(j.finallyLoc===X)return this.complete(j.completion,j.afterLoc),oe(j),z;}},catch:function(X){for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j,D,$=this.tryEntries[Y];if($.tryLoc===X)return(j=$.completion).type==="throw"&&(D=j.arg,oe($)),D;}throw Error("illegal catch attempt");},delegateYield:function(X,Y,j){return this.delegate={iterator:F(X),resultName:Y,nextLoc:j},this.method==="next"&&(this.arg=s),z;}},l;}function o(s,l){var g,f=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!f){if(Array.isArray(s)||(f=function(C,I){if(C){if(typeof C=="string")return _(C,I);var O={}.toString.call(C).slice(8,-1);return(O=O==="Object"&&C.constructor?C.constructor.name:O)==="Map"||O==="Set"?Array.from(C):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?_(C,I):void 0;}}(s))||l&&s&&typeof s.length=="number")return f&&(s=f),g=0,{s:l=function(){},n:function(){return g>=s.length?{done:!0}:{done:!1,value:s[g++]};},e:function(C){throw C;},f:l};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 171In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var v,S=!0,w=!1;return{s:function(){f=f.call(s);},n:function(){var C=f.next();return S=C.done,C;},e:function(C){w=!0,v=C;},f:function(){try{S||f.return==null||f.return();}finally{if(w)throw v;}}};}function _(s,l){(l==null||l>s.length)&&(l=s.length);for(var g=0,f=Array(l);g<l;g++)f[g]=s[g];return f;}function E(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
171(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}function x(s,v,g){v=y(v);var f=s,v=h()?Reflect.construct(v,g||[],y(s).constructor):v.apply(s,g);if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function h(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!s;})();}function y(s){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function b(s,l){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}var p=this&&this.__awaiter||function(s,l,g,f){return new(g=g||Promise)(function(v,S){function w(O){try{I(f.next(O));}catch(M){S(M);}}function C(O){try{I(f.throw(O));}catch(M){S(M);}}function I(O){var M;O.done?v(O.value):((M=O.value)instanceof g?M:new g(function(N){N(M);})).then(w,C);}I((f=f.apply(s,l||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),r.HeadCenteringEffect=void 0,a(25)),d=a(305),m=a(5),a=function(s){function l(v){if(this instanceof l)return x(this,l,[v]);throw new TypeError("Cannot call a class as a function");}var g,f=l;if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");return f.prototype=Object.create(s&&s.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),s&&b(f,s),f=l,(s=[{key:"calculateHeadBoundingBox",value:function(v){for(var S=v.width,w=v.height,C=0,I=0,O=!1,M=v.data,N=v.width,G=0;G<M.length;G++){var H,B=M[G];B!==0&&B!==1||(B=G%N,H=Math.floor(G/N),S=Math.min(S,B),C=Math.max(C,B),w=Math.min(w,H),I=Math.max(I,H),O=!0);}if(O)return{xCenter:(S+(C-S)/2)/v.width,yCenter:(w+(I-w)/2)/v.height,height:(I-w)/v.height,width:(C-S)/v.width};throw new Error("No face parts detected in segmentation data");}},{key:"detectFace",value:function(v,S,w){return p(this,void 0,void 0,n().mark(function C(){var I,O,M,N,G,H,B,z,te,K;return n().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return I=d.BodyPixProvider.getInstance(),V.next=3,I.waitForInitialization();case 3:if(O=I.getModel(),(M=document.createElement("canvas")).width=S,M.height=w,N=M.getContext("2d")){V.next=10;break;}throw new Error("Failed to get 2D context from canvas");case 10:return N.drawImage(v,0,0,S,w,0,0,S,w),V.next=13,O.segmentMultiPersonParts(M,{internalResolution:"medium",segmentationThreshold:.5,maxDetections:5,scoreThreshold:.2,nmsRadius:30});case 13:B=V.sent,G={area:0,boundingBox:void 0},H=void 0,B=o(B),V.prev=17,B.s();case 19:if((z=B.n()).done){V.next=36;break;}if(z=z.value,z.data.some(function(U){return U===0||U===1;})){V.next=24;break;}return V.abrupt("continue",34);case 24:V.prev=24,te=this.calculateHeadBoundingBox(z),(K=te.width*te.height)>G.area&&(G.area=K,G.boundingBox=te),V.next=34;break;case 30:return V.prev=30,V.t0=V.catch(24),H=V.t0,V.abrupt("continue",34);case 34:V.next=19;break;case 36:V.next=41;break;case 38:V.prev=38,V.t1=V.catch(17),B.e(V.t1);case 41:return V.prev=41,B.f(),V.finish(41);case 44:if(!G.boundingBox&&H)throw H;V.next=46;break;case 46:return V.abrupt("return",G.boundingBox);case 47:case"end":return V.stop();}},C,this,[[17,38,41,44],[24,30]]);}));}},{key:"apply",value:function(v,S){return p(this,void 0,void 0,n().mark(function w(){var C,I,O;return n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(S===void 0)return M.abrupt("return");M.next=2;break;case 2:if(S.headCenteringEffectData===void 0)return m.default.error("Missing head centering effect data, ignoring head centering effect"),M.abrupt("return");M.next=5;break;case 5:if(S.headCenteringEffectData.headBoundingBox!==void 0)return m.default.error("Head bounding box already detected, ignoring head centering effect"),M.abrupt("return");M.next=8;break;case 8:return C=S.headCenteringEffectData,O=C.videoWidth,I=C.videoHeight,M.prev=11,M.next=14,this.detectFace(C.videoElement,O,I);case 14:O=M.sent,C.headBoundingBox=O,M.next=22;break;case 18:return M.prev=18,M.t0=M.catch(11),m.default.error("Failed to detect face: ".concat(M.t0 instanceof Error?M.t0.message:String(M.t0))),M.abrupt("return");case 22:case"end":return M.stop();}},w,this,[[11,18]]);}));}}])&&E(f.prototype,s),g&&E(f,g),Object.defineProperty(f,"prototype",{writable:!1}),f;}(c.VisualEffect);r.HeadCenteringEffect=a;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(){n=function(){return y;};var h,y={},b=Object.prototype,p=b.hasOwnProperty,c=Object.defineProperty||function(Z,re,ue){Z[re]=ue.value;},N=typeof Symbol=="function"?Symbol:{},d=N.iterator||"@@iterator",m=N.asyncIterator||"@@asyncIterator",a=N.toStringTag||"@@toStringTag";function s(Z,re,ue){return Object.defineProperty(Z,re,{value:ue,enumerable:!0,configurable:!0,writable:!0}),Z[re];}try{s({},"");}catch{s=function(re,ue,q){return re[ue]=q;};}function l(Z,X,ue,Y){var J,oe,Q,F,X=X&&X.prototype instanceof I?X:I,X=Object.create(X.prototype),Y=new V(Y||[]);return c(X,"_invoke",{value:(J=Z,oe=ue,Q=Y,F=f,function(j,D){if(F===S)throw Error("Generator is already running");if(F===w){if(j==="throw")throw D;return{value:h,done:!0};}for(Q.method=j,Q.arg=D;;){var $=Q.delegate;if($&&($=function ne(le,se){var fe=se.method,ge=le.iterator[fe];return ge===h?(se.delegate=null,fe==="throw"&&le.iterator.return&&
171(se.method="return",se.arg=h,ne(le,se),se.method==="throw")||fe!=="return"&&(se.method="throw",se.arg=new TypeError("The iterator does not provide a '"+fe+"' method")),C):(fe=g(ge,le.iterator,se.arg),fe.type==="throw"?(se.method="throw",se.arg=fe.arg,se.delegate=null,C):(ge=fe.arg,ge?ge.done?(se[le.resultName]=ge.value,se.next=le.nextLoc,se.method!=="return"&&(se.method="next",se.arg=h),se.delegate=null,C):ge:(se.method="throw",se.arg=new TypeError("iterator result is not an object"),se.delegate=null,C)));}($,Q),$)){if($===C)continue;return $;}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(F===f)throw F=w,Q.arg;Q.dispatchException(Q.arg);}else Q.method==="return"&&Q.abrupt("return",Q.arg);if(F=S,$=g(J,oe,Q),$.type==="normal"){if(F=Q.done?w:v,$.arg===C)continue;return{value:$.arg,done:Q.done};}$.type==="throw"&&(F=w,Q.method="throw",Q.arg=$.arg);}})}),X;}function g(Z,re,ue){try{return{type:"normal",arg:Z.call(re,ue)};}catch(q){return{type:"throw",arg:q};}}y.wrap=l;var f="suspendedStart",v="suspendedYield",S="executing",w="completed",C={};function I(){}function O(){}function M(){}var N={},G=(s(N,d,function(){return this;}),Object.getPrototypeOf),G=G&&G(G(U([]))),H=(G&&G!==b&&p.call(G,d)&&(N=G),M.prototype=I.prototype=Object.create(N));function B(Z){["next","throw","return"].forEach(function(re){s(Z,re,function(ue){return this._invoke(re,ue);});});}function z(Z,re){var ue;c(this,"_invoke",{value:function(q,J){function oe(){return new re(function(Q,F){(function X(le,j,D,$){var ne,le=g(Z[le],Z,j);if(le.type!=="throw")return(j=(ne=le.arg).value)&&t(j)=="object"&&p.call(j,"__await")?re.resolve(j.__await).then(function(se){X("next",se,D,$);},function(se){X("throw",se,D,$);}):re.resolve(j).then(function(se){ne.value=se,D(ne);},function(se){return X("throw",se,D,$);});$(le.arg);})(q,J,Q,F);});}return ue=ue?ue.then(oe,oe):oe();}});}function te(Z){var re={tryLoc:Z[0]};1 in Z&&(re.catchLoc=Z[1]),2 in Z&&(re.finallyLoc=Z[2],re.afterLoc=Z[3]),this.tryEntries.push(re);}function K(Z){var re=Z.completion||{};re.type="normal",delete re.arg,Z.completion=re;}function V(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(te,this),this.reset(!0);}function U(Z){if(Z||Z===""){var re,ue=Z[d];if(ue)return ue.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length))return re=-1,(ue=function q(){for(;++re<Z.length;)if(p.call(Z,re))return q.value=Z[re],q.done=!1,q;return q.value=h,q.done=!0,q;}).next=ue;}throw new TypeError(t(Z)+" is not iterable");}return c(H,"constructor",{value:O.prototype=M,configurable:!0}),c(M,"constructor",{value:O,configurable:!0}),O.displayName=s(M,a,"GeneratorFunction"),y.isGeneratorFunction=function(Z){return Z=typeof Z=="function"&&Z.constructor,!!Z&&(Z===O||(Z.displayName||Z.name)==="GeneratorFunction");},y.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,M):(Z.__proto__=M,s(Z,a,"GeneratorFunction")),Z.prototype=Object.create(H),Z;},y.awrap=function(Z){return{__await:Z};},B(z.prototype),s(z.prototype,m,function(){return this;}),y.AsyncIterator=z,y.async=function(Z,re,ue,q,J){J===void 0&&(J=Promise);var oe=new z(l(Z,re,ue,q),J);return y.isGeneratorFunction(re)?oe:oe.next().then(function(Q){return Q.done?Q.value:oe.next();});},B(H),s(H,a,"Generator"),s(H,d,function(){return this;}),s(H,"toString",function(){return"[object Generator]";}),y.keys=function(Z){var re,ue=Object(Z),q=[];for(re in ue)q.push(re);return q.reverse(),function J(){for(;q.length;){var oe=q.pop();if(oe in ue)return J.value=oe,J.done=!1,J;}return J.done=!0,J;};},y.values=U,V.prototype={constructor:V,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=h,this.done=!1,this.delegate=null,this.method="next",this.arg=h,this.tryEntries.forEach(K),!Z)for(var re in this)re.charAt(0)==="t"&&p.call(this,re)&&!isNaN(+re.slice(1))&&(this[re]=h);},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval;},dispatchException:function(Z){if(this.done)throw Z;var re=this;function ue(X,Y){return oe.type="throw",oe.arg=Z,re.next=X,Y&&(re.method="next",re.arg=h),!!Y;}for(var q=this.tryEntries.length-1;0<=q;--q){var J=this.tryEntries[q],oe=J.completion;if(J.tryLoc==="root")return ue("end");if(J.tryLoc<=this.prev){var Q=p.call(J,"catchLoc"),F=p.call(J,"finallyLoc");if(Q&&F){if(this.prev<J.catchLoc)return ue(J.catchLoc,!0);if(this.prev<J.finallyLoc)return ue(J.finallyLoc);}else if(Q){if(this.prev<J.catchLoc)return ue(J.catchLoc,!0);}else{if(!F)throw Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return ue(J.finallyLoc);}}}},abrupt:function(Z,re){for(var ue=this.tryEntries.length-1;0<=ue;--ue){var q=this.tryEntries[ue];if(q.tryLoc<=this.prev&&p.call(q,"finallyLoc")&&this.prev<q.finallyLoc){var J=q;break;}}var oe=(J=J&&(Z==="break"||Z==="continue")&&J.tryLoc<=re&&re<=J.finallyLoc?null:J)?J.completion:{};return oe.type=Z,oe.arg=re,J?(this.method="next",this.next=J.finallyLoc,C):this.complete(oe);},complete:function(Z,re){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&re&&(this.next=re),C;},finish:function(Z){for(var re=this.tryEntries.length-1;0<=re;--re){var ue=this.tryEntries[re];
171if(ue.finallyLoc===Z)return this.complete(ue.completion,ue.afterLoc),K(ue),C;}},catch:function(Z){for(var re=this.tryEntries.length-1;0<=re;--re){var ue,q,J=this.tryEntries[re];if(J.tryLoc===Z)return(ue=J.completion).type==="throw"&&(q=ue.arg,K(J)),q;}throw Error("illegal catch attempt");},delegateYield:function(Z,re,ue){return this.delegate={iterator:U(Z),resultName:re,nextLoc:ue},this.method==="next"&&(this.arg=h),C;}},y;}function o(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}var _=this&&this.__awaiter||function(h,y,b,p){return new(b=b||Promise)(function(c,d){function m(l){try{s(p.next(l));}catch(g){d(g);}}function a(l){try{s(p.throw(l));}catch(g){d(g);}}function s(l){var g;l.done?c(l.value):((g=l.value)instanceof b?g:new b(function(f){f(g);})).then(m,a);}s((p=p.apply(h,y||[])).next());});},E=(Object.defineProperty(r,"__esModule",{value:!0}),r.BodyPixProvider=void 0,x(5)),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this.initialized=!1,this.tf=typeof window<"u"?window.tf:void 0,this.bodyPix=typeof window<"u"?window.bodyPix:void 0,this.tf&&!E.default.isEmptyObject(this.tf)||E.default.error("TensorFlow.js not loaded. Please ensure window.tf is available."),this.bodyPix&&!E.default.isEmptyObject(this.bodyPix)||E.default.error("BodyPix not loaded. Please ensure window.bodyPix is available.");}return y=h,p=[{key:"getInstance",value:function(){return h.instance=h.instance?h.instance:new h();}},{key:"getTensorFlow",value:function(){return typeof window>"u"||E.default.isEmptyObject(window.tf)?void 0:window.tf;}},{key:"getBodyPix",value:function(){return typeof window>"u"||E.default.isEmptyObject(window.bodyPix)?void 0:window.bodyPix;}},{key:"dispose",value:function(){h.instance&&h.instance.dispose();}},{key:"reset",value:function(){h.instance&&(h.instance.bodyPixModel=void 0,h.instance.initialized=!1,h.instance.initializationPromise=void 0);}}],(b=[{key:"initialize",value:function(){return _(this,void 0,void 0,n().mark(function c(){return n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(this.initialized)return d.abrupt("return",Promise.resolve());d.next=2;break;case 2:if(this.initializationPromise)return d.abrupt("return",this.initializationPromise);d.next=4;break;case 4:return this.initializationPromise=this._initializeInternal(),d.abrupt("return",this.initializationPromise);case 6:case"end":return d.stop();}},c,this);}));}},{key:"_initializeInternal",value:function(){return _(this,void 0,void 0,n().mark(function c(){var d;return n().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(E.default.debug("[BodyPixProvider] Initializing BodyPix model..."),m.prev=1,!this.tf||E.default.isEmptyObject(this.tf))return this.initializationPromise=void 0,this.initialized=!1,m.abrupt("return");m.next=6;break;case 6:if(!this.bodyPix||E.default.isEmptyObject(this.bodyPix))return this.initializationPromise=void 0,this.initialized=!1,m.abrupt("return");m.next=10;break;case 10:if(E.default.debug("[BodyPixProvider] Initializing TensorFlow backend..."),(d=this.tf.getBackend())!=="webgl")return E.default.warn("Setting TensorFlow from ".concat(d," to ").concat("webgl"," backend")),m.next=17,this.tf.setBackend("webgl");m.next=17;break;case 17:return m.next=19,this.tf.ready();case 19:return E.default.debug("[BodyPixProvider] Loading BodyPix model..."),m.next=22,this.bodyPix.load({architecture:"MobileNetV1",outputStride:16,multiplier:.5,quantBytes:2});case 22:this.bodyPixModel=m.sent,this.initialized=!0,m.next=33;break;case 26:throw m.prev=26,m.t0=m.catch(1),d=m.t0 instanceof Error?m.t0.message:String(m.t0),E.default.error("[BodyPixProvider] Failed to initialize BodyPix model: ".concat(d)),this.initializationPromise=void 0,this.initialized=!1,m.t0;case 33:E.default.debug("[BodyPixProvider] BodyPix model initialized successfully");case 34:case"end":return m.stop();}},c,this,[[1,26]]);}));}},{key:"getModel",value:function(){if(this.initialized&&this.bodyPixModel)return this.bodyPixModel;throw new Error("BodyPix model not initialized. Call initialize() first.");}},{key:"isInitialized",value:function(){return this.initialized&&this.bodyPixModel!==void 0;}},{key:"waitForInitialization",value:function(){return _(this,void 0,void 0,n().mark(function c(){return n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(this.initialized)return d.abrupt("return",Promise.resolve());d.next=2;break;case 2:if(this.initializationPromise)return d.abrupt("return",this.initializationPromise);d.next=4;break;case 4:return d.abrupt("return",this.initialize());case 5:case"end":return d.stop();}},c,this);}));}},{key:"dispose",value:function(){this.bodyPixModel&&(E.default.debug("[BodyPixProvider] Disposing BodyPix model and releasing resources..."),this.bodyPixModel.dispose(),this.bodyPixModel=void 0),this.initialized=!1,this.initializationPromise=void 0,E.default.debug("[BodyPixProvider] Model disposed successfully");}}])&&o(y.prototype,b),p&&o(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.BodyPixProvider=x;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){if(!(p instanceof c))throw new TypeError("Cannot call a class as a function");}function o(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function _(p,c,d){return c&&o(p.prototype,c),d&&o(p,d),Object.defineProperty(p,"prototype",{writable:!1}),p;}
171Object.defineProperty(r,"__esModule",{value:!0}),r.WebGLMaskRenderer=r.GPUVideoDownscaler=r.SEGMENTATION_INPUT_SIZE=r.DEFAULT_BG_REMOVAL_CONFIG=void 0;var E=b(5),x=(r.DEFAULT_BG_REMOVAL_CONFIG={edgeLow:.55,edgeHigh:.92,temporalSmoothing:.15,blurRadius:2,hairPreservation:.85,despillStrength:1,despillRange:.2,edgeContract:.2,alphaBoost:1.8,useBilateralFilter:!0,bilateralSigmaSpace:2,bilateralSigmaColor:.1,removeIslands:!0,islandRadius:2,islandThreshold:.5,greenSpillStrength:1,greenSpillThreshold:.02,greenSpillFalloff:.15},typeof VideoFrame<"u"),b=(r.SEGMENTATION_INPUT_SIZE=256,function(){function p(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:r.SEGMENTATION_INPUT_SIZE,d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:r.SEGMENTATION_INPUT_SIZE;n(this,p),this.gl=null,this.program=null,this.videoTexture=null,this.positionBuffer=null,this.texCoordBuffer=null,this.isInitialized=!1,this.useVideoFrame=x,this.videoFrameLoggedOnce=!1,this.videoFrameFailCount=0,this.positionAttribLoc=-1,this.texCoordAttribLoc=-1,this.videoUniformLoc=null,this.vao=null,this.vertexShaderSource=`#version 300 es 172 in vec4 a_position; 173 in vec2 a_texCoord; 174 out vec2 v_texCoord; 175 void main() { 176 gl_Position = a_position; 177 v_texCoord = a_texCoord; 178 } 179 `,this.fragmentShaderSource=`#version 300 es 180 precision highp float; 181 uniform sampler2D u_video; 182 in vec2 v_texCoord; 183 out vec4 outColor; 184 void main() { 185 outColor = texture(u_video, v_texCoord); 186 } 187 `,this.targetWidth=c,this.targetHeight=d,this.boundHandleContextLost=this.handleContextLost.bind(this),this.boundHandleContextRestored=this.handleContextRestored.bind(this),typeof OffscreenCanvas<"u"?this.canvas=new OffscreenCanvas(c,d):(this.canvas=document.createElement("canvas"),this.canvas.width=c,this.canvas.height=d),this.init();}return _(p,[{key:"handleContextLost",value:function(c){c.preventDefault(),console.warn("WebGL context lost"),this.isInitialized=!1;}},{key:"handleContextRestored",value:function(){E.default.debug("WebGL context restored, re-initializing..."),this.init();}},{key:"init",value:function(){try{this.gl=this.canvas.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0,preserveDrawingBuffer:!0,antialias:!1,depth:!1,stencil:!1}),this.gl?(this.canvas instanceof HTMLCanvasElement&&(this.canvas.addEventListener("webglcontextlost",this.boundHandleContextLost),this.canvas.addEventListener("webglcontextrestored",this.boundHandleContextRestored)),this.initShaders(),this.initBuffers(),this.initTextures(),this.isInitialized=!0,E.default.debug("[GPUVideoDownscaler] Initialized at ".concat(this.targetWidth,"x").concat(this.targetHeight))):E.default.error("[GPUVideoDownscaler] Failed to get WebGL2 context");}catch(c){E.default.error("[GPUVideoDownscaler] Initialization failed: ".concat(c)),this.isInitialized=!1;}}},{key:"initShaders",value:function(){var c=this.gl,d=c.createShader(c.VERTEX_SHADER);if(c.shaderSource(d,this.vertexShaderSource),c.compileShader(d),!c.getShaderParameter(d,c.COMPILE_STATUS))throw new Error("Vertex shader error: ".concat(c.getShaderInfoLog(d)));var m=c.createShader(c.FRAGMENT_SHADER);if(c.shaderSource(m,this.fragmentShaderSource),c.compileShader(m),!c.getShaderParameter(m,c.COMPILE_STATUS))throw new Error("Fragment shader error: ".concat(c.getShaderInfoLog(m)));if(this.program=c.createProgram(),c.attachShader(this.program,d),c.attachShader(this.program,m),c.linkProgram(this.program),!c.getProgramParameter(this.program,c.LINK_STATUS))throw new Error("Program link error: ".concat(c.getProgramInfoLog(this.program)));this.positionAttribLoc=c.getAttribLocation(this.program,"a_position"),this.texCoordAttribLoc=c.getAttribLocation(this.program,"a_texCoord"),this.videoUniformLoc=c.getUniformLocation(this.program,"u_video"),c.useProgram(this.program),c.uniform1i(this.videoUniformLoc,0),c.deleteShader(d),c.deleteShader(m);}},{key:"initBuffers",value:function(){var c=this.gl,d=new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),m=new Float32Array([0,1,1,1,0,0,0,0,1,1,1,0]);this.positionBuffer=c.createBuffer(),c.bindBuffer(c.ARRAY_BUFFER,this.positionBuffer),c.bufferData(c.ARRAY_BUFFER,d,c.STATIC_DRAW),this.texCoordBuffer=c.createBuffer(),c.bindBuffer(c.ARRAY_BUFFER,this.texCoordBuffer),c.bufferData(c.ARRAY_BUFFER,m,c.STATIC_DRAW),this.vao=c.createVertexArray(),c.bindVertexArray(this.vao),c.bindBuffer(c.ARRAY_BUFFER,this.positionBuffer),c.enableVertexAttribArray(this.positionAttribLoc),c.vertexAttribPointer(this.positionAttribLoc,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.texCoordBuffer),c.enableVertexAttribArray(this.texCoordAttribLoc),c.vertexAttribPointer(this.texCoordAttribLoc,2,c.FLOAT,!1,0,0),c.bindVertexArray(null);}},{key:"initTextures",value:function(){var c=this.gl;this.videoTexture=c.createTexture(),c.bindTexture(c.TEXTURE_2D,this.videoTexture),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);}},{key:"downscale",value:function(c){if(!this.isInitialized||!this.gl||!this.program)return null;var d=this.gl;if(d.viewport(0,0,this.targetWidth,this.targetHeight),d.useProgram(this.program),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,this.videoTexture),this.useVideoFrame)try{var m=new VideoFrame(c);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,m);}finally{m.close();}this.videoFrameLoggedOnce||(E.default.debug("[GPUVideoDownscaler] Using VideoFrame API for video upload (zero-copy path)"),this.videoFrameLoggedOnce=!0),this.videoFrameFailCount=0;}catch{this.videoFrameFailCount++,this.videoFrameFailCount>=p.MAX_VIDEOFRAME_FAILURES&&(this.useVideoFrame=!1,console.warn("VideoFrame failed ".concat(this.videoFrameFailCount," times, disabling for session"))),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c
187);}else d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c);return d.bindVertexArray(this.vao),d.drawArrays(d.TRIANGLES,0,6),d.bindVertexArray(null),this.canvas;}},{key:"getDimensions",value:function(){return{width:this.targetWidth,height:this.targetHeight};}},{key:"isReady",value:function(){return this.isInitialized;}},{key:"dispose",value:function(){var c;this.gl&&(c=this.gl,this.canvas instanceof HTMLCanvasElement&&(this.canvas.removeEventListener("webglcontextlost",this.boundHandleContextLost),this.canvas.removeEventListener("webglcontextrestored",this.boundHandleContextRestored)),this.vao&&c.deleteVertexArray(this.vao),this.videoTexture&&c.deleteTexture(this.videoTexture),this.positionBuffer&&c.deleteBuffer(this.positionBuffer),this.texCoordBuffer&&c.deleteBuffer(this.texCoordBuffer),this.program&&c.deleteProgram(this.program),(c=c.getExtension("WEBGL_lose_context"))&&c.loseContext(),this.vao=null,this.gl=null,this.isInitialized=!1,E.default.debug("[GPUVideoDownscaler] Disposed"));}}]);}()),h=((r.GPUVideoDownscaler=b).MAX_VIDEOFRAME_FAILURES=10,` 188 // Chroma filter - reduce green channel towards average of R and B 189 // Uses branchless math to avoid GPU warp divergence 190 vec3 chromaFilter(vec3 color, float strength, float threshold) { 191 // Simple average of red and blue channels - approximates neutral color 192 float avgRB = (color.r + color.b) * 0.5; 193 float greenExcess = color.g - avgRB; 194 195 // Branchless: step(threshold, greenExcess) returns 1.0 if greenExcess > threshold, else 0.0 196 // step(0.001, strength) returns 1.0 if strength > 0, else 0.0 197 float shouldApply = step(threshold, greenExcess) * step(0.001, strength); 198 199 // Blend green towards avgRB based on strength, but only if shouldApply is 1.0 200 vec3 result = color; 201 result.g = mix(color.g, avgRB, strength * shouldApply); 202 return result; 203 } 204`),y=` 205 // Erode green-contaminated pixels by reducing alpha 206 // Uses branchless math to avoid GPU warp divergence 207 // Only affects edge pixels (semi-transparent) to preserve solid green content in foreground 208 { 209 // Simple average of red and blue channels - approximates neutral color 210 float avgRB = (videoColor.r + videoColor.b) * 0.5; 211 float greenExcess = videoColor.g - avgRB; 212 213 // u_greenSpillFalloff: Smoothstep gradient width for gradual transition (prevents hard edges) 214 // smoothstep already returns 0.0 when greenExcess <= threshold, so no branch needed 215 float greenFactor = smoothstep_custom(u_greenSpillThreshold, u_greenSpillThreshold + u_greenSpillFalloff, greenExcess); 216 217 // Edge detection mask: only affect semi-transparent pixels (edges) 218 // 0.02/0.15: Low alpha range - transition from transparent to semi-transparent 219 // 0.98/0.85: High alpha range - transition from semi-transparent to opaque 220 // Result: 1.0 for edge pixels (alpha ~0.15-0.85), 0.0 for solid foreground/background 221 float edgeMask = smoothstep_custom(0.02, 0.15, alpha) * smoothstep_custom(0.98, 0.85, alpha); 222 223 // Branchless: step(0.001, strength) returns 1.0 if strength > 0, else 0.0 224 float strengthActive = step(0.001, u_greenSpillStrength); 225 226 // 0.8: Scale factor to prevent over-erosion (keeps some original alpha) 227 // edgeMask ensures solid green areas (like clothes) are NOT affected 228 // When strengthActive is 0, erosion becomes 0 and alpha is unchanged 229 float erosion = greenFactor * u_greenSpillStrength * 0.8 * strengthActive * edgeMask; 230 alpha *= (1.0 - erosion); 231 } 232`,b=function(){function p(c,d){n(this,p),this.gl=null,this.isInitialized=!1,this.ownsContext=!0,this.targetCanvas=null,this.program=null,this.programR32F=null,this.videoTexture=null,this.maskTexture=null,this.prevMaskTexture=null,this.hasPrevMask=!1,this.prevMaskWidth=0,this.prevMaskHeight=0,this.copyFramebuffer=null,this.useVideoFrame=x,this.videoFrameLoggedOnce=!1,this.videoFrameFailCount=0,this.float32ArrayPathWarned=!1,this.positionBuffer=null,this.texCoordBuffer=null,this.uniformLocations=new Map(),this.uniformLocationsR32F=new Map(),this.positionAttribLoc=-1,this.texCoordAttribLoc=-1,this.positionAttribLocR32F=-1,this.texCoordAttribLocR32F=-1,this.staticUniformsSet=!1,this.staticUniformsSetR32F=!1,this.lastBgMaskTexture=null,this.lastHairMaskTexture=null,this.maskPackBuffer=null,this.maskPackBufferSize=0,this.vao=null,this.vaoR32F=null,this.lastMaskWidth=0,this.lastMaskHeight=0,this.lastVideoWidth=0,this.lastVideoHeight=0,this.lastMaskWidthR32F=0,this.lastMaskHeightR32F=0,this.lastVideoWidthR32F=0,this.lastVideoHeightR32F=0,this.lastHasPrevMaskUniform=!1,this.lastHasPrevMaskUniformR32F=!1,this.vertexShaderSource=`#version 300 es 233 in vec4 a_position; 234 in vec2 a_texCoord; 235 out vec2 v_texCoord; 236 void main() { 237 gl_Position = a_position; 238 v_texCoord = a_texCoord; 239 } 240 `,this.fragmentShaderSource=`#version 300 es 241 precision highp float; 242 243 uniform sampler2D u_video; 244 uniform sampler2D u_mask; 245 uniform sampler2D u_prevMask; // Previous frame's mask for temporal smoothing 246 uniform vec2 u_maskSize; 247 uniform vec2 u_videoSize; 248 uniform float u_edgeLow; 249 uniform float u_edgeHigh; 250 uniform float u_hairPreservation; 251 uniform float u_despillStrength; 252 uniform float u_despillRange; 253 uniform float u_edgeContract;
254 uniform float u_alphaBoost; 255 uniform bool u_useBilateral; 256 uniform float u_bilateralSigmaSpace; 257 uniform float u_bilateralSigmaColor; 258 uniform bool u_removeIslands; 259 uniform int u_islandRadius; 260 uniform float u_islandThreshold; 261 uniform float u_temporalSmoothing; // Temporal blend factor (0-1) 262 uniform bool u_hasPrevMask; // Whether previous mask is available 263 uniform float u_greenSpillStrength; // Green spill erosion strength 264 uniform float u_greenSpillThreshold; // Green spill detection threshold 265 uniform float u_greenSpillFalloff; // Green spill smoothstep falloff width 266 267 in vec2 v_texCoord; 268 out vec4 outColor; 269 270 float smoothstep_custom(float edge0, float edge1, float x) { 271 float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); 272 return t * t * (3.0 - 2.0 * t); 273 } 274 275 // Joint bilateral filter - edge-aware smoothing using video as guide 276 // This is the key technique Google Meet uses to remove halos 277 vec2 jointBilateralFilter(vec2 coord, vec2 maskTexelSize, vec3 centerColor) { 278 float sigmaSpace = u_bilateralSigmaSpace; 279 float sigmaColor = u_bilateralSigmaColor; 280 281 float sumBg = 0.0; 282 float sumHair = 0.0; 283 float sumWeight = 0.0; 284 285 int radius = int(sigmaSpace); 286 287 for (int dy = -radius; dy <= radius; dy++) { 288 for (int dx = -radius; dx <= radius; dx++) { 289 vec2 offset = vec2(float(dx), float(dy)) * maskTexelSize; 290 vec2 sampleCoord = coord + offset; 291 292 // Sample mask and video at offset 293 vec4 maskSample = texture(u_mask, sampleCoord); 294 vec3 videoSample = texture(u_video, sampleCoord).rgb; 295 296 // Spatial weight (Gaussian based on distance) 297 float spatialDist = length(vec2(float(dx), float(dy))); 298 float spatialWeight = exp(-spatialDist * spatialDist / (2.0 * sigmaSpace * sigmaSpace)); 299 300 // Color weight (Gaussian based on color difference) 301 // This is what makes it edge-aware - similar colors get higher weight 302 vec3 colorDiff = videoSample - centerColor; 303 float colorDist = length(colorDiff); 304 float colorWeight = exp(-colorDist * colorDist / (2.0 * sigmaColor * sigmaColor)); 305 306 // Combined weight 307 float weight = spatialWeight * colorWeight; 308 309 sumBg += maskSample.r * weight; 310 sumHair += maskSample.g * weight; 311 sumWeight += weight; 312 } 313 } 314 315 if (sumWeight > 0.0) { 316 return vec2(sumBg / sumWeight, sumHair / sumWeight); 317 } 318 return texture(u_mask, coord).rg; 319 } 320 321 // Sample mask with erosion - take maximum bg confidence from neighbors (shrinks foreground) 322 vec2 sampleMaskWithErosion(vec2 coord, vec2 texelSize, float erosionStrength) { 323 float maxBg = 0.0; 324 float minBg = 1.0; 325 float maxHair = 0.0; 326 327 for (int dy = -1; dy <= 1; dy++) { 328 for (int dx = -1; dx <= 1; dx++) { 329 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 330 vec4 maskSample = texture(u_mask, coord + offset); 331 maxBg = max(maxBg, maskSample.r); 332 minBg = min(minBg, maskSample.r); 333 maxHair = max(maxHair, maskSample.g); 334 } 335 } 336 337 float blendedBg = mix(minBg, maxBg, erosionStrength); 338 return vec2(blendedBg, maxHair); 339 } 340 341 // Remove white halo by darkening semi-transparent edge pixels 342 vec3 despillColor(vec3 color, float alpha) { 343 if (alpha >= 1.0 || alpha <= 0.0) return color; 344 345 float edgeFactor = 1.0 - smoothstep_custom(0.0, u_despillRange, alpha);
346 float brightness = max(max(color.r, color.g), color.b); 347 float despillAmount = edgeFactor * u_despillStrength * brightness; 348 vec3 result = color * (1.0 - despillAmount); 349 350 return result; 351 } 352 353 `.concat(h,` 354 355 // Morphological erode for island removal - increases bg confidence (shrinks foreground) 356 float morphErodeGPU(vec2 coord, vec2 texelSize, int radius) { 357 float maxVal = 0.0; 358 for (int dy = -radius; dy <= radius; dy++) { 359 for (int dx = -radius; dx <= radius; dx++) { 360 // Circular kernel 361 if (dx * dx + dy * dy > radius * radius) continue; 362 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 363 float val = texture(u_mask, coord + offset).r; 364 maxVal = max(maxVal, val); 365 } 366 } 367 return maxVal; 368 } 369 370 // Apply morphological opening to remove small foreground islands 371 float removeIslandsGPU(vec2 coord, vec2 texelSize, float originalBg) { 372 if (!u_removeIslands) return originalBg; 373 374 int radius = u_islandRadius; 375 376 // Opening: erode then dilate 377 // Erode: take max bg (shrink foreground) 378 float eroded = morphErodeGPU(coord, texelSize, radius); 379 380 // Dilate: take min of eroded values (expand foreground back) 381 float minVal = 1.0; 382 for (int dy = -radius; dy <= radius; dy++) { 383 for (int dx = -radius; dx <= radius; dx++) { 384 if (dx * dx + dy * dy > radius * radius) continue; 385 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 386 float neighborEroded = morphErodeGPU(coord + offset, texelSize, radius); 387 minVal = min(minVal, neighborEroded); 388 } 389 } 390 float opened = minVal; 391 392 // Check if this pixel was an island (classification changed) 393 float originalBinary = originalBg > u_islandThreshold ? 1.0 : 0.0; 394 float openedBinary = opened > u_islandThreshold ? 1.0 : 0.0; 395 396 // If classification changed, use opened value, otherwise keep original for smooth edges 397 if (abs(originalBinary - openedBinary) > 0.5) { 398 return opened; 399 } 400 return originalBg; 401 } 402 403 void main() { 404 vec4 videoColor = texture(u_video, v_texCoord); 405 vec2 texelSize = 1.0 / u_maskSize; 406 407 // Sample current mask 408 vec4 currentMask = texture(u_mask, v_texCoord); 409 float bgConf = currentMask.r; 410 float hairConf = currentMask.g; 411 412 // Apply GPU-based temporal smoothing FIRST (before other processing) 413 if (u_hasPrevMask && u_temporalSmoothing > 0.0) { 414 vec4 prevMask = texture(u_prevMask, v_texCoord); 415 bgConf = mix(bgConf, prevMask.r, u_temporalSmoothing); 416 hairConf = mix(hairConf, prevMask.g, u_temporalSmoothing); 417 } 418 419 // Now apply spatial filtering on the temporally-smoothed mask 420 if (u_useBilateral) { 421 // Use joint bilateral filter (Google Meet technique) 422 // Note: jointBilateralFilter samples u_mask directly, so we blend after 423 vec2 filtered = jointBilateralFilter(v_texCoord, texelSize, videoColor.rgb); 424 425 // Blend bilateral result with temporally-smoothed values 426 if (u_hasPrevMask && u_temporalSmoothing > 0.0) { 427 vec4 prevMask = texture(u_prevMask, v_texCoord); 428 filtered.x = mix(filtered.x, prevMask.r, u_temporalSmoothing); 429 filtered.y = mix(filtered.y, prevMask.g, u_temporalSmoothing); 430 } 431 432 bgConf = filtered.x; 433 hairConf = filtered.y; 434 435 // Still apply some erosion on top 436 vec2 erodedMask = sampleMaskWithErosion(v_texCoord, texelSize, u_edgeContract * 3.0); 437 bgConf = max(bgConf, erodedMask.x * u_edgeContract * 2.0); 438 } else { 439 // Original erosion-only approach 440 vec2 erodedMask = sampleMaskWithErosion(v_texCoord, texelSize * 2.0, u_edgeContract * 5.0); 441 442 float erosionBlend = clamp(u_edgeContract * 3.0, 0.0, 0.8); 443 bgConf = mix(bgConf, erodedMask.x, 0.5 + erosionBlend * 0.5); 444 hairConf = max(hairConf, erodedMask.y); 445 } 446 447 // Apply island removal to clean up small artifacts 448 bgConf = removeIslandsGPU(v_texCoord, texelSize, bgConf); 449
450 float adjustedBgConf = bgConf; 451 if (hairConf > 0.05) { 452 adjustedBgConf = bgConf * (1.0 - hairConf * u_hairPreservation); 453 } 454 455 // Apply edge contraction by shifting the threshold 456 float contractedEdgeLow = u_edgeLow - u_edgeContract; 457 float contractedEdgeHigh = u_edgeHigh - u_edgeContract; 458 459 float alpha = 1.0 - smoothstep_custom(contractedEdgeLow, contractedEdgeHigh, adjustedBgConf); 460 461 // Apply alpha boost to sharpen the transition 462 alpha = clamp(pow(alpha, 1.0 / u_alphaBoost), 0.0, 1.0); 463 464 `).concat(y,` 465 466 // Apply halo removal to edge pixels 467 vec3 finalColor = despillColor(videoColor.rgb, alpha); 468 469 // Apply chroma filter to reduce remaining green spill 470 finalColor = chromaFilter(finalColor, u_greenSpillStrength, u_greenSpillThreshold); 471 472 outColor = vec4(finalColor, alpha); 473 } 474 `),this.fragmentShaderR32FSource=`#version 300 es 475 precision highp float; 476 477 uniform sampler2D u_video; 478 uniform sampler2D u_bgMask; // R32F single-channel background mask 479 uniform sampler2D u_hairMask; // R32F single-channel hair mask 480 uniform sampler2D u_prevMask; // Previous frame's packed RG mask 481 uniform vec2 u_maskSize; 482 uniform vec2 u_videoSize; 483 uniform float u_edgeLow; 484 uniform float u_edgeHigh; 485 uniform float u_hairPreservation; 486 uniform float u_despillStrength; 487 uniform float u_despillRange; 488 uniform float u_edgeContract; 489 uniform float u_alphaBoost; 490 // Note: u_useBilateral, u_bilateralSigmaSpace, u_bilateralSigmaColor removed 491 // Bilateral filter disabled in R32F path due to coordinate mismatch issues 492 uniform bool u_removeIslands; 493 uniform int u_islandRadius; 494 uniform float u_islandThreshold; 495 uniform float u_temporalSmoothing; 496 uniform bool u_hasPrevMask; 497 uniform bool u_invertBgMask; // Invert bg mask for binary models (person \u2192 background) 498 uniform float u_greenSpillStrength; // Green spill erosion strength 499 uniform float u_greenSpillThreshold; // Green spill detection threshold 500 uniform float u_greenSpillFalloff; // Green spill smoothstep falloff width 501 502 in vec2 v_texCoord; 503 out vec4 outColor; 504 505 float smoothstep_custom(float edge0, float edge1, float x) { 506 float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); 507 return t * t * (3.0 - 2.0 * t); 508 } 509 510 // Sample both masks at coordinate - for R32F textures 511 vec2 sampleMasks(vec2 coord) { 512 float bg = texture(u_bgMask, coord).r; 513 float hair = texture(u_hairMask, coord).r; 514 // Binary models (single mask) output PERSON confidence 515 // Invert to get background confidence: 1.0 - person = background 516 if (u_invertBgMask) { 517 bg = 1.0 - bg; 518 hair = 0.0; // No hair data for binary models 519 } 520 return vec2(bg, hair); 521 } 522 523 // Joint bilateral filter for R32F textures 524 // Note: Currently disabled due to coordinate mismatch issues with MediaPipe textures 525 // Using hardcoded constants since this code path is disabled 526 vec2 jointBilateralFilterR32F(vec2 coord, vec2 maskTexelSize, vec3 centerColor) { 527 const float sigmaSpace = 2.0; // bilateralSigmaSpace 528 const float sigmaColor = 0.1; // bilateralSigmaColor 529 530 float sumBg = 0.0; 531 float sumHair = 0.0; 532 float sumWeight = 0.0; 533 534 int radius = int(sigmaSpace); 535 536 for (int dy = -radius; dy <= radius; dy++) { 537 for (int dx = -radius; dx <= radius; dx++) { 538 vec2 offset = vec2(float(dx), float(dy)) * maskTexelSize; 539 vec2 sampleCoord = coord + offset; 540 541 vec2 maskSample = sampleMasks(sampleCoord); 542 vec3 videoSample = texture(u_video, sampleCoord).rgb; 543 544 float spatialDist = length(vec2(float(dx), float(dy))); 545 float spatialWeight = exp(-spatialDist * spatialDist / (2.0 * sigmaSpace * sigmaSpace)); 546 547 vec3 colorDiff = videoSample - centerColor; 548 float colorDist = length(colorDiff); 549 float colorWeight = exp(-colorDist * colorDist / (2.0 * sigmaColor * sigmaColor)); 550 551 float weight = spatialWeight * colorWeight; 552 553 sumBg += maskSample.x * weight; 554 sumHair += maskSample.y * weight; 555 sumWeight += weight; 556 } 557 } 558 559 if (sumWeight > 0.0) { 560 return vec2(sumBg / sumWeight, sumHair / sumWeight); 561 } 562 return sampleMasks(coord); 563 } 564 565 vec2 sampleMaskWithErosionR32F(vec2 coord, vec2 texelSize, float erosionStrength) { 566 float maxBg = 0.0; 567 float minBg = 1.0; 568 float maxHair = 0.0; 569 570 for (int dy = -1; dy <= 1; dy++) { 571 for (int dx = -1; dx <= 1; dx++) { 572 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 573 vec2 maskSample = sampleMasks(coord + offset); 574 maxBg = max(maxBg, maskSample.x); 575 minBg = min(minBg, maskSample.x); 576 maxHair = max(maxHair, maskSample.y); 577 } 578 } 579 580 float blendedBg = mix(minBg, maxBg, erosionStrength); 581 return vec2(blendedBg, maxHair); 582 } 583
584 vec3 despillColor(vec3 color, float alpha) { 585 if (alpha >= 1.0 || alpha <= 0.0) return color; 586 587 float edgeFactor = 1.0 - smoothstep_custom(0.0, u_despillRange, alpha); 588 float brightness = max(max(color.r, color.g), color.b); 589 float despillAmount = edgeFactor * u_despillStrength * brightness; 590 return color * (1.0 - despillAmount); 591 } 592 593 `.concat(h,` 594 595 float morphErodeR32F(vec2 coord, vec2 texelSize, int radius) { 596 float maxVal = 0.0; 597 for (int dy = -radius; dy <= radius; dy++) { 598 for (int dx = -radius; dx <= radius; dx++) { 599 if (dx * dx + dy * dy > radius * radius) continue; 600 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 601 // Use sampleMasks to get properly inverted values for binary models 602 vec2 maskSample = sampleMasks(coord + offset); 603 float val = maskSample.x; 604 maxVal = max(maxVal, val); 605 } 606 } 607 return maxVal; 608 } 609 610 float removeIslandsR32F(vec2 coord, vec2 texelSize, float originalBg) { 611 if (!u_removeIslands) return originalBg; 612 613 int radius = u_islandRadius; 614 float eroded = morphErodeR32F(coord, texelSize, radius); 615 616 float minVal = 1.0; 617 for (int dy = -radius; dy <= radius; dy++) { 618 for (int dx = -radius; dx <= radius; dx++) { 619 if (dx * dx + dy * dy > radius * radius) continue; 620 vec2 offset = vec2(float(dx), float(dy)) * texelSize; 621 float neighborEroded = morphErodeR32F(coord + offset, texelSize, radius); 622 minVal = min(minVal, neighborEroded); 623 } 624 } 625 float opened = minVal; 626 627 float originalBinary = originalBg > u_islandThreshold ? 1.0 : 0.0; 628 float openedBinary = opened > u_islandThreshold ? 1.0 : 0.0; 629 630 if (abs(originalBinary - openedBinary) > 0.5) { 631 return opened; 632 } 633 return originalBg; 634 } 635 636 void main() { 637 vec4 videoColor = texture(u_video, v_texCoord); 638 vec2 texelSize = 1.0 / u_maskSize; 639 640 // Sample R32F masks 641 vec2 currentMask = sampleMasks(v_texCoord); 642 float bgConf = currentMask.x; 643 float hairConf = currentMask.y; 644 645 // DEBUG: Uncomment to output raw mask value as grayscale 646 // outColor = vec4(bgConf, bgConf, bgConf, 1.0); return; 647 648 // Apply GPU-based temporal smoothing 649 if (u_hasPrevMask && u_temporalSmoothing > 0.0) { 650 vec4 prevMask = texture(u_prevMask, v_texCoord); 651 bgConf = mix(bgConf, prevMask.r, u_temporalSmoothing); 652 hairConf = mix(hairConf, prevMask.g, u_temporalSmoothing); 653 } 654 655 // Note: Bilateral filter disabled for R32F path due to coordinate mismatch issues 656 // between MediaPipe textures and video. Using erosion-only approach instead. 657 if (false) { // Bilateral filter disabled 658 // Get center color with flipped Y to match mask coordinate space 659 vec2 centerVideoCoord = vec2(v_texCoord.x, 1.0 - v_texCoord.y); 660 vec3 centerColorForFilter = texture(u_video, centerVideoCoord).rgb; 661 vec2 filtered = jointBilateralFilterR32F(v_texCoord, texelSize, centerColorForFilter); 662 663 if (u_hasPrevMask && u_temporalSmoothing > 0.0) { 664 vec4 prevMask = texture(u_prevMask, v_texCoord); 665 filtered.x = mix(filtered.x, prevMask.r, u_temporalSmoothing); 666 filtered.y = mix(filtered.y, prevMask.g, u_temporalSmoothing); 667 } 668 669 bgConf = filtered.x; 670 hairConf = filtered.y; 671 672 vec2 erodedMask = sampleMaskWithErosionR32F(v_texCoord, texelSize, u_edgeContract * 3.0); 673 bgConf = max(bgConf, erodedMask.x * u_edgeContract * 2.0); 674 } else { 675 vec2 erodedMask = sampleMaskWithErosionR32F(v_texCoord, texelSize * 2.0, u_edgeContract * 5.0); 676 677 float erosionBlend = clamp(u_edgeContract * 3.0, 0.0, 0.8); 678 bgConf = mix(bgConf, erodedMask.x, 0.5 + erosionBlend * 0.5); 679 hairConf = max(hairConf, erodedMask.y); 680 } 681 682 bgConf = removeIslandsR32F(v_texCoord, texelSize, bgConf); 683
684 float adjustedBgConf = bgConf; 685 if (hairConf > 0.05) { 686 adjustedBgConf = bgConf * (1.0 - hairConf * u_hairPreservation); 687 } 688 689 float contractedEdgeLow = u_edgeLow - u_edgeContract; 690 float contractedEdgeHigh = u_edgeHigh - u_edgeContract; 691 692 float alpha = 1.0 - smoothstep_custom(contractedEdgeLow, contractedEdgeHigh, adjustedBgConf); 693 alpha = clamp(pow(alpha, 1.0 / u_alphaBoost), 0.0, 1.0); 694 695 `).concat(y,` 696 697 vec3 finalColor = despillColor(videoColor.rgb, alpha); 698 699 // Apply chroma filter to reduce remaining green spill 700 finalColor = chromaFilter(finalColor, u_greenSpillStrength, u_greenSpillThreshold); 701 702 // MediaPipe's GL context uses premultiplied alpha, so premultiply output 703 outColor = vec4(finalColor * alpha, alpha); 704 } 705 `),this.targetCanvas=c,this.boundHandleContextLost=this.handleContextLost.bind(this),this.boundHandleContextRestored=this.handleContextRestored.bind(this),this.init(d);}return _(p,[{key:"handleContextLost",value:function(c){c.preventDefault(),console.warn("WebGL context lost"),this.isInitialized=!1;}},{key:"handleContextRestored",value:function(){E.default.debug("[WebGLMaskRenderer] WebGL context restored, re-initializing..."),this.hasPrevMask=!1,this.lastHasPrevMaskUniform=!1,this.lastHasPrevMaskUniformR32F=!1,this.staticUniformsSet=!1,this.staticUniformsSetR32F=!1,this.lastMaskWidth=0,this.lastMaskHeight=0,this.lastVideoWidth=0,this.lastVideoHeight=0,this.lastMaskWidthR32F=0,this.lastMaskHeightR32F=0,this.lastVideoWidthR32F=0,this.lastVideoHeightR32F=0,this.init();}},{key:"init",value:function(c){try{c?(this.gl=c,this.ownsContext=!1,E.default.debug("[WebGLMaskRenderer] Using external WebGL2 context")):(this.gl=this.targetCanvas.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0,preserveDrawingBuffer:!1,antialias:!1,depth:!1,stencil:!1}),this.ownsContext=!0),this.gl?(this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.ownsContext&&(this.gl.clearColor(0,0,0,0),this.targetCanvas instanceof HTMLCanvasElement&&(this.targetCanvas.addEventListener("webglcontextlost",this.boundHandleContextLost),this.targetCanvas.addEventListener("webglcontextrestored",this.boundHandleContextRestored))),this.initShader(),this.initBuffers(),this.initTextures(),this.initVAOs(),this.copyFramebuffer=this.gl.createFramebuffer(),this.isInitialized=!0,E.default.debug("[WebGLMaskRenderer] Initialized single-pass WebGL2 pipeline with GPU temporal blending")):E.default.error("[WebGLMaskRenderer] Failed to get WebGL2 context");}catch(d){E.default.error("[WebGLMaskRenderer] Initialization failed: ".concat(d)),this.isInitialized=!1;}}},{key:"initShader",value:function(){var c=this.gl,d=c.createShader(c.VERTEX_SHADER);if(c.shaderSource(d,this.vertexShaderSource),c.compileShader(d),!c.getShaderParameter(d,c.COMPILE_STATUS))throw m=c.getShaderInfoLog(d),c.deleteShader(d),new Error("Vertex shader compilation failed: ".concat(m));var m=c.createShader(c.FRAGMENT_SHADER);if(c.shaderSource(m,this.fragmentShaderSource),c.compileShader(m),!c.getShaderParameter(m,c.COMPILE_STATUS))throw l=c.getShaderInfoLog(m),c.deleteShader(d),c.deleteShader(m),new Error("Fragment shader compilation failed: ".concat(l));if(this.program=c.createProgram(),c.attachShader(this.program,d),c.attachShader(this.program,m),c.linkProgram(this.program),!c.getProgramParameter(this.program,c.LINK_STATUS))throw l=c.getProgramInfoLog(this.program),c.deleteProgram(this.program),c.deleteShader(d),c.deleteShader(m),new Error("Program linking failed: ".concat(l));this.positionAttribLoc=c.getAttribLocation(this.program,"a_position"),this.texCoordAttribLoc=c.getAttribLocation(this.program,"a_texCoord");var a,s,l=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(l,this.fragmentShaderR32FSource),c.compileShader(l),c.getShaderParameter(l,c.COMPILE_STATUS)?(a=c.createShader(c.VERTEX_SHADER),c.shaderSource(a,this.vertexShaderSource),c.compileShader(a),this.programR32F=c.createProgram(),c.attachShader(this.programR32F,a),c.attachShader(this.programR32F,l),
705c.linkProgram(this.programR32F),c.getProgramParameter(this.programR32F,c.LINK_STATUS)?(this.positionAttribLocR32F=c.getAttribLocation(this.programR32F,"a_position"),this.texCoordAttribLocR32F=c.getAttribLocation(this.programR32F,"a_texCoord")):(s=c.getProgramInfoLog(this.programR32F),E.default.debug("[WebGLMaskRenderer] R32F program linking failed (will use fallback): ".concat(s)),c.deleteProgram(this.programR32F),this.programR32F=null),c.deleteShader(d),c.deleteShader(a)):(s=c.getShaderInfoLog(l),E.default.debug("[WebGLMaskRenderer] R32F shader compilation failed (will use fallback): ".concat(s)),c.deleteShader(d)),c.deleteShader(m),c.deleteShader(l);}},{key:"initBuffers",value:function(){var c=this.gl,d=new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),m=new Float32Array([0,1,1,1,0,0,0,0,1,1,1,0]);this.positionBuffer=c.createBuffer(),c.bindBuffer(c.ARRAY_BUFFER,this.positionBuffer),c.bufferData(c.ARRAY_BUFFER,d,c.STATIC_DRAW),this.texCoordBuffer=c.createBuffer(),c.bindBuffer(c.ARRAY_BUFFER,this.texCoordBuffer),c.bufferData(c.ARRAY_BUFFER,m,c.STATIC_DRAW);}},{key:"initTextures",value:function(){this.videoTexture=this.createTexture(),this.maskTexture=this.createTexture(),this.prevMaskTexture=this.createTexture();}},{key:"initVAOs",value:function(){var c=this.gl;this.program&&0<=this.positionAttribLoc&&(this.vao=c.createVertexArray(),c.bindVertexArray(this.vao),c.bindBuffer(c.ARRAY_BUFFER,this.positionBuffer),c.enableVertexAttribArray(this.positionAttribLoc),c.vertexAttribPointer(this.positionAttribLoc,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.texCoordBuffer),c.enableVertexAttribArray(this.texCoordAttribLoc),c.vertexAttribPointer(this.texCoordAttribLoc,2,c.FLOAT,!1,0,0),c.bindVertexArray(null)),this.programR32F&&0<=this.positionAttribLocR32F&&(this.vaoR32F=c.createVertexArray(),c.bindVertexArray(this.vaoR32F),c.bindBuffer(c.ARRAY_BUFFER,this.positionBuffer),c.enableVertexAttribArray(this.positionAttribLocR32F),c.vertexAttribPointer(this.positionAttribLocR32F,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.texCoordBuffer),c.enableVertexAttribArray(this.texCoordAttribLocR32F),c.vertexAttribPointer(this.texCoordAttribLocR32F,2,c.FLOAT,!1,0,0),c.bindVertexArray(null));}},{key:"createTexture",value:function(){var c=this.gl,d=c.createTexture();return c.bindTexture(c.TEXTURE_2D,d),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),d;}},{key:"uploadVideoTexture",value:function(c){var d=this.gl;if(d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,this.videoTexture),this.useVideoFrame)try{var m=new VideoFrame(c);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,m);}finally{m.close();}this.videoFrameFailCount=0,this.videoFrameLoggedOnce||(E.default.debug("[WebGLMaskRenderer] Using VideoFrame API for video upload"),this.videoFrameLoggedOnce=!0);}catch{this.videoFrameFailCount++,this.videoFrameFailCount>=p.MAX_VIDEOFRAME_FAILURES&&(this.useVideoFrame=!1,console.warn("VideoFrame failed ".concat(this.videoFrameFailCount," times, disabling for session"))),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c);}else d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c);}},{key:"getUniformLocation",value:function(c){return this.uniformLocations.has(c)||this.uniformLocations.set(c,this.gl.getUniformLocation(this.program,c)),this.uniformLocations.get(c);}},{key:"isReady",value:function(){return this.isInitialized&&this.gl!==null&&this.program!==null;}},{key:"render",value:function(c,d,m,a,s){if(this.isInitialized&&this.gl&&this.program&&this.targetCanvas){for(var l=this.gl,c=(this.float32ArrayPathWarned||(console.warn("Using Float32Array path (slower). This involves GPU\u2192CPU copy via getAsFloat32Array() and CPU-side mask packing."),this.float32ArrayPathWarned=!0),l.viewport(0,0,this.targetCanvas.width,this.targetCanvas.height),this.ownsContext||l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT),l.useProgram(this.program),this.uploadVideoTexture(c),a*s*4),g=((!this.maskPackBuffer||this.maskPackBufferSize<c)&&(this.maskPackBuffer=new Uint8Array(c),this.maskPackBufferSize=c),this.maskPackBuffer),f=0;f<d.length;f++)g[4*f]=Math.round(255*d[f]),g[4*f+1]=Math.round(255*m[f]),g[4*f+2]=0,g[4*f+3]=255;l.activeTexture(l.TEXTURE1),l.bindTexture(l.TEXTURE_2D,this.maskTexture),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,s,0,l.RGBA,l.UNSIGNED_BYTE,g),l.activeTexture(l.TEXTURE2),l.bindTexture(l.TEXTURE_2D,this.prevMaskTexture),this.setStaticUniforms(),a===this.lastMaskWidth&&s===this.lastMaskHeight||(l.uniform2f(this.getUniformLocation("u_maskSize"),a,s),this.lastMaskWidth=a,this.lastMaskHeight=s);var c=this.targetCanvas.width,v=this.targetCanvas.height;c===this.lastVideoWidth&&v===this.lastVideoHeight||(l.uniform2f(this.getUniformLocation("u_videoSize"),c,v),this.lastVideoWidth=c,this.lastVideoHeight=v),this.hasPrevMask!==this.lastHasPrevMaskUniform&&(l.uniform1i(this.getUniformLocation("u_hasPrevMask"),this.hasPrevMask?1:0),this.lastHasPrevMaskUniform=this.hasPrevMask),l.bindVertexArray(this.vao),l.drawArrays(l.TRIANGLES,0,6),l.bindVertexArray(null),this.copyMaskToPrevious(a,s);}}
705},{key:"copyMaskToPrevious",value:function(c,d){var m=this.gl;this.prevMaskWidth===c&&this.prevMaskHeight===d||(m.bindTexture(m.TEXTURE_2D,this.prevMaskTexture),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,c,d,0,m.RGBA,m.UNSIGNED_BYTE,null),this.prevMaskWidth=c,this.prevMaskHeight=d),m.bindFramebuffer(m.READ_FRAMEBUFFER,this.copyFramebuffer),m.framebufferTexture2D(m.READ_FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,this.maskTexture,0),m.bindTexture(m.TEXTURE_2D,this.prevMaskTexture),m.copyTexSubImage2D(m.TEXTURE_2D,0,0,0,0,0,c,d),m.bindFramebuffer(m.READ_FRAMEBUFFER,null),this.hasPrevMask=!0;}},{key:"getUniformLocationR32F",value:function(c){return this.uniformLocationsR32F.has(c)||this.uniformLocationsR32F.set(c,this.gl.getUniformLocation(this.programR32F,c)),this.uniformLocationsR32F.get(c);}},{key:"setStaticUniforms",value:function(){var c;this.staticUniformsSet||((c=this.gl).uniform1i(this.getUniformLocation("u_video"),0),c.uniform1i(this.getUniformLocation("u_mask"),1),c.uniform1i(this.getUniformLocation("u_prevMask"),2),c.uniform1f(this.getUniformLocation("u_edgeLow"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeLow),c.uniform1f(this.getUniformLocation("u_edgeHigh"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeHigh),c.uniform1f(this.getUniformLocation("u_hairPreservation"),r.DEFAULT_BG_REMOVAL_CONFIG.hairPreservation),c.uniform1f(this.getUniformLocation("u_despillStrength"),r.DEFAULT_BG_REMOVAL_CONFIG.despillStrength),c.uniform1f(this.getUniformLocation("u_despillRange"),r.DEFAULT_BG_REMOVAL_CONFIG.despillRange),c.uniform1f(this.getUniformLocation("u_edgeContract"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeContract),c.uniform1f(this.getUniformLocation("u_alphaBoost"),r.DEFAULT_BG_REMOVAL_CONFIG.alphaBoost),c.uniform1i(this.getUniformLocation("u_useBilateral"),r.DEFAULT_BG_REMOVAL_CONFIG.useBilateralFilter?1:0),c.uniform1f(this.getUniformLocation("u_bilateralSigmaSpace"),r.DEFAULT_BG_REMOVAL_CONFIG.bilateralSigmaSpace),c.uniform1f(this.getUniformLocation("u_bilateralSigmaColor"),r.DEFAULT_BG_REMOVAL_CONFIG.bilateralSigmaColor),c.uniform1i(this.getUniformLocation("u_removeIslands"),r.DEFAULT_BG_REMOVAL_CONFIG.removeIslands?1:0),c.uniform1i(this.getUniformLocation("u_islandRadius"),r.DEFAULT_BG_REMOVAL_CONFIG.islandRadius),c.uniform1f(this.getUniformLocation("u_islandThreshold"),r.DEFAULT_BG_REMOVAL_CONFIG.islandThreshold),c.uniform1f(this.getUniformLocation("u_temporalSmoothing"),r.DEFAULT_BG_REMOVAL_CONFIG.temporalSmoothing),c.uniform1f(this.getUniformLocation("u_greenSpillStrength"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillStrength),c.uniform1f(this.getUniformLocation("u_greenSpillThreshold"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillThreshold),c.uniform1f(this.getUniformLocation("u_greenSpillFalloff"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillFalloff),this.staticUniformsSet=!0);}},{key:"setStaticUniformsR32F",value:function(){var c;this.staticUniformsSetR32F||((c=this.gl).uniform1i(this.getUniformLocationR32F("u_video"),0),c.uniform1i(this.getUniformLocationR32F("u_bgMask"),1),c.uniform1i(this.getUniformLocationR32F("u_hairMask"),2),c.uniform1i(this.getUniformLocationR32F("u_prevMask"),3),c.uniform1f(this.getUniformLocationR32F("u_edgeLow"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeLow),c.uniform1f(this.getUniformLocationR32F("u_edgeHigh"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeHigh),c.uniform1f(this.getUniformLocationR32F("u_hairPreservation"),r.DEFAULT_BG_REMOVAL_CONFIG.hairPreservation),c.uniform1f(this.getUniformLocationR32F("u_despillStrength"),r.DEFAULT_BG_REMOVAL_CONFIG.despillStrength),c.uniform1f(this.getUniformLocationR32F("u_despillRange"),r.DEFAULT_BG_REMOVAL_CONFIG.despillRange),c.uniform1f(this.getUniformLocationR32F("u_edgeContract"),r.DEFAULT_BG_REMOVAL_CONFIG.edgeContract),c.uniform1f(this.getUniformLocationR32F("u_alphaBoost"),r.DEFAULT_BG_REMOVAL_CONFIG.alphaBoost),c.uniform1i(this.getUniformLocationR32F("u_removeIslands"),r.DEFAULT_BG_REMOVAL_CONFIG.removeIslands?1:0),c.uniform1i(this.getUniformLocationR32F("u_islandRadius"),r.DEFAULT_BG_REMOVAL_CONFIG.islandRadius),c.uniform1f(this.getUniformLocationR32F("u_islandThreshold"),r.DEFAULT_BG_REMOVAL_CONFIG.islandThreshold),c.uniform1f(this.getUniformLocationR32F("u_temporalSmoothing"),r.DEFAULT_BG_REMOVAL_CONFIG.temporalSmoothing),c.uniform1i(this.getUniformLocationR32F("u_invertBgMask"),0),c.uniform1f(this.getUniformLocationR32F("u_greenSpillStrength"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillStrength),c.uniform1f(this.getUniformLocationR32F("u_greenSpillThreshold"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillThreshold),c.uniform1f(this.getUniformLocationR32F("u_greenSpillFalloff"),r.DEFAULT_BG_REMOVAL_CONFIG.greenSpillFalloff),this.staticUniformsSetR32F=!0);}},{key:"renderFromR32FTextures",value:function(c,d,m,a,s){var l,g=5<arguments.length&&arguments[5]!==void 0&&arguments[5];this.isInitialized&&this.gl&&this.programR32F&&this.targetCanvas?((l=this.gl).bindFramebuffer(l.FRAMEBUFFER,null),l.disable(l.BLEND),l.disable(l.SCISSOR_TEST),l.disable(l.DEPTH_TEST),l.disable(l.CULL_FACE),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,0),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),l.viewport(0,0,this.targetCanvas.width,this.targetCanvas.height),this.ownsContext||l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT),l.useProgram(this.programR32F),this.uploadVideoTexture(c),l.activeTexture(l.TEXTURE1),l.bindTexture(l.TEXTURE_2D,d),d!==this.lastBgMaskTexture&&(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),this.lastBgMaskTexture=d),l.activeTexture(l.TEXTURE2),l.bindTexture(l.TEXTURE_2D,m),m!==this.lastHairMaskTexture&&(l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),this.lastHairMaskTexture=m),l.activeTexture(l.TEXTURE3),l.bindTexture(l.TEXTURE_2D,this.prevMaskTexture),this.setStaticUniformsR32F(),a===this.lastMaskWidthR32F&&s===this.lastMaskHeightR32F||(l.uniform2f(this.getUniformLocationR32F("u_maskSize"),a,s),this.lastMaskWidthR32F=a,this.lastMaskHeightR32F=s),c=this.targetCanvas.width,d=this.targetCanvas.height,c===this.lastVideoWidthR32F&&d===this.lastVideoHeightR32F||(l.uniform2f(this.getUniformLocationR32F("u_videoSize"),c,d),this.lastVideoWidthR32F=c,this.lastVideoHeightR32F=d),this.hasPrevMask!==this.lastHasPrevMaskUniformR32F&&(l.uniform1i(this.getUniformLocationR32F("u_hasPrevMask"),this.hasPrevMask?1:0),this.lastHasPrevMaskUniformR32F=this.hasPrevMask),l.uniform1i(this.getUniformLocationR32F("u_invertBgMask"),g?1:0),l.bindVertexArray(this.vaoR32F),l.drawArrays(l.TRIANGLES,0,6),l.bindVertexArray(null)):E.default.debug("[WebGLMaskRenderer] R32F shader not available");}},{key:"clearPreviousMask",value:function(){this.hasPrevMask=!1,this.prevMaskWidth=0,this.prevMaskHeight=0,this.lastBgMaskTexture=null,this.lastHairMaskTexture=null,this.lastHasPrevMaskUniform=!0,this.lastHasPrevMaskUniformR32F=!0,E.default.debug("[WebGLMaskRenderer] Cleared previous mask for temporal smoothing reset");}},{key:"dispose",value:function(){var c;this.gl&&(c=this.gl,this.vao&&c.deleteVertexArray(this.vao),this.vaoR32F&&c.deleteVertexArray(this.vaoR32F),this.videoTexture&&c.deleteTexture(this.videoTexture),this.maskTexture&&c.deleteTexture(this.maskTexture),this.prevMaskTexture&&c.deleteTexture(this.prevMaskTexture),this.copyFramebuffer&&c.deleteFramebuffer(this.copyFramebuffer),this.positionBuffer&&c.deleteBuffer(this.positionBuffer),this.texCoordBuffer&&c.deleteBuffer(this.texCoordBuffer),this.program&&c.deleteProgram(this.program),this.programR32F&&c.deleteProgram(this.programR32F),this.ownsContext&&this.targetCanvas instanceof HTMLCanvasElement&&(this.targetCanvas.removeEventListener("webglcontextlost",this.boundHandleContextLost),this.targetCanvas.removeEventListener("webglcontextrestored",this.boundHandleContextRestored)),this.ownsContext&&(c=c.getExtension("WEBGL_lose_context"))&&c.loseContext(),this.vao=null,this.vaoR32F=null,this.videoTexture=null,this.maskTexture=null,this.prevMaskTexture=null,this.copyFramebuffer=null,this.positionBuffer=null,this.texCoordBuffer=null,this.program=null,this.programR32F=null,this.gl=null,this.targetCanvas=null,this.hasPrevMask=!1,this.prevMaskWidth=0,this.prevMaskHeight=0,this.uniformLocations.clear(),this.uniformLocationsR32F.clear(),this.isInitialized=!1,this.staticUniformsSet=!1,this.staticUniformsSetR32F=!1,this.lastBgMaskTexture=null,this.lastHairMaskTexture=null,E.default.debug("[WebGLMaskRenderer] Disposed"));}},{key:"getGL",value:function(){return this.gl;}}]);}();(r.WebGLMaskRenderer=b).MAX_VIDEOFRAME_FAILURES=10;},function(i,r,y){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(b,p){for(var c=0;c<p.length;c++){var d=p[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,function(m){return m=function(a,s){if(t(a)!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l===void 0)return(s==="string"?String:Number)(a);if(l=l.call(a,s||"default"),t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.");}(m,"string"),t(m)=="symbol"?m:m+"";}(d.key),d);}}
705Object.defineProperty(r,"__esModule",{value:!0});var o=y(255),_=y(114),E=y(259),x=y(261),h=y(310),y=function(){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");}return p=b,d=[{key:"createComponent",value:function(m,a){switch(m.type){case"image":return new o.default(m,a);case"video":return new _.default(m,a);case"color":return new E.default(m,a);case"container/text":return new x.default(m,a);case"animation":return h.default.createComponent(m,a);default:return;}}}],(c=null)&&n(p.prototype,c),d&&n(p,d),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,c,d;}();r.default=y;},function(i,r,c){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(){n=function(){return a;};var m,a={},s=Object.prototype,l=s.hasOwnProperty,g=Object.defineProperty||function(Q,F,X){Q[F]=X.value;},K=typeof Symbol=="function"?Symbol:{},f=K.iterator||"@@iterator",v=K.asyncIterator||"@@asyncIterator",S=K.toStringTag||"@@toStringTag";function w(Q,F,X){return Object.defineProperty(Q,F,{value:X,enumerable:!0,configurable:!0,writable:!0}),Q[F];}try{w({},"");}catch{w=function(F,X,Y){return F[X]=Y;};}function C(Q,le,X,se){var j,D,$,ne,le=le&&le.prototype instanceof B?le:B,le=Object.create(le.prototype),se=new J(se||[]);return g(le,"_invoke",{value:(j=Q,D=X,$=se,ne=O,function(fe,ge){if(ne===N)throw Error("Generator is already running");if(ne===G){if(fe==="throw")throw ge;return{value:m,done:!0};}for($.method=fe,$.arg=ge;;){var he=$.delegate;if(he&&(he=function _e(Re,ee){var W=ee.method,ae=Re.iterator[W];return ae===m?(ee.delegate=null,W==="throw"&&Re.iterator.return&&(ee.method="return",ee.arg=m,_e(Re,ee),ee.method==="throw")||W!=="return"&&(ee.method="throw",ee.arg=new TypeError("The iterator does not provide a '"+W+"' method")),H):(W=I(ae,Re.iterator,ee.arg),W.type==="throw"?(ee.method="throw",ee.arg=W.arg,ee.delegate=null,H):(ae=W.arg,ae?ae.done?(ee[Re.resultName]=ae.value,ee.next=Re.nextLoc,ee.method!=="return"&&(ee.method="next",ee.arg=m),ee.delegate=null,H):ae:(ee.method="throw",ee.arg=new TypeError("iterator result is not an object"),ee.delegate=null,H)));}(he,$),he)){if(he===H)continue;return he;}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(ne===O)throw ne=G,$.arg;$.dispatchException($.arg);}else $.method==="return"&&$.abrupt("return",$.arg);if(ne=N,he=I(j,D,$),he.type==="normal"){if(ne=$.done?G:M,he.arg===H)continue;return{value:he.arg,done:$.done};}he.type==="throw"&&(ne=G,$.method="throw",$.arg=he.arg);}})}),le;}function I(Q,F,X){try{return{type:"normal",arg:Q.call(F,X)};}catch(Y){return{type:"throw",arg:Y};}}a.wrap=C;var O="suspendedStart",M="suspendedYield",N="executing",G="completed",H={};function B(){}function z(){}function te(){}var K={},V=(w(K,f,function(){return this;}),Object.getPrototypeOf),V=V&&V(V(oe([]))),U=(V&&V!==s&&l.call(V,f)&&(K=V),te.prototype=B.prototype=Object.create(K));function Z(Q){["next","throw","return"].forEach(function(F){w(Q,F,function(X){return this._invoke(F,X);});});}function re(Q,F){var X;g(this,"_invoke",{value:function(Y,j){function D(){return new F(function($,ne){(function le(Re,fe,ge,he){var _e,Re=I(Q[Re],Q,fe);if(Re.type!=="throw")return(fe=(_e=Re.arg).value)&&t(fe)=="object"&&l.call(fe,"__await")?F.resolve(fe.__await).then(function(ee){le("next",ee,ge,he);},function(ee){le("throw",ee,ge,he);}):F.resolve(fe).then(function(ee){_e.value=ee,ge(_e);},function(ee){return le("throw",ee,ge,he);});he(Re.arg);})(Y,j,$,ne);});}return X=X?X.then(D,D):D();}});}function ue(Q){var F={tryLoc:Q[0]};1 in Q&&(F.catchLoc=Q[1]),2 in Q&&(F.finallyLoc=Q[2],F.afterLoc=Q[3]),this.tryEntries.push(F);}function q(Q){var F=Q.completion||{};F.type="normal",delete F.arg,Q.completion=F;}function J(Q){this.tryEntries=[{tryLoc:"root"}],Q.forEach(ue,this),this.reset(!0);}function oe(Q){if(Q||Q===""){var F,X=Q[f];if(X)return X.call(Q);if(typeof Q.next=="function")return Q;if(!isNaN(Q.length))return F=-1,(X=function Y(){for(;++F<Q.length;)if(l.call(Q,F))return Y.value=Q[F],Y.done=!1,Y;return Y.value=m,Y.done=!0,Y;}).next=X;}throw new TypeError(t(Q)+" is not iterable");}return g(U,"constructor",{value:z.prototype=te,configurable:!0}),g(te,"constructor",{value:z,configurable:!0}),z.displayName=w(te,S,"GeneratorFunction"),a.isGeneratorFunction=function(Q){return Q=typeof Q=="function"&&Q.constructor,!!Q&&(Q===z||(Q.displayName||Q.name)==="GeneratorFunction");},a.mark=function(Q){return Object.setPrototypeOf?Object.setPrototypeOf(Q,te):(Q.__proto__=te,w(Q,S,"GeneratorFunction")),Q.prototype=Object.create(U),Q;},a.awrap=function(Q){return{__await:Q};},Z(re.prototype),w(re.prototype,v,function(){return this;}),a.AsyncIterator=re,a.async=function(Q,F,X,Y,j){j===void 0&&(j=Prom
705ise);var D=new re(C(Q,F,X,Y),j);return a.isGeneratorFunction(F)?D:D.next().then(function($){return $.done?$.value:D.next();});},Z(U),w(U,S,"Generator"),w(U,f,function(){return this;}),w(U,"toString",function(){return"[object Generator]";}),a.keys=function(Q){var F,X=Object(Q),Y=[];for(F in X)Y.push(F);return Y.reverse(),function j(){for(;Y.length;){var D=Y.pop();if(D in X)return j.value=D,j.done=!1,j;}return j.done=!0,j;};},a.values=oe,J.prototype={constructor:J,reset:function(Q){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(q),!Q)for(var F in this)F.charAt(0)==="t"&&l.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=m);},stop:function(){this.done=!0;var Q=this.tryEntries[0].completion;if(Q.type==="throw")throw Q.arg;return this.rval;},dispatchException:function(Q){if(this.done)throw Q;var F=this;function X(le,se){return D.type="throw",D.arg=Q,F.next=le,se&&(F.method="next",F.arg=m),!!se;}for(var Y=this.tryEntries.length-1;0<=Y;--Y){var j=this.tryEntries[Y],D=j.completion;if(j.tryLoc==="root")return X("end");if(j.tryLoc<=this.prev){var $=l.call(j,"catchLoc"),ne=l.call(j,"finallyLoc");if($&&ne){if(this.prev<j.catchLoc)return X(j.catchLoc,!0);if(this.prev<j.finallyLoc)return X(j.finallyLoc);}else if($){if(this.prev<j.catchLoc)return X(j.catchLoc,!0);}else{if(!ne)throw Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return X(j.finallyLoc);}}}},abrupt:function(Q,F){for(var X=this.tryEntries.length-1;0<=X;--X){var Y=this.tryEntries[X];if(Y.tryLoc<=this.prev&&l.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var j=Y;break;}}var D=(j=j&&(Q==="break"||Q==="continue")&&j.tryLoc<=F&&F<=j.finallyLoc?null:j)?j.completion:{};return D.type=Q,D.arg=F,j?(this.method="next",this.next=j.finallyLoc,H):this.complete(D);},complete:function(Q,F){if(Q.type==="throw")throw Q.arg;return Q.type==="break"||Q.type==="continue"?this.next=Q.arg:Q.type==="return"?(this.rval=this.arg=Q.arg,this.method="return",this.next="end"):Q.type==="normal"&&F&&(this.next=F),H;},finish:function(Q){for(var F=this.tryEntries.length-1;0<=F;--F){var X=this.tryEntries[F];if(X.finallyLoc===Q)return this.complete(X.completion,X.afterLoc),q(X),H;}},catch:function(Q){for(var F=this.tryEntries.length-1;0<=F;--F){var X,Y,j=this.tryEntries[F];if(j.tryLoc===Q)return(X=j.completion).type==="throw"&&(Y=X.arg,q(j)),Y;}throw Error("illegal catch attempt");},delegateYield:function(Q,F,X){return this.delegate={iterator:oe(Q),resultName:F,nextLoc:X},this.method==="next"&&(this.arg=m),H;}},a;}function o(m,a){var s,l=typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];
705if(!l){if(Array.isArray(m)||(l=function(S,w){if(S){if(typeof S=="string")return _(S,w);var C={}.toString.call(S).slice(8,-1);return(C=C==="Object"&&S.constructor?S.constructor.name:C)==="Map"||C==="Set"?Array.from(S):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?_(S,w):void 0;}}(m))||a&&m&&typeof m.length=="number")return l&&(m=l),s=0,{s:a=function(){},n:function(){return s>=m.length?{done:!0}:{done:!1,value:m[s++]};},e:function(S){throw S;},f:a};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 706In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var g,f=!0,v=!1;return{s:function(){l=l.call(m);},n:function(){var S=l.next();return f=S.done,S;},e:function(S){v=!0,g=S;},f:function(){try{f||l.return==null||l.return();}finally{if(v)throw g;}}};}function _(m,a){(a==null||a>m.length)&&(a=m.length);for(var s=0,l=Array(a);s<a;s++)l[s]=m[s];return l;}function E(m,a){if(!(m instanceof a))throw new TypeError("Cannot call a class as a function");}function x(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function h(m,a,s){return a&&x(m.prototype,a),s&&x(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;}var y=this&&this.__awaiter||function(m,a,s,l){return new(s=s||Promise)(function(g,f){function v(C){try{w(l.next(C));}catch(I){f(I);}}function S(C){try{w(l.throw(C));}catch(I){f(I);}}function w(C){var I;C.done?g(C.value):((I=C.value)instanceof s?I:new s(function(O){O(I);})).then(v,S);}w((l=l.apply(m,a||[])).next());});},b=(Object.defineProperty(r,"__esModule",{value:!0}),r.TextAnnotation=r.TextContainerAnnotations=void 0,c(5)),p=c(283),c=function(){return h(function m(a,s){E(this,m),this._annotations=[];var l,g=o(a);try{for(g.s();!(l=g.n()).done;){var f=l.value,v=new d(f,s);this._annotations.push(v);}}catch(S){g.e(S);}finally{g.f();}},[{key:"getAnnotationWithoutLoad",value:function(m){if(!(m<0||m>=this._annotations.length))return this._annotations[m];}},{key:"getAnnotation",value:function(m){return y(this,void 0,void 0,n().mark(function a(){var s;return n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(m<0||m>=this._annotations.length)return l.abrupt("return",void 0);l.next=4;break;case 4:return s=p.default.getInstance(),l.next=7,s.addAnnotationFont(this._annotations[m]);case 7:return l.abrupt("return",this._annotations[m]);case 8:case"end":return l.stop();}},a,this);}));}},{key:"length",get:function(){return this._annotations.length;}}]);}(),d=(r.TextContainerAnnotations=c,function(){return h(function m(a,s){var l,g=this;E(this,m),this._fgColor="#000000",this._bgColor=void 0,this._shadow=void 0,this._stroke=void 0,this._lineHeight=0,this._letterSpacing=void 0,this._fontSize=0,this._fonts=[],this._fontUrls=[],this._borderRadius=void 0,this._cssStyleDeclarations=void 0,this._activeWordAnnotation=void 0,this._padding=void 0,this._textTransform=void 0,this._regex=void 0,this._filters=[],this._scale=void 0,a.hasOwnProperty("fgColor")&&(this._fgColor=a.fgColor),a.hasOwnProperty("bgColor")&&(this._bgColor=a.bgColor),a.hasOwnProperty("shadow")&&(this._shadow=a.shadow),a.hasOwnProperty("stroke")&&a.stroke&&(this._stroke=b.default.cloneDeep(a.stroke),this._stroke.width=this._stroke.width?b.default.scaleWithFormat(this._stroke.width,s):void 0),a.hasOwnProperty("lineHeight")&&(this._lineHeight=a.lineHeight),a.hasOwnProperty("letterSpacing")&&a.letterSpacing&&(l=b.default.scaleWithFormat(a.letterSpacing,s),this._letterSpacing=typeof l=="string"?l:"".concat(l,"px")),a.hasOwnProperty("fontSize")&&(this._fontSize=b.default.scale(a.fontSize,s)),a.hasOwnProperty("fontUrls")&&(this._fontUrls=a.fontUrls),a.hasOwnProperty("borderRadius")&&(this._borderRadius=a.borderRadius),a.hasOwnProperty("cssStyleDeclarations")&&(this._cssStyleDeclarations=a.cssStyleDeclarations),a.hasOwnProperty("activeWordAnnotation")&&(this._activeWordAnnotation=b.default.cloneDeep(a.activeWordAnnotation),Object.keys(this._activeWordAnnotation).forEac
706h(function(f){var v=g._activeWordAnnotation[f];(v&&typeof v=="number"||typeof v=="string")&&(g._activeWordAnnotation[f]=b.default.scaleWithFormat(v,s));})),a.hasOwnProperty("padding")&&(this._padding=a.padding),a.hasOwnProperty("textTransform")&&(this._textTransform=a.textTransform),a.hasOwnProperty("regex")&&(this._regex=a.regex),this._stroke&&(this._shadow=this.generateStroke(this._stroke.color,this._stroke.steps,this._stroke.width)),a.hasOwnProperty("filters")&&a.filters&&(a.filters=a.filters.filter(function(f){return f!==void 0;}),this._filters=a.filters.map(function(f){return f&&b.default.scaleWithFormat(f,s);})),a.hasOwnProperty("scale")&&this.setScale(a.scale);},[{key:"borderRadius",get:function(){return this._borderRadius;}},{key:"cssStyleDeclarations",get:function(){return this._cssStyleDeclarations;}},{key:"activeWordAnnotation",get:function(){return this._activeWordAnnotation;}},{key:"fgColor",get:function(){return this._fgColor;}},{key:"bgColor",get:function(){return this._bgColor;}},{key:"shadow",get:function(){return this._shadow;}},{key:"stroke",get:function(){return this._stroke;}},{key:"fontUrls",get:function(){return this._fontUrls;}},{key:"fonts",get:function(){return this._fonts;},set:function(m){this._fonts=m;}},{key:"lineHeight",get:function(){return this._lineHeight;}},{key:"letterSpacing",get:function(){return this._letterSpacing;}},{key:"fontSize",get:function(){return this._fontSize;}},{key:"padding",get:function(){return this._padding;}},{key:"textTransform",get:function(){return this._textTransform;}},{key:"regex",get:function(){return this._regex;}},{key:"filters",get:function(){return this._filters;}},{key:"setScale",value:function(m){this._scale=function(a){if(typeof a=="string"){var s=a.match(/\(([^)]+)\)/);if(s)return s[1];}return a;}(m);}},{key:"scale",get:function(){return this._scale;}},{key:"generateStroke",value:function(){for(var m=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"#FFFFFF",a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:16,s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"0.18em",l="",g=0;g<a;g++){var v=2*g*Math.PI/a,f=Math.round(1e4*Math.cos(v))/1e4,v=Math.round(1e4*Math.sin(v))/1e4;l+="calc(".concat(s," * ").concat(f,") calc(").concat(s," * ").concat(v,") 0 ").concat(m,",");}return l.slice(0,-1);}}]);}());r.TextAnnotation=d;},function(i,r,e){var t,n,o,_,E,x,h,y,b,p,c,d;function m(ee,W,ae){return ee.call.apply(ee.bind,arguments);}function a(ee,W,ae){if(ee)return 2<arguments.length?(de=Array.prototype.slice.call(arguments,2),function(){var ye=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(ye,de),ee.apply(W,ye);}):function(){return ee.apply(W,arguments);};var de;throw Error();}function s(ee,W,ae){return(s=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?m:a).apply(null,arguments);}function l(ee,W){this.a=ee,this.o=W||ee,this.c=this.o.document;}function g(ee,W,ae,de){if(W=ee.c.createElement(W),ae)for(var ye in ae)ae.hasOwnProperty(ye)&&(ye=="style"?W.style.cssText=ae[ye]:W.setAttribute(ye,ae[ye]));return de&&W.appendChild(ee.c.createTextNode(de)),W;}function f(ee,W,ae){(ee=(ee=ee.c.getElementsByTagName(W)[0])||document.documentElement).insertBefore(ae,ee.lastChild);}function v(ee){ee.parentNode&&ee.parentNode.removeChild(ee);}function S(ee,W,ae){W=W||[],ae=ae||[];for(var de=ee.className.split(/\s+/),ye=0;ye<W.length;ye+=1){for(var Se=!1,De=0;De<de.length;De+=1)if(W[ye]===de[De]){Se=!0;break;}Se||de.push(W[ye]);}for(W=[],ye=0;ye<de.length;ye+=1){for(Se=!1,De=0;De<ae.length;De+=1)if(de[ye]===ae[De]){Se=!0;break;}Se||W.push(de[ye]);}ee.className=W.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"");}function w(ee,W){for(var ae=ee.className.split(/\s+/),de=0,ye=ae.length;de<ye;de++)if(ae[de]==W)return!0;return!1;}function C(ee,W,ae){function de(){De&&ye&&(De(Se),De=null);}W=g(ee,"link",{rel:"stylesheet",href:W,media:"all"});var ye=!1,Se=null,De=ae||null;n?(W.onload=function(){ye=!0,de();},W.onerror=function(){ye=!0,Se=Error("Stylesheet failed to load"),de();}):setTimeout(function(){ye=!0,de();},0),f(ee,"head",W);}function I(ee,W,ae,de){var ye,Se,De=ee.c.getElementsByTagName("head")[0];return De?(ye=g(ee,"script",{src:W}),Se=!1,ye.onload=ye.onreadystatechange=function(){Se||this.readyState&&this.readyState!="loaded"&&this.readyState!="complete"||(Se=!0,ae&&ae(null),ye.onload=ye.onreadystatechange=null,ye.parentNode.tagName=="HEAD"&&De.removeChild(ye));},De.appendChild(ye),setTimeout(function(){Se||(Se=!0,ae&&ae(Error("Script load timeout")));},de||5e3),ye):null;}function O(){this.a=0,this.c=null;}function M(ee){return ee.a++,function(){ee.a--,G(ee);};}function N(ee,W){ee.c=W,G(ee);}function G(ee){ee.a==0&&ee.c&&(ee.c(),ee.c=null);}function H(ee){this.a=ee||"-";}function B(ee,W){this.c=ee,this.f=4,this.a="n",ee=(W||"n4").match(/^([nio])([1-9])$/i),ee&&(this.a=ee[1],this.f=parseInt(ee[2],10));}function z(ee){var W=[];ee=ee.split(/,\s*/);for(var ae=0;ae<ee.length;ae++){var de=ee[ae].replace(/['"]/g,"");de.indexOf(" ")!=-1||/^\d/.test(de)?W.push("'"+de+"'"):W.push(de);}return W.join(",");}function te(ee){return ee.a+ee.f;}function K(ee){var W="normal";return ee.a==="o"?W="oblique":ee.a==="i"&&(W="italic"),W;}function V(ee,W){this.c=ee,this.f=ee.o.document.documentElement,this.h=W,this.a=new H("-"),this.j=W.events!==!1,this.g=W.classes!==!1;}function U(ee){var W,ae,de;ee.g&&(W=w(ee.f,ee.a.c("wf","active")),ae=[],de=[ee.a.c("wf","loading")],W||ae.push(ee.a.c("wf","inactive")),S(ee.f,ae,de)),Z(ee,"inactive");}function Z(ee,W,ae){ee.j&&ee.h[W]&&(ae?ee.h[W](ae.c,te(ae)):ee.h[W]());}function re(){this.c={};}function ue(ee,W){this.c=ee,this.f=W,this.a=g(this.c,"span",{"aria-hidden":"true"},this.f);}function q(ee){f(ee.c,"body",ee.a);}function J(ee){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+z(ee.c)+";font-style:"+K(ee)+";font-weight:"+ee.f+"00;";}function oe(ee,W,ae,de,ye,Se){this.g=ee,this.j=W,this.a=de,this.c=ae,this.f=ye||3e3,this.h=Se||void 0;}function Q(ee,W,ae,de,ye,Se,De){this.v=ee,this.B=W,this.c=ae,this.a=de,this.s=De||"BESbswy",this.f={},this.w=ye||3e3,this.u=Se||null,this.m=this.j=this.h=this.g=null,this.g=new ue(this.c,this.s),this.h=new ue(this.c,this.s),this.j=new ue(this.c,this.s),this.m=new ue(this.c,this.s),ee=J(ee=new B(this.a.c+",serif",te(this.a))),this.g.a.style.cssText=ee,ee=J(ee=new B(this.a.c+",sans-serif",te(this.a))),this.h.a.style.cssText=ee,ee=J(ee=new B("serif",te(this.a))),this.j.a.style.cssText=ee,ee=J(ee=new B("sans-serif",te(this.a))),this.m.a.style.cssText=ee,q(this.g),q
706(this.h),q(this.j),q(this.m);}function F(){var ee;return _===null&&(ee=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),_=!!ee&&(parseInt(ee[1],10)<536||parseInt(ee[1],10)===536&&parseInt(ee[2],10)<=11)),_;}function X(ee,W,ae){for(var de in o)if(o.hasOwnProperty(de)&&W===ee.f[o[de]]&&ae===ee.f[o[de]])return!0;return!1;}function Y(ee){var W,ae=ee.g.a.offsetWidth,de=ee.h.a.offsetWidth;(W=(W=ae===ee.f.serif&&de===ee.f["sans-serif"])?W:F()&&X(ee,ae,de))?t()-ee.A>=ee.w?F()&&X(ee,ae,de)&&(ee.u===null||ee.u.hasOwnProperty(ee.a.c))?j(ee,ee.v):j(ee,ee.B):setTimeout(s(function(){Y(this);},ee),50):j(ee,ee.v);}function j(ee,W){setTimeout(s(function(){v(this.g.a),v(this.h.a),v(this.j.a),v(this.m.a),W(this.a);},ee),0);}function D(ee,W,ae){this.c=ee,this.a=W,this.f=0,this.m=this.j=!1,this.s=ae;}function $(ee){--ee.f==0&&ee.j&&(ee.m?((ee=ee.a).g&&S(ee.f,[ee.a.c("wf","active")],[ee.a.c("wf","loading"),ee.a.c("wf","inactive")]),Z(ee,"active")):U(ee.a));}function ne(ee){this.j=ee,this.a=new re(),this.h=0,this.f=this.g=!0;}function le(ee,W){this.c=ee,this.a=W;}function se(ee,W){this.c=ee,this.a=W;}function fe(ee,W){this.c=ee||"https://fonts.googleapis.com/css",this.a=[],this.f=[],this.g=W||"";}function ge(ee){this.f=ee,this.a=[],this.c={};}function he(ee,W){this.c=ee,this.a=W;}function _e(ee,W){this.c=ee,this.a=W;}function Re(ee,W){this.c=ee,this.f=W,this.a=[];}t=Date.now||function(){return+new Date();},n=!!window.FontFace,H.prototype.c=function(ee){for(var W=[],ae=0;ae<arguments.length;ae++)W.push(arguments[ae].replace(/[\W_]+/g,"").toLowerCase());return W.join(this.a);},oe.prototype.start=function(){var ee=this.c.o.document,W=this,ae=t(),de=new Promise(function(De,Ue){(function Be(){var nt;t()-ae>=W.f?Ue():ee.fonts.load(K(nt=W.a)+" "+nt.f+"00 300px "+z(nt.c),W.h).then(function(it){1<=it.length?De():setTimeout(Be,25);},function(){Ue();});})();}),ye=null,Se=new Promise(function(De,Ue){ye=setTimeout(Ue,W.f);});Promise.race([Se,de]).then(function(){ye&&(clearTimeout(ye),ye=null),W.g(W.a);},function(){W.j(W.a);});},o={D:"serif",C:"sans-serif"},_=null,Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=t(),Y(this);},E=null,D.prototype.g=function(ee){var W=this.a;W.g&&S(W.f,[W.a.c("wf",ee.c,te(ee).toString(),"active")],[W.a.c("wf",ee.c,te(ee).toString(),"loading"),W.a.c("wf",ee.c,te(ee).toString(),"inactive")]),Z(W,"fontactive",ee),this.m=!0,$(this);},D.prototype.h=function(ee){var W,ae,de,ye=this.a;ye.g&&(W=w(ye.f,ye.a.c("wf",ee.c,te(ee).toString(),"active")),ae=[],de=[ye.a.c("wf",ee.c,te(ee).toString(),"loading")],W||ae.push(ye.a.c("wf",ee.c,te(ee).toString(),"inactive")),S(ye.f,ae,de)),Z(ye,"fontinactive",ee),$(this);},ne.prototype.load=function(ye){this.c=new l(this.j,ye.context||this.j),this.g=ye.events!==!1,this.f=ye.classes!==!1;var W=this,ae=new V(this.c,ye),de=ye,Se=[],ye=de.timeout,Se=(function(Ue){Ue.g&&S(Ue.f,[Ue.a.c("wf","loading")]),Z(Ue,"loading");}(ae),function(Ue,Be,nt){var it,ot,ht=[];for(it in Be)!Be.hasOwnProperty(it)||(ot=Ue.c[it])&&ht.push(ot(Be[it],nt));return ht;}(W.a,de,W.c)),De=new D(W.c,ae,ye);for(W.h=Se.length,ae=0,de=Se.length;ae<de;ae++)Se[ae].load(function(Ue,Be,nt){var it,ot,ht,Et,At;it=De,ot=Ue,ht=Be,Et=nt,At=--(Ue=W).h==0,(Ue.f||Ue.g)&&setTimeout(function(){var Nt=Et||null,Ut=ht||{};if(ot.length===0&&At)U(it.a);else{it.f+=ot.length,At&&(it.j=At);for(var bi=[],Ge=0;Ge<ot.length;Ge++){var qe,yt=ot[Ge],bt=Ut[yt.c],gt=it.a,Ot=yt;gt.g&&S(gt.f,[gt.a.c("wf",Ot.c,te(Ot).toString(),"loading")]),Z(gt,"fontloading",Ot),gt=(E=(gt=null)===E?!!window.FontFace&&(Ot=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),qe=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor),Ot?42<parseInt(Ot[1],10):!qe):E)?new oe(s(it.g,it),s(it.h,it),it.c,yt,it.s,bt):new Q(s(it.g,it),s(it.h,it),it.c,yt,it.s,Nt,bt),bi.push(gt);}for(Ge=0;Ge<bi.length;Ge++)bi[Ge].start();}},0);});},le.prototype.load=function(ee){var W,ae=this,de=ae.a.projectId,ye=ae.a.version;de?(W=ae.c.o,I(this.c,(ae.a.api||"https://fast.fonts.net/jsapi")+"/"+de+".js"+(ye?"?v="+ye:""),function(Se){Se?ee([]):(W["__MonotypeConfiguration__"+de]=function(){return ae.a;},function De(){if(W["__mti_fntLst"+de]){var Ue,Be=W["__mti_fntLst"+de](),nt=[];if(Be)for(var it=0;
706it<Be.length;it++){var ot=Be[it].fontfamily;Be[it].fontStyle!=null&&Be[it].fontWeight!=null?(Ue=Be[it].fontStyle+Be[it].fontWeight,nt.push(new B(ot,Ue))):nt.push(new B(ot));}ee(nt);}else setTimeout(function(){De();},50);}());}).id="__MonotypeAPIScript__"+de):ee([]);},se.prototype.load=function(ee){for(var W=this.a.urls||[],ae=this.a.families||[],de=this.a.testStrings||{},ye=new O(),Se=0,De=W.length;Se<De;Se++)C(this.c,W[Se],M(ye));var Ue=[];for(Se=0,De=ae.length;Se<De;Se++)if((W=ae[Se].split(":"))[1])for(var Be=W[1].split(","),nt=0;nt<Be.length;nt+=1)Ue.push(new B(W[0],Be[nt]));else Ue.push(new B(W[0]));N(ye,function(){ee(Ue,de);});},x={latin:"BESbswy","latin-ext":"\xE7\xF6\xFC\u011F\u015F",cyrillic:"\u0439\u044F\u0416",greek:"\u03B1\u03B2\u03A3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},h={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},y={i:"i",italic:"i",n:"n",normal:"n"},b=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/,p={Arimo:!0,Cousine:!0,Tinos:!0},he.prototype.load=function(ee){for(var W=new O(),ae=this.c,de=new fe(this.a.api,this.a.text),ye=this.a.families,Se=de,De=ye,Ue=De.length,Be=0;Be<Ue;Be++){var nt=De[Be].split(":"),it=(nt.length==3&&Se.f.push(nt.pop()),"");nt.length==2&&nt[1]!=""&&(it=":"),Se.a.push(nt.join(it));}for(var ot=new ge(ye),ht=ot,Et=ht.f.length,At=0;At<Et;At++){var Nt=ht.f[At].split(":"),Ut=Nt[0].replace(/\+/g," "),bi=["n4"];if(2<=Nt.length){var Ge,qe,yt=Nt[1],bt=[];if(yt)for(var gt=(yt=yt.split(",")).length,Ot=0;Ot<gt;Ot++)(qe=!(qe=yt[Ot]).match(/^[\w-]+$/)||(Ge=b.exec(qe.toLowerCase()))==null?"":[qe=(qe=Ge[2])==null||qe==""?"n":y[qe],Ge=(Ge=Ge[1])==null||Ge==""?"4":h[Ge]||(isNaN(Ge)?"4":Ge.substr(0,1))].join(""))&&bt.push(qe);0<bt.length&&(bi=bt),Nt.length==3&&(bt=[],0<(Nt=(Nt=Nt[2])?Nt.split(","):bt).length&&(Nt=x[Nt[0]])&&(ht.c[Ut]=Nt));}for(ht.c[Ut]||(Nt=x[Ut])&&(ht.c[Ut]=Nt),Nt=0;Nt<bi.length;Nt+=1)ht.a.push(new B(Ut,bi[Nt]));}C(ae,function(Mt){if(Mt.a.length==0)throw Error("No fonts to load!");if(Mt.c.indexOf("kit=")!=-1)return Mt.c;for(var Lt=Mt.a.length,Kt=[],Dt=0;Dt<Lt;Dt++)Kt.push(Mt.a[Dt].replace(/ /g,"+"));return Lt=Mt.c+"?family="+Kt.join("%7C"),0<Mt.f.length&&(Lt+="&subset="+Mt.f.join(",")),0<Mt.g.length&&(Lt+="&text="+encodeURIComponent(Mt.g)),Lt;}(de),M(W)),N(W,function(){ee(ot.a,ot.c,p);});},_e.prototype.load=function(ee){var W=this.a.id,ae=this.c.o;W?I(this.c,(this.a.api||"https://use.typekit.net")+"/"+W+".js",function(de){if(de)ee([]);else if(ae.Typekit&&ae.Typekit.config&&ae.Typekit.config.fn){de=ae.Typekit.config.fn;for(var ye=[],Se=0;Se<de.length;Se+=2)for(var De=de[Se],Ue=de[Se+1],Be=0;Be<Ue.length;Be++)ye.push(new B(De,Ue[Be]));try{ae.Typekit.load({events:!1,classes:!1,async:!0});}catch{}ee(ye);}},2e3):ee([]);},Re.prototype.load=function(ee){var W=this.f.id,ae=this.c.o,de=this;W?(ae.__webfontfontdeckmodule__||(ae.__webfontfontdeckmodule__={}),ae.__webfontfontdeckmodule__[W]=function(ye,Se){for(var De,Ue,Be,nt=0,it=Se.fonts.length;nt<it;++nt){var ot=Se.fonts[nt];de.a.push(new B(ot.name,(ot="font-weight:"+ot.weight+";font-style:"+ot.style,Be=Ue=De=void 0,De=4,Ue="n",Be=null,ot&&((Be=ot.match(/(normal|oblique|italic)/i))&&Be[1]&&(Ue=Be[1].substr(0,1).toLowerCase()),(Be=ot.match(/([1-9]00|normal|bold)/i))&&Be[1]&&(/bold/i.test(Be[1])?De=7:/[1-9]00/.test(Be[1])&&(De=parseInt(Be[1].substr(0,1),10)))),Ue+De)));}ee(de.a);},I(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+((ae=this.c).o.location.hostname||ae.a.location.hostname)+"/"+W+".js",function(ye){ye&&ee([]);})):ee([]);},(c=new ne(window)).a.c.custom=function(ee,W){return new se(W,ee);},c.a.c.fontdeck=function(ee,W){return new Re(W,ee);},c.a.c.monotype=function(ee,W){return new le(W,ee);},c.a.c.typekit=function(ee,W){return new _e(W,ee);},c.a.c.google=function(ee,W){return new he(W,ee);},d={load:s(c.load,c)},(c=function(){return d;}.call(r,e,r,i))!==void 0&&(i.exports=c);},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}
706Object.defineProperty(r,"__esModule",{value:!0});var o=_(267),_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"createComponent",value:function(b,p){var c=b.animationType;if(c==="lottie")return new o.default(b,p);}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();r.default=_;},function(i,r){(function(e){i.exports=e;}).call(this,{});},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.ImageComponentAttributesBuilder=r.ImageComponentAttributes=void 0;var p=m(256),c=m(24),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,p.ImageComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.ImageComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new c.ComponentAttributesBuilder(s).build(),l;}return y(a,p.ImageComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.ImageComponentAttributesBuilder=m;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=E(l);var s=d,l=_()?Reflect.construct(l,a||[],E(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}
706function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function x(d,m){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0});var h=c(46),y=c(314),b=c(259),p=c(105),c=function(d){function m(l,g){var f;if(this instanceof m)return(f=o(this,m,[l,g])).attributes=new y.ColorComponentAttributesBuilder(l.attributes,f.scale).build(),f._timeBasedComponent=new h.default(f,g,f.attributes),f.components=p.default.createComponents(l.components,g),f;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&x(s,d),s=m,(d=[{key:"componentTemplate",get:function(){return this._componentTemplate;}},{key:"endTime",value:function(){return this._timeBasedComponent.endTime;}},{key:"startTime",value:function(){return this._timeBasedComponent.startTime;}},{key:"renderTimeline",value:function(l){this._timeBasedComponent.renderTimeline(l,this.element,this.components,this.constructor.name);}},{key:"getAllEffects",value:function(){return this._timeBasedComponent.getAllEffects();}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(b.default);r.default=c;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.ColorComponentAttributesBuilder=r.ColorComponentAttributes=void 0;var p=m(24),c=m(260),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,c.ColorComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.ColorComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new p.ComponentAttributesBuilder(s).build(),l;}return y(a,c.ColorComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.ColorComponentAttributesBuilder=m;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(s){return function(l){if(Array.isArray(l))return E(l);}(s)||function(l){if(typeof Symbol<"u"&&l[Symbol.iterator]!=null||l["@@iterator"]!=null)return Array.from(l);}(s)||_(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 707In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(s,l){var g,f=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!f){if(Array.isArray(s)||(f=_(s))||l&&s&&typeof s.length=="number")return f&&(s=f),g=0,{s:l=function(){},n:function(){return g>=s.length?{done:!0}:{done:!1,value:s[g++]};},e:function(C){throw C;},f:l};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 708In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var v,S=!0,w=!1;return{s:function(){f=f.call(s);},n:function(){var C=f.next();return S=C.done,C;},e:function(C){w=!0,v=C;},f:function(){try{S||f.return==null||f.return();}finally{if(w)throw v;}}};}function _(s,l){if(s){if(typeof s=="string")return E(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?E(s,l):void 0;}}function E(s,l){(l==null||l>s.length)&&(l=s.length);for(var g=0,f=Array(l);g<l;g++)f[g]=s[g];return f;}function x(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
708(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}function h(s,v,g){v=b(v);var f=s,v=y()?Reflect.construct(v,g||[],b(s).constructor):v.apply(s,g);if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function y(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(y=function(){return!!s;})();}function b(s){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function p(s,l){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}Object.defineProperty(r,"__esModule",{value:!0});var c=a(46),d=a(316),m=a(317),a=function(s){function l(v,S){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var w=h(this,l,[v,S]),C=v.attributes.xAlignment||"left",I=new d.TextContainerComponentAttributesBuilder(v.attributes,w.scale);if(w.attributes=I.setPadding(v.attributes.padding).setXAlignment(C).build(),w.textComponents=[],v.components){var O,M=o(v.subComponents);try{for(M.s();!(O=M.n()).done;){var N=O.value,G=new m.default(N,w.annotations,C,w.scale,S);G&&w.textComponents.push(G);}}catch(H){M.e(H);}finally{M.f();}}return w._timeBasedComponent=new c.default(w,S,w.attributes),w;}var g,f=l;if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");return f.prototype=Object.create(s&&s.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),s&&p(f,s),f=l,(s=[{key:"renderTimeline",value:function(v){v.set(this.element,{visibility:"visible"},this.startTime()).set(this.element,{visibility:"hidden"},this.endTime());var S,w=o(this.animationEffects);try{for(w.s();!(S=w.n()).done;)S.value.apply(this.element,v,this.startTime());}catch(O){w.e(O);}finally{w.f();}var C,I=o(this.textComponents);try{for(I.s();!(C=I.n()).done;)C.value.renderTimeline(v);}catch(O){I.e(O);}finally{I.f();}}},{key:"width",set:function(v){}},{key:"height",set:function(v){}},{key:"endTime",value:function(){return this._timeBasedComponent.endTime;}},{key:"startTime",value:function(){return this._timeBasedComponent.startTime;}},{key:"getAllEffects",value:function(){var v=this._timeBasedComponent.getAllEffects();return v.concat.apply(v,n(this.textComponents.map(function(S){return S.getAllEffects();})));}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}}])&&x(f.prototype,s),g&&x(f,g),Object.defineProperty(f,"prototype",{writable:!1}),f;}(a(261).default);r.default=a;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}
708function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.TextContainerComponentAttributesBuilder=r.TextContainerComponentAttributes=void 0;var p=m(262),c=m(24),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,p.TextContainerComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.TextContainerComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new c.ComponentAttributesBuilder(s).build(),l;}return y(a,p.TextContainerComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.TextContainerComponentAttributesBuilder=m;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){var l,g=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!g){if(Array.isArray(a)||(g=function(w,C){if(w){if(typeof w=="string")return o(w,C);var I={}.toString.call(w).slice(8,-1);return(I=I==="Object"&&w.constructor?w.constructor.name:I)==="Map"||I==="Set"?Array.from(w):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?o(w,C):void 0;}}(a))||s&&a&&typeof a.length=="number")return g&&(a=g),l=0,{s:s=function(){},n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]};},e:function(w){throw w;},f:s};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 709In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var f,v=!0,S=!1;return{s:function(){g=g.call(a);},n:function(){var w=g.next();return v=w.done,w;},e:function(w){S=!0,f=w;},f:function(){try{v||g.return==null||g.return();}finally{if(S)throw f;}}};}function o(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,g=Array(s);l<s;l++)g[l]=a[l];return g;}function _(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0});
709var b=m(318),p=m(5),c=m(265),d=m(46),m=function(a){function s(f,v,S,w,C){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");return v=E(this,s,[f,v,S,w,C]),w=new b.TextComponentAttributesBuilder(f.attributes,v.scaleFactor),w.setXAlignment(S),v.attributes=w.build(),v._timeBasedComponent=new d.default(v,C,v.attributes),v;}var l,g=s;if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");return g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&y(g,a),g=s,(a=[{key:"renderTimeline",value:function(f){f.set(this._element,{visibility:"visible"},this.startTime()).set(this._element,{visibility:"hidden"},this.endTime());var v,S=n(this.animationEffects);try{for(S.s();!(v=S.n()).done;){var w=v.value;p.default.debug("Applying effect type: ".concat(w.type," with timeoffset : ").concat(w.timeOffset)),w.apply(this._element,f,this.startTime());}}catch(C){S.e(C);}finally{S.f();}}},{key:"endTime",value:function(){return this._timeBasedComponent.endTime;}},{key:"startTime",value:function(){return this._timeBasedComponent.startTime;}},{key:"getAllEffects",value:function(){return this._timeBasedComponent.getAllEffects();}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}}])&&_(g.prototype,a),l&&_(g,l),Object.defineProperty(g,"prototype",{writable:!1}),g;}(c.default);r.default=m;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.TextComponentAttributesBuilder=r.TextComponentAttributes=void 0;var p=m(266),c=m(24),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,p.TextComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.TextComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new c.ComponentAttributesBuilder(s).build(),l;}return y(a,p.TextComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.TextComponentAttributesBuilder=m;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}
709(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.VideoComponentAttributesBuilder=r.VideoComponentAttributes=void 0;var p=m(24),c=m(258),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,c.VideoComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.VideoComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new p.ComponentAttributesBuilder(s).build(),l;}return y(a,c.VideoComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.VideoComponentAttributesBuilder=m;},function(i,r,_){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}Object.defineProperty(r,"__esModule",{value:!0});var o=_(321),_=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");}return x=E,y=[{key:"createComponent",value:function(b,p){var c=b.animationType;if(c==="lottie")return new o.LottieComponent(b,p);}}],(h=null)&&n(x.prototype,h),y&&n(x,y),Object.defineProperty(x,"prototype",{writable:!1}),x;var x,h,y;}();r.default=_;},function(i,r,a){"use strict";function t(s){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l;}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l;})(s);}function n(s,l){var g,f=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!f){if(Array.isArray(s)||(f=function(C,I){if(C){if(typeof C=="string")return o(C,I);var O={}.toString.call(C).slice(8,-1);return(O=O==="Object"&&C.constructor?C.constructor.name:O)==="Map"||O==="Set"?Array.from(C):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?o(C,I):void 0;}}(s))||l&&s&&typeof s.length=="number")return f&&(s=f),g=0,{s:l=function(){},n:function(){return g>=s.length?{done:!0}:{done:!1,value:s[g++]};},e:function(C){throw C;},f:l};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 710In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var v,S=!0,w=!1;return{s:function(){f=f.call(s);},n:function(){var C=f.next();return S=C.done,C;},e:function(C){w=!0,v=C;},f:function(){try{S||f.return==null||f.return();}finally{if(w)throw v;}}};}function o(s,l){(l==null||l>s.length)&&(l=s.length);for(var g=0,f=Array(l);g<l;g++)f[g]=s[g];return f;}function _(s,l){for(var g=0;g<l.length;g++){var f=l[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,function(v){return v=function(S,w){if
710(t(S)!="object"||!S)return S;var C=S[Symbol.toPrimitive];if(C===void 0)return(w==="string"?String:Number)(S);if(C=C.call(S,w||"default"),t(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.");}(v,"string"),t(v)=="symbol"?v:v+"";}(f.key),f);}}function E(s,v,g){v=h(v);var f=s,v=x()?Reflect.construct(v,g||[],h(s).constructor):v.apply(s,g);if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(s=f,s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s;}function x(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!s;})();}function h(s){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l);})(s);}function y(s,l){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g;})(s,l);}Object.defineProperty(r,"__esModule",{value:!0}),r.LottieComponent=void 0,a(270);var b=a(5),p=a(2),c=a(267),d=a(46),m=a(322),a=function(s){function l(v,S){var w;if(this instanceof l)return(w=E(this,l,[v,S])).attributes=new m.LottieComponentAttributesBuilder(v.attributes,w.scale).build(),w._timeBasedComponent=new d.default(w,S,w.attributes),w;throw new TypeError("Cannot call a class as a function");}var g,f=l;if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");return f.prototype=Object.create(s&&s.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),s&&y(f,s),f=l,(s=[{key:"pause",value:function(){var v,S=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;this._animation&&(this._animation.isPaused||(b.default.debug("Lottie Animation Paused!"),this._animation.pause()),S!==void 0&&0<=S&&S>=this.startTime()&&S<=this.endTime()&&(v=1e3*(S=b.default.round(this.calcRelativePosition(S),3)),b.default.debug("Updating animation player to ".concat(S)),this._animation.goToAndStop(v,!1)));}},{key:"renderTimeline",value:function(v){var S,w=this,C=n(this.animationEffects);try{for(C.s();!(S=C.n()).done;)S.value.apply(this.element,v,this.startTime());}catch(G){C.e(G);}finally{C.f();}function I(){var G,H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;w._animation&&(void(G=0)!==H&&(H=Number(H),G=b.default.round(w.calcRelativePosition(H),6)),b.default.debug("Calculated time to play in lottie animation : ".concat(G)),w._animation.goToAndPlay(1e3*G,!1));}var O=this.startTime(),M=this.endTime(),N=p.gsap.timeline({onUpdate:function(){var G=b.default.round(N.time(),6);w._animation&&w._animation.isPaused&&O<=G&&G<M&&I(G);}});N.call(I,[],O).set(this.element,{visibility:"visible"},O).set(this.element,{visibility:"inherit"},M).call(function(){w._animation&&!w._animation.isPaused&&w._animation.pause();},[],M),v.add(N,0);}},{key:"calcRelativePosition",value:function(v){if(v!==void 0)return v-=this.startTime(),this.loop?v%this._animationDuration:Math.max(0,Math.min(this.animationDuration,v));}},{key:"endTime",value:function(){return this._timeBasedComponent.endTime;}},{key:"startTime",value:function(){return this._timeBasedComponent.startTime;}},{key:"getAllEffects",value:function(){return this._timeBasedComponent.getAllEffects();}},{key:"behavioralEffects",value:function(){return this._timeBasedComponent.behavioralEffects;}}])&&_(f.prototype,s),g&&_(f,g),Object.defineProperty(f,"prototype",{writable:!1}),f;}(c.default);r.LottieComponent=a;},function(i,r,m){"use strict";function t(a){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s;}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s;})(a);}function n(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");}function o(a,s){for(var l=0;l<s.length;l++){var g=s[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(a,function(f){return f=function(v,S){if(t(v)!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w===void 0)return(S==="string"?String:Number)(v);if(w=w.call(v,S||"default"),t(w)!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.");}
710(f,"string"),t(f)=="symbol"?f:f+"";}(g.key),g);}}function _(a,s,l){return s&&o(a.prototype,s),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;}function E(a,f,l){f=h(f);var g=a,f=x()?Reflect.construct(f,l||[],h(a).constructor):f.apply(a,l);if(f&&(t(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(a=g,a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a;}function x(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!a;})();}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s);})(a);}function y(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&b(a,s);}function b(a,s){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l;})(a,s);}Object.defineProperty(r,"__esModule",{value:!0}),r.LottieComponentAttributesBuilder=r.LottieComponentAttributes=void 0;var p=m(269),c=m(24),d=function(){function a(s){var l;return n(this,a),(l=E(this,a,[s]))._timelineAttributes=s.timelineAttributes,l;}return y(a,p.AnimationComponentCoreAttributes),_(a,[{key:"duration",value:function(){return this._timelineAttributes.duration;}},{key:"endTime",value:function(){return this._timelineAttributes.endTime;}},{key:"startTime",value:function(){return this._timelineAttributes.startTime;}}]);}(),m=(r.LottieComponentAttributes=d,function(){function a(s,l){return n(this,a),(l=E(this,a,[s,l]))._timelineAttributes=new c.ComponentAttributesBuilder(s).build(),l;}return y(a,p.AnimationComponentCoreAttributesBuilder),_(a,[{key:"timelineAttributes",get:function(){return this._timelineAttributes;}},{key:"build",value:function(){return new d(this);}}]);}());r.LottieComponentAttributesBuilder=m;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){var a,s=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!s){if(Array.isArray(d)||(s=function(v,S){if(v){if(typeof v=="string")return o(v,S);var w={}.toString.call(v).slice(8,-1);return(w=w==="Object"&&v.constructor?v.constructor.name:w)==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?o(v,S):void 0;}}(d))||m&&d&&typeof d.length=="number")return s&&(d=s),a=0,{s:m=function(){},n:function(){return a>=d.length?{done:!0}:{done:!1,value:d[a++]};},e:function(v){throw v;},f:m};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 711In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var l,g=!0,f=!1;return{s:function(){s=s.call(d);},n:function(){var v=s.next();return g=v.done,v;},e:function(v){f=!0,l=v;},f:function(){try{g||s.return==null||s.return();}finally{if(f)throw l;}}};}function o(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function _(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function E(d,l,a){l=y(l);var s=d,l=x()?Reflect.construct(l,a||[],y(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function x(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!d;})();}
711function h(){return(h=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(d,m,a){var s=function(l,g){for(;!{}.hasOwnProperty.call(l,g)&&(l=y(l))!==null;);return l;}(d,m);if(s)return(s=Object.getOwnPropertyDescriptor(s,m)).get?s.get.call(arguments.length<3?d:a):s.value;}).apply(null,arguments);}function y(d){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function b(d,m){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0});var p=c(50),c=function(d){function m(l,g,f){var v;if(this instanceof m)return(v=E(this,m,[l,g,f])).slide=l,v.width=g,v.height=f,v;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&b(s,d),s=m,(d=[{key:"adaptLayer",value:function(l,g){this.adaptAttributes(l,g.attributes);var f,v,S=this.generateViewValues(g.attributes),w=1e7,C=0,I=n(g.components);try{for(I.s();!(v=I.n()).done;){var O=v.value,M=new p.ValueParser(l.slideAspectRatio,S,O.attributes.startTime,O.attributes.endTime,l.paramLookUp),w=Math.min(w,O.attributes.startTime),C=Math.max(C,O.attributes.endTime);this.adaptComponent(M,O);}}catch(V){I.e(V);}finally{I.f();}S.width=l.getWidth(),S.height=l.getHeight();var N=new p.ValueParser(l.slideAspectRatio,S,w,C,l.paramLookUp,l.globalAtts);if(g.effects){var G,H=n(g.effects);try{for(H.s();!(G=H.n()).done;){var B=G.value;this.adaptEffect(N,B);}}catch(V){H.e(V);}finally{H.f();}}if(0<((f=g.binds)==null?void 0:f.length)){var z,te=n(g.binds);try{for(te.s();!(z=te.n()).done;){var K=z.value;this.adaptBinds(N,K);}}catch(V){te.e(V);}finally{te.f();}}}},{key:"adaptBindsRecursively",value:function(l,g){var f,v;if(g instanceof Object){for(var S in g)if(this.adaptBindsRecursively(l,g[S]),g[S]instanceof Object){for(var w=0;w<((f=g.cond)==null?void 0:f.length);w++)g.cond[w]=l.parseVal(g.cond[w]);for(var C=0;C<((v=g.calc)==null?void 0:v.length);C++)g.calc[C]=l.parseVal(g.calc[C]);}}}},{key:"adaptBinds",value:function(l,g){this.adaptBindsRecursively(l,g);}},{key:"generateComponentValueParser",value:function(l,S){var f=this.generateViewValues(S.attributes),v=(isNaN(f.height)&&(f.height=l.height),isNaN(f.width)&&(f.width=l.width),S.attributes.startTime),S=S.attributes.endTime;return new p.ValueParser(l.slideAspectRatio,f,v,S,l.paramLookUp,l.globalAtts);}},{key:"generateSlideValueParser",value:function(){var l={width:this.width,height:this.height},g={width:this.width,height:this.height};return new p.ValueParser(this.slide.aspectRatio,g,this.slide.startTime,this.slide.endTime,void 0,l);}},{key:"adapt",value:function(){S=m,l="adapt",g=this,v=h(y(1&(f=3)?S.prototype:S),l,g);var l,g,f,v,S=(2&f?function(C){return v.apply(g,C);}:v)([]),w=[];return S&&S.forEach(function(C){return w.push(C);}),w;}}])&&_(s.prototype,d),a&&_(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(c(274).default);r.default=c;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){var a,s=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!s){if(Array.isArray(d)||(s=function(v,S){if(v){if(typeof v=="string")return o(v,S);var w={}.toString.call(v).slice(8,-1);return(w=w==="Object"&&v.constructor?v.constructor.name:w)==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?o(v,S):void 0;}}(d))||m&&d&&typeof d.length=="number")return s&&(d=s),a=0,{s:m=function(){},n:function(){return a>=d.length?{done:!0}:{done:!1,value:d[a++]};},e:function(v){throw v;},f:m};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 712In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var l,g=!0,f=!1;return{s:function(){s=s.call(d);},n:function(){var v=s.next();return g=v.done,v;},e:function(v){f=!0,l=v;},f:function(){try{g||s.return==null||s.return();}finally{if(f)throw l;}}};}function o(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function _(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}
712Object.defineProperty(r,"__esModule",{value:!0});var E=c(275),x=c(33),h=c(325),y=c(276),b=c(5),p=c(326),c=function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");}return m=d,s=[{key:"frontViewChangesBuildMap",value:function(l){var g=this;if(!l)return b.default.warn("[".concat(this.constructor.name,"] Front-View Changes Builder has failed to build due to non-valid slide")),null;if(1<((f=(f=l.refSlide)==null?void 0:f.media)==null?void 0:f.length))return b.default.warn("[".concat(this.constructor.name,"] Front-View Changes Builder has failed to build due to slide with more than one media")),null;if(0<((f=(f=l.refSlide)==null?void 0:f.media)==null?void 0:f.length)){var f=x.default.hasMainView(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),v=x.default.hasFrontView(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),S=x.default.isFrontViewComp(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),w=function(C){return C&&C.adaptingEffect&&h.default.FRONT_VIEW_EXCLUSIONS.includes(C.adaptingEffect.type);};if(x.default.exist(l.Layers,f)&&x.default.exist(l.Layers,v))return this.slideBuildMap(l,[void 0,S],[void 0,function(C,I){var O=C.getAllEffects();g.addEffectsAsIntervals(I,O,C.startTime,C.endTime,w);},function(C,I){(0,p.isTimeBasedViewAnimationComponent)(C)&&I.addEntry({start:C.startTime(),end:C.endTime()},[C]);var O=C.getAllEffects();g.addEffectsAsIntervals(I,O,C.startTime(),C.endTime(),w);}]);}}},{key:"frontViewExistsBuildMap",value:function(l){if(!l)return b.default.warn("[".concat(this.constructor.name,"] Front-View Builder has failed to build due to non-valid slide")),null;if(1<((g=(g=l.refSlide)==null?void 0:g.media)==null?void 0:g.length))return b.default.warn("[".concat(this.constructor.name,"] Front-View Builder has failed to build due to slide with more than one media")),null;if(0<((g=(g=l.refSlide)==null?void 0:g.media)==null?void 0:g.length)){var g=x.default.hasMainView(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),f=x.default.hasFrontView(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),v=x.default.isFrontViewComp(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl);if(x.default.exist(l.Layers,g)&&x.default.exist(l.Layers,f))return this.slideBuildMap(l,[void 0,v],[void 0,void 0,function(S,w){var C={start:S.startTime(),end:S.endTime()};w.addEntry(C,[S]);}]);}}},{key:"mainViewBuildMap",value:function(l){var g=this;if(!l)return b.default.warn("[".concat(this.constructor.name,"] Main-View Builder has failed to build due to non-valid slide")),null;if(1<((f=(f=l.refSlide)==null?void 0:f.media)==null?void 0:f.length))return b.default.warn("[".concat(this.constructor.name,"] Main-View Builder has failed to build due to slide with more than one media")),null;if(0<((f=(f=l.refSlide)==null?void 0:f.media)==null?void 0:f.length)){var f=x.default.hasMainView(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),v=x.default.isMainViewComp(l.refSlide.media[0].url,l.refSlide.media[0].previewUrl),S=function(w){return w&&w.adaptingEffect&&h.default.MAIN_VIEW_EXCLUSIONS.includes(w.adaptingEffect.type);};if(x.default.exist(l.Layers,f))return this.slideBuildMap(l,[f,v],[void 0,function(w,C){var I=w.getAllEffects();g.addEffectsAsIntervals(C,I,w.startTime,w.endTime,S);},function(w,C){var I=w.getAllEffects();g.addEffectsAsIntervals(C,I,w.startTime(),w.endTime(),S);}]);}}},{key:"slideBuildMap",value:function(l,g,f){if(l){var v,S=new E.default(l.StartTime,l.EndTime),l=(f&&(v=f.shift())&&v(l,S),l.Layers),w=void 0;if(l){g&&(w=g.shift());var C,I=n(l);try{for(I.s();!(C=I.n()).done;){var O,M=C.value;w&&!w(M)||(O=this.layerBuildMap(M,g,f),S=S.union(O));}}catch(G){I.e(G);}finally{I.f();}}return f&&f.unshift(v),g&&w&&g.unshift(w),S;}}},{key:"layerBuildMap",value:function(l,g,f){if(l){var v,S=new E.default(l.startTime,l.endTime),l=(f&&(v=f.shift())&&v(l,S),l.Components),w=void 0;if(l){g&&(w=g.shift());var C,I=n(l);try{for(I.s();!(C=I.n()).done;){var O,M=C.value;w&&!w(M)||(O=this.compBuildMap(M,g,f))&&(S=S.union(O));}}catch(G){I.e(G);}finally{I.f();}}return f&&f.unshift(v),g&&w&&g.unshift(w),S;}}},{key:"compBuildMap",value:function(C,g,f){var v,S=this,w=new E.default(C.startTime(),C.endTime()),C=(f&&(v=f.
712shift())&&v(C,w),C.innerComponents());return C&&C.forEach(function(I){I=S.compBuildMap(I,g,f),w=w.union(I);}),f&&f.unshift(v),w;}},{key:"addEffectsAsIntervals",value:function(l,g,f,v,S){var w,C=n(g);try{for(C.s();!(w=C.n()).done;){var I,O=w.value;O&&S&&S(O)||(I=this.generateIntervalFromEffect(O,f,v),l.addEntry(I,[O]));}}catch(M){C.e(M);}finally{C.f();}}},{key:"generateIntervalFromEffect",value:function(l,g,f){var v;if(l)return v=g,f-=g,y.default.isAnimationEffect(l)&&(v=g+l.timeOffset,f=l.duration),{start:b.default.round(v,3),end:b.default.round(v+f,3)};}}],(a=null)&&_(m.prototype,a),s&&_(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();r.default=c;},function(i,r,e){"use strict";function t(E){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x;}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x;})(E);}function n(E,x){for(var h=0;h<x.length;h++){var y=x[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,function(b){return b=function(p,c){if(t(p)!="object"||!p)return p;var d=p[Symbol.toPrimitive];if(d===void 0)return(c==="string"?String:Number)(p);if(d=d.call(p,c||"default"),t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.");}(b,"string"),t(b)=="symbol"?b:b+"";}(y.key),y);}}function o(E,x,h){return x&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;}Object.defineProperty(r,"__esModule",{value:!0});var _=o(function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");});(r.default=_).MAIN_VIEW_EXCLUSIONS=["videoBackground","scale"],_.FRONT_VIEW_EXCLUSIONS=["videoBackground","scale"];},function(i,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isTimeBasedViewAnimationComponent=void 0;var t=e(327),n=e(268);r.isTimeBasedViewAnimationComponent=function(o){return o instanceof n.default&&(0,t.isTimeBasedViewComponent)(o);};},function(i,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isTimeBasedViewComponent=void 0;var t=e(32);r.isTimeBasedViewComponent=function(n){return n.renderTimeline!==void 0&&n.startTime!==void 0&&n.endTime!==void 0&&n instanceof t.default;};},function(i,r,w){"use strict";function t(C,I){return function(O){if(Array.isArray(O))return O;}(C)||function(O,M){var N=O==null?null:typeof Symbol<"u"&&O[Symbol.iterator]||O["@@iterator"];if(N!=null){var G,H,B,z,te=[],K=!0,V=!1;try{if(B=(N=N.call(O)).next,M===0){if(Object(N)!==N)return;K=!1;}else for(;!(K=(G=B.call(N)).done)&&(te.push(G.value),te.length!==M);K=!0);}catch(U){V=!0,H=U;}finally{try{if(!K&&N.return!=null&&(z=N.return(),Object(z)!==z))return;}finally{if(V)throw H;}}return te;}}(C,I)||o(C,I)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 713In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function n(C,I){var O,M=typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(!M){if(Array.isArray(C)||(M=o(C))||I&&C&&typeof C.length=="number")return M&&(C=M),O=0,{s:I=function(){},n:function(){return O>=C.length?{done:!0}:{done:!1,value:C[O++]};},e:function(B){throw B;},f:I};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 714In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var N,G=!0,H=!1;return{s:function(){M=M.call(C);},n:function(){var B=M.next();return G=B.done,B;},e:function(B){H=!0,N=B;},f:function(){try{G||M.return==null||M.return();}finally{if(H)throw N;}}};}function o(C,I){if(C){if(typeof C=="string")return _(C,I);var O={}.toString.call(C).slice(8,-1);return(O=O==="Object"&&C.constructor?C.constructor.name:O)==="Map"||O==="Set"?Array.from(C):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?_(C,I):void 0;}}function _(C,I){(I==null||I>C.length)&&(I=C.length);for(var O=0,M=Array(I);O<I;O++)M[O]=C[O];return M;}function E(C){return(E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I;}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I;})(C);}function x(){x=function(){return I;};var C,I={},O=Object.prototype,M=O.hasOwnProperty,N=Object.defineProperty||function(se,fe,ge){se[fe]=ge.value;},Q=typeof Symbol=="function"?Symbol:{},G=Q.iterator||"@@iterator",H=Q.asyncIterator||"@@asyncIterator",B=Q.toStringTag||"@@toStringTag";function z(se,fe,ge){return Object.defineProperty(se,fe,{value:ge,enumerable:!0,configurable:!0,writable:!0}),se[fe];}try{z({},"");}catch{z=function(fe,ge,he){return fe[ge]=he;};}function te(se,ae,ge,de){var _e,Re,ee,W,ae=ae&&ae.prototype instanceof q?ae:q,ae=Object.create(ae.prototype),de=new ne(de||[]);return N(ae,"_invoke",{value:(_e=se,Re=ge,ee=de,W=V,function(ye,Se){if(W===Z)throw Error("Generator is already running");if(W===re){if(ye==="throw")throw Se;return{value:C,done:!0};}for(ee.method=ye,ee.arg=Se;;){var De=ee.delegate;if(De&&(De=function Ue(Be,nt){var it=nt.method,ot=Be.iterator[it];return ot===C?(nt.delegate=null,it==="throw"&&Be.iterator.return&&
714(nt.method="return",nt.arg=C,Ue(Be,nt),nt.method==="throw")||it!=="return"&&(nt.method="throw",nt.arg=new TypeError("The iterator does not provide a '"+it+"' method")),ue):(it=K(ot,Be.iterator,nt.arg),it.type==="throw"?(nt.method="throw",nt.arg=it.arg,nt.delegate=null,ue):(ot=it.arg,ot?ot.done?(nt[Be.resultName]=ot.value,nt.next=Be.nextLoc,nt.method!=="return"&&(nt.method="next",nt.arg=C),nt.delegate=null,ue):ot:(nt.method="throw",nt.arg=new TypeError("iterator result is not an object"),nt.delegate=null,ue)));}(De,ee),De)){if(De===ue)continue;return De;}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(W===V)throw W=re,ee.arg;ee.dispatchException(ee.arg);}else ee.method==="return"&&ee.abrupt("return",ee.arg);if(W=Z,De=K(_e,Re,ee),De.type==="normal"){if(W=ee.done?re:U,De.arg===ue)continue;return{value:De.arg,done:ee.done};}De.type==="throw"&&(W=re,ee.method="throw",ee.arg=De.arg);}})}),ae;}function K(se,fe,ge){try{return{type:"normal",arg:se.call(fe,ge)};}catch(he){return{type:"throw",arg:he};}}I.wrap=te;var V="suspendedStart",U="suspendedYield",Z="executing",re="completed",ue={};function q(){}function J(){}function oe(){}var Q={},F=(z(Q,G,function(){return this;}),Object.getPrototypeOf),F=F&&F(F(le([]))),X=(F&&F!==O&&M.call(F,G)&&(Q=F),oe.prototype=q.prototype=Object.create(Q));function Y(se){["next","throw","return"].forEach(function(fe){z(se,fe,function(ge){return this._invoke(fe,ge);});});}function j(se,fe){var ge;N(this,"_invoke",{value:function(he,_e){function Re(){return new fe(function(ee,W){(function ae(Be,ye,Se,De){var Ue,Be=K(se[Be],se,ye);
714if(Be.type!=="throw")return(ye=(Ue=Be.arg).value)&&E(ye)=="object"&&M.call(ye,"__await")?fe.resolve(ye.__await).then(function(nt){ae("next",nt,Se,De);},function(nt){ae("throw",nt,Se,De);}):fe.resolve(ye).then(function(nt){Ue.value=nt,Se(Ue);},function(nt){return ae("throw",nt,Se,De);});De(Be.arg);})(he,_e,ee,W);});}return ge=ge?ge.then(Re,Re):Re();}});}function D(se){var fe={tryLoc:se[0]};1 in se&&(fe.catchLoc=se[1]),2 in se&&(fe.finallyLoc=se[2],fe.afterLoc=se[3]),this.tryEntries.push(fe);}function $(se){var fe=se.completion||{};fe.type="normal",delete fe.arg,se.completion=fe;}function ne(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(D,this),this.reset(!0);}function le(se){if(se||se===""){var fe,ge=se[G];if(ge)return ge.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length))return fe=-1,(ge=function he(){for(;++fe<se.length;)if(M.call(se,fe))return he.value=se[fe],he.done=!1,he;return he.value=C,he.done=!0,he;}).next=ge;}throw new TypeError(E(se)+" is not iterable");}return N(X,"constructor",{value:J.prototype=oe,configurable:!0}),N(oe,"constructor",{value:J,configurable:!0}),J.displayName=z(oe,B,"GeneratorFunction"),I.isGeneratorFunction=function(se){return se=typeof se=="function"&&se.constructor,!!se&&(se===J||(se.displayName||se.name)==="GeneratorFunction");},I.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,oe):(se.__proto__=oe,z(se,B,"GeneratorFunction")),se.prototype=Object.create(X),se;},I.awrap=function(se){return{__await:se};},Y(j.prototype),z(j.prototype,H,function(){return this;}),I.AsyncIterator=j,I.async=function(se,fe,ge,he,_e){_e===void 0&&(_e=Promise);var Re=new j(te(se,fe,ge,he),_e);return I.isGeneratorFunction(fe)?Re:Re.next().then(function(ee){return ee.done?ee.value:Re.next();});},Y(X),z(X,B,"Generator"),z(X,G,function(){return this;}),z(X,"toString",function(){return"[object Generator]";}),I.keys=function(se){var fe,ge=Object(se),he=[];for(fe in ge)he.push(fe);return he.reverse(),function _e(){for(;he.length;){var Re=he.pop();if(Re in ge)return _e.value=Re,_e.done=!1,_e;}return _e.done=!0,_e;};},I.values=le,ne.prototype={constructor:ne,reset:function(se){if(this.prev=0,this.next=0,this.sent=this._sent=C,this.done=!1,this.delegate=null,this.method="next",this.arg=C,this.tryEntries.forEach($),!se)for(var fe in this)fe.charAt(0)==="t"&&M.call(this,fe)&&!isNaN(+fe.slice(1))&&(this[fe]=C);},stop:function(){this.done=!0;var se=this.tryEntries[0].completion;if(se.type==="throw")throw se.arg;return this.rval;},dispatchException:function(se){if(this.done)throw se;var fe=this;function ge(ae,de){return Re.type="throw",Re.arg=se,fe.next=ae,de&&(fe.method="next",fe.arg=C),!!de;}for(var he=this.tryEntries.length-1;0<=he;--he){var _e=this.tryEntries[he],Re=_e.completion;if(_e.tryLoc==="root")return ge("end");if(_e.tryLoc<=this.prev){var ee=M.call(_e,"catchLoc"),W=M.call(_e,"finallyLoc");if(ee&&W){if(this.prev<_e.catchLoc)return ge(_e.catchLoc,!0);if(this.prev<_e.finallyLoc)return ge(_e.finallyLoc);}else if(ee){if(this.prev<_e.catchLoc)return ge(_e.catchLoc,!0);}else{if(!W)throw Error("try statement without catch or finally");if(this.prev<_e.finallyLoc)return ge(_e.finallyLoc);}}}},abrupt:function(se,fe){for(var ge=this.tryEntries.length-1;0<=ge;--ge){var he=this.tryEntries[ge];if(he.tryLoc<=this.prev&&M.call(he,"finallyLoc")&&this.prev<he.finallyLoc){var _e=he;break;}}var Re=(_e=_e&&(se==="break"||se==="continue")&&_e.tryLoc<=fe&&fe<=_e.finallyLoc?null:_e)?_e.completion:{};return Re.type=se,Re.arg=fe,_e?(this.method="next",this.next=_e.finallyLoc,ue):this.complete(Re);},complete:function(se,fe){if(se.type==="throw")throw se.arg;return se.type==="break"||se.type==="continue"?this.next=se.arg:se.type==="return"?(this.rval=this.arg=se.arg,this.method="return",this.next="end"):se.type==="normal"&&fe&&(this.next=fe),ue;},finish:function(se){for(var fe=this.tryEntries.length-1;0<=fe;--fe){var ge=this.tryEntries[fe];if(ge.finallyLoc===se)return this.complete(ge.completion,ge.afterLoc),$(ge),ue;}},catch:function(se){for(var fe=this.tryEntries.length-1;0<=fe;--fe){var ge,he,_e=this.tryEntries[fe];if(_e.tryLoc===se)return(ge=_e.completion).type==="throw"&&(he=ge.arg,$(_e)),he;}throw Error("illegal catch attempt");},delegateYield:function(se,fe,ge){return this.delegate={iterator:le(se),resultName:fe,nextLoc:ge},this.method==="next"&&(this.arg=C),ue;}},I;}function h(C,I){if(!(C instanceof I))throw new TypeError("Cannot call a class as a function");}function y(C,I){for(var O=0;O<I.length;O++){var M=I[O];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(C,function(N){return N=function(G,H){if(E(G)!="object"||!G)return G;var B=G[Symbol.toPrimitive];
714if(B===void 0)return(H==="string"?String:Number)(G);if(B=B.call(G,H||"default"),E(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.");}(N,"string"),E(N)=="symbol"?N:N+"";}(M.key),M);}}function b(C,I,O){return I&&y(C.prototype,I),O&&y(C,O),Object.defineProperty(C,"prototype",{writable:!1}),C;}var p=this&&this.__awaiter||function(C,I,O,M){return new(O=O||Promise)(function(N,G){function H(te){try{z(M.next(te));}catch(K){G(K);}}function B(te){try{z(M.throw(te));}catch(K){G(K);}}function z(te){var K;te.done?N(te.value):((K=te.value)instanceof O?K:new O(function(V){V(K);})).then(H,B);}z((M=M.apply(C,I||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),r.AudioResources=void 0,w(329)),d=w(333),m=w(334),a=w(12),s=w(5),l=w(248),g=w(13),f=w(107),v=w(45),S=function(){return b(function C(I){h(this,C),this._parent=I,this._players=[];},[{key:"parent",get:function(){return this._parent;},set:function(C){this._parent=C;}},{key:"players",get:function(){return this._players;},set:function(C){this._players=C;}},{key:"getIthPlayer",value:function(C){return C!==void 0?this._players[C]:this._players;}},{key:"getAudioPlayer",value:function(C,I,O,M){var N=4<arguments.length&&arguments[4]!==void 0&&arguments[4];return p(this,void 0,void 0,x().mark(function G(){var H,B,z,te;return x().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:H=void 0,B=-1,z=0;case 3:if(!(z<this._players.length)){K.next=12;break;}if(this._players[z].VDM_SRC===I&&this._players[z].VDM_COMPONENT_ID===O)return s.default.debug("Found equal audio player"),H=this._players[z],B=z,K.abrupt("break",12);K.next=9;break;case 9:z++,K.next=3;break;case 12:if(N&&H&&(s.default.debug("Remove player using sourceNode or gainNode as there no way to release their input"),H=s.default.disposeAudioPlayer(H),this._players.splice(B,1)),H){K.next=35;break;}return te=s.default.getMediaType(I)==="video"?"video":"audio",(te=document.createElement(te)).crossOrigin="anonymous",te.setAttribute("playsinline","playsinline"),te.style.display="none",te.VDM_SRC=I,te.VDM_COMPONENT_ID=O,Object.defineProperty(te,"absoluteTime",{get:function(){var V=Math.floor(C.time()/H.duration);return H.currentTime+V*H.duration;},set:function(V){H.currentTime=V%H.duration;},enumerable:!0}),this._parent.appendChild(te),K.prev=23,K.next=26,this.loadAudio(te,I,M);case 26:H=K.sent,this._players.push(H),K.next=35;break;case 30:return K.prev=30,K.t0=K.catch(23),s.default.debug("Error loading Audio: ".concat(I)),s.default.debug(K.t0),K.abrupt("return",void 0);case 35:return K.abrupt("return",H);case 36:case"end":return K.stop();}},G,this,[[23,30]]);}));}},{key:"loadAudio",value:function(C,I,O){var M=this;return new Promise(function(N,G){s.default.debug("Updated audio src address: ".concat(I)),C.muted=!0,C.preload="auto",C.controls=!1;var H,B,z=document.createElement("source"),z=(z.src=I,C.appendChild(z),C.setAttribute("playsinline","playsinline"),C.loop=!0,C.currentTime=O,{canplay:void 0,loadstart:void 0,seeked:void 0,loadedmetadata:void 0,error:void 0}),te=((C.VDM_EVENT_LISTENERS=z).canplay=function(){clearInterval(H),clearTimeout(B),C.muted=!1,C.volume=0,N(C);},z.loadstart=function(){H===void 0&&B===void 0&&te();},z.seeked=function(){s.default.debug("Audio ".concat(I," seeked. Current time is ").concat(C.currentTime,", loaded percent: ").concat(100*s.default.getBufferedPercent(C),"%"));},z.loadedmetadata=function(){H===void 0&&B===void 0&&te();},z.error=function(){var K;C&&(K=C.dataset)!=null&&K.disposed&&C.error.code===4||(clearInterval(H),clearTimeout(B),s.default.error("Audio: error!"),s.default.debug("AUDIO PLAYER ERROR! ERROR NUM: ".concat(C.error.code," Error: ").concat(C.error.message)),C=s.default.disposeAudioPlayer(C),G(void 0));},function(){clearInterval(H),clearTimeout(B),H=setInterval(function(){if(C)for(var K=0;K<C.buffered.length;K++){var V=C.currentTime;s.default.isRangeInTimeRanges(V,V,C.buffered)&&(s.default.error("Audio player did not get a canplay event in ".concat(5e3," seconds. Fallback is calling resolve for loading as there is enough data in the buffer.")),clearInterval(H),clearTimeout(B),C.muted=!1,N(C));}else clearInterval(H),clearTimeout(B),C=s.default.disposeAudioPlayer(C),s.default.error("[".concat(M.constructor.name,"] Audio player is undefined while fallback interval is running. Rejecting the promise.")),G(void 0);},5e3),B=setTimeout(function(){s.default.error("Audio player did not get a canplay event in ".concat(3e4," seconds. Fallback is calling reject for loading as there is not enough data in the buffer.")),clearInterval(H),clearTimeout(B),C=s.default.disposeAudioPlayer(C),G(void 0);},3e4);});C.addEventListener("canplay",z.canplay,{once:!0}),C.addEventListener("loadstart",z.loadstart,{once:!0}),C.addEventListener("seeked",z.seeked,{once:!0}),C.addEventListener("loadedmetadata",z.loadedmetadata,{once:!0}),C.addEventListener("error",z.error,{once:!0}),C.load();});}}]);}(),w=(r.AudioResources=S,function(){return b(function C(I,O,M,N){if(h(this,C),this.duration=0,this.components=[],this._isRendered=!1,this.parent=O,this.recycle(I,N,O),M&&(this.useGainVolume=M.useGainVolume),M.useVideoPlayersAudio){var G,H=n(I.components);try{for(H.s();!(G=H.n()).done;){var B=G.value,z=!1,te=B.id.split("-")[0],K=void 0;if(te!==l.AUDIO_TRACK_TYPES.SOUNDBED){var V=f.LoadingScheduler.getInstance().getMediaTimelines(),U="[".concat(a.PRIMARY_URL_ID,"][").concat(B.src.url,"]");if(K=V.get(U)){var Z,re=n(B.effects);try{for(re.s();!(Z=re.n()).done;){var ue=Z.value;if(ue.type==="volume"){var q=s.default.round(B.attributes.seek+ue.attributes.offsetTime,g.ROUND_PRECISION),J=s.default.round(B.attributes.seek+ue.attributes.offsetTime+ue.attributes.duration,g.ROUND_PRECISION);if(!K.contains(q)||!K.contains(J,!0)){z=!1;break;}z=!0;}}}catch(X){re.e(X);}finally{re.f();}}}te!==l.AUDIO_TRACK_TYPES.MAINTRACK&&z?this.components.push(new d.default(B,this._audioResources,M)):te===l.AUDIO_TRACK_TYPES.MAINTRACK?(this.components.push(new m.default(B,this._audioResources,M)),K&&(K.isUsedAsMasterTimelineForAudio=!0)):this.components.push(new c.default(B,this._audioResources,M));}}catch(X){H.e(X);}finally{H.f();}}else{var oe,Q=n(I.components);try{for(Q.s();!(oe=Q.n()).done;){var F=oe.value;this.components.push(new c.default(F,this._audioResources,M));}}catch(X){Q.e(X);}finally{Q.f();}}},[{key:"recycle",value:function(C,I,O){var M=this;if(this._audioResources=new S(O),I){s.default.debug("AudioObject Recycling process:");for(var N=0,G=C.components.map(function(B){return B.id;}),H=0;H<I.players.length;H++)(function(){var B=I.players[H],z=G.find(function(te){return B.VDM_COMPONENT_ID===te;});z&&O!==I.parent?(s.default.debug("Recycling... Player src: ".concat(B.src," componentId: ").concat(z," With different parent! ")),M._audioResources.players.push(B),O.appendChild(B),N++):z&&O===I.parent?(s.default.debug("Recycling... Player src: ".concat(B.src," componentId: ").concat(z," With the same parent! ")),M._audioResources.players.push(B),N++):z||O!==I.parent?z||I.parent:(s.default.debug("Removing... Player src: ".concat(B.src," componentId: ").concat(z," With the same parent! ")),B=s.default.disposeAudioPlayer(B),I.players.splice(H,1));})();s.default.debug("Total of ".concat(N," audio players recycled!"));}else s.default.debug("Reporting recycle in AudioObject: resources: ".concat(!!I));}},{key:"closeContext",value:function(){return p(this,void 0,void 0,x().mark(function C(){var I;return x().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(!this.useGainVolume){O.next=8;break;}I=0;case 2:if(I<this.components.length)return O.next=5,this.components[I].disconnectAudioNodes();O.next=8;break;case 5:I++,O.next=2;break;case 8:case"end":return O.stop();}},C,this);}));}},{key:"audioResources",get:function(){return this._audioResources;}},{key:"getIthPlayer",value:function(C){return this._audioResources.getIthPlayer(C);}},{key:"render",value:function(C){return p(this,void 0,void 0,x().mark(function I(){var O,M,N,G;return x().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:this.timeline=C,O=[],M=n(this.components);try{for(M.s();!(N=M.n()).done;)G=N.value,O.push(G.render(this.timeline));}catch(B){M.e(B);}finally{M.f();}return H.next=6,Promise.all(O);case 6:this._isRendered=!0;case 7:case"end":return H.stop();}},I,this);}));}},{key:"volume",value:function(C){for(var I={},O=0,M=Object.entries(C);O<M.length;O++){var G=t(M[O],2),N=G[0],G=G[1];I[N]=s.default.clamp(G.volume,0,1);}var H,B=n(this.components);try{for(B.s();!(H=B.n()).done;){var z=H.value;z.audioType()in I&&(z.volume=I[z.audioType()]);}}catch(te){B.e(te);}finally{B.f();}}},{key:"pause",value:function(C){return p(this,void 0,void 0,x().mark(function I(){var O,M,N,G;return x().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:O=[],M=n(this.components);try{for(M.s();!(N=M.n()).done;)G=N.value,s.default.debug("Propagating to componenet : ".concat(G.audioType())),O.push(G.pause(C));}catch(B){M.e(B);}finally{M.f();}return H.next=5,Promise.all(O);case 5:case"end":return H.stop();}},I,this);}));}},{key:"clear",value:function(){this.reset(),v.AudioContextSingleton.getInstance().closeAudioContext();}},{key:"reset",value:function(){var C,I=n(this.components);try{for(I.s();!(C=I.n()).done;)C.value.reset();}catch(O){I.e(O);}finally{I.f();}this.components=[],this._isRendered=!1;}},{key:"sync",value:function(C,I,O){function M(z,te){H===0&&(C.pause(),Array.isArray(I)&&I.forEach(function(K){return K(z,te);})),H++;}function N(z,te){--H<=0&&(H=0,C.resume(),Array.isArray(O)&&O.forEach(function(K){return K(z,te);}));}var G,H=0,B=n(this.components);try{for(B.s();!(G=B.n()).done;)G.value.sync(C,[M],[N]);}catch(z){B.e(z);}finally{B.f();}}},{key:"isRendered",get:function(){return this._isRendered;}}]);}());r.default=w;},function(i,r,g){"use strict";function t(f){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v;}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v;})(f);}function n(){n=function(){return v;};var f,v={},S=Object.prototype,w=S.hasOwnProperty,C=Object.defineProperty||function(D,$,ne){D[$]=ne.value;},ue=typeof Symbol=="function"?Symbol:{},I=ue.iterator||"@@iterator",O=ue.asyncIterator||"@@asyncIterator",M=ue.toStringTag||"@@toStringTag";function N(D,$,ne){return Object.defineProperty(D,$,{value:ne,enumerable:!0,configurable:!0,writable:!0}),D[$];}try{N({},"");}catch{N=function($,ne,le){return $[ne]=le;};}function G(D,_e,ne,Re){var se,fe,ge,he,_e=_e&&_e.prototype instanceof U?_e:U,_e=Object.create(_e.prototype),Re=new Y(Re||[]);return C(_e,"_invoke",{value:(se=D,fe=ne,ge=Re,he=B,function(ee,W){if(he===te)throw Error("Generator is already running");if(he===K){if(ee==="throw")throw W;return{value:f,done:!0};}for(ge.method=ee,ge.arg=W;;){var ae=ge.delegate;if(ae&&(ae=function de(ye,Se){var De=Se.method,Ue=ye.iterator[De];return Ue===f?(Se.delegate=null,De==="throw"&&ye.iterator.return&&
714(Se.method="return",Se.arg=f,de(ye,Se),Se.method==="throw")||De!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+De+"' method")),V):(De=H(Ue,ye.iterator,Se.arg),De.type==="throw"?(Se.method="throw",Se.arg=De.arg,Se.delegate=null,V):(Ue=De.arg,Ue?Ue.done?(Se[ye.resultName]=Ue.value,Se.next=ye.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=f),Se.delegate=null,V):Ue:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,V)));}(ae,ge),ae)){if(ae===V)continue;return ae;}if(ge.method==="next")ge.sent=ge._sent=ge.arg;else if(ge.method==="throw"){if(he===B)throw he=K,ge.arg;ge.dispatchException(ge.arg);}else ge.method==="return"&&ge.abrupt("return",ge.arg);if(he=te,ae=H(se,fe,ge),ae.type==="normal"){if(he=ge.done?K:z,ae.arg===V)continue;return{value:ae.arg,done:ge.done};}ae.type==="throw"&&(he=K,ge.method="throw",ge.arg=ae.arg);}})}),_e;}function H(D,$,ne){try{return{type:"normal",arg:D.call($,ne)};}catch(le){return{type:"throw",arg:le};}}v.wrap=G;var B="suspendedStart",z="suspendedYield",te="executing",K="completed",V={};function U(){}function Z(){}function re(){}var ue={},q=(N(ue,I,function(){return this;}),Object.getPrototypeOf),q=q&&q(q(j([]))),J=(q&&q!==S&&w.call(q,I)&&(ue=q),re.prototype=U.prototype=Object.create(ue));function oe(D){["next","throw","return"].forEach(function($){N(D,$,function(ne){return this._invoke($,ne);});});}function Q(D,$){var ne;C(this,"_invoke",{value:function(le,se){function fe(){return new $(function(ge,he){(function _e(ye,ee,W,ae){var de,ye=H(D[ye],D,ee);if(ye.type!=="throw")return(ee=(de=ye.arg).value)&&t(ee)=="object"&&w.call(ee,"__await")?$.resolve(ee.__await).then(function(Se){_e("next",Se,W,ae);},function(Se){_e("throw",Se,W,ae);}):$.resolve(ee).then(function(Se){de.value=Se,W(de);},function(Se){return _e("throw",Se,W,ae);});ae(ye.arg);})(le,se,ge,he);});}return ne=ne?ne.then(fe,fe):fe();}});}function F(D){var $={tryLoc:D[0]};1 in D&&($.catchLoc=D[1]),2 in D&&($.finallyLoc=D[2],$.afterLoc=D[3]),this.tryEntries.push($);}function X(D){var $=D.completion||{};$.type="normal",delete $.arg,D.completion=$;}function Y(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(F,this),this.reset(!0);}function j(D){if(D||D===""){var $,ne=D[I];if(ne)return ne.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length))return $=-1,(ne=function le(){for(;++$<D.length;)if(w.call(D,$))return le.value=D[$],le.done=!1,le;return le.value=f,le.done=!0,le;}).next=ne;}throw new TypeError(t(D)+" is not iterable");}return C(J,"constructor",{value:Z.prototype=re,configurable:!0}),C(re,"constructor",{value:Z,configurable:!0}),Z.displayName=N(re,M,"GeneratorFunction"),v.isGeneratorFunction=function(D){return D=typeof D=="function"&&D.constructor,!!D&&(D===Z||(D.displayName||D.name)==="GeneratorFunction");},v.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,re):(D.__proto__=re,N(D,M,"GeneratorFunction")),D.prototype=Object.create(J),D;},v.awrap=function(D){return{__await:D};},oe(Q.prototype),N(Q.prototype,O,function(){return this;}),v.AsyncIterator=Q,v.async=function(D,$,ne,le,se){se===void 0&&(se=Promise);var fe=new Q(G(D,$,ne,le),se);return v.isGeneratorFunction($)?fe:fe.next().then(function(ge){return ge.done?ge.value:fe.next();});},oe(J),N(J,M,"Generator"),N(J,I,function(){return this;}),N(J,"toString",function(){return"[object Generator]";}),v.keys=function(D){var $,ne=Object(D),le=[];for($ in ne)le.push($);return le.reverse(),function se(){for(;le.length;){var fe=le.pop();if(fe in ne)return se.value=fe,se.done=!1,se;}return se.done=!0,se;};},v.values=j,Y.prototype={constructor:Y,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var $ in this)$.charAt(0)==="t"&&w.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=f);},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval;},dispatchException:function(D){if(this.done)throw D;var $=this;function ne(_e,Re){return fe.type="throw",fe.arg=D,$.next=_e,Re&&($.method="next",$.arg=f),!!Re;}for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le],fe=se.completion;if(se.tryLoc==="root")return ne("end");if(se.tryLoc<=this.prev){var ge=w.call(se,"catchLoc"),he=w.call(se,"finallyLoc");if(ge&&he){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);
714if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}else if(ge){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);}else{if(!he)throw Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}}}},abrupt:function(D,$){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne];if(le.tryLoc<=this.prev&&w.call(le,"finallyLoc")&&this.prev<le.finallyLoc){var se=le;break;}}var fe=(se=se&&(D==="break"||D==="continue")&&se.tryLoc<=$&&$<=se.finallyLoc?null:se)?se.completion:{};return fe.type=D,fe.arg=$,se?(this.method="next",this.next=se.finallyLoc,V):this.complete(fe);},complete:function(D,$){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&$&&(this.next=$),V;},finish:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.finallyLoc===D)return this.complete(ne.completion,ne.afterLoc),X(ne),V;}},catch:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne,le,se=this.tryEntries[$];if(se.tryLoc===D)return(ne=se.completion).type==="throw"&&(le=ne.arg,X(se)),le;}throw Error("illegal catch attempt");},delegateYield:function(D,$,ne){return this.delegate={iterator:j(D),resultName:$,nextLoc:ne},this.method==="next"&&(this.arg=f),V;}},v;}function o(f,v){var S,w=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!w){if(Array.isArray(f)||(w=function(M,N){if(M){if(typeof M=="string")return _(M,N);var G={}.toString.call(M).slice(8,-1);return(G=G==="Object"&&M.constructor?M.constructor.name:G)==="Map"||G==="Set"?Array.from(M):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?_(M,N):void 0;}}(f))||v&&f&&typeof f.length=="number")return w&&(f=w),S=0,{s:v=function(){},n:function(){return S>=f.length?{done:!0}:{done:!1,value:f[S++]};},e:function(M){throw M;},f:v};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 715In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var C,I=!0,O=!1;return{s:function(){w=w.call(f);},n:function(){var M=w.next();return I=M.done,M;},e:function(M){O=!0,C=M;},f:function(){try{I||w.return==null||w.return();}finally{if(O)throw C;}}};}function _(f,v){(v==null||v>f.length)&&(v=f.length);for(var S=0,w=Array(v);S<v;S++)w[S]=f[S];return w;}function E(f,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,function(C){return C=function(I,O){if(t(I)!="object"||!I)return I;var M=I[Symbol.toPrimitive];if(M===void 0)return(O==="string"?String:Number)(I);if(M=M.call(I,O||"default"),t(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.");}(C,"string"),t(C)=="symbol"?C:C+"";}(w.key),w);}}function x(f,C,S){C=y(C);var w=f,C=h()?Reflect.construct(C,S||[],y(f).constructor):C.apply(f,S);if(C&&(t(C)=="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(f=w,f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f;}function h(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!f;})();}function y(f){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v);})(f);}function b(f,v){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,w){return S.__proto__=w,S;})(f,v);}var p=this&&this.__awaiter||function(f,v,S,w){return new(S=S||Promise)(function(C,I){function O(G){try{N(w.next(G));}catch(H){I(H);}}function M(G){try{N(w.throw(G));}catch(H){I(H);}}function N(G){var H;G.done?C(G.value):((H=G.value)instanceof S?H:new S(function(B){B(H);})).then(O,M);}N((w=w.apply(f,v||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),g(109)),d=g(5),m=g(2),a=g(45),s=g(111),l=g(13),g=function(f){function v(C,I,O){var M;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");(M=x(this,v,[C,I,O])).bufferWaitingCallback=function(){var q,J,oe;(J=M.mainTimelineSync)!=null&&J.timeline&&(J=M.mainTimelineSync)!=null&&J.isSyncedToGsapTicker&&(M.mainTimelineSync.isWaitingOnBuffering=!0,J=M.mainTimelineSync.timeline,Array.isArray((q=M.mainTimelineSync)==null?void 0:q.onBuffering)&&(oe=d.default.round(J.time(),3),M.mainTimelineSync.onBuffering.forEach(function(Q){return Q(oe);})));},M.bufferPlayingCallback=function(){var q,J,oe;M.mainTimelineSync.isWaitingOnBuffering=!1,(J=M.mainTimelineSync)!=null&&J.timeline&&(J=M.mainTimelineSync)!=null&&J.isSyncedToGsapTicker&&(J=M.mainTimelineSync.timeline,Array.isArray((q=M.mainTimelineSync)==null?void 0:q.onVDMReady)&&(oe=d.default.round(J.time(),3),M.mainTimelineSync.onVDMReady.forEach(function(Q){return Q(oe);})));},M.tickerHandler=function(q,J,oe){var Q=(Q=M.mainTimelineSync)==null?void 0:Q.timeline;if((X=M.mainTimelineSync)!=null&&X.isSyncedToGsapTicker){if(M._player===void 0||M._player===null)d.default.warn("[AudioComponent] GSAP ticker triggers sync audio component with no audio player"),M.stopTickerHandler();else{var F=Q.time(),X=d.default.round(F,3);
715if(X<M.absoluteStartTime||X>=M.absoluteEndTime)d.default.warn("[AudioComponent] GSAP ticker triggers non-playing audio component (out of time bounds), removing from the ticker."),M.stopTickerHandler();else if(M.mainTimelineSync.timeline.paused()!==!0||M._player.paused!==!1||M.mainTimelineSync.isWaitingOnBuffering){if(M.mainTimelineSync.timeline.paused()===!1&&M._player.paused===!0)M._player.play();else if(M._player.paused===!1&&M._player.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA){var Y,Q=X>M.lastSyncTime&&Math.abs(X-M.lastSyncTime-M.syncIntervalSec)<=.005,j=Math.abs(X-M.absoluteStartTime-(M._player.absoluteTime-M.playerStartTime))>M.syncThresholdSec,D=(!Q&&j&&(d.default.debug("[".concat(M.constructor.name,"] tickerHandler: Timeline time BEFORE sync. audio player=").concat(M._player.absoluteTime," timeline=").concat(X)),Q=X-M.absoluteStartTime+M.playerStartTime+M.syncThresholdSec+1/l.GSAP_FPS,M._player.absoluteTime=Q,d.default.debug("[".concat(M.constructor.name,"] tickerHandler: Timeline time AFTER sync. audio player=").concat(M._player.absoluteTime," timeline=").concat(X)),M.lastSyncTime=X),o(M._effects));try{for(D.s();!(Y=D.n()).done;)Y.value.tickerHandler(F);}catch(ne){D.e(ne);}finally{D.f();}}}else M._player.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&M._player.pause();}}else d.default.error("[AudioComponent] GSAP ticker triggers none sync audio component, removing from the ticker."),M.stopTickerHandler();},M.mainTimelineSync=void 0,M.audioError=!1,M.playerStartTime=M._attributes.seek,M.absoluteStartTime=M._attributes.startTime,M.absoluteEndTime=M._attributes.endTime,M.syncThresholdSec=O.sync.audio.thresholdMS/1e3,M.syncIntervalSec=O.sync.audio.sampleRateMS/1e3;var N,G=M._attributes.startTime,H=(M.lastSyncTime=G,(I=C.effects)!=null&&I.sort(function(q,J){return q.attributes.offsetTime-J.attributes.offsetTime;}),[]),B=o(C.effects);try{for(B.s();!(N=B.n()).done;){var z,te,K,V=N.value;V.type!=="volume"&&V.type!=="volumeMuted"||(z=H[H.length-1],V.attributes.offsetTime>z?.attributes.offsetTime+z?.attributes.duration&&(te=z?.attributes.offsetTime+z?.attributes.duration,K=V.attributes.offsetTime-te,H.push({type:"volumeMuted",attributes:{offsetTime:te,duration:K,fromVal:0,toVal:0}}))),H.push(V);}}catch(q){B.e(q);}finally{B.f();}0<((O=C.effects)==null?void 0:O.length)&&(C.effects=H);var U,Z=o(C.effects);try{for(Z.s();!(U=Z.n()).done;){var re=U.value,ue=(re.attributes.startTime=G,c.AudioEffectFactory.createEffect(re));ue&&M._effects.push(ue);}}catch(q){Z.e(q);}finally{Z.f();}return M;}var S,w=v;if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");return w.prototype=Object.create(f&&f.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),Object.defineProperty(w,"prototype",{writable:!1}),f&&b(w,f),w=v,(f=[{key:"disconnectAudioNodes",value:function(){return p(this,void 0,void 0,n().mark(function C(){return n().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:(this.soundSource||this.gainNode)&&(a.AudioContextSingleton.getInstance().disconnectGainNode(this.soundSource,this.gainNode),this.soundSource=void 0,this.gainNode=void 0,d.default.debug("[".concat(this.constructor.name,"] Audio type: ").concat(this.audioType()," nodes disconnected!")));case 1:case"end":return I.stop();}},C,this);}));}},{key:"volume",get:function(){if(this._player)return this.gainNode?this.gainNode.gain.value:this._player.volume;d.default.debug("[".concat(this.constructor.name,"] Couldn't get the volume of component ").concat(this.audioType(),", player is not initialized"));},set:function(C){if(this._player){d.default.debug("[".concat(this.constructor.name,"] Trying to set the volume of component ").concat(this.audioType()," to ").concat(C," ")),this._player.muted=C===0;var I,O=o(this._effects);try{for(O.s();!(I=O.n()).done;){var M=I.value;M.type==="volume"&&M.setPlayerVolume(C);}}catch(N){O.e(N);}finally{O.f();}this._useGainVolume?this.gainNode?(this._player.volume=1,this.gainNode.gain.value=C):d.default.error("[AudioComponent] Couldn't control volume: gain node is not initialized"):this._player.volume=C;}else d.default.debug("[".concat(this.constructor.name,"] Couldn't set the volume of component ").
715concat(this.audioType(),", player is not initialized"));}},{key:"render",value:function(C){return p(this,void 0,void 0,n().mark(function I(){var O,M,N,G,H,B,z,te=this;return n().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(O=this._attributes.startTime,M=this._attributes.endTime,N=this._attributes.seek,d.default.debug("[".concat(this.constructor.name,"] Adding audio element: ").concat(this._src)),this._useGainVolume)return K.next=7,this._audioResources.getAudioPlayer(C,this._src,this._componentId,N,!0);K.next=10;break;case 7:this._player=K.sent,K.next=13;break;case 10:return K.next=12,this._audioResources.getAudioPlayer(C,this._src,this._componentId,N);case 12:this._player=K.sent;case 13:if(this._player){K.next=17;break;}return d.default.error("[AudioComponent] ".concat(this._componentId," Error: Failed to load audio player src: ").concat(this._src," seek: ").concat(N," useGainVolume: ").concat(this._useGainVolume)),this.audioError=!0,K.abrupt("return");case 17:this._player.dataset.componentId=this._componentId,G=function(){var V,U=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;te._player&&te._player.paused&&(V=d.default.round(U,6),d.default.debug("[".concat(te.constructor.name,"] Audio player current time: ").concat(te._player.absoluteTime,", audio file: ").concat(te._src)),d.default.debug("[".concat(te.constructor.name,"] Audio offset: ").concat(U,", startTime:").concat(O)),d.default.debug("[".concat(te.constructor.name,"] Audio calculated time: ").concat(V)),0<=U&&1e-4<Math.abs(te._player.absoluteTime-V)&&(d.default.debug("[".concat(te.constructor.name,"] Updating audio time to: ").concat(V)),te._player.absoluteTime=V),d.default.debug("[".concat(te.constructor.name,"] Audio Player buffered percent: ").concat(100*d.default.getBufferedPercent(te._player),"%")),te._player.play().then(function(){te.mainTimelineSync.timeline.paused()&&te._player.pause();}).catch(function(Z){d.default.error("[".concat(te.constructor.name,"] ").concat(te._componentId," Audio Play Error: ").concat(Z)),te.audioError=!0;}));},H=m.gsap.timeline({onUpdate:function(){var V,U;te._player&&te.mainTimelineSync!==void 0&&!te.mainTimelineSync.timeline.paused()&&(V=d.default.round(H.time(),3),!te.mainTimelineSync.isSyncedToGsapTicker&&V>=te.absoluteStartTime&&V<te.absoluteEndTime&&(te.startTickerHandler(),!te.audioError&&te._player.paused&&(U=V-te.absoluteStartTime+te.playerStartTime,G(U))),V>=te.absoluteEndTime&&te._player.paused===!1&&(d.default.debug("[".concat(te.constructor.name,"] Pausing audio as it playing beyond its time slot, ts: ").concat(V)),te.pausePlayerAndStopTicker()));}}),this._useGainVolume&&this.establishGainControl(),B=o(this._effects);try{for(B.s();!(z=B.n()).done;)z.value.apply(this._player,this.gainNode,H);}catch(V){B.e(V);}finally{B.f();}H.call(void 0,[],M),C.add(H,0);case 25:case"end":return K.stop();}},I,this);}));}},{key:"pause",value:function(){var C=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;return p(this,void 0,void 0,n().mark(function I(){var O;return n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(this.pausePlayerAndStopTicker(),!this._player){M.next=13;break;}if(d.default.debug("[".concat(this.constructor.name,"] Pause audio component with type: ").concat(this.audioType()," time: ").concat(C)),!(C!==void 0&&0<=C)){M.next=13;break;}if(d.default.debug("[".concat(this.constructor.name,"] In AudioComp : ").concat(this.audioType()," absoluteStartTime: ").concat(this.absoluteStartTime," absoluteEndTime: ").concat(this.absoluteEndTime,` 716 asking to pause at time : `).concat(C)),C>=this.absoluteStartTime&&C<this.absoluteEndTime)return O=d.default.round(this._attributes.seek+C-this._attributes.startTime,6),d.default.debug("In AudioComp : ".concat(this.audioType(),", asked time within range, creating async call to set time to : ").concat(O)),M.next=10,this.setAudioPlayerTime(O);M.next=12;break;case 10:M.next=13;break;case 12:d.default.debug("[".concat(this.constructor.name,"] In AudioComp : ").concat(this.audioType(),", asked time not within range, no need to seek the player seek:").concat(this._attributes.seek," absoluteStartTime:").concat(this.absoluteStartTime," absoluteEndTime:").concat(this.absoluteEndTime));case 13:d.default.debug("[".concat(this.constructor.name,"] Finished pausing audio component type: ").concat(this.audioType()));case 14:case"end":return M.stop();}},I,this);}));}},{key:"pausePlayerAndStopTicker",value:function(){var C,I=this;this._player&&!this._player.paused&&(this.stopTickerHandler(),C=setInterval(function(){d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," Checking if audio player have enough dta in order to pause")),I._player?I._player.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," Pausing audio player componentId")),I._player.pause(),clearInterval(C)):clearInterval(C);},1/l.GSAP_FPS));}},{key:"setAudioPlayerTime",value:function(C){var I=this;return new Promise(function(O,M){var N,G,H,B,z,te,K;I._player?(d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," In AudioComp : ").concat(I.audioType(),",this._player exist, going to add callback: (suppose to print 'audio time updated to')")),N=function(){d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," Audio Component seeking!"));},G=function(){d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," audio time updated to: ").concat(C));},H=function(){d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," audio time updated to: ").concat(C)),I._player.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&d.default.error("[AudioComponent] ".concat(I._componentId," Error: audio player triggered canplay event but the readyState is not enough to play the audio.")),z();},B=function(){I._player&&(I._player.removeEventListener("seeking",N),I._player.removeEventListener("seeked",G),I._player.removeEventListener("canplay",H));},z=function(){var V;clearInterval(te),clearTimeout(K),B(),I.lastSyncTime=d.default.round((V=I.mainTimelineSync)==null?void 0:V.timeline.time(),3),O();},K=te=void 0,d.default.round(C,l.ROUND_PRECISION)===d.default.round(I._player.absoluteTime,l.ROUND_PRECISION)&&I._player.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA?z():(I._player.addEventListener("seeking",N,{once:!0}),I._player.addEventListener("seeked",G,{once:!0}),I._player.addEventListener("canplay",H,{once:!0}),te=setInterval(function(){I._player?Math.abs(I._player.absoluteTime-C)<.1&&I._player.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(H(),clearInterval(te),clearTimeout(K)):(clearInterval(te),clearTimeout(K),B(),M());},100),K=setTimeout(function(){d.default.error("[".concat(I.constructor.name,"] Audio component did not get a seeked event in ").concat(3e4," seconds.")),clearInterval(te),clearTimeout(K),B(),M();},3e4),I._player.absoluteTime=C)):(d.default.debug("[".concat(I.constructor.name,"] In AudioComp : ").concat(I.audioType(),",this._player doesn't exist,resolving!")),O());});}},{key:"establishGainControl",value:function(){try{var C=a.AudioContextSingleton.getInstance(),I=C.getAudioContext(),O=(d.default.debug("[".concat(this.constructor.name,"] Constructing WebAudioAPI, currently state : ").concat(I.state)),C.connectAudioElementWithGain(this._player));O&&(this.soundSource=O.source,this.gainNode=O.gainNode,this.volume=1);}catch(M){d.default.error("[".concat(this.constructor.name,"] ").concat(this._componentId," Gain control exception handled from constructing WebAudioAPI : ").concat(M));}}},{key:"reset",value:function(){this.disableBufferingHandlers(),this.disconnectAudioNodes(),this._player=d.default.disposeAudioPlayer(this._player);}},{key:"enableBufferingHandlers",value:function(){var C;(C=this.mainTimelineSync)!=null&&C.isSyncedToGsapTicker?this._player&&(this._player.addEventListener("waiting",this.bufferWaitingCallback),this._player.addEventListener("playing",this.bufferPlayingCallback)):d.default.error("[AudioComponent] GSAP ticker triggers none sync audio component, remov
716ing from the ticker.");}},{key:"disableBufferingHandlers",value:function(){this._player&&(this._player.removeEventListener("waiting",this.bufferWaitingCallback),this._player.removeEventListener("playing",this.bufferPlayingCallback));}},{key:"sync",value:function(C,I,O){this.mainTimelineSync={timeline:C,onBuffering:I,onVDMReady:O,isSyncedToGsapTicker:!1,isWaitingOnBuffering:!1};}},{key:"startTickerHandler",value:function(){d.default.debug("[".concat(this.constructor.name,"] startTickerHandler: Starting the syncing event, src : ").concat(this._src)),this.mainTimelineSync===void 0?d.default.error("[AudioComponent] Cannot start sync with main timeline because timeline is not available."):this.mainTimelineSync.isSyncedToGsapTicker?d.default.warn("[AudioComponent] Trying to start main timeline sync that is already running."):(this.mainTimelineSync.isSyncedToGsapTicker=!0,this.enableBufferingHandlers(),m.gsap.ticker.add(this.tickerHandler));}},{key:"stopTickerHandler",value:function(){d.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Canceling the syncing event, src : ").concat(this._src)),this.mainTimelineSync&&(this.disableBufferingHandlers(),this.mainTimelineSync.isSyncedToGsapTicker=!1),m.gsap.ticker.remove(this.tickerHandler),d.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Hop hop"));}}])&&E(w.prototype,f),S&&E(w,S),Object.defineProperty(w,"prototype",{writable:!1}),w;}(s.AudioComponentBase);r.default=g;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}function o(d,l,a){l=h(l);var s=d,l=_()?Reflect.construct(l,a||[],h(d).constructor):l.apply(d,a);if(l&&(t(l)=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(d=s,d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d;}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}
716function E(d,m,a,s){var l=x(h(1&s?d.prototype:d),m,a);return 2&s?function(g){return l.apply(a,g);}:l;}function x(){return(x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(d,m,a){var s=function(l,g){for(;!{}.hasOwnProperty.call(l,g)&&(l=h(l))!==null;);return l;}(d,m);if(s)return(s=Object.getOwnPropertyDescriptor(s,m)).get?s.get.call(arguments.length<3?d:a):s.value;}).apply(null,arguments);}function h(d){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m);})(d);}function y(d,m){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}Object.defineProperty(r,"__esModule",{value:!0}),r.VolumeAudioEffect=void 0;var b=c(110),p=c(5),c=function(d){function m(l){var g;if(this instanceof m)return(l=o(this,m,[l])).fromVal=(g=p.default.clamp(l.attributes.fromVal,0,1))!=null?g:1,l.toVal=(g=p.default.clamp(l.attributes.toVal,0,1))!=null?g:1,l.fromVal!==l.toVal&&(p.default.error("Volume effect have different form/to values, use fade instead."),l.fromVal=l.toVal),l.originalVal=l.toVal,l;throw new TypeError("Cannot call a class as a function");}var a,s=m;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");return s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),d&&y(s,d),s=m,(d=[{key:"setPlayerVolume",value:function(l){var g;this.timeline&&(this.fromVal=l,this.toVal=l,(g=p.default.round(this.timeline.time(),3))>=this.absoluteStartTime&&g<this.absoluteEndTime&&E(m,"setPlayerVolume",this,3)([l]));}},{key:"tickerHandler",value:function(l){l=p.default.round(l,3),l>=this.absoluteStartTime&&l<this.absoluteEndTime&&E(m,"setPlayerVolume",this,3)([this.toVal]);}}])&&n(s.prototype,d),a&&n(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s;}(b.AudioBasicEffect);r.VolumeAudioEffect=c;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0}),r.VolumeFadeEffect=void 0;var h=p(110),y=p(5),b=p(2),p=function(c){function d(s){if(this instanceof d)return(s=o(this,d,[s])).fromVal=void 0,s.toVal=void 0,s.orgFromVal=void 0,s.orgToVal=void 0,s.rangeVal=void 0,s.attributes.hasOwnProperty("fromVal")&&(s.fromVal=y.default.clamp(s.attributes.fromVal,0,1)),s.attributes.hasOwnProperty("toVal")&&(s.toVal=y.default.clamp(s.attributes.toVal,0,1)),s.orgFromVal=s.fromVal,s.orgToVal=s.toVal,s.modifyRangeVal(),s;throw new TypeError("Cannot call a class as a function");}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"modifyRangeVal",value:function(){var s;this.rangeVal=((s=this.toVal)!=null?s:0)-((s=this.fromVal)!=null?s:0);}},{key:"calcCurrentEaseValue",value:function(s){return s-=this.absoluteStartTime,s=y.default.clamp(s/this.duration,0,1),s=b.gsap.parseEase("power1.out")(s),this.fromVal+this.rangeVal*s;}},{key:"tickerHandler",value:function(l){var l=y.default.round(l,3);l>=this.absoluteStartTime&&l<this.absoluteEndTime?(this.fromVal===void 0&&(this.fromVal=this.getPlayerVolume(),this.modifyRangeVal()),this.toVal===void 0&&(this.toVal=this.getPlayerVolume(),this.modifyRangeVal()),l=this.calcCurrentEaseValue(l),this.setPlayerVolume(l)):(this.toVal=this.orgToVal,this.fromVal=this.orgFromVal);}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.AudioBasicEffect);r.VolumeFadeEffect=p;},function(i,r,b){"use strict";function t(p){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c;}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c;})(p);}function n(p,c){for(var d=0;d<c.length;d++){var m=c[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,function(a){return a=function(s,l){if(t(s)!="object"||!s)return s;var g=s[Symbol.toPrimitive];if(g===void 0)return(l==="string"?String:Number)(s);if(g=g.call(s,l||"default"),t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.");}(a,"string"),t(a)=="symbol"?a:a+"";}(m.key),m);}}function o(p,a,d){a=E(a);var m=p,a=_()?Reflect.construct(a,d||[],E(p).constructor):a.apply(
716p,d);if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(p=m,p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p;}function _(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!p;})();}function E(p){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c);})(p);}function x(p,c){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d;})(p,c);}Object.defineProperty(r,"__esModule",{value:!0}),r.VolumeMutedAudioEffect=void 0;var h=b(110),y=b(5),b=function(p){function c(a){if(this instanceof c)return o(this,c,[a]);throw new TypeError("Cannot call a class as a function");}var d,m=c;if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");return m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),p&&x(m,p),m=c,(p=[{key:"tickerHandler",value:function(a){a=y.default.round(a,3),a>=this.absoluteStartTime&&a<this.absoluteEndTime&&this.setPlayerVolume(0);}}])&&n(m.prototype,p),d&&n(m,d),Object.defineProperty(m,"prototype",{writable:!1}),m;}(h.AudioBasicEffect);r.VolumeMutedAudioEffect=b;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(){n=function(){return f;};var g,f={},v=Object.prototype,S=v.hasOwnProperty,w=Object.defineProperty||function(j,D,$){j[D]=$.value;},re=typeof Symbol=="function"?Symbol:{},C=re.iterator||"@@iterator",I=re.asyncIterator||"@@asyncIterator",O=re.toStringTag||"@@toStringTag";function M(j,D,$){return Object.defineProperty(j,D,{value:$,enumerable:!0,configurable:!0,writable:!0}),j[D];}try{M({},"");}catch{M=function(D,$,ne){return D[$]=ne;};}function N(j,he,$,_e){var le,se,fe,ge,he=he&&he.prototype instanceof V?he:V,he=Object.create(he.prototype),_e=new X(_e||[]);return w(he,"_invoke",{value:(le=j,se=$,fe=_e,ge=H,function(Re,ee){if(ge===z)throw Error("Generator is already running");if(ge===te){if(Re==="throw")throw ee;return{value:g,done:!0};}for(fe.method=Re,fe.arg=ee;;){var W=fe.delegate;if(W&&(W=function ae(de,ye){var Se=ye.method,De=de.iterator[Se];return De===g?(ye.delegate=null,Se==="throw"&&de.iterator.return&&(ye.method="return",ye.arg=g,ae(de,ye),ye.method==="throw")||Se!=="return"&&(ye.method="throw",ye.arg=new TypeError("The iterator does not provide a '"+Se+"' method")),K):(Se=G(De,de.iterator,ye.arg),Se.type==="throw"?(ye.method="throw",ye.arg=Se.arg,ye.delegate=null,K):(De=Se.arg,De?De.done?(ye[de.resultName]=De.value,ye.next=de.nextLoc,ye.method!=="return"&&(ye.method="next",ye.arg=g),ye.delegate=null,K):De:(ye.method="throw",ye.arg=new TypeError("iterator result is not an object"),ye.delegate=null,K)));}(W,fe),W)){if(W===K)continue;return W;}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(ge===H)throw ge=te,fe.arg;fe.dispatchException(fe.arg);}else fe.method==="return"&&fe.abrupt("return",fe.arg);if(ge=z,W=G(le,se,fe),W.type==="normal"){if(ge=fe.done?te:B,W.arg===K)continue;return{value:W.arg,done:fe.done};}W.type==="throw"&&(ge=te,fe.method="throw",fe.arg=W.arg);}})}),he;}function G(j,D,$){try{return{type:"normal",arg:j.call(D,$)};}catch(ne){return{type:"throw",arg:ne};}}f.wrap=N;var H="suspendedStart",B="suspendedYield",z="executing",te="completed",K={};function V(){}function U(){}function Z(){}var re={},ue=(M(re,C,function(){return this;}),Object.getPrototypeOf),ue=ue&&ue(ue(Y([]))),q=(ue&&ue!==v&&S.call(ue,C)&&(re=ue),Z.prototype=V.prototype=Object.create(re));function J(j){["next","throw","return"].forEach(function(D){M(j,D,function($){return this._invoke(D,$);});});}function oe(j,D){var $;w(this,"_invoke",{value:function(ne,le){function se(){return new D(function(fe,ge){(function he(de,Re,ee,W){var ae,de=G(j[de],j,Re);if(de.type!=="throw")return(Re=(ae=de.arg).value)&&t(Re)=="object"&&S.call(Re,"__await")?D.resolve(Re.__await).then(function(ye){he("next",ye,ee,W);},function(ye){he("throw",ye,ee,W);}):D.resolve(Re).then(function(ye){ae.value=ye,ee(ae);},function(ye){return he("throw",ye,ee,W);});W(de.arg);})(ne,le,fe,ge);});}return $=$?$.then(se,se):se();}});}function Q(j){var D={tryLoc:j[0]};
7161 in j&&(D.catchLoc=j[1]),2 in j&&(D.finallyLoc=j[2],D.afterLoc=j[3]),this.tryEntries.push(D);}function F(j){var D=j.completion||{};D.type="normal",delete D.arg,j.completion=D;}function X(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0);}function Y(j){if(j||j===""){var D,$=j[C];if($)return $.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length))return D=-1,($=function ne(){for(;++D<j.length;)if(S.call(j,D))return ne.value=j[D],ne.done=!1,ne;return ne.value=g,ne.done=!0,ne;}).next=$;}throw new TypeError(t(j)+" is not iterable");}return w(q,"constructor",{value:U.prototype=Z,configurable:!0}),w(Z,"constructor",{value:U,configurable:!0}),U.displayName=M(Z,O,"GeneratorFunction"),f.isGeneratorFunction=function(j){return j=typeof j=="function"&&j.constructor,!!j&&(j===U||(j.displayName||j.name)==="GeneratorFunction");},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,Z):(j.__proto__=Z,M(j,O,"GeneratorFunction")),j.prototype=Object.create(q),j;},f.awrap=function(j){return{__await:j};},J(oe.prototype),M(oe.prototype,I,function(){return this;}),f.AsyncIterator=oe,f.async=function(j,D,$,ne,le){le===void 0&&(le=Promise);var se=new oe(N(j,D,$,ne),le);return f.isGeneratorFunction(D)?se:se.next().then(function(fe){return fe.done?fe.value:se.next();});},J(q),M(q,O,"Generator"),M(q,C,function(){return this;}),M(q,"toString",function(){return"[object Generator]";}),f.keys=function(j){var D,$=Object(j),ne=[];for(D in $)ne.push(D);return ne.reverse(),function le(){for(;ne.length;){var se=ne.pop();if(se in $)return le.value=se,le.done=!1,le;}return le.done=!0,le;};},f.values=Y,X.prototype={constructor:X,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(F),!j)for(var D in this)D.charAt(0)==="t"&&S.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=g);},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval;},dispatchException:function(j){if(this.done)throw j;var D=this;function $(he,_e){return se.type="throw",se.arg=j,D.next=he,_e&&(D.method="next",D.arg=g),!!_e;}for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne],se=le.completion;if(le.tryLoc==="root")return $("end");if(le.tryLoc<=this.prev){var fe=S.call(le,"catchLoc"),ge=S.call(le,"finallyLoc");if(fe&&ge){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);if(this.prev<le.finallyLoc)return $(le.finallyLoc);}else if(fe){if(this.prev<le.catchLoc)return $(le.catchLoc,!0);}else{if(!ge)throw Error("try statement without catch or finally");if(this.prev<le.finallyLoc)return $(le.finallyLoc);}}}},abrupt:function(j,D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.tryLoc<=this.prev&&S.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var le=ne;break;}}var se=(le=le&&(j==="break"||j==="continue")&&le.tryLoc<=D&&D<=le.finallyLoc?null:le)?le.completion:{};return se.type=j,se.arg=D,le?(this.method="next",this.next=le.finallyLoc,K):this.complete(se);},complete:function(j,D){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&D&&(this.next=D),K;},finish:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.finallyLoc===j)return this.complete($.completion,$.afterLoc),F($),K;}},catch:function(j){for(var D=this.tryEntries.length-1;0<=D;--D){var $,ne,le=this.tryEntries[D];if(le.tryLoc===j)return($=le.completion).type==="throw"&&(ne=$.arg,F(le)),ne;}throw Error("illegal catch attempt");},delegateYield:function(j,D,$){return this.delegate={iterator:Y(j),resultName:D,nextLoc:$},this.method==="next"&&(this.arg=g),K;}},f;}function o(g,f){var v,S=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!S){if(Array.isArray(g)||(S=function(O,M){if(O){if(typeof O=="string")return _(O,M);var N={}.toString.call(O).slice(8,-1);return(N=N==="Object"&&O.constructor?O.constructor.name:N)==="Map"||N==="Set"?Array.from(O):N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?_(O,M):void 0;}}(g))||f&&g&&typeof g.length=="number")return S&&(g=S),v=0,{s:f=function(){},n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]};},e:function(O){throw O;},f};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 717In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var w,C=!0,I=!1;return{s:function(){S=S.call(g);},n:function(){var O=S.next();return C=O.done,O;},e:function(O){I=!0,w=O;},f:function(){try{C||S.return==null||S.return();}finally{if(I)throw w;}}};}function _(g,f){(f==null||f>g.length)&&(f=g.length);for(var v=0,S=Array(f);v<f;v++)S[v]=g[v];return S;}function E(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];
717if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}function x(g,w,v){w=y(w);var S=g,w=h()?Reflect.construct(w,v||[],y(g).constructor):w.apply(g,v);if(w&&(t(w)=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(g=S,g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g;}function h(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!g;})();}function y(g){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f);})(g);}function b(g,f){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,S){return v.__proto__=S,v;})(g,f);}var p=this&&this.__awaiter||function(g,f,v,S){return new(v=v||Promise)(function(w,C){function I(N){try{M(S.next(N));}catch(G){C(G);}}function O(N){try{M(S.throw(N));}catch(G){C(G);}}function M(N){var G;N.done?w(N.value):((G=N.value)instanceof v?G:new v(function(H){H(G);})).then(I,O);}M((S=S.apply(g,f||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),l(5)),d=l(12),m=l(111),a=l(109),s=l(2),l=function(g){function f(w,C,I){var O;if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");(O=x(this,f,[w,C,I]))._volume=0,O.tickerHandler=function(ue,q,J){var oe=(oe=O.mainTimelineSync)==null?void 0:oe.timeline;if((F=O.mainTimelineSync)!=null&&F.isSyncedToGsapTicker){if(O._player===void 0||O._player===null)c.default.warn("[AudioComponentVideoMock] GSAP ticker triggers sync audio component with no audio player"),O.stopTickerHandler();else{var Q=oe.time(),F=O._attributes.startTime,oe=O._attributes.endTime,X=c.default.round(Q,3);if(X<F||oe<=X)c.default.warn("[AudioComponentVideoMock] GSAP ticker triggers non-playing audio component (out of time bounds), removing from the ticker."),O.stopTickerHandler();else if(O._player.player.paused()===!1){var Y,j=o(O._effects);try{for(j.s();!(Y=j.n()).done;)Y.value.tickerHandler(Q);}catch($){j.e($);}finally{j.f();}}}}else c.default.error("[AudioComponentVideoMock] GSAP ticker triggers none sync audio component, removing from the ticker."),O.stopTickerHandler();},O._containerId=I.containerId,O.mainTimelineSync=void 0,(C=w.effects)!=null&&C.sort(function(ue,q){return ue.attributes.offsetTime-q.attributes.offsetTime;});var M,N=[],G=o(w.effects);try{for(G.s();!(M=G.n()).done;){var H,B,z,te=M.value;te.type!=="volume"&&te.type!=="volumeMuted"||(H=N[N.length-1],te.attributes.offsetTime>H?.attributes.offsetTime+H?.attributes.duration&&(B=H?.attributes.offsetTime+H?.attributes.duration,z=te.attributes.offsetTime-B,N.push({type:"volumeMuted",attributes:{offsetTime:B,duration:z,fromVal:0,toVal:0}}))),N.push(te);}}catch(ue){G.e(ue);}finally{G.f();}0<((I=w.effects)==null?void 0:I.length)&&(w.effects=N);var K,V=O._attributes.startTime,U=o(w.effects);try{for(U.s();!(K=U.n()).done;){var Z=K.value,re=(Z.attributes.startTime=V,a.AudioEffectFactory.createEffect(Z));re&&O._effects.push(re);}}catch(ue){U.e(ue);}finally{U.f();}return O;}var v,S=f;if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");return S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),g&&b(S,g),S=f,(g=[{key:"volume",get:function(){return this._volume;},set:function(w){this._volume=c.default.clamp(w,0,1);var C,I=o(this._effects);try{for(I.s();!(C=I.n()).done;){var O=C.value;O.type==="volume"&&O.setPlayerVolume(w);}}catch(M){I.e(M);}finally{I.f();}}},{key:"disconnectAudioNodes",value:function(){}},{key:"render",value:function(w){return p(this,void 0,void 0,n().mark(function C(){var I,O,M,N,G,H,B=this;return n().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return c.default.debug("[".concat(this.constructor.name,"] Adding mock audio element: ").concat(this._src)),I=d.MediaPlayerCache.getInstance(this._containerId),z.next=4,I.getPlayer(d.PRIMARY_URL_ID,this._src,this._attributes.seek,this._volume);case 4:if(this._player=z.sent,this._player&&this._player.player){z.next=8;break;}return c.default.error("[".concat(this.constructor.name,"] Failed to get video player for: ").concat(this._src)),z.abrupt("return");case 8:O=this._attributes.startTime,M=this._attributes.endTime,(N=s.gsap.timeline({onUpdate:function(){var te;B._player&&B._player.player&&B.mainTimelineSync!==void 0&&!B.mainTimelineSync.timeline.paused()&&(te=c.default.round(N.time(),3),!B.mainTimelineSync.isSyncedToGsapTicker&&O<=te&&te<M&&B.startTickerHandler());}}
717)).call(void 0,[],this._attributes.endTime),G=o(this._effects);try{for(G.s();!(H=G.n()).done;)H.value.apply(this._player,void 0,N);}catch(te){G.e(te);}finally{G.f();}w.add(N,0);case 15:case"end":return z.stop();}},C,this);}));}},{key:"pause",value:function(w){return p(this,void 0,void 0,n().mark(function C(){return n().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:this.stopTickerHandler();case 1:case"end":return I.stop();}},C,this);}));}},{key:"reset",value:function(){}},{key:"sync",value:function(w,C,I){this.mainTimelineSync={timeline:w,onBuffering:C,onVDMReady:I,isSyncedToGsapTicker:!1};}},{key:"startTickerHandler",value:function(){c.default.debug("[".concat(this.constructor.name,"] startTickerHandler: Starting the syncing event, src : ").concat(this._src)),this.mainTimelineSync===void 0?c.default.error("[AudioComponentVideoMock] Cannot start sync with main timeline because timeline is not available."):this.mainTimelineSync.isSyncedToGsapTicker?c.default.warn("[AudioComponentVideoMock] Trying to start main timeline sync that is already running."):(this.mainTimelineSync.isSyncedToGsapTicker=!0,s.gsap.ticker.add(this.tickerHandler));}},{key:"stopTickerHandler",value:function(){c.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Canceling the syncing event, src : ").concat(this._src)),this.mainTimelineSync&&(this.mainTimelineSync.isSyncedToGsapTicker=!1),s.gsap.ticker.remove(this.tickerHandler),c.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Hop hop"));}}])&&E(S.prototype,g),v&&E(S,v),Object.defineProperty(S,"prototype",{writable:!1}),S;}(m.AudioComponentBase);r.default=l;},function(i,r,g){"use strict";function t(f){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v;}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v;})(f);}function n(){n=function(){return v;};var f,v={},S=Object.prototype,w=S.hasOwnProperty,C=Object.defineProperty||function(D,$,ne){D[$]=ne.value;},ue=typeof Symbol=="function"?Symbol:{},I=ue.iterator||"@@iterator",O=ue.asyncIterator||"@@asyncIterator",M=ue.toStringTag||"@@toStringTag";function N(D,$,ne){return Object.defineProperty(D,$,{value:ne,enumerable:!0,configurable:!0,writable:!0}),D[$];}try{N({},"");}catch{N=function($,ne,le){return $[ne]=le;};}function G(D,_e,ne,Re){var se,fe,ge,he,_e=_e&&_e.prototype instanceof U?_e:U,_e=Object.create(_e.prototype),Re=new Y(Re||[]);return C(_e,"_invoke",{value:(se=D,fe=ne,ge=Re,he=B,function(ee,W){if(he===te)throw Error("Generator is already running");if(he===K){if(ee==="throw")throw W;return{value:f,done:!0};}for(ge.method=ee,ge.arg=W;;){var ae=ge.delegate;if(ae&&(ae=function de(ye,Se){var De=Se.method,Ue=ye.iterator[De];return Ue===f?(Se.delegate=null,De==="throw"&&ye.iterator.return&&(Se.method="return",Se.arg=f,de(ye,Se),Se.method==="throw")||De!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+De+"' method")),V):(De=H(Ue,ye.iterator,Se.arg),De.type==="throw"?(Se.method="throw",Se.arg=De.arg,Se.delegate=null,V):(Ue=De.arg,Ue?Ue.done?(Se[ye.resultName]=Ue.value,Se.next=ye.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=f),Se.delegate=null,V):Ue:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,V)));}(ae,ge),ae)){if(ae===V)continue;return ae;}if(ge.method==="next")ge.sent=ge._sent=ge.arg;else if(ge.method==="throw"){if(he===B)throw he=K,ge.arg;ge.dispatchException(ge.arg);}else ge.method==="return"&&ge.abrupt("return",ge.arg);if(he=te,ae=H(se,fe,ge),ae.type==="normal"){if(he=ge.done?K:z,ae.arg===V)continue;return{value:ae.arg,done:ge.done};}ae.type==="throw"&&(he=K,ge.method="throw",ge.arg=ae.arg);}})}),_e;}function H(D,$,ne){try{return{type:"normal",arg:D.call($,ne)};}catch(le){return{type:"throw",arg:le};}}v.wrap=G;var B="suspendedStart",z="suspendedYield",te="executing",K="completed",V={};function U(){}function Z(){}function re(){}var ue={},q=(N(ue,I,function(){return this;}),Object.getPrototypeOf),q=q&&q(q(j([]))),J=(q&&q!==S&&w.call(q,I)&&(ue=q),re.prototype=U.prototype=Object.create(ue));function oe(D){["next","throw","return"].forEach(function($){N(D,$,function(ne){return this._invoke($,ne);});});}function Q(D,$){var ne;C(this,"_invoke",{value:function(le,se){function fe(){return new $(function(ge,he){(function _e(ye,ee,W,ae){var de,ye=H(D[ye],D,ee);if(ye.type!=="throw")return(ee=(de=ye.arg).value)&&t(ee)=="object"&&w.call(ee,"__await")?$.resolve(ee.__await).then(function(Se){_e("next",Se,W,ae);},function(Se){_e("throw",Se,W,ae);}):$.resolve(ee).then(function(Se){de.value=Se,W(de);},function(Se){return _e("throw",Se,W,ae);});ae(ye.arg);})(le,se,ge,he);});}return ne=ne?ne.then(fe,fe):fe();}});}function F(D){var $={tryLoc:D[0]};1 in D&&($.catchLoc=D[1]),2 in D&&($.finallyLoc=D[2],$.afterLoc=D[3]),this.tryEntries.push($);}function X(D){var $=D.completion||{};$.type="normal",delete $.arg,D.completion=$;}function Y(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(F,this),this.reset(!0);}
717function j(D){if(D||D===""){var $,ne=D[I];if(ne)return ne.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length))return $=-1,(ne=function le(){for(;++$<D.length;)if(w.call(D,$))return le.value=D[$],le.done=!1,le;return le.value=f,le.done=!0,le;}).next=ne;}throw new TypeError(t(D)+" is not iterable");}return C(J,"constructor",{value:Z.prototype=re,configurable:!0}),C(re,"constructor",{value:Z,configurable:!0}),Z.displayName=N(re,M,"GeneratorFunction"),v.isGeneratorFunction=function(D){return D=typeof D=="function"&&D.constructor,!!D&&(D===Z||(D.displayName||D.name)==="GeneratorFunction");},v.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,re):(D.__proto__=re,N(D,M,"GeneratorFunction")),D.prototype=Object.create(J),D;},v.awrap=function(D){return{__await:D};},oe(Q.prototype),N(Q.prototype,O,function(){return this;}),v.AsyncIterator=Q,v.async=function(D,$,ne,le,se){se===void 0&&(se=Promise);var fe=new Q(G(D,$,ne,le),se);return v.isGeneratorFunction($)?fe:fe.next().then(function(ge){return ge.done?ge.value:fe.next();});},oe(J),N(J,M,"Generator"),N(J,I,function(){return this;}),N(J,"toString",function(){return"[object Generator]";}),v.keys=function(D){var $,ne=Object(D),le=[];for($ in ne)le.push($);return le.reverse(),function se(){for(;le.length;){var fe=le.pop();if(fe in ne)return se.value=fe,se.done=!1,se;}return se.done=!0,se;};},v.values=j,Y.prototype={constructor:Y,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var $ in this)$.charAt(0)==="t"&&w.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=f);},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval;},dispatchException:function(D){if(this.done)throw D;var $=this;function ne(_e,Re){return fe.type="throw",fe.arg=D,$.next=_e,Re&&($.method="next",$.arg=f),!!Re;}for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le],fe=se.completion;if(se.tryLoc==="root")return ne("end");if(se.tryLoc<=this.prev){var ge=w.call(se,"catchLoc"),he=w.call(se,"finallyLoc");if(ge&&he){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}else if(ge){if(this.prev<se.catchLoc)return ne(se.catchLoc,!0);}else{if(!he)throw Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return ne(se.finallyLoc);}}}},abrupt:function(D,$){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne];if(le.tryLoc<=this.prev&&w.call(le,"finallyLoc")&&this.prev<le.finallyLoc){var se=le;break;}}var fe=(se=se&&(D==="break"||D==="continue")&&se.tryLoc<=$&&$<=se.finallyLoc?null:se)?se.completion:{};return fe.type=D,fe.arg=$,se?(this.method="next",this.next=se.finallyLoc,V):this.complete(fe);},complete:function(D,$){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&$&&(this.next=$),V;},finish:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$];if(ne.finallyLoc===D)return this.complete(ne.completion,ne.afterLoc),X(ne),V;}},catch:function(D){for(var $=this.tryEntries.length-1;0<=$;--$){var ne,le,se=this.tryEntries[$];if(se.tryLoc===D)return(ne=se.completion).type==="throw"&&(le=ne.arg,X(se)),le;}throw Error("illegal catch attempt");},delegateYield:function(D,$,ne){return this.delegate={iterator:j(D),resultName:$,nextLoc:ne},this.method==="next"&&(this.arg=f),V;}},v;}function o(f,v){var S,w=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!w){if(Array.isArray(f)||(w=function(M,N){if(M){if(typeof M=="string")return _(M,N);var G={}.toString.call(M).slice(8,-1);return(G=G==="Object"&&M.constructor?M.constructor.name:G)==="Map"||G==="Set"?Array.from(M):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?_(M,N):void 0;}}(f))||v&&f&&typeof f.length=="number")return w&&(f=w),S=0,{s:v=function(){},n:function(){return S>=f.length?{done:!0}:{done:!1,value:f[S++]};},e:function(M){throw M;},f:v};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 718In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var C,I=!0,O=!1;return{s:function(){w=w.call(f);},n:function(){var M=w.next();return I=M.done,M;},e:function(M){O=!0,C=M;},f:function(){try{I||w.return==null||w.return();}finally{if(O)throw C;}}};}function _(f,v){(v==null||v>f.length)&&(v=f.length);for(var S=0,w=Array(v);S<v;S++)w[S]=f[S];return w;}function E(f,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(f,function(C){return C=function(I,O){if(t(I)!="object"||!I)return I;var M=I[Symbol.toPrimitive];if(M===void 0)return(O==="string"?String:Number)(I);if(M=M.call(I,O||"default"),t(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.");}(C,"string"),t(C)=="symbol"?C:C+"";}(w.key),w);}}function x(f,C,S){C=y(C);var w=f,C=h()?Reflect.construct(C,S||[],y(f).constructor):C.apply(f,S);if(C&&(t(C)=="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(f=w,f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f;}function h(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!f;})();}
718function y(f){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v);})(f);}function b(f,v){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,w){return S.__proto__=w,S;})(f,v);}var p=this&&this.__awaiter||function(f,v,S,w){return new(S=S||Promise)(function(C,I){function O(G){try{N(w.next(G));}catch(H){I(H);}}function M(G){try{N(w.throw(G));}catch(H){I(H);}}function N(G){var H;G.done?C(G.value):((H=G.value)instanceof S?H:new S(function(B){B(H);})).then(O,M);}N((w=w.apply(f,v||[])).next());});},c=(Object.defineProperty(r,"__esModule",{value:!0}),g(109)),d=g(5),m=g(2),a=g(111),s=g(13),l=g(12),g=function(f){function v(C,I,O){var M;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");(M=x(this,v,[C,I,O]))._volume=0,M.bufferWaitingCallback=function(q){var J,oe;q!==M._guid?d.default.error("[MainTrackAudioComponent]: bufferWaitingCallback is being called with different guid, ignoring... "):(q=M.mainTimelineSync)!=null&&q.timeline&&(q=M.mainTimelineSync)!=null&&q.isSyncedToGsapTicker&&(M.mainTimelineSync.isWaitingOnBuffering=!0,q=M.mainTimelineSync.timeline,Array.isArray((J=M.mainTimelineSync)==null?void 0:J.onBuffering)&&(oe=d.default.round(q.time(),s.ROUND_PRECISION),M.mainTimelineSync.onBuffering.forEach(function(Q){return Q(oe);})));},M.bufferPlayingCallback=function(q){var J,oe;q!==M._guid?d.default.error("[MainTrackAudioComponent]: bufferPlayingCallback is being called with different guid, ignoring... "):(q=M.mainTimelineSync.isWaitingOnBuffering,M.mainTimelineSync.isWaitingOnBuffering=!1,q&&(q=M.mainTimelineSync)!=null&&q.timeline&&(q=M.mainTimelineSync)!=null&&q.isSyncedToGsapTicker&&(q=M.mainTimelineSync.timeline,Array.isArray((J=M.mainTimelineSync)==null?void 0:J.onVDMReady)&&(oe=d.default.round(q.time(),s.ROUND_PRECISION),M.mainTimelineSync.onVDMReady.forEach(function(Q){return Q(oe);}))));},M.tickerHandler=function(q,J,oe){var Q=(Q=M.mainTimelineSync)==null?void 0:Q.timeline;if((X=M.mainTimelineSync)!=null&&X.isSyncedToGsapTicker){if(M._player!==void 0&&M._player!==null&&M._player.player){var F=Q.time(),X=d.default.round(F,s.ROUND_PRECISION),Q=M._player.player.currentTime();if(X<M.absoluteStartTime||X>=M.absoluteEndTime)d.default.warn("[MainTrackAudioComponent] GSAP ticker triggers non-playing component (out of time bounds), removing from the ticker."),M.stopTickerHandler();else if(M.mainTimelineSync.timeline.paused()&&!M.mainTimelineSync.isWaitingOnBuffering)M._player.isControlledByVideoComponent||M._player.player.paused()||M._player.player.pause();else if(M._player.isControlledByVideoComponent){var Y,j=o(M._effects);try{for(j.s();!(Y=j.n()).done;)Y.value.tickerHandler(F);}catch(fe){j.e(fe);}finally{j.f();}}else if(!M.mainTimelineSync.timeline.paused()&&M._player.player.paused())d.default.debug("[".concat(M.constructor.name,"] tickerHandler: playing video")),M._player.player.play();else if((!M.mainTimelineSync.timeline.paused()||!M._player.player.paused())&&M._player.player.readyState()>=HTMLMediaElement.HAVE_FUTURE_DATA&&!M._player.player.seeking()){var D,$=X>M.lastSyncTime&&Math.abs(X-M.lastSyncTime-M.syncIntervalSec)<=.005,ne=Math.abs(X-M.absoluteStartTime-(Q-M.playerStartTime))>M.syncThresholdSec,le=(!$&&ne&&(d.default.debug("[".concat(M.constructor.name,"] tickerHandler: Timeline time BEFORE sync. video player=").concat(Q," timeline=").concat(X)),$=X-M.absoluteStartTime+M.playerStartTime+M.syncThresholdSec+1/s.GSAP_FPS,M._player.player.currentTime($),d.default.debug("[".concat(M.constructor.name,"] tickerHandler: Timeline time AFTER sync. video player=").concat(Q," timeline=").concat(X)),M.lastSyncTime=X),o(M._effects));try{for(le.s();!(D=le.n()).done;)D.value.tickerHandler(F);}catch(fe){le.e(fe);}finally{le.f();}}}else d.default.warn("[MainTrackAudioComponent] GSAP ticker triggers sync component with no video player"),M.stopTickerHandler();}else d.default.error("[MainTrackAudioComponent] GSAP ticker triggers none sync component, removing from the ticker."),M.stopTickerHandler();},M._containerId=O.containerId,M.mainTimelineSync=void 0,M.videoError=!1,M._guid=d.default.shortGUID(),M.playerStartTime=M._attributes.seek,M.absoluteStartTime=M._attributes.startTime,M.absoluteEndTime=M._attributes.endTime,M.syncThresholdSec=O.sync.video.thresholdMS/1e3,M.syncIntervalSec=O.sync.video.sampleRateMS/1e3;var N,G=M._attributes.startTime,H=(M.lastSyncTime=G,M.bufferWaitingCallback.guid=M._guid,M.bufferPlayingCallback.guid=M._guid,(I=C.effects)!=null&&I.sort(function(q,J){return q.attributes.offsetTime-J.attributes.offsetTime;}),[]),B=o(C.effects);try{for(B.s();!(N=B.n()).done;){var z,te,K,V=N.value;V.type!=="volume"&&V.type!=="volumeMuted"||(z=H[H.length-1],V.attributes.offsetTime>z?.attributes.offsetTime+z?.attributes.duration&&(te=z?.attributes.offsetTime+z?.attributes.duration,K=V.attributes.offsetTime-te,H.push({type:"volumeMuted",attributes:{offsetTime:te,duration:K,fromVal:0,toVal:0}}))),H.push(V);}}catch(q){B.e(q);}finally{B.f();}0<((O=C.effects)==null?void 0:O.length)&&(C.effects=H);var U,Z=o(C.effects);try{for(Z.s();!(U=Z.n()).done;){var re=U.value,ue=(re.attributes.startTime=G,c.AudioEffectFactory.createEffe
718ct(re));ue&&M._effects.push(ue);}}catch(q){Z.e(q);}finally{Z.f();}return M;}var S,w=v;if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");return w.prototype=Object.create(f&&f.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),Object.defineProperty(w,"prototype",{writable:!1}),f&&b(w,f),w=v,(f=[{key:"playVideo",value:function(){var C=this,I=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0;this._player.player.paused()&&(Math.abs(d.default.round(I-this._player.player.currentTime(),s.ROUND_PRECISION))>this.syncThresholdSec&&(d.default.debug("[".concat(this.constructor.name,"] Starting playing video at time seek: ").concat(I)),this._player.player.currentTime(I),d.default.debug("[".concat(this.constructor.name,"] Video buffered percent ").concat(100*this._player.player.bufferedPercent(),"% and currentTime: ").concat(this._player.player.currentTime()))),this._player.player.play().then(function(){C.mainTimelineSync.timeline.paused()&&C._player.player.pause();}).catch(function(O){d.default.error("[".concat(C.constructor.name,"] ").concat(C._componentId," Video Play Error: ").concat(O)),C.videoError=!0;}));}},{key:"disconnectAudioNodes",value:function(){return p(this,void 0,void 0,n().mark(function C(){return n().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:case"end":return I.stop();}},C);}));}},{key:"volume",get:function(){var C;return(C=this._player)==null?void 0:C.loaderObj.loader.volume;},set:function(C){this._volume=d.default.clamp(C,0,1),this._player&&(this._player.loaderObj.loader.volume=C);var I,O=o(this._effects);try{for(O.s();!(I=O.n()).done;){var M=I.value;M.type==="volume"&&M.setPlayerVolume(C);}}catch(N){O.e(N);}finally{O.f();}}},{key:"render",value:function(C){return p(this,void 0,void 0,n().mark(function I(){var O,M,N,G,H,B,z=this;return n().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return this._attributes.startTime,O=this._attributes.endTime,M=this._attributes.seek,d.default.debug("[".concat(this.constructor.name,"] Adding video player for audio: ").concat(this._src)),N=l.MediaPlayerCache.getInstance(this._containerId),te.next=7,N.getPlayer(l.PRIMARY_URL_ID,this._src,M,this._volume);case 7:if(this._player=te.sent,this._player&&this._player.player){te.next=12;break;}return d.default.error("[".concat(this.constructor.name,"] ").concat(this._componentId," Error: Failed to get video player for: ").concat(this._src)),this.videoError=!0,te.abrupt("return");case 12:G=m.gsap.timeline({onUpdate:function(){var K,V;z._player&&z._player.player&&z.mainTimelineSync!==void 0&&!z.mainTimelineSync.timeline.paused()&&(z._player.isControlledByVideoComponent?((K=d.default.round(G.time(),s.ROUND_PRECISION))>=z.absoluteStartTime&&K<z.absoluteEndTime&&(z.mainTimelineSync.isSyncedToGsapTicker||(d.default.debug("[".concat(z.constructor.name,"] Entering gap, starting ticker")),z.startTickerHandler())),K>=z.absoluteEndTime&&z.mainTimelineSync.isSyncedToGsapTicker&&(d.default.debug("[".concat(z.constructor.name,"] Beyond component time range, stopping ticker")),z.stopTickerHandler())):((K=d.default.round(G.time(),s.ROUND_PRECISION))>=z.absoluteStartTime&&K<z.absoluteEndTime&&(z.mainTimelineSync.isSyncedToGsapTicker||(d.default.debug("[".concat(z.constructor.name,"] Entering gap, starting ticker")),z.startTickerHandler(),!z.videoError&&z._player.player.paused()&&(V=K-z.absoluteStartTime+z.playerStartTime,z.playVideo(V)))),K>=z.absoluteEndTime&&z.mainTimelineSync.isSyncedToGsapTicker&&(d.default.debug("[".concat(z.constructor.name,"] Beyond component time range, stopping ticker")),z._player.player.paused()||(d.default.debug("[".concat(z.constructor.name,"] Pausing video as it's playing beyond its time slot, ts: ").concat(K)),z.pausePlayerAndStopTicker()))));}}),H=o(this._effects);try{for(H.s();!(B=H.n()).done;)B.value.apply(this._player,void 0,G);}catch(K){H.e(K);}finally{H.f();}G.call(void 0,[],O),C.add(G,0);case 17:case"end":return te.stop();}},I,this);}));}},{key:"pause",value:function(){return p(this,void 0,void 0,n().mark(function C(){return n().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:this.pausePlayerAndStopTicker(),d.default.debug("[".concat(this.constructor.name,"] Finished pausing component type: ").concat(this.audioType()));case 2:case"end":return I.stop();}},C,this);}));}},{key:"pausePlayerAndStopTicker",value:function(){var C,I=this;this._player&&this._player.player&&(this._player.isControlledByVideoComponent||this._player.player.paused()||(this.stopTickerHandler(),C=setInterval(function(){d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," Checking if video player has enough data in order to pause")),I._player&&I._player.player?I._player.player.readyState()>=HTMLMediaElement.HAVE_FUTURE_DATA&&(d.default.debug("[".concat(I.constructor.name,"] ").concat(I._componentId," Pausing video player componentId")),I._player.isControlledByVideoComponent||I._player.player.pause(),clearInterval(C)):clearInterval(C);},1/s.GSAP_FPS)));}},{key:"reset",value:function(){this.disableBufferingHandlers(),this._player&&(this._player.player=void 0,this._player=void 0);}},{key:"enableBufferingHandlers",value:function(){var C;(C=this.mainTimelineSync)!=null&&C.isSyncedToGsapTicker?this._player&&(this._player.waitingCallback&&this._player.waitingCallback.guid&&this._player.waitingCallback.guid!==this._guid?d.default.warn("[".concat(this.constructor.name,"] Another component is controlling the player, not setting buffering handlers")):(this._player.waitingCallback=this.bufferWaitingCallback,this._player.playingCallback=this.bufferPlayingCallback,d.default.debug("[".concat(this.constructor.name,"] Enabled buffering handlers for player")))):d.default.error("[MainTrackAudioComponent] GSAP ticker triggers none sync component, remov
718ing from the ticker.");}},{key:"disableBufferingHandlers",value:function(){var C;this._player&&this.bufferPlayingCallback.guid===((C=this._player.playingCallback)==null?void 0:C.guid)&&(this._player.waitingCallback=void 0,this._player.playingCallback=void 0);}},{key:"sync",value:function(C,I,O){this.mainTimelineSync={timeline:C,onBuffering:I,onVDMReady:O,isSyncedToGsapTicker:!1,isWaitingOnBuffering:!1};}},{key:"startTickerHandler",value:function(){d.default.debug("[".concat(this.constructor.name,"] startTickerHandler: Starting the syncing event, src : ").concat(this._src)),this.mainTimelineSync===void 0?d.default.error("[MainTrackAudioComponent] Cannot start sync with main timeline because timeline is not available."):this.mainTimelineSync.isSyncedToGsapTicker?d.default.warn("[MainTrackAudioComponent] Trying to start main timeline sync that is already running."):(this.mainTimelineSync.isSyncedToGsapTicker=!0,this.enableBufferingHandlers(),m.gsap.ticker.add(this.tickerHandler));}},{key:"stopTickerHandler",value:function(){d.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Canceling the syncing event, src : ").concat(this._src)),this.mainTimelineSync&&(this.disableBufferingHandlers(),this.mainTimelineSync.isSyncedToGsapTicker=!1),m.gsap.ticker.remove(this.tickerHandler),d.default.debug("[".concat(this.constructor.name,"] stopTickerHandler: Done"));}}])&&E(w.prototype,f),S&&E(w,S),Object.defineProperty(w,"prototype",{writable:!1}),w;}(a.AudioComponentBase);r.default=g;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}Object.defineProperty(r,"__esModule",{value:!0});var o=x(5),_=x(13),E=x(2),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");E.gsap.ticker.fps(_.GSAP_FPS),this.mainTimeline=E.gsap.timeline({paused:!0}),this.videoTimeline=E.gsap.timeline(),this.audioTimeline=E.gsap.timeline();}return y=h,(b=[{key:"play",value:function(){var c,d,m,a=this,s=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0,l=1<arguments.length&&arguments[1]!==void 0?arguments[1]:void 0;this.mainTimeline&&(c=new Date(),(!(l=l&&l<=s?s+1:l)||l>this.mainTimeline.duration())&&(l=this.mainTimeline.duration()),l=o.default.round(l,3),d=function(){a.mainTimeline.labels.endTime!==void 0&&(o.default.debug("TimeStamp: ".concat(c.toISOString()," : Removing pause ").concat(a.mainTimeline.labels.endTime," from main timeline")),a.mainTimeline.removePause("endTime"),a.mainTimeline.removeLabel("endTime"));},m=function(){d(),a.onComplete&&(o.default.debug("Executing ended callback!!"),a.onComplete());},this.onUpdate&&this.mainTimeline.eventCallback("onUpdate",this.onUpdate,[],this),this.mainTimeline.duration()===0?m():(o.default.debug("TimeStamp: ".concat(c.toISOString()," Adding onComplete callback to the mainTimeline at : ").concat(l," , duration of main timeline : ").concat(this.mainTimeline.duration())),m=m,d(),a.mainTimeline.addLabel("endTime",l),a.mainTimeline.addPause("endTime",m,[]),o.default.debug("TimeStamp: ".concat(c.toISOString()," : Added pause ").concat(a.mainTimeline.labels.endTime," from main timeline")),o.default.debug("Time Before playing ".concat(performance.now())),this.mainTimeline.play(s),this.onStart&&this.onStart()));}},{key:"restart",value:function(){this.mainTimeline.restart(),o.default.debug("Main timeline restarted");}},{key:"pause",value:function(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:void 0;this.mainTimeline&&(o.default.debug("Main time line pausing at ".concat((c=c===0?1e-5:c)||"undefined")),this.mainTimeline.pause(c));}}
718,{key:"stop",value:function(){this.pause(0);}},{key:"reset",value:function(){this.videoTimeline.paused(!1),this.audioTimeline.paused(!1),this.mainTimeline.add([this.videoTimeline,this.audioTimeline],0);}},{key:"clear",value:function(){function c(d){d&&(d.pause(0),d.clear(!0));}this.mainTimeline&&this.mainTimeline.kill(),c(this.mainTimeline),c(this.videoTimeline),c(this.audioTimeline);}},{key:"isPlaying",value:function(){return this.mainTimeline.isActive();}},{key:"duration",value:function(){return this.mainTimeline.duration();}},{key:"time",value:function(){return this.mainTimeline.time();}}])&&n(y.prototype,b),p&&n(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.default=x;},function(i,r,f){"use strict";function t(v){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S;}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S;})(v);}function n(){n=function(){return S;};var v,S={},w=Object.prototype,C=w.hasOwnProperty,I=Object.defineProperty||function($,ne,le){$[ne]=le.value;},q=typeof Symbol=="function"?Symbol:{},O=q.iterator||"@@iterator",M=q.asyncIterator||"@@asyncIterator",N=q.toStringTag||"@@toStringTag";function G($,ne,le){return Object.defineProperty($,ne,{value:le,enumerable:!0,configurable:!0,writable:!0}),$[ne];}try{G({},"");}catch{G=function(ne,le,se){return ne[le]=se;};}function H($,Re,le,ee){var fe,ge,he,_e,Re=Re&&Re.prototype instanceof Z?Re:Z,Re=Object.create(Re.prototype),ee=new j(ee||[]);return I(Re,"_invoke",{value:(fe=$,ge=le,he=ee,_e=z,function(W,ae){if(_e===K)throw Error("Generator is already running");if(_e===V){if(W==="throw")throw ae;return{value:v,done:!0};}for(he.method=W,he.arg=ae;;){var de=he.delegate;if(de&&(de=function ye(Se,De){var Ue=De.method,Be=Se.iterator[Ue];return Be===v?(De.delegate=null,Ue==="throw"&&Se.iterator.return&&(De.method="return",De.arg=v,ye(Se,De),De.method==="throw")||Ue!=="return"&&(De.method="throw",De.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),U):(Ue=B(Be,Se.iterator,De.arg),Ue.type==="throw"?(De.method="throw",De.arg=Ue.arg,De.delegate=null,U):(Be=Ue.arg,Be?Be.done?(De[Se.resultName]=Be.value,De.next=Se.nextLoc,De.method!=="return"&&(De.method="next",De.arg=v),De.delegate=null,U):Be:(De.method="throw",De.arg=new TypeError("iterator result is not an object"),De.delegate=null,U)));}(de,he),de)){if(de===U)continue;return de;}if(he.method==="next")he.sent=he._sent=he.arg;else if(he.method==="throw"){if(_e===z)throw _e=V,he.arg;he.dispatchException(he.arg);}else he.method==="return"&&he.abrupt("return",he.arg);
718if(_e=K,de=B(fe,ge,he),de.type==="normal"){if(_e=he.done?V:te,de.arg===U)continue;return{value:de.arg,done:he.done};}de.type==="throw"&&(_e=V,he.method="throw",he.arg=de.arg);}})}),Re;}function B($,ne,le){try{return{type:"normal",arg:$.call(ne,le)};}catch(se){return{type:"throw",arg:se};}}S.wrap=H;var z="suspendedStart",te="suspendedYield",K="executing",V="completed",U={};function Z(){}function re(){}function ue(){}var q={},J=(G(q,O,function(){return this;}),Object.getPrototypeOf),J=J&&J(J(D([]))),oe=(J&&J!==w&&C.call(J,O)&&(q=J),ue.prototype=Z.prototype=Object.create(q));function Q($){["next","throw","return"].forEach(function(ne){G($,ne,function(le){return this._invoke(ne,le);});});}function F($,ne){var le;I(this,"_invoke",{value:function(se,fe){function ge(){return new ne(function(he,_e){(function Re(Se,W,ae,de){var ye,Se=B($[Se],$,W);if(Se.type!=="throw")return(W=(ye=Se.arg).value)&&t(W)=="object"&&C.call(W,"__await")?ne.resolve(W.__await).then(function(De){Re("next",De,ae,de);},function(De){Re("throw",De,ae,de);}):ne.resolve(W).then(function(De){ye.value=De,ae(ye);},function(De){return Re("throw",De,ae,de);});de(Se.arg);})(se,fe,he,_e);});}return le=le?le.then(ge,ge):ge();}});}function X($){var ne={tryLoc:$[0]};1 in $&&(ne.catchLoc=$[1]),2 in $&&(ne.finallyLoc=$[2],ne.afterLoc=$[3]),this.tryEntries.push(ne);}function Y($){var ne=$.completion||{};ne.type="normal",delete ne.arg,$.completion=ne;}function j($){this.tryEntries=[{tryLoc:"root"}],$.forEach(X,this),this.reset(!0);}function D($){if($||$===""){var ne,le=$[O];if(le)return le.call($);if(typeof $.next=="function")return $;if(!isNaN($.length))return ne=-1,(le=function se(){for(;++ne<$.length;)if(C.call($,ne))return se.value=$[ne],se.done=!1,se;return se.value=v,se.done=!0,se;}).next=le;}throw new TypeError(t($)+" is not iterable");}return I(oe,"constructor",{value:re.prototype=ue,configurable:!0}),I(ue,"constructor",{value:re,configurable:!0}),re.displayName=G(ue,N,"GeneratorFunction"),S.isGeneratorFunction=function($){return $=typeof $=="function"&&$.constructor,!!$&&($===re||($.displayName||$.name)==="GeneratorFunction");},S.mark=function($){return Object.setPrototypeOf?Object.setPrototypeOf($,ue):($.__proto__=ue,G($,N,"GeneratorFunction")),$.prototype=Object.create(oe),$;},S.awrap=function($){return{__await:$};},Q(F.prototype),G(F.prototype,M,function(){return this;}),S.AsyncIterator=F,S.async=function($,ne,le,se,fe){fe===void 0&&(fe=Promise);var ge=new F(H($,ne,le,se),fe);return S.isGeneratorFunction(ne)?ge:ge.next().then(function(he){return he.done?he.value:ge.next();});},Q(oe),G(oe,N,"Generator"),G(oe,O,function(){return this;}),G(oe,"toString",function(){return"[object Generator]";}),S.keys=function($){var ne,le=Object($),se=[];for(ne in le)se.push(ne);return se.reverse(),function fe(){for(;se.length;){var ge=se.pop();if(ge in le)return fe.value=ge,fe.done=!1,fe;}return fe.done=!0,fe;};},S.values=D,j.prototype={constructor:j,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(Y),!$)for(var ne in this)ne.charAt(0)==="t"&&C.call(this,ne)&&!isNaN(+ne.slice(1))&&(this[ne]=v);},stop:function(){this.done=!0;var $=this.tryEntries[0].completion;if($.type==="throw")throw $.arg;return this.rval;},dispatchException:function($){if(this.done)throw $;var ne=this;function le(Re,ee){return ge.type="throw",ge.arg=$,ne.next=Re,ee&&(ne.method="next",ne.arg=v),!!ee;}for(var se=this.tryEntries.length-1;0<=se;--se){var fe=this.tryEntries[se],ge=fe.completion;if(fe.tryLoc==="root")return le("end");if(fe.tryLoc<=this.prev){var he=C.call(fe,"catchLoc"),_e=C.call(fe,"finallyLoc");if(he&&_e){if(this.prev<fe.catchLoc)return le(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return le(fe.finallyLoc);}else if(he){if(this.prev<fe.catchLoc)return le(fe.catchLoc,!0);}else{if(!_e)throw Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return le(fe.finallyLoc);}}}},abrupt:function($,ne){for(var le=this.tryEntries.length-1;0<=le;--le){var se=this.tryEntries[le];if(se.tryLoc<=this.prev&&C.call(se,"finallyLoc")&&this.prev<se.f
718inallyLoc){var fe=se;break;}}var ge=(fe=fe&&($==="break"||$==="continue")&&fe.tryLoc<=ne&&ne<=fe.finallyLoc?null:fe)?fe.completion:{};return ge.type=$,ge.arg=ne,fe?(this.method="next",this.next=fe.finallyLoc,U):this.complete(ge);},complete:function($,ne){if($.type==="throw")throw $.arg;return $.type==="break"||$.type==="continue"?this.next=$.arg:$.type==="return"?(this.rval=this.arg=$.arg,this.method="return",this.next="end"):$.type==="normal"&&ne&&(this.next=ne),U;},finish:function($){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le=this.tryEntries[ne];if(le.finallyLoc===$)return this.complete(le.completion,le.afterLoc),Y(le),U;}},catch:function($){for(var ne=this.tryEntries.length-1;0<=ne;--ne){var le,se,fe=this.tryEntries[ne];if(fe.tryLoc===$)return(le=fe.completion).type==="throw"&&(se=le.arg,Y(fe)),se;}throw Error("illegal catch attempt");},delegateYield:function($,ne,le){return this.delegate={iterator:D($),resultName:ne,nextLoc:le},this.method==="next"&&(this.arg=v),U;}},S;}function o(v,S){var w,C=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!C){if(Array.isArray(v)||(C=function(N,G){if(N){if(typeof N=="string")return _(N,G);var H={}.toString.call(N).slice(8,-1);return(H=H==="Object"&&N.constructor?N.constructor.name:H)==="Map"||H==="Set"?Array.from(N):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?_(N,G):void 0;}}(v))||S&&v&&typeof v.length=="number")return C&&(v=C),w=0,{s:S=function(){},n:function(){return w>=v.length?{done:!0}:{done:!1,value:v[w++]};},e:function(N){throw N;},f:S};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 719In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var I,O=!0,M=!1;return{s:function(){C=C.call(v);},n:function(){var N=C.next();return O=N.done,N;},e:function(N){M=!0,I=N;},f:function(){try{O||C.return==null||C.return();}finally{if(M)throw I;}}};}function _(v,S){(S==null||S>v.length)&&(S=v.length);for(var w=0,C=Array(S);w<S;w++)C[w]=v[w];return C;}function E(v,S){for(var w=0;w<S.length;w++){var C=S[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(v,function(I){return I=function(O,M){if(t(O)!="object"||!O)return O;var N=O[Symbol.toPrimitive];if(N===void 0)return(M==="string"?String:Number)(O);if(N=N.call(O,M||"default"),t(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.");}(I,"string"),t(I)=="symbol"?I:I+"";}(C.key),C);}}function x(v,I,w){I=b(I);var C=v,I=h()?Reflect.construct(I,w||[],b(v).constructor):I.apply(v,w);if(I&&(t(I)=="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(v=C,v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v;}function h(){try{var v=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!v;})();}function y(){return(y=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(v,S,w){var C=function(I,O){for(;!{}.hasOwnProperty.call(I,O)&&(I=b(I))!==null;);return I;}(v,S);if(C)return(C=Object.getOwnPropertyDescriptor(C,S)).get?C.get.call(arguments.length<3?v:w):C.value;}).apply(null,arguments);}function b(v){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S);})(v);}function p(v,S){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,C){return w.__proto__=C,w;})(v,S);}var c=this&&this.__awaiter||function(v,S,w,C){return new(w=w||Promise)(function(I,O){function M(H){try{G(C.next(H));}catch(B){O(B);}}function N(H){try{G(C.throw(H));}catch(B){O(B);}}function G(H){var B;H.done?I(H.value):((B=H.value)instanceof w?B:new w(function(z){z(B);})).then(M,N);}G((C=C.apply(v,S||[])).next());});},d=(Object.defineProperty(r,"__esModule",{value:!0}),f(5)),m=f(13),a=f(12),s=f(337),l=f(278),g=f(107),f=function(v){function S(I,O){var M;if(!(this instanceof S))throw new TypeError("Cannot call a class as a function");return(M=x(this,S,[I,O]))._options=O,M._initialAdapterStory=I.story,M.isPreview=!1,M.duration=I.global.duration,M.mediaTimeLines=new Map(),M.extractTimeLines(I),M.extractSlidesTimeline(I),O=g.LoadingScheduler.getInstance(),O.setMediaTimeline(M.mediaTimeLines),O.setSlidesTimeline(M.slidesTimeline),M;}var w,C=S;if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");return C.prototype=Object.create(v&&v.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),Object.defineProperty(C,"prototype",{writable:!1}),v&&p(C,v),C=S,(v=[{key:"Duration",get:function(){return this.duration;}},{key:"extractSlidesTimeline",value:function(I){this.slidesTimeline=I.slides.map(function(O){return new s.Interval(O.startTime,O.endTime);}).sort(function(O,M){return O.compareTo(M);});}},{key:"extractTimeLines",value:function(I){var O,M=o(I.slides);try{for(M.s();!(O=M.n()).done;){var N=O.value;if(N.media)for(var G,H,B,z,te,K=0;K<N.media.length;K++)N.media[K].type==="video"&&(G=d.default.selectUrl(N.lowRes,N.media[K].previewUrl,N.media[K].url,N.media[K].hlsPlaylistUrl),H="[".concat(N.media[K].urlId,"][").concat(G,"]"),B=d.default.round(N.media[K].seek+N.duration,m.ROUND_PRECISION),z=new s.Interval(N.media[K].seek,B),(te=this.mediaTimeLines.get(H))||(te=new s.MediaTimeline(),this.mediaTimeLines.set(H,te)),te.add(z));}}catch(V){M.e(V);}finally{M.f();}}},{key:"renderVideo_",value:function(I){I.set(this._element,{visibility:"visible"}
719,0).set(this._element,{visibility:"hidden"},this.duration);}},{key:"render",value:function(I,O,M){var N=this,G=Object.create(null,{render:{get:function(){return H=S,B="render",z=N,K=y(b((te=1)&te?H.prototype:H),B,z),2&te?function(V){return K.apply(z,V);}:K;var H,B,z,te,K;}}});return c(this,void 0,void 0,n().mark(function H(){return n().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,G.render.call(this,I,M);case 2:this.renderVideo_(O),this.updateLoadingScheduler();case 4:case"end":return B.stop();}},H,this);}));}},{key:"updateLoadingScheduler",value:function(){var I=g.LoadingScheduler.getInstance();I.clear(),I.setMediaTimeline(this.mediaTimeLines),I.setSlidesTimeline(this.slidesTimeline);}},{key:"clear",value:function(){a.MediaPlayerCache.disposeInstance(this._options.containerId);}},{key:"MediaTimeLines",get:function(){return this.mediaTimeLines;}},{key:"initialAdapterStory",get:function(){return this._initialAdapterStory;}}])&&E(C.prototype,v),w&&E(C,w),Object.defineProperty(C,"prototype",{writable:!1}),C;}(l.default);r.default=f;},function(i,r,e){"use strict";function t(y,b){var p,c=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!c){if(Array.isArray(y)||(c=function(s,l){if(s){if(typeof s=="string")return n(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?n(s,l):void 0;}}(y))||b&&y&&typeof y.length=="number")return c&&(y=c),p=0,{s:b=function(){},n:function(){return p>=y.length?{done:!0}:{done:!1,value:y[p++]};},e:function(s){throw s;},f:b};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 720In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var d,m=!0,a=!1;return{s:function(){c=c.call(y);},n:function(){var s=c.next();return m=s.done,s;},e:function(s){a=!0,d=s;},f:function(){try{m||c.return==null||c.return();}finally{if(a)throw d;}}};}function n(y,b){(b==null||b>y.length)&&(b=y.length);for(var p=0,c=Array(b);p<b;p++)c[p]=y[p];return c;}function o(y){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function _(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function");}function E(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(o(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),o(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),o(d)=="symbol"?d:d+"";}(c.key),c);}}function x(y,b,p){return b&&E(y.prototype,b),p&&E(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;}Object.defineProperty(r,"__esModule",{value:!0}),r.MediaTimeline=r.Interval=void 0;var h=function(){return x(function y(b,p){_(this,y),p<=b&&(p=b),this._start=b,this._end=p;},[{key:"compareTo",value:function(y){return this._start<y._start||this._start===y._start&&this._end<=y._end?-1:1;}},{key:"contains",value:function(y){return 1<arguments.length&&arguments[1]!==void 0&&arguments[1]?y>=this.start&&y<=this.end:y>=this.start&&y<this.end;}},{key:"within",value:function(y){return y>this.start&&y<this.end;}},{key:"start",get:function(){return this._start;}},{key:"updateStart",value:function(y){this._start=y;}},{key:"end",get:function(){return this._end;}},{key:"updateEnd",value:function(y){this._end=y;}}]);}(),h=(r.Interval=h,function(){return x(function y(){_(this,y),this._intervals=[],this.isUsedAsMasterTimelineForAudio=!1;},[{key:"maxInterval",value:function(){if(0<this._intervals.length)return this._intervals[this._intervals.length-1];}},{key:"add",value:function(y){var b=this.maxInterval();b&&Math.abs(b.end-y.start)<.1?b.updateEnd(y.end):this._intervals.push(y);}},{key:"contains",value:function(y){var b,p=1<arguments.length&&arguments[1]!==void 0&&arguments[1],c=t(this._intervals);try{for(c.s();!(b=c.n()).done;)if(b.value.contains(y,p))return!0;}catch(d){c.e(d);}finally{c.f();}return!1;}},{key:"within",value:function(y){var b,p=t(this._intervals);try{for(p.s();!(b=p.n()).done;)if(b.value.within(y))return!0;}catch(c){p.e(c);}finally{p.f();}return!1;}},{key:"intervals",get:function(){return this._intervals;}}]);}());r.MediaTimeline=h;},function(i,r,e){"use strict";function t(b){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p;}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p;})(b);}function n(){n=function(){return p;};var b,p={},c=Object.prototype,d=c.hasOwnProperty,m=Object.defineProperty||function(ue,q,J){ue[q]=J.value;},H=typeof Symbol=="function"?Symbol:{},a=H.iterator||"@@iterator",s=H.asyncIterator||"@@asyncIterator",l=H.toStringTag||"@@toStringTag";function g(ue,q,J){return Object.defineProperty(ue,q,{value:J,enumerable:!0,configurable:!0,writable:!0}),ue[q];}try{g({},"");}catch{g=function(q,J,oe){return q[J]=oe;};}function f(ue,j,J,D){var Q,F,X,Y,j=j&&j.prototype instanceof M?j:M,j=Object.create(j.prototype),D=new Z(D||[]);return m(j,"_invoke",{value:(Q=ue,F=J,X=D,Y=S,function($,ne){if(Y===C)throw Error("Generator is already running");
720if(Y===I){if($==="throw")throw ne;return{value:b,done:!0};}for(X.method=$,X.arg=ne;;){var le=X.delegate;if(le&&(le=function se(fe,ge){var he=ge.method,_e=fe.iterator[he];return _e===b?(ge.delegate=null,he==="throw"&&fe.iterator.return&&(ge.method="return",ge.arg=b,se(fe,ge),ge.method==="throw")||he!=="return"&&(ge.method="throw",ge.arg=new TypeError("The iterator does not provide a '"+he+"' method")),O):(he=v(_e,fe.iterator,ge.arg),he.type==="throw"?(ge.method="throw",ge.arg=he.arg,ge.delegate=null,O):(_e=he.arg,_e?_e.done?(ge[fe.resultName]=_e.value,ge.next=fe.nextLoc,ge.method!=="return"&&(ge.method="next",ge.arg=b),ge.delegate=null,O):_e:(ge.method="throw",ge.arg=new TypeError("iterator result is not an object"),ge.delegate=null,O)));}(le,X),le)){if(le===O)continue;return le;}if(X.method==="next")X.sent=X._sent=X.arg;else if(X.method==="throw"){if(Y===S)throw Y=I,X.arg;X.dispatchException(X.arg);}else X.method==="return"&&X.abrupt("return",X.arg);if(Y=C,le=v(Q,F,X),le.type==="normal"){if(Y=X.done?I:w,le.arg===O)continue;return{value:le.arg,done:X.done};}le.type==="throw"&&(Y=I,X.method="throw",X.arg=le.arg);}})}),j;}function v(ue,q,J){try{return{type:"normal",arg:ue.call(q,J)};}catch(oe){return{type:"throw",arg:oe};}}p.wrap=f;var S="suspendedStart",w="suspendedYield",C="executing",I="completed",O={};function M(){}function N(){}function G(){}var H={},B=(g(H,a,function(){return this;}),Object.getPrototypeOf),B=B&&B(B(re([]))),z=(B&&B!==c&&d.call(B,a)&&(H=B),G.prototype=M.prototype=Object.create(H));function te(ue){["next","throw","return"].forEach(function(q){g(ue,q,function(J){return this._invoke(q,J);});});}function K(ue,q){var J;m(this,"_invoke",{value:function(oe,Q){function F(){return new q(function(X,Y){(function j(fe,$,ne,le){var se,fe=v(ue[fe],ue,$);if(fe.type!=="throw")return($=(se=fe.arg).value)&&t($)=="object"&&d.call($,"__await")?q.resolve($.__await).then(function(ge){j("next",ge,ne,le);},function(ge){j("throw",ge,ne,le);}):q.resolve($).then(function(ge){se.value=ge,ne(se);},function(ge){return j("throw",ge,ne,le);});le(fe.arg);})(oe,Q,X,Y);});}return J=J?J.then(F,F):F();}});}function V(ue){var q={tryLoc:ue[0]};1 in ue&&(q.catchLoc=ue[1]),2 in ue&&(q.finallyLoc=ue[2],q.afterLoc=ue[3]),this.tryEntries.push(q);}function U(ue){var q=ue.completion||{};q.type="normal",delete q.arg,ue.completion=q;}function Z(ue){this.tryEntries=[{tryLoc:"root"}],ue.forEach(V,this),this.reset(!0);}function re(ue){if(ue||ue===""){var q,J=ue[a];if(J)return J.call(ue);if(typeof ue.next=="function")return ue;if(!isNaN(ue.length))return q=-1,(J=function oe(){for(;++q<ue.length;)if(d.call(ue,q))return oe.value=ue[q],oe.done=!1,oe;return oe.value=b,oe.done=!0,oe;}).next=J;}throw new TypeError(t(ue)+" is not iterable");}return m(z,"constructor",{value:N.prototype=G,configurable:!0}),m(G,"constructor",{value:N,configurable:!0}),N.displayName=g(G,l,"GeneratorFunction"),p.isGeneratorFunction=function(ue){return ue=typeof ue=="function"&&ue.constructor,!!ue&&(ue===N||(ue.displayName||ue.name)==="GeneratorFunction");},p.mark=function(ue){return Object.setPrototypeOf?Object.setPrototypeOf(ue,G):(ue.__proto__=G,g(ue,l,"GeneratorFunction")),ue.prototype=Object.create(z),ue;},p.awrap=function(ue){return{__await:ue};},te(K.prototype),g(K.prototype,s,function(){return this;}),p.AsyncIterator=K,p.async=function(ue,q,J,oe,Q){Q===void 0&&(Q=Promise);var F=new K(f(ue,q,J,oe),Q);return p.isGeneratorFunction(q)?F:F.next().then(function(X){return X.done?X.value:F.next();});},te(z),g(z,l,"Generator"),g(z,a,function(){return this;}),g(z,"toString",function(){return"[object Generator]";}),p.keys=function(ue){var q,J=Object(ue),oe=[];for(q in J)oe.push(q);return oe.reverse(),function Q(){for(;oe.length;){var F=oe.pop();if(F in J)return Q.value=F,Q.done=!1,Q;}return Q.done=!0,Q;};},p.values=re,Z.prototype={constructor:Z,reset:function(ue){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(U),!ue)for(var q in this)q.charAt(0)==="t"&&d.call(this,q)&&!isNaN(+q.slice(1))&&(this[q]=b);},stop:function(){this.done=!0;
720var ue=this.tryEntries[0].completion;if(ue.type==="throw")throw ue.arg;return this.rval;},dispatchException:function(ue){if(this.done)throw ue;var q=this;function J(j,D){return F.type="throw",F.arg=ue,q.next=j,D&&(q.method="next",q.arg=b),!!D;}for(var oe=this.tryEntries.length-1;0<=oe;--oe){var Q=this.tryEntries[oe],F=Q.completion;if(Q.tryLoc==="root")return J("end");if(Q.tryLoc<=this.prev){var X=d.call(Q,"catchLoc"),Y=d.call(Q,"finallyLoc");if(X&&Y){if(this.prev<Q.catchLoc)return J(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return J(Q.finallyLoc);}else if(X){if(this.prev<Q.catchLoc)return J(Q.catchLoc,!0);}else{if(!Y)throw Error("try statement without catch or finally");if(this.prev<Q.finallyLoc)return J(Q.finallyLoc);}}}},abrupt:function(ue,q){for(var J=this.tryEntries.length-1;0<=J;--J){var oe=this.tryEntries[J];if(oe.tryLoc<=this.prev&&d.call(oe,"finallyLoc")&&this.prev<oe.finallyLoc){var Q=oe;break;}}var F=(Q=Q&&(ue==="break"||ue==="continue")&&Q.tryLoc<=q&&q<=Q.finallyLoc?null:Q)?Q.completion:{};return F.type=ue,F.arg=q,Q?(this.method="next",this.next=Q.finallyLoc,O):this.complete(F);},complete:function(ue,q){if(ue.type==="throw")throw ue.arg;return ue.type==="break"||ue.type==="continue"?this.next=ue.arg:ue.type==="return"?(this.rval=this.arg=ue.arg,this.method="return",this.next="end"):ue.type==="normal"&&q&&(this.next=q),O;},finish:function(ue){for(var q=this.tryEntries.length-1;0<=q;--q){var J=this.tryEntries[q];if(J.finallyLoc===ue)return this.complete(J.completion,J.afterLoc),U(J),O;}},catch:function(ue){for(var q=this.tryEntries.length-1;0<=q;--q){var J,oe,Q=this.tryEntries[q];if(Q.tryLoc===ue)return(J=Q.completion).type==="throw"&&(oe=J.arg,U(Q)),oe;}throw Error("illegal catch attempt");},delegateYield:function(ue,q,J){return this.delegate={iterator:re(ue),resultName:q,nextLoc:J},this.method==="next"&&(this.arg=b),O;}},p;}function o(b,p){var c,d=typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(!d){if(Array.isArray(b)||(d=function(l,g){if(l){if(typeof l=="string")return _(l,g);var f={}.toString.call(l).slice(8,-1);return(f=f==="Object"&&l.constructor?l.constructor.name:f)==="Map"||f==="Set"?Array.from(l):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?_(l,g):void 0;}}(b))||p&&b&&typeof b.length=="number")return d&&(b=d),c=0,{s:p=function(){},n:function(){return c>=b.length?{done:!0}:{done:!1,value:b[c++]};},e:function(l){throw l;},f:p};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 721In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var m,a=!0,s=!1;return{s:function(){d=d.call(b);},n:function(){var l=d.next();return a=l.done,l;},e:function(l){s=!0,m=l;},f:function(){try{a||d.return==null||d.return();}finally{if(s)throw m;}}};}function _(b,p){(p==null||p>b.length)&&(p=b.length);for(var c=0,d=Array(p);c<p;c++)d[c]=b[c];return d;}var E=this&&this.__awaiter||function(b,p,c,d){return new(c=c||Promise)(function(m,a){function s(f){try{g(d.next(f));}catch(v){a(v);}}function l(f){try{g(d.throw(f));}catch(v){a(v);}}function g(f){var v;f.done?m(f.value):((v=f.value)instanceof c?v:new c(function(S){S(v);})).then(s,l);}g((d=d.apply(b,p||[])).next());});},x=(Object.defineProperty(r,"__esModule",{value:!0}),r.AsyncGuard=void 0,e(5)),h=e(339),y=function(b,p,c){var d,m=o(b);try{for(m.s();!(d=m.n()).done;){var a=d.value;x.default.debug(" ".concat(p," , ").concat(c," : ").concat(a));}}catch(s){m.e(s);}finally{m.f();}};r.AsyncGuard=function(b){var p=1<arguments.length&&arguments[1]!==void 0&&arguments[1];return function(c,d,m){var a,s,l,g,f,v,S=this;return b&&(a=function(w,C){C=C.__AsyncGuardMap.get(w),C?x.default.debug("Function ".concat(w," Status: isHot: ").concat(C.isHot," shouldReApplySize: ").concat(C.shouldReApply?C.shouldReApply.length:void 0)):x.default.debug("Helper isn't defined");},s=function(w,C){var I;w.hasOwnProperty("__AsyncGuardMap")||(x.default.debug("Defining AsyncGuard map for the instance"),I=new Map(),Object.defineProperty(w,"__AsyncGuardMap",{value:I,writable:!1})),w.hasOwnProperty("__AsyncGuardMap")&&!w.__AsyncGuardMap.has(C)&&(x.default.debug("Defining AsyncGuard helper for method: ".concat(C)),I={isHot:!1,shouldReApply:void 0,locker:new h.Mutex()},w.__AsyncGuardMap.set(C,I),p&&setInterval(a,1e4,C,w));},l=function(w,C,I,O){return E(S,void 0,void 0,n().mark(function M(){var N;return n().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return N=void 0,G.prev=1,G.next=4,C.apply(w,I);case 4:N=G.sent,G.next=13;break;case 7:if(G.prev=7,G.t0=G.catch(1),x.default.error("AsyncGuard: Error ".concat(G.t0===null||G.t0===void 0?void 0:G.t0.message," occurred during execution of ").concat(O)),w.__AsyncGuardMap.get(O).shouldReApply===void 0)throw g(w,O),G.t0;G.next=13;break;case 13:return G.abrupt("return",N);case 14:case"end":return G.stop();}},M,null,[[1,7]]);}));},g=function(w,C){w.__AsyncGuardMap.get(C).locker.unlock()?x.default.debug("".concat(C," Lock Released!")):x.default.debug("".concat(C," Couldn't Unlock!")),w.__AsyncGuardMap.get(C).isHot=!1;},f=m.value,v=function(){for(var w=arguments.length,C=new Array(w),I=0;I<w;I++)C[I]=arguments[I];return E(this,void 0,void 0,n().mark(function O(){var M,N;return n().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(s(this,d),this.__AsyncGuardMap.get(d).locker.lock())return x.default.debug("".concat(d," Lock Acquired!")),this.__AsyncGuardMap.get(d).isHot=!0,x.default.debug("Async Function: ".concat(d," is Hot!!!")),y(C,d,"...args"),G.next=8,l(this,f,C,d);G.next=23;break;case 8:M=G.sent;case 9:if(this.__AsyncGuardMap.get(d).shouldReApply!==void 0)return x.default.debug("".concat(d," ReApplying....")),N=this.__AsyncGuardMap.get(d).shouldReApply,y(N,d,"newArgs before ReApply!"),this.__AsyncGuardMap.get(d).shouldReApply=void 0,G.next=16,l(this,f,N,d);G.next=19;break;case 16:M=G.sent,G.next=9;break;case 19:return g(this,d),G.abrupt("return",M);case 23:x.default.debug("".concat(d," Couldn't acquire lock!")),this.__AsyncGuardMap.get(d).shouldReApply=[].concat(C),x.default.debug("".concat(d," Arguments set to reApply!"));case 26:case"end":return G.stop();}},O,this);}));},Object.defineProperty(v,"name",{value:d,writable:!1}),m.value=v),m;};};},function(i,r,e){"use strict";function t(_){return(t=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;})(_);}function n(_,E){for(var x=0;x<E.length;x++){var h=E[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,function(y){return y=function(b,p){if(t(b)!="object"||!b)return b;var c=b[Symbol.toPrimitive];
721if(c===void 0)return(p==="string"?String:Number)(b);if(c=c.call(b,p||"default"),t(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.");}(y,"string"),t(y)=="symbol"?y:y+"";}(h.key),h);}}Object.defineProperty(r,"__esModule",{value:!0}),r.Mutex=void 0;var o=function(){function _(){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.locker=!1;}return E=_,(x=[{key:"lock",value:function(){return!this.locker&&(this.locker=!0);}},{key:"unlock",value:function(){return!!this.locker&&!(this.locker=!1);}}])&&n(E.prototype,x),h&&n(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,x,h;}();r.Mutex=o;},function(i,r,h){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){var p,c=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!c){if(Array.isArray(y)||(c=function(s,l){if(s){if(typeof s=="string")return o(s,l);var g={}.toString.call(s).slice(8,-1);return(g=g==="Object"&&s.constructor?s.constructor.name:g)==="Map"||g==="Set"?Array.from(s):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?o(s,l):void 0;}}(y))||b&&y&&typeof y.length=="number")return c&&(y=c),p=0,{s:b=function(){},n:function(){return p>=y.length?{done:!0}:{done:!1,value:y[p++]};},e:function(s){throw s;},f:b};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 722In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var d,m=!0,a=!1;return{s:function(){c=c.call(y);},n:function(){var s=c.next();return m=s.done,s;},e:function(s){a=!0,d=s;},f:function(){try{m||c.return==null||c.return();}finally{if(a)throw d;}}};}function o(y,b){(b==null||b>y.length)&&(b=y.length);for(var p=0,c=Array(b);p<b;p++)c[p]=y[p];return c;}function _(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0});var E=h(341),x=h(13),h=function(){function y(){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");}return b=y,c=[{key:"CoordinateTransitions",value:function(d){if(d&&1<d.length){for(var m=0;m<d.length-1;++m){var s=d[m],a=d[m+1],s=E.default.createCoordinator(s,a);s&&s.Coordinate();}E.default.createCoordinator(d[d.length-1],void 0).Coordinate();}}},{key:"CoordinateMaster",value:function(d){if(d&&1<d.length){var m=d.filter(function(C){return C.zIndex==x.DisplayPriority.MASTER_ORDER;}),a=d.filter(function(C){return C.zIndex!=x.DisplayPriority.MASTER_ORDER;});if(m){var s,l=n(m);try{for(l.s();!(s=l.n()).done;){var g,f=s.value,v=function(C,I){var O,M=I.StartTime,N=I.EndTime,G=[],H=n(C);try{for(H.s();!(O=H.n()).done;){var B,z=O.value;z.zIndex>I.zIndex&&(z.StartTime>N||z.EndTime<M||(B={start:Math.max(z.StartTime,M),end:Math.min(z.EndTime,N)},G.push(B)));}}catch(te){H.e(te);}finally{H.f();}return G;}(a,f),S=n(v);try{for(S.s();!(g=S.n()).done;){var w=g.value;f.TimeLine.set(f.Element,{display:"none"},w.start).set(f.Element,{display:""},w.end);}}catch(C){S.e(C);}finally{S.f();}}}catch(C){l.e(C);}finally{l.f();}}}}}],(p=null)&&_(b.prototype,p),c&&_(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.default=h;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}
722Object.defineProperty(r,"__esModule",{value:!0});var o=x(342),_=x(343),E=x(344),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");}return y=h,p=[{key:"createCoordinator",value:function(c,d){var m=E.default.reportSlideStatus(c),a=E.default.reportSlideStatus(d);return new(!m.end&&a.start||m.end&&a.start?o.NoneToTransitionCo:_.NoneToNoneCo)(c,m,d,a);}}],(b=null)&&n(y.prototype,b),p&&n(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.default=x;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.NoneToTransitionCo=void 0,e=function(h){function y(c,d,m,a){if(this instanceof y)return o(this,y,[c,d,m,a]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"Coordinate",value:function(){var c,d;this.defaultCoordination(),this.first&&this.secStatus&&this.first.TimeLine&&(c=this.first.TimeLine,d=this.secStatus.start.duration,c.set(this.first.Element,{visibility:"hidden"},this.first.EndTime+d),this.firStatus.layer&&c.to(this.firStatus.layer.element,d,{autoAlpha:0},this.firStatus.layer.endTime));}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(279).BaseTransitionCoordinator),r.NoneToTransitionCo=e;},function(i,r,e){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}function o(h,c,b){c=E(c);var p=h,c=_()?Reflect.construct(c,b||[],E(h).constructor):c.apply(h,b);if(c&&(t(c)=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(h=p,h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h;}function _(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!h;})();}
722function E(h){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y);})(h);}function x(h,y){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,p){return b.__proto__=p,b;})(h,y);}Object.defineProperty(r,"__esModule",{value:!0}),r.NoneToNoneCo=void 0,e=function(h){function y(c,d,m,a){if(this instanceof y)return o(this,y,[c,d,m,a]);throw new TypeError("Cannot call a class as a function");}var b,p=y;if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");return p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),h&&x(p,h),p=y,(h=[{key:"Coordinate",value:function(){var c;this.defaultCoordination(),this.first&&this.first.TimeLine&&((c=this.first.TimeLine).set(this.first.Element,{visibility:"hidden"},this.first.EndTime),this.firStatus.layer&&c.set(this.firStatus.layer.element,{visibility:"inherit"},this.firStatus.layer.endTime));}}])&&n(p.prototype,h),b&&n(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p;}(e(279).BaseTransitionCoordinator),r.NoneToNoneCo=e;},function(i,r,x){"use strict";function t(h){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y;}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y;})(h);}function n(h,y){var b,p=typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(!p){if(Array.isArray(h)||(p=function(a,s){if(a){if(typeof a=="string")return o(a,s);var l={}.toString.call(a).slice(8,-1);return(l=l==="Object"&&a.constructor?a.constructor.name:l)==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?o(a,s):void 0;}}(h))||y&&h&&typeof h.length=="number")return p&&(h=p),b=0,{s:y=function(){},n:function(){return b>=h.length?{done:!0}:{done:!1,value:h[b++]};},e:function(a){throw a;},f:y};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 723In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var c,d=!0,m=!1;return{s:function(){p=p.call(h);},n:function(){var a=p.next();return d=a.done,a;},e:function(a){m=!0,c=a;},f:function(){try{d||p.return==null||p.return();}finally{if(m)throw c;}}};}function o(h,y){(y==null||y>h.length)&&(y=h.length);for(var b=0,p=Array(y);b<y;b++)p[b]=h[b];return p;}function _(h,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,function(c){return c=function(d,m){if(t(d)!="object"||!d)return d;var a=d[Symbol.toPrimitive];if(a===void 0)return(m==="string"?String:Number)(d);if(a=a.call(d,m||"default"),t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.");}(c,"string"),t(c)=="symbol"?c:c+"";}(p.key),p);}}Object.defineProperty(r,"__esModule",{value:!0});var E=x(33),x=function(){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");}return y=h,p=[{key:"reportSlideStatus",value:function(c,d){var m={layer:void 0,start:void 0,end:void 0};if(c&&(c=c.Layers,c&&0<c.length)){var a=c.find(E.default.hasImageOrVidComps);if(a&&(c=(m.layer=a).animationEffects,c&&0<c.length)){var s,l=n(c);try{for(l.s();!(s=l.n()).done;){var g,f=s.value;(d||E.default.isTransitiveEffect)(f)&&(g={duration:f.duration||0,timeOffset:f.timeOffset},f.timeOffset==a.startTime?m.start=g:f.timeOffset+f.duration>=a.endTime&&(m.end=g));}}catch(v){l.e(v);}finally{l.f();}}}return m;}}],(b=null)&&_(y.prototype,b),p&&_(y,p),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,b,p;}();r.default=x;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d,l,a){if(_())return Reflect.construct.apply(null,arguments);var s=[null],l=(s.push.apply(s,l),new(d.bind.apply(d,s))());return a&&o(l,a.prototype),l;}
723function o(d,m){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a;})(d,m);}function _(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!d;})();}function E(d){return function(m){if(Array.isArray(m))return x(m);}(d)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m);}(d)||function(m,a){if(m){if(typeof m=="string")return x(m,a);var s={}.toString.call(m).slice(8,-1);return(s=s==="Object"&&m.constructor?m.constructor.name:s)==="Map"||s==="Set"?Array.from(m):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?x(m,a):void 0;}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 724In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function x(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function h(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}Object.defineProperty(r,"__esModule",{value:!0}),r.RenderStrategyFactory=void 0;var y=c(346),b=c(347),p=c(348),c=function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");}return m=d,s=[{key:"createStrategy",value:function(l,g){if(!l)return new y.default(g);switch(l.type){case"a-greedy":return n(p.default,[g].concat(E(l.args)));case"heavy":return new b.default(g);default:return n(y.default,[g].concat(E(l.args)));}}}],(a=null)&&h(m.prototype,a),s&&h(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();r.RenderStrategyFactory=c;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}function o(c,s,m){s=E(s);var a=c,s=_()?Reflect.construct(s,m||[],E(c).constructor):s.apply(c,m);if(s&&(t(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(c=a,c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c;}function _(){try{var c=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(_=function(){return!!c;})();}function E(c){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d);})(c);}function x(c,d){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,a){return m.__proto__=a,m;})(c,d);}Object.defineProperty(r,"__esModule",{value:!0});var h=p(112),y=p(33),b=p(5),p=function(c){function d(s){var l=1<arguments.length&&arguments[1]!==void 0?arguments[1]:3,g=this,f=d;if(g instanceof f)return(g=o(this,d,[s])).jobTime=Math.max(l,d.MIN_JOB_TIME),g;throw new TypeError("Cannot call a class as a function");}var m,a=d;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");return a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),c&&x(a,c),a=d,(c=[{key:"decompose",value:function(){var s=this,l=this.previewer.Story.Duration,g=this.previewer.Slides,f={jobs:[]};if(l&&Number.isFinite(l)&&!(l<=0))for(var v=new Set(),S=(g&&g.forEach(function(G,H){y.default.hasBackgroun
724dRemovalEffect(G)&&v.add(H);}),0);S<l;){var w=g?b.default.slideIndexFromTime(S,g):-1,C=g&&0<=w?g[w]:null;if(g&&0<g.length&&!C){var I=g.find(function(G){return G.StartTime>S;});if(I){S=I.StartTime;continue;}break;}I=w;var O,M,N=g&&g.length!==0?0<=I&&v.has(I)?Math.min(s.jobTime,h.RenderStrategy.MAX_BG_REMOVAL_JOB_IN_SEC):s.jobTime:Math.min(s.jobTime,1),N=S+N;l<(N=C&&N>C.EndTime&&(!(O=(M=w+1)<g.length?g[M]:null)||O.StartTime>C.EndTime||v.has(w)!==v.has(M))?C.EndTime:N)&&(N=l),N=Math.round(1e3*N)/1e3,S<N&&(O=[{start:S,end:N}],M=v.has(w)?h.PriorityRender[h.PriorityRender.FULL_RENDER_STANDALONE]:h.PriorityRender[h.PriorityRender.FULL_RENDER],d.tagJobs(O,M),f.jobs.push(O)),S=N;}return f;}}])&&n(a.prototype,c),m&&n(a,m),Object.defineProperty(a,"prototype",{writable:!1}),a;}(h.RenderStrategy);(r.default=p).MIN_JOB_TIME=.001;},function(i,r,d){"use strict";function t(m){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;})(m);}function n(m,a){var s,l=typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];
724if(!l){if(Array.isArray(m)||(l=function(S,w){if(S){if(typeof S=="string")return o(S,w);var C={}.toString.call(S).slice(8,-1);return(C=C==="Object"&&S.constructor?S.constructor.name:C)==="Map"||C==="Set"?Array.from(S):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?o(S,w):void 0;}}(m))||a&&m&&typeof m.length=="number")return l&&(m=l),s=0,{s:a=function(){},n:function(){return s>=m.length?{done:!0}:{done:!1,value:m[s++]};},e:function(S){throw S;},f:a};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 725In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var g,f=!0,v=!1;return{s:function(){l=l.call(m);},n:function(){var S=l.next();return f=S.done,S;},e:function(S){v=!0,g=S;},f:function(){try{f||l.return==null||l.return();}finally{if(v)throw g;}}};}function o(m,a){(a==null||a>m.length)&&(a=m.length);for(var s=0,l=Array(a);s<a;s++)l[s]=m[s];return l;}function _(m,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,function(g){return g=function(f,v){if(t(f)!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S===void 0)return(v==="string"?String:Number)(f);if(S=S.call(f,v||"default"),t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.");}(g,"string"),t(g)=="symbol"?g:g+"";}(l.key),l);}}function E(m,g,s){g=h(g);var l=m,g=x()?Reflect.construct(g,s||[],h(m).constructor):g.apply(m,s);if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(m=l,m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m;}function x(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(x=function(){return!!m;})();}function h(m){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a);})(m);}function y(m,a){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s;})(m,a);}Object.defineProperty(r,"__esModule",{value:!0});var b=d(112),p=d(33),c=d(5),d=function(m){function a(g){if(this instanceof a)return E(this,a,[g]);throw new TypeError("Cannot call a class as a function");}var s,l=a;if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");return l.prototype=Object.create(m&&m.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),m&&y(l,m),l=a,m=[{key:"breakToJobs",value:function(g,f,v,S){var w,C=[],I=n(g);try{for(I.s();!(w=I.n()).done;)var O=w.value,C=C.concat(function(N){for(var G=[],H=N.start;H<N.end;){var B=3,z=v&&S?c.default.slideIndexFromTime(H,v):-1,te=H+(B=0<=z&&S.has(z)?Math.min(3,b.RenderStrategy.MAX_BG_REMOVAL_JOB_IN_SEC):B),te=[{start:H,end:te=te>N.end?N.end:te}],K=f;f===b.PriorityRender[b.PriorityRender.FULL_RENDER]&&0<=z&&S.has(z)&&(K=b.PriorityRender[b.PriorityRender.FULL_RENDER_STANDALONE]),b.RenderStrategy.tagJobs(te,K),G.push(te),H+=B;}return G;}(O));}catch(M){I.e(M);}finally{I.f();}return C;}}],(s=[{key:"decompose",value:function(){var g={jobs:[]},f=[],v=[],S=this.previewer.Slides,w=new Set();
725if(S&&S.forEach(function(te,K){p.default.hasBackgroundRemovalEffect(te)&&w.add(K);}),S)for(var C=0;C<S.length;C++){var I=S[C],O=I.mainViewChanges;if(O){var M,N=n(b.RenderStrategy.completeKeys(O.keys,O.startTime,O.endTime));try{for(N.s();!(M=N.n()).done;){var G=M.value,H=Object.assign(Object.assign({},G),{slideIndex:C});(!O.getByInterval(G)||O.getByInterval(G)&&O.getByInterval(G).length===0?v:f).push(H);}}catch(te){N.e(te);}finally{N.f();}}else f.push({start:I.StartTime,end:I.EndTime,slideIndex:C});}var B=b.RenderStrategy.mergeConsequentIntervals(f),z=b.RenderStrategy.mergeConsequentIntervals(v),B=a.breakToJobs(B,b.PriorityRender[b.PriorityRender.FULL_RENDER],S,w),z=a.breakToJobs(z,b.PriorityRender[b.PriorityRender.FRONT_VIEW_CHANGE],S,w);return B.sort(this.accumulatedGapComparator),z.sort(this.accumulatedGapComparator),g.jobs=B.concat(z),g;}}])&&_(l.prototype,s),m&&_(l,m),Object.defineProperty(l,"prototype",{writable:!1}),l;}(b.RenderStrategy);r.default=d;},function(i,r,l){"use strict";function t(g){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f;}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f;})(g);}function n(g,f){var v,S=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!S){if(Array.isArray(g)||(S=E(g))||f&&g&&typeof g.length=="number")return S&&(g=S),v=0,{s:f=function(){},n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]};},e:function(O){throw O;},f};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 726In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var w,C=!0,I=!1;return{s:function(){S=S.call(g);},n:function(){var O=S.next();return C=O.done,O;},e:function(O){I=!0,w=O;},f:function(){try{C||S.return==null||S.return();}finally{if(I)throw w;}}};}function o(g,f){return function(v){if(Array.isArray(v))return v;}(g)||function(v,S){var w=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(w!=null){var C,I,O,M,N=[],G=!0,H=!1;try{if(O=(w=w.call(v)).next,S===0){if(Object(w)!==w)return;G=!1;}else for(;!(G=(C=O.call(w)).done)&&(N.push(C.value),N.length!==S);G=!0);}catch(B){H=!0,I=B;}finally{try{if(!G&&w.return!=null&&(M=w.return(),Object(M)!==M))return;}finally{if(H)throw I;}}return N;}}(g,f)||E(g,f)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 727In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(g){return function(f){if(Array.isArray(f))return x(f);}(g)||function(f){if(typeof Symbol<"u"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f);}(g)||E(g)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 728In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function E(g,f){if(g){if(typeof g=="string")return x(g,f);var v={}.toString.call(g).slice(8,-1);return(v=v==="Object"&&g.constructor?g.constructor.name:v)==="Map"||v==="Set"?Array.from(g):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?x(g,f):void 0;}}function x(g,f){(f==null||f>g.length)&&(f=g.length);for(var v=0,S=Array(f);v<f;v++)S[v]=g[v];return S;}function h(g,f){for(var v=0;v<f.length;v++){var S=f[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,function(w){return w=function(C,I){if(t(C)!="object"||!C)return C;var O=C[Symbol.toPrimitive];if(O===void 0)return(I==="string"?String:Number)(C);if(O=O.call(C,I||"default"),t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.");}(w,"string"),t(w)=="symbol"?w:w+"";}(S.key),S);}}function y(g,w,v){w=p(w);var S=g,w=b()?Reflect.construct(w,v||[],p(g).constructor):w.apply(g,v);if(w&&(t(w)=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(g=S,g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g;}function b(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(b=function(){return!!g;})();}
728function p(g){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f);})(g);}function c(g,f){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,S){return v.__proto__=S,v;})(g,f);}Object.defineProperty(r,"__esModule",{value:!0});var d=l(112),m=l(275),a=l(33),s=l(5),l=function(g){function f(w){var C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:3,I=2<arguments.length&&arguments[2]!==void 0?arguments[2]:3,O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:6,M=4<arguments.length&&arguments[4]!==void 0?arguments[4]:6,N=this,G=f;if(N instanceof G)return(N=y(this,f,[w])).alphaDict={FULL_RENDER:C,FULL_RENDER_STANDALONE:C,FRONT_VIEW_CHANGE:I,FRONT_VIEW_UNCHANGED:O,NO_FRONT_VIEW:M},N;throw new TypeError("Cannot call a class as a function");}var v,S=f;if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");return S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),g&&c(S,g),S=f,g=[{key:"roundNumber",value:function(w,C){return Number(w.toFixed(C));}},{key:"splitStoryByPriority",value:function(O){function C(H,B){return!H.getByInterval(B)||H.getByInterval(B)&&H.getByInterval(B).length===0;}var I={FULL_RENDER:[],FULL_RENDER_STANDALONE:[],FRONT_VIEW_CHANGE:[],FRONT_VIEW_UNCHANGED:[],NO_FRONT_VIEW:[]},O=O.Slides;if(O){var M,N=n(O);try{var G=function(){var H=M.value;if(a.default.hasMultipleVideoComps(H))return I.FULL_RENDER.push({start:H.StartTime,end:H.EndTime}),1;function B(Y){return!C(z,Y);}var z=H.mainViewChanges,te=H.frontViewExist,K=H.frontViewChanges;if(z){var V,U=n(d.RenderStrategy.completeKeys(z.keys,z.startTime,z.endTime));try{for(U.s();!(V=U.n()).done;){var Z=V.value;if(B(Z)||te){if(!B(Z)&&te){var re,ue=n(d.RenderStrategy.completeKeys(te.keys,te.startTime,te.endTime));try{for(ue.s();!(re=ue.n()).done;){var q=re.value;if(C(te,q)){var J=m.default.findIntersection([Z,q]);J.end>J.start&&I.NO_FRONT_VIEW.push(J);}else{var oe,Q=n(d.RenderStrategy.completeKeys(K.keys,K.startTime,K.endTime));try{for(Q.s();!(oe=Q.n()).done;){var F=oe.value,X=m.default.findIntersection([Z,q,F]);X.end>X.start&&(C(K,F)?I.FRONT_VIEW_UNCHANGED:I.FRONT_VIEW_CHANGE).push(X);}}catch(Y){Q.e(Y);}finally{Q.f();}}}}catch(Y){ue.e(Y);}finally{ue.f();}}else I.FULL_RENDER.push(Z);}else I.NO_FRONT_VIEW.push(Z);}}catch(Y){U.e(Y);}finally{U.f();}}else I.FULL_RENDER.push({start:H.StartTime,end:H.EndTime});};for(N.s();!(M=N.n()).done;)G();}catch(H){N.e(H);}finally{N.f();}}return I;}}],(v=[{key:"decompose",value:function(){function w(K){return K=s.default.cloneDeep(K).sort(function(V,U){return V.start-U.start;}),(K=d.RenderStrategy.mergeConsequentIntervals(K).shift())&&K.start===0&&K.end===C.previewer.Story.Duration;}var C=this,I=function(K){return K.reduce(function(V,U){return V+(U.end-U.start);},0);},O={jobs:[]},M=this.previewer.Slides,N=new Set(),G=(M&&M.forEach(function(K,V){a.default.hasBackgroundRemovalEffect(K)&&N.add(V);}),f.splitStoryByPriority(this.previewer));if(!w((te=[]).concat.apply(te,_(Object.values(G)))))throw new Error("".concat(this.constructor.name," Non-valid story split"));for(var H=[],B=0,z=Object.entries(G);B<z.length;B++)(function(){var U=o(z[B],2),V=U[0],U=U[1],U=(G[V]=d.RenderStrategy.mergeConsequentIntervals(U),C.alphaGreedy(G[V],C.alphaDict[V],V,M,N).sort(C.accumulatedGapComparator)),K=C.alphaDict[V]/2,V=U.filter(function(Z){return I(Z)<K;}),U=U.filter(function(Z){return I(Z)>=K;});V&&V.length&&V.forEach(function(Z){return H.push.apply(H,_(Z));}),(V=O.jobs).push.apply(V,_(U));})();if(H&&H.length&&O.jobs.unshift(H),!w(this.mapJobs(O.jobs,function(K){return K;})))throw new Error("".concat(this.constructor.name," Non-valid alpha-greedy"));var te=this.mapJobs(O.jobs,function(K){return K;}).filter(function(K){return K.start>K.end;});if(0<te.length)throw console.error("Backwards intervals detected:",JSON.stringify(te)),new Error("".concat(this.constructor.name," Backwards intervals detected"));return O;}},{key:"alphaGreedy",value:function(w,C,I,O,M){function N(oe,Q){oe=d.RenderStrategy.tagJobs([oe],function(X){return O&&M&&I===d.PriorityRender[d.PriorityRender.FULL_RENDER]&&(X=s.default.slideIndexFromTime(X,O),0<=X&&M.has(X))?d.PriorityRender[d.PriorityRender.FULL_RENDER_STANDALONE]:I;}(oe.start)).shift();var F=f.roundNumber(oe.end-oe.start,3);F<Q?(K.miniJobs.push(oe),K.sum=f.roundNumber(K.sum+F,3)):te.push([oe]);}var G,H,B,z,te=[],K={miniJobs:[],sum:0},V=null,U=n(w);try{for(U.s();!(G=U.n()).done;)for(var Z=G.value,re=Z.start;re<Z.end;){var ue=function(oe){return O&&M&&(oe=s.default.slideIndexFromTime(oe,O),0<=oe&&M.has(oe))?Math.min(C,d.RenderStrategy.MAX_BG_REMOVAL_JOB_IN_SEC):C;}(re),q=(V!==null&&V!==ue&&0<K.miniJobs.length&&(te.push(K.miniJobs),K.miniJobs=[],K.sum=0),f.roundNumber((V=ue)-K.sum,3)),J=f.roundNumber(re+q,3);N({start:re,end:J=J>Z.end?Z.end:J},ue),re=f.roundNumber(re+q,3),H=ue,z=B=void 0,K.sum>H?(B=f.roundNumber(K.sum-H,3),z={start:K.miniJobs[K.miniJobs.length-1].end-B,end:K.miniJobs[K.miniJobs.length-1].end},K.miniJobs[K.miniJobs.length-1].end-=B,te.push(K.miniJobs),K.miniJobs=[z],K.sum=B):K.sum===H&&(te.push(K.miniJobs),K.miniJobs=[],K.sum=0);}}catch(oe){U.e(oe);}finally{U.f();}return K.miniJobs&&K.miniJobs.length&&te.push(K.miniJobs),te;}},{key:"mapJobs",value:function(w,C){var I=[];
728return w.forEach(function(O){Array.isArray(O)?O.forEach(function(M){return I.push(C(M));}):I.push(C(O));}),I;}}])&&h(S.prototype,v),g&&h(S,g),Object.defineProperty(S,"prototype",{writable:!1}),S;}(d.RenderStrategy);r.default=l;},function(i,r,c){"use strict";function t(d){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m;}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m;})(d);}function n(d){return function(m){if(Array.isArray(m))return E(m);}(d)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m);}(d)||_(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 729In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(d,m){return function(a){if(Array.isArray(a))return a;}(d)||function(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var g,f,v,S,w=[],C=!0,I=!1;try{if(v=(l=l.call(a)).next,s===0){if(Object(l)!==l)return;C=!1;}else for(;!(C=(g=v.call(l)).done)&&(w.push(g.value),w.length!==s);C=!0);}catch(O){I=!0,f=O;}finally{try{if(!C&&l.return!=null&&(S=l.return(),Object(S)!==S))return;}finally{if(I)throw f;}}return w;}}(d,m)||_(d,m)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 730In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(d,m){if(d){if(typeof d=="string")return E(d,m);var a={}.toString.call(d).slice(8,-1);return(a=a==="Object"&&d.constructor?d.constructor.name:a)==="Map"||a==="Set"?Array.from(d):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?E(d,m):void 0;}}function E(d,m){(m==null||m>d.length)&&(m=d.length);for(var a=0,s=Array(m);a<m;a++)s[a]=d[a];return s;}function x(d,m){for(var a=0;a<m.length;a++){var s=m[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,function(l){return l=function(g,f){if(t(g)!="object"||!g)return g;var v=g[Symbol.toPrimitive];if(v===void 0)return(f==="string"?String:Number)(g);if(v=v.call(g,f||"default"),t(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.");}(l,"string"),t(l)=="symbol"?l:l+"";}(s.key),s);}}Object.defineProperty(r,"__esModule",{value:!0});var h=c(5),y=c(33),b=c(276),p=c(108),c=function(){function d(l){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this.previewer=l;}return m=d,s=[{key:"generateRenderInfo",value:function(l){var g;return b.default.isVideoComponent(l)?(h.default.debug("".concat(this.constructor.name," Generating video component info.")),g={media:l.MediaURL(),seek:l.seek,startTime:l.startTime(),scaleInfo:l.fitInfo,mainViewType:"video"}):b.default.isImageComponent(l)?(h.default.debug("".concat(this.constructor.name," Generating image component info.")),g={media:l.MediaURL(),seek:void 0,startTime:l.startTime(),scaleInfo:Object.values(l.getComputedSize()),mainViewType:"image"}):h.default.debug("".concat(this.constructor.name," Given component ").concat(JSON.stringify(l)," is not main-view.")),g;}}],(a=[{key:"splitToTasksByPriority",value:function(l){function g(B,z,te){return te?B.reduce(function(Z,V){var Z=o(Z,2),U=Z[0],Z=Z[1],re=o(V,2),re=(re[0],re[1]);return re!=z&&re>=te.start&&re<te.end?[[].concat(n(U),[V]),Z]:[U,[].concat(n(Z),[V])];},[[],[]]):[[],B];}function f(B,z){var te;B&&((te=z.indices).push.apply(te,n(B.map(function(K){return K[0];}))),(te=z.frameTimes).push.apply(te,n(B.map(function(K){return K[1];}))));}function v(B){C=B;}var S=[],w=[],C=Array.from(l.entries());if(this.previewer.Slides!==void 0){for(;0<C.length;){var I,O,N=o(C.shift(),2),M=N[0],N=N[1],H=this.previewer.Slides.map(function(B){return[B.StartTime,B.EndTime];}),H=o(h.default.intervalBinarySearch(H,N),2),G=H[0],H=(H[1],this.previewer.Slides[G]);H!==void 0&&(G={frameTimes:[N],action:"screenshot",indices:[M]},y.default.hasMultipleVideoComps(H)?w.push(G):!y.default.didSlideHasMainView(H)||y.default.didMainViewChange(H,N)||y.default.didFrontViewExists(H,N)?(y.default.didSlideHasMainView(H)&&!y.default.didMainViewChange(H,N)&&(G.action="overlay",y.default.didFrontViewChange(H,N)||(M=H.frontViewExist.timeToInterval(N),I=H.frontViewChanges.timeToInterval(N),O
730={start:M.start,end:M.end},I&&(O.start=Math.max(0,Math.min(M.start,I.start)),O.end=Math.min(M.end,I.start)),I=(M=o(g(C,N,O),2))[0],O=M[1],f(I,G),v(O))),w.push(G)):(G.action="no-render",M=H.mainViewChanges.unSqueezeToInterval(N),O=(I=o(g(C,N,M),2))[0],H=I[1],f(O,G),v(H),S.push(G)));}return[S,w];}h.default.warn("".concat(this.constructor.name," setStory hasn't been called"));}},{key:"canOverlayRender",value:function(l){function g(M){h.default.debug("Trying to restore display! current sIndex ".concat(f.overlayStash?f.overlayStash.sIndex:"undefined",` 731 got: `).concat(M,", isHidden: ").concat(f.overlayStash?f.overlayStash.isHidden:"undefined")),f.overlayStash&&f.overlayStash.sIndex===M&&f.overlayStash.isHidden&&(f.overlayStash.elements.forEach(function(N){return N.element.style.display=N.display;}),h.default.debug("Display Restored"),f.overlayStash.isHidden=!1);}var f=this,v=(h.default.debug("canOverlay start!"),[void 0,void 0]),w=this.previewer.Slides.map(function(M){return[M.StartTime,M.EndTime];});h.default.debug("Available timeIntervals: ".concat(JSON.stringify(w)));var w=o(h.default.intervalBinarySearch(w,l),2),S=w[0],w=(w[1],this.previewer.Slides[S]);if(w===void 0)return h.default.debug("canOverlay: couldn't find slide that contains ".concat(l," exit point 1")),v;if(y.default.hasMultipleVideoComps(w))return h.default.debug("canOverlay: slide has multiple videos exit point 2"),v;if(1<((O=(O=w.refSlide)==null?void 0:O.media)==null?void 0:O.length))return h.default.debug("canOverlay: slide has multiple media elements exit point 2.1"),v;var O=void 0,C=void 0;if(0<((I=(I=w.refSlide)==null?void 0:I.media)==null?void 0:I.length)&&(O=w.refSlide.media[0].url,C=w.refSlide.media[0].previewUrl),h.default.debug("Slide num,start-end: ".concat(S,",").concat(w.StartTime,"-").concat(w.EndTime," url : ").concat(O,` 732 previewUrl: `).concat(C)),!w.Layers.find(y.default.hasMainView(O,C)))return h.default.debug("canOverlay: couldn't find mainViewLayer ".concat(l," exit point 3")),g(S),v;var I=w.mainViewChanges,O=!I.getByTime(l)||I.getByTime(l).length==0;return h.default.debug("canOverlay final answer: ".concat(O)),O||(h.default.debug("VDM couldn't overlay render, switching to normal"),g(S),I.getByTime(l).forEach(function(M){h.default.debug("Value found: ".concat(M.constructor.name));})),[O,S];}},{key:"prepare",value:function(l){var g=this,f=function(G,H){H.push({element:G,display:G.style.display});};h.default.debug("[".concat(this.constructor.name,"][prepare]: Start"));var v,S,w,C,I,O,M=this.previewer.Slides[l].Layers,N=this.findMainViewComp(l);if(N)return C=(N=o(N,4))[0],S=N[1],N[2],N=N[3],C=C,I=v=[],O=void 0,y.default.isVidOrImage(C)&&(h.default.debug("prepare: Disabling main view component"),f(C.getElement(),I),C.getElement().style.display="none",O=d.generateRenderInfo(C)),I=O,h.default.debug("[".concat(this.constructor.name,"][prepare]: omitting info: ").concat(I)),C=S,w=v,C=(O=M)[S=N].Components.slice(0,C),h.default.debug("prepare: Disabling all background components, number of background comps: ".concat(C.length)),C.forEach(function(G){f(G.getElement(),w),G.getElement().style.display="none";}),C=O.slice(0,S),h.default.debug("prepare: Disabling all background layers, number of background layers: ".concat(C.length)),C.forEach(function(G){f(G.element,w),G.element.style.display="none";}),M=v,g.overlayStash&&(!g.overlayStash||g.overlayStash.sIndex===l&&g.overlayStash.isHidden)||(g.overlayStash={sIndex:l,elements:M,isHidden:!0}),I;}},{key:"findMainViewComp",value:function(l){if(l=this.previewer.Slides[l],1<((g=(g=l.refSlide)==null?void 0:g.media)==null?void 0:g.length))h.default.debug("findMainViewComp: slide has multiple media elements. There is no main one to support layers rendering");else if(0<((g=(g=l?.refSlide)==null?void 0:g.media)==null?void 0:g.length)){var g=l.Layers;if(g&&0<g.length){h.default.debug("".concat(this.constructor.name,": Total layers found ").concat(g.length));var f=l.refSlide.media[0].url,v=l.refSlide.media[0].previewUrl,S=g.findIndex(y.default.hasMainView(f,v)),g=g[S];if(h.default.debug("".concat(this.constructor.name,": Main view layer resides in layer number ").concat(S)),g!==void 0)return h.default.debug("".concat(this.constructor.name,": Searching the main-view component")),f=g.Components.findIndex(y.default.isMainViewComp(f,v)),(v=g.Components[f])?[v,f,g,S]:(h.default.debug("".concat(this.constructor.name,": Main-view component didn't found, slidUrl ").concat(l)),void g.Components.forEac
732h(function(C,I){return h.default.debug("comp ".concat(I," main url: ").concat((0,p.isMediaSource)(C)?C.MediaURL():""));}));}}}},{key:"searchRenderInfoByTime",value:function(g){h.default.debug("".concat(this.constructor.name," searchRenderInfoByTime has began"));var f=this.previewer.Slides.map(function(v){return[v.StartTime,v.EndTime];});h.default.debug("".concat(this.constructor.name," found intervals ").concat(JSON.stringify(f)));var f=o(h.default.intervalBinarySearch(f,g),2),g=f[0],f=(f[1],h.default.debug("".concat(this.constructor.name," sIndex found: ").concat(g)),this.findMainViewComp(g));if(f)return f=(g=o(f,4))[0],g[1],g[2],g[3],d.generateRenderInfo(f);}}])&&x(m.prototype,a),s&&x(m,s),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,a,s;}();r.default=c;},function(i,r,s){"use strict";function t(l){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g;}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g;})(l);}function n(){n=function(){return g;};var l,g={},f=Object.prototype,v=f.hasOwnProperty,S=Object.defineProperty||function(Y,j,D){Y[j]=D.value;},Z=typeof Symbol=="function"?Symbol:{},w=Z.iterator||"@@iterator",C=Z.asyncIterator||"@@asyncIterator",I=Z.toStringTag||"@@toStringTag";function O(Y,j,D){return Object.defineProperty(Y,j,{value:D,enumerable:!0,configurable:!0,writable:!0}),Y[j];}try{O({},"");}catch{O=function(j,D,$){return j[D]=$;};}function M(Y,ge,D,he){var ne,le,se,fe,ge=ge&&ge.prototype instanceof K?ge:K,ge=Object.create(ge.prototype),he=new F(he||[]);return S(ge,"_invoke",{value:(ne=Y,le=D,se=he,fe=G,function(_e,Re){if(fe===B)throw Error("Generator is already running");if(fe===z){if(_e==="throw")throw Re;return{value:l,done:!0};}for(se.method=_e,se.arg=Re;;){var ee=se.delegate;if(ee&&(ee=function W(ae,de){var ye=de.method,Se=ae.iterator[ye];return Se===l?(de.delegate=null,ye==="throw"&&ae.iterator.return&&(de.method="return",de.arg=l,W(ae,de),de.method==="throw")||ye!=="return"&&(de.method="throw",de.arg=new TypeError("The iterator does not provide a '"+ye+"' method")),te):(ye=N(Se,ae.iterator,de.arg),ye.type==="throw"?(de.method="throw",de.arg=ye.arg,de.delegate=null,te):(Se=ye.arg,Se?Se.done?(de[ae.resultName]=Se.value,de.next=ae.nextLoc,de.method!=="return"&&(de.method="next",de.arg=l),de.delegate=null,te):Se:(de.method="throw",de.arg=new TypeError("iterator result is not an object"),de.delegate=null,te)));}(ee,se),ee)){if(ee===te)continue;return ee;}if(se.method==="next")se.sent=se._sent=se.arg;else if(se.method==="throw"){if(fe===G)throw fe=z,se.arg;se.dispatchException(se.arg);}else se.method==="return"&&se.abrupt("return",se.arg);if(fe=B,ee=N(ne,le,se),ee.type==="normal"){if(fe=se.done?z:H,ee.arg===te)continue;return{value:ee.arg,done:se.done};}ee.type==="throw"&&(fe=z,se.method="throw",se.arg=ee.arg);}})}),ge;}function N(Y,j,D){try{return{type:"normal",arg:Y.call(j,D)};}catch($){return{type:"throw",arg:$};}}g.wrap=M;var G="suspendedStart",H="suspendedYield",B="executing",z="completed",te={};function K(){}function V(){}function U(){}var Z={},re=(O(Z,w,function(){return this;}),Object.getPrototypeOf),re=re&&re(re(X([]))),ue=(re&&re!==f&&v.call(re,w)&&(Z=re),U.prototype=K.prototype=Object.create(Z));
732function q(Y){["next","throw","return"].forEach(function(j){O(Y,j,function(D){return this._invoke(j,D);});});}function J(Y,j){var D;S(this,"_invoke",{value:function($,ne){function le(){return new j(function(se,fe){(function ge(ae,_e,Re,ee){var W,ae=N(Y[ae],Y,_e);if(ae.type!=="throw")return(_e=(W=ae.arg).value)&&t(_e)=="object"&&v.call(_e,"__await")?j.resolve(_e.__await).then(function(de){ge("next",de,Re,ee);},function(de){ge("throw",de,Re,ee);}):j.resolve(_e).then(function(de){W.value=de,Re(W);},function(de){return ge("throw",de,Re,ee);});ee(ae.arg);})($,ne,se,fe);});}return D=D?D.then(le,le):le();}});}function oe(Y){var j={tryLoc:Y[0]};1 in Y&&(j.catchLoc=Y[1]),2 in Y&&(j.finallyLoc=Y[2],j.afterLoc=Y[3]),this.tryEntries.push(j);}function Q(Y){var j=Y.completion||{};j.type="normal",delete j.arg,Y.completion=j;}function F(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(oe,this),this.reset(!0);}function X(Y){if(Y||Y===""){var j,D=Y[w];if(D)return D.call(Y);if(typeof Y.next=="function")return Y;if(!isNaN(Y.length))return j=-1,(D=function $(){for(;++j<Y.length;)if(v.call(Y,j))return $.value=Y[j],$.done=!1,$;return $.value=l,$.done=!0,$;}).next=D;}throw new TypeError(t(Y)+" is not iterable");}return S(ue,"constructor",{value:V.prototype=U,configurable:!0}),S(U,"constructor",{value:V,configurable:!0}),V.displayName=O(U,I,"GeneratorFunction"),g.isGeneratorFunction=function(Y){return Y=typeof Y=="function"&&Y.constructor,!!Y&&(Y===V||(Y.displayName||Y.name)==="GeneratorFunction");},g.mark=function(Y){return Object.setPrototypeOf?Object.setPrototypeOf(Y,U):(Y.__proto__=U,O(Y,I,"GeneratorFunction")),Y.prototype=Object.create(ue),Y;},g.awrap=function(Y){return{__await:Y};},q(J.prototype),O(J.prototype,C,function(){return this;}),g.AsyncIterator=J,g.async=function(Y,j,D,$,ne){ne===void 0&&(ne=Promise);var le=new J(M(Y,j,D,$),ne);return g.isGeneratorFunction(j)?le:le.next().then(function(se){return se.done?se.value:le.next();});},q(ue),O(ue,I,"Generator"),O(ue,w,function(){return this;}),O(ue,"toString",function(){return"[object Generator]";}),g.keys=function(Y){var j,D=Object(Y),$=[];for(j in D)$.push(j);return $.reverse(),function ne(){for(;$.length;){var le=$.pop();if(le in D)return ne.value=le,ne.done=!1,ne;}return ne.done=!0,ne;};},g.values=X,F.prototype={constructor:F,reset:function(Y){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Q),!Y)for(var j in this)j.charAt(0)==="t"&&v.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=l);},stop:function(){this.done=!0;var Y=this.tryEntries[0].completion;if(Y.type==="throw")throw Y.arg;return this.rval;},dispatchException:function(Y){if(this.done)throw Y;var j=this;function D(ge,he){return le.type="throw",le.arg=Y,j.next=ge,he&&(j.method="next",j.arg=l),!!he;}for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$],le=ne.completion;if(ne.tryLoc==="root")return D("end");if(ne.tryLoc<=this.prev){var se=v.call(ne,"catchLoc"),fe=v.call(ne,"finallyLoc");if(se&&fe){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}else if(se){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);}else{if(!fe)throw Error("try statement without catch or finally");if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}}}},abrupt:function(Y,j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.tryLoc<=this.prev&&v.call($,"finallyLoc")&&this.prev<$.finallyLoc){var ne=$;break;}}var le=(ne=ne&&(Y==="break"||Y==="continue")&&ne.tryLoc<=j&&j<=ne.finallyLoc?null:ne)?ne.completion:{};return le.type=Y,le.arg=j,ne?(this.method="next",this.next=ne.finallyLoc,te):this.complete(le);},complete:function(Y,j){if(Y.type==="throw")throw Y.arg;return Y.type==="break"||Y.type==="continue"?this.next=Y.arg:Y.type==="return"?(this.rval=this.arg=Y.arg,this.method="return",this.next="end"):Y.type==="normal"&&j&&(this.next=j),te;},finish:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j];if(D.finallyLoc===Y)return this.complete(D.completion,D.afterLoc),Q(D),te;}},catch:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D,$,ne=this.tryEntries[j];if(ne.tryLoc===Y)return(D=ne.completion).type==="throw"&&($=D.arg,Q(ne)),$;}throw Error("illegal catch attempt");},delegateYield:function(Y,j,D){return this.delegate={iterator:X(Y),resultName:j,nextLoc:D},this.method==="next"&&(this.arg=l),te;}},g;}function o(l,g){var f,v=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!v){if(Array.isArray(l)||(v=function(I,O){if(I){if(typeof I=="str
732ing")return _(I,O);var M={}.toString.call(I).slice(8,-1);return(M=M==="Object"&&I.constructor?I.constructor.name:M)==="Map"||M==="Set"?Array.from(I):M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?_(I,O):void 0;}}(l))||g&&l&&typeof l.length=="number")return v&&(l=v),f=0,{s:g=function(){},n:function(){return f>=l.length?{done:!0}:{done:!1,value:l[f++]};},e:function(I){throw I;},f:g};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 733In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var S,w=!0,C=!1;return{s:function(){v=v.call(l);},n:function(){var I=v.next();return w=I.done,I;},e:function(I){C=!0,S=I;},f:function(){try{w||v.return==null||v.return();}finally{if(C)throw S;}}};}function _(l,g){(g==null||g>l.length)&&(g=l.length);for(var f=0,v=Array(g);f<g;f++)v[f]=l[f];return v;}function E(l,g){for(var f=0;f<g.length;f++){var v=g[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,function(S){return S=function(w,C){if(t(w)!="object"||!w)return w;var I=w[Symbol.toPrimitive];if(I===void 0)return(C==="string"?String:Number)(w);if(I=I.call(w,C||"default"),t(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.");}(S,"string"),t(S)=="symbol"?S:S+"";}(v.key),v);}}var x=this&&this.__awaiter||function(l,g,f,v){return new(f=f||Promise)(function(S,w){function C(M){try{O(v.next(M));}catch(N){w(N);}}function I(M){try{O(v.throw(M));}catch(N){w(N);}}function O(M){var N;M.done?S(M.value):((N=M.value)instanceof f?N:new f(function(G){G(N);})).then(C,I);}O((v=v.apply(l,g||[])).next());});},h=(Object.defineProperty(r,"__esModule",{value:!0}),r.VDMCorePreviewer=r.VDM_PREVIEWER_EVENT_LISTENERS=void 0,s(277)),y=s(278),b=s(351),p=s(5),c=s(280),d=s(74),m=(Object.defineProperty(r,"VDM_PREVIEWER_EVENT_LISTENERS",{enumerable:!0,get:function(){return d.VDM_PREVIEWER_EVENT_LISTENERS;}}),s(72)),a=s(106),s=function(){function l(S){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this._containerId=S,this._slides=[],this._vdmHolder=new b.default(S),this._blobURLRegistry=a.default.getInstance(S),this._stash=void 0,this._story=void 0,this._slidesBeforeRender=void 0,this._previewerEvents=d.VDMPreviewerEvents.getInstance(S);}return g=l,(f=[{key:"containerId",get:function(){return this._containerId;}},{key:"setContainerClassName",value:function(S){this.vdmHolder.setClassName(S);}},{key:"clear",value:function(){var S,w=o(this._slides);try{for(w.s();!(S=w.n()).done;)S.value.clear();}catch(C){w.e(C);}finally{w.f();}this._vdmHolder&&this._vdmHolder.clear(),this._blobURLRegistry&&this._blobURLRegistry.revokeAll(),m.MediaPipeSegmenterProvider.getInstance().clearCanvasPool(),this._slides=[];}},{key:"setStory",value:function(S){var w=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};this._story===void 0||w.disableReconcile?this._manageSetStory(S,w):this._setStash(S,w);}},{key:"_setStash",value:function(S,w){w.mediaId=w.mediaId||this.generateMediaId(),w.containerId=this._containerId,w.debug=!!w.debug,p.default.useDebug=w.debug;var C=new y.default(S,w),I=this._createSlides(S,w);this._stash={preBuildStory:S,stashedStory:C,slides:I,options:w};}},{key:"_manageSetStory",value:function(S){var w=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};this.clear(),w.mediaId=w.mediaId||this.generateMediaId(),w.containerId=this._containerId,w.debug=!!w.debug,p.default.useDebug=w.debug;try{this._setStory(S,w),this._options=w;}catch(C){return this.clear(),console.error("Could not build story: ".concat(C.message,", stack: ").concat(C.stack)),!1;}}}
733,{key:"_setStory",value:function(S,w){if(this._story=new y.default(S,w),!S)throw new Error("Cannot create story - error in story object");this._slides=this._createSlides(S,w),this._slidesBeforeRender=p.default.cloneDeep(this._slides);}},{key:"_createSlides",value:function(S,w,C){for(var I=[],O=S.global.width,M=S.global.height,N=0;N<S.slides.length;N++){var G=S.slides[N],G=(w.mediaId=this.generateMediaId(),new h.default(G,N,O,M,w));if(!G)throw new Error("".concat(this.constructor.name,": Cannot create story - error in one or more slides"));I.push(G);}return I;}},{key:"mutateStateWithStash",value:function(S){this.story=S.stashedStory,this.slides=S.slides,this._options=S.options,this.slidesBeforeRender=this._createSlides(S.preBuildStory,this._options,this.story);}},{key:"createReconciler",value:function(){return new c.default(this);}},{key:"reRenderStory",value:function(S){return x(this,void 0,void 0,n().mark(function w(){return n().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,S.render(this.vdmHolder.element(),!0);case 2:case"end":return C.stop();}},w,this);}));}},{key:"rebuild",value:function(){return x(this,void 0,void 0,n().mark(function S(){var w,C,I;return n().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return w=performance.now(),this._blobURLRegistry&&(this._blobURLRegistry.resetRefCounts(),this.reserveImageKeysFromStory(this.stash.preBuildStory)),O.prev=2,C=this.stash,I=C.stashedStory,p.default.debug("Start story render...."),O.next=8,this.reRenderStory(I);case 8:return p.default.debug("Finished story render, starting reconcile"),I=this.createReconciler(),O.next=12,I.reconcile(C);case 12:this.mutateStateWithStash(C),this._blobURLRegistry&&this._blobURLRegistry.sweepUnreferenced(),O.next=20;break;case 16:throw O.prev=16,O.t0=O.catch(2),p.default.error("Exception inside rebuild: ".concat(O.t0)),new Error("Reconcile failed");case 20:return O.prev=20,p.default.debug("Reconcile Time:".concat(.001*(performance.now()-w),"(seconds)")),O.finish(20);case 23:case"end":return O.stop();}},S,this,[[2,16,20,23]]);}));}},{key:"reserveImageKeysFromStory",value:function(S){var w,C=this,I=function(z){var te,K;if(z.type==="image"&&(te=(te=z.src)==null?void 0:te.url,K=(K=z.attributes)==null?void 0:K.svgVariables,te&&te!==""&&(K=0<K?.length?"".concat(te,"::svg::").concat(JSON.stringify(K)):String(te),C._blobURLRegistry.reserve(K))),0<((te=z.components)==null?void 0:te.length)){var V,U=o(z.components);try{for(U.s();!(V=U.n()).done;){var Z=V.value;I(Z);}}catch(re){U.e(re);}finally{U.f();}}},O=o(S.slides);try{for(O.s();!(w=O.n()).done;){var M,N=o(w.value.toVDMObject());try{for(N.s();!(M=N.n()).done;){var G,H=o(M.value.components);try{for(H.s();!(G=H.n()).done;){var B=G.value;I(B);}}catch(z){H.e(z);}finally{H.f();}}}catch(z){N.e(z);}finally{N.f();}}}catch(z){O.e(z);}finally{O.f();}}},{key:"_build",value:function(){return x(this,void 0,void 0,n().mark(function S(){var w,C,I;return n().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return w=performance.now(),O.next=3,this.story.render(this.vdmHolder.element());case 3:C=o(this.slides),O.prev=4,C.s();case 6:if((I=C.n()).done){O.next=12;break;}return I=I.value,O.next=10,I.render(this.story.element());case 10:O.next=6;break;case 12:O.next=17;break;case 14:O.prev=14,O.t0=O.catch(4),C.e(O.t0);case 17:return O.prev=17,C.f(),O.finish(17);case 20:p.default.debug("Total time taken to build and render (seconds) : ".concat(.001*(performance.now()-w)));case 21:case"end":return O.stop();}},S,this,[[4,14,17,20]]);}));}},{key:"build",value:function(){return x(this,void 0,void 0,n().mark(function S(){return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(m.MediaPipeSegmenterProvider.getInstance().clearCanvasPool(),this.stash)return w.prev=2,w.next=5,this.rebuild();w.next=17;break;case 5:w.next=15;break;case 7:return w.prev=7,w.t0=w.catch(2),p.default.debug("Error occurred while reconciling, rebuilding everything"),this._blobURLRegistry&&this._blobURLRegistry.revokeAll(),this.vdmHolder.renewContainer(),this._manageSetStory(this._stash.preBuildStory,this._stash.options),w.next=15,this._build();case 15:w.next=19;break;case 17:return w.next=19,this._build();case 19:return w.abrupt("return",this);case 20:case"end":return w.stop();}},S,this,[[2,7]]);}));}},{key:"generateMediaId",value:function(){return l.MEDIAID_PREFIX_+p.default.randomStr(7);}}
733,{key:"vdmHolder",get:function(){return this._vdmHolder;},set:function(S){this._vdmHolder=S;}},{key:"story",get:function(){return this._story;},set:function(S){this._story=S;}},{key:"slidesBeforeRender",get:function(){return this._slidesBeforeRender;},set:function(S){this._slidesBeforeRender=S;}},{key:"slides",get:function(){return this._slides;},set:function(S){this._slides=S;}},{key:"options",get:function(){return this._options;}},{key:"stash",get:function(){return this._stash;},set:function(S){this._stash=S;}},{key:"addEventListener",value:function(S,w){this._previewerEvents.addEventListener(S,w);}},{key:"removeEventListener",value:function(S,w,C){this._previewerEvents.removeEventListener(S,w);}}])&&E(g.prototype,f),v&&E(g,v),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,f,v;}();(r.VDMCorePreviewer=s).VERSION="3.1.0",s.MEDIAID_PREFIX_="mid-";},function(i,r,E){"use strict";function t(x){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h;}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h;})(x);}function n(x,h){for(var y=0;y<h.length;y++){var b=h[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,function(p){return p=function(c,d){if(t(c)!="object"||!c)return c;var m=c[Symbol.toPrimitive];if(m===void 0)return(d==="string"?String:Number)(c);if(m=m.call(c,d||"default"),t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.");}(p,"string"),t(p)=="symbol"?p:p+"";}(b.key),b);}}Object.defineProperty(r,"__esModule",{value:!0});var o=E(5),_=E(264),E=function(){function x(p){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");this.containerId="vdm-container",p&&(this.containerId=p),this.canPluginInitialize_()&&(this._vdmContainer=document.getElementById(this.containerId),this._vdmContainer.style.lineHeight="normal",this._vdmSlidesDiv=document.createElement("div"),this._vdmSlidesDiv.className="vdm-slides",this._vdmContainer.appendChild(this._vdmSlidesDiv),this.addEmojiStyle(),this.bindTabFocusTovideo(),this.onLostVisibility=void 0);}return h=x,(y=[{key:"setClassName",value:function(p){this._vdmSlidesDiv.className=p;}},{key:"hideElement",value:function(){this._vdmSlidesDiv.setAttribute("hidden","true"),o.default.debug("Container is hidden");}},{key:"revealElement",value:function(){this._vdmSlidesDiv.removeAttribute("hidden"),o.default.debug("Container revealed");}},{key:"containerID",get:function(){return this.containerId;}},{key:"vdmSlidesDiv",get:function(){return this._vdmSlidesDiv;}},{key:"emojiStyle",get:function(){return this._emojiStyle;}},{key:"vdmContainer",get:function(){return this._vdmContainer;}},{key:"canPluginInitialize_",value:function(){return _.default===void 0||_.default===void 0?(console.error("Could not initialize vdm plugin, missing twemoji library"),!1):t(document.getElementById(this.containerId))===void 0||document.getElementById(this.containerId)===void 0?(console.error('Could not initialize vdm plugin, missing "vdm-container" HTML div'),!1):(document.getElementById(this.containerId),!0);}},{key:"addEmojiStyle",value:function(){this._emojiStyle=document.createElement("style"),this._emojiStyle.appendChild(document.createTextNode(`img.emoji { 734 height: 1em; 735 width: 1em; 736 vertical-align: -0.1em; 737}`)),document.head.appendChild(this._emojiStyle);}},{key:"bindTabFocusTovideo",value:function(){var p=this,c=function(){if(!("hidden"in document))for(var d=0,m=["moz","ms","o","webkit"];d<m.length;d++){var a=m[d];if(a+"Hidden"in document)return a;}}(),c=(c=c)?c+"visibilitychange":"visibilitychange";document.addEventListener(c,function(){p.onLostVisibility&&p.onLostVisibility();},!1);}},{key:"renewContainer",value:function(){var p=document.createElement("div");p.className="vdm-slides",this._vdmContainer.replaceChild(p,this._vdmSlidesDiv),this._vdmSlidesDiv=p;}},{key:"clearAudioPlayers",value:function(){var p=this._vdmContainer.getElementsByClassName("vdm-slides")[0];this._vdmSlidesDiv=p.cloneNode(!1),this._vdmSlidesDiv.appendChild(p.getElementsByClassName("vdm-story")[0]),this._vdmContainer.removeChild(p),this._vdmContainer.appendChild(this._vdmSlidesDiv);}},{key:"element",value:function(){return this._vdmSlidesDiv;}},{key:"clear",value:function(){this._vdmSlidesDiv&&(this._vdmSlidesDiv.innerHTML="",this._vdmSlidesDiv.removeAttribute("style"));}}])&&n(h.prototype,y),b&&n(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h;var h,y,b;}();r.default=E;},function(i,r,e){"use strict";
737Object.defineProperty(r,"__esModule",{value:!0}),r.deepDifferMapper=void 0,r.deepDifferMapper={VALUE_CREATED:"created",VALUE_UPDATED:"updated",VALUE_DELETED:"deleted",VALUE_UNCHANGED:"unchanged",mapWorker:function(t,n,o){var _={val:!1};if(this.isFunction(t)||this.isFunction(n))throw"Invalid argument. Function given, object expected.";if(this.isValue(t)||this.isValue(n))return{type:this.compareValues(t,n,_,o),data:t===void 0?n:t};var E,x,h,y={};for(E in t)this.isFunction(t[E])||((x=void 0)!==n[E]&&(x=n[E]),y[E]=this.mapWorker(t[E],x,_),y[E]&&y[E].status&&!_.val&&(y.status=y[E].status,_.val=y[E].status));for(h in n)this.isFunction(n[h])||y[h]!==void 0||(y[h]=this.mapWorker(void 0,n[h],_));return y.status=_.val,y;},map:function(_,n){var o={val:!1},_=this.mapWorker(_,n,o);return _.hasOwnProperty("status")||(_.status=o.val),_;},compareValues:function(t,n,o,_){return t=t===n||this.isDate(t)&&this.isDate(n)&&t.getTime()===n.getTime()?this.VALUE_UNCHANGED:t===void 0?this.VALUE_CREATED:n===void 0?this.VALUE_DELETED:this.VALUE_UPDATED,t!==this.VALUE_CREATED&&t!==this.VALUE_DELETED&&t!==this.VALUE_UPDATED||(o.val=!0),o.val&&!_.val&&(_.val=!0),t;},isFunction:function(t){return Object.prototype.toString.call(t)==="[object Function]";},isArray:function(t){return Object.prototype.toString.call(t)==="[object Array]";},isDate:function(t){return Object.prototype.toString.call(t)==="[object Date]";},isObject:function(t){return Object.prototype.toString.call(t)==="[object Object]";},isValue:function(t){return!this.isObject(t)&&!this.isArray(t);}};},function(i,r,s){"use strict";function t(l){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g;}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g;})(l);}function n(l,g){return function(f){if(Array.isArray(f))return f;}(l)||function(f,v){var S=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(S!=null){var w,C,I,O,M=[],N=!0,G=!1;try{if(I=(S=S.call(f)).next,v===0){if(Object(S)!==S)return;N=!1;}else for(;!(N=(w=I.call(S)).done)&&(M.push(w.value),M.length!==v);N=!0);}catch(H){G=!0,C=H;}finally{try{if(!N&&S.return!=null&&(O=S.return(),Object(O)!==O))return;}finally{if(G)throw C;}}return M;}}(l,g)||function(f,v){if(f){if(typeof f=="string")return o(f,v);var S={}.toString.call(f).slice(8,-1);return(S=S==="Object"&&f.constructor?f.constructor.name:S)==="Map"||S==="Set"?Array.from(f):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?o(f,v):void 0;}}(l,g)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 738In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(l,g){(g==null||g>l.length)&&(g=l.length);for(var f=0,v=Array(g);f<g;f++)v[f]=l[f];return v;}function _(){_=function(){return g;};var l,g={},f=Object.prototype,v=f.hasOwnProperty,S=Object.defineProperty||function(Y,j,D){Y[j]=D.value;},Z=typeof Symbol=="function"?Symbol:{},w=Z.iterator||"@@iterator",C=Z.asyncIterator||"@@asyncIterator",I=Z.toStringTag||"@@toStringTag";function O(Y,j,D){return Object.defineProperty(Y,j,{value:D,enumerable:!0,configurable:!0,writable:!0}),Y[j];}try{O({},"");}catch{O=function(j,D,$){return j[D]=$;};}function M(Y,ge,D,he){var ne,le,se,fe,ge=ge&&ge.prototype instanceof K?ge:K,ge=Object.create(ge.prototype),he=new F(he||[]);return S(ge,"_invoke",{value:(ne=Y,le=D,se=he,fe=G,function(_e,Re){if(fe===B)throw Error("Generator is already running");if(fe===z){if(_e==="throw")throw Re;return{value:l,done:!0};}for(se.method=_e,se.arg=Re;;){var ee=se.delegate;if(ee&&(ee=function W(ae,de){var ye=de.method,Se=ae.iterator[ye];return Se===l?(de.delegate=null,ye==="throw"&&ae.iterator.return&&(de.method="return",de.arg=l,W(ae,de),de.method==="throw")||ye!=="return"&&(de.method="throw",de.arg=new TypeError("The iterator does not provide a '"+ye+"' method")),te):(ye=N(Se,ae.iterator,de.arg),ye.type==="throw"?(de.method="throw",de.arg=ye.arg,de.delegate=null,te):(Se=ye.arg,Se?Se.done?(de[ae.resultName]=Se.value,de.next=ae.nextLoc,de.method!=="return"&&(de.method="next",de.arg=l),de.delegate=null,te):Se:(de.method="throw",de.arg=new TypeError("iterator result is not an object"),de.delegate=null,te)));}(ee,se),ee)){if(ee===te)continue;return ee;}if(se.method==="next")se.sent=se._sent=se.arg;else if(se.method==="throw"){if(fe===G)throw fe=z,se.arg;se.dispatchException(se.arg);}else se.method==="return"&&se.abrupt("return",se.arg);
738if(fe=B,ee=N(ne,le,se),ee.type==="normal"){if(fe=se.done?z:H,ee.arg===te)continue;return{value:ee.arg,done:se.done};}ee.type==="throw"&&(fe=z,se.method="throw",se.arg=ee.arg);}})}),ge;}function N(Y,j,D){try{return{type:"normal",arg:Y.call(j,D)};}catch($){return{type:"throw",arg:$};}}g.wrap=M;var G="suspendedStart",H="suspendedYield",B="executing",z="completed",te={};function K(){}function V(){}function U(){}var Z={},re=(O(Z,w,function(){return this;}),Object.getPrototypeOf),re=re&&re(re(X([]))),ue=(re&&re!==f&&v.call(re,w)&&(Z=re),U.prototype=K.prototype=Object.create(Z));function q(Y){["next","throw","return"].forEach(function(j){O(Y,j,function(D){return this._invoke(j,D);});});}function J(Y,j){var D;S(this,"_invoke",{value:function($,ne){function le(){return new j(function(se,fe){(function ge(ae,_e,Re,ee){var W,ae=N(Y[ae],Y,_e);if(ae.type!=="throw")return(_e=(W=ae.arg).value)&&t(_e)=="object"&&v.call(_e,"__await")?j.resolve(_e.__await).then(function(de){ge("next",de,Re,ee);},function(de){ge("throw",de,Re,ee);}):j.resolve(_e).then(function(de){W.value=de,Re(W);},function(de){return ge("throw",de,Re,ee);});ee(ae.arg);})($,ne,se,fe);});}return D=D?D.then(le,le):le();}});}function oe(Y){var j={tryLoc:Y[0]};1 in Y&&(j.catchLoc=Y[1]),2 in Y&&(j.finallyLoc=Y[2],j.afterLoc=Y[3]),this.tryEntries.push(j);}function Q(Y){var j=Y.completion||{};j.type="normal",delete j.arg,Y.completion=j;}function F(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(oe,this),this.reset(!0);}function X(Y){if(Y||Y===""){var j,D=Y[w];if(D)return D.call(Y);if(typeof Y.next=="function")return Y;if(!isNaN(Y.length))return j=-1,(D=function $(){for(;++j<Y.length;)if(v.call(Y,j))return $.value=Y[j],$.done=!1,$;return $.value=l,$.done=!0,$;}).next=D;}throw new TypeError(t(Y)+" is not iterable");}return S(ue,"constructor",{value:V.prototype=U,configurable:!0}),S(U,"constructor",{value:V,configurable:!0}),V.displayName=O(U,I,"GeneratorFunction"),g.isGeneratorFunction=function(Y){return Y=typeof Y=="function"&&Y.constructor,!!Y&&(Y===V||(Y.displayName||Y.name)==="GeneratorFunction");},g.mark=function(Y){return Object.setPrototypeOf?Object.setPrototypeOf(Y,U):(Y.__proto__=U,O(Y,I,"GeneratorFunction")),Y.prototype=Object.create(ue),Y;},g.awrap=function(Y){return{__await:Y};},q(J.prototype),O(J.prototype,C,function(){return this;}),g.AsyncIterator=J,g.async=function(Y,j,D,$,ne){ne===void 0&&(ne=Promise);var le=new J(M(Y,j,D,$),ne);return g.isGeneratorFunction(j)?le:le.next().then(function(se){return se.done?se.value:le.next();});},q(ue),O(ue,I,"Generator"),O(ue,w,function(){return this;}),O(ue,"toString",function(){return"[object Generator]";}),g.keys=function(Y){var j,D=Object(Y),$=[];for(j in D)$.push(j);return $.reverse(),function ne(){for(;$.length;){var le=$.pop();if(le in D)return ne.value=le,ne.done=!1,ne;}return ne.done=!0,ne;};},g.values=X,F.prototype={constructor:F,reset:function(Y){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Q),!Y)for(var j in this)j.charAt(0)==="t"&&v.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=l);},stop:function(){this.done=!0;var Y=this.tryEntries[0].completion;if(Y.type==="throw")throw Y.arg;return this.rval;},dispatchException:function(Y){if(this.done)throw Y;var j=this;function D(ge,he){return le.type="throw",le.arg=Y,j.next=ge,he&&(j.method="next",j.arg=l),!!he;}for(var $=this.tryEntries.length-1;0<=$;--$){var ne=this.tryEntries[$],le=ne.completion;if(ne.tryLoc==="root")return D("end");if(ne.tryLoc<=this.prev){var se=v.call(ne,"catchLoc"),fe=v.call(ne,"finallyLoc");if(se&&fe){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}else if(se){if(this.prev<ne.catchLoc)return D(ne.catchLoc,!0);}else{if(!fe)throw Error("try statement without catch or finally");if(this.prev<ne.finallyLoc)return D(ne.finallyLoc);}}}},abrupt:function(Y,j){for(var D=this.tryEntries.length-1;0<=D;--D){var $=this.tryEntries[D];if($.tryLoc<=this.prev&&v.call($,"finallyLoc")&&this.prev<$.finallyLoc){var ne=$;break;}}var le=(ne=ne&&(Y==="break"||Y==="continue")&&ne.tryLoc<=j&&j<=ne.finallyLoc?null:ne)?ne.completion:{};return le.type=Y,le.arg=j,ne?(this.method="next",this.next=ne.finallyLoc,te):this.complete(le);},complete:function(Y,j){if(Y.type==="throw")throw Y.arg;return Y.type==="break"||Y.type==="continue"?this.next=Y.arg:Y.type==="return"?(this.rval=this.arg=Y.arg,this.method="return",this.next="end"):Y.type==="normal"&&j&&(this.next=j),te;},finish:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D=this.tryEntries[j];if(D.finallyLoc===Y)return this.complete(D.completion,D.afterLoc),Q(D),te;}},catch:function(Y){for(var j=this.tryEntries.length-1;0<=j;--j){var D,$,ne=this.tryEntries[j];if(ne.tryLoc===Y)return(D=ne.completion).type==="throw"&&($=D.arg,Q(ne)),$;}throw Error("illegal catch attempt");},delegateYield:function(Y,j,D){return this.delegate={iterator:X(Y),resultName:j,nextLoc:D},this.method==="next"&&(this.arg=l),te;}},g;}function E(l,g){for(var f=0;f<g.length;f++){var v=g[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,function(S){return S=function(w,C){if(t(w)!="object"||!w)return w;var I=w[Symbol.toPrimitive];if(I===void 0)return(C==="string"?String:Number)(w);if(I=I.call(w,C||"default"),t(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.");}(S,"string"),t(S)=="symbol"?S:S+"";}(v.key),v);}}function x(l,S,f){S=p(S);var v=l,S=h()?Reflect.construct(S,f||[],p(l).constructor):S.apply(l,f);if(S&&(t(S)=="object"||typeof S=="function"))return S;if(S!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(l=v,l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l;}function h(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(h=function(){return!!l;})();}function y(l,g,f,v){var S=b(p(1&v?l.prototype:l),g,f);return 2&v?function(w){return S.apply(f,w);}:S;}function b(){return(b=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,g,f){var v=function(S,w){for(;!{}.hasOwnProperty.call(S,w)&&(S=p(S))!==null;);return S;}(l,g);if(v)return(v=Object.getOwnPropertyDescriptor(v,g)).get?v.get.call(arguments.length<3?l:f):v.value;}).apply(null,arguments);}
738function p(l){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g);})(l);}function c(l,g){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,v){return f.__proto__=v,f;})(l,g);}var d=this&&this.__awaiter||function(l,g,f,v){return new(f=f||Promise)(function(S,w){function C(M){try{O(v.next(M));}catch(N){w(N);}}function I(M){try{O(v.throw(M));}catch(N){w(N);}}function O(M){var N;M.done?S(M.value):((N=M.value)instanceof f?N:new f(function(G){G(N);})).then(C,I);}O((v=v.apply(l,g||[])).next());});},m=(Object.defineProperty(r,"__esModule",{value:!0}),s(280)),a=s(5),s=function(l){function g(S){var w;if(this instanceof g)return(w=x(this,g,[S])).applySlideTimeline=function(C,I){C.renderVideo(I);},w.rebuildAudioTimeline=function(C,I){return d(w,void 0,void 0,_().mark(function O(){var M,N,G,H;return _().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(M=this.previewer,(H=C.options)&&H.isUsedByCollections)return B.abrupt("return");B.next=6;break;case 6:if(!(C&&C.preBuildStory&&C.preBuildStory.audios)){B.next=19;break;}if(N=void 0,M.storyAudios)return G=M.storyAudios,B.next=12,G.closeContext();B.next=13;break;case 12:N=G.audioResources;case 13:if(C.audios=M.generateStoryAudios(C.preBuildStory,C.options,N),C.audios)return B.next=17,C.audios.render(I.audioTimeline);B.next=17;break;case 17:B.next=22;break;case 19:throw H="Couldn't rebuild audio timeline!",a.default.debug(H),new Error(H);case 22:case"end":return B.stop();}},O,this);}));},w;throw new TypeError("Cannot call a class as a function");}var f,v=g;if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");return v.prototype=Object.create(l&&l.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),l&&c(v,l),v=g,(l=[{key:"reconcile",value:function(S){var w=this,C=Object.create(null,{reconcile:{get:function(){return y(g,"reconcile",w,1);}}});return d(this,void 0,void 0,_().mark(function I(){var O,M;return _().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(S.options.slidingWindow)return O=a.default.slideIndexFromTime(this.previewer.currentTimeBeforeRebuild,S.slides),O=O<=S.options.slidingWindow/2?0:O-Math.floor(S.options.slidingWindow/2),M=O+S.options.slidingWindow,N.next=6,C.reconcile.call(this,S,O,M);N.next=8;break;case 6:N.next=10;break;case 8:return N.next=10,C.reconcile.call(this,S);case 10:return N.next=12,this.rebuildAudioTimeline(S,this.previewer.timelinePlayer);case 12:case"end":return N.stop();}},I,this);}));}},{key:"handleEqualSlide",value:function(S,w,C){var I=this,O=Object.create(null,{handleEqualSlide:{get:function(){return y(g,"handleEqualSlide",I,1);}}});return d(this,void 0,void 0,_().mark(function M(){var N,G;return _().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,O.handleEqualSlide.call(this,S,w,C);case 2:return G=H.sent,G=n(G,2),N=G[0],G=G[1],this.applySlideTimeline(S,this.previewer.timelinePlayer.videoTimeline),H.abrupt("return",[N,G]);case 8:case"end":return H.stop();}},M,this);}));}},{key:"handleNotEqualSlide",value:function(S,w){var C=this,I=Object.create(null,{handleNotEqualSlide:{get:function(){return y(g,"handleNotEqualSlide",C,1);}}});return d(this,void 0,void 0,_().mark(function O(){var M;return _().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return w.preReconstructWithRecycle(),N.next=3,I.handleNotEqualSlide.call(this,S,w);case 3:return M=N.sent,this.applySlideTimeline(w,this.previewer.timelinePlayer.videoTimeline),N.abrupt("return",M);case 6:case"end":return N.stop();}},O,this);}));}}])&&E(v.prototype,l),f&&E(v,f),Object.defineProperty(v,"prototype",{writable:!1}),v;}(m.default);r.default=s;},function(i,r,e){"use strict";function t(y){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b;}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b;})(y);}function n(y,b){return function(p){if(Array.isArray(p))return p;}(y)||function(p,c){var d=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(d!=null){var m,a,s,l,g=[],f=!0,v=!1;try{if(s=(d=d.call(p)).next,c===0){if(Object(d)!==d)return;f=!1;}else for(;
738!(f=(m=s.call(d)).done)&&(g.push(m.value),g.length!==c);f=!0);}catch(S){v=!0,a=S;}finally{try{if(!f&&d.return!=null&&(l=d.return(),Object(l)!==l))return;}finally{if(v)throw a;}}return g;}}(y,b)||_(y,b)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 739In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(y,b){var p,c=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!c){if(Array.isArray(y)||(c=_(y))||b&&y&&typeof y.length=="number")return c&&(y=c),p=0,{s:b=function(){},n:function(){return p>=y.length?{done:!0}:{done:!1,value:y[p++]};},e:function(s){throw s;},f:b};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 740In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var d,m=!0,a=!1;return{s:function(){c=c.call(y);},n:function(){var s=c.next();return m=s.done,s;},e:function(s){a=!0,d=s;},f:function(){try{m||c.return==null||c.return();}finally{if(a)throw d;}}};}function _(y,b){if(y){if(typeof y=="string")return E(y,b);var p={}.toString.call(y).slice(8,-1);return(p=p==="Object"&&y.constructor?y.constructor.name:p)==="Map"||p==="Set"?Array.from(y):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?E(y,b):void 0;}}function E(y,b){(b==null||b>y.length)&&(b=y.length);for(var p=0,c=Array(b);p<b;p++)c[p]=y[p];return c;}function x(y,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,function(d){return d=function(m,a){if(t(m)!="object"||!m)return m;var s=m[Symbol.toPrimitive];if(s===void 0)return(a==="string"?String:Number)(m);if(s=s.call(m,a||"default"),t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.");}(d,"string"),t(d)=="symbol"?d:d+"";}(c.key),c);}}Object.defineProperty(r,"__esModule",{value:!0}),r.ListenerStorage=r.StorageType=void 0,(h=r.StorageType||(r.StorageType={}))[h.INTERACTION=0]="INTERACTION",h[h.QUALITYCHANGE=1]="QUALITYCHANGE";var h=function(){function y(){if(!(this instanceof y))throw new TypeError("Cannot call a class as a function");this.listenerStorage=new Map();}return b=y,c=[{key:"getInstance",value:function(){return this._instance||(this._instance=new this());}}],(p=[{key:"storeListener",value:function(d,m,a,s){this.listenerStorage.has(d)||this.listenerStorage.set(d,new Map()),d=this.listenerStorage.get(d),d.has(m)||d.set(m,new Map()),d=d.get(m),d.has(a)||d.set(a,[]),d.get(a).push(s);}},{key:"removeAllListeners",value:function(d){if(d=this.listenerStorage.get(d),d){var m,a=o(d.entries());try{var s=function(){var l,g=n(m.value,2),f=g[0],v=o(g[1].entries());try{for(v.s();!(l=v.n()).done;)(function(){var S=n(l.value,2),w=S[0];S[1].forEach(function(C){typeof f.removeEventListener=="function"&&f.removeEventListener(w,C);});})();}catch(S){v.e(S);}finally{v.f();}};for(a.s();!(m=a.n()).done;)s();}catch(l){a.e(l);}finally{a.f();}}return this;}},{key:"clear",value:function(d){return d=this.listenerStorage.get(d),d&&d.clear(),this;}}])&&x(b.prototype,p),c&&x(b,c),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,p,c;}();r.ListenerStorage=h;},,,,,,,,,,,,,,,,,,,,function(i,r,e){i.exports=e(375);},function(i,r,H){"use strict";function t(B){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z;}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z;})(B);}function n(B){return function(z){if(Array.isArray(z))return x(z);}(B)||function(z){if(typeof Symbol<"u"&&z[Symbol.iterator]!=null||z["@@iterator"]!=null)return Array.from(z);}(B)||E(B)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 741In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function o(B,z){return function(te){if(Array.isArray(te))return te;}(B)||function(te,K){var V=te==null?null:typeof Symbol<"u"&&te[Symbol.iterator]||te["@@iterator"];if(V!=null){var U,Z,re,ue,q=[],J=!0,oe=!1;try{if(re=(V=V.call(te)).next,K===0){if(Object(V)!==V)return;J=!1;}else for(;!(J=(U=re.call(V)).done)&&(q.push(U.value),q.length!==K);J=!0);}
741catch(Q){oe=!0,Z=Q;}finally{try{if(!J&&V.return!=null&&(ue=V.return(),Object(ue)!==ue))return;}finally{if(oe)throw Z;}}return q;}}(B,z)||E(B,z)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 742In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(B,z){var te,K=typeof Symbol<"u"&&B[Symbol.iterator]||B["@@iterator"];if(!K){if(Array.isArray(B)||(K=E(B))||z&&B&&typeof B.length=="number")return K&&(B=K),te=0,{s:z=function(){},n:function(){return te>=B.length?{done:!0}:{done:!1,value:B[te++]};},e:function(re){throw re;},f:z};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 743In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var V,U=!0,Z=!1;return{s:function(){K=K.call(B);},n:function(){var re=K.next();return U=re.done,re;},e:function(re){Z=!0,V=re;},f:function(){try{U||K.return==null||K.return();}finally{if(Z)throw V;}}};}function E(B,z){if(B){if(typeof B=="string")return x(B,z);var te={}.toString.call(B).slice(8,-1);return(te=te==="Object"&&B.constructor?B.constructor.name:te)==="Map"||te==="Set"?Array.from(B):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?x(B,z):void 0;}}function x(B,z){(z==null||z>B.length)&&(z=B.length);for(var te=0,K=Array(z);te<z;te++)K[te]=B[te];return K;}function h(){h=function(){return z;};var B,z={},te=Object.prototype,K=te.hasOwnProperty,V=Object.defineProperty||function(W,ae,de){W[ae]=de.value;},ne=typeof Symbol=="function"?Symbol:{},U=ne.iterator||"@@iterator",Z=ne.asyncIterator||"@@asyncIterator",re=ne.toStringTag||"@@toStringTag";function ue(W,ae,de){return Object.defineProperty(W,ae,{value:de,enumerable:!0,configurable:!0,writable:!0}),W[ae];}try{ue({},"");}catch{ue=function(ae,de,ye){return ae[de]=ye;};}function q(W,nt,de,it){var Se,De,Ue,Be,nt=nt&&nt.prototype instanceof j?nt:j,nt=Object.create(nt.prototype),it=new Re(it||[]);return V(nt,"_invoke",{value:(Se=W,De=de,Ue=it,Be=oe,function(ot,ht){if(Be===F)throw Error("Generator is already running");if(Be===X){if(ot==="throw")throw ht;return{value:B,done:!0};}for(Ue.method=ot,Ue.arg=ht;;){var Et=Ue.delegate;if(Et&&(Et=function At(Nt,Ut){var bi=Ut.method,Ge=Nt.iterator[bi];return Ge===B?(Ut.delegate=null,bi==="throw"&&Nt.iterator.return&&(Ut.method="return",Ut.arg=B,At(Nt,Ut),Ut.method==="throw")||bi!=="return"&&(Ut.method="throw",Ut.arg=new TypeError("The iterator does not provide a '"+bi+"' method")),Y):(bi=J(Ge,Nt.iterator,Ut.arg),bi.type==="throw"?(Ut.method="throw",Ut.arg=bi.arg,Ut.delegate=null,Y):(Ge=bi.arg,Ge?Ge.done?(Ut[Nt.resultName]=Ge.value,Ut.next=Nt.nextLoc,Ut.method!=="return"&&(Ut.method="next",Ut.arg=B),Ut.delegate=null,Y):Ge:(Ut.method="throw",Ut.arg=new TypeError("iterator result is not an object"),Ut.delegate=null,Y)));}(Et,Ue),Et)){if(Et===Y)continue;return Et;}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(Be===oe)throw Be=X,Ue.arg;Ue.dispatchException(Ue.arg);}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);if(Be=F,Et=J(Se,De,Ue),Et.type==="normal"){if(Be=Ue.done?X:Q,Et.arg===Y)continue;return{value:Et.arg,done:Ue.done};}Et.type==="throw"&&(Be=X,Ue.method="throw",Ue.arg=Et.arg);}})}),nt;}function J(W,ae,de){try{return{type:"normal",arg:W.call(ae,de)};}catch(ye){return{type:"throw",arg:ye};}}z.wrap=q;var oe="suspendedStart",Q="suspendedYield",F="executing",X="completed",Y={};function j(){}function D(){}function $(){}var ne={},le=(ue(ne,U,function(){return this;}),Object.getPrototypeOf),le=le&&le(le(ee([]))),se=(le&&le!==te&&K.call(le,U)&&(ne=le),$.prototype=j.prototype=Object.create(ne));function fe(W){["next","throw","return"].forEach(function(ae){ue(W,ae,function(de){return this._invoke(ae,de);});});}function ge(W,ae){var de;V(this,"_invoke",{value:function(ye,Se){function De(){return new ae(function(Ue,Be){(function nt(Nt,ot,ht,Et){var At,Nt=J(W[Nt],W,ot);if(Nt.type!=="throw")return(ot=(At=Nt.arg).value)&&t(ot)=="object"&&K.call(ot,"__await")?ae.resolve(ot.__await).then(function(Ut){nt("next",Ut,ht,Et);},function(Ut){nt("throw",Ut,ht,Et);}):ae.resolve(ot).then(function(Ut){At.value=Ut,ht(At);},function(Ut){return nt("throw",Ut,ht,Et);});Et(Nt.arg);})(ye,Se,Ue,Be);});}return de=de?de.then(De,De):De();}});}function he(W){var ae={tryLoc:W[0]};1 in W&&(ae.catchLoc=W[1]),2 in W&&(ae.finallyLoc=W[2],ae.afterLoc=W[3]),this.tryEntries.push(ae);}function _e(W){var ae=W.completion||{};ae.type="normal",delete ae.arg,W.completion=ae;}function Re(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(he,this),this.reset(!0);}function ee(W){if(W||W===""){var ae,de=W[U];if(de)return de.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length))return ae=-1,(de=function ye(){for(;++ae<W.length;)if(K.call(W,ae))return ye.value=W[ae],ye.done=!1,ye;return ye.value=B,ye.done=!0,ye;}).next=de;}throw new TypeError(t(W)+" is not iterable");}return V(se,"constructor",{value:D.prototype=$,configurable:!0}),V($,"constructor",{value:D,configurable:!0}),D.displayName=ue($,re,"GeneratorFunction"),z.isGeneratorFunction=function(W){return W=typeof W=="function"&&W.constructor,!!W&&(W===D||(W.displayName||W.n
743ame)==="GeneratorFunction");},z.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,$):(W.__proto__=$,ue(W,re,"GeneratorFunction")),W.prototype=Object.create(se),W;},z.awrap=function(W){return{__await:W};},fe(ge.prototype),ue(ge.prototype,Z,function(){return this;}),z.AsyncIterator=ge,z.async=function(W,ae,de,ye,Se){Se===void 0&&(Se=Promise);var De=new ge(q(W,ae,de,ye),Se);return z.isGeneratorFunction(ae)?De:De.next().then(function(Ue){return Ue.done?Ue.value:De.next();});},fe(se),ue(se,re,"Generator"),ue(se,U,function(){return this;}),ue(se,"toString",function(){return"[object Generator]";}),z.keys=function(W){var ae,de=Object(W),ye=[];for(ae in de)ye.push(ae);return ye.reverse(),function Se(){for(;ye.length;){var De=ye.pop();if(De in de)return Se.value=De,Se.done=!1,Se;}return Se.done=!0,Se;};},z.values=ee,Re.prototype={constructor:Re,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=B,this.done=!1,this.delegate=null,this.method="next",this.arg=B,this.tryEntries.forEach(_e),!W)for(var ae in this)ae.charAt(0)==="t"&&K.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=B);},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval;},dispatchException:function(W){if(this.done)throw W;var ae=this;function de(nt,it){return De.type="throw",De.arg=W,ae.next=nt,it&&(ae.method="next",ae.arg=B),!!it;}for(var ye=this.tryEntries.length-1;0<=ye;--ye){var Se=this.tryEntries[ye],De=Se.completion;if(Se.tryLoc==="root")return de("end");if(Se.tryLoc<=this.prev){var Ue=K.call(Se,"catchLoc"),Be=K.call(Se,"finallyLoc");if(Ue&&Be){if(this.prev<Se.catchLoc)return de(Se.catchLoc,!0);if(this.prev<Se.finallyLoc)return de(Se.finallyLoc);}else if(Ue){if(this.prev<Se.catchLoc)return de(Se.catchLoc,!0);}else{if(!Be)throw Error("try statement without catch or finally");if(this.prev<Se.finallyLoc)return de(Se.finallyLoc);}}}},abrupt:function(W,ae){for(var de=this.tryEntries.length-1;0<=de;--de){var ye=this.tryEntries[de];if(ye.tryLoc<=this.prev&&K.call(ye,"finallyLoc")&&this.prev<ye.finallyLoc){var Se=ye;break;}}var De=(Se=Se&&(W==="break"||W==="continue")&&Se.tryLoc<=ae&&ae<=Se.finallyLoc?null:Se)?Se.completion:{};return De.type=W,De.arg=ae,Se?(this.method="next",this.next=Se.finallyLoc,Y):this.complete(De);},complete:function(W,ae){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&ae&&(this.next=ae),Y;},finish:function(W){for(var ae=this.tryEntries.length-1;0<=ae;--ae){var de=this.tryEntries[ae];if(de.finallyLoc===W)return this.complete(de.completion,de.afterLoc),_e(de),Y;}},catch:function(W){for(var ae=this.tryEntries.length-1;0<=ae;--ae){var de,ye,Se=this.tryEntries[ae];if(Se.tryLoc===W)return(de=Se.completion).type==="throw"&&(ye=de.arg,_e(Se)),ye;}throw Error("illegal catch attempt");},delegateYield:function(W,ae,de){return this.delegate={iterator:ee(W),resultName:ae,nextLoc:de},this.method==="next"&&(this.arg=B),Y;}},z;}function y(B,z){if(!(B instanceof z))throw new TypeError("Cannot call a class as a function");}function b(B,z){for(var te=0;te<z.length;te++){var K=z[te];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(B,function(V){return V=function(U,Z){if(t(U)!="object"||!U)return U;var re=U[Symbol.toPrimitive];if(re===void 0)return(Z==="string"?String:Number)(U);if(re=re.call(U,Z||"default"),t(re)!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.");}(V,"string"),t(V)=="symbol"?V:V+"";}(K.key),K);}}function p(B,z,te){return z&&b(B.prototype,z),te&&b(B,te),Object.defineProperty(B,"prototype",{writable:!1}),B;}function c(B,V,te){V=g(V);var K=B,V=s()?Reflect.construct(V,te||[],g(B).constructor):V.apply(B,te);if(V&&(t(V)=="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(B=K,B===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B;}function d(B,z,te,K){var V=m(g(1&K?B.prototype:B),z,te);return 2&K?function(U){return V.apply(te,U);}:V;}function m(){return(m=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(B,z,te){var K=function(V,U){for(;!{}.hasOwnProperty.call(V,U)&&(V=g(V))!==null;);return V;}(B,z);if(K)return(K=Object.getOwnPropertyDescriptor(K,z)).get?K.get.call(arguments.length<3?B:te):K.value;}).apply(null,arguments);}function a(B){var z=typeof Map=="function"?new Map():void 0;return(a=function(te){if(te===null||!function(V){try{return Function.toString.call(V).indexOf("[native code]")!==-1;}catch{return typeof V=="function";}}(te))return te;if(typeof te!="function")throw new TypeError("Super expression must either be null or a function");if(z!==void 0){if(z.has(te))return z.get(te);z.set(te,K);}function K(){return function(V,ue,Z){if(s())return Reflect.construct.apply(null,arguments);var re=[null],ue=(re.push.apply(re,ue),new(V.bind.apply(V,re))());return Z&&l(ue,Z.prototype),ue;}(te,arguments,g(this).constructor);}return K.prototype=Object.create(te.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),l(K,te);})(B);}function s(){try{var B=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return(s=function(){return!!B;})();}function l(B,z){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(te,K){return te.__proto__=K,te;})(B,z);}function g(B){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(z){return z.__proto__||Object.getPrototypeOf(z);})(B);}var f=this&&this.__awaiter||function(B,z,te,K){return new(te=te||Promise)(function(V,U){function Z(q){try{ue(K.next(q));}catch(J){U(J);}}function re(q){try{ue(K.throw(q));}catch(J){U(J);}}function ue(q){var J;q.done?V(q.value):((J=q.value)instanceof te?J:new te(function(oe){oe(J);}
743)).then(Z,re);}ue((K=K.apply(B,z||[])).next());});},v=(Object.defineProperty(r,"__esModule",{value:!0}),r.VDMPluginStudio=r.VDMPluginStudioEvents=r.VDMSTUDIO_EVENT_LISTENERS=void 0,H(5)),S=H(286),w=H(376),C=(Object.defineProperty(r,"VDMSTUDIO_EVENT_LISTENERS",{enumerable:!0,get:function(){return w.VDMSTUDIO_EVENT_LISTENERS;}}),H(70)),I=H(283),O=H(20),M=H(114),N=H(282),G=function(B){function z(){var K;return y(this,z),(K=c(this,z)).eventsListenerMap=new Map(),K;}var te=z;if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");return te.prototype=Object.create(B&&B.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),Object.defineProperty(te,"prototype",{writable:!1}),B&&l(te,B),p(z,[{key:"size",get:function(){return this.eventsListenerMap.size;}},{key:"keys",value:function(){return this.eventsListenerMap.keys();}},{key:"addEventListener",value:function(K,V,U){d(z,"addEventListener",this,3)([K,V,U]),V=this.eventsListenerMap.get(K)||0,this.eventsListenerMap.set(K,V+1);}},{key:"removeEventListener",value:function(K,V,U){d(z,"removeEventListener",this,3)([K,V,U]),V=this.eventsListenerMap.get(K)||0,1<V?this.eventsListenerMap.set(K,V-1):this.eventsListenerMap.delete(K);}},{key:"dispose",value:function(){this.eventsListenerMap&&(this.eventsListenerMap.clear(),this.eventsListenerMap=void 0);}}]);}(a(EventTarget)),H=(r.VDMPluginStudioEvents=G,function(){return p(function B(z){var te=this;y(this,B),this._initialVdmContainerStyles={},this._bgRemovalProxyDiv=null,this._bgRemovalEffect=null,this._bgRemovalVideoComponent=null,this._bgRemovalRafId=0,this._bgRemovalComponentElement=null,this._bgRemovalOrigPersonHeight=0,this._bgRemovalLastCenterX=!1,this._bgRemovalLastCenterY=!1,this._bgRemovalHadDragProgress=!1,this._slideClickHandler=null,this._slideContainer=null,this._isSimulatingDrag=!1,this._selectionChangeTimer=null,this.handleBgRemovalTransform=function(K){te._bgRemovalEffect&&te._bgRemovalVideoComponent&&((K=K.detail).state==="start"?te._bgRemovalHadDragProgress=!1:K.state==="end"&&!te._bgRemovalHadDragProgress||(K.state==="inprogress"&&(te._bgRemovalHadDragProgress=!0),te._bgRemovalLastCenterX=!!K.centerX,te._bgRemovalLastCenterY=!!K.centerY,te._bgRemovalRafId||(te._bgRemovalRafId=requestAnimationFrame(function(){var V,U,Z,re,ue;te._bgRemovalRafId=0,te._bgRemovalEffect&&te._bgRemovalVideoComponent&&te._bgRemovalProxyDiv&&te._bgRemovalComponentElement&&te._bgRemovalOrigPersonHeight&&(V=te._bgRemovalComponentElement.querySelector("canvas.canvas-player"))&&V.width&&V.height&&(Z=te._bgRemovalComponentElement.getBoundingClientRect()).width&&Z.height&&(re=te._bgRemovalProxyDiv.getBoundingClientRect(),U=V.width/Z.width,ue=V.height/Z.height,U=(re.left+re.width/2-Z.left)*U,Z=(re.top+re.height/2-Z.top)*ue,re=re.height*ue,ue=0<te._bgRemovalOrigPersonHeight?re/te._bgRemovalOrigPersonHeight:1,te._bgRemovalEffect.setPersonTransform({x:te._bgRemovalLastCenterX?0:U,y:te._bgRemovalLastCenterY?0:Z,scale:isFinite(ue)?ue:1,centerX:te._bgRemovalLastCenterX,centerY:te._bgRemovalLastCenterY}),te._bgRemovalEffect.rerenderFrame(V,te._bgRemovalEffect.isRtlLayout));}))));},this._vdmPreviewer=new S.VDMPluginPreviewer(z),this._eventListeners=new G(),this._elementsTransformData=new Map(),this._initialVdmContainerStyles.userSelect=this._vdmPreviewer.vdmHolder.vdmContainer.style.userSelect,this._initialVdmContainerStyles.webkitUserSelect=this._vdmPreviewer.vdmHolder.vdmContainer.style.webkitUserSelect,this._vdmPreviewer.vdmHolder.vdmContainer.style.userSelect="none",this._vdmPreviewer.vdmHolder.vdmContainer.style.webkitUserSelect="none";},[{key:"disposeVdmStudio",value:function(){var B;this._selectionChangeTimer&&(clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),(B=this._vdmStudio)!=null&&B.dispose(),this._vdmStudio=void 0,this.removeBgRemovalProxyDiv();}},{key:"createBgRemovalProxyDiv",value:function(B,z){var te=B.getPersonRenderedRect();if(!te)return v.default.debug("[VDMPluginStudio] No person rendered rect available, using component element"),null;var K=z.querySelector("canvas.canvas-player");if(!K||!K.width||!K.height)return null;var V=z.offsetWidth/K.width,U=z.offsetHeight/K.height,Z=(this.removeBgRemovalProxyDiv(),document.createElement("div"));return Z.style.position="absolute",Z.style.left="".concat(te.x*V,"px"),Z.style.top="".concat(te.y*U,"px"),Z.style.width="".concat(te.width*V,"px"),Z.style.height="".concat(te.height*U,"px"),Z.style.pointerEvents="auto",Z.style.zIndex="10",z.appendChild(Z),this._bgRemovalProxyDiv=Z,this._bgRemovalComponentElement=z,this._bgRemovalOrigPersonHeight=K.height*N.Backgroun
743dRemovalEffect.getPersonScale(),B.getPersonTransform()||B.setPersonTransform({x:te.x+te.width/2,y:te.y+te.height/2,scale:te.height/this._bgRemovalOrigPersonHeight,centerX:!1,centerY:!1}),Z;}},{key:"removeBgRemovalProxyDiv",value:function(){var B;this._bgRemovalEffect&&(B=this._eventListeners)!=null&&B.removeEventListener("transform",this.handleBgRemovalTransform),this._bgRemovalRafId&&(cancelAnimationFrame(this._bgRemovalRafId),this._bgRemovalRafId=0),this._bgRemovalProxyDiv&&(this._bgRemovalProxyDiv.remove(),this._bgRemovalProxyDiv=null),this._bgRemovalComponentElement&&(this._bgRemovalComponentElement.style.pointerEvents="auto"),this._bgRemovalEffect=null,this._bgRemovalVideoComponent=null,this._bgRemovalComponentElement=null,this._bgRemovalOrigPersonHeight=0,this._bgRemovalLastCenterX=!1,this._bgRemovalLastCenterY=!1,this._bgRemovalHadDragProgress=!1;}},{key:"removeSlideClickHandler",value:function(){var B;this._slideClickHandler&&this._slideContainer&&(B=v.default.isTouchDevice()&&v.default.isMobileDevice()?"touchstart":"mousedown",this._slideContainer.removeEventListener(B,this._slideClickHandler,!0)),this._slideClickHandler=null,this._slideContainer=null;}},{key:"getTransformForCurrentElement",value:function(){var B=this._vdmStudio.getElementTransform();if(this._bgRemovalEffect){var z=this._bgRemovalEffect.getPersonTransform();if(z){var te=this._bgRemovalEffect.getCanvasDimensions();if(!te||te.width===0||te.height===0)return B.centerX=!0,B.centerY=!0,delete B.x,delete B.y,B.scale=isFinite(z.scale)?String(z.scale):"1",delete B.width,delete B.height,B;z.centerX?(B.centerX=!0,delete B.x):(B.x=z.x/te.width,delete B.centerX),z.centerY?(B.centerY=!0,delete B.y):(B.y=z.y/te.height,delete B.centerY),B.scale=String(z.scale),delete B.width,delete B.height;}}return B;}},{key:"setup",value:function(B,z){var te;return f(this,void 0,void 0,h().mark(function K(){var V;return h().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(this._studioData={adapterStory:B,initialAdapterSlides:B.slides,index:(te=z.index)!=null?te:0,editableStudioId:void 0,renderingOptions:z.renderingOptions,selectToEdit:(te=z.selectToEdit)==null||te,showHandles:(te=z.showHandles)==null||te},C.CorePreviewerUtils.disableAnimationEffects=!0,z.renderingOptions.disableReconcile=!0,B.audios=void 0,V=[],z.time!==void 0)return U.next=8,this.seekToTime(z.time);U.next=11;break;case 8:V=U.sent,U.next=14;break;case 11:return U.next=13,this.seekToIndex(this._studioData.index);case 13:V=U.sent;case 14:return U.abrupt("return",V);case 15:case"end":return U.stop();}},K,this);}));}},{key:"seekToTime",value:function(B){var z,te;return f(this,void 0,void 0,h().mark(function K(){var V,U,Z,re,ue,q,J,oe,Q,F,X,Y,j,D,$,ne,le,se,fe,ge,he,_e,Re,ee=this;return h().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(this._studioData===void 0)return v.default.error("You need to call setup before calling seekToTime."),W.abrupt("return",[]);W.next=3;break;case 3:if(B===void 0||B<0||B>this._studioData.adapterStory.global.duration)return v.default.error("Time ".concat(B," is not valid, cancel editing.")),W.abrupt("return",[]);W.next=6;break;case 6:if(V=v.default.slideIndexFromTime(B,this._studioData.initialAdapterSlides),this._studioData.initialAdapterSlides[V].type===O.VDMSlideType.VDMContextSlide)return v.default.error("Slide time is not valid (intro/outro slide), cancel editing."),W.abrupt("return",[]);W.next=11;break;case 11:this._studioData.index=V,this._elementsTransformData.clear(),(X=this._studioData.adapterStory).slides=v.default.cloneDeep([this._studioData.initialAdapterSlides[this._studioData.index]]),this._vdmStudio!==void 0&&this.disposeVdmStudio(),this._vdmPreviewer.setStory(X,this._studioData.renderingOptions),U=_(this._vdmPreviewer.slides[0].Layers);try{for(U.s();!(Z=U.n()).done;){re=Z.value,ue=_(re.Components);try{for(ue.s();!(q=ue.n()).done;){J=q.value,oe=_(J.getAllEffects());try{for(oe.s();!(Q=oe.n()).done;)(F=Q.value).preserveInStudio&&F.onStudioReady({time:B});}catch(ae){oe.e(ae);}finally{oe.f();}}}catch(ae){ue.e(ae);}finally{ue.f();}}}catch(ae){U.e(ae);}finally{U.f();}return W.next=21,this._vdmPreviewer.build();case 21:if(X=this._vdmPreviewer.story.initialAdapterStory,ne=(z=(z=X.media[this._studioData.index])==null?void 0:z.metadata)==null?void 0:z.effects){Y=_(ne);try{for(Y.s();!(j=Y.n()).done;)(D=j.value).type==="transform"&&(te=D.attributes)!=null&&te.studioId&&this._elementsTransformData.set(D.attributes.studioId,Object.assign({},D.attributes));}catch(ae){Y.e(ae);}finally{Y.f();}}
743return W.next=26,this._vdmPreviewer.pause(B);case 26:if(($=this.getEditableComponentsStudioIds()).length===0)return v.default.error("No editable components found in the current slide, cancel editing."),W.abrupt("return",[]);W.next=30;break;case 30:if(!this._studioData.selectToEdit){W.next=69;break;}ne=this._vdmPreviewer.slides[0],le=v.default.isTouchDevice()&&v.default.isMobileDevice()?"touchstart":"mousedown",se=[],fe=_(ne.Layers),W.prev=35,fe.s();case 37:if((ge=fe.n()).done){W.next=57;break;}ge=ge.value,ge=_(ge.Components),W.prev=40,_e=h().mark(function ae(){var de;return h().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:(de=he.value).studioId&&de.isStudioEditable&&(de.getElement().style.pointerEvents="auto",de.getElement().addEventListener(le,function(Se){var De,Ue,Be;v.default.isTouchEvent(Se)&&2<=Se.touches.length||de.studioId===((De=ee._studioData)==null?void 0:De.editableStudioId)?ee._selectionChangeTimer&&(clearTimeout(ee._selectionChangeTimer),ee._selectionChangeTimer=null):v.default.isTouchEvent(Se)?(Ue=v.default.mouseEventToClientX(Se),Be=v.default.mouseEventToClientY(Se),ee._selectionChangeTimer&&clearTimeout(ee._selectionChangeTimer),ee._selectionChangeTimer=setTimeout(function(){var nt;ee._selectionChangeTimer=null,ee.editComponentByStudioId(de.studioId),(nt=ee._vdmStudio)!=null&&nt.simulateDragEvent(Ue,Be);},80)):(ee.editComponentByStudioId(de.studioId),(De=ee._vdmStudio)!=null&&De.simulateDragEvent(v.default.mouseEventToClientX(Se),v.default.mouseEventToClientY(Se)));}),se.push({element:de.getElement(),studioId:de.studioId}));case 2:case"end":return ye.stop();}},ae);}),ge.s();case 43:if((he=ge.n()).done){W.next=47;break;}return W.delegateYield(_e(),"t0",45);case 45:W.next=43;break;case 47:W.next=52;break;case 49:W.prev=49,W.t1=W.catch(40),ge.e(W.t1);case 52:return W.prev=52,ge.f(),W.finish(52);case 55:W.next=37;break;case 57:W.next=62;break;case 59:W.prev=59,W.t2=W.catch(35),fe.e(W.t2);case 62:return W.prev=62,fe.f(),W.finish(62);case 65:this.removeSlideClickHandler(),(Re=0<se.length?se[0].element.closest(".vdm-slide"):null)&&(this._slideContainer=Re,this._slideClickHandler=function(ae){var de,ye,Se,De,Ue;if(!ee._isSimulatingDrag){if(v.default.isTouchEvent(ae)&&2<=ae.touches.length)ee._selectionChangeTimer&&(clearTimeout(ee._selectionChangeTimer),ee._selectionChangeTimer=null);else if(ae.target.classList.contains("studio-box")){var Be,nt=v.default.mouseEventToClientX(ae),it=v.default.mouseEventToClientY(ae),ot=_(document.elementsFromPoint(nt,it));try{for(ot.s();!(Be=ot.n()).done;){var ht=Be.value;if(!((de=ht.classList)!=null&&de.contains("studio-box")||(ye=ht.classList)!=null&&ye.contains("studio-box-handle")||(Se=ht.classList)!=null&&Se.contains("vdm-studio")||ht.closest(".vdm-studio"))){var Et,At=_(se);try{var Nt;for(At.s();!(Et=At.n()).done;)if(Nt=function(){var Ut=Et.value;if(Ut.element===ht||Ut.element.contains(ht))return Ut.studioId!==((De=ee._studioData)==null?void 0:De.editableStudioId)&&(ae.stopPropagation(),v.default.isTouchEvent(ae)?(ee._selectionChangeTimer&&clearTimeout(ee._selectionChangeTimer),ee._selectionChangeTimer=setTimeout(function(){var bi;ee._selectionChangeTimer=null,ee.editComponentByStudioId(Ut.studioId),ee._isSimulatingDrag=!0,(bi=ee._vdmStudio)!=null&&bi.simulateDragEvent(nt,it),ee._isSimulatingDrag=!1;},80)):(ee.editComponentByStudioId(Ut.studioId),ee._isSimulatingDrag=!0,(Ue=ee._vdmStudio)!=null&&Ue.simulateDragEvent(nt,it),ee._isSimulatingDrag=!1)),{v:void 0};}())return Nt.v;}catch(Ut){At.e(Ut);}finally{At.f();}}}}catch(Ut){ot.e(Ut);}finally{ot.f();}}}},Re.addEventListener(le,this._slideClickHandler,!0)),this.editComponentByStudioId($[0]);case 69:return W.abrupt("return",$);case 70:case"end":return W.stop();}},K,this,[[35,59,62,65],[40,49,52,55]]);}));}},{key:"seekToIndex",value:function(B){return f(this,void 0,void 0,h().mark(function z(){var te;return h().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(this._studioData===void 0)return v.default.error("you need to call setup before calling seekToIndex."),K.abrupt("return",[]);K.next=3;break;case 3:if(B===void 0||B>this._studioData.initialAdapterSlides.length-1)return v.default.error("Slide index (or time) is not val
743id, cancel editing."),K.abrupt("return",[]);K.next=6;break;case 6:if(te=this._studioData.initialAdapterSlides[0].type===O.VDMSlideType.VDMContextSlide,B=te?B+1:B,this._studioData.initialAdapterSlides[B].type===O.VDMSlideType.VDMContextSlide)return v.default.error("Slide index is not valid (intro/outro slide), cancel editing."),K.abrupt("return",[]);K.next=12;break;case 12:return K.next=14,this.seekToTime(this._studioData.initialAdapterSlides[B].startTime+.1);case 14:return te=K.sent,K.abrupt("return",te);case 16:case"end":return K.stop();}},z,this);}));}},{key:"getEditableComponentsStudioIds",value:function(){if(this._studioData===void 0||this._vdmPreviewer===void 0)return v.default.error("you need to call setup before calling getEditableComponentsStudioIds."),[];var B,z=[],te=_(this._vdmPreviewer.slides[0].Layers);try{for(te.s();!(B=te.n()).done;){var K,V=_(B.value.Components);try{for(V.s();!(K=V.n()).done;){var U=K.value;U.studioId&&U.isStudioEditable&&z.push(U.studioId);}}catch(Z){V.e(Z);}finally{V.f();}}}catch(Z){te.e(Z);}finally{te.f();}return z;}},{key:"editComponentByStudioId",value:function(B){var z,te,K=this;if(B===void 0)v.default.error("you need to provide an id for the component.");else{this._vdmStudio!==void 0&&(U=this.getTransformForCurrentElement(),this._elementsTransformData.set(U.studioId,U),this.disposeVdmStudio());var V=this._vdmPreviewer.slides[0],U=(U=(U=V.refSlide)==null?void 0:U.slideResources)==null?void 0:U.rtlLayout,Z=function(F){var X,Y=_(V.Layers);try{for(Y.s();!(X=Y.n()).done;){var j,D=_(X.value.Components);try{for(D.s();!(j=D.n()).done;){var $=j.value;if($.studioId&&$.studioId===F)return{element:$.getElement(),isImage:$.componentTemplate.type==="image",component:$};}}catch(ne){D.e(ne);}finally{D.f();}}}catch(ne){Y.e(ne);}finally{Y.f();}}(B),K=(K=K._vdmPreviewer.story.initialAdapterStory.media[K._studioData.index].metadata.effects)==null?void 0:K.find(function(F){return F.type==="transform";});if(Z)try{var re,ue,q=Z.element,J=Z.isImage,oe=Z.component instanceof M.default?Z.component.backgroundRemovalEffect:null;oe&&!oe.getPersonRenderedRect()?v.default.debug("[VDMPluginStudio] BG removal component with no person detected, skip editing"):(ue=(!oe||(re=this.createBgRemovalProxyDiv(oe,Z.element))&&(q=re,J=!0,this._bgRemovalEffect=oe,this._bgRemovalVideoComponent=Z.component),{scale:this._studioData.renderingOptions.scale,rtlLayout:U,showHandles:this._studioData.showHandles,aspectRatio:this._studioData.adapterStory.slides[0].aspectRatio.aspectRatioStr,centerX:(z=K?.attributes)==null?void 0:z.centerX,centerY:(te=K?.attributes)==null?void 0:te.centerY,fixedSize:J}),this._vdmStudio=new w.default(this._eventListeners,B,q,ue),this._studioData.editableStudioId=B,this._bgRemovalEffect&&(this._eventListeners.removeEventListener("transform",this.handleBgRemovalTransform),this._eventListeners.addEventListener("transform",this.handleBgRemovalTransform)));}catch(F){this.disposeVdmStudio(),v.default.error("Cannot create studio instance, cancel editing. ".concat(F?F.message:""));}else v.default.error("Cannot find the component element, cancel editing.");}}},{key:"addEventListener",value:function(B,z){this._eventListeners.addEventListener(B,z);}},{key:"removeEventListener",value:function(B,z,te){this._eventListeners.removeEventListener(B,z);}},{key:"parseBoolean",value:function(B){if(B!==void 0){if(typeof B=="boolean")return B;if(typeof B=="number")return!!B;if(typeof B=="string"){if(B=B.toLowerCase().trim(),B==="true")return!0;if(B==="false")return!1;}}}},{key:"validatePositionCoordinates",value:function(B){var z=this.parseBoolean(B.centerX),te=this.parseBoolean(B.centerY);if(B.x!==void 0&&z===!0)throw new Error("Cannot set both x coordinate (".concat(B.x,") and centerX simultaneously"));if(B.y!==void 0&&te===!0)throw new Error("Cannot set both y coordinate (".concat(B.y,") and centerY simultaneously"));}},{key:"position",get:function(){if(this._vdmStudio)return this._vdmStudio.position;v.default.error("Cannot get position, studio instance is not created.");},set:function(B){var z,te,K,V;if(!this._vdmStudio)throw new Error("Cannot set position: studio instance is not initialized");if(!B)throw new Error("Cannot set position: coordinates are required");try{this.validatePositionCoordinates(B);var U=this._vdmStudio.position,Z={x:(z=B.x)!=null?z:U.x,y:(te=B.y)!=null?te:U.y,centerX:B.x===void 0&&((K=this.parseBoolean(B.centerX))!=null?K:U.centerX),centerY:B.y===void 0&&((V=this.parseBoolean(B.centerY))!=null?V:U.centerY)};this._vdmStudio.position=Z;}catch(re){v.default.error("Position update failed: ".concat(re.message));}}},{key:"scale",get:function(){if(this._vdmStudio!==void 0)return this._vdmStudio.scale;v.default.error("Cannot get scale, studio instance is not created.");},set:function(B){this._vdmStudio!==void 0?this._vdmStudio.scale=B:v.default.error("Cannot set scale, studio instance is not created.");}},{key:"dispose",value:function(){var B,z;for(z in this.removeSlideClickHandler(),this.disposeVdmStudio(),this._eventListeners.dispose(),this._studioData=void 0,this._elementsTransformData.clear(),this._initialVdmContainerStyles)this._vdmPreviewer.vdmHolder.vdmContainer.style[z]=this._initialVdmContainerStyles[z];this._initialVdmContainerStyles={},(B=this._vdmPreviewer)!=null&&B.clearCallbacks(),(B=this._vdmPreviewer)!=null&&B.dispose(),(B=(B=(B=this._vdmPreviewer)==null?void 0:B.Holder)==null?void 0:B.vdmSlidesDiv)!=null&&B.remove(),(B=(B=(B=this._vdmPreviewer)==null?void 0:B.Holder)==null?void 0:B.emojiStyle)!=null&&B.remove(),(B=(B=(B=this._vdmPreviewer)==null?void 0:B.Holder)==null?void 0:B.vdmContainer)!=null&&B.removeAttribute("style"),(B=I.default.getInstance())!=null&&B.dispose(),this._vdmPreviewer=void 0;}},{key:"getElementsTransform",value:function(){this._vdmStudio!==void 0&&(B=this.getTransformForCurrentElement(),this._elementsTransformData.set(B.studioId,B));var B,z,te=[],K=_(this._elementsTransformData);try{for(K.s();!(z=K.n()).done;){var V=o(z.value,2),U=(V[0],V[1]);te.push(U);}}catch(Z){K.e(Z);}finally{K.f();}return te;}},{key:"produceStory",value:function(){var B=0<arguments.length&&arguments[0]!==void 0&&arguments[0]?v.default.cloneDeep(this._vdmPreviewer.story.initialAdapterStory):this._vdmPreviewer.story.initialAdapterStory;if(this._vdmStudio!==void 0){var z,te=this.getElementsTransform(),K=B.media[this._studioData.index].metadata.templateIds,V=_(B.media);try{for(V.s();!(z=V.n()).done;)(function(){var U=z.value;if(K.every(function(J){return U.metadata.templateIds.includes(J);})){"effects"in U.metadata?(Z=U.metadata.effects).splice.apply(Z,[0,U.metadata.effects.length].concat(n(U.metadata.effects.filter(function(J){return J.type!=="transform";})))):U.metadata.effects=[];var Z,re,ue=_(te);try{for(ue.s();!(re=ue.n()).done;){var q=re.value;U.metadata.effects.unshift({attributes:q,type:"transform"});}}catch(J){ue.e(J);}finally{ue.f();}}
743})();}catch(U){V.e(U);}finally{V.f();}}return B;}},{key:"produceSlide",value:function(){var B=(0<arguments.length&&arguments[0]!==void 0&&arguments[0]?v.default.cloneDeep(this._vdmPreviewer.story.initialAdapterStory):this._vdmPreviewer.story.initialAdapterStory).media[this._studioData.index];if(this._vdmStudio!==void 0){var z,te,K=this.getElementsTransform(),V=("effects"in B.metadata?(z=B.metadata.effects).splice.apply(z,[0,B.metadata.effects.length].concat(n(B.metadata.effects.filter(function(Z){return Z.type!=="transform";})))):B.metadata.effects=[],_(K));try{for(V.s();!(te=V.n()).done;){var U=te.value;B.metadata.effects.unshift({attributes:U,type:"transform"});}}catch(Z){V.e(Z);}finally{V.f();}}return B;}},{key:"activeStudioId",value:function(){var B;return(B=this._vdmStudio)==null?void 0:B.studioId;}},{key:"slideIndex",value:function(){var B;{if(this._studioData.editableStudioId)return B=this._studioData.initialAdapterSlides[0].type===O.VDMSlideType.VDMContextSlide,this._studioData.index-(B?1:0);v.default.error("No slide is currently being edited.");}}},{key:"currentTime",value:function(){if(this._studioData.editableStudioId)return this._vdmPreviewer.currentTime;v.default.error("No slide is currently being edited.");}}]);}());r.VDMPluginStudio=H;},function(i,r,p){"use strict";function t(c){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d;}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d;})(c);}function n(c,d){var m,a=typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(!a){if(Array.isArray(c)||(a=_(c))||d&&c&&typeof c.length=="number")return a&&(c=a),m=0,{s:d=function(){},n:function(){return m>=c.length?{done:!0}:{done:!1,value:c[m++]};},e:function(f){throw f;},f:d};throw new TypeError(`Invalid attempt to iterate non-iterable instance. 744In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var s,l=!0,g=!1;return{s:function(){a=a.call(c);},n:function(){var f=a.next();return l=f.done,f;},e:function(f){g=!0,s=f;},f:function(){try{l||a.return==null||a.return();}finally{if(g)throw s;}}};}function o(c,d){return function(m){if(Array.isArray(m))return m;}(c)||function(m,a){var s=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(s!=null){var l,g,f,v,S=[],w=!0,C=!1;try{if(f=(s=s.call(m)).next,a===0){if(Object(s)!==s)return;w=!1;}else for(;!(w=(l=f.call(s)).done)&&(S.push(l.value),S.length!==a);w=!0);}catch(I){C=!0,g=I;}finally{try{if(!w&&s.return!=null&&(v=s.return(),Object(v)!==v))return;}finally{if(C)throw g;}}return S;}}(c,d)||_(c,d)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 745In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}();}function _(c,d){if(c){if(typeof c=="string")return E(c,d);var m={}.toString.call(c).slice(8,-1);return(m=m==="Object"&&c.constructor?c.constructor.name:m)==="Map"||m==="Set"?Array.from(c):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?E(c,d):void 0;}}function E(c,d){(d==null||d>c.length)&&(d=c.length);for(var m=0,a=Array(d);m<d;m++)a[m]=c[m];return a;}function x(c,d){for(var m=0;m<d.length;m++){var a=d[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,function(s){return s=function(l,g){if(t(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f===void 0)return(g==="string"?String:Number)(l);if(f=f.call(l,g||"default"),t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.");}(s,"string"),t(s)=="symbol"?s:s+"";}(a.key),a);}}Object.defineProperty(r,"__esModule",{value:!0}),r.VDMSTUDIO_EVENT_LISTENERS=void 0;var h=p(13),y=p(5),b=(r.VDMSTUDIO_EVENT_LISTENERS={TRANSFORM:"transform",POSITION:"position",SCALE:"scale",ATTACHED_TO_GRID:"attachedToGrid",STUDIO_ID:"studioId"},{LEFT_TOP:"left top",LEFT_BOTTOM:"left bottom",RIGHT_TOP:"right top",RIGHT_BOTTOM:"right bottom"}),p=function(){function c(w,C,g,f){var v=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");if(this.routePointerEvent=function(I){I.type==="touchstart"&&2<=I.touches.length&&v.resizeElementByPinch(I),v.dragElement(I);},this.documentPinchEvent=function(I){I.type==="touchstart"&&2<=I.touches.length&&(v.resizeElementByPinch(I),v.dragElement(I));},this.dragElement=function(I){var O,M,N,G,H,B,z,te,K,V,U,Z;I.type==="mousedown"&&I.button!==0||(v.studioBox.setAttribute("active",""),I.target.style.cursor="move",v.studioBox.style.opacity=.6.toString(),v.captionElm.style.opacity=.6.toString(),O=y.default.mouseEventToClientX(I),M=y.default.mouseEventToClientY(I),N=parseFloat(v.captionElm.style[v.horizontalPosition]),G=parseFloat(v.captionElm.style[v.verticalPosition]),H=v.horizontalPosition==="left"?1:-1,B=v.verticalPosition==="top"?1:-1,z=v.captionElm.style.scale?parseFloat(v.captionElm.style.scale):1,K=te=!1,V=function(re){var ue=y.default.mouseEventToClientX(re)-O,q=y.default.mouseEventToClientY(re)-M,ue=N+H*ue,q=G+B*q,J=Math.abs(v.vdmBoundingClientRect.width/2-(ue+v.currentWidth/2)),J=(v._isCentredX=!1,J<=40?(v.gridLinesDiv.vertical.style.opacity="1",!v._isResizing&&J<=20&&(te||(v.dis
745patchEvents(void 0,"attachedToGrid"),te=!0),ue=v.vdmBoundingClientRect.width/2-v.currentWidth/2,v._isCentredX=!0)):(v.gridLinesDiv.vertical.style.opacity="0",te=!1),(v.vdmBoundingClientRect.height-v.currentHeight)/2-q);v._isCentredY=!1,v.verticalPosition==="bottom"&&(J+=(z-1)*v.currentHeight/z),Math.abs(J)<=40?(v.gridLinesDiv.horizontal.style.opacity="1",!v._isResizing&&Math.abs(J)<=20&&(q=(v.vdmBoundingClientRect.height-v.currentHeight)/2,v.verticalPosition==="bottom"&&(q+=(z-1)*v.currentHeight/z),v._isCentredY=!0,K||(v.dispatchEvents(void 0,"attachedToGrid"),K=!0))):(v.gridLinesDiv.horizontal.style.opacity="0",K=!1),(ue=ue<z*v.MIN_VISIBLE_AREA_IN_PX-v.currentWidth?z*v.MIN_VISIBLE_AREA_IN_PX-v.currentWidth:ue)>v.vdmBoundingClientRect.width-z*v.MIN_VISIBLE_AREA_IN_PX&&(ue=v.vdmBoundingClientRect.width-z*v.MIN_VISIBLE_AREA_IN_PX),(q=q<z*v.MIN_VISIBLE_AREA_IN_PX-v.currentHeight?z*v.MIN_VISIBLE_AREA_IN_PX-v.currentHeight:q)>v.vdmBoundingClientRect.height-z*v.MIN_VISIBLE_AREA_IN_PX&&(q=v.vdmBoundingClientRect.height-z*v.MIN_VISIBLE_AREA_IN_PX),v.captionElm.style[v.horizontalPosition]="".concat(ue,"px"),v.captionElm.style[v.verticalPosition]="".concat(q,"px"),v.vdmBoundingClientRect=v.vdmStudio.parentElement.getBoundingClientRect(),v.captionElmBoundingClientRect=v.captionElm.getBoundingClientRect(),v.safeZonesDiv&&(v.safeZonesDiv.top.style.opacity=v.captionElmBoundingClientRect.top-v.vdmBoundingClientRect.top<.06*v.safeZonesDiv.top.offsetHeight?"1":"0",v.safeZonesDiv.bottom.style.opacity=v.vdmBoundingClientRect.bottom-v.captionElmBoundingClientRect.bottom<.27*v.safeZonesDiv.bottom.offsetHeight?"1":"0",v.safeZonesDiv.right.style.opacity=v.vdmBoundingClientRect.right-v.captionElmBoundingClientRect.right<.14*v.safeZonesDiv.right.offsetWidth?"1":"0"),v.syncBoundingBoxPosition(),v.dispatchEvents("inprogress","transform","drag"),v.dispatchEvents("inprogress","position","drag"),re.stopPropagation();},U=function(re){re.target.style.cursor="grab",v.studioBox.removeAttribute("active"),v.studioBox.style.opacity="1",v.captionElm.style.opacity=v.initialCaptionElmOpacity,v.gridLinesDiv.horizontal.style.opacity="0",v.gridLinesDiv.vertical.style.opacity="0",v.safeZonesDiv&&(v.safeZonesDiv.top.style.opacity="0",v.safeZonesDiv.bottom.style.opacity="0",v.safeZonesDiv.right.style.opacity="0"),re=v.useTouchAsPointerDevice?"touchmove":"mousemove",document.removeEventListener(re,V),re=v.useTouchAsPointerDevice?"touchend":"mouseup",document.removeEventListener(re,U),v.dispatchEvents("end","position","drag"),v.dispatchEvents("end","transform","drag");},v.dispatchEvents("start","position","drag"),v.dispatchEvents("start","transform","drag"),Z=v.useTouchAsPointerDevice?"touchmove":"mousemove",document.addEventListener(Z,V),Z=v.useTouchAsPointerDevice?"touchend":"mouseup",document.addEventListener(Z,U),I.stopPropagation());},this.resizeElementByHandle=function(I){if(I.button===0){var O,M;switch(I.target.setAttribute("active",""),v.studioBox.setAttribute("active",""),v.studioBox.style.opacity=.6.toString(),v.captionElm.style.opacity=.6.toString(),I.target){case v.rightBottomHandle:v.vdmStudio.style.cursor="nwse-resize",M=O=1,v.updateTransformOrigin("left top");break;case v.rightTopHandle:v.vdmStudio.style.cursor="nesw-resize",M=-(O=1),v.updateTransformOrigin("left bottom");break;case v.leftBottomHandle:v.vdmStudio.style.cursor="nesw-resize",O=-1,M=1,v.updateTransformOrigin("right top");break;case v.leftTopHandle:v.vdmStudio.style.cursor="nwse-resize",M=O=-1,v.updateTransformOrigin("right bottom");}var N=I.clientX,G=I.clientY,B=parseFloat(v.captionElm.style[v.verticalPosition]),H=isNaN(B)?0:B,B=parseFloat(v.captionElm.style[v.horizontalPosition]),z=isNaN(B)?0:B,te=function(V){v._isResizing=!0;var Z=V.clientX,U=V.clientY,Z=(O*(Z-N)+M*(U-G))/2,U=Math.max(v.currentWidth+Z,.5*v.originalWidth),Z=Math.max(v.currentHeight+Z,.5*v.originalWidth*(v.originalHeight/v.originalWidth)),re=(U/v.originalWidth+Z/v.originalHeight)/2;v._fixedSize?(v.captionElm.style.width="".concat(U,"px"),v.captionElm.style.height="".concat(Z,"px"),U=U-v.currentWidth,Z=Z-v.currentHeight,M===-1&&(v.captionElm.style[v.verticalPosition]="".concat(H-Z,"px")),O===-1&&(v.captionElm.style[v.horizontalPosition]="".concat(z-U,"px"))):v.captionElm.style.scale=re.toFixed(2),v._isCentredX=!1,v._isCentredY=!1,v.vdmBoundingClientRect=v.vdmStudio.parentElement.getBoundingClientRect(),v.captionElmBoundingClientRect=v.captionElm.getBoundingClientRect(),v.syncBoundingBoxPosition(),v.dispatchEvents("inprogress","transform","resize"),v.dispatchEvents("inprogress","scale","resize"),v.dispatchEvents(void 0,"position"),V.stopPropagation();},K=function(){v._isResizing=!1,v.updateTransformOrigin(h.STUDIO_TRANSFORM_ORIGIN),v.syncBoundingBoxPosition(),v.currentWidth=v.captionElmBoundingClientRect.width,v.currentHeight=v.captionElmBoundingClientRect.height,v.vdmStudio.style.cursor="default",v.studioBox.removeAttribute("active"),v.studioBox.style.opacity="1",v.captionElm.style.opacity=v.initialCaptionElmOpacity,I.target.removeAttribute("active"),document.removeEventListener("mousemove",te),document.removeEventListener("mouseup",K),v.dispatchEvents("end","scale","resize"),v.dispatchEvents("end","transform","resize");};v.dispatchEvents("start","scale","resize"),v.dispatchEvents("start","transform","resize"),document.addEventListener("mousemove",te),document.addEventListener("mouseup",K),I.stopPropagation();}},this.resizeElementByPinch=function(I){I.preventDefault(),v.studioBox.setAttribute("active",""),v.studioBox.style.opacity=.6.toString(),v.captionElm.style.opacity=.6.toString(),v.updateTransformOrigin("center center");var O=function(Z){var Z=o(Z,2),ue=Z[0],Z=Z[1],re=ue.clientX-Z.clientX,ue=ue.clientY-Z.clientY;return Math.sqrt(re*re+ue*ue);},M=O(I.touches),N=v._fixedSize?v.currentWidth/v.originalWidth:v.captionElm.style.scale?parseFloat(v.captionElm.style.scale):1,H=parseFloat(v.captionElm.style[v.verticalPosition]),G=isNaN(H)?0:H,H=parseFloat(v.captionElm.style[v.horizontalPosition]),B=isNaN(H)?0:H,z=v.currentWidth,te=v.currentHeight,K=function(U){v._isResizing=!0;var Z,re,ue=O(U.touches)/M*N;v._fixedSize?(Z=v.originalWidth*ue,re=v.originalHeight*ue,v.captionElm.style.width="".concat(Z,"px"),v.captionElm.style.height="".concat(re,"px"),re=re-te,v.captionElm.style[v.horizontalPosition]="".concat(B-(Z-z)/2,"px"),v.captionElm.style[v.verticalPosition]="".concat(G-re/2,"px")):v.captionElm.style.scale=ue.toFixed(2),v._isCentredX=!1,v._isCentredY=!1,v.vdmBoundingClientRect=v.vdmStudio.parentElement.getBoundingClientRect(),v.captionElmBoundingClientRect=v.captionElm.getBoundingClientRect(),v.syncBoundingBoxPosition(),v.dispatchEvents("inprogress","transform","resize"),v.dispatchEvents("inprogress","scale","resize"),v.dispatchEvents(void 0,"position"),U.stopPropagation();},V=function(){v._isResizing=!1,v.updateTransformOrigin(h.STUDIO_TRANSFORM_ORIGIN),v.syncBoundingBoxPosition(),v.currentWidth=v.captionElmBoundingClientRect.width,v.currentHeight=v.captionElmBoundingClientRect.height,v.studioBox.removeAttribute("active"),v.studioBox.style.opacity="1",v.captionElm.style.opacity=v.initialCaptionElmOpacity,I.target.removeAttribute("active"),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",V),v.dispatchEvents("end","scale","resize"),v.dispatchEvents("end","transform","resize");};v.dispatchEvents("start","scale","resize"),v.dispatchEvents("start","transform","resize"),document.addEventListener("touchmove",K),document.addEventListener("touchend",V),I.stopPropagation();},f.rtlLayout=(S=f.rtlLayout)!=null&&S,f.scale=(S=f.scale)!=null?S:1,f.fixedSize=(S=f.fixedSize)!=null&&S,f.centerX=(S=f.centerX)!=null&&S,f.centerY=(S=f.centerY)!=null&&S,this._eventListeners=w,this._studioId=C,this._options=f,this._isCentredX=f.centerX,this._isCentredY=f.centerY,this._fixedSize=f.fixedSize,this.captionElm=g,this.rtlLayout=f.rtlLayout,this.MIN_VISIBLE_AREA_IN_PX=25*f.scale,this.useTouchAsPointerDevice=y.default.isTouchDevice()&&y.default.isMobileDevice(),this.injectStyle(),this.createStudioElements(),this.addEventListeners(),this.captionElm.style.left&&this.captionElm.style.right)throw new Error("Both left and right styles are set, only one of them should be used.");if(this.captionElm.style.top&&this.captionElm.style.bottom)throw new Error("Both top and bottom styles are set, only one of them should be used.");
745this.horizontalPosition=this.captionElm.style.left?"left":"right",this.verticalPosition=this.captionElm.style.bottom?"bottom":"top",this.transformToStyleScale(),this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect(),this.currentWidth=this.captionElmBoundingClientRect.width,this.currentHeight=this.captionElmBoundingClientRect.height;var S=this.captionElm.style.scale?parseFloat(this.captionElm.style.scale):1,w=(this.originalWidth=this.captionElmBoundingClientRect.width/S,this.originalHeight=this.captionElmBoundingClientRect.height/S,this.captionElm.style.top&&this.captionElm.style.top.includes("calc")&&(this.captionElm.style.top="".concat(this.captionElmBoundingClientRect.top-this.vdmBoundingClientRect.top,"px")),this.captionElm.style.left&&this.captionElm.style.left.includes("calc")&&(this.captionElm.style.left="".concat(this.captionElmBoundingClientRect.left-this.vdmBoundingClientRect.left,"px")),this.captionElm.style.transform),C=w.indexOf("translate(");0<=C&&(g=w.indexOf(")",C),this.captionElm.style.transform="".concat(w.slice(0,C)," translate(0, 0, 0) ").concat(w.slice(g+1)).trim()),0<=(C=(w=this.captionElm.style.transform).indexOf("translate3d("))&&(f=w.indexOf(")",C),this.captionElm.style.transform="".concat(w.slice(0,C)," translate3d(0, 0, 0) ").concat(w.slice(f+1)).trim()),this.updateTransformOrigin(h.STUDIO_TRANSFORM_ORIGIN),this.syncBoundingBoxPosition(),this.eventsStartState=new Map(),this.dispatchEvents(void 0,"studioId");}return d=c,(m=[{key:"injectStyle",value:function(){var s=this._options.showHandles?` 746 .studio-box-handle { position: absolute; width: 12px; height: 12px; background: #FFFFFF; box-shadow: 0 0 4px 1px rgba(60, 80, 100, .15)), 0 0 0 1px rgba(46, 62, 78, .3); border-radius: 50%; cursor: pointer; } 747 .studio-box-handle[active] { background: #00ABFE; } 748 .studio-box-handle[`.concat(b.LEFT_TOP.replace(" ","-"),`] { top: -7px; left: -7px; cursor: nwse-resize; } 749 .studio-box-handle[`).concat(b.RIGHT_TOP.replace(" ","-"),`] { top: -7px; right: -7px; cursor: nesw-resize; } 750 .studio-box-handle[`).concat(b.LEFT_BOTTOM.replace(" ","-"),`] { bottom: -7px; left: -7px; cursor: nesw-resize; } 751 .studio-box-handle[`).concat(b.RIGHT_BOTTOM.replace(" ","-"),`] { bottom: -7px; right: -7px; cursor: nwse-resize; } 752 `):"",l=this._options.aspectRatio!=="vertical"?"":` 753 .safeZoneElement { opacity:0; -webkit-transition: opacity 0.25s; transition: opacity 0.25s; } 754 `,l=` 755 .vdm-studio { position: absolute; width: 100%; height: 100%; z-index: `.concat(999,`; pointer-events: none; } 756 .studio-box { position: absolute; box-shadow: 0 0 0 2px #FFFFFF; cursor: grab; pointer-events: auto; z-index: `).concat(999,`; } 757 `).concat(this.useTouchAsPointerDevice?".studio-box[active] { box-shadow: 0 0 0 4px #00ABFE; }":"",` 758 .grid-lines { position: absolute; width: 100%; height: 100%; } 759 .horizontal-line { background-color: #6F54FF; width: 100%; height: 1.5px; top: 50%; left: 0; transform: translateY(-50%); position: relative; } 760 .vertical-line { background-color: #6F54FF; width: 1.5px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); position: relative; } 761 `).concat(l,` 762 `).concat(s,` 763 `);this.studioStyle=document.createElement("style"),this.studioStyle.appendChild(document.createTextNode(l)),document.head.appendChild(this.studioStyle),this.useTouchAsPointerDevice&&(this.studioMetaTag=document.createElement("meta"),this.studioMetaTag.name="viewport",this.studioMetaTag.content="user-scalable=no",document.head.appendChild(this.studioMetaTag),this.captionElm.style.touchAction="none",this.initialTouchAction=document.body.style.touchAction,document.body.style.touchAction="pan-y");}},{key:"hideAllNonCaptionElements",value:function(){for(var s=this.captionElm.previousElementSibling;s;)s.style.visibility="hidden",s=s.previousElementSibling;for(s=this.captionElm.nextElementSibling;s;)s.style.visibility="hidden",s=s.previousElementSibling;}},{key:"showAllNonCaptionElements",value:function(){for(var s=this.captionElm.previousElementSibling;s;)s.style.visibility="",s=s.previousElementSibling;for(s=this.captionElm.nextElementSibling;s;)s.style.visibility="",s=s.nextElementSibling;}},{key:"updateTransformOrigin",value:function(s){var l,g,f,v;s!==this.captionElm.style.transformOrigin&&(this.captionElm.style.scale?(l=0,this.captionElm.style.transformOrigin.includes("top")&&s.includes("bottom")?l=this.verticalPosition==="top"?1:-1:this.captionElm.style.transformOrigin.includes("bottom")&&s.includes("top")?l=this.verticalPosition==="top"?-1:1:this.captionElm.style.transformOrigin.includes("center")&&s.includes("top")?l=this.verticalPosition==="top"?-.5:.5:this.captionElm.style.transformOrigin.includes("top")&&s.includes("center")&&(l=this.verticalPosition==="top"?.5:-.5),g=0,this.captionElm.style.transformOrigin.includes("left")&&s.includes("right")?g=this.horizontalPosition==="left"?1:-1:this.captionElm.style.transformOrigin.includes("right")&&s.includes("left")?g=this.horizontalPosition==="left"?-1:1:this.captionElm.style.transformOrigin.includes("center")&&s.includes("left")?g=this.horizontalPosition==="left"?-.5:.5:this.captionElm.style.transformOrigin.includes("left")&&s.includes("center")&&(g=this.horizontalPosition==="left"?.5:-.5),this.captionElm.style.transformOrigin=s,this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect(),f=this.captionElmBoundingClientRect.height-parseFloat(this.captionElm.style.height),v=this.captionElmBoundingClientRect.width-parseFloat(this.captionElm.style.width),this.captionElm.style[this.verticalPosition]="".concat(parseFloat(this.captionElm.style[this.verticalPosition])+l*f,"px"),this.captionElm.style[this.horizontalPosition]="".concat(parseFloat(this.captionElm.style[this.horizontalPosition])+g*v,"px"),this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect()):this.captionElm.style.transformOrigin=s);}},{key:"transformToStyleScale",value:function(){var s,l,g=this.captionElm.style.transform,f=g.indexOf("scale");0<=f&&(s=g.indexOf(")",f),l=g.slice(f+6,s),this.captionElm.style.scale=l,this.captionElm.style.transform=g.slice(0,f)+g.slice(s+1));}},{key:"createStudioElements",value:function(){var s=this,l=(this.vdmStudio=document.createElement("div"),this.vdmStudio.classList.add("vdm-studio"),this.captionElm.parentElement.appendChild(this.vdmStudio),this.initialCaptionElmOpacity=this.captionElm.style.opacity,this._initialParentPointerEvents=this.captionElm.parentElement.style.pointerEvents,this.captionElm.parentElement.style.pointerEvents="none",this._disabledSiblingLayers=[],this.captionElm.parentElement);if(this._slideContainer=(S=this.captionElm.closest(".vdm-slide"))!=null?S:l.parentElement,this._slideContainer)for(var g=!1,f=0;f<this._slideContainer.children.length;f++){var v=this._slideContainer.children[f];v===l?g=!0:g&&v.style&&(this._disabledSiblingLayers.push({element:v,pointerEvents:v.style.pointerEvents}),v.style.pointerEvents="none");}this.gridLinesDiv={vertical:document.createElement("div"),horizontal:document.createElement("div")},this.gridLinesDiv.horizontal=document.createElement("div"),this.gridLinesDiv.horizontal.className="horizontal-line",this.gridLinesDiv.horizontal.style.opacity="0",this.gridLinesDiv.vertical=document.createElement("div"),this.gridLinesDiv.vertical.className="vertical-line",this.gridLinesDiv.vertical.style.opacity="0";var S=document.createElement("div");S.className="grid-lines",S.appendChild(this.gridLinesDiv.horizontal),S.appendChild(this.gridLinesDiv.vertical),this.vdmStudio.appendChild(S),this._options.aspectRatio==="vertical"&&(this.safeZonesDiv={top:document.createElement("div"),bottom:document.createElement("div"),right:document.createElement("div")},this.safeZonesDiv.top.className="safeZoneElement",this.safeZonesDiv.top.style.top="0px",this.safeZonesDiv.top.style.position="absolute",this.safeZonesDiv.top.style.width="100%",this.safeZonesDiv.top.style.height="100%",this.safeZonesDiv.top.style.opacity="0",this.safeZonesDiv.top.innerHTML=` 764 <svg viewBox="0 0 1080 1920" fill="none" xmlns="http://www.w3.org/2000/svg"> 765 <g clip-path="url(#clip0_18603_1477)"> 766 <rect x="1080" y="143" width="1080" height="179" transform="rotate(180 1080 143)" fill="url(#paint0_linear_18603_1477)"/> 767 <path d="M1056 84.9502C1056 115.298 1031.4 139.9 1001.05 139.9C970.702 139.9 946.1 115.298 946.1 84.9502C946.1 54.6021 970.702 30 1001.05 30C1031.4 30 1056 54.6021 1056 84.9502Z" fill="white" fill-opacity="0.79"/> 768 <rect x="314.252" y="53.8496" width="471.031" height="44.7181" rx="19.0678" fill="white" fill-opacity="0.79"/> 769 <rect x="31" y="50.8682" width="147.797" height="45.4761" rx="19.0678" fill="white" fill-opacity="0.79"/> 770 </g> 771 <defs> 772 <linearGradient id="paint0_linear_18603_1477" x1="1651.76" y1="311.575" x2="1651.76" y2="122.151" gradientUnits="userSpaceOnUse"> 773 <stop stop-opacity="0.7"/> 774 <stop offset="0.87" stop-color="#666666" stop-opacity="0"/> 775 </linearGradient> 776 <clipPath id="clip0_18603_1477"> 777 <rect width="1080" height="285.882" fill="white"/> 778 </clipPath> 779 </defs> 780 </svg> 781 `,this.vdmStudio.appendChild(this.safeZonesDiv.top),this.safeZonesDiv.bottom.className="safeZoneElement",this.safeZonesDiv.bottom.style.bottom="0px",this.safeZonesDiv.bottom.style.position="absolute",this.safeZonesDiv.bottom.style.width="100%",this.safeZonesDiv.bottom.style.height="100%",this.safeZonesDiv.bottom.style.opacity="0",this.safeZonesDiv.bottom.innerHTML=` 782 <svg viewBox="0 0 1080 1921" fill="none" xmlns="http://www.w3.org/2000/svg"> 783 <rect y="1022" width="1080" height="898.075" fill="url(#paint0_linear_18603_1461)"/> 784 <ellipse cx="121.283" cy="1470.92" rx="80.1808" ry="80.1808" fill="white" fill-opacity="0.79"/> 785 <mask id="mask0_18603_1461" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="41" y="1390" width="161" height="161"> 786 <circle cx="121.051" cy="1470.69" r="79.9492" fill="white" fill-opacity="0.82"/> 787 </mask> 788 <g mask="url(#mask0_18603_1461)"> 789 <circle cx="121.724" cy="1442.57" r="25.9
789142" fill="white"/> 790 <circle cx="121.724" cy="1528.95" r="48.9491" fill="white"/> 791 </g> 792 <rect x="240.353" y="1428.28" width="652.62" height="57.754" rx="21.3587" fill="white" fill-opacity="0.79"/> 793 <rect x="41.1018" y="1595.76" width="851.872" height="49.0909" rx="21.3587" fill="white" fill-opacity="0.79"/> 794 <rect x="41.1018" y="1702.61" width="851.872" height="49.0909" rx="21.3587" fill="white" fill-opacity="0.79"/> 795 <rect x="41.1018" y="1812.34" width="851.872" height="49.0909" rx="21.3587" fill="white" fill-opacity="0.79"/> 796 <defs> 797 <linearGradient id="paint0_linear_18603_1461" x1="571.765" y1="1867.77" x2="571.765" y2="917.395" gradientUnits="userSpaceOnUse"> 798 <stop stop-opacity="0.7"/> 799 <stop offset="0.84" stop-color="#666666" stop-opacity="0"/> 800 </linearGradient> 801 </defs> 802 </svg> 803 `,this.vdmStudio.appendChild(this.safeZonesDiv.bottom),this.safeZonesDiv.right.className="safeZoneElement",this.safeZonesDiv.right.style.bottom="0px",this.safeZonesDiv.right.style.right="0px",this.safeZonesDiv.right.style.position="absolute",this.safeZonesDiv.right.style.width="100%",this.safeZonesDiv.right.style.height="100%",this.safeZonesDiv.right.style.opacity="0",this.safeZonesDiv.right.innerHTML=` 804 <svg viewBox="0 0 1080 1920" fill="none" xmlns="http://www.w3.org/2000/svg"> 805 <path d="M978.799 1234.64C982.487 1234.01 986.269 1234.22 989.866 1235.25C993.463 1236.28 996.783 1238.1 999.583 1240.58L999.737 1240.72L999.879 1240.59C1002.55 1238.25 1005.69 1236.5 1009.09 1235.46C1012.49 1234.43 1016.07 1234.13 1019.6 1234.59L1020.62 1234.74C1025.07 1235.51 1029.22 1237.46 1032.64 1240.4C1036.07 1243.33 1038.63 1247.14 1040.07 1251.41C1041.5 1255.69 1041.76 1260.27 1040.8 1264.67C1039.85 1269.08 1037.72 1273.15 1034.64 1276.44L1033.89 1277.21L1033.69 1277.38L1002.65 1308.13C1001.93 1308.84 1000.98 1309.26 999.978 1309.33C998.972 1309.39 997.978 1309.08 997.179 1308.47L996.787 1308.13L965.566 1277.2C962.259 1273.99 959.906 1269.91 958.77 1265.44C957.634 1260.97 957.757 1256.27 959.127 1251.86C960.497 1247.46 963.06 1243.52 966.533 1240.48C970.005 1237.44 974.25 1235.42 978.799 1234.64Z" fill="white" fill-opacity="0.79"/> 806 <path d="M1039.92 1390.79C1037.73 1385.56 1034.54 1380.8 1030.53 1376.79C1026.54 1372.77 1021.79 1369.58 1016.57 1367.39C1011.21 1365.13 1005.46 1363.98 999.653 1363.99H999.458C993.55 1364.02 987.837 1365.19 982.456 1367.5C977.275 1369.71 972.575 1372.91 968.618 1376.92C964.651 1380.92 961.5 1385.66 959.341 1390.87C957.1 1396.28 955.964 1402.09 956.001 1407.95C956.03 1414.72 957.651 1421.45 960.679 1427.47V1442.31C960.679 1444.79 962.691 1446.8 965.161 1446.8H979.985C986.029 1449.85 992.698 1451.46 999.468 1451.49H999.673C1005.51 1451.49 1011.17 1450.36 1016.5 1448.14C1021.7 1445.98 1026.43 1442.82 1030.42 1438.84C1034.44 1434.85 1037.6 1430.18 1039.82 1424.98C1042.11 1419.59 1043.29 1413.85 1043.32 1407.94C1043.34 1401.99 1042.18 1396.22 1039.92 1390.79ZM980.161 1412.43C977.583 1412.43 975.483 1410.33 975.483 1407.74C975.483 1405.15 977.583 1403.05 980.161 1403.05C982.739 1403.05 984.839 1405.15 984.839 1407.74C984.839 1410.33 982.749 1412.43 980.161 1412.43ZM999.653 1412.43C997.075 1412.43 994.976 1410.33 994.976 1407.74C994.976 1405.15 997.075 1403.05 999.653 1403.05C1002.23 1403.05 1004.33 1405.15 1004.33 1407.74C1004.33 1410.33 1002.23 1412.43 999.653 1412.43ZM1019.15 1412.43C1016.57 1412.43 1014.47 1410.33 1014.47 1407.74C1014.47 1405.15 1016.57 1403.05 1019.15 1403.05C1021.72 1403.05 1023.82 1405.15 1023.82 1407.74C1023.82 1410.33 1021.72 1412.43 1019.15 1412.43Z" fill="white" fill-opacity="0.79"/> 807 <path d="M1007.5 1505.53C1013.03 1505.53 1018.32 1507.73 1022.23 1511.63C1026.14 1515.54 1028.33 1520.84 1028.33 1526.36V1584.7C1028.33 1585.45 1028.13 1586.19 1027.74 1586.84C1027.35 1587.49 1026.8 1588.02 1026.13 1588.37C1025.47 1588.73 1024.72 1588.9 1023.96 1588.86C1023.21 1588.82 1022.48 1588.58 1021.85 1588.16L999.167 1573.04L976.483 1588.16C975.889 1588.56 975.202 1588.8 974.488 1588.86C973.775 1588.91 973.059 1588.78 972.411 1588.48C971.762 1588.18 971.201 1587.72 970.784 1587.14C970.366 1586.55 970.105 1585.88 970.025 1585.16L970 1584.7V1526.36C970 1520.84 972.195 1515.54 976.102 1511.63C980.009 1507.73 985.308 1505.53 99
8070.833 1505.53H1007.5Z" fill="white" fill-opacity="0.79"/> 808 <path d="M1010 1663.22V1643.22L1045 1678.22L1010 1713.22V1693.22C985 1693.22 967.5 1700.72 955 1718.22L959 1703.22L960 1701.22C964.01 1690.88 970.805 1681.86 979.631 1675.16C988.457 1668.45 998.969 1664.32 1010 1663.22Z" fill="white" fill-opacity="0.79"/> 809 <circle cx="998.347" cy="1128.35" r="48.3469" fill="white" fill-opacity="0.79"/> 810 <circle cx="998.347" cy="1819.92" r="48.3469" fill="white" fill-opacity="0.79"/> 811 </svg> 812 `,this.vdmStudio.appendChild(this.safeZonesDiv.right)),this.studioBox=document.createElement("div"),this.studioBox.classList.add("studio-box"),((S=this._slideContainer)!=null?S:this.captionElm.parentElement).appendChild(this.studioBox),this.useTouchAsPointerDevice||(this.leftTopHandle=(S=function(w){var C=document.createElement("div");return C.classList.add("studio-box-handle"),C.setAttribute(w.replace(" ","-"),""),s.studioBox.appendChild(C),C;})(b.LEFT_TOP),this.leftBottomHandle=S(b.LEFT_BOTTOM),this.rightTopHandle=S(b.RIGHT_TOP),this.rightBottomHandle=S(b.RIGHT_BOTTOM));}},{key:"syncBoundingBoxPosition",value:function(){var s=20*(this.captionElm.style.scale?parseFloat(this.captionElm.style.scale):1),l=(this.studioBox.style.width="".concat(this.captionElmBoundingClientRect.width+s,"px"),this.studioBox.style.height="".concat(this.captionElmBoundingClientRect.height+s,"px"),(l=(l=this._slideContainer)==null?void 0:l.getBoundingClientRect())!=null?l:this.vdmBoundingClientRect);this.studioBox.style.top="".concat(this.captionElmBoundingClientRect.top-l.top-s/2,"px"),this.studioBox.style.left="".concat(this.captionElmBoundingClientRect.left-l.left-s/2,"px");}},{key:"dispatchEvents",value:function(s,l,g){if(0<this._eventListeners.size){if(s==="start"){if(this.eventsStartState.get(l))return;this.eventsStartState.set(l,g);}else if(s==="end"){if(!this.eventsStartState.get(l)||this.eventsStartState.get(l)!==g)return;this.eventsStartState.delete(l);}var f,v,S,g=1/this._options.scale,w=this.horizontalPosition==="right"?"".concat(g*(this.vdmBoundingClientRect.right-this.captionElmBoundingClientRect.right),"px"):"".concat(g*(this.captionElmBoundingClientRect.left-this.vdmBoundingClientRect.left),"px"),C=((this.rtlLayout&&this.horizontalPosition==="left"||!this.rtlLayout&&this.horizontalPosition==="right")&&(w="".concat(g*(this.vdmBoundingClientRect.width-this.captionElmBoundingClientRect.width)-parseFloat(w),"px")),"".concat(g*(this.captionElmBoundingClientRect.top-this.vdmBoundingClientRect.top),"px")),I=this.captionElm.style.scale?parseFloat(this.captionElm.style.scale):1,O=this._studioId,M=(this._fixedSize&&(f={width:this.captionElmBoundingClientRect.width*g,height:this.captionElmBoundingClientRect.height*g}),l==="position"?v=Object.assign(Object.assign(Object.assign({studioId:O},this._isCentredX?{centerX:!0}:{x:w}),this._isCentredY?{centerY:!0}:{y:C}),{state:s}):l==="scale"?v=Object.assign(Object.assign({studioId:O},this._fixedSize?f:{scale:I}),{state:s}):l==="studioId"?v=Object.assign(Object.assign(Object.assign({studioId:O},this._isCentredX?{centerX:!0}:{x:w}),this._isCentredY?{centerY:!0}:{y:C}),this._fixedSize?f:{scale:I}):l==="attachedToGrid"?v={studioId:O}:l==="transform"&&(v=Object.assign(Object.assign(Object.assign(Object.assign({studioId:O},this._isCentredX?{centerX:!0}:{x:w}),this._isCentredY?{centerY:!0}:{y:C}),this._fixedSize?f:{scale:I}),{state:s})),n(this._eventListeners.keys()));try{for(M.s();!(S=M.n()).done;){var N=S.value;l&&l!==N||v&&this._eventListeners.dispatchEvent(new CustomEvent(N,{detail:v}));}}catch(H){M.e(H);}finally{M.f();}}}},{key:"addEventListeners",value:function(){var s=this.useTouchAsPointerDevice?"touchstart":"mousedown";this.studioBox.addEventListener(s,this.routePointerEvent),this.useTouchAsPointerDevice?document.addEventListener(s,this.documentPinchEvent):(this.leftTopHandle.addEventListener(s,this.resizeElementByHandle),this.rightTopHandle.addEventListener(s,this.resizeElementByHandle),this.leftBottomHandle.addEventListener(s,this.resizeElementByHandle),this.rightBottomHandle.addEventListener(s,this.resizeElementByHandle));}},{key:"removeEventListeners",value:function(){var s=this.useTouchAsPointerDevice?"touchstart":"mousedown";this.studioBox.removeEventListener(s,this.routePointerEvent),this.useTouchAsPointerDevice?document.removeEventListener(s,this.documentPinchEvent):(this.leftTopHandle.removeEventListener(s,this.resizeElementByHandle),this.rightTopHandle.removeEventListener(s,this.resizeElementByHandle),this.leftBottomHandle.removeEventListener(s,this.resizeElementByHandle),this.rightBottomHandle.removeEventListener(s,this.resizeElementByHandle));}},{key:"normalizeX",value:function(s,l){return this.horizontalPosition==="left"?s:s+this.currentWidth-this.currentWidth/l;}},{key:"normalizeY",value:function(s,l){var g;return this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.verticalPosition==="top"?(g=this.captionElm.style[this.verticalPosition])!=null&&g.includes("calc")?(this.vdmBoundingClientRect.height-this.currentHeight)/2+s:s:this.vdmBoundingClientRect.height-this.currentHeight/l-s;}},{key:"dispose",value:function(){if(this.captionElm.style.opacity=this.initialCaptionElmOpacity,this.captionElm.parentElement.style.pointerEvents=this._initialParentPointerEvents,this._disabledSiblingLayers){var s,l=n(this._disabledSiblingLayers);try{for(l.s();!(s=l.n()).done;){var g=s.value;g.element.style.pointerEvents=g.pointerEvents;}}catch(v){l.e(v);}finally{l.f();}this._disabledSiblingLayers=[];}document.body.style.touchAction=this.initialTouchAction,this.removeEventListeners(),this.gridLinesDiv.horizontal.remove();var f=this.gridLinesDiv.vertical.parentElement;this.gridLinesDiv.vertical.remove(),f.remove(),this.safeZonesDiv&&(this.safeZonesDiv.top.remove(),this.safeZonesDiv.top=void 0,this.safeZonesDiv.bottom.remove(),this.safeZonesDiv.bottom=void 0,this.safeZonesDiv.right.remove(),this.safeZonesDiv.right=void 0,this.safeZonesDiv=void 0),this.useTouchAsPointerDevice?this.studioMetaTag.remove():(this.leftTopHandle.remove(),this.rightTopHandle.remove(),this.leftBottomHandle.remove(),this.rightBottomHandle.remove()),this.studioBox.remove(),this.vdmStudio.remove(),this.studioStyle.remove(),this._slideContainer=null,this.leftTopHandle=void 0,this.rightTopHandle=void 0,this.leftBottomHandle=void 0,this.rightBottomHandle=void 0,this.studioBox=void 0,this.vdmStudio=void 0,this.studioMetaTag=void 0,this.studioStyle=void 0,this.captionElm=void 0;}},{key:"position",get:function(){var l=1/this._options.scale,s=this.horizontalPosition==="right"?"".concat(l*(this.vdmBoundingClientRect.right-this.captionElmBoundingClientRect.right),"px"):"".concat(l*(this.captionElmBoundingClientRect.left-this.vdmBoundingClientRect.left),"px"),l=((this.rtlLayout&&this.horizontalPosition==="left"||!this.rtlLayout&&this.horizontalPosition==="right")&&(s="".concat(l*(this.vdmBoundingClientRect.width-this.captionElmBoundingClientRect.width)-p
812arseFloat(s),"px")),"".concat(l*(this.captionElmBoundingClientRect.top-this.vdmBoundingClientRect.top),"px"));return Object.assign(Object.assign({},this._isCentredX?{centerX:!0}:{x:s}),this._isCentredY?{centerY:!0}:{y:l});},set:function(s){var l=typeof s.x=="number"?s.x:parseFloat(s.x),g=typeof s.y=="number"?s.y:parseFloat(s.y),f=((this.rtlLayout&&this.horizontalPosition==="left"||!this.rtlLayout&&this.horizontalPosition==="right")&&(l=1/this._options.scale*(this.vdmBoundingClientRect.width-this.captionElmBoundingClientRect.width)-l),l=this._options.scale*l,g=this._options.scale*g,this.captionElm.style.scale?parseFloat(this.captionElm.style.scale):1);l=this.normalizeX(l,f),g=this.normalizeY(g,f),s.centerX?(l=this.vdmBoundingClientRect.width/2-this.currentWidth/2,this._isCentredX=!0):s.x!==void 0&&(this._isCentredX=!1),s.centerY?(g=(this.vdmBoundingClientRect.height-this.currentHeight)/2,this.verticalPosition==="bottom"&&(g+=(f-1)*this.currentHeight/f),this._isCentredY=!0):s.y!==void 0&&(this._isCentredY=!1),this.captionElm.style[this.horizontalPosition]="".concat(l,"px"),this.captionElm.style[this.verticalPosition]="".concat(g,"px"),this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect(),this.syncBoundingBoxPosition(),this.dispatchEvents(void 0,"position");}},{key:"scale",get:function(){return this.captionElm.style.scale===""?"1":this.captionElm.style.scale;},set:function(s){var l;typeof s=="number"&&(s=s.toFixed(2)),this.rtlLayout?this.updateTransformOrigin("right top"):this.updateTransformOrigin(h.STUDIO_TRANSFORM_ORIGIN),this._fixedSize?(l=typeof s=="number"?s:parseFloat(s)||1,this.captionElm.style.width="".concat(this.originalWidth*l,"px"),this.captionElm.style.height="".concat(this.originalHeight*l,"px")):this.captionElm.style.scale=s.toString(),this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect(),this.currentWidth=this.captionElmBoundingClientRect.width,this.currentHeight=this.captionElmBoundingClientRect.height,this._isCentredX&&(l=this.vdmBoundingClientRect.width/2-this.currentWidth/2,this.captionElm.style[this.horizontalPosition]="".concat(l,"px")),this._isCentredY&&(l=(this.vdmBoundingClientRect.height-this.currentHeight)/2,this.verticalPosition!=="bottom"||this._fixedSize||(l+=((s=typeof s=="number"?s:parseFloat(s))-1)*this.currentHeight/s),this.captionElm.style[this.verticalPosition]="".concat(l,"px")),(this._isCentredX||this._isCentredY)&&(this.vdmBoundingClientRect=this.vdmStudio.parentElement.getBoundingClientRect(),this.captionElmBoundingClientRect=this.captionElm.getBoundingClientRect()),this.syncBoundingBoxPosition(),this.updateTransformOrigin(h.STUDIO_TRANSFORM_ORIGIN),this.dispatchEvents(void 0,"scale");}},{key:"studioId",get:function(){return this._studioId;}},{key:"getElementTransform",value:function(){var s=this.vdmStudio.parentElement.getBoundingClientRect(),l=this.captionElm.getBoundingClientRect(),g=1/this._options.scale,f=this.horizontalPosition==="right"?"".concat(g*(s.right-l.right),"px"):"".concat(g*(l.left-s.left),"px");return(this.rtlLayout&&this.horizontalPosition==="left"||!this.rtlLayout&&this.horizontalPosition==="right")&&(f="".concat(g*(s.width-l.width)-parseFloat(f),"px")),Object.assign(Object.assign(Object.assign({studioId:this._studioId},this._fixedSize?{width:l.width*g,height:l.height*g}:{scale:this.captionElm.style.scale||"1"}),this._isCentredX?{centerX:!0}:{x:f}),this._isCentredY?{centerY:!0}:{y:"".concat(g*(l.top-s.top),"px")});}},{key:"simulateDragEvent",value:function(s,l){var g;y.default.isTouchDevice()&&y.default.isMobileDevice()?(g=new TouchEvent("touchstart",{bubbles:!0,cancelable:!0,touches:[new Touch({identifier:Date.now(),target:this.studioBox,clientX:s,clientY:l,radiusX:1,radiusY:1,rotationAngle:0,force:.5})]}),this.studioBox.dispatchEvent(g)):(g=new MouseEvent("mousedown",{view:window,bubbles:!0,cancelable:!0,clientX:s,clientY:l}),this.studioBox.dispatchEvent(g));}}])&&x(d.prototype,m),a&&x(d,a),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,m,a;}();r.default=p;}]);});La();Ki();Mr();Ki();Mr();var Va=oo(la());hi();Na();Os();Mr();Cc();hi();mt();Or();vn();mt();La();Or();var en=(()=>{class i{constructor(e,t,n,o,_,E){if(this.router=e,this.route=t,this.storyService=n,this.composerService=o,this.eventsService=_,this._isStoryTranslated=!1,this._originLang=void 0,this._editLang=void 0,this._parentStoryId=void 0,this._editStoryId=void 0,this._videoDuration=void 0,this._isCaptionsEmphasized=!1,this._isUserTriedAutoFixed=!1,this._wordsPerSlide=void 0,this._firstSceneLayout=void 0,this._bRollFeatures=void 0,this._emphasizedCaptions=void 0,this._takeId=void 0,this._makerVersion=M_(Xn()),E)throw new Error("ComposerEventsService is already loaded");let x=this.getStoryFromRoute();"parent"in x&&(this._parentStoryId=x.parent.storyId,this._editStoryId=x.storyId??x.id,this._takeId=x.parent.videoId);
812let h=this.route.snapshot.data.importState,y=h?.features;this._isCaptionsEmphasized=!!y?.emphasize,this._isUserTriedAutoFixed=!!y?.userTriedAutoFixed,this._wordsPerSlide=y?.wordsPerSlide,this._firstSceneLayout=y?.firstSceneLayout,this._editLang=h?.segmentation?.lang,this._bRollFeatures=y?.bRoll;}getStoryFromRoute(){return this.route.snapshot.data.story;}get makerVersion(){return this._makerVersion;}log(e,t){this.eventsService.log(e,Ke({storyId:this._parentStoryId,editStoryId:this._editStoryId,makerVersion:this._makerVersion},t));}get isCaptionsEmphasized(){return this._isCaptionsEmphasized;}get isBRollApplied(){return!!this._bRollFeatures;}get isStoryTranslated(){return this._isStoryTranslated;}get isUserTriedAutoFixed(){return this._isUserTriedAutoFixed;}get firstSceneLayout(){return this._firstSceneLayout;}get wordsPerSlide(){return this._wordsPerSlide;}get originLang(){return this._originLang;}set originLang(e){this._originLang=e,this._isStoryTranslated=!!(this._editLang&&this._originLang&&this._editLang!==this._originLang);}get editLang(){return this._editLang;}get parentStoryId(){return this._parentStoryId;}set parentStoryId(e){this._parentStoryId=e;}get editStoryId(){return this._editStoryId;}set editStoryId(e){this._editStoryId=e;}get takeId(){return this._takeId;}set takeId(e){this._takeId=e;}get videoDuration(){return this._videoDuration;}set videoDuration(e){this._videoDuration=e;}get emphasizedCaptions(){return this._emphasizedCaptions;}set emphasizedCaptions(e){this._emphasizedCaptions=e;}get bRollAmount(){if(this._bRollFeatures)switch(this._bRollFeatures.amount){case Ml.FEW:return"few";case Ml.SOME:return"some";case Ml.HIGHT:return"many";case Ml.ALL:return"all";default:return;}else return;}get bRollSource(){if(this._bRollFeatures){let e=[];return this._bRollFeatures.assets?.user&&e.push("user assets"),this._bRollFeatures.assets?.system&&e.push("bank"),this._bRollFeatures.library?.includes(C_.PEXELS)&&e.push("free stock"),e.sort();}else return;}getSoundBedInfo(e){if(!e.soundbed)return{soundBedType:"none"};let n=this.composerService.musicListUpdated$.getValue()?.find(_=>_.id===e.soundbed.assetId);return n?{soundBedType:n.level==="system"?"library":n.tags?.includes("ai")?"ai":"upload",soundBedAssetName:n.title}:{soundBedType:"unknown"};}buildBasePayload(e,t){let{soundBedType:n,soundBedAssetName:o}=this.getSoundBedInfo(e);return{storyId:this._parentStoryId,editStoryId:this._editStoryId,mediaId:this._takeId,soundBedAssetId:e.soundbed?.assetId,soundBedAssetName:o,soundBedType:n,soundBedVolume:e.soundbed?.volume?.toString(),outroTemplateId:e.outtro?.templateIds,introTemplateId:e.intro?.templateIds,originalOrientation:t?.aspectRatio,selectedOrientation:e.aspectRatio,cropped:("zoom"in e).toString(),boostAudio:e.composerSessionState?.audioNorm?.toString(),logo:(e.media?.some(_=>"bug"in _)??!1).toString(),intro:("intro"in e).toString(),outro:("outtro"in e).toString(),aiZoom:((e.composerSessionState?.autoZoomSlidesIndexes?.length??0)>0).toString(),introDuration:e.intro?.data?.duration?.toString(),outroDuration:e.outtro?.data?.duration?.toString(),captionsRandomRotation:this.storyService.isRandomRotationEnabled().toString(),videoDuration:this._videoDuration?.toString(),numSlides:e.media?.length?.toString(),emphasized:this._isCaptionsEmphasized.toString(),emphasizedWordNum:this._emphasizedCaptions?.emphasizedWords,emphasizedWordPerc:this._emphasizedCaptions?.emphasizedWordsPerc,themeName:this.storyService.themeName,themeVariationName:this.storyService.getVariationName(e.themeVariationId),speechSyncAnimation:e.metadata?.speechSyncAnimation?.toString()||"none",layoutsUsed:this.storyService.getUsedLayoutNames(!0),isTranslated:this._isStoryTranslated.toString(),originLang:this._originLang,editLang:this._editLang,autoFixed:this._isUserTriedAutoFixed.toString(),broll:this.isBRollApplied.toString(),brollSource:this.bRollSource,brollAmount:this.bRollAmount,soundBedFilterGenre:this.composerService.activeMusicFilters?.genre?.length?this.composerService.activeMusicFilters.genre:void 0,soundBedFilterMood:this.composerService.activeMusicFilters?.mood?.length?this.composerService.activeMusicFilters.mood:void 0,soundBedFilterVibe:this.composerService.activeMusicFilters?.vibe?.length?this.composerService.activeMusicFilters.vibe:void 0};}buildPreviewPayload(e){try{let{story:t,wrapperThumbnailData:n,previewType:o,outroIntro:_,index:E}=e;return st(Ke({},this.buildBasePayload(t,n)),{captionThemeId:t.themeVariationId,previewType:o,outroIntro:_.toString(),index:E?.toString()});}catch(t){Qt(t);return;}}buildApplyThemePayload(e){try{let{story:t,wrapperThumbnailData:n,lowerThird:o}=e;return st(Ke({},this.buildBasePayload(t,n)),{captionThemeId:t.themeId,captions:"true",lowerThird:o.toString(),headline:t.headline});}catch(t){Qt(t);return;}}static{this.ɵfac=function(t){return new(t||i)(Rt(Co),Rt(zo),Rt(zi),Rt(nr),Rt(Ji),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();La();function ex(i,r){i&1&&(ti(0),tt(1,"div",12)(2,"div",13)(3,"div",14)(4,"div",15)(5,"div",16)(6,"div",17)(7,"div",18)(8,"div",19)(9,"div",20)(10,"div",21),ii());}function tx(i,r){if(i&1){let e=_t();be(0,"div",22)(1,"div",23)(2,"span")(3,"button",24),Ze("click",function(){$e(e);let n=Le();return We(n.cancelCropping());}),lt(4,"Cancel"),Oe()(),be(5,"span")(6,"button",25),Ze("click",function(){$e(e);let n=Le();return We(n.cropVideo());}),lt(7,"Crop"),Oe()()()();}if(i&2){let e=Le();Li("top",e.top-53-10,"px")("left",e.left+e.width/2-155/2,"px");}}function ix(i,r){if(i&1&&(be(0,"div",26)(1,"div",27),tt(2,"lottie-loader",28),be(3,"span"),lt(4),Oe()()()),i&2){let e=Le();Ce(2),ke("path","/assets/lottie-face.json")("lottieWidth",33)("lottieHeight",33)("lottieSpeed",1),Ce(2),_i(e.dialogText);}}var o0=i=>{if(i===Nr.AspectRatioEnum.VERTICAL)return"vertical";if(i===Nr.AspectRatioEnum.HORIZONTAL)return"horizontal";if(i===Nr.AspectRatioEnum.SQUARE)return"square";},a0=i=>{switch(i){case"horizontal":return Nr.AspectRatioEnum.HORIZONTAL;case"vertical":return Nr.AspectRatioEnum.VERTICAL;case"square":return Nr.AspectRatioEnum.SQUARE;}return Nr.AspectRatioEnum.NONE;},td=(()=>{class i extends w_{constructor(e,t,n,o,_){super(),this.styleVideoService=e,this.composerService=t,this.eventsService=n,this.composerEventsService=o,this.route=_,this.variant="classic",this.initCropperData=()=>{this.styleVideoService.styleSidebarCroppingData$.pipe(qs()).subscribe(E=>{this.videoAspectRatio=a0(E.storyAspectRatio),this.cropperBoxMaxWidth=E.wrapperThumbnail.width,this.cropperBoxMaxHeight=E.wrapperThumbnail.height,this.thumbnailAspectRatio=a0(E.wrapperThumbnail.aspectRatio),this.top=0,this.left=0,this.width=this.cropperBoxMaxWidth,this.height=this.cropperBoxMaxHeight;let x=(h,y)=>{switch(y){case"vertical":return h.width<h.height;case"horizontal":return h.width>h.height;case"square":return h.width===h.height;default:return!1;}};E.cropCoordinates&&x(E.cropCoordinates,E.storyAspectRatio)?(document.getElementsByClassName("composer-cropper-box")[0]?.classList.remove("composer-cropper-box-no-animation"),this.top=E.cropCoordinates.y,this.left=E.cropCoordinates.x,this.width=E.cropCoordinates.width,this.height=E.cropCoordinates.height):this.findHeadCoordinates(E.thumbnailURL),this.composerEventsService.log(this.eventsService.events.composer.enterCrop,{originalRatio:o0(this.thumbnailAspectRatio),targetRatio:o0(this.videoAspectRatio)});});}
812,this.getStoryFromRoute=()=>this.route.snapshot.data.story,this.cropVideo=()=>{let E={x:this.left,y:this.top,width:this.width,height:this.height};this.composerService.cropAction$.next([ca.CROP_VIDEO,E]),this.composerEventsService.log(this.eventsService.events.composer.saveCrop,{changed:this.userModifiedSuggestedCrop.toString()});},this.cancelCropping=()=>{this.composerService.cropAction$.next(ca.CANCEL_CROPPING),this.composerEventsService.log(this.eventsService.events.composer.cancelCrop);},this.onHeadPosition=E=>{let x=E!==void 0;this.composerEventsService.log(this.eventsService.events.composer.headFound,{found:x.toString()});},this.positionByHeadCoordinates=E=>{this.positionCropBox(E.boundingBox.xCenter,E.boundingBox.yCenter);},this.positionCropBox=(E,x)=>{document.getElementsByClassName("composer-cropper-box")[0]?.classList.remove("composer-cropper-box-no-animation");let h=this.cropperBoxMaxWidth*E>=35?this.cropperBoxMaxWidth*E:35,y=this.cropperBoxMaxHeight*x>=35?this.cropperBoxMaxHeight*x:35,b,p,c,d;this.thumbnailAspectRatio===this.videoAspectRatio?h>this.cropperBoxMaxWidth/2&&y<this.cropperBoxMaxHeight/2?(c=2*(this.cropperBoxMaxWidth-h),d=c*this.videoAspectRatio,p=this.cropperBoxMaxWidth-c,b=0):h>this.cropperBoxMaxWidth/2&&y>this.cropperBoxMaxHeight/2?(c=2*(this.cropperBoxMaxWidth-h),d=c*this.videoAspectRatio,p=this.cropperBoxMaxWidth-c,b=this.cropperBoxMaxHeight-d):h<this.cropperBoxMaxWidth/2&&y>this.cropperBoxMaxHeight/2?(c=2*h,d=c*this.videoAspectRatio,p=0,b=this.cropperBoxMaxHeight-d):h<this.cropperBoxMaxWidth/2&&y<this.cropperBoxMaxHeight/2?(c=2*h,d=c*this.videoAspectRatio,p=0,b=0):(c=this.cropperBoxMaxWidth,d=this.cropperBoxMaxHeight,p=0,b=0):this.thumbnailAspectRatio==Nr.AspectRatioEnum.HORIZONTAL?this.videoAspectRatio===Nr.AspectRatioEnum.VERTICAL?(c=this.cropperBoxMaxHeight/this.videoAspectRatio,d=this.cropperBoxMaxHeight,p=h-c/2,b=0):this.videoAspectRatio===Nr.AspectRatioEnum.SQUARE&&(c=this.cropperBoxMaxHeight,d=this.cropperBoxMaxHeight,p=h-c/2,b=y-d/2):this.thumbnailAspectRatio==Nr.AspectRatioEnum.VERTICAL?this.videoAspectRatio===Nr.AspectRatioEnum.HORIZONTAL?(c=this.cropperBoxMaxWidth,d=c*this.videoAspectRatio,p=0,b=y-d/2):this.videoAspectRatio===Nr.AspectRatioEnum.SQUARE&&(c=this.cropperBoxMaxWidth,d=c,p=h-c/2,b=y-d/2):this.thumbnailAspectRatio==Nr.AspectRatioEnum.SQUARE&&(this.videoAspectRatio===Nr.AspectRatioEnum.HORIZONTAL?(c=this.cropperBoxMaxWidth,d=c*this.videoAspectRatio,p=0,b=y-d/2):this.videoAspectRatio===Nr.AspectRatioEnum.VERTICAL&&(c=this.cropperBoxMaxHeight/this.videoAspectRatio,d=this.cropperBoxMaxHeight,p=h-c/2,b=0)),this.videoAspectRatio>0&&(c>=35||(c=Math.min(35,this.cropperBoxMaxWidth),d=c*this.videoAspectRatio),d>this.cropperBoxMaxHeight&&(d=this.cropperBoxMaxHeight,c=d/this.videoAspectRatio)),p=p<0?0:p,b=b<0?0:b,p+=p+c>this.cropperBoxMaxWidth?this.cropperBoxMaxWidth-(p+c):0,b+=b+d>this.cropperBoxMaxHeight?this.cropperBoxMaxHeight-(b+d):0,this.width=c,this.height=d,this.left=p,this.top=b;};}ngOnInit(){this.initCropperData();}static{this.ɵfac=function(t){return new(t||i)(ut(is),ut(nr),ut(Ji),ut(en),ut(zo));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-cropper"]],hostVars:2,hostBindings:function(t,n){t&2&&Di("composer-cropper--minimal",n.variant==="minimal");},inputs:{variant:"variant"},standalone:!0,features:[Mn,Ft],decls:13,vars:17,consts:[["corner-id","-1",1,"composer-cropper-box","composer-cropper-box-no-animation",3,"mousedown"],["corner-id","0",1,"ccb-corner-tl",3,"mousedown"],["corner-id","1",1,"ccb-corner-tr",3,"mousedown"],["corner-id","2",1,"ccb-corner-br",3,"mousedown"],["corner-id","3",1,"ccb-corner-bl",3,"mousedown"],["corner-id","-1",1,"ccb-grid-v",2,"left","33.33%"],["corner-id","-1",1,"ccb-grid-v",2,"left","66.66%"],["corner-id","-1",1,"ccb-grid-h",2,"top","33.33%"],["corner-id","-1",1,"ccb-grid-h",2,"top","66.66%"],[4,"ngIf"],["class","composer-cropper-menu",3,"top","left",4,"ngIf"],["class","composer-cropper-dialog-overlay",4,"ngIf"],["corner-id","-1",1,"ccb-grid-v",2,"left","50%","border-color","rgba(255, 0, 0, 0.5)"],["corner-id","-1",1,"ccb-grid-h",2,"top","50%","border-color","rgba(255, 0, 0, 0.5)"],["corner-id","-1",1,"ccb-grid-v",2,"left","33.33%","top","calc(33.33% - 2.5%)","border-color","rgba(255, 0, 0, 0.5)","height","5%"],["corner-id","-1",1,"ccb-grid-h",2,"left","calc(33.33% - 2.5%)","top","33.33%","border-color","rgba(255, 0, 0, 0.5)","width","5%"],["corner-id","-1",1,"ccb-grid-v",2,"left","66.66%","top","calc(33.33% - 2.5%)","border-color","rgba(255, 0, 0, 0.5)","height","5%"],["corner-id","-1",1,"ccb-grid-h",2,"left","calc(66.66% - 2.5%)","top","33.33%","border-color","rgba(255, 0, 0, 0.5)","width","5%"],["corner-id","-1",1,"ccb-grid-v",2,"left","33.33%","top","calc(66.66% - 2.5%)","border-color","rgba(255, 0, 0, 0.5)","height","5%"],["corner-id","-1",1,"ccb-grid-h",2,"left","calc(33.33% - 2.5%)","top","66.66%","border-color","rgba(255, 0, 0, 0.5)","width","5%"],["corner-id","-1",1,"ccb-grid-v",2,"left","66.66%","top","calc(66.66% - 2.5%)","border-color","rgba(255, 0, 0, 0.5)","height","5%"],["corner-id","-1",1,"ccb-grid-h",2,"left","calc(66.66% - 2.5%)","top","66.66%","border-color","rgba(255, 0, 0, 0.5)","width","5%"],[1,"composer-cropper-menu"],[1,"ccm-container"],[3,"click"],[1,"ccm-crop-button",3,"click"],[1,"composer-cropper-dialog-overlay"],[1,"composer-cropper-dialog"],[2,"margin-right","10px",3,"path","lottieWidth","lottieHeight","lottieSpeed"]],template:function(t,n){t&1&&(be(0,"div")(1,"div",0),Ze("mousedown",function(_){return n.onCropBoxMouseDown(_);}),be(2,"div",1),Ze("mousedown",function(_){return n.onCropBoxCornerMouseDown(_);}),Oe(),be(3,"div",2),Ze("mousedown",function(_){return n.onCropBoxCornerMouseDown(_);}),Oe(),be(4,"div",3),Ze("mousedown",function(_){return n.onCropBoxCornerMouseDown(_);}),Oe(),be(5,"div",4),Ze("mousedown",function(_){return n.onCropBoxCornerMouseDown(_);}),Oe(),tt(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),at(10,ex,11,0,"ng-container",9),Oe(),at(11,tx,8,4,"div",10)(12,ix,5,5,"div",11),Oe()),t&2&&(Li("width",n.cropperBoxMaxWidth,"px")("height",n.cropperBoxMaxHeight,"px"),Ce(),Li("width",n.width,"px")("height",n.height,"px")("top",n.top,"px")("left",n.left,"px")("opacity",n.showDetectionDialog?0:1),Ce(9),ke("ngIf",n.variant==="classic"),Ce(),ke("ngIf",n.variant==="classic"&&!n.showDetectionDialog&&!n.isMouseDown),Ce(),ke("ngIf",n.showDetectionDialog));},dependencies:[ui,aa],styles:['[_nghost-%COMP%]{--ccb-border: 5px solid white;--ccb-corner-border: 5px solid white;--ccb-border-active-color: rgba(0, 171, 254, .7);--ccb-corner-border-active-color: rgba(0, 171, 254, 1)}.composer-cropper-box[_ngcontent-%COMP%]{color:#fff;z-index:21;position:absolute;top:0;left:0;background-color:#0003;border:var(--ccb-border);cursor:move;-webkit-user-select:none;user-select:none;animation:_ngcontent-%COMP%_scale-up-from-center .2s cubic-bezier(.39,.575,.565,1) both}.composer-cropper-box-no-animation[_ngcontent-%COMP%]{animation:none!important}.composer-cropper-box.active[_ngcontent-%COMP%]{border-color:var(--ccb-border-active-color)}@keyframes _ngcontent-%COMP%_scale-up-from-center{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.composer-cropper-dialog-overlay[_ngcontent-%COMP%]{position:absolute;width:120%;height:120%;z-index:21;top:-10%;left:-10%}.composer-cropper-dialog[_ngcontent-%COMP%]{width:250px;height:48px;background-color:#fff;display:flex;align-items:center;border-radius:10px;margin:-24px 0 0 -125px;top:50%;position:relative;
812left:50%;z-index:21;animation:_ngcontent-%COMP%_scale-up-from-center .1s cubic-bezier(.39,.575,.565,1) both;box-shadow:0 4px 8px #0003,0 6px 20px #00000030;padding-left:8px}.composer-cropper-dialog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;font-size:14px;font-family:Inter-Bold;color:#253658}.composer-cropper-menu[_ngcontent-%COMP%]{position:absolute;width:155px;height:53px;border-radius:10px;box-shadow:0 0 16px #13131324;background-image:linear-gradient(to left,#131313,#404040 0%);animation:_ngcontent-%COMP%_scale-up-from-bottom .2s cubic-bezier(.39,.575,.565,1) both}.composer-cropper-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#fff!important}.composer-cropper-menu[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:45%;width:0;height:0;border-top:solid 9px #404040;border-left:solid 7px transparent;border-right:solid 7px transparent}.ccm-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;place-content:space-evenly}.ccm-crop-button[_ngcontent-%COMP%]{width:70px;height:34px;border-radius:10px;background-color:#00d096}@keyframes _ngcontent-%COMP%_scale-up-from-bottom{0%{transform:scale(0);transform-origin:50% 100%}to{transform:scale(1);transform-origin:50% 100%}}.ccb-corner-tl[_ngcontent-%COMP%]{border-top:var(--ccb-corner-border);border-left:var(--ccb-corner-border);top:-10px;left:-10px;cursor:nw-resize}.ccb-corner-tr[_ngcontent-%COMP%]{border-top:var(--ccb-corner-border);border-right:var(--ccb-corner-border);top:-10px;right:-10px;cursor:ne-resize}.ccb-corner-bl[_ngcontent-%COMP%]{border-bottom:var(--ccb-corner-border);border-left:var(--ccb-corner-border);bottom:-10px;left:-10px;cursor:sw-resize}.ccb-corner-br[_ngcontent-%COMP%]{border-bottom:var(--ccb-corner-border);border-right:var(--ccb-corner-border);bottom:-10px;right:-10px;cursor:se-resize}div[class^=ccb-corner][_ngcontent-%COMP%]{position:absolute;width:20px;height:20px}div[class^=ccb-corner].active[_ngcontent-%COMP%]{border-color:var(--ccb-corner-border-active-color)}.ccb-grid-v[_ngcontent-%COMP%]{border-left:1px dashed rgba(255,255,255,.5);height:100%;position:absolute}.ccb-grid-h[_ngcontent-%COMP%]{border:1px dashed rgba(255,255,255,.5);width:100%;position:absolute}div[class^=ccb-grid].active[_ngcontent-%COMP%]{border-color:var(--ccb-border-active-color)}.composer-cropper--minimal[_nghost-%COMP%]{--ccb-border: 2px solid white;--ccb-corner-border: 10px solid white}.composer-cropper--minimal[_nghost-%COMP%] .composer-cropper-box[_ngcontent-%COMP%]{background-color:transparent}.composer-cropper--minimal[_nghost-%COMP%] div[class^=ccb-corner][_ngcontent-%COMP%]{width:19px;height:19px}.composer-cropper--minimal[_nghost-%COMP%] .ccb-grid-v[_ngcontent-%COMP%]{width:1px;border:none;background-image:repeating-linear-gradient(to bottom,white 0 6px,transparent 6px 12px)}.composer-cropper--minimal[_nghost-%COMP%] .ccb-grid-h[_ngcontent-%COMP%]{height:1px;border:none;background-image:repeating-linear-gradient(to right,white 0 6px,transparent 6px 12px)}.scale-up-bottom[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_scale-up-bottom .2s cubic-bezier(.39,.575,.565,1) both;animation:_ngcontent-%COMP%_scale-up-bottom .2s cubic-bezier(.39,.575,.565,1) both}@keyframes _ngcontent-%COMP%_scale-up-bottom{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}']});}}return i;})();Zv();Cc();var _0=oo(k_()),b0=oo(A_());mt();var l0=oo(s0());Ki();var bm=oo(la());Bn();vn();mt();var id=oo(la());Ki();mt();var $c=(()=>{class i{constructor(){this.setUndoRedoType$=new yr(""),this.composerLocalHistory$=new Yt(),this.composerHistory$=new Yt(),this.undoRedoButtonsActive$=new Yt(),this.isButtonOnUndoDisabled$=new Yt(),this.pageEditUndoRedoSubject$=new yr(null),this._historyId="local";}initializeState(){this._globalHistory={local:{position:0,history:[]}};}updateCustomState(e){this.addToHistory(e),this.setUndoRedoActive();}updateState(e){this.addToHistory(e),this.setUndoRedoActive();}addToHistory(e){for(;this.canRedo;)this._globalHistory[this._historyId].history.pop();this._globalHistory[this._historyId].history.push(id.cloneDeep(e)),this._globalHistory[this._historyId].position+=1;}undo(){if(!this.canUndo)throw"Can't undo";this._globalHistory[this._historyId].position-=1;let e=id.cloneDeep(this._globalHistory[this._historyId].history[this._globalHistory[this._historyId].position-1]);this.setUndoRedoType$.value==="composer"?this._historyId==="local"?this.composerLocalHistory$.next(e):this.composerHistory$.next(e):(this.setUndoRedoType$.value==="page-edit"||this.setUndoRedoType$.value==="page-create")&&this.pageEditUndoRedoSubject$.next(e),this.setUndoRedoActive();}redo(){if(!this.canRedo)throw"Can't redo";this._globalHistory[this._historyId].position+=1;let e=id.cloneDeep(this._globalHistory[this._historyId].history[this._globalHistory[this._historyId].position-1]);this.setUndoRedoType$.value==="composer"?this._historyId==="local"?this.composerLocalHistory$.next(e):this.composerHistory$.next(e):(this.setUndoRedoType$.value==="page-edit"||this.setUndoRedoType$.value==="page-create")&&this.pageEditUndoRedoSubject$.next(e),this.setUndoRedoActive();}get canUndo(){return this._globalHistory[this._historyId].position>1;}get canRedo(){return this._globalHistory[this._historyId].position<this._globalHistory[this._historyId].history.length;}moveToCustomHistory(e){this._historyId=e,this._historyId in this._globalHistory||(this._globalHistory[this._historyId]={position:0,history:[]});}moveToLocalHistory(){this._historyId="local";}removeCustomHistory(e){if(e==="local")throw"Can't remove local history";delete this._globalHistory[e],e===this._historyId&&this.moveToLocalHistory();}patchHistoryStories(e){let t=this._globalHistory[this._historyId].history;for(let n=0;n<t.length;
812n++)t[n].story&&(e(t[n].story),t[n]=id.cloneDeep(t[n]));}setUndoRedoActive(){this.undoRedoButtonsActive$.next({undoActive:this.canUndo,redoActive:this.canRedo});}ngOnDestroy(){this.composerLocalHistory$.next(null),this._globalHistory={local:{position:0,history:[]}};}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();Or();Bn();var nx=["applyAllDialog"];function rx(i,r){if(i&1){let e=_t();be(0,"h2",7),lt(1,"Important: Apply to all scenes?"),Oe(),be(2,"mat-dialog-content")(3,"p"),lt(4," You have previously modified elements for a specific scene."),tt(5,"br"),lt(6," Scaling or repositioning for all scenes will override the changes that you previously made. "),Oe()(),be(7,"div",8)(8,"button",9),Ze("click",function(){$e(e);let n=Le();return We(n.onApplyAllDialogCancelClick());}),lt(9," Cancel "),Oe(),be(10,"button",10),Ze("click",function(){$e(e);let n=Le();return We(n.onApplyAllDialogContinueClick());}),lt(11," Continue "),Oe()();}}var c0=(()=>{class i{constructor(e,t,n,o,_){this.storyService=e,this.undoRedoService=t,this.eventsService=n,this.composerEventsService=o,this.dialog=_,this.CUSTOM_HISTORY_ID="vdm-studio",this.closeVdmStudioComponent=new Mi(),this.unsubscribe$=new Yt(),this.activeStudioId=void 0,this.initialTransforms=[],this.touchedElements=new Map(),this.studioButtonsContainerScale=1;}ngOnInit(){this.undoRedoService.moveToCustomHistory(this.CUSTOM_HISTORY_ID);}ngAfterViewInit(){switch(this.aspectRatio){case"horizontal":this.studioButtonsContainerScale=Math.min(this.vdmPreviewerWidth/425,1);break;case"vertical":this.studioButtonsContainerScale=Math.min(this.vdmPreviewerWidth/1375,1);break;case"square":this.studioButtonsContainerScale=Math.min(this.vdmPreviewerWidth/838,1);break;}this.storyService.hotfix_vdmStudioDismissedExternalEvent$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.closeVdmStudio();}),this.undoRedoService.composerHistory$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{"vdmStudioTransform"in e&&(this.vdmStudioPlugin.editComponentByStudioId(e.vdmStudioTransform.studioId),this.vdmStudioPlugin.scale=e.vdmStudioTransform.scale,this.vdmStudioPlugin.position={x:e.vdmStudioTransform.x,y:e.vdmStudioTransform.y});}),this.openVdmStudio();}openVdmStudio(){return kt(this,null,function*(){try{this.vdmStudioPlugin=new l0.VDMPluginStudio("vdm-studio");let e={container:{width:this.vdmPreviewerWidth,height:this.vdmPreviewerHeight}},t=bm.cloneDeep(this.vdmAdapterStory);yield this.vdmStudioPlugin.setup(t,{renderingOptions:e,time:this.time}),this.addVdmStudioCallbacks(),this.initialTransforms=bm.cloneDeep(this.vdmStudioPlugin.getElementsTransform());}catch(e){console.error(e),Qt(e);}finally{this.composerEventsService.log(this.eventsService.events.composer.makerStudioStart,{slideNum:(this.index+1).toString(),takeId:this.composerEventsService.takeId});}});}closeVdmStudio(e=!1){if(!this.vdmStudioPlugin)return;let t=!1;try{let n=this.computeChangedTransforms();if(t=n.length>0,t){let o=this.vdmStudioPlugin.getElementsTransform();e?this.storyService.updateStorySlidesWithTransformEffect(this.index,o,n):this.storyService.updateStorySingleSlideWithTransformEffect(this.index,n);}}catch(n){console.error(n),Qt(n);}finally{this.composerEventsService.log(this.eventsService.events.composer.makerStudioEnd,{slideNum:e?"all":(this.index+1).toString(),takeId:this.composerEventsService.takeId}),this.undoRedoService.moveToLocalHistory(),this.closeVdmStudioComponent.emit(t);}}computeChangedTransforms(){return this.vdmStudioPlugin.getElementsTransform().filter(t=>{let n=t.studioId,o=this.touchedElements.get(n);if(!o)return!1;let _=this.initialTransforms.find(E=>E.studioId===n);if(!_)return!0;for(let E of o)if(t[E]!==_[E])return!0;return!1;});}addVdmStudioCallbacks(){let e=t=>{if(t.detail?.state==="inprogress")return;let n={slideNum:(this.index+1).toString(),takeId:this.composerEventsService.takeId,elementId:t.detail.studioId,properties:{scale:t.detail.scale,x:t.detail.x,y:t.detail.y}};if(this.activeStudioId!==t.detail.studioId&&t.detail?.state==="start"){let o=t.detail.studioId;this.activeStudioId=o;let _=Object.keys(t.detail).filter(x=>x!=="studioId"&&x!=="state"),E=this.touchedElements.get(o)??new Set();_.forEach(x=>E.add(x)),this.touchedElements.set(o,E),this.undoRedoService.updateCustomState({vdmStudioTransform:t.detail}),this.composerEventsService.log(this.eventsService.events.composer.makerStudioTransformStart,n);}t.detail?.state==="end"&&(this.undoRedoService.updateCustomState({vdmStudioTransform:t.detail}),this.composerEventsService.log(this.eventsService.events.composer.makerStudioTransformEnd,n));};this.vdmStudioPlugin.addEventListener("transform",e),this.vdmStudioPlugin.addEventListener("studioId",e);}onVDMStudioApplyAll(){this.storyService.isStoryHaveTransformEffect()?(this.applyAllDialogRef=this.dialog.open(this.applyAllTemplateRef,{hasBackdrop:!0,position:{left:"calc(50% - 400px)"},width:"400px",panelClass:"composer-studio-apply-all-dialog"}),this.applyAllDialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.composerEventsService.log(this.eventsService.events.composer.makerStudioOverrideDialogClick,{takeId:this.composerEventsService.takeId,choice:"dismiss"});}),this.composerEventsService.log(this.eventsService.events.composer.makerStudioOverrideDialog,{takeId:this.composerEventsService.takeId})):this.closeVdmStudio(!0);}onVDMStudioClose(){this.closeVdmStudio();}onApplyAllDialogCancelClick(){this.applyAllDialogRef.close(),this.composerEventsService.log(this.eventsService.events.composer.makerStudioOverrideDialogClick,{takeId:this.composerEventsService.takeId,choice:"cancel"});}onApplyAllDialogContinueClick(){this.applyAllDialogRef.close(),this.composerEventsService.log(this.eventsService.events.composer.makerStudioOverrideDialogClick,{takeId:this.composerEventsService.takeId,choice:"continue"}),this.closeVdmStudio(!0);}
812ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.undoRedoService.removeCustomHistory(this.CUSTOM_HISTORY_ID),this.vdmStudioPlugin&&(this.vdmStudioPlugin.dispose(),this.vdmStudioPlugin=void 0);}static{this.ɵfac=function(t){return new(t||i)(ut(zi),ut($c),ut(Ji),ut(en),ut(Ja));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-vdm-studio"]],viewQuery:function(t,n){if(t&1&&fn(nx,5),t&2){let o;mn(o=gn())&&(n.applyAllTemplateRef=o.first);}},inputs:{vdmAdapterStory:"vdmAdapterStory",index:"index",time:"time",vdmPreviewerWidth:"vdmPreviewerWidth",vdmPreviewerHeight:"vdmPreviewerHeight",aspectRatio:"aspectRatio"},outputs:{closeVdmStudioComponent:"closeVdmStudioComponent"},standalone:!0,features:[Ft],decls:10,vars:2,consts:[["applyAllDialog",""],[1,"vdm-studio-container"],["id","vdm-studio"],[1,"studio-overlays-container"],[1,"studio-buttons-container"],[1,"studio-button",2,"background-color","#FFFFFF",3,"click"],[1,"studio-button",2,"background-color","#00D096",3,"click"],["matDialogTitle","",2,"margin","0 0 10px"],["mat-dialog-actions","",2,"justify-content","center","padding-bottom","15px","column-gap","40px"],[1,"studio-dialog-cancel-button",3,"click"],[1,"studio-dialog-continue-button",3,"click"]],template:function(t,n){if(t&1){let o=_t();be(0,"div",1),tt(1,"div",2),be(2,"div",3)(3,"div",4)(4,"div",5),Ze("click",function(){return $e(o),We(n.onVDMStudioApplyAll());}),lt(5," Apply All "),Oe(),be(6,"div",6),Ze("click",function(){return $e(o),We(n.onVDMStudioClose());}),lt(7," Close "),Oe()()()(),at(8,rx,12,0,"ng-template",null,0,Vi);}t&2&&(Ce(3),Li("scale",n.studioButtonsContainerScale));},dependencies:[Ph,Th,Oh,Ch],styles:[".vdm-studio-container[_ngcontent-%COMP%]{display:grid}.studio-button[_ngcontent-%COMP%]{position:relative;width:120px;height:45px;border-radius:4px;font-size:17px;font-weight:600;z-index:16;display:flex;align-items:center;justify-content:center}.studio-button[_ngcontent-%COMP%]:hover{cursor:pointer} .studio-box{box-shadow:0 0 0 3px #6f54ff!important} .studio-box-handle{box-shadow:0 0 1px 2px #8b8b8b}#vdm-studio[_ngcontent-%COMP%]{grid-area:1/1}.studio-overlays-container[_ngcontent-%COMP%]{z-index:1000;position:relative;grid-area:1/1;display:flex;justify-content:center;align-items:center;pointer-events:none}.studio-buttons-container[_ngcontent-%COMP%]{position:absolute;display:flex;gap:17px;transform-origin:top right;flex-direction:row;top:15px;right:15px;pointer-events:auto}.studio-dialog-cancel-button[_ngcontent-%COMP%]{width:96px;height:36px;border-radius:10px;color:#fff;font-weight:700;font-size:12px;background-color:#253658;opacity:.3}.studio-dialog-continue-button[_ngcontent-%COMP%]{width:96px;height:36px;border-radius:10px;color:#fff;font-weight:700;font-size:12px;background-color:#00d096;color:#fff!important;opacity:.7}"]});}}return i;})();Yu();_a();var Ps=oo(la());vn();function Sm(i){let r=i?.lower?.height,e=Number.isFinite(r)?r:-1/0,t=i?.lower?.url;return Object.values(i??{}).forEach(n=>{Number.isFinite(n?.height)&&n.height>e&&(e=n.height,t=n.url);}),t;}function u0(i){let r=i?.resource;if(i?.fileType==="video"){let e=Sm(r?.streams),t=r?.streams?.lower?.url,n=r?.thumbnails?.lower?.url;return!e||!t||!n?void 0:{type:"video",url:e,previewUrl:t,thumbnailUrl:n,assetDuration:r.duration,seek:0};}if(i?.fileType==="image"){let e=r?.url,t=r?.thumbnails?.lower?.url;return!e||!t?void 0:{type:"image",url:e,thumbnailUrl:t};}}function d0(i){let r=i;if(r?.type==="ai-generated#image"&&r.originalUrl)return{fileType:"image",url:r.originalUrl,file:r.file??void 0};if(r?.type==="ai-generated#video"&&r.videoUrl)return{fileType:"video",url:r.videoUrl,file:r.file??void 0};}mt();vn();mt();QE();Js();Xu();var h0=(()=>{class i{constructor(e,t,n,o,_){this.uploadingService=e,this.spinnerService=t,this.planHelperService=n,this.premiumPlanService=o,this.storyService=_,this.initialize();}initialize(){this.planHelperService.getOrganizationPlansDetails().then(e=>{this.userPlan=e;});}getAIGeneratedAsset(e,t){return new Promise((n,o)=>{if(this.userPlan.name==="free")this.spinnerService.stop("video-spinner"),this.premiumPlanService.openPricingPage(),o(new Error("User on free plan"));else{let _=this.storyService.story.composerSessionState.generatedOriginalUrlsMap.get(t);_?(n(_),this.storyService.story.composerSessionState.isAttachingExternalMedia=!1,this.spinnerService.stop("video-spinner")):(this.spinnerService.spin("video-spinner"),this.storyService.story.composerSessionState.isAttachingExternalMedia=!0,this.uploadingService.onAttachGeneratedAIAsset(t,e,`AI Generated ${e==="video"?"Video":"Image"}`).then(E=>{let x;e==="video"?x=new d_(E):x=new u_(E);let h={url:x.getHighestQualityUrl(),thumbnailUrl:x.getThumbnailUrl()};if(!h.url||!h.thumbnailUrl){Qt(new Error("Error creating asset"),{extra:{assetType:e,assetData:E}}),console.error("Error creating asset"),o(new Error("Missing url or thumbnail for AI generated asset"));return;}e==="video"&&(h.previewUrl=x.getLowestQualityUrl(),h.duration=x.getDuration()),this.storyService.story.composerSessionState.generatedOriginalUrlsMap.set(t,h),this.storyService.story.composerSessionState.generatedOriginalUrlsMap.set(h.url,h),n(h);}).catch(E=>{console.error(E),o();}).finally(()=>{this.storyService.story.composerSessionState.isAttachingExternalMedia=!1,this.spinnerService.stop("video-spinner");}));}});}static{this.ɵfac=function(t){return new(t||i)(Rt(jc),Rt(i_),Rt(Po),Rt(ts),Rt(zi));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();_a();Or();lo();var p0="/img/composer/slide-broll.jpg",uo=(()=>{class i{constructor(e,t,n,o,_,E,x,h,y){if(this.storyService=e,this.videoSlidesService=t,this.composerDragAndDropHelper=n,this.dialogHelperService=o,this.eventsService=_,this.composerEventsService=E,this.notifier=x,this.composerService=h,y)throw new Error("SlidesActionsService is already loaded");}updateSlideText(e,t){let n=this.storyService.story;n.media[e].text=t,this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"updateSlideText",buildAgain:!0,changeMade:!0,isFirstLoad:!1});let o=this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds),_=o==="Highlight"?"highlight":o==="Quote"?"quote":"captions";this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionChange,{slideNum:(e+1).toString(),layout:o,textType:_});}updateSlideTitle(e,t){let n=this.storyService.story;"resources"in n.media[e].metadata||(n.media[e].metadata.resources={}),n.media[e].metadata.resources.title=t,this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"updateSlideTitle",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionChange,{slideNum:(e+1).toString(),layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds),textType:"subtitle"});}updateSlideSubtitle(e,t){let n=this.storyService.story;"resources"in n.media[e].metadata||(n.media[e].metadata.resources={}),n.media[e].metadata.resources.subtitle=t,this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"updateSlideSubtitle",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionChange,{slideNum:(e+1).toString(),layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds),textType:"title"});}formatToRegularText(e,t){return kt(this,null,function*(){let n=this.storyService.story;this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionTooltip,{slideNum:(e+1).toString(),style:"Regular",layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds)});let o=window.getSelection(),_=o.getRangeAt(0),E=_.startContainer,x=_.startOffset,h=_.endContainer,y=_.endOffset;if(E.nodeType!==Node.TEXT_NODE||h.nodeType!==Node.TEXT_NODE)return document.getSelection().removeAllRanges(),Promise.reject();x>0&&_.setStart(E,x-1),y<h.length&&_.setEnd(h,y+1);let b=`*${t}*`,p=`/${t}/`,c=o.toString();if(c.trim()===t||c===b||c===p){let d=o.getRangeAt(0),m=document.createTextNode(c.replace(/(\*|\/)/gm,""));d.deleteContents(),d.insertNode(m);let a=d.commonAncestorContainer.textContent;return document.getSelection().removeAllRanges(),a;}else return document.getSelection().removeAllRanges(),Promise.reject();});}formatBoldText(e,t){return kt(this,null,function*(){let n=this.storyService.story;this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionTooltip,{slideNum:(e+1).toString(),style:"Highlight",layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds)});let o=window.getSelection(),_=o.toString();if(_===t){let E=o.getRangeAt(0),x=document.createTextNode(`*${_}*`);return E.deleteContents(),E.insertNode(x),o.removeAllRanges(),E.commonAncestorContainer.textContent;}else return document.getSelection().removeAllRanges(),Promise.reject();});}formatExtraBoldText(e,t){return kt(this,null,function*(){let n=this.storyService.story;this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionTooltip,{slideNum:(e+1).toString(),style:"Extra Highlight",layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds)});let o=window.getSelection(),_=o.toString();if(_===t){let E=o.getRangeAt(0),x=document.createTextNode(`/${_}/`);return E.deleteContents(),E.insertNode(x),o.removeAllRanges(),E.commonAncestorContainer.textContent;}else return document.getSelection().removeAllRanges(),Promise.reject();});}addLineBreak(e,t){return kt(this,null,function*(){let n=this.storyService.story;this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionTooltip,{slideNum:(e+1).toString(),action:"New Line",layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds)});let o=window.getSelection();if(o.toString()===t){let E=o.getRangeAt(0),x=document.createTextNode(` 813`);return E.deleteContents(),E.insertNode(x),o.removeAllRanges(),E.startContainer.parentElement.innerHTML.replace(/<br>/g,` 814`);}else return document.getSelection().removeAllRanges(),Promise.reject();});}mergeWithPrevSlide(e){return kt(this,null,function*(){let t=this.storyService.story;return yield this.mergeSlides(e,e-1).then(()=>(this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Merge With Prev",layout:this.storyService.templateIdsToLayout(t.media[e].metadata.templateIds),slideNum:(e+1).toString(),takeId:this.composerEventsService.takeId}),e-1)).catch(()=>e),Promise.reject();});}mergeWithNextSlide(e){return kt(this,null,function*(){let t=this.storyService.story;return yield this.mergeSlides(e,e+1).then(()=>(this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Merge With Next",layout:this.storyService.templateIdsToLayout(t.media[e].metadata.templateIds),slideNum:(e+1).toString(),takeId:this.composerEventsService.takeId}),e)).catch(()=>e),Promise.reject();});}mergeSlides(e,t){return kt(this,null,function*(){let n=this.storyService.story;if(t>=n.media.length||e<0)return this.notifier.error("Error!, try to merge a slide with nothing"),Promise.reject();if(Math.abs(e-t)!==1)return this.notifier.error("Error!, try to merge two non sequential slides"),Promise.reject();let o=n.media[e],_=n.media[t],E=this.storyService.slideTypeIdentifier(o),x=this.storyService.slideTypeIdentifier(_);if(E===void 0||x===void 0)return this.notifier.error("Error!, could not identify the slide type"),Promise.reject();let h=this.storyService.slidePrimaryMedia(o,E),y=this.storyService.slidePrimaryMedia(_,x),b=this.storyService.slideSecondaryMedia(o,E),p=this.storyService.slideSecondaryMedia(_,x);if(x==="OVERLAY_VIDEO"){let s=y.url,l=y.assetDuration,g=y.seek+_.metadata.duration;for(let f=t+1;f<n.media.length;f++){let v=this.storyService.slideTypeIdentifier(n.media[f]),S=this.storyService.slidePrimaryMedia(n.media[f],v);if(S.seek===0||Math.abs(S.seek-g)>=.01)break;if(v==="OVERLAY_VIDEO"){if(S.url===s)g+=n.media[f].metadata.duration;else break;}else break;}if(!(E==="OVERLAY_VIDEO"&&s===h.url&&(Math.abs(y.seek-(h.seek+o.metadata.duration))<.01||Math.abs(h.seek-(y.seek+_.metadata.duration))<.01))){if(o.metadata.duration+g>l)return this.notifier.info("The overlay video duration is shorter than the total merged sequence duration"),Promise.reject();}}if(t>e){if(_.metadata.time=o.metadata.time,_.metadata.duration+=o.metadata.duration,x==="VIDEO"||x==="OVERLAY_IMAGE")y.seek=o.metadata.time,p&&(p.seek=Math.max(p.seek-o.metadata.duration,0));else if(x==="OVERLAY_VIDEO"){let l=y.url,g=y.seek+(_.metadata.duration-o.metadata.duration);E==="OVERLAY_VIDEO"&&y.seek>0&&l===h.url&&Math.abs(y.seek-(h.seek+o.metadata.duration))<.01&&(y.seek=h.seek,p&&(p.seek=Math.max(p.seek-o.metadata.duration,0)));let f=y.seek+_.metadata.duration;for(let v=t+1;v<n.media.length;v++){let S=this.storyService.slideTypeIdentifier(n.media[v]),w=this.storyService.slidePrimaryMedia(n.media[v],S),C=this.storyService.slideSecondaryMedia(n.media[v],S);if(w.seek===0||Math.abs(w.seek-g)>=.01)break;if(S==="OVERLAY_VIDEO"){if(l===w.url)g+=n.media[v].metadata.duration,w.seek=f,f+=n.media[v].metadata.duration,C&&(C.seek=Math.max(C.seek-n.media[v-1].metadata.duration,0));else break;}else break;}}let s=o.text;s.length>0&&(_.text=`${s} 815${_.text}`);}else{if(_.metadata.duration+=o.metadata.duration,E==="OVERLAY_VIDEO"){let l=h.url,g=h.seek===0?0:h.seek+o.metadata.duration,f=h.seek+o.metadata.duration;for(let v=e+1;v<n.media.length;v++){let S=this.storyService.slideTypeIdentifier(n.media[v]),w=this.storyService.slidePrimaryMedia(n.media[v],S),C=this.storyService.slideSecondaryMedia(n.media[v],S);if(w.seek===0||Math.abs(w.seek-f)>=.01)break;if(S==="OVERLAY_VIDEO"){if(l===w.url)f+=n.media[v].metadata.duration,w.seek=g,g+=n.media[v].metadata.duration,C&&(C.seek=Math.max(C.seek-n.media[v-1].metadata.duration,0));else break;}else break;}}let s=o.text;s.length>0&&(_.text=_.text.length>0?`${_.text} 816${s}`:s);}let c=this.slidesToZoomInputs(),d=ns(c,Math.min(e,t)),m=d&&d.startIdx!==d.endIdx?{fromVal:d.fromVal,toVal:d.toVal,direction:d.fadeDirection}:void 0;n.media.splice(o.index,1),this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.filter(s=>s!==o.index),this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.map(s=>s>o.index?s-1:s),n.media.map((s,l)=>{s.index=l;});let a=Math.min(e,t);
816return this.recalcZoomSequence(a),m&&(n.media[a]?.metadata?.effects?.find(l=>l.type==="zoomPan")||nl(n.media,[{slideIndex:a,effect:{type:"zoomPan",attributes:{fromVal:m.fromVal,toVal:m.toVal,offsetTime:0,duration:n.media[a].metadata.duration}}}])),this.storyService.hotfix_scenesGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"mergeSlides",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),Promise.resolve();});}carryOverlayToNextSlide(e,t){return kt(this,null,function*(){try{let n=this.storyService.story,o=this.convertSlideDataToReplaceableSlide(e,t);this.resetSlideMedia(t),yield this.replaceSlide(o,"drag-item");let _=this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds);this.storyService.updateSlideLayout(t,_);let E=this.storyService.extractTransformEffectsFromSlide(e);E&&E.length>0&&this.storyService.updateStorySingleSlideWithTransformEffect(t,E);let x=("bug"in n.media[e]);this.storyService.updateSlideLogo(t,x);let h=this.storyService.extractSlideZoomEffectsFromSlide(e);return h&&h.length>0&&(h.length>1&&(console.error("Slide have more than one zoom effect set"),Qt(new Error("Error! Slide have more than one zoom effect set."))),this.storyService.updateSlideZoom(t,h[0].zoomTo,h[0].zoomTo)),this.recalcZoomSequence(t),this.storyService.hotfix_scenesGotUpdated$.next(),this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Carry Overlay To Next Slide",layout:this.storyService.templateIdsToLayout(n.media[e].metadata.templateIds),slideNum:(e+1).toString(),takeId:this.composerEventsService.takeId}),t;}catch(n){return n||this.notifier.error("Failed to carry overlay to next slide"),e;}});}deleteSlide(e){let t=this.storyService.story,n=t.media[e];this.storyService.deleteSlide(e);let o=e-1,_=e;o>=0&&o<t.media.length&&this.recalcZoomSequence(o),_<t.media.length&&_!==o&&this.recalcZoomSequence(_),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"onDeleteSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Delete",layout:this.storyService.templateIdsToLayout(n.metadata.templateIds),slideNum:(e+1).toString(),takeId:this.composerEventsService.takeId});}openSegmentEditor(e,t,n){this.videoSlidesService.playerAction$.next({action:"pause"});let o=this.storyService.story,_=(h,y)=>{let b=this.storyService.slideTypeIdentifier(h);if(b==="OVERLAY_VIDEO"){let p=this.storyService.slidePrimaryMedia(h,b),c=p.url,d=0,m=p.seek+h.metadata.duration;for(let a=h.index+1;a<o.media.length;a++){let s=this.storyService.slideTypeIdentifier(o.media[a]);if(s==="OVERLAY_VIDEO"){let l=this.storyService.slidePrimaryMedia(o.media[a],s);if(Math.abs(l.seek-m)>=.01)break;if(l.url===c)d+=o.media[a].metadata.duration,m+=o.media[a].metadata.duration;else break;}else break;}y.dropMedia={seek:p.seek,time:h.metadata.time,dropDuration:p.assetDuration,sumFollowingDurations:d,dropUrl:c};}},E=new va();E.type=e,e==="segment-duration"?(E.header="Edit Segment Duration",E.leftSegment=t>0?{index:o.media[t-1].index,time:o.media[t-1].metadata.time,duration:o.media[t-1].metadata.duration}:void 0,E.mainSegment={index:o.media[t].index,time:o.media[t].metadata.time,duration:o.media[t].metadata.duration,previewUrl:o.composerSessionState.baseMedia.previewUrl},E.rightSegment=t+1<o.media.length?{index:o.media[t+1].index,time:o.media[t+1].metadata.time,duration:o.media[t+1].metadata.duration}:void 0,t>0&&_(o.media[t-1],E.leftSegment),_(o.media[t],E.mainSegment),t+1<o.media.length&&_(o.media[t+1],E.rightSegment)):(E.header="Split Segment In Two",E.mainSegment={index:o.media[t].index,time:o.media[t].metadata.time,duration:o.media[t].metadata.duration/2,previewUrl:o.composerSessionState.baseMedia.previewUrl},E.rightSegment={index:o.media[t].index+1,time:o.media[t].metadata.time+o.media[t].metadata.duration/2,duration:o.media[t].metadata.duration/2}),E.onClose=()=>{this.dialogHelperService.close();},E.onSubmit=h=>{let y=h.dialogData;this.dialogHelperService.close(),y.type==="segment-duration"?(this.composerEventsService.log(this.eventsService.events.composer.segmentDurationSave,{slideNum:(t+1).toString()}),this.editSlideDuration(y),n&&n()):(this.composerEventsService.log(this.eventsService.events.composer.segmentSplitSave,{slideNum:(t+1).toString(),layout:this.storyService.templateIdsToLayout(o.media[t].metadata.templateIds)}),this.splitSlide(y),n&&n()),this.videoSlidesService.selectSlideByIndex$.next(t);};let x=new Do();x.disableClose=!0,x.panelClass="remove-mat-dialog-padding",e==="segment-duration"?this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Edit Segment Duration",layout:this.storyService.templateIdsToLayout(o.media[t].metadata.templateIds),slideNum:(t+1).toString(),takeId:this.composerEventsService.takeId}):e==="segment-split"&&this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,{choice:"Split Segment in Two",layout:this.storyService.templateIdsToLayout(o.media[t].metadata.templateIds),slideNum:(t+1).toString(),takeId:this.composerEventsService.takeId}),this.dialogHelperService.open(E,$h,x);}editSlideDuration(e){let t=this.storyService.story,n=e.leftSegment,o=e.mainSegment,_=e.rightSegment,E=this.storyService.slideTypeIdentifier(t.media[o.index]),x=this.storyService.slidePrimaryMedia(t.media[o.index],E),h=this.storyService.slideSecondaryMedia(t.media[o.index],E),y=this.storyService.slideTypeIdentifier(t.media[_.index]),b=this.storyService.slidePrimaryMedia(t.media[_.index],y),p=this.storyService.slideSecondaryMedia(t.media[_.index],y);if(!n&&o){let d=b.url,m=x.url,a=o.duration-t.media[o.index].metadata.duration,s=t.media[o.index].metadata.duration;t.media[o.index].metadata.duration=o.duration,t.media[_.index].metadata.time=_.time;let l=b.seek,g=t.media[_.index].metadata.duration;if(b.seek=b.seek>0?Math.max(b.seek+a,0):0,p&&(p.seek=p.seek>0?Math.max(p.seek+a,0):0),t.media[_.index].metadata.duration=_.duration,y==="OVERLAY_VIDEO"){if(t.media[_.index].metadata.time=_.time,t.media[_.index].metadata.duration=_.duration,E==="OVERLAY_VIDEO"&&m&&b.url===m&&Math.abs(l-(x.seek+s))<.01){let v=x.seek+t.media[o.index].metadata.duration,S=v-b.seek;b.seek=v,p&&(p.seek=Math.max(p.seek+S,0));}else b.seek=l;let f=l+g;for(let v=t.media[_.index].index+1;v<t.media.length;v++){let S=this.storyService.slideTypeIdentifier(t.media[v]),w=this.storyService.slidePrimaryMedia(t.media[v],S),C=this.storyService.slideSecondaryMedia(t.media[v],S);if(S==="OVERLAY_VIDEO"&&Math.abs(w.seek-f)>=.01)break;if(S==="OVERLAY_VIDEO"){if(d&&w.url===d)f+=t.media[v].metadata.duration,w.seek-=a,C&&
816(C.seek-=a);else break;}else break;}}}if(!_&&o){let d=n.duration-t.media[n.index].metadata.duration;t.media[n.index].metadata.duration=n.duration,t.media[o.index].metadata.time=o.time,t.media[o.index].metadata.duration=o.duration,x.seek=x.seek>0?Math.max(x.seek+d,0):0,h&&(h.seek=h.seek>0?Math.max(h.seek+d,0):0);}if(n&&o&&_){let d=x.url,m=x.seek,a=t.media[o.index].metadata.duration,s=b.seek,l=t.media[_.index].metadata.duration;t.media[n.index].metadata.duration=n.duration;let g=o.time-t.media[o.index].metadata.time;t.media[o.index].metadata.time=o.time,t.media[o.index].metadata.duration=o.duration,x.seek=x.seek>0?Math.max(x.seek+g,0):0,h&&(h.seek=h.seek>0?Math.max(h.seek+g,0):0);let f=_.time-t.media[_.index].metadata.time;if(t.media[_.index].metadata.time=_.time,t.media[_.index].metadata.duration=_.duration,b.seek=b.seek>0?Math.max(b.seek+f,0):0,p&&(p.seek=p.seek>0?Math.max(p.seek+f,0):0),y==="OVERLAY_VIDEO"){if(t.media[_.index].metadata.time=_.time,t.media[_.index].metadata.duration=_.duration,E==="OVERLAY_VIDEO"&&d&&b.url===d&&Math.abs(s-(m+a))<.01){let S=x.seek+t.media[o.index].metadata.duration,w=S-b.seek;b.seek=S,p&&(p.seek=Math.max(p.seek+w,0));}let v=s+l;for(let S=t.media[_.index].index+1;S<t.media.length;S++){let w=this.storyService.slideTypeIdentifier(t.media[S]),C=this.storyService.slidePrimaryMedia(t.media[S],w),I=this.storyService.slideSecondaryMedia(t.media[S],w);if(w==="OVERLAY_VIDEO"&&Math.abs(C.seek-v)>=.01)break;if(w==="OVERLAY_VIDEO"){if(d&&C.url===d)v+=t.media[S].metadata.duration,C.seek+=f,I&&(I.seek+=f);else break;}else break;}}}let c=e.mainSegment.index;this.recalcZoomSequence(c),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"editSlideDuration",buildAgain:!0,changeMade:!0,isFirstLoad:!1});}splitSlideAtTime(e,t){let n=this.storyService.story,o=n?.media;if(!o||e<0||e>=o.length)return!1;let _=Xi.MIN_SLIDE_DURATION_SEC,E=o[e],x=E?.metadata?.duration;if(!Number.isFinite(x)||x<_*2||!Number.isFinite(t)||t<_||t>x-_)return!1;let h=new va();h.type="segment-split",h.mainSegment={index:e,time:E.metadata.time,duration:t,previewUrl:n.composerSessionState?.baseMedia?.previewUrl??""},h.rightSegment={index:e+1,time:E.metadata.time+t,duration:x-t};try{this.splitSlide(h);}catch{return!1;}let y=o[e+1];return y&&(y.id=void 0,delete y._id),!0;}splitSlide(e){let t=this.storyService.story,n=e.mainSegment,o=this.storyService.slideTypeIdentifier(t.media[n.index]),_=this.storyService.slidePrimaryMedia(t.media[n.index],o);t.media[n.index].metadata.duration=n.duration;let E=Ps.cloneDeep(t.media[n.index]),x=this.storyService.slideTypeIdentifier(E),h=this.storyService.slidePrimaryMedia(E,x);E.index=e.rightSegment.index,E.metadata.time=e.rightSegment.time,E.metadata.duration=e.rightSegment.duration,E.text="",h.seek=_.seek+n.duration,t.media.splice(E.index,0,E),this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.map(p=>p>E.index?p+1:p),t.media.map((p,c)=>{p.index=c;});let y=t.media[n.index].metadata.effects?.find(p=>p.type==="zoomPan"),b=y?{fromVal:y.attributes.fromVal,toVal:y.attributes.toVal}:void 0;if(x?.includes("OVERLAY")){let p=Ps.cloneDeep(t.media[n.index].metadata.templateIds),c=this.storyService.slideSecondaryMedia(t.media[E.index],x);this.resetSlideMedia(E.index),x==="OVERLAY_IMAGE"?(this.addImageOverlayToSlide(E.index,_.url,_.thumbnailUrl,c),E.metadata.templateIds=p):x==="OVERLAY_VIDEO"&&this.addVideoOverlayToSlide(E.index,_.url,_.thumbnailUrl,_.previewUrl,_.assetDuration,!1,p,c);}this.splitSlideZoomFade(n.index,E.index,b),this.storyService.hotfix_scenesGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"splitSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1});}convertSlideDataToReplaceableSlide(e,t,n=!1){let o=this.storyService.slideTypeIdentifier(this.storyService.story.media[e]),_=this.storyService.slideOverlayMedia(this.storyService.story.media[e],o);if(o==="OVERLAY_VIDEO")return st(Ke({},n?{droppedFromIndex:e}:{}),{slideType:"video",slideIndex:t,media:[{previewUrl:_.previewUrl,thumbnailUrl:_.thumbnailUrl,url:_.url,assetDuration:_.assetDuration}]});if(o==="OVERLAY_IMAGE")return st(Ke({},n?{droppedFromIndex:e}:{}),{slideType:"image",slideIndex:t,media:[{thumbnailUrl:_.thumbnailUrl,url:_.url,type:"image"}]});console.error("Error! Something went wrong while trying to replace the content [1]"),this.notifier.error("Something went wrong while trying to replace the content [1]"),Qt(new Error("Error! Something went wrong while trying to replace the content [1]."));}convertDropDataToReplaceableSlide(e,t){let n;if(e.type==="ai-generated#image"){let o=this.storyService.story.composerSessionState.generatedOriginalUrlsMap.get(e.originalUrl);n={slideType:o?"image":"ai-generated#image",slideIndex:t,media:[{thumbnailUrl:o?.thumbnailUrl??e.thumbnailUrl,url:o?.url??e.originalUrl,type:"image"}]};}else if(e.type==="ai-generated#video"){let o=this.storyService.story.composerSessionState.generatedOriginalUrlsMap.get(e.videoUrl);n={slideType:"ai-generated#video",slideIndex:t,media:[{previewUrl:o?.previewUrl??e.videoUrl,thumbnailUrl:o?.thumbnailUrl??e.thumbnailUrl,url:o?.url??e.videoUrl,assetDuration:o?.duration??e.duration}]};}else e.fileType==="video"?n={slideType:"video",slideIndex:t,media:[{previewUrl:e.resource.streams.lower.url,thumbnailUrl:e.resource.thumbnails.lower.url,url:Sm(e.resource.streams),assetDuration:e.resource.duration,sceneSeek:e.sceneSeek}]}:e.fileType==="image"&&(n={slideType:"image",slideIndex:t,media:[{thumbnailUrl:e.resource.thumbnails.lower.url,url:e.resource.url,type:"image"}]});return this.storyService.story.composerSessionState.overlaysAssetIdMap.has(n.media[0].url)||this.storyService.story.composerSessionState.overlaysAssetIdMap.set(n.media[0].url,e.assetId),this.storyService.story.composerSessionState.overlaysExternalIdMap.has(n.media[0].url)||this.storyService.story.composerSessionState.overlaysExternalIdMap.set(n.media[0].url,e.externalId),n;}replaceSlide(e,t){return kt(this,null,function*(){let n=e.slideIndex,o=this.storyService.story,_=this.storyService.story.composerSessionState.overlaysAssetIdMap.get(e.media[0].url),E=this.storyService.story.composerSessionState.overlaysExternalIdMap.get(e.media[0].url);if(this.composerEventsService.log(this.eventsService.events.composer.addSegmentOverlay,{slideNum:(n+1).toString(),type:e.slideType,assetId:_,externalId:E,layout:this.storyService.templateIdsToLayout(o.media[n].metadata.templateIds),fromOtherSlide:("droppedFromIndex"in e).toString()}),e.slideType==="video"||e.slideType==="ai-generated#video"){let y=e.media[0].assetDuration,b=[],p=null,c=this.storyService.slideTypeIdentifier(o.media[n]);if(c==="OVERLAY_VIDEO"||c==="OVERLAY_IMAGE"){if("droppedFromIndex"in e){if(this.findOverlaySequenceIndexe
816s(n).includes(e.droppedFromIndex))return this.notifier.info("Cannot drop a video onto a slide that's already part of the same video sequence"),Promise.reject();t="add-item";}b=t==="add-item"?this.findOverlaySequenceIndexes(n):[n];let a=this.storyService.slideOverlayMedia(o.media[n],c).url;t==="add-item"&&a===e.media[0].url&&(b=[n]);let s=0;if(b.forEach(l=>{s+=o.media[l].metadata.duration;}),y<s)return this.notifier.info(`The overlay video duration is shorter than the total ${b.length>1?"slides sequence":"slide"} duration`),Promise.reject();}else{if(y<o.media[n].metadata.duration)return this.notifier.info("The overlay video duration is shorter than the slide duration"),Promise.reject();b=[n];let a=e.droppedFromIndex===n-1;if(n>0&&!a){let s=o.media[n-1],l=this.storyService.slideTypeIdentifier(s),g=this.storyService.slideOverlayMedia(s,l)?.url,f=e.media[0].url;if(l==="OVERLAY_VIDEO"&&g&&g===f){let v=0;if(b.unshift(...this.findOverlaySequenceIndexes(n-1)),p=this.storyService.slidePrimaryMedia(o.media[b[0]])?.seek??0,b.forEach(S=>{v+=o.media[S].metadata.duration;}),y<v)return this.notifier.info("The overlay video duration is shorter than the total slides sequence duration"),Promise.reject();}}}let d=0,m=p??e.media[0].sceneSeek;if(m>0){let a=b.reduce((s,l)=>s+o.media[l].metadata.duration,0);d=Math.min(m,Math.max(0,y-a));}if("droppedFromIndex"in e){if(b.includes(e.droppedFromIndex))return console.error("Error! Something went wrong while trying to replace the content [0]"),this.notifier.error("Something went wrong while trying to replace the content [0]"),Qt(new Error(`Error! Something went wrong while trying to replace the content [0]. story ${o.id} droppedFromIndex: ${e.droppedFromIndex} sIdx: ${n}`)),Promise.reject();this.resetSlideMedia(e.droppedFromIndex);}e.slideType==="ai-generated#video"?this.storyService.story.composerSessionState.isAttachingExternalMedia||(b.forEach((a,s)=>{let l=Ps.cloneDeep(o.media[a].metadata.templateIds),g=this.storyService.slideSecondaryMedia(o.media[a],c);this.resetSlideMedia(a),this.addVideoOverlayToSlide(a,e.media[0].url,e.media[0].thumbnailUrl,e.media[0].previewUrl,e.media[0].assetDuration,s===0,l,g);}),this.composerDragAndDropHelper.getAIGeneratedAsset("video",e.media[0].url).then(a=>{this.updateMediaSidebarState(),this.storyService.story.composerSessionState.overlaysAssetIdMap.has(a.url)||this.storyService.story.composerSessionState.overlaysAssetIdMap.set(a.url,_),this.storyService.story.composerSessionState.overlaysExternalIdMap.has(a.url)||this.storyService.story.composerSessionState.overlaysExternalIdMap.set(a.url,E),b.forEach((s,l)=>{let g=Ps.cloneDeep(o.media[s].metadata.templateIds),f=this.storyService.slideSecondaryMedia(o.media[s],c);this.resetSlideMedia(s),this.addVideoOverlayToSlide(s,a.url,a.thumbnailUrl,a.previewUrl,y,l===0,g,f);}),this.storyService.hotfix_scenesGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"replaceSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1});}).catch(()=>{b.forEach(a=>{this.resetSlideMedia(a);}),this.storyService.hotfix_scenesGotUpdated$.next();})):b.forEach((a,s)=>{let l=Ps.cloneDeep(o.media[a].metadata.templateIds),g=this.storyService.slideSecondaryMedia(o.media[a],c);this.resetSlideMedia(a),this.addVideoOverlayToSlide(a,e.media[0].url,e.media[0].thumbnailUrl,e.media[0].previewUrl,e.media[0].assetDuration,s===0,l,g,d);});}else if(e.slideType==="image"){let y=this.storyService.slideTypeIdentifier(o.media[n]);if("droppedFromIndex"in e){if(y==="OVERLAY_IMAGE"&&this.findOverlaySequenceIndexes(n).includes(e.droppedFromIndex))return this.notifier.info("Cannot drop a image onto a slide that's already part of the same image sequence"),Promise.reject();t="add-item";}let b=[];if(t==="add-item"&&(y==="OVERLAY_IMAGE"||y==="OVERLAY_VIDEO")?b.push(...this.findOverlaySequenceIndexes(n)):b.push(n),"droppedFromIndex"in e){if(b.includes(e.droppedFromIndex))return console.error("Error! Something went wrong while trying to replace the content [2]"),this.notifier.error("Something went wrong while trying to replace the content [2]"),Qt(new Error(`Error! Something went wrong while trying to replace the content [2]. story ${o.id} droppedFromIndex: ${e.droppedFromIndex} sIdx: ${n}`)),Promise.reject();this.resetSlideMedia(e.droppedFromIndex);}let p=e;b.forEach(c=>{let d=o.media[c].media.length>1?Ps.cloneDeep(o.media[c].metadata.templateIds):void 0,m=this.storyService.slideSecondaryMedia(o.media[c],y);this.resetSlideMedia(c),this.addImageOverlayToSlide(c,p.media[0].url,p.media[0].thumbnailUrl,m),d&&(o.media[c].metadata.templateIds=d);});}else if(e.slideType==="ai-generated#image"&&!this.storyService.story.composerSessionState.isAttachingExternalMedia){let y=this.storyService.slideTypeIdentifier(o.media[n]),b=[];t==="add-item"&&(y==="OVERLAY_IMAGE"||y==="OVERLAY_VIDEO")?b.push(...this.findOverlaySequenceIndexe
816s(n)):b.push(n),b.forEach(p=>{let c=o.media[p].media.length>1?Ps.cloneDeep(o.media[p].metadata.templateIds):void 0,d=this.storyService.slideSecondaryMedia(o.media[p],y);this.resetSlideMedia(p),this.addImageOverlayToSlide(p,e.media[0].url,e.media[0].thumbnailUrl,d),c&&(o.media[p].metadata.templateIds=c);}),this.composerDragAndDropHelper.getAIGeneratedAsset("image",e.media[0].url).then(p=>{this.updateMediaSidebarState(),this.storyService.story.composerSessionState.overlaysAssetIdMap.has(p.url)||this.storyService.story.composerSessionState.overlaysAssetIdMap.set(p.url,_),this.storyService.story.composerSessionState.overlaysExternalIdMap.has(p.url)||this.storyService.story.composerSessionState.overlaysExternalIdMap.set(p.url,E),b.forEach(c=>{let d=o.media[c].media.length>1?Ps.cloneDeep(o.media[c].metadata.templateIds):void 0,m=this.storyService.slideSecondaryMedia(o.media[c],y);this.resetSlideMedia(c),this.addImageOverlayToSlide(c,p.url,p.thumbnailUrl,m),d&&(o.media[c].metadata.templateIds=d);}),this.storyService.hotfix_scenesGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"replaceSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1});}).catch(()=>{this.resetSlideMedia(n),this.storyService.hotfix_scenesGotUpdated$.next();});}let x=this.storyService.templateIdsToLayout(o.media[n].metadata.templateIds),h=this.storyService.getSupportedLayoutsForSlide(n);h.includes(x)||(x=h[0]),this.storyService.updateSlideLayout(n,x),(e.slideType==="video"||e.slideType==="image")&&this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"replaceSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.storyService.hotfix_scenesGotUpdated$.next();});}resetSlideMedia(e){let t=this.storyService.story,n=this.storyService.slideTypeIdentifier(t.media[e]);if(n==="OVERLAY_VIDEO"||n==="OVERLAY_IMAGE"){t.media[e].metadata.effects?.splice(0,t.media[e].metadata.effects.length,...t.media[e].metadata.effects.filter(_=>_.type!=="zoomPan"));let o=t.media[e].media.length>1;t.media[e].media=[{type:"video",url:t.composerSessionState.baseMedia.url,previewUrl:t.composerSessionState.baseMedia.previewUrl,thumbnailUrl:t.composerSessionState.baseMedia.thumbnailUrl,assetDuration:t.composerSessionState.baseMedia.assetDuration,seek:t.media[e].metadata.time}],o&&this.storyService.updateSlideLayout(e,"Captions"),this.recalcZoomSequence(e);}}addImageOverlayToSlide(e,t,n,o){let _=this.storyService.story;if(e<0||e>=_.media.length)return;let E=this.storyService.slideTypeIdentifier(_.media[e]);if(E==="OVERLAY_VIDEO"||E==="OVERLAY_IMAGE"||_.media[e].media.length>1){console.error(`Cannot add overlay to slideIndex: ${e} as it is already an overlay`);return;}for(;_.media[e].media.length>0;)_.media[e].media.pop();if(_.media[e].media.push({type:"image",url:t,thumbnailUrl:n}),o)_.media[e].media.push(o),this.storyService.updateSlideZoom(e,"NONE","NONE");else{_.media[e].metadata.effects?.splice(0,_.media[e].metadata.effects.length,..._.media[e].metadata.effects.filter(p=>p.type!=="zoomPan"));let x=this.slidesToZoomInputs(),h=x[e],y=!1,b=ns(x,e-1);if(b&&b.endIdx===e-1&&h.overlayUrl&&Yh(h,x[e-1])&&(this.applyZoomUpdates([{slideIndex:e,effect:{type:"zoomPan",attributes:{fromVal:b.toVal,toVal:b.toVal,offsetTime:0,duration:h.duration}}}]),y=!0),!y&&e>0&&h.overlayUrl&&Yh(h,x[e-1])){let p=this.storyService.extractSlideZoomEffectsFromSlide(e-1);p&&p.length>0&&(this.storyService.updateSlideZoom(e,p[0].zoomTo,p[0].zoomTo),y=!0);}if(!y){let p=ns(x,e+1);p&&p.startIdx===e+1&&h.overlayUrl&&Yh(h,x[e+1])&&(this.applyZoomUpdates([{slideIndex:e,effect:{type:"zoomPan",attributes:{fromVal:p.fromVal,toVal:p.fromVal,offsetTime:0,duration:h.duration}}}]),y=!0);}if(!y){let p=Kh(x);p.length>0&&this.applyZoomUpdates(p);}}this.recalcZoomSequence(e);}addVideoOverlayToSlide(e,t,n,o,_,E,x,h,y=0){let b=this.storyService.story,p=this.storyService.slideTypeIdentifier(b.media[e]);if(p==="OVERLAY_VIDEO"||p==="OVERLAY_IMAGE"||b.media[e].media.length>1){console.error(`Cannot add overlay to slideIndex: ${e} as it is already an overlay`);return;}for(;b.media[e].media.length>0;)b.media[e].media.pop();let c=d=>E?d?y:b.media[e].metadata.time:((d?this.storyService.slidePrimaryMedia(b.media[e-1]):this.storyService.slideSecondaryMedia(b.media[e-1]))?.seek??b.media[e-1].metadata.time)+b.media[e-1].metadata.duration;if(b.media[e].media.push({type:"video",url:t,thumbnailUrl:n,previewUrl:o,assetDuration:_,seek:c(!0)}),h&&(h.seek=c(!1),b.media[e].media.push(h),b.media[e].metadata.templateIds=x,this.storyService.updateSlideZoom(e,"NONE","NONE")),e>0&&h===void 0){let d=this.storyService.slideTypeIdentifier(b.media[e-1]);if(d==="OVERLAY_VIDEO"&&this.storyService.slideOverlayMedia(b.media[e-1],d).url===t){let a=b.media[e-1].metadata.effects?.filter(s=>s.type==="zoomPan")??[];
816if(a.length>0){let s=a[0].attributes.toVal;nl(b.media,[{slideIndex:e,effect:{type:"zoomPan",attributes:{fromVal:s,toVal:s,offsetTime:0,duration:b.media[e].metadata.duration}}}]);}}}this.recalcZoomSequence(e);}removeOverlayFromSlide(e){let t=this.storyService.story,n=t.media[e],o=this.storyService.slideOverlayMedia(n),_=o.type,E=this.storyService.story.composerSessionState.overlaysAssetIdMap.get(o.url)??"NoAssetIdFound",x=this.storyService.templateIdsToLayout(n.metadata.templateIds);this.storyService.isMultipleMediaLayout(x)&&this.storyService.updateSlideLayout(e,"Captions"),this.resetSlideMedia(e);let h=e-1,y=e+1;h>=0&&this.recalcZoomSequence(h),y<t.media.length&&y!==h&&this.recalcZoomSequence(y),this.storyService.hotfix_scenesGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"removeOverlayFromSlide",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.composerEventsService.log(this.eventsService.events.composer.removeSegmentOverlay,{slideNum:(e+1).toString(),type:_,assetId:E,layout:this.storyService.templateIdsToLayout(t.media[e].metadata.templateIds)});}onSlideActionMenuOpened(e){let t=this.storyService.story;this.composerEventsService.log(this.eventsService.events.composer.segmentMenuOpen,{slideNum:(e+1).toString(),layout:this.storyService.templateIdsToLayout(t.media[e].metadata.templateIds)});}updateMediaSidebarState(){let e=this.composerService.uploadsSidebarState$.getValue();e&&this.composerService.uploadsSidebarState$.next(st(Ke({},e),{shouldReloadSidebar:!0}));}slidesToZoomInputs(){let e=this.storyService.story;return Zh(this.storyService.mapMediaToRawInputs(e.media));}applyZoomUpdates(e){nl(this.storyService.story.media,e);}splitSlideZoomFade(e,t,n){let o=this.slidesToZoomInputs(),_=o[e],E=o[t];if(!_||!E)return;let x,h;if(n)x=n.fromVal,h=n.toVal;else{let m=_.effects.find(a=>a.type==="zoomPan");if(!m)return;x=m.attributes.fromVal,h=m.attributes.toVal;}if(x===h)return;let y=_.duration+E.duration,b=_.duration/y,p=h-x,c=Math.round((x+b*p)*1e6)/1e6,d=[{slideIndex:e,effect:{type:"zoomPan",attributes:{fromVal:x,toVal:c,offsetTime:0,duration:_.duration,ease:"linear"}}},{slideIndex:t,effect:{type:"zoomPan",attributes:{fromVal:c,toVal:h,offsetTime:0,duration:E.duration,ease:"linear"}}}];this.applyZoomUpdates(d);}recalcZoomSequence(e){let t=this.slidesToZoomInputs();if(e<0||e>=t.length)return;let n=L_(t,e);n.length>0&&this.applyZoomUpdates(n);}findOverlaySequenceIndexes(e){let t=this.storyService.story,n=[e],o=t.media[e],_=this.storyService.slideTypeIdentifier(o),E=this.storyService.slideOverlayMedia(o,_)?.url;if(E===void 0)return[];for(let x=e+1;x<t.media.length;x++){let h=this.storyService.slideTypeIdentifier(t.media[x]);if(h===_){let y=this.storyService.slidePrimaryMedia(t.media[x],h),b=this.storyService.slidePrimaryMedia(t.media[x-1],h),p=_==="OVERLAY_VIDEO"?Math.abs(y.seek-(b.seek+t.media[x-1].metadata.duration))<.01:!0;if(y.url===E&&p)n.push(x);else break;}else break;}if(e>0)for(let x=e-1;x>=0;x--){let h=this.storyService.slideTypeIdentifier(t.media[x]);if(h===_){let y=this.storyService.slidePrimaryMedia(t.media[x],h),b=this.storyService.slidePrimaryMedia(t.media[x+1],h),p=_==="OVERLAY_VIDEO"?Math.abs(b.seek-(y.seek+t.media[x].metadata.duration))<.01:!0;if(y.url===E&&p)n.push(x);else break;}else break;}return n.sort((x,h)=>x-h),n;}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(h0),Rt(co),Rt(Ji),Rt(en),Rt(En),Rt(nr),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();vn();mt();La();lo();Na();im();om();hi();xh();Or();Ki();es();vn();mt();Js();var nd={intro:{vdmObj:void 0,obj:void 0,thumbnail:void 0},outro:{vdmObj:void 0,obj:void 0,thumbnail:void 0},assets:void 0},f0=()=>Ti((i,r)=>JSON.stringify(i)===JSON.stringify(r)),m0=(i,r,e)=>i==="video"?r?.result.find(n=>n.assetId===e)?.resource.thumbnails.lower.url:"img/composer/intro-outro-modal/biz-card.svg",as=(()=>{class i{constructor(e,t,n,o,_){if(this.storyService=e,this.videoSlidesService=t,this.composerHttpService=n,this.planHelperService=o,this.currentAssets$=new yr(void 0),this.updateIntroOutroInPreviewer$=new Yt(),this.store=new yr(nd),this.state$=this.store.asObservable(),this.intro$=this.state$.pipe(oi(E=>E.intro),f0(),Ri({refCount:!0,bufferSize:1})),this.outro$=this.state$.pipe(oi(E=>E.outro),f0(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.userOnFreePlan=!0,this.inOutroDataModel$=Vn([this.intro$,this.outro$]).pipe(On(50),oi(([E,x])=>({intro:E,outro:x}))),_)throw new Error("IntroOutroService is already loaded");this.planHelperService.isFreeByCurrentPlan().then(E=>{this.userOnFreePlan=E;}),this.storyService.hotfix_storyCreated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.getAssetsForCurrentIntroOutro(this.storyService.story).then(E=>{this.setInOutro(this.storyService.story,E);});}),this.composerHttpService.getIntoOutroAssets().then(E=>{this.currentAssets$.next(E);}).catch(E=>{console.error("Error getting intro outro assets:",E),Qt(E);}),this.inOutroDataModel$.pipe(ra(1),oi((E,x)=>({inOutroData:E,index:x})),Pt(this.unsubscribe$)).subscribe(({inOutroData:E,index:x})=>{x===0?(E.intro.vdmObj||E.outro.vdmObj)&&(this.updateIntroOutroInPreviewer$.next({introVdmObj:E.intro.vdmObj,outroVdmObj:E.outro.vdmObj}),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"IntroOutroService.combineLatest.intro_outro$",buildAgain:!0,changeMade:!1,isFirstLoad:!0})):(this.updateIntroOutroInPreviewer$.next({introVdmObj:E.intro.vdmObj,outroVdmObj:E.outro.vdmObj}),this.storyService.story.composerSessionState.introOutroChangeMadeByUndoRedo?this.storyService.story.composerSessionState.introOutroChangeMadeByUndoRedo=!1:this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"IntroOutroService.combineLatest.intro_outro$",buildAgain:!0,changeMade:!0}));}),this.storyService.hotfix_introOutroGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.getAssetsForCurrentIntroOutro(this.storyService.story).then(E=>{this.setInOutro(this.storyService.story,E);});}),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(Pt(this.unsubscribe$)).subscribe(E=>kt(this,null,function*(){this.storyService.story.composerSessionState.introOutroChangeMadeByUndoRedo=!0,this.getAssetsForCurrentIntroOutro(E.story).then(x=>{this.setInOutro(E.story,x);});}));}setInOutro(e,t){let n=this.convertStoryIntroOutroToVdm(e.intro,t,this.userOnFreePlan),o=this.convertStoryIntroOutroToVdm(e.outtro,t,this.userOnFreePlan);this.updateState(r_(nd,_=>{_.assets=t,_.intro.obj=e.intro,_.intro.vdmObj=n,_.intro.thumbnail=e.intro?m0(e.intro.type,t,e.intro.data.properties.assetId):void 0,_.outro.obj=e.outtro,_.outro.vdmObj=o,_.outro.thumbnail=e.outtro?m0(e.outtro.type,t,e.outtro.data.properties.assetId):void 0;}));}getAssetsForCurrentIntroOutro(e){return kt(this,null,function*(){let t=[];if(e.intro?.type==="video"&&t.push(e.intro.data.properties.assetId),e.outtro?.type==="video"&&t.push(e.outtro.data.properties.assetId),e.intro?.type==="aux/card/generic"&&"logoId"in e.intro?.data&&t.push(e.intro.data.logoId),e.outtro?.type==="aux/card/generic"&&"logoId"in e.outtro?.data&&t.push(e.outtro.data.logoId),t=t.filter((n,o,_)=>_.indexOf(n)==o),t.length>0)try{return yield this.composerHttpService.getAssetsById(t);}catch(n){console.error("Error getting assets for current intro outro:",n),Qt(n);return;}else return;});}updateState(e){nd=e,this.store.next(nd);}convertStoryIntroOutroToVdm(e,t,n){if(e!==void 0){let o={type:void 0,data:{}};if(e.type==="video"){o.type="video",o.data.duration=e.data.duration,o.data.audioTrack="audioTrack"in e.data?e.data.audioTrack:Dr.OFF;let _=t?.result.find(E=>E.assetId===e.data.properties.assetId);o.data.url=_?.resource.streams.lower.url,e.data.duration!==_?.resource.duration&&(e.data.duration=_?.resource.duration,o.data.duration=e.data.duration);}else if(e.type==="aux/card/generic"){if("properties"in e.data||(e.data.properties={head:{company:"",name:""},details:[],social:[],isFreeUser:n}),o.type="aux/card/generic",o.data.duration=e.data.duration,o.data.audioTrack="audioTrack"in e.data?e.data.audioTrack:Dr.OFF,"logoId"in e.data){let _=t?.result.find(E=>E.assetId===e.data.logoId);o.data.logo=_?.resource.url;}o.data.properties=e.data.properties?e.data.properties:void 0;}return o;}}updateIntroOutro(e,t){this.storyService.updateIntroOutro(e,t);}ngOnDestroy(){nd={intro:{vdmObj:void 0,obj:void 0,thumbnail:void 0},outro:{vdmObj:void 0,obj:void 0,thumbnail:void 0},assets:void 0},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(Yn),Rt(Po),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();s_();a_();Zv();var ux=["vdmPreviewer"];function dx(i,r){i&1&&tt(0,"img",16,1);}function hx(i,r){if(i&1){let e=_t();be(0,"div",12),Ze("click",function(){$e(e);let n=Le();return We(n.onVdmPreviewerClick());}),at(1,dx,2,0,"img",13),be(2,"div",14,1),Ze("click",function(n){$e(e);let o=Le();return We(o.onOpenVDMStudio(n));}),tt(4,"img",15),Oe()();}if(i&2){let e=Le(),t=mi(2);Li("z-index",e.cropVideoSelected?15:26)("width",t.clientWidth,"px")("height",t.clientHeight,"px")("display",e.isVDMStudioActive||e.cropVideoSelected?"none":"flex"),Ce(),ke("ngIf",!e.isVideoPlaying&&!e.isVideoLoading&&!e.isComposerVdmSpinnerShown),Ce(),Li("display",e.isVideoPlaying||e.isVideoLoading||e.isComposerVdmSpinnerShown||e.isVDMStudioActive||!e.isVDMStudioAvailable?"n
816one":"block");}}function px(i,r){if(i&1&&(be(0,"div",17),tt(1,"ngx-spinner",18)(2,"ngx-spinner",19),be(3,"ngx-spinner",20),tt(4,"lottie-loader"),Oe()()),i&2){let e=Le(),t=mi(2);Li("z-index",e.cropVideoSelected?15:26)("width",t.clientWidth,"px")("height",t.clientHeight,"px"),Ce(),ke("fullScreen",!1)("zIndex",23),Ce(),ke("fullScreen",!1)("zIndex",23),Ce(),ke("fullScreen",!0)("zIndex",30);}}function fx(i,r){if(i&1){let e=_t();be(0,"composer-vdm-studio",21),Ze("closeVdmStudioComponent",function(n){$e(e);let o=Le();return We(o.onCloseVDMStudio(n));}),Oe();}if(i&2){let e=Le();ke("vdmAdapterStory",e.vdmAdapterStory)("index",e.selectedSlide.index)("time",e.videoMakerPlugin.currentTime)("vdmPreviewerWidth",e.vdmPreviewerWidth)("vdmPreviewerHeight",e.vdmPreviewerHeight)("aspectRatio",e.story.aspectRatio);}}function mx(i,r){i&1&&tt(0,"div",22);}function gx(i,r){if(i&1&&tt(0,"img",25),i&2){let e=Le(2);ke("src",e.cropVideoThumbnail,An);}}function yx(i,r){if(i&1&&(be(0,"div",23),at(1,gx,1,1,"img",24),Oe()),i&2){let e=Le();Li("width",e.vdmPreviewerWidth,"px")("height",e.vdmPreviewerHeight,"px"),Ce(),ke("ngIf",e.cropVideoThumbnail);}}function vx(i,r){i&1&&(be(0,"div",26),tt(1,"composer-cropper"),Oe());}function _x(i,r){i&1&&(be(0,"div",27),tt(1,"img",28),be(2,"div"),lt(3,"Preview quality is reduced. Final export will be higher quality"),Oe()());}function bx(i,r){i&1&&(ti(0),be(1,"span",39),lt(2,"Loading"),Oe(),be(3,"span",40),lt(4,"Themes"),Oe(),ii());}function Sx(i,r){i&1&&(ti(0),be(1,"span",39),lt(2,"Loading"),Oe(),be(3,"span",41),lt(4,"Captions"),Oe(),ii());}function wx(i,r){i&1&&(ti(0),be(1,"span",39),lt(2,"Loading"),Oe(),be(3,"span",42),lt(4,"Media"),Oe(),ii());}function Ex(i,r){i&1&&(ti(0),be(1,"span",39),lt(2,"Loading"),Oe(),be(3,"span",43),lt(4,"Business Info"),Oe(),ii());}function xx(i,r){if(i&1&&(be(0,"span",44),lt(1),Oe()),i&2){let e=Le(2);Li("color",e.progressTextColorList[(e.loaderTextSegment==null?null:e.loaderTextSegment.length)%e.progressTextColorList.length]),Ce(),_i(e.loaderTextSegment);}}function Tx(i,r){if(i&1){let e=_t();be(0,"div",45)(1,"div",46)(2,"div",47),lt(3,"This is taking longer than expected"),Oe(),be(4,"div",48),lt(5," Sending us the report will help us make sure it doesn't happen in the future. "),Oe()(),be(6,"div",49)(7,"button",50),Ze("click",function(){$e(e);let n=Le(2);return We(n.onCloseCrashReportPopup());}),lt(8," Don't send "),Oe(),be(9,"button",51),Ze("click",function(){$e(e);let n=Le(2);return We(n.onCloseCrashReportPopup(!0));}),lt(10," Send report & Exit "),Oe()()();}}function Cx(i,r){if(i&1&&(be(0,"div",29)(1,"div",30),tt(2,"progress-bar",31),be(3,"div",32),lt(4),Oe(),be(5,"div",33)(6,"div",34),ti(7,35),at(8,bx,5,0,"ng-container",36)(9,Sx,5,0,"ng-container",36)(10,wx,5,0,"ng-container",36)(11,Ex,5,0,"ng-container",36)(12,xx,2,3,"span",37),ii(),Oe()()(),at(13,Tx,11,0,"div",38),Oe()),i&2){let e=Le();Ce(2),ke("progressValue",e.progressBarValue),Ce(2),hn(" ",e.progressBarValue,"% "),Ce(3),ke("ngSwitch",e.loaderTextSegment),Ce(),ke("ngSwitchCase","Themes"),Ce(),ke("ngSwitchCase","Captions"),Ce(),ke("ngSwitchCase","Media"),Ce(),ke("ngSwitchCase","Business Info"),Ce(2),ke("ngIf",e.showCrashDialog);}}window.bodyPix=S_;window.tf=b_;var Ox=/((?:&+ *)+)(?=\n+\d+:\d+:\d+.\d+ --> )/ig,xm=2.5,Px=60,Ix=10,g0=6e4,kx=500,Ax="Choosing the best B-Roll overlays...",Mx="Highlighting Keywords...";Number.prototype.bvFixed=function(){return Number(this.valueOf().toFixed(4));};var S0=function(i){return i[i.TopLeft=0]="TopLeft",i[i.TopMiddle=1]="TopMiddle",i[i.TopRight=2]="TopRight",i[i.CenterLeft=3]="CenterLeft",i[i.CenterMiddle=4]="CenterMiddle",i[i.CenterRight=5]="CenterRight",i[i.BottomLeft=6]="BottomLeft",i[i.BottomMiddle=7]="BottomMiddle",i[i.BottomRight=8]="BottomRight",i[i.UNSET=9]="UNSET",i;}(S0||{}),Cm=(()=>{class i{WindowBeforeUnload(e){this.savePromptGuardService.isDirty.value&&(e.returnValue="");}constructor(e,t,n,o,_,E,x,h,y,b,p,c,d,m,a,s,l,g,f,v,S,w,C){this.storyService=e,this.route=t,this.composerHttpService=n,this.notifier=o,this.videoSlidesService=_,this.ngxSpinner=E,this.styleVideoService=x,this.composerService=h,this.adminRequestsService=y,this.deskManagerHelperService=b,this.router=p,this.undoRedoService=c,this.savePromptGuardService=d,this.location=m,this.websocketService=a,this.eventsService=s,this.introOutroService=l,this.zone=g,this.composerEventsService=f,this.taskProgressService=v,this.userHelperService=S,this.creditsService=w,this.thumbnailBlobCacheService=C,this.sidebarWidth=0,this.infoPanelWidth=0,this.sceneEditorHeight=0,this.headerHeight=56,this.textPositions=["TopLeft","TopMiddle","TopRight","CenterLeft","CenterMiddle","CenterRight","BottomLeft","BottomMiddle","BottomRight"],this.isVideoPlaying=!1,this.unsubscribe$=new Yt(),this.VDMPreviewer=_0.VDMPluginPreviewer,this.VDMAdapter=b0.default,this.isFirstLoad=!0,this.changesCounter=0,this.didHealPreviewUrl=!1,this.progressBarValue=5,this.loaderTextSegment="",this.showCrashDialog=!1,this.isComposerVdmSpinnerShown=!1,this.progressTextColorList=["#FF4D5B","#AA58EE","#00D096","#4481FD","#FF86BC"],this.vdmPreviewerSuccessfullyLoaded=!1,this.currentPlayerTime=0,this.vdmPreviewerWidth=0,this.vdmPreviewerHeight=0,this.isWindowResizing=!1,this.introVdmObj=void 0,this.outroVdmObj=void 0,this.introDuration=0,this.showVDMBufferingSpinner$=new Yt(),this.shouldEmphasizeCaptions=!1,this.handleHeadBoundingBoxDetectedCallback=O=>{try{O?.detail&&this.storyService.addHeadBoundingBoxDataToMedia(O.detail.slideIndex,O.detail.mediaIndex,O.detail.headBoundingBox);}catch(M){console.error("Error adding head bounding box data to media:",M),Qt(new Error("Error adding head bounding box data to media: "+M));}},this.handlePersonBoundingBoxDetectedCallback=O=>{try{O?.detail&&this.storyService.addPersonBoundingBoxFromEvent(O.detail.slideIndex,O.detail.mediaIndex,O.detail.personBoundingBox);}catch(M){console.error("Error adding person bounding box data to media:",M),Qt(new Error("Error adding person bounding box data to media: "+M));}},this.previewStoryDurationInSec=()=>{let O=this.introDuration+this.story.audio.duration;return O+=this.outroVdmObj!==void 0?this.outroVdmObj.data.duration:0,O;},this.isFirstLoad=!0,this.wrapperThumbnailData={width:-1,height:-1,aspectRatio:void 0};let I=this.router.getCurrentNavigation()?.extras?.state;I&&!("source"in I)&&(this.mediaId=I.mediaId,this.segmentationImportData=I.segmentation,this.shouldEmphasizeCaptions=!!I.features?.emphasize,this.preselectedAspectRatio=I.features?.orientation,this.wordsPerSlide=I.features?.wordsPerSlide);}ngOnInit(){return kt(this,null,function*(){if(this.crashReportTimer=_o(g0).pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.loadingSequenceCrash();}),this.undoRedoService.setUndoRedoType$.next("composer"),this.undoRedoService.initializeState(),this.videoMakerPlugin=new this.VDMPreviewer("vdm-previewer"),this.addVdmPreviewCallbacks(),this.runProgressBar(200),this.isVideoLoading=!0,this.subscribeToSubjects(),this.story=this.getStoryFromRoute(),this.story.type===void 0)Qt(new Error(`Error! unknown story type ${this.story?.type} [0]`)),this.router.navigate([Tr.globals.projectsPage]);else if(this.story.type===Lr.SCRIPT||this.story.type===Lr.SEQUENCE){delete this.story.storyId,delete this.story.v,this.story.parent&&(console.warn(`Warning! story ${this.story.id} have a parent ${this.story.parent.storyId}`),Qt(new Error(`Warning! story ${this.story.id} have a parent ${this.story.parent.storyId}`)),delete this.story.parent),this.composerEventsService.isStoryTranslated&&(this.story.metadata.locale=this.composerEventsService.editLang),this.updateUrlState();let n=!1;try{yield this.convertToComposerStory(this.story);}catch(o){n=!0,this.loadingSequenceCrash(),console.error("Error importing script:",o),Qt(o);}if(this.composerEventsService.log(this.eventsService.events.composer.openStory,{originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,isTranslated:this.composerEventsService.isStoryTranslated,autoFixed:this.composerEventsService.isUserTriedAutoFixed.toString(),importedFrom:this.story.type,isEdit:"false",captions:"true",openType:this.composerEventsService.isStoryTranslated?"newTranslated":"newRegular",numSlides:this.story.media?this.story.media.length.toString():void 0,videoDuration:this.composerEventsService.videoDuration?.toString(),emphasized:this.shouldEmphasizeCaptions,emphasizedWords:this.composerEventsService.emphasizedCaptions?.emphasizedWords,emphasizedWordsPerc:this.composerEventsService.emphasizedCaptions?.emphasizedWordsPerc,originalOrientation:this.story.composerSessionState.storyOriginalAspectRatio,selectedOrientation:this.preselectedAspectRatio,broll:this.composerEventsService.isBRollApplied.toString(),brollSource:this.composerEventsService.bRollSource,brollAmount:this.composerEventsService.bRollAmount,minWordsCount:this.composerEventsService.wordsPerSlide,firstLayout:this.composerEventsService.firstSceneLayout,error:n}),n)return;yield this.ngOnInitEditVideoCreation(this.story),this.savePromptGuardService.isDirty.next(!0),this.storyService.story=this.story,this.videoSlidesService.showSelectedSlide$.next(this.story.media[0]),this.storyService.hotfix_scenesGotUpdated$.next();}else if(this.story.type===Lr.COMPOSER){let n=!1;if(this.composerEventsService.videoDuration!=null)this.composerEventsService.log(this.eventsService.events.composer.openStory,{originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,autoFixed:this.composerEventsService.isUserTriedAutoFixed.toString(),isTranslated:this.composerEventsService.isStoryTranslated,isEdit:"true",captions:"true",openType:this.composerEventsService.isStoryTranslated?"newTranslated":"newRegular",numSlides:this.story.media.length.toString(),videoDuration:this.composerEventsService.videoDuration.toString()});else{n=!0;let o=yield this.validateAndNormalizeSliderStoryAudio();if(o&&(this.composerEventsService.videoDuration=this.story.audio.duration),this.composerEventsService.log(this.eventsService.events.composer.openStory,{originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,autoFixed:this.composerEventsService.isUserTriedAutoFixed.toString(),isTranslated:this.composerEventsService.isStoryTranslated,isEdit:"true",captions:"true",openType:this.composerEventsService.isStoryTranslated?"newTranslated":"newRegular",numSlides:this.story.media.length.toString(),videoDuration:this.composerEventsService.videoDuration?.toString()}),!o){let _=new Error(`Slider story missing audio data. storyId: ${this.story.storyId}`);console.error(_.message),Qt(_),this.router.navigate([Tr.globals.projectsPage]);return;}}if(!n&&!(yield this.validateAndNormalizeSliderStoryAudio())){let o=new Error(`Slider story missing audio data. storyId: ${this.story.storyId}`);console.error(o.message),Qt(o),this.router.navigate([Tr.globals.projectsPage]);return;}this.isFirstLoad&&(this.progressBarValue=this.progressBarValue<50?50:this.progressBarValue),this.story.composerSessionState.baseMedia={type:"video",previewUrl:this.story.audio.previewUrl,thumbnailUrl:this.story.audio.thumbnailUrl,url:this.story.audio.url,assetDuration:this.story.audio.assetDuration},yield this.storyService.generateStoryboardData(this.story.parent?.storyboard),yield this.setStoryThumbnailAndAspect(this.story),yield this.ngOnInitEditVideoCreation(this.story),this.savePromptGuardService.isDirty.next(!1),this.videoSlidesService.showSelectedSlide$.next(this.story.media[0]),this.didHealPreviewUrl&&(this.didHealPreviewUrl=!1,this.saveAndGenerateVideo(!1,!0).catch(o=>{console.error("Failed to persist healed audio.previewUrl",o),Qt(o,{tags:{feature:"rnd-4024-heal"}});}));}else this.router.navigate([Tr.globals.projectsPage]),Qt(new Error(`Error! unknown story type ${this.story?.type} [1]`));let e,t;$a(window,"resize").pipe(Go(()=>{this.isWindowResizing=!0,this.closeCropping(),this.isVDMStudioActive&&this.onCloseVDMStudio(!1),(e===void 0||t===void 0)&&(e=this.vdmPreviewerWidth,t=this.vdmPreviewerHeight),this.vdmPreviewer.nativeElement.style.display="none";let n=document.getElementsByClassName("composer-video-preview-container")[0].clientWidth,o=document.getElementsByClassName("composer-video-preview-container")[0].clientHeight,_=n*.85,E=_*this.aspectRatioToFloat
816("horizontal");E>o*.85&&(E=o*.85,_=E*this.aspectRatioToFloat("vertical")),this.vdmPreviewerWidth=_,this.vdmPreviewerHeight=E;let x=_/e,h=E/t,y=Math.min(x,h);this.vdmPreviewer.nativeElement.style.scale=`${y}`,this.vdmPreviewer.nativeElement.style.display="block";}),Ti(),On(300),Pt(this.unsubscribe$)).subscribe(()=>{this.vdmPreviewer.nativeElement.style.removeProperty("scale"),e=this.vdmPreviewerWidth,t=this.vdmPreviewerHeight,this.createVDMStoryAndUpdateVDMPluginStory(),this.isWindowResizing=!1;}),this.ngxSpinner.spinnerObservable.pipe(sn(n=>n===void 0),Pt(this.unsubscribe$)).subscribe(n=>{n.name==="composer-vdm-spinner"&&(this.isComposerVdmSpinnerShown=n.show);}),this.showVDMBufferingSpinner$.pipe(rv(kx),Pt(this.unsubscribe$)).subscribe(n=>{n?this.ngxSpinner.show("composer-vdm-spinner-buffering"):this.ngxSpinner.hide("composer-vdm-spinner-buffering");});});}addVdmPreviewCallbacks(){try{this.videoMakerPlugin.addEventListener("headBoundingBoxDetected",this.handleHeadBoundingBoxDetectedCallback),this.videoMakerPlugin.addEventListener("personBoundingBoxDetected",this.handlePersonBoundingBoxDetectedCallback);}catch{console.warn("Using old VDM plugin events API. Head bounding box data will not be added to media.");}}loadingSequenceCrash(){this.crashReportTimer.unsubscribe(),this.showCrashDialog=!0,this.composerEventsService.log(this.eventsService.events.composer.reportCrash);}validateAndNormalizeSliderStoryAudio(){return kt(this,null,function*(){if(!this.story.audio||!this.story.audio.url||!this.story.audio.duration||!this.story.audio.thumbnailUrl)return!1;if(!this.story.audio.previewUrl||this.story.audio.previewUrl===this.story.audio.url){let t=this.story.audio.format!=="mp3"&&this.story.media?.flatMap(n=>n.media??[]).find(n=>n?.type==="video"&&n.url===this.story.audio.url&&n.previewUrl)?.previewUrl;t&&t!==this.story.audio.url?(this.story.audio.previewUrl=t,this.didHealPreviewUrl=!0):this.story.audio.previewUrl=this.story.audio.url;}if(!this.story.audio.assetDuration){let e=yield Qu([this.story.audio.url]);this.story.audio.assetDuration=e.get(this.story.audio.url)??this.story.audio.duration;}return!0;});}runProgressBar(e,t){clearInterval(this.mediaInterval),this.mediaInterval=setInterval(()=>{this.storyService.story===void 0&&this.progressBarValue===99||(this.progressBarValue+=1),this.progressBarValue<25?this.loaderTextSegment="Business Info":this.progressBarValue<50?this.loaderTextSegment="Themes":this.progressBarValue<75?this.loaderTextSegment="Media":this.progressBarValue<99?this.loaderTextSegment="Captions":this.progressBarValue>=100&&(clearInterval(this.mediaInterval),this.composerEventsService.log(this.eventsService.events.composer.loadingEnded,{takeId:this.composerEventsService.takeId,numSlides:this.storyService.story.media?.length.toString(),videoDuration:this.composerEventsService.videoDuration?.toString()})),t!==void 0&&(this.loaderTextSegment=t);},e);}pauseProgressBar(e){clearInterval(this.mediaInterval),e!==void 0&&(this.loaderTextSegment=e);}getStoryFromRoute(){return this.route.snapshot.data.story;}setStoryThumbnailAndAspect(e){return kt(this,null,function*(){let t=e.audio.thumbnailUrl;yield this.thumbnailBlobCacheService.getThumbnailBlobUrl(t).then(n=>kt(this,null,function*(){e.audio.thumbnailUrl=n,this.storyService.hotfix_storyThumbnailGotUpdated$.next(),this.cropVideoThumbnail=n;let o=yield this.setStoryOriginalAspectRatio(e.audio.thumbnailUrl);e.composerSessionState.storyOriginalAspectRatio=o;}));});}ngAfterViewInit(){this.videoMakerPlugin.on("ready",e=>{this.zone.run(()=>{this.showVDMBufferingSpinner$.next(!1);});}),this.videoMakerPlugin.on("buffering",e=>{this.zone.run(()=>{this.showVDMBufferingSpinner$.next(!0);});}),this.videoMakerPlugin.on("update",(e,t)=>{this.zone.run(()=>{this.currentPlayerTime=e;});}),this.videoMakerPlugin.on("ended",e=>{this.zone.run(()=>{Math.abs(e-this.previewStoryDurationInSec())<Xi.MIN_SLIDE_DURATION_SEC&&(e=e-.1);let t=this.videoSlidesService.playerAction$.getValue().action;(t==="playIntro"||t==="playOutro")&&(e=this.introDuration+this.selectedSlide.metadata.time),this.videoSlidesService.playerAction$.next({action:"pause",timeInSec:e}),this.currentPlayerTime=e,this.isVideoPlaying=!1,this.videoSlidesService.playerStatus$.next({isPlaying:!1}),this.videoSlidesService.slideStatus$.next({status:"pause",slideIndex:this.selectedSlide.index});});}),this.videoMakerPlugin.on("start",e=>{this.zone.run(()=>{let t=this.videoSlidesService.playerAction$.getValue().action;this.videoSlidesService.playerStatus$.next({isPlaying:!0,type:t}),t==="playPreviewer"&&this.videoSlidesService.slideStatus$.next({status:"play",slideIndex:this.selectedSlide.index}),this.introVdmObj&&this.selectedSlide.index==1&&this.videoSlidesService.slideStatus$.next({status:"play",slideIndex:this.selectedSlide.index});});}),this.videoMakerPlugin.on("slide",(e,t)=>{this.zone.run(()=>{let n=this.videoSlidesService.playerAction$.getValue().action;if(n==="playIntro"||n==="playOutro"){this.videoSlidesService.slideStatus$.next({status:"play",slideIndex:-1});return;}if(this.introVdmObj&&t===0||this.introVdmObj&&this.outroVdmObj&&t>this.story.media.length||!this.introVdmObj&&this.outroVdmObj&&t===this.story.media.length){this.videoSlidesService.slideStatus$.next({status:"play",slideIndex:-1});return;}
816this.introVdmObj&&(t=t-1),this.selectedSlide=this.story.media[t],this.selectedSlide.bigvuAssetsBlacklistIds=new Set(),this.selectedSlide.externalAssetsBlacklistIds=new Set(),this.storyService.story.composerSessionState.selectedSlide=this.selectedSlide,this.videoSlidesService.slideStatus$.next({status:"play",slideIndex:t});});});}projectAutoSaveInterval(e){let t=e*1e3;this.savingInterval=setInterval(()=>{this.videoSlidesService.savingInfo$.next({isSaving:!0}),this.storyService.story.composerSessionState.autoSave&&this.saveAndGenerateVideo(!1).then(()=>{this.changesCounter=0,this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0});}).catch(()=>{clearInterval(this.savingInterval),this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),this.notifier.error("Something went wrong on saving.");});},t);}setMainTrackData(e,t){return kt(this,null,function*(){e.audio&&console.warn(`replacing main track with media ${t}`);for(let n of e.videos)if(n.mediaId===t){e.audio={duration:n.duration,url:n.streams[0].url,format:n.streams[0].container,volume:1,thumbnailUrl:n.thumbnails[n.thumbnails.length-1].url,previewUrl:n.streams[n.streams.length-1].url,assetDuration:n.duration},e.composerSessionState.baseMedia={type:"video",previewUrl:e.audio.previewUrl,thumbnailUrl:e.audio.thumbnailUrl,url:e.audio.url,assetDuration:e.audio.assetDuration},yield this.storyService.generateStoryboardData(n.storyboard),this.storyService.hotfix_storyThumbnailGotUpdated$.next();break;}e.audio||console.error(`Error! no main track found for ${t}`);});}createPresenterMediaObject(e,t,n){return[{type:"video",url:e,previewUrl:t,thumbnailUrl:n}];}convertToComposerStory(e){return kt(this,null,function*(){delete e.storyId,delete e.v,e.status="draft",e.readyDate=new Date().toISOString(),e.lastUpdate=new Date().toISOString(),e.parent=e.composerSessionState.storyParent,e.transition=0,e.aspectRatio=this.preselectedAspectRatio,yield this.setMainTrackData(e,this.mediaId),yield this.setStoryThumbnailAndAspect(e);let t=this.createPresenterMediaObject(e.audio.url,e.audio.previewUrl,e.audio.thumbnailUrl),n=yield this.sliceMediaFromSegmentation(t,e.audio.duration);if(e.composerSessionState.bRollFeature)try{this.crashReportTimer.unsubscribe(),this.pauseProgressBar(Ax),yield this.addBrollToImportedStory(e,this.segmentationImportData.lang,n);}catch(E){Qt(E),this.notifier.error("Something went wrong while adding B-Roll."),console.error("Error! Failed to add B-Roll.",E);}finally{this.crashReportTimer=_o(g0).pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.loadingSequenceCrash();}),this.runProgressBar(200);}e.media=n,e.type=Lr.COMPOSER,"metadata"in e?e.metadata.locale=this.segmentationImportData.lang:e.metadata={locale:this.segmentationImportData.lang},e.storyId!==void 0&&(console.error("Error! storyId is not undefined."),Qt(new Error("Error! storyId is not undefined.")),delete e.storyId);let o=e.audio?.duration.bvFixed(),_=e.media?.reduce((E,x)=>E+(x.metadata?.duration??0),0).bvFixed();if(o>0&&_>0&&o>_){let E=o-_;e.media[e.media.length-1].metadata.duration+=E;}});}ngOnInitEditVideoCreation(e,t){return kt(this,null,function*(){this.addCustomAttributesToStory(e),"logo"in e||(yield Promise.all(e.media.map(x=>kt(this,null,function*(){"bug"in x&&(console.error("Error! slide have a non-story logo"),delete x.bug);})))),yield Promise.all(e.media.map(x=>kt(this,null,function*(){for(let h of x.media)this.thumbnailBlobCacheService.getThumbnailBlobUrl(h.thumbnailUrl).then(y=>{h.thumbnailUrl=y;});})));let n=e.media.flatMap(x=>x.media.filter(h=>h?.type==="video"&&!("assetDuration"in h)).map(h=>h.url)),o=[...new Set(n)],_=yield Qu(o);yield Promise.all(e.media.map(x=>kt(this,null,function*(){for(let h of x.media)if(h.type==="video"&&!("assetDuration"in h)){let y=_.get(h.url);y&&(h.assetDuration=y);}})));let E=!0;yield Promise.all(e.media.map(x=>kt(this,null,function*(){"seek"in x.metadata&&x.media.length>1&&(console.error("Legacy slide have more than one media item"),Qt(new Error("Legacy slide have more than one media item")),E=!1);for(let h of x.media)h.type==="video"&&"seek"in h&&"seek"in x.metadata&&(console.error("Slide have seek in metadata and in media item"),Qt(new Error("Slide have seek in metadata and in media item")),E=!1);}))),E&&(yield Promise.all(e.media.map(x=>kt(this,null,function*(){x.media[0].type==="video"&&"seek"in x.metadata&&(x.media[0].seek=x.metadata.seek),delete x.metadata.seek;}))));});}addCustomAttributesToStory(e){for(let t=0;e.media&&t<e.media.length;t++)e.media[t].metadata.time=e.media[t].metadata.time.bvFixed(),e.media[t].metadata.duration=e.media[t].metadata.duration.bvFixed(),e.media[t].metadata.transition=0,"textPosition"in e.media[t].metadata||(e.media[t].metadata.textPosition=S0.BottomMiddle),"textTransition"in e.media[t].metadata||(e.media[t].metadata.textTransition=0),"index"in e.media[t]||(e.media[t].index=t);}sliceMediaFromSegmentation(e,t){return kt(this,null,function*(){let n=this.segmentationImportData.data;!n&&this.segmentationImportData.url&&(n=yield this.composerHttpService.fetchSegmentationJson(this.segmentationImportData?.url)),this.segmentation=n;let o=this.router.lastSuccessfulNavigation?.extras?.state,E=(o&&!("source"in o)?o:void 0)?.features?.wordsPerSlide,h=(yield this.composerHttpService.createCaptionsVtt(this.segmentationImportData.lang,n,E)).replace(Ox,""),b=new WebVTTParser().parse(h).cues;!b||b.length===0?b=[new VTTCue(0,t.bvFixed(),"")]:b[0].startTime.bvFixed()>0&&(b[0].startTime.bvFixed()>=xm?b.unshift(new VTTCue(0,b[0].startTime.bvFixed(),"")):b[0].startTime=0),b=b.filter(d=>d.startTime!==d.endTime);let p=d=>{d[d.length-1].startTime.bvFixed()>=t.bvFixed()&&(d.pop(),console.error("Error! cues timeline is longer than the story, removing last cue"),p(d));};p(b),b[b.length-1].endTime.bvFixed()>t.bvFixed()&&(b[b.length-1].endTime=t.bvFixed(),console.error("Error! cues timeline is longer than the story, modifying last cue end time")),b[b.length-1].endTime.bvFixed()<t.bvFixed()&&((t-b[b.length-1].endTime).bvFixed()>=xm?b.push(new VTTCue(b[b.length-1].endTime.bvFixed(),t.bvFixed(),"")):b[b.length-1].endTime=t.bvFixed());for(let d=0;d<b.length;d++){let m=b[d],a=b[d+1];if(a){let s=(a.startTime-m.endTime).bvFixed();s>0?s>=xm?b.splice(d+1,0,new VTTCue(m.endTime.bvFixed(),a.startTime.bvFixed(),"")):m.endTime=a.startTime.bvFixed():s<0&&(a.startTime=m.endTime.bvFixed());}}if(this.shouldEmphasizeCaptions)try{this.runProgressBar(500,Mx);let d=b.map(a=>a.text),m=yield this.composerHttpService.createEmphasizedCaptions(d);this.composerEventsService.emphasizedCaptions=m,b.forEach((a,s)=>{a.text=m.segments[s];});}catch(d){Qt(d),console.error("Error! Failed to highlighting keywords",d),this.notifier.error("Something went wrong while highlighting keywords.");}finally{this.runProgressBar(200);}this.runProgressBar(200);let c=[];b.forEach((d,m)=>{let a=d.startTime.bvFixed(),s=d.endTime.bvFixed(),l=a,g=Va.cloneDeep(e);g[0].seek=l;let f={duration:(s-a).bvFixed(),textTransition:0,textPosition:7,transition:0,time:l,templateIds:[]},v=this.storyService.createBasicSlide(m,d.text,g,f);c.push(v);});for(let d=0;d<c.length;d++){let m=c[d],a=c[d+1];a&&(m.metadata.time+m.metadata.duration).bvFixed()!==a.metadata.time&&(console.error("Error! timeline is not sequential (time/duration)"),a.metadata.time=(m.metadata.time+m.metadata.duration).bvFixed());}return c;});}
816addBrollToImportedStory(e,t,n){return kt(this,null,function*(){let o=[];n.forEach(b=>{o.push({duration:b.metadata.duration,text:b.text});});let _=e.composerSessionState.bRollFeature,E=e.aspectRatio,h=(yield this.composerHttpService.getBrollsForSlides(E,t.split("-")[0],_.amount,_.library,o,_.assets)).taskId;if(!h)throw new Error("Failed to create B-Roll task E01");let y=yield this.busyWaitForBrollStatus(h);if(!y)throw new Error("Failed to create B-Roll task E02");_.storyTopic!==void 0&&(console.error("bRoll feature should not have a topic"),Qt(new Error("bRoll feature should not have a topic"))),_.storyTopic=y.topic;for(let b of y.overlays){e.composerSessionState.bRollUrlsMap.set(b.lowResUrl,{id:b.id,library:b.library,url:b.lowResUrl}),e.composerSessionState.bRollUrlsMap.set(b.highResUrl,{id:b.id,library:b.library,url:b.highResUrl});let p=0;if(b.type==="video"&&b.sceneSeek>0){let c=b.indices.reduce((d,m)=>d+(n[m]?.metadata.duration??0),0);p=Math.min(b.sceneSeek,Math.max(0,b.duration.bvFixed()-c)).bvFixed();}for(let c=0;c<b.indices.length;c++){let d=b.indices[c];if(d>n.length-1){console.error("Invalid index number in b-roll indices");continue;}if(b.type==="image"){n[d].media=[{thumbnailUrl:b.thumbnailUrl??b.lowResUrl,url:b.highResUrl,type:"image"}];let m={attributes:{fromVal:c===0?1:1.2,toVal:1.2,offsetTime:0,duration:1},type:"zoomPan"};"effects"in n[d].metadata?(n[d].metadata.effects.splice(0,n[d].metadata.effects.length,...n[d].metadata.effects.filter(a=>a.type!=="zoomPan")),n[d].metadata.effects.push(m)):n[d].metadata.effects=[m];}else b.type==="video"&&("effects"in n[d].metadata&&n[d].metadata.effects.splice(0,n[d].metadata.effects.length,...n[d].metadata.effects.filter(m=>m.type!=="zoomPan")),n[d].media=[{thumbnailUrl:b.thumbnailUrl??p0,previewUrl:b.lowResUrl,url:b.highResUrl,assetDuration:b.duration.bvFixed(),seek:p,type:"video"}],p+=n[d].metadata.duration);}}this.runProgressBar(200);});}busyWaitForBrollStatus(e){return kt(this,null,function*(){this.websocketService.listen();let t=5*60*1e3,n=this.taskProgressService.getProgressDataForEntity(e),o=this.taskProgressService.taskFailed$,_=this.progressBarValue,E=(100-_)/2,x=n.pipe(fa(null),On(t),oi(()=>{throw new Error("Timeout: No progress updates received for 5 minutes");}));try{return yield Xd(Kd([Vn([n,o.pipe(fa(null),sn(y=>y===null?!0:y?.entityId===e||y?.entityIds?.includes(e)))]).pipe(Go(([y,b])=>{if(b===null&&y){let p=this.taskProgressService.getProgressPercentage(y,e);if(p!=null){let c=_+p/100*E;this.progressBarValue=Math.min(Math.floor(c),100);}}}),sn(([y,b])=>b!==null?!0:y?.status==="completed"||y?.taskStatus==="completed"),oi(([y,b])=>{if(b!==null)throw new Error(b.status||"Task failed");return y?.result?.broll;}),zr(1)),x]));}catch(h){throw h;}});}playPreviewer(){this.videoSlidesService.playerAction$.next({action:"playPreviewer"});}pausePreviewer(){this.videoSlidesService.playerAction$.next({action:"pause"});}play(e,t,n){return kt(this,null,function*(){if(this.storyService.hotfix_vdmStudioDismissedExternalEvent$.next(),e===void 0&&(e=this.currentPlayerTime),this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.value){this.notifier.error("Loading video, please try again in a few seconds.");return;}else{let o=e;t===void 0&&n===void 0?n=this.previewStoryDurationInSec():t!==void 0&&(n=o+this.story.media[t].metadata.duration-.1),this.zone.runOutsideAngular(()=>kt(this,null,function*(){for(let _ of this.videoMakerPlugin.timelinePlayer.mainTimeline.getChildren(!0,!0,!1))_.data==="isPause"&&_.kill();this.videoMakerPlugin.play(o,n);})),this.isVideoPlaying=!0;}});}pause(e){return kt(this,null,function*(){return this.storyService.hotfix_vdmStudioDismissedExternalEvent$.next(),this.showVDMBufferingSpinner$.next(!1),yield this.ngxSpinner.show("composer-vdm-spinner"),new Promise((t,n)=>{this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.next(!0),this.isVideoLoading=!0,this.zone.runOutsideAngular(()=>{this.videoMakerPlugin.pause(e).then(()=>{this.zone.run(()=>{this.ngxSpinner.hide("composer-vdm-spinner"),this.isVideoLoading=!1,this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.next(!1),this.videoSlidesService.playerStatus$.next({isPlaying:!1}),this.videoSlidesService.slideStatus$.next({status:"pause",slideIndex:this.selectedSlide.index}),this.isVideoPlaying=!1;}),t();}).catch(o=>{this.zone.run(()=>{console.error(o),this.notifier.error("Something went wrong. Try again");}),n();});});});});}build(){return new Promise((e,t)=>
816{this.zone.runOutsideAngular(()=>kt(this,null,function*(){try{let n=yield this.videoMakerPlugin.build();e(n);}catch(n){t(n),Qt(n);}}));});}cropVideoPreviewer(e){this.ngxSpinner.show("composer-vdm-spinner");let n=(o=>{if(!o||!this.wrapperThumbnailData?.width||!this.wrapperThumbnailData?.height)return;let{x:_,y:E,width:x,height:h}=o,{width:y,height:b}=this.wrapperThumbnailData;return{x1:_/y,y1:E/b,x2:(_+x)/y,y2:(E+h)/b};})(e);this.storyService.updateStoryZoom(n),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"cropVideoPreviewer",buildAgain:!0,changeMade:!0}),this.closeCropping();}prepareStoryForSaving(){this.storyService.applyPersonBoundingBoxToAllBgRemovalSlides();let e=Va.cloneDeep(this.story);if(e.storyId&&e.storyId===e.parent?.storyId){console.error("Error! while trying to update story, storyId is the same as parent.storyId."),Qt(new Error("Error! while trying to prepare story for API, storyId is the same as parent.storyId.")),this.notifier.error("Something went wrong, try again.");return;}this.segmentationImportData?.lang&&(e.locale=this.segmentationImportData.lang),this.story.metadata?.speechSyncAnimation?e.speechSyncAnimation=this.story.metadata.speechSyncAnimation:e.storyId&&(e.speechSyncAnimation="");let t=["storyId","themeId","v","vIgnore","headline","audio","soundbed","aspectRatio","transition","media","zoom","parent","intro","outtro","logo","themeVariationId","speechSyncAnimation","locale","folderId"];Object.keys(e).forEach(function(_){t.indexOf(_)===-1&&delete e[_];});let n={text:["type","text","bug","alignHorizontal","alignVertical","media","metadata"],image:["type","text","bug","alignHorizontal","alignVertical","media","metadata"],media:["type","url","thumbnailUrl","previewUrl","assetDuration","seek","headBoundingBox","personBoundingBox"],metadata:["time","templateIds","duration","transition","audio","textTransition","textPosition","effects","resources"]};e.media.forEach(_=>{Object.keys(_).forEach(function(E){n[_.type].indexOf(E)===-1&&delete _[E];}),Object.keys(_.metadata).forEach(function(E){n.metadata.indexOf(E)===-1&&delete _.metadata[E];}),_.media.forEach(E=>{_.type==="video"&&(!("assetDuration"in E)||"assetDuration"in E&&E.assetDuration===void 0||E.assetDuration===0)&&(console.error("assetDuration is not in mediaVal",E),Qt("assetDuration is not in mediaVal",{extra:{index:_.index,story:Va.cloneDeep(this.story)}}
816)),Object.keys(E).forEach(function(x){n.media.indexOf(x)===-1&&(delete E[x],delete E.hlsPlaylistUrl);});}),_.metadata.time=Number(_.metadata.time);});let o=["url","thumbnailUrl","format","duration","volume","isLoop","previewUrl","assetId"];return e.audio&&(Object.keys(e.audio).forEach(function(_){o.indexOf(_)===-1&&delete e.audio[_];}),e.audio.url&&e.audio.format==="mp3"&&(e.audio.previewUrl=e.audio.url)),e.soundbed&&!e.soundbed.url?delete e.soundbed:e.soundbed&&(Object.keys(e.soundbed).forEach(function(_){o.indexOf(_)===-1&&delete e.soundbed[_];}),e.soundbed.volume=Number(e.soundbed.volume)),(!e.audio||e.audio&&!e.audio.url)&&delete e.audio,"logo"in e&&(e.logo.assetId=e.logo.assetId,delete e.logo.asset,delete e.logo.url),this.reverseThumbnailUrlToVideoUrl(e),e;}generateStory(e){let t=[];e.media.forEach(h=>{h.metadata.templateIds.forEach(y=>{t.indexOf(y)===-1&&t.push(y);});});let n=[];if("themeVariationId"in e){let h=this.storyService.getThemeParamsByVariationId(e.themeVariationId,e.aspectRatio);for(let[y,b]of Object.entries(h))n.push({parameter:y,value:b});}e.metadata?.speechSyncAnimation&&n.push({parameter:"speechSyncAnimation",value:e.metadata.speechSyncAnimation});let o=[];"zoom"in e&&o.push({type:"zoom",zoom:e.zoom}),"logo"in e&&o.push({type:"logo",logo:{logoSize:e.logo.size,logoId:e.logo.asset.assetId}});let _=h=>{let y=Va.cloneDeep(h);return y.type==="video"?{type:y.type,[y.type]:{assetId:y.data.properties.assetId,audioTrack:y.data.audioTrack,duration:y.data.duration,templateIds:y.templateIds}}:y.type==="aux/card/generic"?(delete y.data.properties.logoId,{type:y.type,[y.type]:st(Ke({},y.data),{templateIds:y.templateIds})}):{};};if("intro"in e){let h=_(e.intro);o.push({type:"intro",intro:h});}if("outtro"in e){let h=_(e.outtro);o.push({type:"outtro",outtro:h});}"soundbed"in e&&this.storyService.story.soundbed?.assetId&&o.push({type:"soundBed",soundBed:{soundBedAssetId:this.storyService.story.soundbed.assetId,soundBedVolume:e.soundbed.volume}}),this.storyService.story.composerSessionState.audioNorm&&o.push({type:"audioNorm",audioNorm:!0});let E=[];this.storyService.story.composerSessionState.bRollFeature&&E.push("broll"),this.storyService.story.composerSessionState.autoZoomSlidesIndexes?.length>0&&E.push("aiZoom");let x=Ke({source:{type:"story",story:{storyId:e.storyId}},actions:[{type:"vdm",vdm:{storyResources:n,templateIds:t,aspectRatio:e.aspectRatio,actions:o}}]},E.length>0?{tags:E}:{});return this.adminRequestsService.generateV2Video(x).then(h=>{this.notifier.info("Generating video");let y=this.composerEventsService.buildApplyThemePayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,lowerThird:this.storyService.isStoryHaveLowerThirdSlides()});this.composerEventsService.log(this.eventsService.events.composer.applyTheme,y);},h=>{throw this.creditsService.handleCreditError(h)||(Qt(h),this.notifier.error(h?.responseJSON?.msg||"Something went wrong while requesting to generate video.")),h;});}reverseThumbnailUrlToVideoUrl(e){Zu(e.audio?.thumbnailUrl)&&(e.audio.thumbnailUrl=e.audio.url,this.storyService.hotfix_storyThumbnailGotUpdated$.next()),e.media?.map(n=>{for(let o of n.media)Zu(o.thumbnailUrl)&&(o.thumbnailUrl=o.url);}),(typeof e.audio?.thumbnailUrl=="string"&&e.audio.thumbnailUrl.startsWith("blob:")||(e.media||[]).some(n=>(n?.media||[]).some(o=>typeof o?.thumbnailUrl=="string"&&o.thumbnailUrl.startsWith("blob:"))))&&cr("Blob URL leaked past videomaker thumbnail cleanup",{extra:{storyId:e.storyId}});}saveAndGenerateVideo(e,t){return kt(this,null,function*(){let n=this.prepareStoryForSaving();var o=new Promise((_,E)=>{if(e)n.storyId?(delete n.parent,delete n.folderId,this.composerHttpService.updateComposerStory(n).pipe(Pt(this.unsubscribe$)).subscribe(x=>{this.story.v=x.v,n.storyId!==x.storyId&&(console.error(`Error! response storyId ${x.storyId} is not the same as story storyId ${n.storyId}.`),Qt(new Error(`Error! response storyId ${x.storyId} is not the same as story storyId ${n.storyId}.`)),this.notifier.error("Something went wrong, try again.")),this.savePromptGuardService.isDirty.next(!1),this.updateUrlState(),this.changesCounter=0,this.generateStory(x).then(()=>_("")).catch(h=>E(h));},x=>{x.error.msg==="No permissions to access this resource"?this.notifier.error("Permission denied, please contact owner"):this.notifier.error("Something went wrong, try again."),E(x);})):(n.deskId=this.deskManagerHelperService.getSelectedWorkspaceId(),this.composerHttpService.createComposerStory(n).pipe(Pt(this.unsubscribe$)).subscribe(x=>{this.story.storyId=x.storyId,this.story.v=x.v,this.composerEventsService.editStoryId=x.storyId,this.savePromptGuardService.isDirty.next(!1),this.changesCounter=0,this.generateStory(x).then(()=>_("")).catch(h=>E(h));},x=>{this.notifier.error("Something went wrong, try again."),E(x);}));else if(n.storyId){if(n.storyId===n.parent?.storyId){console.error("Error! while trying to update story, storyId is the same as parent.storyId."),Qt(new Error("Error! while trying to update story, storyId is the same as parent.storyId.")),this.notifier.error("Something went wrong, try again."),E();return;}delete n.parent,delete n.folderId,this.composerHttpService.updateComposerStory(n).pipe(Pt(this.unsubscribe$)).subscribe(x=>{this.story.v=x.v,n.storyId!==x.storyId&&(console.error(`Error! response storyId ${x.storyId} is not the same as story storyId ${n.storyId}.`),Qt(new Error(`Error! response storyId ${x.storyId} is not the same as story storyId ${n.storyId}.`)),this.notifier.error("Something went wrong, try again.")),t||this.notifier.info("Story updated!"),this.changesCounter=0,this.updateUrlState(),this.savePromptGuardService.isDirty.next(!1),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"saveAndGenerateVideo1",buildAgain:!1,changeMade:!1,isAutoSave:!0}),_("");},x=>{this.notifier.error("Something went wrong, try again."),E();});}else n.deskId=this.deskManagerHelperService.getSelectedWorkspaceId(),this.composerHttpService.createComposerStory(n).pipe(Pt(this.unsubscribe$)).subscribe(x=>{this.story.v=x.v,this.story.storyId=x.storyId,this.composerEventsService.editStoryId=x.storyId,this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"saveAndGenerateVideo2",buildAgain:!1,changeMade:!1,isAutoSave:!0}),this.changesCounter=0,this.updateUrlState(),this.savePromptGuardService.isDirty.next(!1),_(""),this.notifier.info("Story saved.");},x=>{E(),this.notifier.error("Something went wrong, try again.");});});return o;});}updateUrlState(){this.location.replaceState(this.story?.storyId?`/composer/${this.story.storyId}`:"/composer");}ngOnDestroy(){let e=()=>{this.videoMakerPlugin&&(this.videoMakerPlugin.clear(),this.videoMakerPlugin.clearCallbacks(),this.videoMakerPlugin=void 0),this.VDMAdapter=void 0;};if(this.videoMakerPlugin&&(this.videoMakerPlugin.removeEventListener("headBoundingBoxDetected",this.handleHeadBoundingBoxDetectedCallback),this.videoMakerPlugin.removeEventListener("personBoundingBoxDetected",this.handlePersonBoundingBoxDetectedCallback),this.videoMakerPlugin.clearCallbacks()),this.isVideoPlaying?this.pause().finally(()=>{e();}):e(),this.crashReportTimer.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete(),this.undoRedoService.ngOnDestroy(),clearInterval(this.savingInterval),clearInterval(this.mediaInterval),this.changesCounter=0,this.videoSlidesService.playerAction$.next({action:"pause"}),window.mediapipeSegmenter)try{window.mediapipeSegmenter.close(),window.mediapipeSegmenter=void 0;}
816catch(t){console.error("Error closing MediaPipe segmenter:",t),Qt(t);}this.storyService.resetMediaPipeState();}subscribeToSubjects(){this.storyService.mediaPipeInitializing$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.isFirstLoad&&e?this.runProgressBar(600,"Analyzing your recording"):this.isFirstLoad&&!e&&this.progressBarValue<100&&this.runProgressBar(200);}),this.videoSlidesService.saveAndGenerateVideo$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.saveAndGenerateVideo(e).catch(()=>{});},e=>{this.notifier.error(e.error.msg);}),this.videoSlidesService.shouldBuildVDMAgain$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{if(clearInterval(this.savingInterval),e.changeMade&&(this.changesCounter+=1),this.changesCounter>=1&&e.changeMade&&this.savePromptGuardService.isDirty.next(!0),(e.changeMade&&!e.isAutoSave&&!e.isUndoRedo||e.isFirstLoad&&!e.isAutoSave)&&(this.storyService.story.composerSessionState.buildSlideIndex=this.selectedSlide?.index??0,this.undoRedoService.updateState({story:this.story,customVariation:this.storyService.getThemeCustomVariation()})),e.changeMade===!0?this.projectAutoSaveInterval(Px):e.changeMade===!1&&clearInterval(this.savingInterval),e.isFirstLoad||this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),e.isUndoRedo||this.changesCounter===Ix&&(clearInterval(this.savingInterval),this.videoSlidesService.savingInfo$.next({isSaving:!0}),this.saveAndGenerateVideo(!1).then(()=>{this.changesCounter=0,this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0}),clearInterval(this.savingInterval);}).catch(()=>{this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),this.notifier.error("Something went wrong. Try again");})),e&&e.buildAgain){this.isVideoLoading=!0,this.ngxSpinner.show("composer-vdm-spinner");let t=this.storyService.mediaPipeInitPromise||Promise.resolve();pa(!0).pipe(zr(1),$s(150),Go(()=>kt(this,null,function*(){yield t,this.createVDMStoryAndUpdateVDMPluginStory();}))).subscribe();}}),this.videoSlidesService.showSelectedSlide$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{if(e===void 0)throw new Error("showSelectedSlide should not be undefined");if(this.selectedSlide?.index===e.index)return;this.selectedSlide=e,this.selectedSlide.bigvuAssetsBlacklistIds=new Set(),this.selectedSlide.externalAssetsBlacklistIds=new Set(),this.storyService.story.composerSessionState.selectedSlide=this.selectedSlide;let t=this.introDuration+e.metadata.time;this.videoSlidesService.playerAction$.next({action:"pause",timeInSec:t+.1}),this.currentPlayerTime=t,this.isVideoPlaying=!1;}),this.composerService.cropAction$.pipe(sv(e=>this.isVideoLoading?Il(100):Il(0)),Pt(this.unsubscribe$)).subscribe(e=>{switch(Array.isArray(e)?e[0]:e){case ca.SHOW_CROPPING:{this.videoSlidesService.playerAction$.next({action:"pause"}),this.cropVideoSelected=!0;let n=this.vdmPreviewerHeight;this.wrapperThumbnailData.aspectRatio=this.story.composerSessionState.storyOriginalAspectRatio,this.wrapperThumbnailData.width=n/this.aspectRatioToFloat(this.wrapperThumbnailData.aspectRatio),this.wrapperThumbnailData.height=n;let o=this.story.zoom?{x:this.story.zoom.x1*this.wrapperThumbnailData.width,y:this.story.zoom.y1*this.wrapperThumbnailData.height,width:this.story.zoom.x2*this.wrapperThumbnailData.width-this.story.zoom.x1*this.wrapperThumbnailData.width,height:this.story.zoom.y2*this.wrapperThumbnailData.height-this.story.zoom.y1*this.wrapperThumbnailData.height}:void 0,_={storyAspectRatio:this.story.aspectRatio,wrapperThumbnail:this.wrapperThumbnailData,cropCoordinates:o,thumbnailURL:this.cropVideoThumbnail};this.styleVideoService.styleSidebarCroppingData$.next(_);}break;case ca.CANCEL_CROPPING:this.closeCropping();break;case ca.CROP_VIDEO:{let n=e[1];this.cropVideoPreviewer(n);}}},e=>{this.notifier.error(e.error.msg);}),this.storyService.hotfix_storyVariationPaletteGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"hotfix_storyVariationPaletteGotUpdated$",buildAgain:!0,changeMade:!0});}),this.storyService.hotfix_storyVariationIdGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.story.themeVariationId=e,this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"hotfix_storyVariationIdGotUpdated$",buildAgain:!0,changeMade:!0});}),this.storyService.hotfix_themeGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{if(this.isFirstLoad){let e=window.innerWidth-this.sidebarWidth-this.infoPanelWidth,t=window.innerHeight-this.sceneEditorHeight-this.headerHeight,n=e*.85,o=n*this.aspectRatioToFloat
816("horizontal");o>t*.85&&(o=t*.85,n=o*this.aspectRatioToFloat("vertical")),this.vdmPreviewerWidth=n,this.vdmPreviewerHeight=o,this.progressBarValue=this.progressBarValue<75?75:this.progressBarValue,this.ngxSpinner.show("composer-vdm-spinner"),this.isVideoLoading=!0,"intro"in this.storyService.story&&this.introVdmObj===void 0||"outtro"in this.storyService.story&&this.outroVdmObj===void 0||this.storyService.story.composerSessionState.themesChangeMadeByUndoRedo||this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"hotfix_themeGotUpdated$->isFirstLoad",buildAgain:!0,changeMade:!1,isFirstLoad:!0}),this.isVideoLoading=!1,this.isUndoRedo=!1,this.undoRedoService.isButtonOnUndoDisabled$.next(!1),this.isFirstLoad=!1,this.crashReportTimer.unsubscribe();}else this.storyService.story.composerSessionState.themesChangeMadeByUndoRedo?this.storyService.story.composerSessionState.themesChangeMadeByUndoRedo=!1:this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"ComposerVideoPreviewComponent$->hotfix_themeGotUpdated$",buildAgain:!0,changeMade:!0});}),this.storyService.hotfix_storySoundbedVolumeGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.videoMakerPlugin.volume(1-this.story.soundbed.volume),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"hotfix_storySoundbedVolumeGotUpdated$",buildAgain:!1,changeMade:!0});}),this.storyService.hotfix_soundbedRemoved$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.undoRedoService.patchHistoryStories(e=>{delete e.soundbed;}),this.isFirstLoad||this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"hotfix_soundbedRemoved$",buildAgain:!0,changeMade:!1,isFirstLoad:!1});}),this.videoSlidesService.playerAction$.pipe(ra(1),sn(()=>this.selectedSlide!==void 0),Pt(this.unsubscribe$)).subscribe(e=>{e.action==="pause"?(this.isVDMStudioAvailable=this.storyService.isSlideSupportsVDMStudio(this.selectedSlide.metadata.templateIds),this.videoSlidesService.playerStatus$.getValue().type==="playIntro"?this.pause(this.introDuration+this.selectedSlide.metadata.time+.1).finally(()=>{this.currentPlayerTime=this.introDuration+this.selectedSlide.metadata.time;}):this.videoSlidesService.playerStatus$.getValue().type==="playOutro"?this.pause(this.introDuration+this.selectedSlide.metadata.time+.1).finally(()=>{this.currentPlayerTime=this.introDuration+this.selectedSlide.metadata.time;}):this.videoSlidesService.playerStatus$.getValue().type==="playAll"?this.pause(this.introDuration+this.selectedSlide.metadata.time+.1).finally(()=>{this.currentPlayerTime=this.introDuration+this.selectedSlide.metadata.time;}):this.videoSlidesService.playerStatus$.getValue().type==="playPreviewer"&&(this.currentPlayerTime<this.introDuration||this.currentPlayerTime>this.introDuration+this.story.audio.duration)?this.pause(this.introDuration+this.selectedSlide.metadata.time+.1).finally(()=>{this.currentPlayerTime=this.introDuration+this.selectedSlide.metadata.time;}):this.pause(e.timeInSec).finally(()=>{e.timeInSec!==void 0&&(this.currentPlayerTime=e.timeInSec);})):e.action==="playAll"?this.pause().finally(()=>{this.play(0),this.composerEventsService.log(this.eventsService.events.composer.play,this.composerEventsService.buildPreviewPayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,previewType:"full",outroIntro:!1}));}):e.action==="playSlide"?(this.play(this.introDuration+this.story.media[e.slideIndex].metadata.time,e.slideIndex),this.composerEventsService.log(this.eventsService.events.composer.play,this.composerEventsService.buildPreviewPayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,previewType:"segment",outroIntro:!1,index:e.slideIndex}))):e.action==="playPreviewer"?(Math.abs(this.currentPlayerTime-this.previewStoryDurationInSec())<Xi.MIN_SLIDE_DURATION_SEC?this.play(this.introDuration):this.play(),this.composerEventsService.log(this.eventsService.events.composer.play,this.composerEventsService.buildPreviewPayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,previewType:"main",outroIntro:!1}))):e.action==="playIntro"?this.pause().then(()=>{this.play(0,void 0,this.introDuration+.1),this.composerEventsService.log(this.eventsService.events.composer.play,this.composerEventsService.buildPreviewPayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,previewType:"intro",outroIntro:!0}));}):e.action==="playOutro"&&this.pause().then(()=>{let t=this.introDuration+this.story.media[this.story.media.length-1].metadata.time+this.story.media[this.story.media.length-1].metadata.duration;this.play(t,void 0,t+this.outroVdmObj.data.duration),this.composerEventsService.log(this.eventsService.events.composer.play,this.composerEventsService.buildPreviewPayload({story:this.story,wrapperThumbnailData:this.wrapperThumbnailData,previewType:"outro",outroIntro:!0}));});},e=>{this.notifier.error(e.error.msg);}),this.videoSlidesService.storyHeadline$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{!this.isFirstLoad&&this.story.headline!==e&&(this.story.headline=e,this.storyService.hotfix_storyHeadlineGotUpdated$.next(),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"storyHeadline$",buildAgain:!0,changeMade:!0}));}),this.introOutroService.updateIntroOutroInPreviewer$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{let t=this.introVdmObj?this.introVdmObj.data.duration:0,n=this.outroVdmObj?this.outroVdmObj.data.duration:0;this.introVdmObj=e.introVdmObj,this.outroVdmObj=e.outroVdmObj;let o;if(this.introVdmObj){if(this.currentPlayerTime<t)this.currentPlayerTime>this.introVdmObj.data.duration&&(this.currentPlayerTime=this.introVdmObj.data.duration-.1);else{let _=this.introVdmObj.data.duration-t;this.currentPlayerTime+=_;}this.introDuration=this.introVdmObj.data.duration;}else t!==0?(this.introDuration=0,this.currentPlayerTime<t?o=0:this.currentPlayerTime-=t):this.currentPlayerTime=this.selectedSlide.metadata.time;this.outroVdmObj?this.currentPlayerTime>
816this.story.audio.duration+t+n&&this.currentPlayerTime>this.introDuration+this.story.audio.duration+this.outroVdmObj.data.duration&&(this.currentPlayerTime=this.previewStoryDurationInSec()-.1):n!==0&&this.currentPlayerTime>this.story.audio.duration+t+n&&(o=this.story.media.length-1),this.currentPlayerTime=this.currentPlayerTime.bvFixed(),o!==void 0&&this.videoSlidesService.showSelectedSlide$.next(this.story.media[o]);}),this.undoRedoService.composerLocalHistory$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{let t=o=>{o in n?this.story[o]=n[o]:delete this.story[o];},n=e.story;this.isUndoRedo=!0,this.story.media.splice(0,this.story.media.length),this.story.media.push.apply(this.story.media,n.media),this.story.aspectRatio=n.aspectRatio,this.story.headline=n.headline,n.composerSessionState.bRollUrlsMap=this.story.composerSessionState.bRollUrlsMap,n.composerSessionState.generatedOriginalUrlsMap=this.story.composerSessionState.generatedOriginalUrlsMap,this.story.composerSessionState=n.composerSessionState,t("zoom"),t("intro"),t("outtro"),t("metadata"),t("soundbed"),"intro"in n||(this.introVdmObj=void 0,this.introDuration=0),"outro"in n||(this.outroVdmObj=void 0),this.storyService.hotfix_changesMadeByUndoRedo$.next(e),this.storyService.story.composerSessionState.themesChangeMadeByUndoRedo=!0,this.storyService.updateThemeId(n.themeId,n.themeVariationId),this.createVDMStoryAndUpdateVDMPluginStory(),this.videoSlidesService.showSelectedSlide$.next(this.story.media[n.composerSessionState.buildSlideIndex]);});}createVDMStory(e,t,n,o,_){n.lowRes=!0,n.aspectRatio=e.aspectRatio,"logo"in e&&(n.logo={id:e.logo.assetId,url:e.logo.url}),"soundbed"in e&&(n.soundbed=e.soundbed);let E=Va.cloneDeep(e),x=Va.cloneDeep(t),h=this.VDMAdapter.createVDMStoryAdapter(E,x,n);if(E.themeVariationId){let y=this.storyService.getThemeParamsByVariationId(E.themeVariationId,E.aspectRatio);h.addStoryResources(y);}if(E.metadata?.speechSyncAnimation&&h.addStoryResources({speechSyncAnimation:E.metadata.speechSyncAnimation}),n.logo&&h.logo(E.logo.size),E.zoom&&h.zoom(E.zoom),o){let y=Va.cloneDeep(o),b=o.type==="video"?this.storyService.introOutroVideoTemplates:this.storyService.introOutroBizCardTemplates,p=Va.cloneDeep(b);h.intro(y,p);}if(_){let y=Va.cloneDeep(_),b=_.type==="video"?this.storyService.introOutroVideoTemplates:this.storyService.introOutroBizCardTemplates,p=Va.cloneDeep(b);h.outtro(y,p);}return this.segmentation&&h.addStoryResources({segmentation:this.segmentation}),h.adaptStory();}updateVDMPluginStory(e){return kt(this,null,function*(){this.ngxSpinner.show("composer-vdm-spinner");let t=Math.max(this.storyService.totalRenderedVirtualSlides$.getValue(),10);this.isVideoPlaying&&(yield this.pause()),this.videoMakerPlugin.setStory(e,{slidingWindow:t,useVideoPlayersAudio:!1,sync:{audio:{sampleRateMS:50,thresholdMS:300}},container:{width:this.vdmPreviewerWidth,height:this.vdmPreviewerHeight}}),this.build().then(()=>{this.vdmPreviewerSuccessfullyLoaded=!0;let n=this.currentPlayerTime;this.currentPlayerTime-this.selectedSlide?.metadata.time<.1&&(n+=.1-(this.currentPlayerTime-this.selectedSlide?.metadata.time)),this.currentPlayerTime>=this.introDuration+this.selectedSlide?.metadata.time+this.selectedSlide?.metadata.duration&&(n=this.currentPlayerTime),this.videoSlidesService.playerAction$.next({action:"pause",timeInSec:n}),this.progressBarValue<95&&(this.progressBarValue=95);}).catch(n=>{console.error("Error! video player could not be build",n);}).finally(()=>{this.ngxSpinner.hide("composer-vdm-spinner");});});}createVDMStoryAndUpdateVDMPluginStory(){this.storyService.hotfix_vdmStudioDismissedExternalEvent$.next(),this.vdmAdapterStory=this.createVDMStory(this.story,this.storyService.allSlidesTemplates,{},this.introVdmObj,this.outroVdmObj),this.updateVDMPluginStory(this.vdmAdapterStory);}setStoryOriginalAspectRatio(e){return kt(this,null,function*(){return new Promise((t,n)=>{let o=new Image();o.addEventListener("load",()=>{let _=this.calculateStoryAspectRatio(o.naturalWidth,o.naturalHeight);t(_);}),o.src=e;});});}calculateStoryAspectRatio(e,t){let n;return e>t?n="horizontal":e<t?n="vertical":e===t&&(n="square"),this.story.aspectRatio===void 0&&(this.story.aspectRatio=n),this.story.composerSessionState.storyOriginalAspectRatio=n,n;}
816aspectRatioToFloat(e){switch(e){case"horizontal":return 9/16;case"vertical":return 16/9;case"square":return 1;}}onCloseCrashReportPopup(e=!1){e&&this.eventsService.log(this.eventsService.events.composer.sendCrashReport,{storyId:this.composerEventsService.parentStoryId,editStoryId:this.composerEventsService.editStoryId}),this.showCrashDialog=!1,this.router.navigate([Tr.globals.projectsPage]);}onOpenVDMStudio(e){e.stopPropagation(),this.isVDMStudioActive=!0;}onCloseVDMStudio(e){e&&this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"onCloseVDMStudio",buildAgain:!0,changeMade:!0}),this.isVDMStudioActive=!1;}onVdmPreviewerClick(){this.isVideoPlaying?this.pausePreviewer():this.playPreviewer();}createBlurredBackgroundImage(e,t){return kt(this,null,function*(){return new Promise((n,o)=>{let _=new Image();_.crossOrigin="anonymous",_.onload=()=>{let E,x;switch(t){case"vertical":E=1080,x=1920;break;case"horizontal":E=1920,x=1080;break;case"square":E=1080,x=1080;break;default:E=1920,x=1080;}let h=document.createElement("canvas");h.width=E,h.height=x;let y=h.getContext("2d");if(!y){o(new Error("Failed to get canvas context"));return;}let b=E/x,p=_.width/_.height;y.filter="blur(120px)",y.drawImage(_,0,0,E,x),y.filter="none";let c,d,m,a;p>b?(c=E,d=c/p,m=0,a=(x-d)/2):(d=x,c=d*p,m=(E-c)/2,a=0),y.drawImage(_,m,a,c,d),h.toBlob(s=>{if(s){let l=URL.createObjectURL(s);n(l);}else o(new Error("Failed to create blob from canvas"));},"image/png");},_.onerror=()=>{o(new Error(`Failed to load image: ${e}`));},_.src=e;});});}closeCropping(){this.cropVideoSelected=!1;}static{this.ɵfac=function(t){return new(t||i)(ut(zi),ut(zo),ut(Yn),ut(En),ut(Xi),ut(ya),ut(is),ut(nr),ut(Ac),ut(Lc),ut(Co),ut($c),ut(So),ut(Ya),ut(Qs),ut(Ji),ut(as),ut(To),ut(en),ut(jh),ut(Ah),ut(kh),ut(il));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-video-preview"]],viewQuery:function(t,n){if(t&1&&fn(ux,7),t&2){let o;mn(o=gn())&&(n.vdmPreviewer=o.first);}},hostBindings:function(t,n){t&1&&Ze("beforeunload",function(_){return n.WindowBeforeUnload(_);},!1,Sc);},inputs:{sidebarWidth:"sidebarWidth",infoPanelWidth:"infoPanelWidth",sceneEditorHeight:"sceneEditorHeight",headerHeight:"headerHeight"},standalone:!0,features:[Ft],decls:11,vars:10,consts:[["vdmPreviewer",""],["tooltip","matTooltip"],[1,"composer-video-preview-container"],["id","vdm-previewer",1,"grid-area-1-1"],["class","vdm-previewer-overlays-container grid-area-1-1",3,"z-index","width","height","display","click",4,"ngIf"],["class","vdm-previewer-spinners-container grid-area-1-1",3,"z-index","width","height",4,"ngIf"],[3,"vdmAdapterStory","index","time","vdmPreviewerWidth","vdmPreviewerHeight","aspectRatio","closeVdmStudioComponent",4,"ngIf"],["class","composer-cropper-overlay",4,"ngIf"],["class","grid-area-1-1","style","display: flex; justify-content: center; align-items: center;",3,"width","height",4,"ngIf"],["style","position: absolute; z-index: 30;",4,"ngIf"],["class","video-quality-disclaimer",4,"ngIf"],["class","progress-bar-container",4,"ngIf"],[1,"vdm-previewer-overlays-container","grid-area-1-1",3,"click"],["matTooltip","Preview All From Selection","matTooltipClass","tooltip-custom-black","matTooltipPosition","right","matTooltipShowDelay","500","src","img/composer-icons/preview-play-icon.svg","width","60px","draggable","false","alt","play","class","composer-vdm-play-icon",4,"ngIf"],["matTooltip","Scale Elements","matTooltipPosition","below","matTooltipClass","tooltip-custom-black tooltip-custom-position-below",1,"composer-vdm-studio-button",3,"click"],["src","img/composer/studio/studio-icon.svg","draggable","false","alt","open studio"],["matTooltip","Preview All From Selection","matTooltipClass","tooltip-custom-black","matTooltipPosition","right","matTooltipShowDelay","500","src","img/composer-icons/preview-play-icon.svg","width","60px","draggable","false","alt","play",1,"composer-vdm-play-icon"],[1,"vdm-previewer-spinners-container","grid-area-1-1"],["name","composer-vdm-spinner","type","cog","size","medium",3,"fullScreen","zIndex"],["name","composer-vdm-spinner-buffering","type","cog","size","medium",3,"fullScreen","zIndex"],["name","translation-spinner","type","none",3,"fullScreen","zIndex"],[3,"closeVdmStudioComponent","vdmAdapterStory","index","time","vdmPreviewerWidth","vdmPreviewerHeight","aspectRatio"],[1,"composer-cropper-overlay"],[1,"grid-area-1-1",2,"display","flex","justify-content","center","align-items","center"],["style","height: 100%;","draggable","false","alt","video thumbnail",3,"src",4,"ngIf"],["draggable","false","alt","video thumbnail",2,"height","100%",3,"src"],[2,"position","absolute","z-index","30"],[1,"video-quality-disclaimer"],["src","/img/icon-library/symbols/info-2-small.svg","width","16","height","16","draggable","false","alt","video quality disclaimer"],[1,"progress-bar-container"],[1,"progress-info-wrapper"],[1,"progress-bar-wrapper",3,"progressValue"],[2,"position","absolute","opacity","0.6","color","white","font-size","14px","font-weight","bold","line-height","27px"],[1,"animate-transition"],[1,"loader-status-text-wrapper",2,"padding-top","10px"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","cssanimation sequence fadeInBottom",3,"color",4,"ngSwitchDefault"],["class","crash-dialog-wrapper",4,"ngIf"],[2,"padding-right","5px"],[1,"cssanimation","sequence","fadeInBottom",2,"color","#4481fd"],[1,"cssanimation","sequence","fadeInBottom",2,"color","#ff86bc"],[1,"cssanimation","sequence","fadeInBottom",2,"color","#aa58ee"],[1,"cssanimation","sequence","fadeInBottom",2,"color","#00d096"],[1,"cssanimation","sequence","fadeInBottom"],[1,"crash-dialog-wrapper"],[1,"crash-dialog-container"],[1,"crash-dialog-title"],[1,"crash-dialog-subtitle"],[2,"display","flex","flex-direction","row","margin","auto"],[2,"margin","0 10px 0 0","padding","9px 24px 10px 25px","border-radius","10px","background-color","rgba(123, 141, 177, 0.08)",3,"click"],[2,"margin","0 0 0 10px","padding","9px 17px 10px","border-radius","10px","background-color","#00abfe","color","white",3,"click"]],template:function(t,n){t&1&&(be(0,"div",2),tt(1,"div",3,0),at(3,hx,5,11,"div",4)(4,px,5,12,"div",5)(5,fx,1,6,"composer-vdm-studio",6)(6,mx,1,0,"div",7)(7,yx,2,5,"div",8)(8,vx,2,0,"div",9),Oe(),at(9,_x,4,0,"div",10)(10,Cx,14,8,"div",11)),t&2&&(Ce(),Li("display",n.isVDMStudioActive||n.cropVideoSelected?"none":"block"),Ce(2),ke("ngIf",n.vdmPreviewerSuccessfullyLoaded&&!n.isWindowResizing),Ce(),ke("ngIf",!n.isWindowResizing&&!n.isVDMStudioActive),Ce(),ke("ngIf",n.isVDMStudioActive),Ce(),ke("ngIf",n.cropVideoSelected),Ce(),ke("ngIf",n.cropVideoSelected),Ce(),ke("ngIf",n.cropVideoSelected),Ce(),ke("ngIf",n.vdmPreviewerSuccessfullyLoaded),Ce(),ke("ngIf",n.progressBarValue<100));},dependencies:[Qa,Za,aa,ui,Kv,Xv,td,Dh,Xa,Ka,Tc,c0],styles:[".composer-video-preview-container[_ngcontent-%COMP%]{position:relative;height:calc(100% - 28px);display:grid;place-items:center}.grid-area-1-1[_ngcontent-%COMP%]{grid-area:1/1}#vdm-previewer[_ngcontent-%COMP%]{position:absolute;-webkit-user-select:none;user-select:none}.vdm-previewer-overlays-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none}.vdm-previewer-overlays-container[_ngcontent-%COMP%]:hover{cursor:pointer}.vdm-previewer-spinners-container[_ngcontent-%COMP%]{position:relative;pointer-events:none}.vdm-previewer-spinners-container[_ngcontent-%COMP%] > ngx-spinner[_ngcontent-%COMP%]{pointer-events:auto}.composer-vdm-play-icon[_ngcontent-%COMP%]:hover{box-shadow:#00000059 0 5px 15px;border-radius:50%}.composer-vdm-studio-button[_ngcontent-%COMP%]{position:absolute;top:0;right:0}.composer-vdm-studio-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{background-color:#6f54ff;margin-top:15px;margin-right:15px;width:40px;height:40px;padding:6px;border-radius:6px}.composer-vdm-studio-button[_ngcontent-%COMP%]:hover{cursor:pointer}.composer-vdm-studio-button[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{background-color:#573fd9}.composer-cropper-overlay[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;z-index:30;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;-webkit-animation:_ngcontent-%COMP%_fadeInFromNone .3s ease-in-out;-moz-animation:fadeInFromNone .3s ease-in-out;-o-animation:fadeInFromNone .3s ease-in-out;animation:_ngcontent-%COMP%_fadeInFromNone .3s ease-in-out}.video-quality-disclaimer[_ngcontent-%COMP%]{height:28px;width:100%;display:flex;flex-direction:row;align-items:center;padding:6px 24px;gap:4px;-webkit-user-select:none;user-select:none;color:#253658cc;font-size:10px;font-style:normal;font-weight:400;background:#4481fd14}@-webkit-keyframes _ngcontent-%COMP%_fadeInFromNone{0%{display:none;opacity:0}
8161%{display:block;opacity:0}to{display:block;opacity:1}}@-moz-keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}@-o-keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}@keyframes _ngcontent-%COMP%_fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}.progress-bar-container[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:999;background-color:#253658c4;display:flex;justify-content:center;align-items:center;transition:all 1s ease}.progress-info-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;align-items:center}.progress-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:27px;display:flex;justify-content:center;align-items:center}.loader-status-text-wrapper[_ngcontent-%COMP%]{width:auto;color:#fff;font-size:14px;font-weight:800;position:relative}.fadeInBottom[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_fadeInBottom}@keyframes _ngcontent-%COMP%_fadeInBottom{0%{opacity:0;transform:translateY(100%)}to{opacity:1}}.fadeOutBottom[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_fadeOutBottom}@keyframes _ngcontent-%COMP%_fadeOutBottom{0%{opacity:1;transform:translateY(-100%)}to{opacity:0}}.cssanimation[_ngcontent-%COMP%], .cssanimation[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{animation-duration:.7s;animation-fill-mode:both;margin-left:3px}.crash-dialog-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;position:absolute;bottom:15%;max-width:727px;height:107px;background-color:#fff;border-radius:10px}.crash-dialog-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-left:28px;width:50%}.crash-dialog-title[_ngcontent-%COMP%]{font-size:18px;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#253658;padding-top:21px}.crash-dialog-subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#253658;padding-top:10px} .video-js .vjs-big-play-button{display:none!important}.vjs-tech[_ngcontent-%COMP%]:focus{outline:none!important} .video-js .vjs-tech{object-fit:contain;border-radius:15px} .vjs-resolution-button .vjs-resolution-button-label{font-size:x-small!important;line-height:3!important} .vjs-menu-button-popup .vjs-menu .vjs-menu-content{bottom:.5em!important} .vjs-resolution-button>.vjs-menu-button:focus{outline:none}"]});}}return i;})();Ki();Mr();es();Oc();vn();mt();Bn();Or();mt();sa();Ki();Mr();es();vn();_a();Yu();mt();hi();sa();Oo();Bn();Ki();Mr();es();mt();var Dl={aspectRatio:void 0},Om=(()=>{class i{constructor(e,t,n,o){if(this.storyService=e,this.videoSlidesService=t,this.composerService=n,this.store=new yr(Dl),this.state$=this.store.asObservable(),this.aspectRatio$=this.state$.pipe(oi(E=>E.aspectRatio),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.sidebarResizeModalViewModel$=Vn([this.aspectRatio$]).pipe(oi(([E])=>{let x=!!this.storyService.story&&"zoom"in this.storyService.story;switch(E){case"square":return{selectedOption:"Square",isCropped:x};case"horizontal":return{selectedOption:"Horizontal",isCropped:x};case"vertical":return{selectedOption:"Vertical",isCropped:x};}})),o)throw new Error("SidebarResizeModalService is already loaded");let _=e.story;_&&this.updateState(ei(Dl,E=>{E.aspectRatio=_.aspectRatio;})),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(sn(()=>!!this.storyService.story),Pt(this.unsubscribe$)).subscribe(E=>{this.storyService.story.composerSessionState.resizeChangeMadeByUndoRedo=!0,this.updateState(ei(Dl,x=>{x.aspectRatio=E.story.aspectRatio;}));}),Vn([this.aspectRatio$]).pipe(Ti(),ra(1),sn(()=>!!this.storyService.story),Pt(this.unsubscribe$)).subscribe(([E])=>{this.storyService.updateAspectRatio(E),this.storyService.story.composerSessionState.resizeChangeMadeByUndoRedo?this.storyService.story.composerSessionState.resizeChangeMadeByUndoRedo=!1:this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarResizeModalService",buildAgain:!0,changeMade:!0,isFirstLoad:!1});});}
816updateState(e){Dl=e,this.store.next(Dl);}resize(e){this.updateState(ei(Dl,t=>{switch(e){case"Vertical":t.aspectRatio="vertical";break;case"Horizontal":t.aspectRatio="horizontal";break;case"Square":t.aspectRatio="square";break;}}));}crop(){this.composerService.cropAction$.next(ca.SHOW_CROPPING);}removeCrop(){this.composerService.cropAction$.next(ca.CROP_VIDEO);}ngOnDestroy(){Dl={aspectRatio:void 0},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(nr),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();mt();var ol=(()=>{class i{constructor(){this._isCropping=$t(!1),this._targetAspect=$t(void 0),this.isCropping=this._isCropping.asReadonly(),this.targetAspect=this._targetAspect.asReadonly();}open(e){this._targetAspect.set(e),this._isCropping.set(!0);}close(){this._isCropping.set(!1),this._targetAspect.set(void 0);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();Ki();mt();hi();function Lx(i,r){if(i&1){let e=_t();be(0,"div",17),Ze("click",function(){$e(e);let n=Le(2);return We(n.removeCrop());}),Oe();}}function Dx(i,r){if(i&1){let e=_t();be(0,"div",1)(1,"div",2)(2,"div",3),Ze("click",function(){$e(e);let n=Le();return We(n.close());}),Oe(),be(3,"div",4)(4,"div",5),lt(5,"Resize"),Oe()()(),be(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),Ze("click",function(){$e(e);let n=Le();return We(n.resize("Vertical"));}),tt(10,"img",10),Oe(),be(11,"div",11),lt(12,"Vertical"),Oe()(),be(13,"div",8)(14,"div",9),Ze("click",function(){$e(e);let n=Le();return We(n.resize("Horizontal"));}),tt(15,"img",12),Oe(),be(16,"div",11),lt(17,"Horizontal"),Oe()(),be(18,"div",8)(19,"div",9),Ze("click",function(){$e(e);let n=Le();return We(n.resize("Square"));}),tt(20,"img",13),Oe(),be(21,"div",11),lt(22,"Square"),Oe()(),be(23,"div",14),at(24,Lx,1,0,"div",15),be(25,"div",9),Ze("click",function(){$e(e);let n=Le();return We(n.crop());}),tt(26,"img",16),Oe(),be(27,"div",11),lt(28,"Custom Crop"),Oe()()()()();}if(i&2){let e=r.ngIf;Ce(9),Ei("selected",e.selectedOption=="Vertical"),Ce(5),Ei("selected",e.selectedOption=="Horizontal"),Ce(5),Ei("selected",e.selectedOption=="Square"),Ce(4),Di("animation-scale-down-center",!e.isCropped),Ce(),ke("ngIf",e.isCropped);}}var Nx={vertical:"Vertical",horizontal:"Horizontal",square:"Square"},Vx={Vertical:"vertical",Horizontal:"horizontal",Square:"square"},w0=(()=>{class i extends Fn{constructor(e){super(e),this.data=e,this.sidebarResizeModalService=ct(Om),this.sliderV2StoryService=ct(Yi),this.sliderV2CropService=ct(ol),this.dialogRef=ct(br),this.isSliderV2=Xn()==="v2",this.v1ViewModel=yh(this.sidebarResizeModalService.sidebarResizeModalViewModel$),this.viewModel=xt(()=>{if(!this.isSliderV2)return this.v1ViewModel();let t=this.sliderV2StoryService.story();return{selectedOption:t?Nx[t.aspectRatio]:void 0,isCropped:!!t?.zoom};}),this.unsubscribe$=new Yt(),this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}resize(e){let t=Vx[e];if(this.isSliderV2){t&&t!==this.sliderV2StoryService.story()?.aspectRatio&&this.sliderV2StoryService.setAspectRatioAndClearZoom(t);return;}this.sidebarResizeModalService.resize(e);}crop(){if(this.isSliderV2){this.sliderV2CropService.open(),this.close();return;}this.sidebarResizeModalService.crop(),this.close();}removeCrop(){if(this.isSliderV2){this.sliderV2StoryService.clearZoom(),this.close();return;}this.sidebarResizeModalService.removeCrop(),this.close();}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-resize"]],standalone:!0,features:[Wn([Om]),Mn,Ft],decls:1,vars:1,consts:[["class","resize-modal",4,"ngIf"],[1,"resize-modal"],[1,"header-container"],[1,"close-button",3,"click"],[1,"header-title"],[1,"header-text"],[1,"body-container"],[1,"resize-options"],[1,"item","animation-scale-down-center"],[1,"item-icon",3,"click"],["width","40","height","72","src","img/composer/resize-modal/vertical.svg","draggable","false","alt","image"],[1,"item-label"],["width","72","height","40","src","img/composer/resize-modal/horizontal.svg","draggable","false","alt","image"],["width","40","height","40","src","img/composer/resize-modal/square.svg","draggable","false","alt","image"],[1,"item"],["class","item-badge",3,"click",4,"ngIf"],["width","40","height","40","src","img/composer/resize-modal/crop.svg","draggable","false","alt","image"],[1,"item-badge",3,"click"]],template:function(t,n){t&1&&at(0,Dx,29,6,"div",0),t&2&&ke("ngIf",n.viewModel());},dependencies:[Ci,ui],styles:['.resize-modal[_ngcontent-%COMP%]{width:520px;height:227px;padding:32px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.body-container[_ngcontent-%COMP%]{margin-top:18px}.resize-options[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:24px}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;
816cursor:pointer}.item[_ngcontent-%COMP%]:hover .item-icon[_ngcontent-%COMP%]:not([selected=true]){background-color:#00abfe14}.item-icon[_ngcontent-%COMP%]{width:96px;height:96px;display:flex;align-items:center;justify-content:center;border-radius:10px;background-color:#7b8db114}.item[_ngcontent-%COMP%] .item-icon[selected=true][_ngcontent-%COMP%]{box-shadow:0 0 0 3px #4481fd;pointer-events:none}.item[_ngcontent-%COMP%]:has( > .item-icon[selected=true])[_ngcontent-%COMP%]{cursor:default}.item-badge[_ngcontent-%COMP%]{width:20px;height:20px;background-color:#00d096;border-radius:10px;position:absolute;margin-left:94px;margin-top:-8px;cursor:pointer}.item-badge[_ngcontent-%COMP%]:hover{box-shadow:0 0 10px #0000004d;background-color:#ff4d5b}.item-badge[_ngcontent-%COMP%]:hover:after{content:"";width:12px;height:1.5px;background:#fff;display:block;position:relative;top:9px;left:4px;border-radius:5px}.item-label[_ngcontent-%COMP%]{font-size:12px}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}'],changeDetection:0});}}return i;})();mt();Bn();Ki();_r();Oo();mt();vn();vn();vn();function od(i){return(i??[]).flatMap(r=>r?.type==="group"?od(r.children??[]):[r]);}var E0=/slide\.media\[(\d+)\]/g,jx=/\{\{([\s\S]*?)\}\}/g,Pm=/\s*(?:(\d+(?:\.\d+)?)|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\$]|\\.|\$(?!\{))*`)|([A-Za-z_$][\w$]*)|(===|!==|\?\?|\?\.(?!\d)|\|\||&&|==|!=|<=|>=|[-+*/%<>!?:()[\].,]))/y,Bx=["||","??"],Fx=["==","!=","===","!=="],Ux=["<",">","<=",">="],Gx=["+","-"],zx=["*","/","%"],Hx=["!","-","+"],Is=class extends Error{},x0=new Set();function $x(i){return od(i?.elements??[]).reduce((r,e)=>Math.max(r,Wx(e)),0);}function al(i,r){return $x(i)<=(r??0);}function Wx(i){let r=i?.bind;if(!r)return 0;let e=Array.from(r.matchAll(jx));return e.length?Math.max(...e.map(([t,n])=>qx(t,n))):T0(r);}function qx(i,r){try{return new Im(Yx(r)).parse();}catch(e){if(!(e instanceof Is))throw e;return Xx(i);}}function Yx(i){let r=[],e=0;for(;i.slice(e).trim();){Pm.lastIndex=e;let t=Pm.exec(i);if(!t)throw new Is();let[,n,o,_,E]=t;n!==void 0?r.push({kind:"number",text:n}):o!==void 0?r.push({kind:"string",text:o}):_!==void 0?r.push({kind:"identifier",text:_}):r.push({kind:"punctuator",text:E}),e=Pm.lastIndex;}return r;}var Im=class{constructor(r){this.tokens=r,this.position=0;}parse(){let r=this.ternary();if(this.position<this.tokens.length)throw new Is();return r;}ternary(){let r=this.fallback();if(!this.accept("?"))return r;let e=this.ternary();this.expect(":");let t=this.ternary();return Math.max(e,t);}fallback(){return this.binary(Bx,()=>this.logicalAnd(),Math.min);}logicalAnd(){return this.binary(["&&"],()=>this.equality(),Math.max);}equality(){return this.binary(Fx,()=>this.relational(),Math.max);}relational(){return this.binary(Ux,()=>this.additive(),Math.max);}additive(){return this.binary(Gx,()=>this.multiplicative(),Math.max);}multiplicative(){return this.binary(zx,()=>this.unary(),Math.max);}binary(r,e,t){let n=e();for(;r.some(o=>this.accept(o));)n=t(n,e());return n;}unary(){return Hx.some(r=>this.accept(r))?this.unary():this.postfix();}postfix(){let{arity:r,chain:e}=this.primary();for(;;){let t=this.accept("?.");if(this.accept("["))r=Math.max(r,this.index(e)),e=void 0;else if(this.accept("("))r=Math.max(r,this.callArguments()),e=void 0;else if(t||this.accept(".")){let n=this.expectIdentifier();e=e==="slide"&&n==="media"?"slide.media":void 0;}else return r;}}primary(){let r=this.next();if(r.kind==="number"||r.kind==="string")return{arity:0,chain:void 0};if(r.kind==="identifier")return{arity:0,chain:r.text==="slide"?"slide":void 0};if(r.text==="("){let e=this.ternary();return this.expect(")"),{arity:e,chain:void 0};}throw new Is();}index(r){let e=this.tokens[this.position];if(r==="slide.media"&&e?.kind==="number"&&/^\d+$/.test(e.text)&&this.tokens[this.position+1]?.text==="]")return this.position+=2,Number(e.text)+1;let t=this.ternary();return this.expect("]"),t;}callArguments(){let r=0;if(this.accept(")"))return r;do r=Math.max(r,this.ternary());while(this.accept(","));return this.expect(")"),r;}next(){let r=this.tokens[this.position++];if(!r)throw new Is();return r;}accept(r){let e=this.tokens[this.position];return e?.kind!=="punctuator"||e.text!==r?!1:(this.position++,!0);}expect(r){if(!this.accept(r))throw new Is();}expectIdentifier(){let r=this.next();if(r.kind!=="identifier")throw new Is();return r.text;}};function Xx(i){if(!x0.has(i)){x0.add(i);let r=`[layout-media-arity] Cannot parse ${i}; counting every slide.media reference as required`;console.warn(r),cr(r);}return T0(i);}function T0(i){E0.lastIndex=0;let r=-1,e;for(;(e=E0.exec(i))!==null;)r=Math.max(r,Number(e[1]));return r+1;}var ks=["captions","titles","dynamic","sideBySide","pictureInPicture","greenScreen"],C0=new Set();function qo(i){return i?.targets?.find(r=>ks.includes(r));}function O0(i){return(i??[]).filter(r=>qo(r)?!0:(Kx(r),!1));}function cp({catalog:i,target:r,mediaCount:e}){let t=(i??[]).filter(n=>qo(n)===r&&al(n,e));return t.find(n=>n.options?.isDefault)??t[0];}function P0({tiles:i,leadTarget:r}){return(r?[r,...ks.filter(t=>t!==r)]:[...ks]).map(t=>({target:t,tiles:i.filter(n=>n.target===t)})).filter(t=>t.tiles.length);}function Kx(i){if(C0.has(i?.id))return;C0.add(i?.id);let r=`Layout ${i?.id} ("${i?.name}") has no known target (targets: ${JSON.stringify(i?.targets??null)}); skipped in the video maker`;console.warn(r),cr(r);}mt();var I0=100,k0=10,ad={captionStyles:"caption styles",colorPalettes:"color palettes",highlightPresets:"highlight presets",layouts:"layouts"},Io=(()=>{class i{constructor(e){this.composerHttpService=e,this._captionStyles=$t([]),this._colorPalettes=$t([]),this._highlightPresets=$t([]),this._layouts=$t([]),this._loaded=$t(!1),this._failedCatalogs=$t([]),this.captionStyles=this._captionStyles.asReadonly(),this.colorPalettes=this._colorPalettes.asReadonly(),this.highlightPresets=this._highlightPresets.asReadonly(),this.layouts=this._layouts.asReadonly(),this.loaded=this._loaded.asReadonly(),this.failedCatalogs=this._failedCatalogs.asReadonly(),this.captionStyleById=xt(()=>this.toLookup(this._captionStyles())),this.colorPaletteById=xt(()=>this.toLookup(this._colorPalettes())),this.highlightPresetById=xt(()=>this.toLookup(this._highlightPresets())),this.layoutById=xt(()=>this.toLookup(this._layouts())),this.captionStylesRecord=xt(()=>this.toRecord(this._captionStyles())),this.colorPalettesRecord=xt(()=>this.toRecord(this._colorPalettes())),this.highlightPresetsRecord=xt(()=>this.toRecord(this._highlightPresets())),this.layoutsRecord=xt(()=>this.toRecord(this._layouts())),this.pickableLayouts=xt(()=>O0(this._layouts())),this.pickableLayoutsRecord=xt(()=>this.toRecord(this.pickableLayouts())),this.noHighlightPresetId=xt(()=>this._highlightPresets().find(t=>t.type==="static")?.id);}fetchAll(){return this.fetchAllPromise||(this.fetchAllPromise=this.fetchAllCatalogs()),this.fetchAllPromise;}fetchAllCatalogs(){return kt(this,null,function*(){this._loaded.set(!1),this._failedCatalogs.set([]),yield Promise.all([this.loadCatalog("captionStyles",e=>this.composerHttpService.getVdmCaptionStyles(e),this._captionStyles),this.loadCatalog("colorPalettes",e=>this.composerHttpService.getVdmPalettes(e),this._colorPalettes),this.loadCatalog("highlightPresets",e=>this.composerHttpService.getVdmHighlightPresets(e),this._highlightPresets),this.loadCatalog("layouts",e=>this.composerHttpService.getVdmTemplates(e),this._layouts)]),this._loaded.set(!0),this._failedCatalogs().length&&(this.fetchAllPromise=void 0);});}loadCatalog(e,t,n){return kt(this,null,function*(){try{n.set(yield this.fetchAllPages(ad[e],t));}catch(o){this._failedCatalogs.update(_=>[..._,e]),Qt(o),n.set([]);}});}fetchAllPages(e,t){return kt(this,null,function*(){let n=[],o={count:I0};for(let E=0;E<k0;
816E++){let x=yield t(o);if(n.push(...(x?.result??[])),!x?.metadata?.hasNext)return n;let h=this.getNextPageParams(x.metadata.nextUrl);if(!h)return console.warn(`[VdmPresetsService] ${e}: hasNext was true but nextUrl carries no cursor; stopping at ${n.length} entries.`),n;o=Ke({count:I0},h);}let _=`[VdmPresetsService] ${e}: hit the ${k0}-page cap; catalog is truncated at ${n.length} entries.`;return console.warn(_),cr(_),n;});}getNextPageParams(e){let t=e?.split("?")[1];if(!t)return;let n=new URLSearchParams(t),o=n.get("cursor"),_=n.get("skip");if(!(!o&&!_))return{cursor:o??void 0,skip:_??void 0,sb:n.get("sb")??void 0,sd:n.get("sd")==="up"||n.get("sd")==="down"?n.get("sd"):void 0};}toLookup(e){return new Map(e.map(t=>[t.id,t]));}toRecord(e){return Object.fromEntries(e.map(t=>[t.id,t]));}static{this.ɵfac=function(t){return new(t||i)(Rt(Yn));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();var sd=function(i){return i.REF="ref",i.EMBEDDED="embedded",i;}(sd||{});function up(i){return{type:sd.REF,ref:i};}function A0(i){return{type:sd.EMBEDDED,embedded:i};}function sl(i){return i?.type===sd.REF?i.ref:void 0;}function qc(i){return i?.type===sd.EMBEDDED?i.embedded:void 0;}var pp=oo(la());vn();var M0={unflagged:new Set(),multiple:new Set()};function R0(i){let{problem:r,catalog:e,message:t}=i;M0[r].has(e)||(M0[r].add(e),console.warn(t),cr(t));}function dp(i){R0({problem:"unflagged",catalog:i,message:`[vdm-defaults] No ${i} entry is flagged options.isDefault; falling back to the newest entry`});}function hp(i,r){R0({problem:"multiple",catalog:i,message:`[vdm-defaults] ${r} ${i} entries are flagged options.isDefault; using the newest flagged entry`});}function Zx(i){let r=Am(i?.colorPalettes,"colorPalettes");return D0({caption:Am(i?.captionStyles,"captionStyles"),colors:r?up(r):void 0,highlight:Am(i?.highlightPresets,"highlightPresets")});}function L0(i,r){return D0(Ke(Ke({},Zx(r)),i));}function Am(i,r){return Mm(i,r)?.id;}function Mm(i,r){let e=i?.filter(t=>t.options?.isDefault)??[];return e.length>1&&hp(r,e.length),e.length?e[0]:(i?.length&&dp(r),i?.[0]);}function D0(i){return pp.omitBy(i,pp.isUndefined);}function N0(i,r){let e=qc(i);if(e)return e;let t=sl(i);return(t?r?.find(o=>o.id===t):void 0)??Mm(r,"colorPalettes");}function V0(i){return i?[{key:"background",label:"Captions BG",color:i.background},{key:"text",label:"Caption Text",color:i.text},{key:"textStyle1",label:"Accent Word 1",color:i.textStyles?.[0]},{key:"textStyle2",label:"Accent Word 2",color:i.textStyles?.[1]},{key:"color1",label:"Secondary BG 1",color:i.colors?.[0]},{key:"color2",label:"Secondary BG 2",color:i.colors?.[1]}].filter(e=>!!e.color):[];}function fp(i){if(i?.zoom)return"crop";let r=i?.mainTrack?.video?.aspectRatio;return r&&r!==i.aspectRatio?"banners":"none";}mt();var ss="/img/icon-library",j0=`${ss}/symbols/retry-reload.svg`,B0=`${ss}/tools/crop-stroke.svg`,F0=[{value:"vertical",label:"Vertical",type:"logo",icon:`${ss}/layouts/9-16-fill.svg`},{value:"square",label:"Square",type:"logo",icon:`${ss}/layouts/1-1-fill.svg`},{value:"horizontal",label:"Horizontal",type:"logo",icon:`${ss}/layouts/16-9-fill.svg`}],U0=[{value:"vertical",label:"Vertical",type:"logo",icon:`${ss}/layouts/blurred-banners-square-in-vertical.svg`},{value:"square",label:"Square",type:"logo",icon:`${ss}/layouts/blurred-banners-horizontal-in-square.svg`},{value:"horizontal",label:"Horizontal",type:"logo",icon:`${ss}/layouts/blurred-banners-square-in-horizontal.svg`}],G0=`${ss}/layouts/blurred-banners-vertical-in-square.svg`,Rm="blur",z0=[{value:"solid",label:"Solid",type:"logo",icon:`${ss}/other/rectangle-fill.svg`,disabled:!0},{value:"image",label:"Image",type:"upload",disabled:!0},{value:Rm,label:"Blur",type:"image",icon:"/img/composer/resize/blur-sample.webp"}],H0=[{value:null,label:"No color",editable:!1},{value:"#000000",label:"Black",editable:!0},{value:"#ffffff",label:"White",editable:!0}],$0=["solid","linear","radial"];mt();_r();mt();var Qx=(i,r)=>r.value;function Jx(i,r){if(i&1){let e=_t();be(0,"lib-selection",4),Ze("clicked",function(){let n=$e(e).$implicit,o=Le();return We(o.tileSelected.emit(n.value));}),Oe();}if(i&2){let e,t,n=r.$implicit,o=Le();Di("tile-row__tile--image",n.type==="image"),ke("type",n.type)("label",n.label)("imageUrl",(e=n.icon)!==null&&e!==void 0?e:"")("value",n.value)("selected",n.value===o.selectedValue)("disabled",(t=n.disabled)!==null&&t!==void 0?t:!1)("removable",!1);}}var mp=(()=>{class i{constructor(){this.sectionLabel="",this.tiles=[],this.arrowKeysSelect=!0,this.tileSelected=new Mi();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["resize-tile-row"]],inputs:{sectionLabel:"sectionLabel",tiles:"tiles",selectedValue:"selectedValue",arrowKeysSelect:"arrowKeysSelect"},outputs:{tileSelected:"tileSelected"},standalone:!0,features:[Ft],decls:6,vars:3,consts:[[1,"tile-row"],[1,"tile-row__label"],[1,"tile-row__tiles"],[1,"tile-row__tile",3,"tile-row__tile--image","type","label","imageUrl","value","selected","disabled","removable"],[1,"tile-row__tile",3,"clicked","type","label","imageUrl","value","selected","disabled","removable"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"p",1),lt(2),Oe(),be(3,"div",2),ih(4,Jx,1,9,"lib-selection",3,Qx),Oe()()),t&2&&(Ce(2),_i(n.sectionLabel),Ce(),Ei("role",n.arrowKeysSelect?"radiogroup":"group")("aria-label",n.sectionLabel),Ce(),nh(n.tiles));},dependencies:[qv],styles:["[_nghost-%COMP%]{display:block}.tile-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.tile-row__label[_ngcontent-%COMP%]{margin:0;font-size:12px;line-height:1.4;letter-spacing:-.12px;text-transform:uppercase;color:#6b7280}.tile-row__tiles[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px}
816.tile-row__tile[_ngcontent-%COMP%]{width:72px;--selection-tile-size: 64px;--selection-logo-size: 32px;--selection-radius-active: 10px;--selection-border-width-selected: 2px;--selection-bg-active: #FFFFFF;--selection-label-font-weight: 600;--selection-label-font-weight-selected: 600;--selection-label-letter-spacing: -.12px}.tile-row__tile.selection-type-upload[_ngcontent-%COMP%]{--sel-ring-style: solid;--sel-ring: var(--selection-border);--sel-ring-width: 2px}.tile-row__tile--image[_ngcontent-%COMP%]{--selection-label-file: #253658}.tile-row__tile--image.selection-selected[_ngcontent-%COMP%]{--selection-label-file: #2563EB}"],changeDetection:0});}}return i;})();mt();var W0=(()=>{class i{constructor(){this.colors=[],this.selectedColorIndex=0,this.brandColors=[],this.formatSelected=new Mi(),this.colorSelected=new Mi(),this.colorEdited=new Mi(),this.styleTiles=z0.filter(e=>!e.disabled),this.selectedStyle=Rm,this.pickerModes=$0,this.colorsEnabled=!1,this.formatLabel="Format",this.styleLabel="Style",this.colorLabel="Color",this.source=$t(void 0),this.formatTiles=xt(()=>U0.filter(e=>e.value!==this.source()).map(e=>e.value==="square"&&this.source()==="vertical"?st(Ke({},e),{icon:G0}):e));}set sourceFormat(e){this.source.set(e);}onFormatSelected(e){this.formatSelected.emit(e);}isPickerEnabled(e,t){return this.colorsEnabled&&e.editable&&t===this.selectedColorIndex;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["resize-banners-tab"]],inputs:{selectedFormat:"selectedFormat",sourceFormat:"sourceFormat",colors:"colors",selectedColorIndex:"selectedColorIndex",brandColors:"brandColors"},outputs:{formatSelected:"formatSelected",colorSelected:"colorSelected",colorEdited:"colorEdited"},standalone:!0,features:[Ft],decls:3,vars:6,consts:[[1,"banners-tab"],[3,"tileSelected","sectionLabel","tiles","selectedValue"],[3,"sectionLabel","tiles","selectedValue"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"resize-tile-row",1),Ze("tileSelected",function(_){return n.onFormatSelected(_);}),Oe(),tt(2,"resize-tile-row",2),Oe()),t&2&&(Ce(),ke("sectionLabel",n.formatLabel)("tiles",n.formatTiles())("selectedValue",n.selectedFormat),Ce(),ke("sectionLabel",n.styleLabel)("tiles",n.styleTiles)("selectedValue",n.selectedStyle));},dependencies:[mp],styles:["[_nghost-%COMP%]{display:block}.banners-tab[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.banners-tab__colors[_ngcontent-%COMP%]{display:flex;flex-direction:column}.banners-tab__label[_ngcontent-%COMP%]{margin:0;font-size:12px;line-height:1.4;letter-spacing:-.12px;text-transform:uppercase;color:#6b7280}.banners-tab__swatches[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0}"],changeDetection:0});}}return i;})();mt();_r();mt();function eT(i,r){if(i&1){let e=_t();be(0,"lib-button",3),Ze("clicked",function(){$e(e);let n=Le();return We(n.adjustCropClicked.emit());}),ti(1),li(2,0),ii(),Oe();}if(i&2){let e=Le();ke("leftIconContent",e.adjustCropIcon)("preserveIconColor",!0);}}var q0=(()=>{class i{constructor(){this.showAdjustCrop=!1,this.formatSelected=new Mi(),this.adjustCropClicked=new Mi(),this.formatLabel="Format",this.adjustCropIcon=B0,this.tiles=F0;}onTileSelected(e){this.formatSelected.emit(e);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["resize-crop-tab"]],inputs:{selectedFormat:"selectedFormat",showAdjustCrop:"showAdjustCrop"},outputs:{formatSelected:"formatSelected",adjustCropClicked:"adjustCropClicked"},standalone:!0,features:[Ft],decls:2,vars:5,consts:()=>{let e;return e="Adjust crop",[e,[3,"tileSelected","sectionLabel","tiles","selectedValue","arrowKeysSelect"],["size","sm","variant","secondary",1,"crop-tab__adjust",3,"leftIconContent","preserveIconColor"],["size","sm","variant","secondary",1,"crop-tab__adjust",3,"clicked","leftIconContent","preserveIconColor"]];},template:function(t,n){t&1&&(be(0,"resize-tile-row",1),Ze("tileSelected",function(_){return n.onTileSelected(_);}),Oe(),at(1,eT,3,2,"lib-button",2)),t&2&&(ke("sectionLabel",n.formatLabel)("tiles",n.tiles)("selectedValue",n.selectedFormat)("arrowKeysSelect",!1),Ce(),kl(1,n.showAdjustCrop?1:-1));},dependencies:[vr,mp],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:20px}
816.crop-tab__adjust[_ngcontent-%COMP%]{--btn-padding-x: 20px !important}"],changeDetection:0});}}return i;})();mt();function tT(i,r){if(i&1){let e=_t();be(0,"lib-button",13),Ze("clicked",function(){$e(e);let n=Le();return We(n.apply());}),ti(1),li(2,1),ii(),Oe();}}function iT(i,r){if(i&1){let e=_t();be(0,"lib-button",14),Ze("clicked",function(){$e(e);let n=Le();return We(n.reset());}),ti(1),li(2,2),ii(),Oe();}if(i&2){let e=Le();ke("leftIconContent",e.resetIcon);}}function nT(i,r){if(i&1){let e=_t();be(0,"resize-crop-tab",15),Ze("formatSelected",function(n){$e(e);let o=Le();return We(o.onFormatSelected(n));})("adjustCropClicked",function(){$e(e);let n=Le();return We(n.onAdjustCrop());}),Oe();}if(i&2){let e=Le();ke("selectedFormat",e.appliedFormat())("showAdjustCrop",e.showAdjustCrop());}}function rT(i,r){if(i&1){let e=_t();be(0,"resize-banners-tab",16),Ze("formatSelected",function(n){$e(e);let o=Le();return We(o.onBannerFormatSelected(n));})("colorSelected",function(n){$e(e);let o=Le();return We(o.onBannerColorSelected(n));})("colorEdited",function(n){$e(e);let o=Le();return We(o.onBannerColorEdited(n));}),Oe();}if(i&2){let e=Le();ke("selectedFormat",e.bannerFormat())("sourceFormat",e.sourceAspect())("colors",e.bannerColors())("selectedColorIndex",e.bannerColorIndex())("brandColors",e.brandColors());}}var oT="/img/icon-library/symbols/exit-close.svg",Lm=(()=>{class i extends Fn{constructor(e){super(e),this.data=e,this.sliderV2StoryService=ct(Yi),this.sliderV2CropService=ct(ol),this.vdmPresetsService=ct(Io),this.dialogRef=ct(br),this.closeIcon=oT,this.resetIcon=j0,this.story=this.sliderV2StoryService.story,this.sourceAspect=xt(()=>this.story()?.mainTrack?.video?.aspectRatio),this.appliedMode=xt(()=>fp(this.story())),this.draftMode=$t(void 0),this.mode=xt(()=>this.draftMode()??this.appliedMode()),this.appliedFormat=xt(()=>this.appliedMode()==="crop"?this.story()?.aspectRatio:void 0),this.appliedBannerFormat=xt(()=>this.appliedMode()==="banners"?this.story()?.aspectRatio:void 0),this.bannerFormatDraft=$t(void 0),this.bannerFormat=xt(()=>this.bannerFormatDraft()??this.appliedBannerFormat()),this.headerAction=xt(()=>this.hasStagedChange()?"apply":this.appliedMode()!=="none"?"reset":null),this.showAdjustCrop=xt(()=>this.mode()==="crop"&&!!this.appliedFormat()),this.paletteRoles=xt(()=>V0(N0(this.sliderV2StoryService.story()?.style?.colors,this.vdmPresetsService.colorPalettes()))),this.colorEdits=$t({}),this.bannerColors=xt(()=>{let t=this.colorEdits();return[...H0,...this.paletteRoles().map(o=>({value:o.color,label:o.label,editable:!0}))].map((o,_)=>_ in t?st(Ke({},o),{value:t[_]}):o);}),this.bannerColorIndex=$t(0),this.brandColors=xt(()=>this.paletteRoles().map(t=>t.color)),this.unsubscribe$=new Yt();}ngOnInit(){this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}onModeChange(e){this.draftMode.set(e);}onFormatSelected(e){this.openCropper(e);}onBannerFormatSelected(e){this.bannerFormatDraft.set(e);}onBannerColorSelected(e){this.bannerColorIndex.set(e);}onBannerColorEdited(e){this.colorEdits.update(t=>st(Ke({},t),{[e.index]:e.value}));}apply(){switch(this.mode()){case"banners":{let e=this.bannerFormat();e&&this.sliderV2StoryService.setAspectRatioAndClearZoom(e);break;}case"none":this.resetToSource();break;}this.clearDrafts();}reset(){this.resetToSource(),this.clearDrafts();}onAdjustCrop(){this.openCropper();}resetToSource(){let e=this.sourceAspect();e?this.sliderV2StoryService.setAspectRatioAndClearZoom(e):this.sliderV2StoryService.clearZoom();}openCropper(e){this.sliderV2CropService.open(e),this.close();}hasStagedChange(){switch(this.mode()){case"none":return this.appliedMode()!=="none";case"banners":{let e=this.bannerFormat();return!!e&&e!==this.appliedBannerFormat();}default:return!1;}}clearDrafts(){this.draftMode.set(void 0),this.bannerFormatDraft.set(void 0);}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-resize-v2"]],standalone:!0,features:[Mn,Ft],decls:14,vars:6,consts:()=>{let e;e="Close resize panel";let t;t="None";let n;n="Crop";let o;o="Add banners";let _;_="Resize";let E;E="Apply";let x;return x="Reset",[_,E,x,[1,"resize-panel"],[1,"resize-panel__head"],[1,"resize-panel__title"],[1,"resize-panel__actions"],["size","sm","variant","ghost","aria-label",e,3,"clicked","iconContent"],[1,"resize-panel__modes"],["name","composer-resize-mode","value","none","text",t,3,"change","state"],["name","composer-resize-mode","value","crop","text",n,3,"change","state"],["name","composer-resize-mode","value","banners","text",o,3,"change","state"],[3,"selectedFormat","showAdjustCrop"],["size","sm","variant","primary",3,"clicked"],["size","sm","variant","secondary",3,"clicked","leftIconContent"],[3,"formatSelected","adjustCropClicked","selectedFormat","showAdjustCrop"],[3,"formatSelected","colorSelected","colorEdited","selectedFormat","sourceFormat","colors","selectedColorIndex","brandColors"]];},template:function(t,n){if(t&1&&(be(0,"div",3)(1,"div",4)(2,"h2",5),li(3,0),Oe(),be(4,"div",6),at(5,tT,3,0)(6,iT,3,1),be(7,"lib-button-icon",7),Ze("clicked",function(){return n.close();}),Oe()()(),be(8,"div",8)(9,"lib-radio",9),Ze("change",function(){return n.onModeChange("none");}),Oe(),be(10,"lib-radio",10),Ze("change",function(){return n.onModeChange("crop");}),Oe(),be(11,"lib-radio",11),Ze("change",function(){return n.onModeChange("banners");}
816),Oe()(),at(12,nT,1,2,"resize-crop-tab",12)(13,rT,1,5),Oe()),t&2){let o;Ce(5),kl(5,(o=n.headerAction())==="apply"?5:o==="reset"?6:-1),Ce(2),ke("iconContent",n.closeIcon),Ce(2),ke("state",n.mode()==="none"?"selected":"default"),Ce(),ke("state",n.mode()==="crop"?"selected":"default"),Ce(),ke("state",n.mode()==="banners"?"selected":"default"),Ce(),kl(12,n.mode()==="crop"?12:n.mode()==="banners"?13:-1);}},dependencies:[vr,Rr,Vv,q0,W0],styles:["[_nghost-%COMP%]{display:block}.resize-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;width:376px;padding:20px;background-color:#fff;font-family:Inter,sans-serif;-webkit-user-select:none;user-select:none}.resize-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;min-height:32px}.resize-panel__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;line-height:1.4;color:#253658}.resize-panel__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.resize-panel__modes[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}"],changeDetection:0});}}return i;})();hi();Oo();Bn();Ki();Mr();es();vn();mt();lo();Or();var Yc={view:"main"},gp=(()=>{class i{constructor(e,t,n,o,_,E){if(this.storyService=e,this.videoSlidesService=t,this.notifier=n,this.eventsService=o,this.composerEventsService=_,this.store=new yr(Yc),this.state$=this.store.asObservable(),this.view$=this.state$.pipe(oi(x=>x.view),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.sidebarAutoZoomModalViewModel$=Vn([this.view$]).pipe(oi(([x])=>({view:x,previewUrl:"https://assets.bigvu.tv/storyVideos/65ef15bbbbc1f712f6a42366/takes/65ef15bbbbc1f712f6a4236b/8b2727f1-21fb-4b67-8f64-5e0579a25e1b/video.m3u8",thumbnailUrl:"https://assets.bigvu.tv/storyVideos/65ef15bbbbc1f712f6a42366/takes/65ef15bbbbc1f712f6a4236b/634fc0e3-0a2b-4d2a-a5f7-32a3dfcfe580/video_thumb_360.0000001.jpeg"}))),E)throw new Error("SidebarAutoZoomModalService is already loaded");this.composerEventsService.log(this.eventsService.events.composer.autoZoomOpenModal,{takeId:this.composerEventsService.takeId});}updateState(e){Yc=e,this.store.next(Yc);}onCancel(){this.composerEventsService.log(this.eventsService.events.composer.autoZoomSet,{takeId:this.composerEventsService.takeId,choice:"cancel"});}onAutoZoom(){this.updateState(ei(Yc,e=>{e.view="progress";})),this.storyService.setAutoZoomData().then(e=>{this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarMusicModalService$->setAutoZoomData$",buildAgain:!0,changeMade:!0}),this.notifier.success("Auto-Zoom has been successfully applied to your video"),this.composerEventsService.log(this.eventsService.events.composer.autoZoomExecuted,{takeId:this.composerEventsService.takeId,effectedSlidePercentage:(e.length/this.storyService.story.media.length).toString(),numSlides:this.storyService.story.media.length.toString()});}).catch(e=>{this.notifier.error("Could not set Auto-Zoom"),Qt(e),this.composerEventsService.log(this.eventsService.events.composer.autoZoomExecuted,{takeId:this.composerEventsService.takeId,numSlides:this.storyService.story.media?.length.toString(),error:e&&e.data?e.data.msg:`Unhandled Error ${e.status}: ${e.statusText?e.statusText:""}`});}).finally(()=>{this.updateState(ei(Yc,e=>{e.view="none";}));}),this.composerEventsService.log(this.eventsService.events.composer.autoZoomSet,{takeId:this.composerEventsService.takeId,choice:"apply"});}ngOnDestroy(){Yc={view:"main"},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(En),Rt(Ji),Rt(en),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();mt();Bn();hi();function lT(i,r){if(i&1){let e=_t();be(0,"div",8),Ze("click",function(){$e(e);let n=Le(2);return n.sidebarAutoZoomModalService.onCancel(),We(n.close());}),Oe();}}function cT(i,r){i&1&&tt(0,"img",18);}function uT(i,r){i&1&&tt(0,"img",19);}function dT(i,r){if(i&1&&(be(0,"div",15),at(1,cT,1,0,"img",16)(2,uT,1,0,"img",17),Oe()),i&2){let e=Le(3);Ei("playing",e.isVideoPlaying),Ce(),ke("ngIf",!e.isVideoPlaying),Ce(),ke("ngIf",e.isVideoPlaying);}}function hT(i,r){if(i&1){let e=_t();ti(0),be(1,"div",9),Ze("click",function(n){$e(e);let o=Le(2);return We(o.onPlayerClicked(n));}),at(2,dT,3,3,"div",10),be(3,"video",11),Ze("loadedmetadata",function(n){$e(e);let o=Le(2);return We(o.onLoadedMetadata(n));})("playing",function(n){$e(e);let o=Le(2);return We(o.onPlayingVideo(n));})("pause",function(n){$e(e);let o=Le(2);return We(o.onPlayerPaused(n));}),Oe()(),be(4,"div",12),lt(5," Add dynamic, relevant zooms to your videos automatically to emphasize the most intense moments of your narration. Any adjustment will need to be done manually scene by scene. "),Oe(),be(6,"div",13)(7,"button",14),Ze("click",function(){$e(e);let n=Le(2);return n.sidebarAutoZoomModalService.onCancel(),We(n.close());}),lt(8," Cancel "),Oe(),be(9,"button",14),Ze("click",function(){$e(e);let n=Le(2);return We(n.sidebarAutoZoomModalService.onAutoZoom());}),lt(10," Apply AI Auto-Zoom "),Oe()(),ii();}if(i&2){let e=Le(2);Ce(),Li("width",456,"px"),Ei("playing",e.isVideoPlaying),Ce(),ke("ngIf",!e.isVideoLoading),Ce(),Li("width",456,"px")("height",256.5,"px"),Al("id",e.PLAYER_ID),Ce(6),Ei("active",!0);}}function pT(i,r){if(i&1){let e=_t();ti(0),be(1,"div",20),Ze("click",function(n){return $e(e),We(n.stopPropagation());}),Oe(),be(2,"div",21),tt(3,"app-process-fake-with-lottie",22),Oe(),ii();}i&2&&(Ce(3),ke("generating",!0)("title","Applying Zoom Levels"));}function fT(i,r){if(i&1&&(be(0,"div",1)(1,"div",2),at(2,lT,1,0,"div",3),be(3,"div",4)(4,"div",5),lt(5,"AI Auto-Zoom"),Oe()()(),be(6,"div",6),at(7,hT,11,10,"ng-container",7)(8,pT,4,2,"ng-container",7),Oe()()),i&2){let e=r.ngIf,t=Le();Ce(2),ke("ngIf",!t.ignoreBackdropClick),Ce(5),ke("ngIf",e.view==="main"),Ce(),ke("ngIf",e.view==="progress");}}var Y0=(()=>{class i extends Fn{constructor(e,t,n,o){super(o),this.sidebarAutoZoomModalService=e,this.videoPlayerService=t,this.dialogRef=n,this.data=o,this.PLAYER_ID="auto-zoom-playback",this.isVideoPlaying=!1,this.isVideoLoading=!0,this.ignoreBackdropClick=!1,this.unsubscribe$=new Yt(),this.initPlayer=()=>kt(this,null,function*(){yield this.videoPlayerService.init(this.PLAYER_ID,!1,!1,
816!0),this.videoPlayerService.preload(this.PLAYER_ID,"auto");}),this.onLoadedMetadata=_=>{this.isVideoLoading=!1,this.videoPlayerService.loadingSpinner(this.PLAYER_ID,!1);},this.onPlayingVideo=_=>{this.isVideoPlaying=!0;},this.onPlayerPaused=_=>{this.isVideoPlaying=!1;},this.onPlayerClicked=_=>{this.isVideoPlaying?this.videoPlayerService.pause(this.PLAYER_ID):this.videoPlayerService.play(this.PLAYER_ID);},this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.ignoreBackdropClick||(this.sidebarAutoZoomModalService.onCancel(),this.close());});}ngOnInit(){this.viewModel$=this.sidebarAutoZoomModalService.sidebarAutoZoomModalViewModel$;}ngAfterViewInit(){this.viewModel$.pipe(Ws("view"),Pt(this.unsubscribe$)).subscribe(e=>{e.view==="main"?(this.ignoreBackdropClick=!1,this.initPlayer().then(()=>{this.videoPlayerService.setPoster(this.PLAYER_ID,e.thumbnailUrl),this.videoPlayerService.setSource(this.PLAYER_ID,e.previewUrl);})):e.view==="progress"?(this.ignoreBackdropClick=!0,this.videoPlayerService.pause(this.PLAYER_ID),this.videoPlayerService.dispose(this.PLAYER_ID)):this.close();});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.videoPlayerService.dispose(this.PLAYER_ID);}static{this.ɵfac=function(t){return new(t||i)(ut(gp),ut(Vc),ut(br),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-auto-zoom"]],standalone:!0,features:[Wn([gp]),Mn,Ft],decls:2,vars:3,consts:[["class","auto-zoom-modal",4,"ngIf"],[1,"auto-zoom-modal"],[1,"header-container"],["class","close-button",3,"click",4,"ngIf"],[1,"header-title"],[1,"header-text"],[1,"body-container"],[4,"ngIf"],[1,"close-button",3,"click"],[1,"video-container",3,"click"],["class","video-container-play",4,"ngIf"],[1,"video-js","vjs-big-play-centered",3,"loadedmetadata","playing","pause","id"],[1,"info-text"],[1,"buttons-container"],[3,"click"],[1,"video-container-play"],["src","/img/composer/player-icons/play.svg","draggable","false","alt","image","width","24","height","24",4,"ngIf"],["src","/img/composer/player-icons/stop.svg","draggable","false","alt","image","width","24","height","24",4,"ngIf"],["src","/img/composer/player-icons/play.svg","draggable","false","alt","image","width","24","height","24"],["src","/img/composer/player-icons/stop.svg","draggable","false","alt","image","width","24","height","24"],[1,"progress-backdrop",3,"click"],[2,"position","absolute","height","300px","width","100%"],[3,"generating","title"]],template:function(t,n){t&1&&(at(0,fT,9,3,"div",0),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[Ci,ui,ir,g_],styles:['.auto-zoom-modal[_ngcontent-%COMP%]{width:520px;min-height:500px;padding:32px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.body-container[_ngcontent-%COMP%]{margin-top:20px;display:flex;flex-direction:column;align-items:center;gap:20px}.info-text[_ngcontent-%COMP%]{color:#000;font-size:12px;line-height:140%;padding:0 3px}.buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center;align-self:end;gap:16px}.buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-family:Inter-Bold;font-size:12px;border-radius:10px;padding:10px;background-color:#7b8db114;color:#2536584d}.buttons-container[_ngcontent-%COMP%] button[active=true][_ngcontent-%COMP%]{background-color:#4481fd;color:#fff}.progress-backdrop[_ngcontent-%COMP%]{width:100%;height:100%;background-color:#0000004d;position:fixed;top:0;left:0;overflow:hidden;z-index:-1}.video-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:15px;overflow:hidden}.video-container[_ngcontent-%COMP%]:hover{cursor:pointer}.video-container[_ngcontent-%COMP%]:hover .video-container-play[_ngcontent-%COMP%]{background-color:#9a9aab99}.video-container[playing=true][_ngcontent-%COMP%]:hover .video-container-play[_ngcontent-%COMP%]{visibility:visible}.video-container-play[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;align-items:center;justify-content:center;width:72px;height:72px;background-color:#0009;border-radius:50%}.video-container-play[playing=true][_ngcontent-%COMP%]{visibility:hidden}']});}}return i;})();hi();Oo();Bn();mt();Bn();Ki();Mr();var Dm=oo(la());
816Na();Ki();Mr();Mr();var yp=oo(la());Yu();_a();Bn();Oo();mt();var X0=(()=>{class i extends Fn{constructor(e){super(e),this.data=e;}ngOnInit(){}onCancel(){this.data.onClose();}onSave(e){this.data.onSubmit(e);}static{this.ɵfac=function(t){return new(t||i)(ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["intro-outro-business-editor"]],standalone:!0,features:[Mn,Ft],decls:1,vars:1,consts:[[3,"cancel","save","isShownAsDialog"]],template:function(t,n){t&1&&(be(0,"my-business",0),Ze("cancel",function(){return n.onCancel();})("save",function(_){return n.onSave(_);}),Oe()),t&2&&ke("isShownAsDialog",!0);},dependencies:[P_],encapsulation:2});}}return i;})();mt();fh();hi();mt();fh();var gT=["container"];function yT(i,r){if(i&1){let e=_t();be(0,"div",6)(1,"input",7),Ze("ngModelChange",function(n){$e(e);let o=Le();return We(o.newValue(n));}),Oe()();}if(i&2){let e=Le();Ce(),ke("ngModel",e.parseInt())("min",e.min)("max",e.max)("step",e.step);}}var K0=(()=>{class i{constructor(){this.initialValue=null,this.format="",this.valueChanged=new Mi();}
816ngOnInit(){document.addEventListener("click",e=>{this.showTooltip=this.getAllChildrenAsArray(this.container.nativeElement).includes(e.target);}),this.value=this.initialValue|this.min;}ngAfterViewInit(){}newValue(e){this.value=e,this.valueChanged.emit(e);}getAllChildrenAsArray(e){let t=[],n=o=>{t.push(o);for(let _ of o.children)n(_);};return n(e),t;}parseInt(){return this.proccesFunction?this.proccesFunction(this.initialValue):this.initialValue;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["slider-tooltip-theme-editor"]],viewQuery:function(t,n){if(t&1&&fn(gT,5),t&2){let o;mn(o=gn())&&(n.container=o.first);}},inputs:{max:"max",min:"min",step:"step",initialValue:"initialValue",format:"format",title:"title",proccesFunction:"proccesFunction"},outputs:{valueChanged:"valueChanged"},standalone:!0,features:[Ft],decls:8,vars:4,consts:[["container",""],[2,"width","fit-content"],[1,"theme-editor-action-container","theme_editor_tolltip_container","theme-editor-center-one-div-inside"],[1,"theme-editor-h3","theme-editor-light","tooltip-value"],["class","tooltip-theme-editor scale-up-up-theme-editor theme-editor-center-one-div-inside",4,"ngIf"],[1,"theme-editor-tooltip-title"],[1,"tooltip-theme-editor","scale-up-up-theme-editor","theme-editor-center-one-div-inside"],["type","range","ngDefaultControl","","id","myRange",1,"tooltip-slider",3,"ngModelChange","ngModel","min","max","step"]],template:function(t,n){t&1&&(be(0,"div",1,0)(2,"div",2)(3,"span",3),lt(4),Oe(),at(5,yT,2,4,"div",4),Oe(),be(6,"div",5),lt(7),Oe()()),t&2&&(Ce(4),_v("",n.parseInt(),"",n.format,""),Ce(),ke("ngIf",n.showTooltip),Ce(2),_i(n.title));},dependencies:[ui,ph,ch,hh,uh,dh],styles:['.tooltip-theme-editor[_ngcontent-%COMP%]{width:124px;height:32px;border-radius:10px;box-shadow:0 0 16px #13131324;background-color:var(--White);position:absolute;color:#fff;bottom:-34px;left:-38%;z-index:999999}.tooltip-theme-editor[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-9px;left:45%;width:0;height:0;border-top:solid 9px white;border-left:solid 7px transparent;border-right:solid 7px transparent;transform:rotate(180deg)}.scale-up-up-theme-editor[_ngcontent-%COMP%]{-webkit-animation:scale-up-bottom .2s cubic-bezier(.39,.575,.565,1) both;animation:scale-up-bottom .2s cubic-bezier(.39,.575,.565,1) both}@-webkit-keyframes _ngcontent-%COMP%_scale-up-up-theme-editor{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}@keyframes _ngcontent-%COMP%_scale-up-up-theme-editor{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}.tooltip-slider[_ngcontent-%COMP%]{-webkit-appearance:none;width:100px!important;height:1px;border:solid 1px #eff0f3;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}.tooltip-slider[_ngcontent-%COMP%]:hover{opacity:1}.tooltip-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:24px;height:16px;border-radius:10px;background-color:var(--DeadBlue);cursor:pointer}.tooltip-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:24px;height:16px;border-radius:10px;background-color:var(--DeadBlue);cursor:pointer}.tooltip-value[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;font-weight:100;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-align:center;color:var(--Black-30)}.tooltip-value-container[_ngcontent-%COMP%]{cursor:pointer;width:56px;height:36px;position:relative}.tooltip-value-container[_ngcontent-%COMP%]:hover{opacity:.9}.theme-editor-tooltip-title[_ngcontent-%COMP%]{font-size:10px;font-weight:100;color:var(--Black-30);font-size:12px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#7b8db1;padding-top:5px;padding-left:5px}.theme_editor_tolltip_container[_ngcontent-%COMP%]{cursor:pointer;width:56px;height:36px;position:relative}']});}}return i;})();hi();var Z0=oo(k_()),Q0=oo(A_());vn();mt();lo();Na();_a();Js();Or();function _T(i,r){i&1&&tt(0,"div",15);}function bT(i,r){if(i&1){let e=_t();be(0,"div",16),Ze("click",function(n){$e(e);let o=Le();return We(o.onPlayerClicked(n));}),tt(1,"img",17),Oe();}}function ST(i,r){i&1&&tt(0,"img",21);}function wT(i,r){i&1&&tt(0,"ngx-spinner",22),i&2&&ke("fullScreen",!1)("zIndex",1);}function ET(i,r){if(i&1){let e=_t();be(0,"div",18),Ze("click",function(n){$e(e);let o=Le();return We(o.onPlayerClicked(n));}),at(1,ST,1,0,"img",19)(2,wT,1,2,"ngx-spinner",20),Oe();}if(i&2){let e=Le();Ce(),ke("ngIf",!e.isVideoLoading),Ce(),ke("ngIf",e.isVideoLoading);}}function xT(i,r){i&1&&(be(0,"div",23),tt(1,"mat-progress-spinner",24),Oe());}function TT(i,r){i&1&&(be(0,"span"),lt(1,"Edit"),Oe());}function CT(i,r){i&1&&(be(0,"span"),lt(1,"Create"),Oe());}function OT(i,r){i&1&&tt(0,"img",37),i&2&&ke("@rotateWithScaleUsingNgif",void 0);}function PT(i,r){if(i&1){let e=_t();be(0,"div",32),at(1,OT,1,1,"img",33),be(2,"div",34),Ze("click",function(){let n=$e(e).$implicit,o=Le(2);return We(o.onBusinessItemClick(n));}),tt(3,"img",35),Oe(),be(4,"div",36),lt(5),qi(6,"titlecase"),Oe()();}if(i&2){let e=r.$implicit;Ce(),ke("ngIf",e.checked),Ce(2),ke("src",e.iconUrl,An),Ce(2),hn(" ",Qi(6,3,e.title)," ");}}function IT(i,r){if(i&1){let e=_t();be(0,"div",25)(1,"div",26)(2,"div",27),lt(3," Business Information "),Oe(),be(4,"button",28),Ze("click",function(){$e(e);let n=Le();return We(n.onEditBusinessClick());}),at(5,TT,2,0,"span",29)(6,CT,2,0,"span",29),Oe()(),be(7,"div",30),at(8,PT,7,5,"div",31),Oe()();}if(i&2){let e=Le();Ce(5),ke("ngIf",e.businessInfoItems.length>0),Ce(),ke("ngIf",e.businessInfoItems.length===0),Ce(2),ke("ngForOf",e.businessInfoItems);}}function kT(i,r){i&1&&(be(0,"div",41),lt(1," Social "),Oe());}function AT(i,r){i&1&&tt(0,"img",37),i&2&&ke("@rotateWithScaleUsingNgif",void 0);}function MT(i,r){if(i&1){let e=_t();be(0,"div",32),at(1,AT,1,1,"img",33),be(2,"div",34),Ze("click",function(){let n=$e(e).$implicit,o=Le(2);return We(o.onSocialItemClick(n));}),tt(3,"img",35),Oe(),be(4,"div",36),lt(5),qi(6,"titlecase"),Oe()();}if(i&2){let e=r.$implicit;Ce(),ke("ngIf",e.checked),Ce(2),ke("src",e.iconUrl,An),Ce(2),hn(" ",Qi(6,3,e.title)," ");}}function RT(i,r){if(i&1&&(be(0,"div",38),at(1,kT,2,0,"div",39),be(2,"div",40),at(3,MT,7,5,"div",31),Oe()()),i&2){let e=Le();Ce(),ke("ngIf",e.socialInfoItems.length>0),Ce(2),ke("ngForOf",e.socialInfoItems);}}var J0=(()=>{class i{constructor(e,t,n,o,_,E,x,h,y){this.notifier=e,this.zone=t,this.ngxSpinner=n,this.dialogHelperService=o,this.planHelperService=_,this.eventsService=E,this.storyService=x,this.composerEventsService=h,this.composerHttpService=y,this.VDM_PLAYER_HEIGHT=214,this.VDM_PLAYER_THUMBNAIL_SEC=2,this.VDM_PLAYER_END_GAP_SEC=.5,this.BUSINESS_INFORMATION_EDIT_URL="/profile/my-business",this.DEFAULT_DURATION=7,this.MIN_DURATION=3,this.MAX_DURATION=20,this.DEBOUNCE_AUTOPLAY_VIDEO_MS=1e3,this.BUSINESS_ITEMS_ASSET_URL={website:"https://assets.bigvu.tv/defaults/assets/biz-card/website.svg",phone:"https://assets.bigvu.tv/defaults/assets/biz-card/phone.svg",mail:"https://assets.bigvu.tv/defaults/assets/biz-card/email.svg",city:"https://assets.bigvu.tv/defaults/assets/biz-card/location.svg",addressLine:"https://assets.bigvu.tv/defaults/assets/biz-card/location.svg"},this.SOCIAL_ITEMS_ASSET_URL={twitter:"https://assets.bigvu.tv/defaults/assets/biz-card/twitter.svg",instagram:"https://assets.bigvu.tv/defaults/assets/biz-card/instagram.svg"},this.BUSINESS_ITEMS={mail:{title:"Mail",name:"mail",iconUrl:"/img/business-options-icons/business-checkbox-mail.svg",checked:!1,idx:0}
816,website:{title:"Website",name:"website",iconUrl:"/img/business-options-icons/business-checkbox-website.svg",checked:!1,idx:1},phone:{title:"Phone",name:"phone",iconUrl:"/img/business-options-icons/business-checkbox-phone.svg",checked:!1,idx:2},city:{title:"City",name:"city",iconUrl:"/img/business-options-icons/business-checkbox-city.svg",checked:!1,idx:3},addressLine:{title:"Street",name:"addressLine",iconUrl:"/img/business-options-icons/business-checkbox-address.svg",checked:!1,idx:4}},this.SOCIAL_ITEMS={twitter:{title:"X/Twitter",name:"twitter",iconUrl:"/img/icon-library/misc/x.svg",checked:!1,idx:0},instagram:{title:"Instagram",name:"instagram",iconUrl:"/img/business-card-icons/instagram.svg",checked:!1,idx:1}},this.introOutroDataRef=void 0,this.VDMPreviewer=Z0.VDMPluginPreviewer,this.VDMAdapter=Q0.default,this.unsubscribe$=new Yt(),this.currentPlayerTime=0,this.debouncer$=new Yt(),this.vdmPreviewerWidth=this.VDM_PLAYER_HEIGHT/Nr.AspectRatioEnum.HORIZONTAL,this.vdmPreviewerHeight=this.VDM_PLAYER_HEIGHT,this.isVideoPlaying=!1,this.isVideoLoading=!0,this.businessInfoItems=void 0,this.socialInfoItems=void 0,this.isLoadingBusinessData=!0,this.ioRef=void 0,this.updateSoundOptionsArray=b=>{this.soundOptionsArray.map(p=>{p.value===b?p.checked=!0:p.checked=!1;});},this.updateIntroOutroObj=()=>{this.ioRef.introOutroObj=yp.cloneDeep(this.ioRef.introOutroVdmObj),"logo"in this.ioRef.cachedAPIData.businessData?(this.ioRef.cachedAPIData.businessData.logo.resource.url!=this.ioRef.introOutroVdmObj.data.logo&&this.ioRef.headerSubmitButtonText!=="Add"&&(this.ioRef.didUserModify=!0,this.ioRef.headerSubmitButtonText="Save"),this.ioRef.introOutroVdmObj.data.logo=this.ioRef.cachedAPIData.businessData.logo.resource.url,this.ioRef.introOutroObj.data.logoId=this.ioRef.cachedAPIData.businessData.logo.assetId,delete this.ioRef.introOutroObj.data.logo):"logo"in this.ioRef.introOutroVdmObj.data&&(delete this.ioRef.introOutroVdmObj.data.logo,delete this.ioRef.introOutroObj.data.logo,this.ioRef.headerSubmitButtonText!=="Add"&&(this.ioRef.didUserModify=!0,this.ioRef.headerSubmitButtonText="Save")),this.ioRef.introOutroObj.templateIds=[this.storyService.introOutroTextTemplateId,this.storyService.introOutroBizCardTemplateId];},this.updateBusinessInfoItemsArray=b=>{this.businessInfoItems=this.businessInfoItems===void 0?[]:this.businessInfoItems;let p=!1,c=[];if(this.ioRef.introOutroVdmObj&&"properties"in this.ioRef.introOutroVdmObj.data)for(let d of this.ioRef.introOutroVdmObj.data.properties.details)c.push(d.name);"address"in b&&("addressLine"in b.address&&(b.addressLine=b.address.addressLine),"city"in b.address&&(b.city=b.address.city)),"email"in b&&("mail"in b?console.error("Error! mail key was return from business dataset"):b.mail=b.email);for(let[d,m]of Object.entries(b)){let a=!1;for(let s of this.businessInfoItems)s.name===d&&(s.data!==m&&(p=c.includes(this.BUSINESS_ITEMS[d].name)),s.data=m,a=!0);if(!a&&d in this.BUSINESS_ITEMS){let s={idx:this.BUSINESS_ITEMS[d].idx,title:this.BUSINESS_ITEMS[d].title,name:this.BUSINESS_ITEMS[d].name,iconUrl:this.BUSINESS_ITEMS[d].iconUrl,checked:c.includes(this.BUSINESS_ITEMS[d].name),data:m};this.businessInfoItems.push(s);}}for(let d=0;d<this.businessInfoItems.length;d++)this.businessInfoItems[d].name in b||(this.businessInfoItems.splice(d,1),p=!0);if(this.businessInfoItems.sort(function(d,m){return d.idx-m.idx;}),"properties"in this.ioRef.introOutroVdmObj.data){for(let d=0;d<this.ioRef.introOutroVdmObj.data.properties.details.length;d++){let m=this.ioRef.introOutroVdmObj.data.properties.details[d],a=!1;for(let s=0;s<this.businessInfoItems.length;s++)m.name===this.businessInfoItems[s].name&&(a=!0,m.title=this.businessInfoItems[s].data);a||(this.ioRef.introOutroVdmObj.data.properties.details.splice(d,1),p=!0);}this.updateIntroOutroObj();}return p;},this.updateSocialInfoItemsArray=b=>{this.socialInfoItems=this.socialInfoItems===void 0?[]:this.socialInfoItems;let p=!1,c=[];if("properties"in this.ioRef.introOutroVdmObj.data)for(let d of this.ioRef.introOutroVdmObj.data.properties.social)c.push(d.name);if("social"in b){for(let[d,m]of Object.entries(b.social)){let a=!1;for(let s of this.socialInfoItems)s.name===d&&(s.data=m,a=!0);if(!a&&d in this.SOCIAL_ITEMS){let s={idx:this.SOCIAL_ITEMS[d].idx,title:this.SOCIAL_ITEMS[d].title,name:this.SOCIAL_ITEMS[d].name,iconUrl:this.SOCIAL_ITEMS[d].iconUrl,checked:c.includes(this.SOCIAL_ITEMS[d].name),data:m};this.socialInfoItems.push(s);}}for(let d=0;d<this.socialInfoItems.length;d++)this.socialInfoItems[d].name in b.social||(this.socialInfoItems.splice(d,1),p=!0);}if(this.socialInfoItems.sort(function(d,m){return d.idx-m.idx;}),"properties"in this.ioRef.introOutroVdmObj.data){for(let d=0;d<this.ioRef.introOutroVdmObj.data.properties.social.length;d++){let m=this.ioRef.introOutroVdmObj.data.properties.social[d],a=!1;for(let s=0;s<this.socialInfoItems.length;s++)m.name===this.socialInfoItems[s].name&&(a=!0);a||(this.ioRef.introOutroVdmObj.data.properties.social.splice(d,1),p=!0);}this.updateIntroOutroObj();}return p;},this.onSoundOptionChange=b=>{this.ioRef.didUserModify=!0;let p=d=>{switch(d){case"Off":return Dr.OFF;
816case"Background Music":return Dr.SOUNDBED;}};this.updateSoundOptionsArray(b.value);let c=p(b.value);this.ioRef.introOutroVdmObj.data.audioTrack=c,this.updateIntroOutroObj(),this.ioRef.headerSubmitButtonText!=="Add"&&(this.ioRef.headerSubmitButtonText="Save");},this.onUpdateDuration=b=>{this.ioRef.didUserModify=!0,this.ioRef.introOutroVdmObj.data.duration=b,this.updateIntroOutroObj(),this.createVDMStoryAndUpdateVDMPluginStory(!1);};}ngOnInit(){return kt(this,null,function*(){this.ioRef=this.introOutroDataRef;let e=yield this.planHelperService.isFreeByCurrentPlan();switch(this.soundOptionsArray=[{value:"Off",name:"soundOptRb",id:"soundOptRb1",checked:!0},{value:"Background Music",name:"soundOptRb",id:"soundOptRb2",checked:!1}],this.videoMakerPlugin=new this.VDMPreviewer("intro-outro-vdm-player"),this.ioRef.storyAspectRatio){case"horizontal":this.vdmPreviewerWidth=this.vdmPreviewerHeight/Nr.AspectRatioEnum.HORIZONTAL;break;case"vertical":this.vdmPreviewerWidth=this.vdmPreviewerHeight/Nr.AspectRatioEnum.VERTICAL;break;case"square":this.vdmPreviewerWidth=this.vdmPreviewerHeight/Nr.AspectRatioEnum.SQUARE;break;}if(this.ioRef.introOutroVdmObj){let n=(_=>{switch(_){case Dr.SOUNDBED:return"Background Music";default:return"Off";}})("audioTrack"in this.ioRef.introOutroVdmObj.data?this.ioRef.introOutroVdmObj.data.audioTrack:Dr.OFF);this.updateSoundOptionsArray(n);let o=_=>{this.updateIntroOutroObj(),this.updateBusinessInfoItemsArray(_),this.updateSocialInfoItemsArray(_),this.storyService.isThemeSet&&this.createVDMStoryAndUpdateVDMPluginStory();};"businessData"in this.ioRef.cachedAPIData?(this.isLoadingBusinessData=!1,o(this.ioRef.cachedAPIData.businessData)):(this.isLoadingBusinessData=!0,this.storyService.hotfix_businessDataUpdated$.pipe(sn(_=>_!==void 0),Pt(this.unsubscribe$)).subscribe(_=>{this.isLoadingBusinessData=!1,this.ioRef.cachedAPIData.businessData=_,o(_);})),this.ioRef.introOutroVdmObj.data.properties.isFreeUser=e,this.ioRef.introOutroObj.data.properties.isFreeUser=e;}else{this.ioRef.headerSubmitButtonText="Add";let t=n=>{this.updateBusinessInfoItemsArray(n),this.updateSocialInfoItemsArray(n),this.storyService.isThemeSet&&this.createVDMStoryAndUpdateVDMPluginStory();};"businessData"in this.ioRef.cachedAPIData?(this.isLoadingBusinessData=!1,this.ioRef.introOutroVdmObj={type:"aux/card/generic",data:{duration:7,audioTrack:0,properties:{head:{company:this.ioRef.cachedAPIData.businessData.name,name:this.ioRef.cachedAPIData.businessData.ownerName},details:[],social:[],isFreeUser:!0}}},this.ioRef.introOutroVdmObj.data.properties.isFreeUser=e,this.updateIntroOutroObj(),t(this.ioRef.cachedAPIData.businessData)):(this.isLoadingBusinessData=!0,this.storyService.hotfix_businessDataUpdated$.pipe(sn(n=>n!==void 0),Pt(this.unsubscribe$)).subscribe(n=>{this.isLoadingBusinessData=!1,this.ioRef.cachedAPIData.businessData=n,this.ioRef.introOutroVdmObj={type:"aux/card/generic",data:{duration:7,audioTrack:0,properties:{head:{company:this.ioRef.cachedAPIData.businessData.name,name:this.ioRef.cachedAPIData.businessData.ownerName},details:[],social:[],isFreeUser:!0}}},this.ioRef.introOutroVdmObj.data.properties.isFreeUser=e,this.updateIntroOutroObj(),t(this.ioRef.cachedAPIData.businessData);}));}this.debouncer$.pipe(On(this.DEBOUNCE_AUTOPLAY_VIDEO_MS),Pt(this.unsubscribe$)).subscribe(()=>{!this.isVideoLoading&&!this.isVideoPlaying&&this.play();});});}addVideoMakerPluginCallbacks(){this.videoMakerPlugin.on("update",(e,t)=>{this.zone.run(()=>{this.currentPlayerTime=e;});}),this.videoMakerPlugin.on("start",e=>{this.zone.run(()=>{this.isVideoPlaying=!0;});}),this.videoMakerPlugin.on("ended",e=>{this.zone.run(()=>{this.isVideoPlaying=!1,this.pause();});});}ngAfterViewInit(){Il(100).pipe(zr(20),Jd(()=>this.videoMakerPlugin===void 0),Zd(()=>{this.videoMakerPlugin?this.addVideoMakerPluginCallbacks():console.error("Error! could not set VDM player plugin callbacks!");})).subscribe(()=>{}),document.querySelector(".business-duration-value .tooltip-value").style.color="#7b8db1",document.querySelector(".business-duration-value .tooltip-value").style.fontWeight="bold";}onEditBusinessClick(e){let t=new va();t.header="",t.onClose=()=>{this.dialogHelperService.close();},t.onSubmit=o=>{JSON.stringify(o)!==JSON.stringify(this.storyService.hotfix_businessDataUpdated$.getValue())&&this.composerHttpService.getWorkspaceBusinessData().then(E=>{this.storyService.hotfix_businessDataUpdated$.next(E);});let _=!1;_=this.updateBusinessInfoItemsArray(o),_=this.updateSocialInfoItemsArray(o)||_,_&&this.createVDMStoryAndUpdateVDMPluginStory(!1),this.dialogHelperService.close();};let n=new Do();n.disableClose=!0,n.panelClass="intro-outro-business-editor-dialog",this.dialogHelperService.open(t,X0,n),this.composerEventsService.log(this.eventsService.events.composer.bizEdit);}onBusinessItemClick(e){this.ioRef.didUserModify=!0,e.checked=!e.checked;let t;for(let n=0;n<this.ioRef.introOutroVdmObj.data.properties.details.length;n++)this.ioRef.introOutroVdmObj.data.properties.details[n].name===e.name&&(t=n);if(t!==void 0)this.ioRef.introOutroVdmObj.data.properties.details.splice(t,1);else{let n={title:e.data,asset:this.BUSINESS_ITEMS_ASSET_URL[e.name],name:e.name};this.ioRef.introOutroVdmObj.data.properties.details.push(n);}this.updateIntroOutroObj(),this.createVDMStoryAndUpdateVDMPluginStory(!1);}onSocialItemClick(e){this.ioRef.didUserModify=!0,e.checked=!e.checked;let t;for(let n=0;n<this.ioRef.introOutroVdmObj.data.properties.social.length;n++)this.ioRef.introOutroVdmObj.data.properties.social[n].name===e.name&&(t=n);if(t!==void 0)this.ioRef.introOutroVdmObj.data.properties.social.splice(t,1);else{let n={title:e.data,asset:this.SOCIAL_ITEMS_ASSET_URL[e.name],name:e.name};this.ioRef.introOutroVdmObj.data.properties.social.push(n);}this.updateIntroOutroObj(),this.createVDMStoryAndUpdateVDMPluginStory(!1);}onPlayerClicked(e){this.isVideoPlaying?this.pause():this.play();}build(){return new Promise((e,t)=>
816{this.zone.runOutsideAngular(()=>kt(this,null,function*(){try{let n=yield this.videoMakerPlugin.build();e(n);}catch(n){t(n),Qt(n);}}));});}play(e){if(e===void 0&&(e=this.currentPlayerTime>=this.ioRef.introOutroVdmObj.data.duration-this.VDM_PLAYER_END_GAP_SEC?0:this.currentPlayerTime),this.isVideoLoading){this.notifier.error("Loading video, please try again in a few seconds.");return;}else{let t=e,n=this.ioRef.introOutroVdmObj.data.duration-this.VDM_PLAYER_END_GAP_SEC;this.zone.runOutsideAngular(()=>kt(this,null,function*(){this.videoMakerPlugin.play(t,n);}));}}pause(e){return kt(this,null,function*(){return new Promise((t,n)=>{this.ngxSpinner.show("intro-outro-vdm-player-spinner"),this.isVideoLoading=!0,this.zone.runOutsideAngular(()=>{this.videoMakerPlugin.pause(e).then(()=>{t();}).catch(o=>{console.error(o),this.notifier.error("Something went wrong. Try again"),n();}).finally(()=>{this.zone.run(()=>{this.isVideoLoading=!1,this.isVideoPlaying=!1,this.ngxSpinner.hide("intro-outro-vdm-player-spinner");});});});});});}createVDMStoryAndUpdateVDMPluginStory(e=!0){return kt(this,null,function*(){let t=this.VDMAdapter.createVDMStoryAdapter({},[],{lowRes:!0,aspectRatio:this.ioRef.storyAspectRatio}),n=yp.cloneDeep(this.ioRef.introOutroVdmObj),o=yp.cloneDeep(this.storyService.introOutroBizCardTemplates);t.intro(n,o);let _=t.adaptStory();this.isVideoPlaying&&(yield this.pause()),this.videoMakerPlugin.setStory(_,{container:{width:this.vdmPreviewerWidth,height:this.vdmPreviewerHeight}}),this.isVideoLoading=!0,this.ngxSpinner.show("intro-outro-vdm-player-spinner"),this.build().then(()=>{this.isVideoLoading=!1,this.pause(this.VDM_PLAYER_THUMBNAIL_SEC),this.currentPlayerTime=0,e||this.ioRef.headerSubmitButtonText!=="Add"&&(this.ioRef.headerSubmitButtonText="Save"),this.debouncer$.next();}).catch(E=>{console.error("Error! video player could not be build",E);}).finally(()=>{this.ngxSpinner.hide("intro-outro-vdm-player-spinner");});});}ngOnDestroy(){let e=()=>{this.videoMakerPlugin&&(this.videoMakerPlugin.clear(),this.videoMakerPlugin.clearCallbacks(),this.videoMakerPlugin=void 0),this.VDMAdapter=void 0;};this.isVideoPlaying?this.pause().finally(()=>{e();}):e(),this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(En),ut(To),ut(ya),ut(co),ut(Po),ut(Ji),ut(zi),ut(en),ut(Yn));};}static{this.ɵcmp=Bt({type:i,selectors:[["intro-outro-business-card"]],inputs:{introOutroDataRef:"introOutroDataRef"},standalone:!0,features:[Ft],decls:17,vars:20,consts:[[1,"vdm-container"],["class","vdm-container-spinner-bg",4,"ngIf"],["class","vdm-container-pause",3,"click",4,"ngIf"],["class","vdm-container-play",3,"click",4,"ngIf"],["id","intro-outro-vdm-player"],[1,"business-sound-option-container"],[1,"business-sound-option-title"],[2,"font-size","12px","font-weight","bold",3,"onToggleChange","optionsArray"],[1,"business-duration-container"],[1,"business-duration-title"],[1,"business-duration-value"],[3,"valueChanged","title","format","min","max","initialValue","step"],["class","loading-business-data-spinner",4,"ngIf"],["class","business-info-container",4,"ngIf"],["class","social-info-container",4,"ngIf"],[1,"vdm-container-spinner-bg"],[1,"vdm-container-pause",3,"click"],["src","/img/composer-icons/preview-pause-icon.svg","draggable","false","alt","image"],[1,"vdm-container-play",3,"click"],["src","/img/composer-icons/preview-play-icon.svg","draggable","false","alt","image",4,"ngIf"],["name","intro-outro-vdm-player-spinner","type","cog","size","medium",3,"fullScreen","zIndex",4,"ngIf"],["src","/img/composer-icons/preview-play-icon.svg","draggable","false","alt","image"],["name","intro-outro-vdm-player-spinner","type","cog","size","medium",3,"fullScreen","zIndex"],[1,"loading-business-data-spinner"],["mode","indeterminate","diameter","50"],[1,"business-info-container"],[2,"height","35px","display","flex","align-content","center","justify-content","space-between","align-items","center","margin-bottom","15px"],[1,"business-info-title"],[2,"width","94px","height","36px","border-radius","10px","background-color","#7b8db1","color","white","font-weight","bold","margin-right","15px",3,"click"],[4,"ngIf"],[1,"business-info-items"],["class","info-item",4,"ngFor","ngForOf"],[1,"info-item"],["class","info-item-checked-img","src","/img/composer-icons/intro-sidebar-checkmark.svg","draggable","false","alt","image",4,"ngIf"],[1,"info-item-img",3,"click"],["draggable","false","alt","image",3,"src"],[1,"info-item-title"],["src","/img/composer-icons/intro-sidebar-checkmark.svg","draggable","false","alt","image",1,"info-item-checked-img"],[1,"social-info-container"],["class","social-info-title",4,"ngIf"],[1,"social-info-items"],[1,"social-info-title"]],template:function(t,n){t&1&&(be(0,"div",0),at(1,_T,1,0,"div",1)(2,bT,2,0,"div",2)(3,ET,3,2,"div",3),tt(4,"div",4),Oe(),be(5,"div",5)(6,"div",6),lt(7," Sound Option "),Oe(),be(8,"radio-buttons-group",7),Ze("onToggleChange",function(_){return n.onSoundOptionChange(_);}),Oe()(),be(9,"div",8)(10,"div",9),lt(11," Animation & Duration "),Oe(),be(12,"div",10)(13,"slider-tooltip-theme-editor",11),Ze("valueChanged",function(_){return n.onUpdateDuration(_);}),Oe()()(),at(14,xT,2,0,"div",12)(15,IT,9,3,"div",13)(16,RT,4,2,"div",14)),t&2&&(Li("height",n.vdmPreviewerHeight,"px"),Ce(),ke("ngIf",n.isVideoLoading),Ce(),ke("ngIf",n.isVideoPlaying),Ce(),ke("ngIf",!n.isVideoPlaying),Ce(),Li("width",n.vdmPreviewerWidth,"px")("height",n.vdmPreviewerHeight,"px"),Ce(4),ke("optionsArray",n.soundOptionsArray),Ce(4),ke("@slideOutMenuWithoutOverflow",void 0),Ce(),ke("title","Duration")("format","s")("min",n.MIN_DURATION)("max",n.MAX_DURATION)("initialValue",n.ioRef.introOutroVdmObj&&n.ioRef.introOutroVdmObj.data.duration||n.DEFAULT_DURATION)("step",1),Ce(),ke("ngIf",n.isLoadingBusinessData),Ce(),ke("ngIf",!n.isLoadingBusinessData),Ce(),ke("ngIf",!n.isLoadingBusinessData));},dependencies:[ui,Qa,Za,Fc,K0,Nc,Rh,an,sh],styles:[".animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.title[_ngcontent-%COMP%]{padding-top:15px;padding-bottom:5px;font-size:18px;font-weight:600;color:#253658}.sub-title[_ngcontent-%COMP%]{font-size:12px;color:#7b8db1}.media-box[_ngcontent-%COMP%]{background-color:#7b8db114;border-radius:10px}.vdm-container[_ngcontent-%COMP%]{width:100%;background-color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.vdm-container-play[_ngcontent-%COMP%]{position:absolute;z-index:26}.vdm-container-play[_ngcontent-%COMP%]:hover{background-color:#9a9aab;border-radius:30px;cursor:pointer}.vdm-container-pause[_ngcontent-%COMP%]{position:absolute;z-index:26}.vdm-container-pause[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{visibility:hidden}.vdm-container-pause[_ngcontent-%COMP%]:hover > img[_ngcontent-%COMP%]{visibility:visible;background-color:#9a9aab;border-radius:30px;cursor:pointer}.vdm-container-spinner-bg[_ngcontent-%COMP%]{background-color:#25365899;border-radius:50%;width:70px;height:70px;z-index:26;position:absolute}.intro-outro-vdm-player[_ngcontent-%COMP%]{border-radius:10px}.business-sound-option-container[_ngcontent-%COMP%]{margin-top:40px;margin-left:28px}.business-sound-option-title[_ngcontent-%COMP%]{margin-bottom:10px;font-size:14px;font-weight:600;color:#253658}.business-duration-container[_ngcontent-%COMP%]{margin-top:20px;margin-left:28px}.business-duration-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#253658;margin-bottom:15px}.business-info-container[_ngcontent-%COMP%]{margin-top:20px;margin-left:28px}.business-info-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#253658}.business-info-items[_ngcontent-%COMP%]{display:flex;flex-direction:row}.social-info-container[_ngcontent-%COMP%]{margin-top:20px;margin-left:28px;margin-bottom:25px}.social-info-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#253658;margin-bottom:15px}.social-info-items[_ngcontent-%COMP%]{display:flex;flex-direction:row}.info-item[_ngcontent-%COMP%]{margin-right:17px;position:relative}.info-item-checked-img[_ngcontent-%COMP%]{position:absolute;top:-8px;right:-8px}.info-item-img[_ngcontent-%COMP%]{width:54px;height:54px;border-radius:10px;border:solid 2px #eff0f3;display:flex;justify-content:center;align-items:center;cursor:pointer}.info-item-img[_ngcontent-%COMP%]:hover{background-color:#80808033}.info-item-img[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:34px}.info-item-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;width:54px;text-align:center;margin-top:5px}.loading-business-data-spinner[_ngcontent-%COMP%]{display:flex;justify-content:center}"],data:{animation:[Rl.slideOutMenuWithoutOverflow,Rl.rotateWithScaleUsingNgif]}});}}return i;})();Na();Ki();Mr();hi();vn();mt();lo();om();Na();var LT=["videoContainer"];function DT(i,r){i&1&&Qr(0);}function NT(i,r){if(i&1){let e=_t();ti(0),be(1,"div",8),Ze("onElementDrop",function(n){$e(e);let o=Le(2);return We(o.onFileSelection(n));})("click",function(){$e(e);let n=mi(5);return We(n.click());}),tt(2,"img",9),lt(3," Upload Video "),be(4,"input",10,4),Ze("change",function(n){$e(e);let o=Le(2);return We(o.onFileSelection(n));}),Oe()(),be(6,"div",11),lt(7," Upload your own video and use it as your intro & outro. "),Oe(),ii();}if(i&2){let e=Le(2);Ce(),ke("droppable",!0),Ce(3),ke("accept",e.ACCEPTED_UPLOAD_VIDEO_FILE_TYPES);}}function VT(i,r){if(i&1&&(ti(0),tt(1,"mat-progress-spinner",13),be(2,"div",14),lt(3),qi(4,"number"),Oe(),ii()),i&2){let e=Le(3);Ce(),ke("value",e.uploadProgress),Ce(2),hn(" Uploading: ",Ec(4,2,e.uploadProgress,"1.1-1"),"% ");}}function jT(i,r){i&1&&(ti(0),tt(1,"mat-progress-spinner",15),be(2,"div",14),lt(3," Transcoding "),Oe(),ii());}function BT(i,r){if(i&1&&(ti(0),be(1,"div",12),at(2,VT,5,5,"ng-container",7)(3,jT,4,0,"ng-container",7),Oe(),ii()),i&2){let e=Le(2);Ce(2),ke("ngIf",e.uploadStatus==="uploading"),Ce(),ke("ngIf",e.uploadStatus==="transcoding");}}function FT(i,r){if(i&1&&at(0,NT,8,2,"ng-container",7)(1,BT,4,2,"ng-container",7),i&2){let e=Le();ke("ngIf",!e.uploadStatus),Ce(),ke("ngIf",e.uploadStatus);}}function UT(i,r){i&1&&tt(0,"img",29);}function GT(i,r){if(i&1){let e=_t();be(0,"div",30),Ze("click",function(){$e(e);let n=Le(2);return We(n.onRemoveSelectedVideo());}),tt(1,"img",31),Oe();}}function zT(i,r){if(i&1){let e=_t();be(0,"div",16)(1,"div",17),Ze("click",function(n){$e(e);let o=Le();return We(o.onPlayerClicked(n));}),at(2,UT,1,0,"img",18),tt(3,"ngx-spinner",19),Oe(),at(4,GT,2,0,"div",20),be(5,"video",21),Ze("loadedmetadata",function(n){$e(e);let o=Le();return We(o.onLoadedMetadata(n));})("playing",function(n){$e(e);let o=Le();return We(o.onPlayingVideo(n));})("pause",function(n){$e(e);let o=Le();return We(o.onPlayerPaused(n));}),tt(6,"source",22),Oe()(),be(7,"div",23)(8,"div",24),lt(9),Oe(),be(10,"div",24),lt(11),qi(12,"timeMMSS"),Oe(),be(13,"div",25),lt(14,"File Name"),Oe(),be(15,"div",25),lt(16,"Duration"),Oe()(),be(17,"div",26)(18,"radio-buttons-group",27),Ze("onToggleChange",function(n){$e(e);let o=Le();return We(o.onSoundOptionChange(n));}),Oe(),be(19,"div",28),lt(20," Sound Option "),Oe()();}if(i&2){let e=Le();Ce(2),ke("ngIf",!e.isVideoPlaying&&!e.isVideoLoading),Ce(),ke("fullScreen",!1)("zIndex",1),Ce(),ke("ngIf",!e.isVideoPlaying&&!e.isVideoLoading),Ce(),Al("id",e.PLAYER_ID),Ce(),ke("src",e.videoData.previewUrl,An),Ce(3),_i(e.videoData.filename),Ce(2),hn("",Qi(12,9,e.videoData.duration),"s"),Ce(7),ke("optionsArray",e.soundOptionsArray);}}function HT(i,r){i&1&&Qr(0);}function $T(i,r){i&1&&tt(0,"mat-progress-spinner",32);}function WT(i,r){i&1&&(be(0,"div",36),lt(1," Recent Intros & Outros "),Oe());}function qT(i,r){if(i&1){let e=_t();be(0,"div")(1,"div",37)(2,"div",38),Ze("click",function(){let n=$e(e).$implicit,o=Le(2);return We(o.onMediaClick(n.assetId));}),tt(3,"img",39),Oe(),be(4,"span",40),lt(5),Oe()()();}if(i&2){let e=r.$implicit,t=Le(2);ke("@fadeIn",void 0),Ce(3),Di("selected",e.assetId===t.selectedAssetId),ke("src",e.resource.thumbnails.lower.url,An),Ce(2),_i(e.title);}}function YT(i,r){i&1&&(ti(0),tt(1,"div",44)(2,"div",44),be(3,"div",45)(4,"span"),lt(5,"MORE"),Oe()(),ii());}function XT(i,r){i&1&&(be(0,"div",46)(1,"span"),lt(2,"LESS"),Oe()());}function KT(i,r){if(i&1){let e=_t();be(0,"div",42),Ze("click",function(){$e(e);let n=Le(3);return We(n.onShowMoreAssets());}),at(1,YT,6,0,"ng-container",7)(2,XT,3,0,"div",43),Oe();}if(i&2){let e=Le(3);
816Ce(),ke("ngIf",e.recentAssets.length>e.assetsToShow),Ce(),ke("ngIf",e.recentAssets.length==e.assetsToShow);}}function ZT(i,r){if(i&1&&(ti(0),at(1,KT,3,2,"div",41),ii()),i&2){let e=Le(2);Ce(),ke("ngIf",e.recentAssets.length>=e.assetsToShow);}}function QT(i,r){if(i&1&&(at(0,WT,2,0,"div",33),be(1,"div",34),at(2,qT,6,5,"div",35),qi(3,"slice"),at(4,ZT,2,1,"ng-container",7),Oe()),i&2){let e=Le();ke("ngIf",e.recentAssets.length>0),Ce(2),ke("ngForOf",Sv(3,3,e.recentAssets,0,e.assetsToShow)),Ce(2),ke("ngIf",e.recentAssets.length>0);}}var eb=(()=>{class i{set videoContainer(e){this.showVideoContainer&&e&&!this.videoPlayerService.hasPlayer(this.PLAYER_ID)&&this.initPlayer();}constructor(e,t,n,o,_,E,x,h){this.notifier=e,this.uploadBaseService=t,this.deskManagerHelperService=n,this.composerHttpService=o,this.videoPlayerService=_,this.introOutroService=E,this.ngxSpinner=x,this.storyService=h,this.introOutroDataRef=void 0,this.PLAYER_ID="intro-outro-video-playback",this.ACCEPTED_UPLOAD_VIDEO_FILE_TYPES="video/mp4",this.AMOUNT_OF_ASSETS_TO_SHOW=5,this.DEBOUNCE_AUTOPLAY_VIDEO_MS=500,this.recentAssets=void 0,this.selectedAssetId=void 0,this.isVideoPlaying=!1,this.isVideoLoading=!1,this.showVideoContainer=!1,this.assetsToShow=this.AMOUNT_OF_ASSETS_TO_SHOW,this.isPreloadWithMediaData=!1,this.ioRef=void 0,this.unsubscribe$=new Yt(),this.debouncer$=new Yt(),this.updateSoundOptionsArray=y=>{this.soundOptionsArray.map(b=>{b.value===y?b.checked=!0:b.checked=!1;});},this.initPlayer=()=>kt(this,null,function*(){yield this.videoPlayerService.init(this.PLAYER_ID),this.videoPlayerService.setCurrentTime(this.PLAYER_ID,0),this.videoPlayerService.preload(this.PLAYER_ID,"auto"),this.videoPlayerService.autoplay(this.PLAYER_ID,!1);}),this.getRecentVideos=(y=!0)=>kt(this,null,function*(){y&&"intoOutroAssets"in this.ioRef.cachedAPIData?this.recentAssets=this.ioRef.cachedAPIData.intoOutroAssets.result:this.composerHttpService.getIntoOutroAssets().then(b=>{this.ioRef.cachedAPIData.intoOutroAssets=b,this.recentAssets=b.result,this.introOutroService.currentAssets$.next(b);}).catch(b=>{console.error("Error getting recent videos:",b),Qt(b);});}),this.onMediaClick=y=>{this.ioRef.didUserModify=!0,this.selectedAssetId=y;let b=this.recentAssets.find(p=>p.assetId===y);this.ioRef.introOutroVdmObj=this.convertAssetVideoToVdm(b,Dr.OFF),this.ioRef.introOutroObj=this.convertAssetVideoToStory(b,Dr.OFF),this.videoData={previewUrl:b.resource.streams.lower.url,filename:b.title,duration:b.resource.duration},this.setVideoPreviewPlayer();},this.setVideoPreviewPlayer=()=>{this.videoPlayerService.hasPlayer(this.PLAYER_ID)?this.videoPlayerService.src(this.PLAYER_ID,{type:"video/mp4",src:this.videoData.previewUrl}):this.showVideoContainer=!0,this.isPreloadWithMediaData?this.ioRef.headerSubmitButtonText="Save":this.ioRef.headerSubmitButtonText="Add",this.updateSoundOptionsArray("Off"),this.isVideoLoading=!0,this.ngxSpinner.show("into-outro-editor-spinner");},this.onLoadedMetadata=y=>{this.isVideoLoading=!1,this.ngxSpinner.hide("into-outro-editor-spinner"),this.videoPlayerService.loadingSpinner(this.PLAYER_ID,!1),this.debouncer$.next();},this.onPlayerClicked=y=>{this.isVideoPlaying?this.videoPlayerService.pause(this.PLAYER_ID):this.videoPlayerService.play(this.PLAYER_ID);},this.onPlayingVideo=y=>{this.isVideoPlaying=!0;},this.onPlayerPaused=y=>{this.isVideoPlaying=!1;},this.onRemoveSelectedVideo=()=>{this.ioRef.didUserModify=!0,this.showVideoContainer=!1,this.selectedAssetId=void 0,this.videoPlayerService.dispose(this.PLAYER_ID),this.isPreloadWithMediaData?this.ioRef.headerSubmitButtonText="Save":this.ioRef.headerSubmitButtonText=void 0,this.ioRef.introOutroObj=void 0,this.ioRef.introOutroVdmObj=void 0,this.updateSoundOptionsArray("Off");},this.onFileSelection=y=>kt(this,null,function*(){try{let b=[...y.target.files];this.ioRef.didUserModify=!0;let p=yield this.uploadBaseService.uploadAsset(b);this.ioRef.introOutroVdmObj=this.convertAssetVideoToVdm(p[0],Dr.OFF),this.ioRef.introOutroObj=this.convertAssetVideoToStory(p[0],Dr.OFF),this.videoData={previewUrl:p[0].resource.streams.lower.url,filename:p[0].title,duration:p[0].resource.duration},this.selectedAssetId=p[0].assetId,this.setVideoPreviewPlayer(),this.getRecentVideos(!1),this.notifier.success("Upload Complete");}catch(b){console.error(b),this.notifier.error("The video could not be uploaded"),Qt(b);return;}finally{y.target.value=null;}}
816),this.onShowMoreAssets=()=>{this.assetsToShow<this.recentAssets.length?this.assetsToShow=this.recentAssets.length:this.assetsToShow=this.AMOUNT_OF_ASSETS_TO_SHOW;},this.onSoundOptionChange=y=>{this.ioRef.didUserModify=!0;let b=c=>{switch(c){case"Off":return Dr.OFF;case"From Upload":return Dr.AUX;case"Background Music":return Dr.SOUNDBED;case"Mixed":return Dr.AUX_AND_SOUNDBED;}};this.updateSoundOptionsArray(y.value);let p=b(y.value);this.ioRef.introOutroObj.data.audioTrack=p,this.ioRef.introOutroVdmObj.data.audioTrack=p,this.isPreloadWithMediaData?this.ioRef.headerSubmitButtonText="Save":this.ioRef.headerSubmitButtonText="Add";};}get uploadStatus(){return this.uploadBaseService.progressEvent?this.uploadBaseService.progressEvent.status:void 0;}get uploadProgress(){return this.uploadBaseService.progressEvent?this.uploadBaseService.progressEvent.progress:0;}ngOnInit(){if(this.ioRef=this.introOutroDataRef,this.getRecentVideos(),this.initUploadService(),this.soundOptionsArray=[{value:"Off",name:"soundOptRb",id:"soundOptRb1",checked:!0},{value:"From Upload",name:"soundOptRb",id:"soundOptRb2",checked:!1},{value:"Background Music",name:"soundOptRb",id:"soundOptRb3",checked:!1},{value:"Mixed",name:"soundOptRb",id:"soundOptRb4",checked:!1}],this.ioRef.introOutroObj){let e=this.introOutroService.currentAssets$.getValue(),t=this.ioRef.introOutroObj.data.properties.assetId,n=e.result.find(E=>E.assetId===t);this.isPreloadWithMediaData=!0,this.selectedAssetId=this.ioRef.introOutroObj.data.properties.assetId,this.videoData={previewUrl:n.resource.streams.lower.url,filename:n.title,duration:n.resource.duration},this.showVideoContainer=!0;let _=(E=>{switch(E){case Dr.AUX:return"From Upload";case Dr.SOUNDBED:return"Background Music";case Dr.AUX_AND_SOUNDBED:return"Mixed";case Dr.OFF:default:return"Off";}})("audioTrack"in this.ioRef.introOutroObj.data?this.ioRef.introOutroObj.data.audioTrack:Dr.OFF);this.updateSoundOptionsArray(_);}this.debouncer$.pipe(On(this.DEBOUNCE_AUTOPLAY_VIDEO_MS),Pt(this.unsubscribe$)).subscribe(()=>{this.videoPlayerService.hasPlayer(this.PLAYER_ID)&&this.videoPlayerService.play(this.PLAYER_ID);});}convertAssetVideoToVdm(e,t){return{type:"video",data:{duration:e.resource.duration,audioTrack:t,url:e.resource.streams.lower.url}};}convertAssetVideoToStory(e,t){return{type:"video",data:{duration:e.resource.duration,audioTrack:t,properties:{assetId:e.assetId,details:[],head:{company:"",name:""},social:[]}},templateIds:[this.storyService.introOutroVideoTemplateId]};}ngOnDestroy(){this.videoPlayerService.dispose(this.PLAYER_ID),this.unsubscribe$.next(),this.unsubscribe$.unsubscribe();}getFolderId(){}getLevel(){return"desk";}getSubtype(){return this.ioRef.editorType==="intro"?"intro":"outtro";}getWorkSpaceId(){return this.deskManagerHelperService.getSelectedWorkspaceId();}initUploadService(){this.uploadBaseService.initData(v_.single,this.getLevel(),this.getFolderId(),this.getWorkSpaceId(),this.getSubtype());}static{this.ɵfac=function(t){return new(t||i)(ut(En),ut(Bh),ut(Lc),ut(Yn),ut(Vc),ut(as),ut(ya),ut(zi));};}static{this.ɵcmp=Bt({type:i,selectors:[["intro-outro-video"]],viewQuery:function(t,n){if(t&1&&fn(LT,5),t&2){let o;mn(o=gn())&&(n.videoContainer=o.first);}},inputs:{introOutroDataRef:"introOutroDataRef"},standalone:!0,features:[Wn([Bh]),Ft],decls:11,vars:7,consts:[["uploadContainer",""],["videoContainer",""],["loadingRecentAssets",""],["recentAssetsList",""],["fileInput",""],[1,"upload-video-container"],[4,"ngIf","ngIfThen","ngIfElse"],[4,"ngIf"],["droppableArea","",1,"video-dropbox",3,"onElementDrop","click","droppable"],["src","/img/composer-icons/upload-video-icon.svg","draggable","false","alt","image"],["type","file","aria-label","file upload",2,"display","none",3,"change","accept"],[1,"dropbox-bottom-text"],[1,"video-dropbox","mark-drop-area"],["mode","determinate","diameter","50",3,"value"],[1,"spinner-text"],["mode","indeterminate","diameter","50"],[1,"video-container"],[3,"click"],["src","/img/composer-icons/preview-play-icon.svg","class","video-container-play","draggable","false","alt","image",4,"ngIf"],["name","into-outro-editor-spinner","type","cog","size","medium",3,"fullScreen","zIndex"],["class","remove-selected-video",3,"click",4,"ngIf"],[1,"video-js","vjs-big-play-centered",3,"loadedmetadata","playing","pause","id"],[3,"src"],[1,"video-information-container"],[1,"video-information"],[1,"video-information-title"],[1,"video-sound-option-container"],[2,"font-size","12px","font-weight","bold",3,"onToggleChange","optionsArray"],[1,"video-sound-option-title"],["src","/img/composer-icons/preview-play-icon.svg","draggable","false","alt","image",1,"video-container-play"],[1,"remove-selected-video",3,"click"],["src","/img/composer-icons/intro-outro-video-remove.
816svg","draggable","false","alt","image"],["mode","indeterminate","diameter","50",2,"margin-top","50px"],["class","assets-title",4,"ngIf"],[1,"assets-container"],[4,"ngFor","ngForOf"],[1,"assets-title"],[1,"media-item"],[1,"media-thumbnail","animation-scale-down-center",3,"click"],["draggable","false","alt","image",3,"src"],[1,"media-title"],["class","assets-more-container animation-scale-down-center",3,"click",4,"ngIf"],[1,"assets-more-container","animation-scale-down-center",3,"click"],["class","media-thumbnail more-less-stacked",4,"ngIf"],[1,"media-thumbnail","more-stacked"],[1,"media-thumbnail","more-less-stacked","more-stacked"],[1,"media-thumbnail","more-less-stacked"]],template:function(t,n){if(t&1&&(be(0,"div",5),at(1,DT,1,0,"ng-container",6)(2,FT,2,2,"ng-template",null,0,Vi)(4,zT,21,11,"ng-template",null,1,Vi)(6,HT,1,0,"ng-container",6)(7,$T,1,0,"ng-template",null,2,Vi)(9,QT,5,7,"ng-template",null,3,Vi),Oe()),t&2){let o=mi(3),_=mi(5),E=mi(8),x=mi(10);ke("@fadeIn",void 0),Ce(),ke("ngIf",n.showVideoContainer)("ngIfThen",_)("ngIfElse",o),Ce(5),ke("ngIf",n.recentAssets)("ngIfThen",x)("ngIfElse",E);}},dependencies:[ui,y_,Nc,Rh,Qa,Za,Fc,an,Cv,lh,tl],styles:['.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.title[_ngcontent-%COMP%]{padding-top:15px;padding-bottom:5px;font-size:18px;font-weight:600;color:#253658}.sub-title[_ngcontent-%COMP%], .media-title[_ngcontent-%COMP%]{font-size:12px;color:#7b8db1}.media-box[_ngcontent-%COMP%], .media-thumbnail[_ngcontent-%COMP%]{background-color:#7b8db114;border-radius:10px}.upload-video-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;color:#7b8db199;font-size:12px}.video-dropbox[_ngcontent-%COMP%]{width:366px;height:214px;min-height:214px;background-color:#7b8db114;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center}.video-dropbox[_ngcontent-%COMP%] .mark-drop-area[_ngcontent-%COMP%]{cursor:default}.dropbox-bottom-text[_ngcontent-%COMP%]{margin-top:25px;width:268px;text-align:center;font-size:14px;color:#25365899}.spinner-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;color:#253658;font-size:12px;margin-top:10px}.assets-title[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:10px;padding-left:28px;font-size:14px;font-weight:600;color:#253658;align-self:start}.assets-container[_ngcontent-%COMP%]{gap:22px 17px;display:grid;grid-template-columns:1fr 1fr 1fr;margin-left:10px;margin-right:10px;margin-bottom:75px}.media-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column}.media-thumbnail[_ngcontent-%COMP%]{width:134px;height:90px;cursor:pointer;box-shadow:#11111a1a 0 4px 16px,#11111a1a 0 8px 24px,#11111a1a 0 16px 56px}.media-thumbnail[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:inherit;height:inherit;object-fit:cover;border-radius:10px}.media-thumbnail[_ngcontent-%COMP%] > img[src$=".svg"][_ngcontent-%COMP%]{all:unset}.selected[_ngcontent-%COMP%]{border:4px solid rgb(0,171,254)}.media-title[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px;align-self:start;padding-top:2px;-webkit-user-select:text;user-select:text;word-break:break-all}.assets-more-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;height:90px!important}.more-stacked[_ngcontent-%COMP%]:nth-child(1){margin-left:20px;background-color:#00abfe;width:calc(134px - 20%)!important;height:calc(90px - 30%)!important;background-size:cover}.more-stacked[_ngcontent-%COMP%]:nth-child(2){position:absolute;margin-left:11px;background-color:#0077b1;width:calc(134px - 20%)!important;height:calc(90px - 15%)!important}.more-stacked[_ngcontent-%COMP%]:nth-child(3){width:109px!important}.more-less-stacked[_ngcontent-%COMP%]{background-color:#253658;color:#fff;font-weight:700;font-size:13px;display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute}.video-container[_ngcontent-%COMP%]{position:relative;border-radius:15px;overflow:hidden;box-shadow:0 0 10px #0000002e;width:366px;background-color:#7b8db114;border:1px solid rgba(123,141,177,.08)}.video-container[_ngcontent-%COMP%]:hover{cursor:pointer}.video-container-play[_ngcontent-%COMP%]{left:50%;
816top:50%;transform:translate(-50%,-50%);z-index:1;position:absolute;width:60px;height:60px;-webkit-user-select:none;user-select:none}.video-container-play[_ngcontent-%COMP%]:hover{background-color:#9a9aab;border-radius:30px;width:59px;height:59px;cursor:pointer}.remove-selected-video[_ngcontent-%COMP%]{position:absolute;top:5px;right:5px;z-index:999;background-color:#80808033;border-radius:15px}.remove-selected-video[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:#808080cc}.video-information-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 70px;grid-template-rows:1fr 1fr;gap:0px 15px;width:366px;font-size:12px;font-weight:700;margin-top:20px}.video-information[_ngcontent-%COMP%]{height:36px;line-height:36px;background-color:#f5f6f9;border-radius:10px;border:none;color:#25365899;padding-left:10px;-webkit-user-select:text;user-select:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.video-information-title[_ngcontent-%COMP%]{padding-left:10px}.video-sound-option-container[_ngcontent-%COMP%]{width:366px}.video-sound-option-title[_ngcontent-%COMP%]{font-weight:700;padding-left:10px}.intro-upload-video-wrapper[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 60px);left:calc(50% - 44px);display:flex;flex-direction:column;color:#7b8db199;cursor:pointer;z-index:-1}.intro-upload-video-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.intro-upload-video-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.upload-dialog-content-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;padding:0;align-items:flex-end;margin-left:0;margin-right:0;width:auto}.upload-dialog-background-align[_ngcontent-%COMP%]{max-width:100%;width:100%;position:relative}.upload-background-spinner[_ngcontent-%COMP%]{z-index:9;left:calc(50% - 25px);top:calc(50% - 35px);position:absolute!important}.upload-asset-proposal-container[_ngcontent-%COMP%]{height:96px!important;width:auto;display:flex;justify-content:center;align-items:center;margin:0;max-width:100%;width:100%;border-radius:3px}.pages-assets-logo-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;object-fit:contain}.upload-background-image[_ngcontent-%COMP%]{object-fit:fill;border-radius:3px;opacity:.8}.edit-strip-text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#000;max-width:235px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.file-input-button[_ngcontent-%COMP%]{width:100%;height:100%!important}'],data:{animation:[Rl.fadeIn]}});}}return i;})();hi();mt();Bn();var JT=["unsavedChangesDialog"];function eC(i,r){if(i&1){let e=_t();be(0,"div")(1,"button",11),Ze("click",function(n){$e(e);let o=Le();return We(o.onHeaderSubmitButtonClick(n));}),lt(2),Oe()();}if(i&2){let e=Le();ke("@fadeIn",void 0),Ce(2),hn(" ",e.introOutroDataRef.headerSubmitButtonText," ");}}function tC(i,r){i&1&&Qr(0);}function iC(i,r){if(i&1&&tt(0,"intro-outro-video",12),i&2){let e=Le();ke("introOutroDataRef",e.introOutroDataRef);}}function nC(i,r){if(i&1&&tt(0,"intro-outro-business-card",12),i&2){let e=Le();ke("introOutroDataRef",e.introOutroDataRef);}}function rC(i,r){if(i&1){let e=_t();be(0,"h2",13),lt(1,"Save changes?"),Oe(),be(2,"mat-dialog-content")(3,"p"),lt(4),Oe()(),be(5,"div",14)(6,"button",15),Ze("click",function(){$e(e);let n=Le();return We(n.onDialogDiscardChangesClick());}),lt(7," Cancel "),Oe(),be(8,"button",16),Ze("click",function(){$e(e);let n=Le();return We(n.onDialogSaveChangesClick());}),lt(9," Save "),Oe()();}if(i&2){let e=Le();Ce(4),hn(" Unsaved changes on ",e.introOutroDataRef.editorType," will be discarded ");}}var tb=(()=>{class i{constructor(e,t){this.dialog=e,this.cdRef=t,this.headerTitleText="",this.closeIntroOutroEditor=new Mi(),this.submitIntroOutroEditor=new Mi(),this.introOutroDataRef=void 0,this.introOutroVideo=void 0,this.introOutroBizCard=void 0,this.mediaTypeToMediaValueHelper=n=>{switch(n){case"video":return"Upload Video";
816case"aux/card/generic":return"Business Card";}},this.mediaValueToMediaTypeHelper=n=>{switch(n){case"Upload Video":return"video";case"Business Card":return"aux/card/generic";}},this.mediaOptionsArray=[{value:"Business Card",name:"introOutroMediaRb",id:"businessMediaRb1",checked:!1},{value:"Upload Video",name:"introOutroMediaRb",id:"uploadMediaRb2",checked:!1}];}hotfix_toggleVisuals(e=!1){{let t=document.querySelectorAll(".media-toggle label");Array.from(t).forEach(n=>{n.style.fontSize="12px";}),document.querySelector(".media-toggle .toggle-group-container").style.height="48px";}this.mediaOptionsArray.map(t=>{t.checked?document.querySelector(`.media-toggle label[for=${t.id}]`).style.fontWeight="bold":document.querySelector(`.media-toggle label[for=${t.id}]`).style.fontWeight="normal";}),document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[0].id}]`).style.paddingRight="10px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[0].id}]`).style.marginRight="5px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[1].id}]`).style.paddingRight="10px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[1].id}]`).style.marginRight="5px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[0].id}]`).style.paddingLeft="10px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[1].id}]`).style.marginLeft="5px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[0].id}]`).style.marginLeft="5px",document.querySelector(`.media-toggle label[for=${this.mediaOptionsArray[1].id}]`).style.paddingLeft="10px";}ngOnInit(){switch(this.headerTitleText=`Add ${this.introOutroDataRef.editorType}`,this.introOutroDataRef.mediaType){case"video":this.introOutroVideo=Dm.cloneDeep(this.introOutroDataRef),this.introOutroBizCard={editorType:this.introOutroDataRef.editorType,mediaType:"aux/card/generic",introOutroObj:void 0,introOutroVdmObj:void 0,storyAspectRatio:this.introOutroDataRef.storyAspectRatio,cachedAPIData:{}},this.introOutroDataRef=this.introOutroVideo;break;case"aux/card/generic":this.introOutroBizCard=Dm.cloneDeep(this.introOutroDataRef),this.introOutroVideo={editorType:this.introOutroDataRef.editorType,mediaType:"video",introOutroObj:void 0,introOutroVdmObj:void 0,storyAspectRatio:this.introOutroDataRef.storyAspectRatio,cachedAPIData:{}},this.introOutroDataRef=this.introOutroBizCard;break;}let e=this.mediaTypeToMediaValueHelper(this.introOutroDataRef.mediaType);this.mediaOptionsArray.map(t=>{t.checked=t.value===e;});}ngAfterViewInit(){this.hotfix_toggleVisuals(),this.cdRef.detectChanges();}onCloseButtonClick(e){this.introOutroDataRef.didUserModify?this.unsavedChangesDialogRef=this.dialog.open(this.unsavedChangesTemplateRef,{hasBackdrop:!0,position:{left:"180px"},width:"260px",panelClass:"intro-outro-editor-unsaved-dialog"}):this.closeIntroOutroEditor.emit(this.introOutroDataRef.editorType);}onHeaderSubmitButtonClick(e){this.submitIntroOutroEditor.emit(this.introOutroDataRef);}onMediaTypeChange(e){switch(this.mediaValueToMediaTypeHelper(e.value)){case"video":this.introOutroDataRef=this.introOutroVideo;break;case"aux/card/generic":this.introOutroDataRef=this.introOutroBizCard;break;}this.mediaOptionsArray.map(n=>{n.checked=n.value===e.value;}),this.hotfix_toggleVisuals(!0);}onDialogDiscardChangesClick(){this.unsavedChangesDialogRef.close(),pa(!0).pipe(zr(1),$s(150),Go(()=>{this.closeIntroOutroEditor.emit(this.introOutroDataRef.editorType);})).subscribe();}onDialogSaveChangesClick(){this.unsavedChangesDialogRef.close(),this.onHeaderSubmitButtonClick(void 0);}ngOnDestroy(){}static{this.ɵfac=function(t){return new(t||i)(ut(Ja),ut(Ks));};}static{this.ɵcmp=Bt({type:i,selectors:[["intro-outro-editor"]],viewQuery:function(t,n){if(t&1&&fn(JT,5),t&2){let o;mn(o=gn())&&(n.unsavedChangesTemplateRef=o.first);}},inputs:{introOutroDataRef:"introOutroDataRef"},outputs:{closeIntroOutroEditor:"closeIntroOutroEditor",submitIntroOutroEditor:"submitIntroOutroEditor"},standalone:!0,features:[Ft],decls:16,vars:8,consts:[["introOutroVideo",""],["introOutroBusinessCard",""],["unsavedChangesDialog",""],[1,"header"],[1,"header-close-button",3,"click"],["src","/img/composer-icons/actions-close-white.svg","draggable","false","alt","image"],[1,"header-title"],[4,"ngIf"],[1,"editor-body"],[1,"media-toggle",3,"onToggleChange","optionsArray"],[4,"ngIf","ngIfThe
816n","ngIfElse"],[1,"header-submit-button",3,"click"],[1,"editor-body-templates",3,"introOutroDataRef"],["matDialogTitle","",2,"margin","0 0 10px"],["mat-dialog-actions","",2,"justify-content","space-between","padding-bottom","15px"],[1,"unsaved-cancel-button",3,"click"],[1,"unsaved-save-button",3,"click"]],template:function(t,n){if(t&1){let o=_t();be(0,"div",3)(1,"button",4),Ze("click",function(E){return $e(o),We(n.onCloseButtonClick(E));}),tt(2,"img",5),Oe(),be(3,"span",6),lt(4),qi(5,"titlecase"),Oe(),at(6,eC,3,2,"div",7),Oe(),be(7,"div",8)(8,"radio-buttons-group",9),Ze("onToggleChange",function(E){return $e(o),We(n.onMediaTypeChange(E));}),Oe(),at(9,tC,1,0,"ng-container",10)(10,iC,1,1,"ng-template",null,0,Vi)(12,nC,1,1,"ng-template",null,1,Vi)(14,rC,10,1,"ng-template",null,2,Vi),Oe();}if(t&2){let o=mi(11),_=mi(13);Ce(4),_i(Qi(5,6,n.headerTitleText)),Ce(2),ke("ngIf",n.introOutroDataRef.headerSubmitButtonText),Ce(2),ke("optionsArray",n.mediaOptionsArray),Ce(),ke("ngIf",n.mediaOptionsArray[0].checked)("ngIfThen",_)("ngIfElse",o);}},dependencies:[ui,Fc,eb,J0,Ph,Th,Oh,Ch,sh],styles:["*[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.header[_ngcontent-%COMP%]{background-color:#253658;width:500px;height:64px;color:#fff;display:flex;align-items:center;justify-content:space-between;font-weight:700}.header-close-button[_ngcontent-%COMP%]{margin-left:5px;width:24px}.header-close-button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]:hover{background-color:#fff3;border-radius:24px}.header-title[_ngcontent-%COMP%]{font-size:18px;margin-left:15px;flex-grow:1}.header-submit-button[_ngcontent-%COMP%]{width:63px;height:36px;border-radius:10px;background-color:#00abfe;margin-right:12px;color:#fff}.media-toggle[_ngcontent-%COMP%]{margin-top:30px;margin-bottom:30px;display:flex;justify-content:center}.editor-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:500px}.editor-body-templates[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;min-height:0px;max-height:calc(100vh - 260px)}.unsaved-cancel-button[_ngcontent-%COMP%]{width:96px;height:36px;border-radius:10px;color:#fff;font-weight:700;font-size:12px;background-color:#253658;opacity:.3}.unsaved-save-button[_ngcontent-%COMP%]{width:96px;height:36px;border-radius:10px;color:#fff;font-weight:700;font-size:12px;background-color:#00d096;color:#fff!important;opacity:.7}"],data:{animation:[Rl.fadeIn]}});}}return i;})();Ki();Mr();es();mt();Or();var Xc={editorType:void 0,view:"options"},vp=(()=>{class i{constructor(e,t,n,o,_,E){if(this.storyService=e,this.introOutroService=t,this.savePromptGuardService=n,this.eventsService=o,this.composerEventsService=_,this.store=new yr(Xc),this.state$=this.store.asObservable(),this.unsubscribe$=new Yt(),this.editorType$=this.state$.pipe(oi(x=>x.editorType),Ti(),Ri({refCount:!0,bufferSize:1})),this.view$=this.state$.pipe(oi(x=>x.view),Ti(),Ri({refCount:!0,bufferSize:1})),this.sidebarIntroOutroModalViewModel$=Vn([this.view$,this.editorType$,this.introOutroService.inOutroDataModel$]).pipe(oi(([x,h,y])=>{let b=h==="intro"?y.intro.obj:y.outro.obj,p=h==="intro"?y.intro.vdmObj:y.outro.vdmObj,c=b?b.type:"aux/card/generic";return{introOutroData:{editorType:h,mediaType:c,introOutroObj:b,introOutroVdmObj:p,storyAspectRatio:this.storyService.story.aspectRatio,cachedAPIData:{},headerSubmitButtonText:void 0},introThumbnailUrl:y.intro.thumbnail,outroThumbnailUrl:y.outro.thumbnail,view:x};})),E)throw new Error("SidebarIntroOutroModalService is already loaded");}updateState(e){Xc=e,this.store.next(Xc);}openEditor(e){this.updateState(ei(Xc,t=>{t.editorType=e,t.view="editor";})),e==="intro"?this.composerEventsService.log(this.eventsService.events.composer.introStart):e==="outro"&&this.composerEventsService.log(this.eventsService.events.composer.outroStart);}closeEditor(){this.updateState(ei(Xc,e=>{e.editorType=void 0,e.view="options";}));}onCloseEditor(e){this.closeEditor(),e==="intro"?this.composerEventsService.log(this.eventsService.events.composer.introCancel):e==="outro"&&this.composerEventsService.log(this.eventsService.events.composer.outroCancel);}onSubmitEditor(e){if(this.introOutroService.updateIntroOutro(e.editorType,e.introOutroObj),e.introOutroObj===void 0)e.editorType==="intro"?this.composerEventsService.log(this.eventsService.events.composer.introRemove,{type:e.editorType}):e.editorType==="outro"&&this.composerEventsService.log(this.eventsService.events.composer.outroRemove,{type:e.editorType});else{let t=e.mediaType==="video"?"upload":"biz card";e.editorType==="intro"?this.composerEventsService.log(this.eventsService.events.composer.introSave,{type:t}):e.editorType==="outro"&&this.composerEventsService.log(this.eventsService.events.composer.outroSave,{type:t});}this.savePromptGuardService.isDirty.next(!0),this.closeEditor();}ngOnDestroy(){Xc={editorType:void 0,view:"options"},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(as),Rt(So),Rt(Ji),Rt(en),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();Mr();mt();Bn();hi();function aC(i,r){i&1&&Qr(0);}function sC(i,r){if(i&1){let e=_t();be(0,"div",17),Ze("click",function(){$e(e);let n=Le(3);return We(n.sidebarIntroOutroModalService.onSubmitEditor({editorType:"intro"}));}),Oe();}}function lC(i,r){if(i&1&&tt(0,"img",18),i&2){let e=Le(2).ngIf;
816ke("src",e.introThumbnailUrl,An);}}function cC(i,r){i&1&&tt(0,"img",19);}function uC(i,r){if(i&1){let e=_t();be(0,"div",17),Ze("click",function(){$e(e);let n=Le(3);return We(n.sidebarIntroOutroModalService.onSubmitEditor({editorType:"outro"}));}),Oe();}}function dC(i,r){if(i&1&&tt(0,"img",18),i&2){let e=Le(2).ngIf;ke("src",e.outroThumbnailUrl,An);}}function hC(i,r){i&1&&tt(0,"img",19);}function pC(i,r){if(i&1){let e=_t();be(0,"div",4)(1,"div",5)(2,"div",6),Ze("click",function(){$e(e);let n=Le(2);return We(n.close());}),Oe(),be(3,"div",7)(4,"div",8),lt(5,"Intro & Outro"),Oe()()(),be(6,"div",9)(7,"div",10)(8,"div",11),at(9,sC,1,0,"div",12),be(10,"div",13),Ze("click",function(){$e(e);let n=Le(2);return We(n.sidebarIntroOutroModalService.openEditor("intro"));}),at(11,lC,1,1,"img",14)(12,cC,1,0,"img",15),Oe(),be(13,"div",16),lt(14,"Intro"),Oe()(),be(15,"div",11),at(16,uC,1,0,"div",12),be(17,"div",13),Ze("click",function(){$e(e);let n=Le(2);return We(n.sidebarIntroOutroModalService.openEditor("outro"));}),at(18,dC,1,1,"img",14)(19,hC,1,0,"img",15),Oe(),be(20,"div",16),lt(21,"Outro"),Oe()()()()();}if(i&2){let e=Le().ngIf;Ce(8),Di("animation-scale-down-center",!e.introThumbnailUrl),Ce(),ke("ngIf",e.introThumbnailUrl),Ce(2),ke("ngIf",e.introThumbnailUrl),Ce(),ke("ngIf",!e.introThumbnailUrl),Ce(3),Di("animation-scale-down-center",!e.introThumbnailUrl),Ce(),ke("ngIf",e.outroThumbnailUrl),Ce(2),ke("ngIf",e.outroThumbnailUrl),Ce(),ke("ngIf",!e.outroThumbnailUrl);}}function fC(i,r){if(i&1){let e=_t();be(0,"intro-outro-editor",20),Ze("closeIntroOutroEditor",function(n){$e(e);let o=Le(2);return We(o.sidebarIntroOutroModalService.onCloseEditor(n));})("submitIntroOutroEditor",function(n){$e(e);let o=Le(2);return We(o.sidebarIntroOutroModalService.onSubmitEditor(n));}),Oe();}if(i&2){let e=Le().ngIf;ke("introOutroDataRef",e.introOutroData);}}function mC(i,r){if(i&1&&(ti(0),at(1,aC,1,0,"ng-container",3)(2,pC,22,10,"ng-template",null,0,Vi)(4,fC,1,1,"ng-template",null,1,Vi),ii()),i&2){let e=r.ngIf,t=mi(3),n=mi(5);Ce(),ke("ngIf",e.view==="options")("ngIfThen",t)("ngIfElse",n);}}var ib=(()=>{class i extends Fn{constructor(e,t,n,o){super(o),this.dialogRef=e,this.sidebarIntroOutroModalService=t,this.sidebarService=n,this.data=o,this.unsubscribe$=new Yt(),this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}ngOnInit(){this.viewModel$=this.sidebarIntroOutroModalService.sidebarIntroOutroModalViewModel$,this.viewModel$.pipe(Ws("view"),Pt(this.unsubscribe$)).subscribe(()=>{this.sidebarService.repositionCurrentModal();});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(vp),ut(Hr),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-intro-outro-modal"]],standalone:!0,features:[Wn([vp]),Mn,Ft],decls:2,vars:3,consts:[["introOutroOptions",""],["introOutroEditor",""],[4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],[1,"intro-outro-modal"],[1,"header-container"],[1,"close-button",3,"click"],[1,"header-title"],[1,"header-text"],[1,"body-container"],[1,"intro-outro-options"],[1,"item"],["class","item-badge",3,"click",4,"ngIf"],[1,"item-icon",3,"click"],["class","video-thumbnail","draggable","false","alt","image",3,"src",4,"ngIf"],["class","option-thumbnail","src","img/composer/intro-outro-modal/add.svg","draggable","false","alt","image",4,"ngIf"],[1,"item-label"],[1,"item-badge",3,"click"],["draggable","false","alt","image",1,"video-thumbnail",3,"src"],["src","img/composer/intro-outro-modal/add.svg","draggable","false","alt","image",1,"option-thumbnail"],[3,"closeIntroOutroEditor","submitIntroOutroEditor","introOutroDataRef"]],template:function(t,n){t&1&&(at(0,mC,6,3,"ng-container",2),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[Ci,ui,ir,Nc,tb],styles:['.intro-outro-modal[_ngcontent-%COMP%]{min-width:520px;min-height:227px;padding:32px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.body-container[_ngcontent-%COMP%]{margin-top:18px}.intro-outro-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:34px}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;
816cursor:pointer}.item[_ngcontent-%COMP%]:hover .item-icon[_ngcontent-%COMP%]{background-color:#00abfe14}.item-badge[_ngcontent-%COMP%]{width:20px;height:20px;background-color:#00d096;border-radius:10px;position:absolute;margin-left:94px;margin-top:-8px;cursor:pointer}.item-badge[_ngcontent-%COMP%]:hover:after{content:"";width:12px;height:1.5px;background:#fff;display:block;position:relative;top:9px;left:4px;border-radius:5px}.item-badge[_ngcontent-%COMP%]:hover{box-shadow:0 0 10px #0000004d;background-color:#ff4d5b}.item-icon[_ngcontent-%COMP%]{width:96px;height:96px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:10px;background-color:#7b8db114}.video-thumbnail[_ngcontent-%COMP%]{width:inherit;height:inherit;object-fit:cover}.option-thumbnail[_ngcontent-%COMP%]{width:21;height:21}.item-label[_ngcontent-%COMP%]{font-size:12px}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}']});}}return i;})();mt();hi();Bn();Ki();_r();Oo();Ki();Mr();es();nm();rm();mt();Js();Or();Xu();Na();var Jr={customPalette:void 0,paletteEditor:void 0,themesLibrary:[],themeId:void 0,paletteId:void 0,animationId:void 0,randomRotation:void 0,themeIdx:0},Nm=()=>Ti((i,r)=>JSON.stringify(i)===JSON.stringify(r)),ll=(()=>{class i{constructor(e,t,n,o,_,E,x,h,y){if(this.storyService=e,this.videoSlidesService=t,this.planHelperService=n,this.businessColorPaletteService=o,this.eventsService=_,this.premiumPlanService=E,this.composerEventsService=x,this.ngxSpinner=h,this.store=new yr(Jr),this.state$=this.store.asObservable(),this.themesLibrary$=this.state$.pipe(oi(p=>p.themesLibrary),Nm(),Ri({refCount:!0,bufferSize:1})),this.themeId$=this.state$.pipe(oi(p=>p.themeId),Ti(),Ri({refCount:!0,bufferSize:1})),this.paletteId$=this.state$.pipe(oi(p=>p.paletteId),Ti(),Ri({refCount:!0,bufferSize:1})),this.customPalette$=this.state$.pipe(oi(p=>p.customPalette),Nm(),Ri({refCount:!0,bufferSize:1})),this.paletteEditor$=this.state$.pipe(oi(p=>p.paletteEditor),Nm(),Ri({refCount:!0,bufferSize:1})),this.themeIdx$=this.state$.pipe(oi(p=>p.themeIdx),Ti(),Ri({refCount:!0,bufferSize:1})),this.animationId$=this.state$.pipe(oi(p=>p.animationId),Ti(),Ri({refCount:!0,bufferSize:1})),this.randomRotation$=this.state$.pipe(oi(p=>p.randomRotation),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.customPaletteDisabled=!0,this.sidebarThemesModalViewModel$=Vn([this.themeId$,this.paletteId$,this.customPalette$,this.paletteEditor$,this.animationId$,this.randomRotation$]).pipe(dv(this.themesLibrary$,this.themeIdx$),oi(([[p,c,d,m,a,s],l,g])=>({themes:l,selectedThemeId:p,palettes:l[g]?.paletteLibrary??[],customPalette:d,paletteEditor:m,selectedPaletteId:c,customPaletteDisabled:this.customPaletteDisabled,animations:this.animationOptions,selectedAnimationId:a,randomRotation:s}))),y)throw new Error("SidebarThemesModalService is already loaded");let b={highlightWord:"img/composer/theme-modal/highlight.json",boxHighlight:"img/composer/theme-modal/box-fixed.json",reveal:"img/composer/theme-modal/word-reveal.json",singleWord:"img/composer/theme-modal/single-word.json"};this.animationOptions=[];for(let[p,c]of Object.entries(b))this.animationOptions.push({id:p,thumbnail:c});this.planHelperService.organizationPlanUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(p=>kt(this,null,function*(){this.planHelperService.isProOrTeamOrMaxByCurrentPlan().then(c=>{this.customPaletteDisabled=!c;});})),this.storyService.hotfix_themesListUpdated$.pipe(sn(p=>p!==void 0&&!!this.storyService.story),iv(p=>Jr.themeId===void 0?this.planHelperService.isProOrTeamOrMaxByCurrentPlan().then(c=>(this.customPaletteDisabled=!c,p)):pa(p)),Pt(this.unsubscribe$)).subscribe(p=>{let c=[],d=[],m;for(let v of p){if(!v.textPreviewUrl?.dark)continue;let S=[];if(v.variations)for(let w=0;w<v.variations.length;w++){let C=v.variations[w],I={name:C.name,colors:C.preview.colors,thumbnail:C.preview.thumbnailUrl,id:C.id};S.push(I);}c.push({name:v.name,thumbnail:v.textPreviewUrl?.dark,overlay:v.thumbnailUrl&&v.thumbnailUrl!==""?v.thumbnailUrl:void 0,paletteLibrary:S,id:v.themeId,index:c.length}),d.push(v.themeId),v.options.isDefault&&(m=v.themeId);}let a=d.includes(this.storyService.story.themeId)?this.storyService.story.themeId:m,s=c.find(v=>v.id===a),l=this.getCustomPalette(),g=this.storyService.story.themeVariationId,f=this.animationOptions.find(v=>v.id===this.storyService.story.metadata?.speechSyncAnimation);f===void 0&&this.storyService.updateSpeechSyncAnimationId(),this.updateState(ei(Jr,v=>{v.themesLibrary=c,v.themeId=a,v.themeIdx=s.index,v.paletteId=g,v.animationId=f?f.id:void 0,v.customPalette=l;}));}),this.storyService.hotfix_themeGotUpdated$.pipe(sn(()=>!!this.storyService.story),Pt(this.unsubscribe$)).subscribe(()=>{let p=this.getCustomPalette();this.updateState(ei(Jr,c=>{c.customPalette=p;}));}),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(sn(()=>!!this.storyService.story),Pt(this.unsubscribe$)).subscribe(p=>kt(this,null,function*(){this.storyService.story.composerSessionState.themesChangeMadeByUndoRedo=!0;let c=this.storyService.getThemeCustomVariation();JSON.stringify(p.customVariation)!==JSON.stringify(c)&&(p.customVariation.id=c.id,p.customVariation.themeBrandId=c.themeBrandId,this.storyService.setThemeCustomVariation(p.customVariation),this.storyService.updateThemeCustomVariation());let m=this.store.getValue().themesLibrary.find(g=>g.id===p.story.themeId),a=p.story.themeVariationId?p.story.themeVariationId:m.paletteLibrary[0]?.id,s=this.getCustomPalette(),l=this.animationOptions.find(g=>g.id===this.storyService.story.metadata?.speechSyncAnimation);l===void 0&&this.storyService.updateSpeechSyncAnimationId(),this.updateState(ei(Jr,g=>{g.themeId=p.story.themeId,g.themeIdx=m.index,g.paletteId=a,g.animationId=l?l.id:void 0,g.customPalette=s;}));})),this.updateState(ei(Jr,p=>{p.randomRotation=this.storyService.isRandomRotationEnabled();}));}updateState(e){Jr=e,this.store.next(Jr);}modifyColorInCustomPalette(e,t){let n=this.store.getValue();this.updateState(ei(Jr,o=>{o.customPalette.colors[e]=t;})),this.storyService.updateCustomPaletteColor(e,t),this.storyService.updateThemeCustomVariation(!0),this.composerEventsService.log(this.eventsService.events.composer.closePaletteEditor,{themeName:this.storyService.themeName,parameterName:this.storyService.getCustomParameterName(e),isChanged:n.customPalette.colors[e]!==t});}closePaletteEditor(){this.updateState(ei(Jr,e=>{e.paletteEditor=void 0;}));}openPaletteEditor(e,t){this.businessColorPaletteService.setBusiness(this.storyService.hotfix_businessDataUpdated$.getValue());let n=e.target.nodeName==="IMG"?e.target.parentElement:e.target;this.updateState(ei(Jr,o=>{o.paletteEditor={colorIdx:t,color:o.customPalette.colors[t],position:{left:n.offsetLeft+25,top:n.offsetTop}};})),this.composerEventsService.log(this.eventsService.events.composer.openPaletteEditor,{themeName:this.storyService.themeName,parameterName:this.storyService.getCustomParameterName(t)});}selectCustomPalette(e){if(this.customPaletteDisabled){let t=()=>{this.planHelperService.isProOrTeamOrMaxByCurrentPlan().then(n=>{this.customPaletteDisabled=!n,n&&this.updateState(ei(Jr,o=>{o.paletteId=e;}));});};this.storyService.story.storyId===void 0&&(this.ngxSpinner.show("subscription-spinner"),this.videoSlidesService.saveAndGenerateVideo$.next(!1)),Il(100).pipe(zr(300),Jd(()=>this.storyService.story.storyId===void 0),Zd(()=>{this.ngxSpinner.hide("subscription-spinner");let n=window.location.pathname.replace(/^\/|\/$/g,"");this.premiumPlanService.openPricingDialog(Mc.PRO,n,n,Rc.videoMakerColors,t);})).subscribe(()=>{});}else e===this.storyService.CUSTOM_VARIATION_ID?this.storyService.createThemeCustomVariation().then(t=>
816{this.storyService.updateThemeVariationId(t,!0),this.updateState(ei(Jr,n=>{n.customPalette.id=t,n.paletteId=t;}));}):(this.storyService.updateThemeVariationId(e,!0),this.updateState(ei(Jr,t=>{t.paletteId=e;}))),this.composerEventsService.log(this.eventsService.events.composer.selectPalette,{themeName:this.storyService.themeName,variationName:this.storyService.getVariationName(this.storyService.story.themeVariationId)});}selectPalette(e){this.storyService.updateThemeVariationId(e,!0),this.updateState(ei(Jr,t=>{t.paletteId=e;})),this.composerEventsService.log(this.eventsService.events.composer.selectPalette,{themeName:this.storyService.themeName,variationName:this.storyService.getVariationName(this.storyService.story.themeVariationId)});}selectTheme(e){this.composerEventsService.log(this.eventsService.events.composer.themeChange,{themeId:e});let n=this.store.getValue().themesLibrary.find(_=>_.id===e),o=n.paletteLibrary[0]?.id;this.updateState(ei(Jr,_=>{_.themeId=e,_.themeIdx=n.index,_.paletteId=o;})),this.ngxSpinner.show("composer-vdm-spinner").finally(()=>this.storyService.updateThemeId(e,o));}selectAnimation(e){this.storyService.updateSpeechSyncAnimationId(e),this.updateState(ei(Jr,t=>{t.animationId=e;})),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarThemesModalService$->selectAnimation$",buildAgain:!0,changeMade:!0});}selectRandomRotation(e){this.storyService.updateRandomRotation(e),this.updateState(ei(Jr,t=>{t.randomRotation=e;})),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarThemesModalService$->selectRandomRotation$",buildAgain:!0,changeMade:!0});}getCustomPalette(){let e=this.storyService.getThemeCustomVariation();return{colors:[...e.preview.colors],id:e.id,thumbnail:"",name:e.name};}ngOnDestroy(){Jr={customPalette:void 0,paletteEditor:void 0,themesLibrary:[],themeId:void 0,paletteId:void 0,animationId:void 0,randomRotation:void 0,themeIdx:0},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(Po),Rt(E_),Rt(Ji),Rt(ts),Rt(en),Rt(ya),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();hi();var gC=/^\s*\{\{\s*style\.colors\.(.+?)\s*\}\}\s*$/,yC=/^(textStyles|colors)\[(\d+)\]$/,vC=/^(textStyle|color)(\d+)$/;function _C(i,r){let e=i?gC.exec(i):void 0;return e?r?bC(e[1],r):void 0:i;}function rb(i,r){let e=i?.[0]?.color;return e?_C(e,r):void 0;}function bC(i,r){if(i==="background")return r.background;if(i==="text")return r.text;let e=yC.exec(i);if(e)return(e[1]==="textStyles"?r.textStyles:r.colors)?.[Number(e[2])];let t=vC.exec(i);if(t)return(t[1]==="textStyle"?r.textStyles:r.colors)?.[Number(t[2])-1];}var SC=16,Sp=1080,wC=.05,EC=.5,xC=/\.(ttf|otf|woff2?)$/i,TC={UPPER:"uppercase",LOWER:"lowercase",TITLE:"capitalize"},CC="rgba(0,0,0,0.5)";function sb(i){let{style:r,palette:e,fontFamily:t}=i,n=i.tileFontPx??SC,o=LC(r),_=x=>x/o*n,E=AC(r,e);return{text:OC({style:r,fontFamily:t,tileFontPx:n,toTile:_}),plate:E?kC(r,E,_):{},hasPlate:!!E,ink:E&&!NC(E)?"light":"dark"};}function OC(i){let{style:r,fontFamily:e,tileFontPx:t,toTile:n}=i,o={"font-size":`${t}px`},_=e??DC(r?.font);_&&(o["font-family"]=`'${_}', 'Inter', sans-serif`),r?.fontWeight&&(o["font-weight"]=String(r.fontWeight)),r?.fontStyle&&(o["font-style"]=r.fontStyle);let E=TC[r?.textCase];E&&(o["text-transform"]=E),bp(r?.letterSpacing)&&(o["letter-spacing"]=`${r.letterSpacing}em`),PC({text:o,style:r,tileFontPx:t,toTile:n});let x=IC(r?.effects,n);return x&&(o["text-shadow"]=x),o;}function PC(i){let{text:r,style:e,tileFontPx:t,toTile:n}=i,o=e?.strokeWeight;if(!bp(o)||o<0||!e?.strokes?.[0]?.color)return;let _=Math.min(n(o*Sp),t*EC);bp(_)&&(r["-webkit-text-stroke-width"]=Zc(_),r["paint-order"]="stroke fill");}function IC(i,r){let e=i?.find(jC);if(!e)return;let t=r(_p(e.offset?.x)),n=r(_p(e.offset?.y)),o=r(_p(e.radius));if(!(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(o)))return`${Zc(t)} ${Zc(n)} ${Zc(Math.max(o,0))} ${CC}`;}function kC(i,r,e){let t={"background-color":r},n=e(_p(i.background.cornerRadius)*Sp);bp(n)&&n>0&&(t["border-radius"]=Zc(n));let o=MC(i.background.padding,e);return o&&(t.padding=o),t;}function AC(i,r){let e=i?.background?.fills;if(e?.[0]?.type==="SOLID")return rb(e,r);}function MC(i,r){let e=i?.length===2?[i[0],i[1],i[0],i[1]]:i?.length>=4?[i[0],i[1],i[2],i[3]]:void 0;if(!e)return;let t=e.map(n=>r(RC(n)));if(!(t.some(n=>!Number.isFinite(n))||t.every(n=>n===0)))return t.map(Zc).join(" ");}function RC(i){return Number.isFinite(i)?i>=0&&i<=1?i*Sp:i:NaN;}function LC(i){let r=i?.fontSize;return(ab(r?.max)?r.max:ab(r?.min)?r.min:wC)*Sp;}function DC(i){return i&&i.replace(xC,"");}function bp(i){return Number.isFinite(i)&&i!==0;}function NC(i){let r=VC(i);return r?(r[0]*299+r[1]*587+r[2]*114)/1e3>=128:!0;}function VC(i){let r=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(i?.trim()??"");if(!r)return;let e=r[1].length===3?r[1].split("").map(t=>t+t).join(""):r[1];return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];}function jC(i){return i?.type==="DROP_SHADOW";}function ab(i){return Number.isFinite(i)&&i>0;}function _p(i){return Number.isFinite(i)?i:0;}function Zc(i){return`${Math.round(i*100)/100}px`;}mt();mt();var BC=["*"],wp=(()=>{class i{constructor(){this.selected=!1,this.ariaLabel="",this.noneSlash=!1,this.activated=new Mi();}onClick(){this.activated.emit();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["theme-tile"]],inputs:{selected:"selected",ariaLabel:"ariaLabel",noneSlash:"noneSlash"},outputs:{activated:"activated"},standalone:!0,features:[Ft],ngContentSelectors:BC,decls:2,vars:6,consts:[["type","button",1,"tile",3,"click"]],template:function(t,n){t&1&&(rh(),be(0,"button",0),Ze("click",function(){return n.onClick();}),Wu(1),Oe()),t&2&&(Di("tile--selected",n.selected)("tile--none",n.noneSlash),Ei("aria-pressed",n.selected)("aria-label",n.ariaLabel||null));},styles:["[_nghost-%COMP%]{display:block}
816.tile[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:80px;padding:8px;border:1px solid #E5E7EB;border-radius:16px;background-color:#fff;font-family:Inter,sans-serif;cursor:pointer;overflow:hidden;transition:border-color .15s ease,background-color .15s ease}.tile[_ngcontent-%COMP%]:hover:not(.tile--selected){border-color:#c7d9fe}.tile[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4481FD;outline-offset:2px}.tile--selected[_ngcontent-%COMP%]{border:2px solid #4481FD;background-color:#ebf2ff;cursor:default}.tile--none[_ngcontent-%COMP%]{background-image:linear-gradient(to top right,transparent calc(50% - 1px),#DC2626 calc(50% - 1px),#DC2626 calc(50% + 1px),transparent calc(50% + 1px))}"],changeDetection:0});}}return i;})();mt();vn();mt();var FC=3e3,lb=65,Qc=(()=>{class i{constructor(){this.registered=new Map(),this.reported=new Set();}ensureRegistered(e){return this.register(e,t=>t);}ensureLatinRegistered(e){return this.register(e,t=>{let n=t.filter(o=>UC(o.unicodeRange));return n.length?n:t;});}register(e,t){let n=[];for(let _ of e??[]){if(!_?.family)continue;let E=this.registered.get(_.family),x=(_.faces??[]).filter(y=>!y?._omitted).flatMap(y=>this.toSources(y)),h=t(x).filter(y=>!E?.urls.has(y.url));if(!h.length){E&&n.push(E.done);continue;}n.push(this.loadFamily(_.family,h,E));}if(!n.length)return Promise.resolve();let o;return Promise.race([Promise.all(n),new Promise(_=>{o=setTimeout(_,FC);})]).then(()=>{}).finally(()=>clearTimeout(o));}loadFamily(e,t,n){let o=new Set(n?.urls??[]);t.forEach(h=>o.add(h.url));let _=Promise.all(t.map(h=>this.loadFace(e,h))).then(h=>{if(h.some(Boolean))return;let y=this.registered.get(e);t.forEach(b=>{o.delete(b.url),y?.urls.delete(b.url);}),!o.size&&y===x&&this.registered.delete(e),this.report(e,`no face of "${e}" could be registered`);}),E=n?Promise.all([n.done,_]).then(()=>{}):_,x={urls:o,done:E};return this.registered.set(e,x),E;}loadFace(e,t){return kt(this,null,function*(){try{let n=new FontFace(e,`url(${t.url})`,Ke({weight:t.weight===void 0?void 0:String(t.weight),style:t.style},t.unicodeRange?{unicodeRange:t.unicodeRange}:{}));return yield n.load(),document.fonts.add(n),!0;}catch(n){return this.report(e,`face failed to load: ${t.url}`,n),!1;}});}toSources(e){let t={weight:e?.weight,style:e?.style};return e?.woff2Subsets?.length?e.woff2Subsets.filter(n=>!!n?.url).map(n=>st(Ke({},t),{url:n.url,unicodeRange:n.unicodeRange})):e?.url?[st(Ke({},t),{url:e.url,unicodeRange:e.unicodeRange})]:[];}report(e,t,n){this.reported.has(e)||(this.reported.add(e),console.warn(`[VdmFontRegistryService] ${t}`,n??""),Zs({category:"vdm-v2",level:"warning",message:"font-registration-failed",data:{family:e,detail:t}}));}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();function UC(i){return i?i.split(",").some(r=>{let e=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(r.trim());if(!e)return!0;let t=parseInt(e[1],16),n=e[2]?parseInt(e[2],16):t;return t<=lb&&lb<=n;}):!0;}hi();function zC(i,r){if(i&1){let e=_t();be(0,"theme-tile",3),Ze("activated",function(){let n=$e(e).$implicit,o=Le();return We(o.onStyleClick(n.id));}),be(1,"span",4)(2,"span",5),lt(3),Oe()()();}if(i&2){let e=r.$implicit,t=Le();ke("selected",e.id===t.selectedStyleId)("ariaLabel",e.name),Ce(),ke("ngStyle",e.preview.plate),Ce(),Di("style-preview__text--light",e.preview.ink==="light"),ke("ngStyle",e.preview.text),Ce(),_i(e.name);}}function HC(i,r){i&1&&(be(0,"p",6),lt(1,"No caption styles available."),Oe());}var cb=(()=>{class i{set captionStyles(e){let t=e??[];this.fontFamilies.set(this.loadFonts(t)),this.styles.set(t);}set palette(e){this.activePalette.set(e);}constructor(e){this.vdmFontRegistryService=e,this.styleSelected=new Mi(),this.styles=$t([]),this.activePalette=$t(void 0),this.fontFamilies=$t(new Map()),this.tiles=xt(()=>{let t=this.activePalette(),n=this.fontFamilies();return this.styles().map(o=>({id:o.id,name:o.name,preview:sb({style:o,palette:t,fontFamily:n.get(o.id)})}));});}onStyleClick(e){this.styleSelected.emit(e);}trackByStyleId(e,t){return t.id;}loadFonts(e){let t=new Map();for(let n of e){let o=n.fonts?.[0]?.family;o&&t.set(n.id,o);}return this.vdmFontRegistryService.ensureLatinRegistered(e.flatMap(n=>n.fonts??[])),t;}static{this.ɵfac=function(t){return new(t||i)(ut(Qc));};}static{this.ɵcmp=Bt({type:i,selectors:[["themes-style-tab"]],inputs:{captionStyles:"captionStyles",palette:"palette",selectedStyleId:"selectedStyleId"},outputs:{styleSelected:"styleSelected"},standalone:!0,features:[Ft],decls:3,vars:3,consts:[[1,"style-grid"],[3,"selected","ariaLabel","activated",4,"ngFor","ngForOf","ngForTrackBy"],["class","style-empty",4,"ngIf"],[3,"activated","selected","ariaLabel"],[1,"style-preview",3,"ngStyle"],[1,"style-preview__text",3,"ngStyle"],[1,"style-empty"]],template:function(t,n){t&1&&(be(0,"div",0),at(1,zC,4,7,"theme-tile",1)(2,HC,2,0,"p",2),Oe()),t&2&&(Ce(),ke("ngForOf",n.tiles())("ngForTrackBy",n.trackByStyleId),Ce(),ke("ngIf",!n.tiles().length));},dependencies:[Ci,an,ui,xv,wp],styles:[".style-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.style-preview[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;max-width:100%}.style-preview__text[_ngcontent-%COMP%]{display:block;max-width:100%;white-space:nowrap;text-overflow:ellipsis;color:#253658;-webkit-text-stroke-color:#FFFFFF;line-height:1.2;overflow:hidden;padding-block:.25em;margin-block:-.25em}.style-preview__text--light[_ngcontent-%COMP%]{color:#fff;-webkit-text-stroke-color:#253658}.style-empty[_ngcontent-%COMP%]{grid-column:1/-1;margin:0;text-align:center;font-size:13px;color:#4b5563}"],changeDetection:0});}}return i;})();mt();hi();mt();hi();function $C(i,r){if(i&1&&tt(0,"span",8),i&2){let e=r.$implicit;Li("background-color",e);}}function WC(i,r){if(i&1){let e=_t();be(0,"button",4),Ze("click",function(){let n=$e(e).$implicit,o=Le();return We(o.onPaletteClick(n.id));}),be(1,"span",5),at(2,$C,1,2,"span",6),Oe(),be(3,"span",7),lt(4),Oe()();}if(i&2){let e=r.$implicit,t=Le();
816Di("palette-item--selected",e.id===t.selectedPaletteId),Ei("aria-pressed",e.id===t.selectedPaletteId)("aria-label",e.name),Ce(2),ke("ngForOf",e.bands),Ce(2),_i(e.name);}}function qC(i,r){i&1&&(be(0,"p",9),lt(1,"No color palettes available."),Oe());}var YC="/img/icon-library/symbols/Info.svg";function ub(i){return{id:i.id,name:i.name,bands:[i.background,i.text,...(i.textStyles??[]),...(i.colors??[])].filter(Boolean)};}var db=(()=>{class i{constructor(){this.palettes=[],this.canEditCustomColors=!1,this.paletteSelected=new Mi(),this.customColorChanged=new Mi(),this.infoIcon=YC;}get customColors(){return[{key:"background",label:"Background",hex:this.activePalette?.background},{key:"text",label:"Text",hex:this.activePalette?.text},{key:"accent",label:"Accent",hex:this.activePalette?.textStyles?.[0]}];}onPaletteClick(e){this.paletteSelected.emit(e);}onCustomColorChange(e,t){!this.canEditCustomColors||!t||t===this.hexFor(e)||this.customColorChanged.emit({key:e,hex:t});}trackByPaletteId(e,t){return t.id;}trackByCustomKey(e,t){return t.key;}hexFor(e){return this.customColors.find(t=>t.key===e)?.hex;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["themes-colors-tab"]],inputs:{palettes:"palettes",selectedPaletteId:"selectedPaletteId",activePalette:"activePalette",canEditCustomColors:"canEditCustomColors"},outputs:{paletteSelected:"paletteSelected",customColorChanged:"customColorChanged"},standalone:!0,features:[Ft],decls:4,vars:3,consts:[[1,"colors-tab"],[1,"palette-grid"],["type","button","class","palette-item",3,"palette-item--selected","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","palette-empty",4,"ngIf"],["type","button",1,"palette-item",3,"click"],[1,"palette-circle"],["class","palette-circle__band",3,"background-color",4,"ngFor","ngForOf"],[1,"palette-caption"],[1,"palette-circle__band"],[1,"palette-empty"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1),at(2,WC,5,6,"button",2)(3,qC,2,0,"p",3),Oe()()),t&2&&(Ce(2),ke("ngForOf",n.palettes)("ngForTrackBy",n.trackByPaletteId),Ce(),ke("ngIf",!n.palettes.length));},dependencies:[Ci,an,ui],styles:[".colors-tab[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;font-family:Inter,sans-serif}.palette-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,76px);justify-content:space-between;row-gap:16px}.palette-empty[_ngcontent-%COMP%]{grid-column:1/-1;margin:0;text-align:center;font-size:13px;color:#4b5563}.palette-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;width:76px;padding:0;border:none;background:none;cursor:pointer}.palette-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4481FD;outline-offset:2px;border-radius:8px}.palette-circle[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;width:56px;height:56px;border:1px solid #E5E7EB;border-radius:999px;overflow:hidden}.palette-circle__band[_ngcontent-%COMP%]{flex:1 1 0;min-height:0}.palette-caption[_ngcontent-%COMP%]{font-size:12px;font-weight:500;letter-spacing:-.12px;color:#253658}.palette-item--selected[_ngcontent-%COMP%]{cursor:default}.palette-item--selected[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]{border:2px solid #4481FD}.palette-item--selected[_ngcontent-%COMP%] .palette-caption[_ngcontent-%COMP%]{font-weight:600;color:#2563eb}.divider[_ngcontent-%COMP%]{width:100%;height:1px;background-color:#e1e7f0}.brand-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.brand-section__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.brand-section__title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;letter-spacing:-.16px;color:#253658}.brand-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.brand-row[_ngcontent-%COMP%]{display:block;width:100%}.brand-hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:0;font-size:12px;font-weight:400;letter-spacing:-.12px;color:#879fc3}.brand-hint[_ngcontent-%COMP%] lib-icon[_ngcontent-%COMP%]{--icon-size: 16px;flex-shrink:0}"],changeDetection:0});}}return i;})();mt();hi();_r();var Jc="/assets/composer/highlight-previews",hb={highlightWord:`${Jc}/highlight-word.json`,wordBox:`${Jc}/word-box.json`,singleWord:`${Jc}/single-word2.json`,scaleWord:`${Jc}/scale-word.json`,reveal:`${Jc}/reveal.json`,emoji:`${Jc}/emoji.json`},XC={reveal:"last"},KC="highlightWord";function pb(i){let r=i==="boxScale"?"wordBox":i;return hb[r]?r:KC;}function fb(i){return hb[pb(i)];}function mb(i){return XC[pb(i)]??0;}WE();mt();var gb=(()=>{class i{constructor(e){this.ngZone=e,this.playing=!1,this.restFrame=0;}ngOnInit(){this.options={path:this.path,loop:!0,autoplay:!1,renderer:"svg"};}ngOnChanges(e){(e.playing||e.restFrame)&&this.applyPlayback();}onAnimationCreated(e){this.animationItem=e,e.addEventListener("DOMLoaded",()=>this.applyPlayback()),this.applyPlayback();}applyPlayback(){let e=this.animationItem;e&&this.ngZone.runOutsideAngular(()=>{this.playing?e.goToAndPlay(0,!0):e.goToAndStop(this.resolveRestFrame(e),!0);});}resolveRestFrame(e){return this.restFrame==="last"?Math.max(e.totalFrames-1,
8160):this.restFrame;}static{this.ɵfac=function(t){return new(t||i)(ut(To));};}static{this.ɵcmp=Bt({type:i,selectors:[["highlight-lottie"]],inputs:{path:"path",playing:"playing",restFrame:"restFrame"},standalone:!0,features:[Wa,Ft],decls:1,vars:1,consts:[["width","100%","height","100%",3,"animationCreated","options"]],template:function(t,n){t&1&&(be(0,"ng-lottie",0),Ze("animationCreated",function(_){return n.onAnimationCreated(_);}),Oe()),t&2&&ke("options",n.options);},dependencies:[Iv],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0});}}return i;})();mt();hi();function ZC(i,r){if(i&1){let e=_t();be(0,"theme-tile",7),Ze("activated",function(){let n=$e(e).ngIf,o=Le();return We(o.onHighlightClick(n));}),Oe();}if(i&2){let e=Le();ke("selected",e.isNoneSelected())("noneSlash",!0);}}function QC(i,r){if(i&1){let e=_t();be(0,"theme-tile",8),Ze("activated",function(){let n=$e(e).$implicit,o=Le();return We(o.onHighlightClick(n.id));})("mouseenter",function(){let n=$e(e).$implicit,o=Le();return We(o.onTilePointer(n.id));})("mouseleave",function(){$e(e);let n=Le();return We(n.onTilePointer(void 0));})("focusin",function(){let n=$e(e).$implicit,o=Le();return We(o.onTilePointer(n.id));})("focusout",function(){$e(e);let n=Le();return We(n.onTilePointer(void 0));}),tt(1,"highlight-lottie",9),Oe();}if(i&2){let e=r.$implicit,t=Le();ke("selected",e.id===t.selectedHighlightId)("ariaLabel",e.name),Ce(),ke("path",e.lottiePath)("restFrame",e.restFrame)("playing",t.isPlaying(e.id));}}function JC(i,r){if(i&1){let e=_t();ti(0),tt(1,"div",10),be(2,"div",11)(3,"div",12)(4,"span",13),lt(5,"Random rotation"),Oe(),be(6,"span",14),lt(7,"Adds playful rotation to subtitle words."),Oe()(),be(8,"lib-toggle",15),Ze("checkedChange",function(n){$e(e);let o=Le();return We(o.onRandomRotationToggled(n));}),Oe()(),ii();}if(i&2){let e=Le();Ce(8),ke("checked",e.randomRotation);}}var yb=(()=>{class i{constructor(){this.randomRotation=!1,this.showRandomRotation=!0,this.highlightSelected=new Mi(),this.randomRotationChanged=new Mi(),this.presets=$t([]),this.activeTileId=$t(void 0),this.noneTile=xt(()=>this.presets().find(e=>e.type==="static")?.id),this.tiles=xt(()=>this.presets().filter(e=>e.type!=="static").map(e=>({id:e.id,name:e.name,lottiePath:fb(e.type),restFrame:mb(e.type)})));}set highlightPresets(e){this.presets.set(e??[]);}isNoneSelected(){return!this.selectedHighlightId||this.selectedHighlightId===this.noneTile();}isPlaying(e){return e===this.activeTileId()||e===this.selectedHighlightId;}onTilePointer(e){this.activeTileId.set(e);}onHighlightClick(e){e&&this.highlightSelected.emit(e);}onRandomRotationToggled(e){this.randomRotationChanged.emit(e);}trackByHighlightId(e,t){return t.id;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["themes-highlight-tab"]],inputs:{highlightPresets:"highlightPresets",selectedHighlightId:"selectedHighlightId",randomRotation:"randomRotation",showRandomRotation:"showRandomRotation"},outputs:{highlightSelected:"highlightSelected",randomRotationChanged:"randomRotationChanged"},standalone:!0,features:[Ft],decls:8,vars:4,consts:[[1,"highlight-tab"],[1,"highlight-section"],[1,"highlight-heading"],[1,"highlight-grid"],["ariaLabel","No highlight",3,"selected","noneSlash","activated",4,"ngIf"],[3,"selected","ariaLabel","activated","mouseenter","mouseleave","focusin","focusout",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["ariaLabel","No highlight",3,"activated","selected","noneSlash"],[3,"activated","mouseenter","mouseleave","focusin","focusout","selected","ariaLabel"],["aria-hidden","true",3,"path","restFrame","playing"],[1,"divider"],[1,"setting-row"],[1,"setting-row__text"],[1,"setting-row__title"],[1,"setting-row__hint"],[3,"checkedChange","checked"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"section",1)(2,"h3",2),lt(3,"Make subtitles pop, pick highlight effect"),Oe(),be(4,"div",3),at(5,ZC,1,2,"theme-tile",4)(6,QC,2,5,"theme-tile",5),Oe()(),at(7,JC,9,1,"ng-container",6),Oe()),t&2&&(Ce(5),ke("ngIf",n.noneTile()),Ce(),ke("ngForOf",n.tiles())("ngForTrackBy",n.trackByHighlightId),Ce(),ke("ngIf",n.showRandomRotation));},dependencies:[Ci,an,ui,Bv,wp,gb],styles:[".highlight-tab[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;font-family:Inter,sans-serif}.highlight-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.highlight-heading[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:500;letter-spacing:-.16px;color:#253658}.highlight-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.divider[_ngcontent-%COMP%]{width:100%;height:1px;background-color:#e1e7f0}.setting-row[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:32px;padding:12px;border:1px solid #E5E7EB;border-radius:16px;background-color:#fff}.setting-row__text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.setting-row__title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;letter-spacing:-.14px;color:#253658}.setting-row__hint[_ngcontent-%COMP%]{font-size:12px;font-weight:400;letter-spacing:-.12px;color:#6b7280}"],changeDetection:0});}}return i;})();hi();mt();hi();function eO(i,r){i&1&&(be(0,"div",2),tt(1,"div",3),Oe());}var vb=8,_b=(()=>{class i{constructor(){this.tiles=Array.from({length:vb});}set tileCount(e){this.tiles=Array.from({length:e??vb});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["themes-tab-shimmer"]],inputs:{tileCount:"tileCount"},standalone:!0,features:[Ft],decls:2,vars:1,consts:[["aria-hidden","true",1,"shimmer-grid"],["class","shimmer-tile",4,"ngFor","ngForOf"],[1,"shimmer-tile"],[1,"shimmer-tile__wave"]],template:function(t,n){t&1&&(be(0,"div",0),at(1,eO,2,0,"div",1),Oe()),t&2&&(Ce(),ke("ngForOf",n.tiles));},dependencies:[Ci,an],styles:[".shimmer-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.shimmer-tile[_ngcontent-%COMP%]{position:relative;height:72px;border-radius:12px;background-color:#f0f3f9;overflow:hidden}
816.shimmer-tile__wave[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#fff;opacity:.45;transform:translate(-100%);animation:_ngcontent-%COMP%_themes-shimmer-wave 1.5s infinite}@keyframes _ngcontent-%COMP%_themes-shimmer-wave{0%{transform:translate(-100%)}50%,to{transform:translate(100%)}}"],changeDetection:0});}}return i;})();mt();mt();vn();Or();mt();var ls=(()=>{class i{constructor(){this.eventsService=ct(Ji),this.composerEventsService=ct(en),this.sliderV2StoryService=ct(Yi),this.vdmPresetsService=ct(Io);}logOpen(e){this.safeLog(this.eventsService.events.composer.openStory,()=>{let t=this.sliderV2StoryService.story();return{captions:"true",openType:this.openType(),originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,isTranslated:this.composerEventsService.isStoryTranslated.toString(),originalOrientation:t?.mainTrack?.video?.aspectRatio,selectedOrientation:t?.aspectRatio,autoFixed:this.composerEventsService.isUserTriedAutoFixed.toString(),emphasized:this.composerEventsService.isCaptionsEmphasized.toString(),broll:this.composerEventsService.isBRollApplied.toString(),brollSource:this.composerEventsService.bRollSource,brollAmount:this.composerEventsService.bRollAmount,minWordsCount:this.composerEventsService.wordsPerSlide,isDraft:e.toString()};});}logCreate(){this.safeLog(this.eventsService.events.composer.generateStory,()=>({mediaId:this.composerEventsService.takeId,originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,isTranslated:this.composerEventsService.isStoryTranslated.toString(),videoDuration:this.composerEventsService.videoDuration?.toString()}));}logApplyTheme(){this.safeLog(this.eventsService.events.composer.applyTheme,()=>this.buildStoryPayload());}logPreview(e){this.safeLog(this.eventsService.events.composer.play,()=>st(Ke({},this.buildStoryPayload()),{previewType:e,outroIntro:"false"}));}logStyleChange(e){this.safeLog(this.eventsService.events.composer.themeChange,()=>({themeId:e}));}logPaletteChange(){this.safeLog(this.eventsService.events.composer.selectPalette,()=>{let e=this.sliderV2StoryService.story();return{themeName:this.captionStyleName(e),variationName:this.paletteName(e)};});}logCustomColorEdit(e){this.safeLog(this.eventsService.events.composer.closePaletteEditor,()=>({themeName:this.captionStyleName(this.sliderV2StoryService.story()),parameterName:e.parameterName,isChanged:e.isChanged.toString()}));}safeLog(e,t){try{this.composerEventsService.log(e,t());}catch(n){Qt(n);}}openType(){return this.composerEventsService.isStoryTranslated?"newTranslated":"newRegular";}buildStoryPayload(){let e=this.sliderV2StoryService.story();return{mediaId:this.composerEventsService.takeId,originalOrientation:e?.mainTrack?.video?.aspectRatio,selectedOrientation:e?.aspectRatio,cropped:(!!e?.zoom).toString(),videoDuration:this.composerEventsService.videoDuration?.toString(),numSlides:e?.media?.length?.toString(),captionThemeId:e?.style?.caption,themeName:this.captionStyleName(e),themeVariationName:this.paletteName(e),emphasized:this.composerEventsService.isCaptionsEmphasized.toString(),emphasizedWordNum:this.composerEventsService.emphasizedCaptions?.emphasizedWords,emphasizedWordPerc:this.composerEventsService.emphasizedCaptions?.emphasizedWordsPerc,isTranslated:this.composerEventsService.isStoryTranslated.toString(),originLang:this.composerEventsService.originLang,editLang:this.composerEventsService.editLang,autoFixed:this.composerEventsService.isUserTriedAutoFixed.toString(),broll:this.composerEventsService.isBRollApplied.toString(),brollSource:this.composerEventsService.bRollSource,brollAmount:this.composerEventsService.bRollAmount,logo:(!!e?.logo).toString(),soundBedType:e?.soundbed?"unknown":"none",soundBedAssetId:e?.
816soundbed?.assetId,soundBedVolume:e?.soundbed?.volume?.toString(),intro:"false",outro:"false",aiZoom:"false",boostAudio:(!!e?.audioNorm).toString()};}captionStyleName(e){let t=e?.style?.caption;return t?this.vdmPresetsService.captionStyleById().get(t)?.name:void 0;}paletteName(e){let t=e?.style?.colors;if(!t)return;let n=sl(t);return n?this.vdmPresetsService.colorPaletteById().get(n)?.name:"custom";}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Js();Bn();hi();function tO(i,r){i&1&&tt(0,"themes-tab-shimmer");}function iO(i,r){if(i&1&&(be(0,"p",10),lt(1),Oe()),i&2){let e=Le();Ce(),hn(" ",e.presetsError()," ");}}function nO(i,r){if(i&1){let e=_t();be(0,"themes-style-tab",15),Ze("styleSelected",function(n){$e(e);let o=Le(2);return We(o.onStyleSelected(n));}),Oe();}if(i&2){let e=Le(2);ke("captionStyles",e.captionStyles())("palette",e.previewPalette())("selectedStyleId",e.activeCaptionId());}}function rO(i,r){if(i&1){let e=_t();be(0,"themes-colors-tab",16),Ze("paletteSelected",function(n){$e(e);let o=Le(2);return We(o.onPaletteSelected(n));})("customColorChanged",function(n){$e(e);let o=Le(2);return We(o.onCustomColorChanged(n));}),Oe();}if(i&2){let e=Le(2);ke("palettes",e.paletteSwatches())("selectedPaletteId",e.activePaletteId())("activePalette",e.previewPalette())("canEditCustomColors",e.canEditCustomColors());}}function oO(i,r){if(i&1){let e=_t();be(0,"themes-highlight-tab",17),qi(1,"async"),Ze("highlightSelected",function(n){$e(e);let o=Le(2);return We(o.onHighlightSelected(n));})("randomRotationChanged",function(n){$e(e);let o=Le(2);return We(o.onRandomRotationChanged(n));}),Oe();}if(i&2){let e,t=Le(2);ke("highlightPresets",t.highlightPresets())("selectedHighlightId",t.selectedHighlightId())("randomRotation",(e=(e=Qi(1,4,t.viewModel$))==null?null:e.randomRotation)!==null&&e!==void 0?e:!1)("showRandomRotation",t.showRandomRotation());}}function aO(i,r){if(i&1&&(ti(0,11),at(1,nO,1,3,"themes-style-tab",12)(2,rO,1,4,"themes-colors-tab",13)(3,oO,2,6,"themes-highlight-tab",14),ii()),i&2){let e=Le();ke("ngSwitch",e.activeTab()),Ce(),ke("ngSwitchCase","style"),Ce(),ke("ngSwitchCase","colors"),Ce(),ke("ngSwitchCase","highlight");}}var sO="/img/icon-library/symbols/exit-close.svg",lO=500,cO=["captionStyles","colorPalettes","highlightPresets"],Sb=(()=>{class i extends Fn{constructor(e,t,n,o,_,E,x){super(x),this.sidebarThemesModalService=e,this.vdmPresetsService=t,this.sliderV2StoryService=n,this.sliderV2Analytics=o,this.planHelperService=_,this.dialogRef=E,this.data=x,this.closeIcon=sO,this.activeTab=$t("style"),this.tabs=[{label:"Style",value:"style"},{label:"Colors",value:"colors"},{label:"Highlight",value:"highlight"}],this.captionStyles=this.vdmPresetsService.captionStyles,this.colorPalettes=this.vdmPresetsService.colorPalettes,this.highlightPresets=this.vdmPresetsService.highlightPresets,this.presetsLoaded=this.vdmPresetsService.loaded,this.presetsError=xt(()=>{let h=this.vdmPresetsService.failedCatalogs().filter(y=>cO.includes(y)).map(y=>ad[y]);return h.length?`Could not load ${h.join(", ")}. Please try again later.`:void 0;}),this.style=xt(()=>this.sliderV2StoryService.story()?.style),this.activeCaptionId=xt(()=>this.style()?.caption),this.activePaletteId=xt(()=>sl(this.style()?.colors)),this.previewCaptionStyle=xt(()=>this.vdmPresetsService.captionStyleById().get(this.activeCaptionId())??this.captionStyles()[0]),this.selectedHighlightId=xt(()=>this.style()?.highlight),this.showRandomRotation=xt(()=>!this.sliderV2StoryService.story()),this.paletteSwatches=xt(()=>this.colorPalettes().map(ub)),this.previewPalette=xt(()=>qc(this.style()?.colors)??this.vdmPresetsService.colorPaletteById().get(this.activePaletteId())??this.colorPalettes()[0]),this.canEditCustomColors=$t(!1),this.customColorEdit$=new Yt(),this.unsubscribe$=new Yt();}ngOnInit(){this.viewModel$=this.sidebarThemesModalService.sidebarThemesModalViewModel$,this.data?.tab&&this.activeTab.set(this.data.tab),this.planHelperService.isProOrTeamOrMaxByCurrentPlan().then(e=>this.canEditCustomColors.set(e)).catch(()=>this.canEditCustomColors.set(!1)),this.customColorEdit$.pipe(On(lO),Pt(this.unsubscribe$)).subscribe(e=>{this.sliderV2Analytics.logCustomColorEdit({parameterName:e.key,isChanged:e.hex!==this.customColorBurstStart?.hex}
816),this.customColorBurstStart=void 0;}),this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}onTabChange(e){this.activeTab.set(e);}onStyleSelected(e){this.sliderV2StoryService.setStyleAxis("caption",e),this.sliderV2Analytics.logStyleChange(e);}onPaletteSelected(e){this.sliderV2StoryService.setColors(up(e)),this.sliderV2Analytics.logPaletteChange();}onCustomColorChanged(e){let t=this.previewPalette();if(!t)return;this.customColorBurstStart?.key!==e.key&&(this.customColorBurstStart={key:e.key,hex:this.seedColorOf(t,e.key)});let n=[...(t.textStyles??[])];e.key==="accent"&&(n[0]=e.hex),this.sliderV2StoryService.setColors(A0({background:e.key==="background"?e.hex:t.background,text:e.key==="text"?e.hex:t.text,textStyles:n,colors:[...(t.colors??[])]}),`color:${e.key}`),this.customColorEdit$.next(e);}seedColorOf(e,t){switch(t){case"background":return e.background;case"text":return e.text;case"accent":return e.textStyles?.[0];}}onHighlightSelected(e){this.sliderV2StoryService.setStyleAxis("highlight",e);}onRandomRotationChanged(e){this.sidebarThemesModalService.selectRandomRotation(e);}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(ll),ut(Io),ut(Yi),ut(ls),ut(Po),ut(br),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-themes-modal"]],standalone:!0,features:[Wn([ll]),Mn,Ft],decls:11,vars:7,consts:[[1,"themes-panel"],[1,"themes-panel__head"],[1,"themes-panel__title-row"],[1,"themes-panel__title"],["size","sm","variant","ghost",3,"clicked","iconContent"],["variant","slider","size","medium",1,"themes-tabs",3,"tabChange","fullWidth","tabs","activeTab"],[1,"themes-panel__body"],[4,"ngIf"],["class","themes-panel__error",4,"ngIf"],[3,"ngSwitch",4,"ngIf"],[1,"themes-panel__error"],[3,"ngSwitch"],[3,"captionStyles","palette","selectedStyleId","styleSelected",4,"ngSwitchCase"],[3,"palettes","selectedPaletteId","activePalette","canEditCustomColors","paletteSelected","customColorChanged",4,"ngSwitchCase"],[3,"highlightPresets","selectedHighlightId","randomRotation","showRandomRotation","highlightSelected","randomRotationChanged",4,"ngSwitchCase"],[3,"styleSelected","captionStyles","palette","selectedStyleId"],[3,"paletteSelected","customColorChanged","palettes","selectedPaletteId","activePalette","canEditCustomColors"],[3,"highlightSelected","randomRotationChanged","highlightPresets","selectedHighlightId","randomRotation","showRandomRotation"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),lt(4,"Themes"),Oe(),be(5,"lib-button-icon",4),Ze("clicked",function(){return n.close();}),Oe()(),be(6,"lib-tab",5),Ze("tabChange",function(_){return n.onTabChange(_);}),Oe()(),be(7,"div",6),at(8,tO,1,0,"themes-tab-shimmer",7)(9,iO,2,1,"p",8)(10,aO,4,4,"ng-container",9),Oe()()),t&2&&(Ce(5),ke("iconContent",n.closeIcon),Ce(),ke("fullWidth",!0)("tabs",n.tabs)("activeTab",n.activeTab()),Ce(2),ke("ngIf",!n.presetsLoaded()),Ce(),ke("ngIf",n.presetsLoaded()&&n.presetsError()),Ce(),ke("ngIf",n.presetsLoaded()));},dependencies:[Ci,ui,Xa,Ka,ir,Rr,Sh,cb,db,yb,_b],styles:["[_nghost-%COMP%]{display:block;height:100%}.themes-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background-color:#fff;font-family:Inter,sans-serif}.themes-panel__head[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:16px 16px 0;flex-shrink:0}.themes-panel__title-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.themes-panel__title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;line-height:1.4;color:#253658}lib-tab.themes-tabs[_ngcontent-%COMP%]{--tabs-bg-default: #F0F3F9;--tabs-bg-active: #FFFFFF;--tabs-fg: #253658;--tabs-fg-active: #253658}.themes-panel__body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;padding:24px 16px 16px}.themes-panel__error[_ngcontent-%COMP%]{margin:0 0 16px;font-size:13px;line-height:1.4;color:#dc2626}"],changeDetection:0});}}return i;})();hi();Bn();Oo();Ki();Cc();mt();Bn();hi();var uO=["themesLibrary"],dO=["palettesLibrary"],hO=["animationsLibrary"];function pO(i,r){if(i&1){let e=_t();be(0,"div",29),Ze("click",function(n){let o=$e(e).$implicit,_=Le().ngIf,E=Le();return We(_.selectedThemeId!==o.id&&E.onItemClick(n.target,o.id));}),tt(1,"img",30),Oe();}if(i&2){let e=r.$implicit,t=Le().ngIf;
816Ei("selected",t.selectedThemeId===e.id),Ce(),ke("alt",e.name)("src",e.thumbnail,An);}}function fO(i,r){if(i&1){let e=_t();be(0,"div",31),Ze("click",function(){$e(e),Le();let n=mi(7);return We(n.scrollBy({top:0,left:-140,behavior:"smooth"}));}),tt(1,"img",32),Oe();}}function mO(i,r){if(i&1){let e=_t();be(0,"div",33),Ze("click",function(){$e(e),Le();let n=mi(7);return We(n.scrollBy({top:0,left:140,behavior:"smooth"}));}),tt(1,"img",34),Oe();}}function gO(i,r){i&1&&tt(0,"img",41);}function yO(i,r){if(i&1&&(be(0,"div",35)(1,"div",36),tt(2,"img",37)(3,"img",38),be(4,"div",39),lt(5,"Customize Colors"),Oe()(),at(6,gO,1,0,"img",40),Oe()),i&2){let e=Le().ngIf;Ce(),Ei("selected",e.selectedPaletteId===e.customPalette.id),Ce(5),ke("ngIf",e.customPaletteDisabled);}}function vO(i,r){if(i&1){let e=_t();be(0,"div",42),Ze("click",function(n){let o=$e(e).$implicit,_=Le().ngIf,E=Le();return We(_.selectedPaletteId!==o.id&&E.onItemClick(n.target,o.id));}),tt(1,"img",37)(2,"img",43),Oe();}if(i&2){let e=r.$implicit,t=Le().ngIf;Ei("selected",t.selectedPaletteId===e.id),Ce(2),ke("alt",e.name)("title",e.name)("src",e.thumbnail,An);}}function _O(i,r){if(i&1){let e=_t();be(0,"div",31),Ze("click",function(){$e(e),Le();let n=mi(16);return We(n.scrollBy({top:0,left:-140,behavior:"smooth"}));}),tt(1,"img",32),Oe();}}function bO(i,r){if(i&1){let e=_t();be(0,"div",33),Ze("click",function(){$e(e),Le();let n=mi(16);return We(n.scrollBy({top:0,left:140,behavior:"smooth"}));}),tt(1,"img",34),Oe();}}function SO(i,r){if(i&1){let e=_t();ti(0),be(1,"div",50),Ze("click",function(){$e(e);let n=Le(4);return We(n.sidebarThemesModalService.closePaletteEditor());}),Oe(),be(2,"branding-color-picker",51),Ze("selectedColor",function(n){$e(e);let o=Le(3).ngIf,_=Le();return We(_.onColorSelection(n,o.paletteEditor.colorIdx));}),lt(3," > "),Oe(),ii();}if(i&2){let e=Le(3).ngIf;Ce(2),Li("margin-left",e.paletteEditor.position.left+"px"),ke("isPremiumUser",!0)("editedColor",e.paletteEditor.color);}}function wO(i,r){i&1&&tt(0,"img",52);}function EO(i,r){if(i&1){let e=_t();be(0,"div",53),Ze("click",function(n){let o=$e(e).index,_=Le(3).ngIf,E=Le();return We(_.selectedPaletteId===_.customPalette.id&&E.sidebarThemesModalService.openPaletteEditor(n,o));}),tt(1,"img",54),Oe();}if(i&2){let e=r.$implicit,t=r.index,n=Le(3).ngIf;Li("background-color",e)("z-index",n.customPalette.colors.length-t)("margin-left","min("+(48/(n.customPalette.colors.length-1)-32)+"px, -8px)"),Di("animation-scale-up-center",n.selectedPaletteId===n.customPalette.id),Ei("disabled",n.customPaletteDisabled)("selected",(n.paletteEditor==null?null:n.paletteEditor.colorIdx)===t);}}function xO(i,r){if(i&1){let e=_t();be(0,"div",45),at(1,SO,4,4,"ng-container",9),be(2,"div",46),Ze("click",function(){$e(e);let n=Le(2).ngIf,o=Le();return We(n.selectedPaletteId!==n.customPalette.id&&o.sidebarThemesModalService.selectCustomPalette(n.customPalette.id));}),at(3,wO,1,0,"img",47),be(4,"div",48),at(5,EO,2,10,"div",49),Oe()()();}if(i&2){let e=Le(2).ngIf;Ce(),ke("ngIf",e.paletteEditor),Ce(),Di("animation-scale-down-center",e.selectedPaletteId!==e.customPalette.id),Ei("selected",e.selectedPaletteId===e.customPalette.id),Ce(),ke("ngIf",e.customPaletteDisabled),Ce(2),ke("ngForOf",e.customPalette.colors);}}function TO(i,r){if(i&1&&(ti(0),be(1,"div",17),lt(2,"Custom Color"),Oe(),at(3,xO,6,6,"div",44),ii()),i&2){let e=Le().ngIf;Ce(3),ke("ngIf",e.customPalette);}}function CO(i,r){if(i&1){let e=_t();be(0,"div",55),Ze("click",function(n){let o=$e(e).$implicit,_=Le().ngIf,E=Le();return We(_.selectedAnimationId!==o.id&&E.onItemClick(n.target,o.id));})("mouseenter",function(){let n=$e(e).$implicit,o=Le(2);return We(o.playLottie(n.id));})("mouseleave",function(){let n=$e(e).$implicit,o=Le(2);return We(o.pauseLottie(n.id));}),be(1,"div",27)(2,"lottie-loader",28),Ze("lottieLoaded",function(){let n=$e(e).$implicit,o=Le(2);return We(o.lottieLoaded(n.id));}),Oe()()();}if(i&2){let e=r.$implicit,t=Le().ngIf;Ei("selected",t.selectedAnimationId===e.id),Ce(2),ke("lottieId",e.id)("path",e.thumbnail)("lottieWidth",135)("lottieHeight",75);}}function OO(i,r){if(i&1){let e=_t();be(0,"div",31),Ze("click",function(){$e(e),Le();let n=mi(27);return We(n.scrollBy({top:0,left:-200,behavior:"smooth"}));}),tt(1,"img",32),Oe();}}function PO(i,r){if(i&1){let e=_t();be(0,"div",33),Ze("click",function(){$e(e),Le();let n=mi(27);return We(n.scrollBy({top:0,left:200,behavior:"smooth"}));}),tt(1,"img",34),Oe();}}function IO(i,r){if(i&1){let e=_t();ti(0),be(1,"div",10),ti(2),be(3,"div",11),lt(4,"Theme"),Oe(),be(5,"div",12),Ze("mousedown",function(n){$e(e);let o=Le();return We(o.onMouseDown(n));}),be(6,"div",13,0),at(8,pO,2,3,"div",14),Oe(),at(9,fO,2,0,"div",15)(10,mO,2,0,"div",16),Oe
816(),ii(),ti(11),be(12,"div",17),lt(13,"Colors"),Oe(),be(14,"div",12),Ze("mousedown",function(n){$e(e);let o=Le();return We(o.onMouseDown(n));}),be(15,"div",18,1),at(17,yO,7,2,"div",19)(18,vO,3,4,"div",20),Oe(),at(19,_O,2,0,"div",15)(20,bO,2,0,"div",16),Oe(),ii(),at(21,TO,4,1,"ng-container",9),ti(22),be(23,"div",17),lt(24,"Animations"),Oe(),be(25,"div",12),Ze("mousedown",function(n){$e(e);let o=Le();return We(o.onMouseDown(n));}),be(26,"div",21,2)(28,"div",22),Ze("click",function(n){let o=$e(e).ngIf,_=Le();return We(o.selectedAnimationId!==void 0&&_.onItemClick(n.target,void 0));}),Oe(),at(29,CO,3,5,"div",23),Oe(),at(30,OO,2,0,"div",15)(31,PO,2,0,"div",16),Oe(),ii(),ti(32),be(33,"div",17),lt(34,"Random Rotation"),Oe(),be(35,"div",24)(36,"div",25),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(n.randomRotation&&o.sidebarThemesModalService.selectRandomRotation(!1));}),Oe(),be(37,"div",26),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(!n.randomRotation&&o.sidebarThemesModalService.selectRandomRotation(!0));})("mouseenter",function(){$e(e);let n=Le();return We(n.playLottie("caption-rotate"));})("mouseleave",function(){$e(e);let n=Le();return We(n.pauseLottie("caption-rotate"));}),be(38,"div",27)(39,"lottie-loader",28),Ze("lottieLoaded",function(){$e(e);let n=Le();return We(n.lottieLoaded("caption-rotate"));}),Oe()()()(),ii(),Oe(),ii();}if(i&2){let e=r.ngIf,t=mi(7),n=mi(16),o=mi(27);Ce(8),ke("ngForOf",e.themes),Ce(),ke("ngIf",t.scrollLeft>0),Ce(),ke("ngIf",t.clientWidth>0&&t.scrollWidth>t.clientWidth),Ce(7),ke("ngIf",!1),Ce(),ke("ngForOf",e.palettes),Ce(),ke("ngIf",n.scrollLeft>0),Ce(),ke("ngIf",n.clientWidth>0&&n.scrollWidth>n.clientWidth),Ce(),ke("ngIf",e.customPalette.colors.length>0),Ce(7),Ei("selected",e.selectedAnimationId===void 0),Ce(),ke("ngForOf",e.animations),Ce(),ke("ngIf",o.scrollLeft>0),Ce(),ke("ngIf",o.clientWidth>0&&o.scrollWidth>o.clientWidth),Ce(5),Ei("selected",!e.randomRotation),Ce(),Ei("selected",e.randomRotation)("lottiePath","img/composer/theme-modal/auto-rotate.json"),Ce(2),ke("lottieId","caption-rotate")("path","img/composer/theme-modal/auto-rotate.json")("lottieWidth",135)("lottieHeight",75);}}var Vm=(()=>{class i extends Fn{constructor(e,t,n,o){super(o),this.sidebarThemesModalService=e,this.dialogRef=t,this.cdRef=n,this.data=o,this.unsubscribe$=new Yt(),this.startX=0,this.mouseDownSource=void 0,this.isSwiping=!1;}ngOnInit(){this.viewModel$=this.sidebarThemesModalService.sidebarThemesModalViewModel$,this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}ngAfterViewInit(){this.scrollableElements=[this.themesLibrary.nativeElement,this.palettesLibrary.nativeElement,this.animationsLibrary.nativeElement],$a(document,"mousemove").pipe(cv(10),sn(t=>this.mouseDownSource&&"screenX"in t),Pt(this.unsubscribe$)).subscribe(t=>{if(t.button!==0){this.mouseDownSource=void 0,this.isSwiping=!1;return;}switch(this.scrollableElements.find(o=>o.contains(t.target))){case this.themesLibrary.nativeElement:this.themesLibrary.nativeElement.scrollBy({top:0,left:-t.movementX,behavior:"instant"});break;case this.palettesLibrary.nativeElement:this.palettesLibrary.nativeElement.scrollBy({top:0,left:-t.movementX,behavior:"instant"});break;case this.animationsLibrary.nativeElement:this.animationsLibrary.nativeElement.scrollBy({top:0,left:-t.movementX,behavior:"instant"});break;}Math.abs(t.pageX-this.startX)>10&&(this.isSwiping=!0);}),$a(document,"mouseup").pipe(Pt(this.unsubscribe$)).subscribe(t=>{this.mouseDownSource=void 0;}),$a(this.scrollableElements,"wheel").pipe(Pt(this.unsubscribe$)).subscribe(t=>{let n=this.scrollableElements.find(o=>o.contains(t.target));n&&n.scrollBy(t.deltaX+t.deltaY,0);});let e=this.animationsLibrary.nativeElement.querySelectorAll("div[selected=true]")[0];e&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),this.cdRef.detectChanges();}lottieLoaded(e){_o(200).pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.lottieLoaderComponents.find(t=>e===t.lottieId).pause(2);});}playLottie(e){this.lottieLoaderComponents.find(t=>e===t.lottieId).play();}pauseLottie(e){this.lottieLoaderComponents.find(t=>e===t.lottieId).pause();}onMouseDown(e){e.button===0&&(this.startX=e.pageX,this.mouseDownSource=e.target,this.isSwiping=!1);}onColorSelection(e,t){this.sidebarThemesModalService.modifyColorInCustomPalette(t,e);}onItemClick(e,t){if(this.isSwiping)return;switch(e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),this.scrollableElements.find(o=>o.contains(e))){case this.themesLibrary.nativeElement:this.sidebarThemesModalService.selectTheme(t);break;case this.palettesLibrary.nativeElement:this.sidebarThemesModalService.selectPalette
816(t);break;case this.animationsLibrary.nativeElement:this.sidebarThemesModalService.selectAnimation(t);break;}this.cdRef.detectChanges();}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(ll),ut(br),ut(Ks),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-themes-modal-v1"]],viewQuery:function(t,n){if(t&1&&(fn(uO,5),fn(dO,5),fn(hO,5),fn(aa,5)),t&2){let o;mn(o=gn())&&(n.themesLibrary=o.first),mn(o=gn())&&(n.palettesLibrary=o.first),mn(o=gn())&&(n.animationsLibrary=o.first),mn(o=gn())&&(n.lottieLoaderComponents=o);}},standalone:!0,features:[Wn([ll]),Mn,Ft],decls:9,vars:3,consts:[["themesLibrary",""],["palettesLibrary",""],["animationsLibrary",""],[1,"themes-modal"],[1,"header-container"],[1,"close-button",3,"click"],[1,"header-title"],[1,"header-text"],[1,"body-container"],[4,"ngIf"],[2,"width","100%"],[1,"title",2,"margin-top","0px"],[1,"arrowed-container",3,"mousedown"],[1,"themes-library"],["class","theme-item animation-scale-down-center",3,"click",4,"ngFor","ngForOf"],["class","slider-arrow slider-arrow-left",3,"click",4,"ngIf"],["class","slider-arrow slider-arrow-right",3,"click",4,"ngIf"],[1,"title"],[1,"palettes-library"],["class","custom-palette-v1 animation-scale-down-center",4,"ngIf"],["class","palette-item animation-scale-down-center",3,"click",4,"ngFor","ngForOf"],[1,"animations-library"],[1,"animation-none-item","animation-scale-down-center",3,"click"],["class","animation-item animation-scale-down-center",3,"click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[1,"random-rotation"],[1,"random-rotation-none-item","animation-scale-down-center",3,"click"],[1,"random-rotation-item","animation-scale-down-center",3,"click","mouseenter","mouseleave"],[2,"overflow","hidden"],[3,"lottieLoaded","lottieId","path","lottieWidth","lottieHeight"],[1,"theme-item","animation-scale-down-center",3,"click"],["draggable","false",3,"alt","src"],[1,"slider-arrow","slider-arrow-left",3,"click"],["src","img/composer/arrow-left.svg","draggable","false","alt","arrow-left"],[1,"slider-arrow","slider-arrow-right",3,"click"],["src","img/composer/arrow-right.svg","draggable","false","alt","arrow-right"],[1,"custom-palette-v1","animation-scale-down-center"],[1,"palette-item"],["src","img/composer/palette-background.webp","draggable","false","alt","palette-background"],["src","img/composer/edit-pen.svg","draggable","false","alt","edit-pen",1,"custom-palette-pen"],[1,"custom-palette-text"],["width","38","src","img/composer/premium-diamond.svg","draggable","false","alt","premium-diamond",4,"ngIf"],["width","38","src","img/composer/premium-diamond.svg","draggable","false","alt","premium-diamond"],[1,"palette-item","animation-scale-down-center",3,"click"],["draggable","false",1,"palette-thumbnail",3,"alt","title","src"],["class","custom-palette-container",4,"ngIf"],[1,"custom-palette-container"],[1,"custom-palette",3,"click"],["width","25","src","img/composer/premium-diamond.svg","draggable","false","alt","premium-diamond",4,"ngIf"],[1,"palette"],["class","palette-circle",3,"background-color","z-index","margin-left","animation-scale-up-center","click",4,"ngFor","ngForOf"],[1,"color-picker-backdrop",3,"click"],[1,"color-picker-tooltip",3,"selectedColor","isPremiumUser","editedColor"],["width","25","src","img/composer/premium-diamond.svg","draggable","false","alt","premium-diamond"],[1,"palette-circle",3,"click"],["width","16.6","height","15.5","src","img/composer/edit-pen.svg","draggable","false","alt","edit-pen"],[1,"animation-item","animation-scale-down-center",3,"click","mouseenter","mouseleave"]],template:function(t,n){t&1&&(be(0,"div",3)(1,"div",4)(2,"div",5),Ze("click",function(){return n.close();}),Oe(),be(3,"div",6)(4,"div",7),lt(5,"Themes"),Oe()()(),be(6,"div",8),at(7,IO,40,19,"ng-container",9),qi(8,"async"),Oe()()),t&2&&(Ce(7),ke("ngIf",Qi(8,1,n.viewModel$)));},dependencies:[Ci,an,ui,ir,x_,aa],styles:['.themes-modal[_ngcontent-%COMP%]{width:520px;max-height:calc(100vh - 60px);padding:32px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.body-container[_ngcontent-%COMP%]{margin-top:16px;display:flex;flex-direction:column;align-items:center;gap:25px}.title[_ngcontent-%COMP%]{margin-top:20px;color:#25365899;font-family:Inter-Regular;font-size:13px;line-height:125%}.arrowed-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.custom-palette-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center;margin-top:16px;gap:8px}.custom-palette[_ngcontent-%COMP%]{display:flex;padding:0 6px;justify-content:center;align-items:center;gap:4px;
816height:48px;border:1px solid rgba(123,141,177,.3);border-radius:10px;background-color:#fff}.custom-palette[selected=true][_ngcontent-%COMP%]{width:170px;z-index:98}.custom-palette[selected=true][_ngcontent-%COMP%]{border:unset;box-shadow:0 0 0 2px #4481fd}.custom-palette[_ngcontent-%COMP%]:hover:not([selected=true]){box-shadow:0 0 0 1px #7b8db14d;cursor:pointer}.custom-palette[_ngcontent-%COMP%] .palette[_ngcontent-%COMP%]{margin-left:7px;margin-right:7px}.custom-palette[selected=true][_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:none}.custom-palette[_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{visibility:hidden;filter:invert(97%) sepia(0%) saturate(0%) hue-rotate(45deg) brightness(116%) contrast(102%)}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]:first-child{margin-left:0!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-left:-8px!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] > .palette-circle[_ngcontent-%COMP%]:hover[disabled=false]{box-shadow:0 0 0 1px #0000001a;z-index:99!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]:hover[disabled=false] img[_ngcontent-%COMP%]{visibility:visible}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[selected=true][_ngcontent-%COMP%]{transform:scale(1.25)!important;z-index:98!important}.custom-palette[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:-5px}.custom-palette[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#253658;text-align:center;font-size:14px;margin-left:5px}.palette[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.palette[_ngcontent-%COMP%] > .palette-circle[_ngcontent-%COMP%]:first-child{margin-left:0!important}.palette-circle[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;box-shadow:0 0 0 1px #0000001a}.themes-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;max-width:100%;margin-top:10px;overflow-x:hidden}.theme-item[_ngcontent-%COMP%]{height:32px;display:flex;justify-content:center;align-items:center;padding:5px}.theme-item[_ngcontent-%COMP%]:hover{cursor:pointer}.theme-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.theme-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14;border-radius:4px}.theme-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd;border-radius:4px}.theme-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:20px;object-fit:cover}.palettes-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;align-items:flex-end;max-width:100%;height:86px;overflow-x:hidden;gap:20px}.custom-palette-v1[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:flex-end;width:76px}.custom-palette-v1[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:last-child{position:relative;margin-top:-17px;margin-left:-22px;align-self:flex-start}.custom-palette-text[_ngcontent-%COMP%]{position:absolute;text-align:center;font-family:Inter-SemiBold;color:#fff;margin-top:26px;font-size:10px}.custom-palette-pen[_ngcontent-%COMP%]{position:absolute;width:14px!important;height:14px!important;margin-bottom:22px;filter:brightness(0) saturate(100%) invert(90%) sepia(18%) saturate(0%) hue-rotate(82deg) brightness(107%) contrast(103%)}.palette-item[_ngcontent-%COMP%]{height:76px;width:76px;flex-shrink:0;position:relative;display:flex;justify-content:center;align-items:center;border-radius:10px;border:1px solid rgba(123,141,177,.6);overflow:hidden}.palette-item[_ngcontent-%COMP%]:hover{cursor:pointer}.palette-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.palette-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.palette-item[selected=true][_ngcontent-%COMP%]{border:2px solid #4481FD}.palette-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.palette-thumbnail[_ngcontent-%COMP%]{position:absolute}.animations-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:8px;max-width:100%;margin-top:10px;overflow-x:hidden}.animation-item[_ngcontent-%COMP%]{padding:0 5px;background:#7b8db114;border-radius:10px}.animation-none-item[_ngcontent-%COMP%]{background:#7b8db114;border-radius:10px;width:75px;height:75px;flex-shrink:0;overflow:hidden}.animation-none-item[_ngcontent-%COMP%]:before{content:"";position:absolute;width:106px;margin-top:2px;margin-left:-34px;border-top:1px solid red;transform:rotate(-45deg);transform-origin:100% 0}.animation-item[_ngcontent-%COMP%]:hover, .animation-none-item[_ngcontent-%COMP%]:hover{cursor:pointer}.animation-item[selected=true][_ngcontent-%COMP%]:hover, .animation-none-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.animation-item[_ngcontent-%COMP%]:not([selected=true]):hover, .animation-none-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.animation-item[selected=true][_ngcontent-%COMP%], .animation-none-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd}.random-rotation[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:8px;max-width:100%;margin-top:10px;overflow-x:hidden}.random-rotation-item[_ngcontent-%COMP%]{padding:0 5px;background:#7b8db114;border-radius:10px}.random-rotation-none-item[_ngcontent-%COMP%]{background:#7b8db114;border-radius:10px;width:75px;height:75px;flex-shrink:0;overflow:hidden}.random-rotation-none-item[_ngcontent-%COMP%]:before{content:"";position:absolute;width:106px;margin-top:2px;margin-left:-34px;border-top:1px solid red;transform:rotate(-45deg);transform-origin:100% 0}.random-rotation-item[_ngcontent-%COMP%]:hover, .random-rotation-none-item[_ngcontent-%COMP%]:hover{cursor:pointer}.random-rotation-item[selected=true][_ngcontent-%COMP%]:hover, .random-rotation-none-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.random-rotation-item[_ngcontent-%COMP%]:not([selected=true]):hover, .random-rotation-none-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.random-rotation-item[selected=true][_ngcontent-%COMP%], .random-rotation-none-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd}.slider-arrow[_ngcontent-%COMP%]{margin-top:10px;position:absolute;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}.slider-arrow-left[_ngcontent-%COMP%]{left:12px}.slider-arrow-right[_ngcontent-%COMP%]{right:10px}.slider-arrow[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:12px;object-fit:cover}.slider-arrow[_ngcontent-%COMP%]:hover{background-color:#00abfe14;border-radius:50%;cursor:pointer}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.animation-scale-up-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-up-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-up-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-up-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-up-center{0%{transform:scale(1)}to{transform:scale(1.25)}}@keyframes _ngcontent-%COMP%_animation-scale-up-center-out{0%{transform:scale(1.25)}to{transform:scale(1)}} .color-picker-tooltip .branding-color-picker-container{box-shadow:0 0 16px 10px #0000002e!important}.color-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:99}.color-picker-tooltip[_ngcontent-%COMP%]:before{content:"";position:absolute;top:48.5%;left:-8px;width:0;height:0;border-right:solid 9px white;border-top:solid 7px transparent;border-bottom:solid 7px transparent}.color-picker-backdrop[_ngcontent-%COMP%]{width:100%;height:100%;background-color:#0000004d;position:fixed;top:0;left:0;overflow:hidden;z-index:98}']});}}return i;})();mt();hi();Bn();Ki();_r();Oo();hi();mt();hi();function kO(i,r){i&1&&tt(0,"div",7);}function AO(i,r){if(i&1&&(be(0,"div",2)(1,"div",3),tt(2,"div",4),Oe(),tt(3,"div",5),at(4,kO,1,0,"div",6),Oe()),i&2){let e=Le();Ce(4),ke("ngIf",e.variant==="strip");}}var xp=(()=>{class i{constructor(){this.variant="strip",this.tiles=Array.from({length:ks.length});}set tileCount(e){this.tiles=Array.from({length:e??ks.length});}get isGrid(){return this.variant==="grid";}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-layouts-shimmer"]],hostVars:2,hostBindings:function(t,n){t&2&&Di("layouts-shimmer--grid",n.isGrid);},inputs:{tileCount:"tileCount",variant:"variant"},standalone:!0,features:[Ft],decls:2,vars:1,consts:[["aria-hidden","true",1,"layouts-shimmer"],["class","layouts-shimmer__tile",4,"ngFor","ngForOf"],[1,"layouts-shimmer__tile"],[1,"layouts-shimmer__preview"],[1,"layouts-shimmer__wave"],[1,"layouts-shimmer__label"],["class","layouts-shimmer__subtitle",4,"ngIf"],[1,"layouts-shimmer__subtitle"]],template:function(t,n){t&1&&(be(0,"div",0),at(1,AO,5,1,"div",1),Oe()),t&2&&(Ce(),ke("ngForOf",n.tiles));},dependencies:[Ci,an,ui],styles:[".layouts-shimmer[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:flex-start;gap:12px}.layouts-shimmer--grid[_nghost-%COMP%] .layouts-shimmer[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px}.layouts-shimmer--grid[_nghost-%COMP%] .layouts-shimmer__tile[_ng
816content-%COMP%]{width:100%;gap:6px}.layouts-shimmer--grid[_nghost-%COMP%] .layouts-shimmer__preview[_ngcontent-%COMP%]{width:100%;height:auto;aspect-ratio:var(--layout-banner-fi-aspect-ratio, 9/16);border-radius:10px}.layouts-shimmer__tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;width:60px}.layouts-shimmer__preview[_ngcontent-%COMP%]{position:relative;width:56px;height:86px;border-radius:12px;background-color:#f0f3f9;overflow:hidden}.layouts-shimmer__label[_ngcontent-%COMP%]{width:80%;height:10px;margin-top:4px;border-radius:5px;background-color:#f0f3f9}.layouts-shimmer__subtitle[_ngcontent-%COMP%]{width:60%;height:8px;border-radius:4px;background-color:#f0f3f9}.layouts-shimmer__wave[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#fff;opacity:.45;transform:translate(-100%);animation:_ngcontent-%COMP%_layouts-shimmer-wave 1.5s infinite}@keyframes _ngcontent-%COMP%_layouts-shimmer-wave{0%{transform:translate(-100%)}50%,to{transform:translate(100%)}}"],changeDetection:0});}}return i;})();mt();hi();_r();var jm="/img/illustration",Bm={presenter:`${jm}/presenter-illustration.png`,broll:`${jm}/broll-illustration.png`,openers:`${jm}/openers-illustration.png`},Fm=[{key:"presenter",label:"Presenter",illustration:Bm.presenter,tags:[{value:"sideBySide",label:"Side-by-Side"},{value:"boxed",label:"Boxed"},{value:"quote",label:"Quote"},{value:"pictureInPicture",label:"Picture-in-Picture"},{value:"presenterBubble",label:"Presenter Bubble"},{value:"greenScreen",label:"Green Screen"},{value:"splitText",label:"Split Text"},{value:"highlight",label:"Highlight"},{value:"textBehind",label:"Text Behind"}]},{key:"broll",label:"B-Roll",illustration:Bm.broll,tags:[]},{key:"openers",label:"Openers",illustration:Bm.openers,tags:[]}],wb="presenter";mt();hi();function MO(i,r){if(i&1){let e=_t();be(0,"lib-tag",13),Ze("selected",function(){let n=$e(e).$implicit,o=Le(2);return We(o.onTagToggle(n.value));}),Oe();}if(i&2){let e=r.$implicit,t=Le(2);ke("text",e.label)("value",e.value)("isSelected",t.isSelected(e.value));}}function RO(i,r){if(i&1&&(be(0,"div",11),at(1,MO,1,3,"lib-tag",12),Oe()),i&2){let e=Le();Ce(),ke("ngForOf",e.visibleTags())("ngForTrackBy",e.trackByTag);}}function LO(i,r){i&1&&(be(0,"p",14),li(1,3),Oe());}var Eb=(()=>{class i{constructor(){this.apply=new Mi(),this.groups=Fm,this.activeGroup=$t(wb),this.tabs=Fm.map(e=>({label:e.label,value:e.key,iconContent:e.illustration})),this.draft=$t(new Set()),this.applied=$t(new Set()),this.visibleTags=xt(()=>this.groups.find(e=>e.key===this.activeGroup())?.tags??[]),this.canApply=xt(()=>{let e=this.draft(),t=this.applied();return e.size!==t.size||[...e].some(n=>!t.has(n));});}set selected(e){this.applied.set(new Set(e)),this.draft.set(new Set(e));}onGroupChange(e){this.activeGroup.set(e);}isSelected(e){return this.draft().has(e);}onTagToggle(e){let t=new Set(this.draft());t.delete(e)||t.add(e),this.draft.set(t);}onClearAll(){this.draft.set(new Set());}onApply(){this.apply.emit(new Set(this.draft()));}trackByTag(e,t){return t.value;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["layouts-filters-view"]],inputs:{selected:"selected"},outputs:{apply:"apply"},standalone:!0,features:[Ft],decls:11,vars:7,consts:()=>{let e;e="Clear all";let t;t="Apply";let n;return n="No filters for this category yet.",[["noTags",""],e,t,n,[1,"layouts-filters"],[1,"layouts-filters__body"],["variant","slider","size","medium",1,"layouts-filters__tabs",3,"tabChange","fullWidth","tabs","activeTab"],["class","layouts-filters__tags",4,"ngIf","ngIfElse"],[1,"layouts-filters__footer"],["variant","ghost","size","md",3,"clicked","disabled"],["variant","primary","size","md",3,"clicked","disabled"],[1,"layouts-filters__tags"],["size","md","mode","light",3,"text","value","isSelected","selected",4,"ngFor","ngForOf","ngForTrackBy"],["size","md","mode","light",3,"selected","text","value","isSelected"],[1,"layouts-filters__empty"]];},template:function(t,n){if(t&1){let o=_t();be(0,"div",4)(1,"div",5)(2,"lib-tab",6),Ze("tabChange",function(E){return $e(o),We(n.onGroupChange(E));}),Oe(),at(3,RO,2,2,"div",7)(4,LO,2,0,"ng-template",null,0,Vi),Oe(),be(6,"div",8)(7,"lib-button",9),Ze("clicked",function(){return $e(o),We(n.onClearAll());}),li(8,1),Oe(),be(9,"lib-button",10),Ze("clicked",function(){return $e(o),We(n.onApply());}),li(10,2),Oe()()();}if(t&2){let o=mi(5);Ce(2),ke("fullWidth",!0)("tabs",n.tabs)("activeTab",n.activeGroup()),Ce(),ke("ngIf",n.visibleTags().length)("ngIfElse",o),Ce(4),ke("disabled",!n.draft().size),Ce(2),ke("disabled",!n.canApply());}},dependencies:[Ci,an,ui,vr,Sh,kc],styles:["[_nghost-%COMP%]{display:block;height:100%}.layouts-filters[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.layouts-filters__body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;padding:20px;
816display:flex;flex-direction:column;gap:24px}lib-tab.layouts-filters__tabs[_ngcontent-%COMP%]{--tabs-bg-active: #4481FD}.layouts-filters__tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.layouts-filters__empty[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.4;color:#4b5563}.layouts-filters__footer[_ngcontent-%COMP%]{flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px 24px 24px;border-top:1px solid #E1E7F0}.layouts-filters__footer[_ngcontent-%COMP%] lib-button[_ngcontent-%COMP%]{--button-min-width: 100%}"],changeDetection:0});}}return i;})();mt();hi();vn();mt();sa();mt();vn();JE();mt();var xb="/vendors/vdm-plugin/V2PreviewerLib.js",Tb="/vendors/vdm-plugin/vdm-bridge-v2.js",Cb="/vendors/vdm-plugin/V2StudioLib.js",Ob="/vendors/vdm-plugin/vdm-bridge-v2-studio.js",eu=(()=>{class i{constructor(){this.scriptLazyLoaderService=ct(n_),this.loading=null,this.studioLoading=null,this.attempts=new Map();}loadScript(e){let t=this.attempts.get(e)??0;return this.attempts.set(e,t+1),this.scriptLazyLoaderService.loadScript(t?`${e}?retry=${t}`:e);}ensureLoaded(){return this.loading??=this.load(),this.loading;}ensureStudioLoaded(){return this.studioLoading??=this.loadStudio(),this.studioLoading;}loadStudio(){return kt(this,null,function*(){try{if(yield this.ensureLoaded(),yield this.loadScript(Cb),!window.V2StudioLib?.V2Studio)throw new Error(`${Cb} loaded but window.V2StudioLib.V2Studio is unset`);if(yield this.loadScript(Ob),!window.StudioBridge)throw new Error(`${Ob} loaded but window.StudioBridge is unset`);}catch(e){throw this.studioLoading=null,e;}});}reportSdkVersion(){let e=window.VDMBridge.version;if(!e){cr("[vdm-bridge] VDMBridge.version is undefined: V2PreviewerLib.js predates the bridge (3.0.9)","warning");return;}wv("vdm_sdk",`${e.version}@${e.commit}`);}load(){return kt(this,null,function*(){try{if(yield this.loadScript(xb),!window.V2PreviewerLib?.V2Player)throw new Error(`${xb} loaded but window.V2PreviewerLib.V2Player is unset`);if(yield this.loadScript(Tb),!window.VDMBridge)throw new Error(`${Tb} loaded but window.VDMBridge is unset`);this.reportSdkVersion();}catch(e){throw this.loading=null,e;}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();mt();Ki();vn();var Rb=oo(la());var Ea={vertical:{width:1080,height:1920},horizontal:{width:1920,height:1080},square:{width:1080,height:1080}};mt();sa();Ki();mt();var Rn=(()=>{class i{constructor(e){this.videoSlidesService=e,this._index=$t(0),this.index=this._index.asReadonly(),this._changed=new Yt(),this.changed$=this._changed.asObservable();let t=ct(ao);this.videoSlidesService.slideStatus$.pipe(Ws("slideIndex"),qn(t)).subscribe(n=>this.select(n.slideIndex)),this.videoSlidesService.selectSlideByIndex$.pipe(Ti(),qn(t)).subscribe(n=>this.select(n));}select(e){!(e>=0)||e===this._index()||(this._index.set(e),this._changed.next(e));}static{this.ɵfac=function(t){return new(t||i)(Rt(Xi));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function Tp(i,r){let e={backfilledSlides:[],truncatedSlides:[],clampedSegmentationSlides:[],blockers:[]};if(!i)return e.blockers.push("This project could not be loaded."),{story:i,report:e};let t=zm(r),n=(i.media??[]).map((o,_)=>{let E=o?.metadata?.templateIds??[];return E.length?E.length>1?(e.truncatedSlides.push(_),Ib(o,[E[0]])):o:t?(e.backfilledSlides.push(_),Ib(o,[t])):o;}).map((o,_,E)=>NO({slide:o,duration:Fr(E,_),index:_,report:e}));return VO({story:i,media:n,layouts:r,report:e}),{story:st(Ke({},i),{media:n}),report:e};}var Um="story-embedded-palette",DO="Custom";function Cp(i){let{story:r,colorPalettes:e}=i;if(!r)return{story:void 0,colorPalettes:e};let t=qc(r.style?.colors);return t?{story:Pb(r,Um),colorPalettes:st(Ke({},e),{[Um]:Ke({id:Um,name:DO},t)})}:{story:Pb(r,sl(r.style?.colors)),colorPalettes:e};}function Op(i){let{story:r,captionStyles:e,layouts:t}=i;if(!r)return[];let n=new Set((r.media??[]).map(_=>_?.metadata?.templateIds?.[0]).filter(Boolean)),o=e?.[r.style?.caption];return[...(o?.fonts??[]),...(o?[]:[...n].flatMap(_=>t?.[_]?.defaultStyle?.caption?.fonts??[])),...[...n].flatMap(_=>t?.[_]?.fonts??[])];}function Gm(i){let r=new Map(),e=t=>{t?.url&&t.previewUrl&&!r.has(t.url)&&r.set(t.url,t.previewUrl);};return e(i?.mainTrack?.video),i?.media?.forEach(t=>t?.media?.filter(n=>n?.type==="video").forEach(e)),r;}function Pp(i){if(!i)return i;let r=Gm(i),e=o=>r.has(o?.url)?st(Ke({},o),{url:r.get(o.url)}):o,t=i.mainTrack&&st(Ke({},i.mainTrack),{video:e(i.mainTrack.video),audio:e(i.mainTrack.audio)}),n=i.soundbed?.previewUrl;return st(Ke({},i),{mainTrack:t,soundbed:n?st(Ke({},i.soundbed),{url:n}):i.soundbed,media:i.media?.map(o=>o?.media?.some(_=>_?.type==="video")?st(Ke({},o),{media:o.media.map(_=>_?.type==="video"?e(_):_)}):o)});}function Pb(i,r){let e={caption:i.style?.caption,colors:r,highlight:i.style?.highlight};return st(Ke({},i),{style:e});}function zm(i){let r=Object.entries(i??{}),e=r.filter(([,o])=>o?.options?.isDefault),t=e.filter(([,o])=>qo(o)==="captions"),n=t.length?t:e;return n.length>1&&hp("layouts",n.length),n.length?n[0][0]:(r.length&&dp("layouts"),r[0]?.[0]);}function Ib(i,r){return st(Ke({},i),{metadata:st(Ke({},i?.metadata),{templateIds:r})});}function NO(i){let{slide:r,duration:e,index:t,report:n}=i,o=r?.metadata?.segmentation;return F_(o,e)?r:(n.clampedSegmentationSlides.push(t),st(Ke({},r),{metadata:st(Ke({},r.metadata),{segmentation:U_(o,e)})}));}function VO(i){let{story:r,media:e,layouts:t,report:n}=i;if(r.aspectRatio||n.blockers.push("This project has no aspect ratio and cannot be previewed."),!e.length){n.blockers.push("This project has no scenes to preview.");return;}e.filter(E=>!E?.metadata?.templateIds?.length).length&&n.blockers.push("No layouts are available, so this project cannot be previewed.");let _=e.map(E=>
816E?.metadata?.templateIds?.[0]).filter(E=>E&&!t?.[E]);_.length&&(n.blockers.push("This project uses a layout that is no longer available."),console.warn("[prepareStoryForPlayer] unresolved template ids:",[...new Set(_)]));}mt();var Nl=null,kb=Promise.resolve(),jO=4e3,Ab=3e4,BO=5e3,Mb=.1,FO=300,UO=.05,Sr=(()=>{class i{constructor(){this.vdmPresetsService=ct(Io),this.vdmFontRegistryService=ct(Qc),this.vdmBridgeLoaderService=ct(eu),this.composerSlideSelectionService=ct(Rn),this.sliderV2Analytics=ct(ls),this.zone=ct(To),this.hasContent=!1,this.loadQueue=Promise.resolve(),this.bridgeLoadInFlight=!1,this.loadFailureReported=!1,this.listeners=new Map(),this._ready=new Yt(),this._time=new Yt(),this._paused=new Yt(),this._pauseSettled=new Yt(),this._ended=new Yt(),this._buffering=new Yt(),this._started=new Yt(),this._loadFailed=new Yt(),this._playing=$t(!1),this.playing=this._playing.asReadonly(),this._seekPending=$t(!1),this.seekPending=this._seekPending.asReadonly(),this.seekGeneration=0,this._applying=$t(!1),this.applying=this._applying.asReadonly(),this.applyGeneration=0,this.ready$=this._ready.asObservable(),this.time$=this._time.asObservable(),this.paused$=this._paused.asObservable(),this.pauseSettled$=this._pauseSettled.asObservable(),this.ended$=this._ended.asObservable(),this.buffering$=this._buffering.asObservable(),this.started$=this._started.asObservable(),this.loadFailed$=this._loadFailed.asObservable();}init(){return kt(this,null,function*(){if(!(this.bridge||Nl&&Nl!==this)){Nl=this,this.loadFailureReported=!1;try{yield this.vdmBridgeLoaderService.ensureLoaded();}catch(e){Nl=null,this.reportLoadFailure(e);return;}if(Nl!==this){this.reportLoadFailure(new Error("[slider-v2-player] lost the bridge ownership race during init"));return;}this.bridge=window.VDMBridge,this.wireEvents();}});}load(e){let t=this.loadQueue.then(()=>this.loadNow(e));return this.loadQueue=t.catch(()=>{}),t;}whenIdle(){return this.loadQueue;}get loadedSource(){return this._loadedSource;}loadNow(e){return kt(this,null,function*(){if(!this.bridge)return;let t=this.vdmPresetsService.layoutsRecord(),n=this.vdmPresetsService.captionStylesRecord(),{story:o,report:_}=Tp(e,t);if(_.blockers.length){this._loadFailed.next({message:_.blockers[0],recoverable:!1});return;}(_.backfilledSlides.length||_.truncatedSlides.length||_.clampedSegmentationSlides.length)&&console.warn("[SliderV2PlayerService] story repaired for playback",_);let E;try{yield Promise.race([kb,new Promise(p=>{E=setTimeout(p,jO);})]);}finally{clearTimeout(E);}if(!this.bridge)return;this.loadFailureReported=!1;let{story:x,colorPalettes:h}=Cp({story:o,colorPalettes:this.vdmPresetsService.colorPalettesRecord()}),y=Pp(st(Ke({},x),{media:Rb.cloneDeep(x.media)})),b={story:y,layouts:t,presets:{captionStyles:n,colorPalettes:h,highlightPresets:this.vdmPresetsService.highlightPresetsRecord()},dimensions:Ea[x.aspectRatio]??Ea.vertical};if(yield this.vdmFontRegistryService.ensureRegistered(Op({story:x,captionStyles:n,layouts:t})),!!this.bridge){this.cancelSeekHold(),this.bridgeLoadInFlight=!0;try{this.hasContent&&this.bridge.state()!==window.VDMState.ERROR?yield this.bridge.updateStory(b):yield this.bridge.load(b),this.hasContent=!0,this._playerStory=y,this._loadedSource=e,this.syncPlaying();let p=this.seekAfterLoad;this.bridgeLoadInFlight=!1,this.seekAfterLoad=void 0,p!==void 0&&(this._seekPending()&&this.armSeekBackstop(p),this.pauseNow(p));}catch(p){this.hasContent=!1,this._playerStory=void 0,this._loadedSource=void 0,this.reportLoadFailure(p);}finally{this.bridgeLoadInFlight=!1,this.seekAfterLoad=void 0;}}});}beginApply(){this.stop(),this.applyGeneration++,this._applying.set(!0),clearTimeout(this.applyFallbackTimer),this.applyFallbackTimer=setTimeout(()=>this._applying.set(!1),BO);}applyToken(){return this.applyGeneration;}endApply(e){e!==void 0&&e!==this.applyGeneration||(clearTimeout(this.applyFallbackTimer),this._applying.set(!1));}play(e,t){return kt(this,null,function*(){if(!this.bridge||this._applying())return;this.cancelSeekHold();let n=e??this.midStoryResumeTime(),o=this._playing()&&n===void 0&&t===void 0;try{yield this.bridge.play(n,t);}catch{this.syncPlaying();return;}this.syncPlaying(),!o&&this.sliderV2Analytics.logPreview(t===void 0?"full":"segment");});}pause(e){return this.cancelSeekHold(),this.seekTo(e);}seekTo(e){return this.bridgeLoadInFlight&&Number.isFinite(e)&&(this.seekAfterLoad=e),this.pauseNow(e);}pauseNow(e){return this.bridge?this.bridge.pause(e).then(t=>t!==!1,t=>(Zs({category:"slider-v2-player",level:"warning",message:`pause(${e}) rejected: ${t?.message}`}),!1)).then(t=>(this.syncPlaying(),this._pauseSettled.next(t),t)):Promise.resolve(!1);}stop(){this.cancelSeekHold(),this.pauseNow(this.bridge?.getPlayer()?this.currentTime:void 0);}pauseAtSlide(e,t){if(!Number.isFinite(e)){this.pause(void 0);return;}let n=t!==void 0&&Number.isFinite(t)?Math.min(Mb,t/2):Mb;if(this.cancelSeekHold(),!this.bridge)return;let o=this.seekGeneration,_=e+n;this._seekPending.set(!0),this.armSeekBackstop(_),this.seekTo(_).then(E=>{E&&o===this.seekGeneration&&this.cancelSeekHold();});}armSeekBackstop(e){let t=this.seekGeneration;
816clearTimeout(this.seekHoldTimer),this.zone.runOutsideAngular(()=>{this.seekHoldTimer=setTimeout(()=>this.zone.run(()=>{t===this.seekGeneration&&(cr("slider-v2: scene seek frame never drawn",{level:"warning",extra:{seekTime:e,windowMs:Ab}}),this.cancelSeekHold());}),Ab);});}cancelSeekHold(){this.seekGeneration++,clearTimeout(this.seekHoldTimer),this.seekHoldTimer=void 0,this._seekPending.set(!1);}get currentTime(){return this.bridge?.getPlayer()?.currentTime??0;}get duration(){return this.bridge?.getPlayer()?.duration??0;}get currentSlideIndex(){return this.bridge?.getPlayer()?.currentSlideIndex??0;}elementWireframeBox(e){let t=this.bridge?.getPlayer(),n=t?.getElementTextBBox(e)??t?.getElementSlotBBox(e);return n?{x:n.x,y:n.y,w:n.w,h:n.h}:void 0;}elementIdAt(e,t){let n=this.bridge?.getPlayer(),o=n?.getPointerTarget(),_=o?.getBoundingClientRect();if(!_?.width||!_?.height)return null;let E=(e.clientX-_.left)*(o.width/_.width),x=(e.clientY-_.top)*(o.height/_.height);return n.hitTest(E,x,void 0,t);}get playerStory(){return this._playerStory;}dispose(){Nl===this&&(Nl=null),this.endApply(),this.setPlaying(!1),this.cancelSeekHold(),this.bridge&&(this.listeners.forEach((e,t)=>{this.bridge.removeEventListener(t,e);}),this.listeners.clear(),kb=this.bridge.cleanup().catch(e=>{Qt(e);}),this.bridge=void 0,this.hasContent=!1,this._playerStory=void 0,this._loadedSource=void 0);}isEngineRunning(){let e=this.bridge?.getPlayer();return!!e&&!e.paused;}syncPlaying(){let e=this.isEngineRunning();e!==this._playing()&&(Zs({category:"slider-v2-player",level:"warning",message:`playing corrected to ${e} \u2014 the engine changed state without an event`}),this.setPlaying(e));}setPlaying(e){this._playing()!==e&&(this._playing.set(e),clearInterval(this.playingWatchdog),e&&(this.playingWatchdog=setInterval(()=>this.syncPlaying(),FO)));}midStoryResumeTime(){let e=this.bridge?.getPlayer();if(!e?.ended)return;let t=e.currentTime??0,n=e.duration??0;return t>0&&t<n-UO?t:void 0;}wireEvents(){this.on("ready",e=>this._ready.next(e.time)),this.on("update",e=>{this.syncPlaying(),this._time.next(e.time);}),this.on("paused",e=>{this.setPlaying(!1),this.cancelSeekHold(),this._paused.next(e.time);}),this.on("ended",e=>{this.setPlaying(!1),this._ended.next(e.time);}),this.on("buffering",e=>this._buffering.next(e.time)),this.on("start",e=>{this.setPlaying(!0),this._started.next(e.time);}),this.on("slide",e=>this.composerSlideSelectionService.select(e.index)),this.on("error",e=>this.onBridgeError(e)),this.on("notice",e=>this.reportDiagnostic("notice",e)),this.on("unresolvedBinding",e=>this.reportDiagnostic("unresolvedBinding",e));}on(e,t){let n=o=>{let _=o.detail;this.zone.run(()=>t(_));};this.listeners.set(e,n),this.bridge.addEventListener(e,n);}onBridgeError(e){let t=new Error(`[vdm-bridge:${e.errorType}] ${e.message}${e.detail?` \u2014 ${e.detail}`:""}`);if(e.errorType!==window.VDMBridgeError.LOAD_FAILED&&e.errorType!==window.VDMBridgeError.UPDATE_FAILED){Qt(t),e.errorType===window.VDMBridgeError.PLAY_FAILED&&this.syncPlaying();return;}this.reportLoadFailure(t);}reportLoadFailure(e){this.cancelSeekHold(),!this.loadFailureReported&&(Qt(e),this.loadFailureReported=!0,this._loadFailed.next({message:"This project could not be previewed. Please try again.",error:e,recoverable:!0}));}reportDiagnostic(e,t){console.warn(`[SliderV2PlayerService] ${e}:`,t),Zs({category:"vdm-v2",level:"warning",message:e,data:t});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();var GO=/\bslide\.title\b/;function cl(i){return od(i?.elements).some(r=>!!r?.bind&&GO.test(r.bind));}var Lb=1;function Db(i){let{story:r,slideIndex:e,playhead:t}=i,n=r?.media?.length??0;if(!n)return{slideIndex:0,time:0};let o=Math.max(0,Math.min(n-1,Number.isFinite(e)?e:0)),_=r.media[o]?.metadata?.time??0,E=Fr(r.media,o),x=E===void 0?1/0:_+E;return Number.isFinite(t)&&t>=_&&t<x?{slideIndex:o,time:t}:{slideIndex:o,time:Math.min(_+Lb,_+(E??Lb)*.9)};}function Nb(i){let{story:r,layoutId:e,slideIndex:t,layouts:n,colorPalettes:o,noHighlightId:_}=i;if(!n?.[e])throw new Error(`[layout-thumb] layout ${e} is not in the catalog`);if(!_)throw new Error("[layout-thumb] no static highlight preset in the catalog");let{story:E,report:x}=Tp(zO(structuredClone(r),_),n);if(x.blockers.length)throw new Error(`[layout-thumb] story cannot be loaded: ${x.blockers.join(" ")}`);let h=E.media.map((p,c)=>c!==t?p:tp({slide:st(Ke({},p),{metadata:st(Ke({},p.metadata),{templateIds:[e]})}),bindsTitle:cl(n[e]),headline:r.headline})),y=Cp({story:st(Ke({},E),{media:h}),colorPalettes:o}),b=Pp(y.story);return st(Ke({},y),{story:st(Ke({},b),{media:b.media.map((p,c)=>c===t?p:st(Ke({},p),{media:p.media?.filter(d=>d?.type!=="video")}))})});}function zO(i,r){return st(Ke({},i),{style:st(Ke({},i.style),{highlight:r}),media:i.media?.map(e=>{if(!e.metadata?.style||!("highlight"in e.metadata.style))return e;let o=e.metadata.style,{highlight:t}=o,n=Yd(o,["highlight"]);return st(Ke({},e),{metadata:st(Ke({},e.metadata),{style:n})});})});}function Vb(i){let r=Ea[i];if(!r)throw new Error(`[layout-thumb] unknown story.aspectRatio: ${i}`);return r;}function jb(i,r){return Math.max(0,Math.min(r||0,i||0));}function Bb(i,r){if(!i)return"";let e=i.media?.[r.slideIndex],t=Gm(i),n=[i.mainTrack?.video?.url,i.mainTrack?.audio?.url,...(e?.media??[]).filter(o=>o?.type==="video").map(o=>o.url)];return JSON.stringify([r.slideIndex,r.time,i.aspectRatio,i.zoom,i.style?.caption,i.style?.colors,i.mainTrack,i.logo,i.rtlLayout,i.headline,e?.text,e?.media,e?.logoEnabled,e?.metadata?.time,e?.metadata?.duration,e?.metadata?.resources,e?.metadata?.style?.caption,e?.metadata?.style?.colors,e?.metadata?.effects,e?.metadata?.segmentation,n.map(o=>t.get(o)??null)]);}function Fb(i){return new Promise(r=>{let e=0,t=()=>{e+=1,e>=i?r():requestAnimationFrame(t);};requestAnimationFrame(t);});}
816var ld=class extends Error{constructor(){super("Task cancelled before it started"),this.name="TaskCancelledError";}},kp=class{constructor(r){this.concurrency=r,this.active=0,this.pending=[];}get running(){return this.active;}enqueue(r){let e,t=new Promise((n,o)=>{e={reject:o,run:()=>{this.active+=1,Promise.resolve().then(r).then(n,o).finally(()=>{this.active-=1,this.drain();});}};});return this.pending.push(e),this.drain(),{result:t,cancel:()=>{let n=this.pending.indexOf(e);return n<0?!1:(this.pending.splice(n,1),e.reject(new ld()),!0);}};}drain(){for(;this.active<this.concurrency&&this.pending.length;)this.pending.shift().run();}};mt();var HO=4,$O=2,WO=15e3,qO=1e4,YO="vdm-thumb-debug",iu=(()=>{class i{constructor(){this.zone=ct(To),this.vdmPresetsService=ct(Io),this.vdmFontRegistryService=ct(Qc),this.vdmBridgeLoaderService=ct(eu),this.sliderV2StoryService=ct(Yi),this.sliderV2PlayerService=ct(Sr),this.composerSlideSelectionService=ct(Rn),this.playhead=$t(this.sliderV2PlayerService.currentTime),this.frame=xt(()=>Db({story:this.sliderV2StoryService.story(),slideIndex:this.composerSlideSelectionService.index(),playhead:this.playhead()})),this.signature=xt(()=>Bb(this.sliderV2StoryService.story(),this.frame())),this.queue=new kp($O),this.cache=new Map(),this.inFlight=new Map(),this.cachedPresets=[],this.generation=0,this.destroyed=!1,this.abortRejecters=new Set(),this.warnedMissingSpecRenderer=!1,this.loadTimeoutMs=WO,this.renderTimeoutMs=qO,this.sliderV2PlayerService.paused$.pipe(qn()).subscribe(e=>this.syncPlayhead(e));}syncPlayhead(e=this.sliderV2PlayerService.currentTime){Number.isFinite(e)&&this.playhead.set(e);}ngOnDestroy(){this.destroyed=!0;let e=new Error("[layout-thumb] renderer destroyed");this.abortRejecters.forEach(t=>t(e)),this.abortRejecters.clear(),this.inFlight.forEach(t=>t.task.cancel()),this.inFlight.clear(),this.cache.forEach(t=>t.close()),this.cache.clear();}render(e){let t=this.sliderV2StoryService.story(),n=this.frame(),o=this.signature();this.evictStale(o);let _=this.generation,E=`${e.layoutId}|${e.width}x${e.height}|${_}|${o}`,x=this.cache.get(E);if(x)return{result:Promise.resolve(x),cancel:()=>{}};this.evictOtherSizes(e.layoutId);let h=this.inFlight.get(E);if(!h){let p=this.queue.enqueue(()=>this.zone.runOutsideAngular(()=>this.snapshot(st(Ke({},e),{story:t,frame:n}))));h={task:p,waiters:0},this.inFlight.set(E,h);let c=()=>{this.inFlight.get(E)===h&&this.inFlight.delete(E);};p.result.then(d=>{if(c(),!this.destroyed&&this.generation===_){this.cache.set(E,d);return;}queueMicrotask(()=>d.close());},c);}let y=h;y.waiters+=1;let b=!1;return{result:y.task.result,cancel:()=>{b||(b=!0,y.waiters-=1,y.waiters<=0&&y.task.cancel()&&this.inFlight.get(E)===y&&this.inFlight.delete(E));}};}evictStale(e){let t=[this.vdmPresetsService.layoutsRecord(),this.vdmPresetsService.captionStylesRecord(),this.vdmPresetsService.highlightPresetsRecord(),this.vdmPresetsService.colorPalettesRecord()],n=t.some((o,_)=>o!==this.cachedPresets[_]);this.cachedSignature===e&&!n||(this.cachedSignature=e,this.cachedPresets=t,this.generation+=1,this.cache.forEach(o=>o.close()),this.cache.clear());}evictOtherSizes(e){let t=`${e}|`;this.cache.forEach((n,o)=>{o.startsWith(t)&&(n.close(),this.cache.delete(o));});}snapshot(e){return kt(this,null,function*(){let{layoutId:t,width:n,height:o,story:_,frame:E}=e;yield this.vdmBridgeLoaderService.ensureLoaded(),yield this.vdmPresetsService.fetchAll();let x=window.V2PreviewerLib?.V2Player;if(!x)throw new Error("[layout-thumb] V2PreviewerLib is not loaded");let h=this.vdmPresetsService.layoutsRecord(),y=this.vdmPresetsService.captionStylesRecord(),b=this.vdmPresetsService.highlightPresetsRecord(),{story:p,colorPalettes:c}=Nb({story:_,layoutId:t,slideIndex:E.slideIndex,layouts:h,colorPalettes:this.vdmPresetsService.colorPalettesRecord(),noHighlightId:this.vdmPresetsService.noHighlightPresetId()}),d=Vb(p.aspectRatio);if(yield this.vdmFontRegistryService.ensureRegistered(Op({story:p,captionStyles:y,layouts:h})),this.destroyed)throw new Error("[layout-thumb] renderer destroyed");let{canvas:m,gl:a}=XO(d),s;try{let l={layouts:h,presets:{captionStyles:y,colorPalettes:c,highlightPresets:b},lowRes:!0};s=new x(m,l);let g=s.load(p);g.catch(()=>{}),yield this.bounded(g,{label:"load",timeoutMs:this.loadTimeoutMs});let f=jb(E.time,s.duration);this.debugLog({layoutId:t,story:p,time:f,dims:d,width:n,height:o});let v=this.capture({player:s,canvas:m,time:f,width:n,height:o});try{return yield this.bounded(v,{label:"render",timeoutMs:this.renderTimeoutMs});}catch(S){throw v.then(w=>w.close(),()=>{}),S;}}finally{try{s?.dispose();}catch(l){console.warn("[layout-thumb] player dispose failed",l);}try{a.getExtension("WEBGL_lose_context")?.loseContext();}catch{}m.width=0,m.height=0;}});}bounded(e,t){return kt(this,null,function*(){let n,o;try{return yield Promise.race([e,new Promise((_,E)=>{if(this.destroyed){E(new Error("[layout-thumb] renderer destroyed"));return;}o=E,this.abortRejecters.add(E),n=setTimeout(()=>E(new Error(`[layout-thumb] ${t.label} timed out after ${t.timeoutMs}ms`)),t.timeoutMs);})]);}finally{clearTimeout(n),this.abortRejecters.delete(o);}});}capture(e){return kt(this,null,function*(){let{player:t,canvas:n,time:o,width:_,height:E}=e;return yield this.seekAndRender(t,o),yield Fb(HO),createImageBitmap(n,{resizeWidth:_,resizeHeight:E,resizeQuality:"high"});});}seekAndRender(e,t){return kt(this,null,function*(){e.currentTime=t;let n=e.specRenderer;if(typeof n?.renderFrame!="function"){this.warnedMissingSpecRenderer||(this.warnedMissingSpecRenderer=!0,console.warn("[layout-thumb] V2Player has no specRenderer.renderFrame; tiles off the first scene may capture it instead"));return;}yield n.renderFrame(t*1e3);});}debugLog(e){let t=!1;try{t=!!localStorage.getItem(YO);}catch{}if(!t)return;let{layoutId:n,story:o,time:_,dims:E,width:x,height:h}=e;console.info("[layout-thumb]",{layoutId:n,layout:this.vdmPresetsService.layoutsRecord()[n],storyAsLoaded:stru
816cturedClone(o),captionStyle:o.style?.caption??"NONE \u2014 no caption style passed",colorPalette:o.style?.colors??"NONE \u2014 no color palette passed",highlightPreset:o.style?.highlight??"NONE \u2014 no highlight preset passed",thumbTime:_,aspectRatio:o.aspectRatio,backingStore:E,bitmap:{width:x,height:h}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function XO(i){let r=document.createElement("canvas");r.width=i.width,r.height=i.height;let e=r.getContext("webgl2",{premultipliedAlpha:!0,alpha:!0,preserveDrawingBuffer:!0,antialias:!0});if(!e)throw new Error("[layout-thumb] WebGL2 context unavailable");return{canvas:r,gl:e};}mt();hi();var ZO=["canvas"];function QO(i,r){i&1&&(be(0,"div",4),tt(1,"div",5),Oe());}function JO(i,r){if(i&1&&tt(0,"img",6),i&2){let e=Le();ke("src",e.fallbackUrl,An);}}var eP="200px",tP=300;function iP(i){for(let r=i.parentElement;r;r=r.parentElement)if(/(auto|scroll)/.test(getComputedStyle(r).overflowY))return r;return null;}var nP=(i,r)=>i.width===r.width&&i.height===r.height,Ub=(()=>{class i{constructor(){this.state=$t("pending"),this.host=ct(oa),this.zone=ct(To),this.renderer=ct(iu),this.visible=$t(!1),this.size=$t({width:0,height:0},{equal:nP}),this.signature=this.renderer.signature,this.hasDrawn=!1,bo(e=>{let t=this.size();if(!this.visible()||!t.width||!t.height)return;this.signature();let n=setTimeout(()=>this.request(t),this.hasDrawn?tP:0);e(()=>clearTimeout(n));});}ngAfterViewInit(){if(this.observeSize(),typeof IntersectionObserver>"u"){this.visible.set(!0);return;}this.observer=new IntersectionObserver(e=>{let t=e[e.length-1].isIntersecting;t!==this.visible()&&(t||this.pending?.cancel(),this.zone.run(()=>this.visible.set(t)));},{root:iP(this.host.nativeElement),rootMargin:eP}),this.observer.observe(this.host.nativeElement);}ngOnDestroy(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.stopPixelRatioWatch?.(),this.pending?.cancel(),this.pending=void 0;}request({width:e,height:t}){this.pending?.cancel();let n=this.renderer.render({layoutId:this.layoutId,width:e,height:t});this.pending=n,n.result.then(o=>this.zone.run(()=>{this.pending===n&&(this.pending=void 0,this.state.set(this.draw(o)?"ready":"failed"));}),o=>this.zone.run(()=>{this.pending!==n||o instanceof ld||(this.pending=void 0,console.warn("[layout-thumb] snapshot failed",this.layoutId,o),Zs({category:"vdm-v2",level:"warning",message:"layout-thumbnail-failed",data:{layoutId:this.layoutId,detail:o instanceof Error?o.message:String(o)}}),this.state.set("failed"));}));}draw(e){let t=this.canvasRef.nativeElement;try{return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),this.hasDrawn=!0,!0;}catch(n){return console.warn("[layout-thumb] draw failed",this.layoutId,n),!1;}}observeSize(){if(typeof ResizeObserver>"u"){this.size.set(this.bitmapSize());return;}this.resizeObserver=new ResizeObserver(()=>this.zone.run(()=>this.size.set(this.bitmapSize()))),this.resizeObserver.observe(this.host.nativeElement),this.watchPixelRatio();}watchPixelRatio(){if(typeof window.matchMedia!="function")return;let e=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),t=()=>{this.stopPixelRatioWatch(),this.zone.run(()=>this.size.set(this.bitmapSize())),this.watchPixelRatio();};e.addEventListener("change",t),this.stopPixelRatioWatch=()=>e.removeEventListener("change",t);}bitmapSize(){let e=this.host.nativeElement.getBoundingClientRect(),t=window.devicePixelRatio||1;return{width:Math.round(e.width*t),height:Math.round(e.height*t)};}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["layout-thumbnail"]],viewQuery:function(t,n){if(t&1&&fn(ZO,7),t&2){let o;mn(o=gn())&&(n.canvasRef=o.first);}},hostAttrs:["aria-hidden","true"],inputs:{layoutId:"layoutId",fallbackUrl:"fallbackUrl"},standalone:!0,features:[Ft],decls:4,vars:4,consts:[["canvas",""],[1,"layout-thumbnail__canvas"],["class","layout-thumbnail__shimmer",4,"ngIf"],["class","layout-thumbnail__fallback","alt","","loading","lazy",3,"src",4,"ngIf"],[1,"layout-thumbnail__shimmer"],[1,"layout-thumbnail__wave"],["alt","","loading","lazy",1,"layout-thumbnail__fallback",3,"src"]],template:function(t,n){t&1&&(tt(0,"canvas",1,0),at(2,QO,2,0,"div",2)(3,JO,1,1,"img",3)),t&2&&(Di("layout-thumbnail__canvas--hidden",n.state()!=="ready"),Ce(2),ke("ngIf",n.state()==="pending"),Ce(),ke("ngIf",n.state()==="failed"&&n.fallbackUrl));},dependencies:[Ci,ui],styles:["[_nghost-%COMP%]{position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none}.layout-thumbnail__canvas[_ngcontent-%COMP%], .layout-thumbnail__fallback[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.layout-thumbnail__fallback[_ngcontent-%COMP%]{object-fit:cover}.layout-thumbnail__canvas--hidden[_ngcontent-%COMP%]{visibility:hidden}.layout-thumbnail__shimmer[_ngcontent-%COMP%]{position:absolute;inset:0;overflow:hidden;background-color:#f0f3f9}
816.layout-thumbnail__wave[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#fff;opacity:.45;transform:translate(-100%);animation:_ngcontent-%COMP%_layout-thumbnail-wave 1.5s infinite}@keyframes _ngcontent-%COMP%_layout-thumbnail-wave{0%{transform:translate(-100%)}50%,to{transform:translate(100%)}}"],changeDetection:0});}}return i;})();vn();var nu="/img/icon-library/video-maker/layouts",Hm={captions:`${nu}/layout-captions.svg`,titles:`${nu}/layout-titles.svg`,dynamic:`${nu}/layout-dynamic.svg`,sideBySide:`${nu}/layout-side-by-side.svg`,pictureInPicture:`${nu}/layout-picture-in-picture.svg`,greenScreen:`${nu}/layout-green-screen.svg`},ul={captions:"Captions",titles:"Titles",dynamic:"Dynamic",sideBySide:"Side-by-Side",pictureInPicture:"Picture-in-Picture",greenScreen:"Green Screen"},rP="/img/video-maker/layouts",oP=`${rP}/layout-preview-placeholder.webp`,aP={},sP={captions:"Captions",titles:"Titles",sideBySide:"Side-by-Side",pictureInPicture:"Picture-in-Picture",presenter:"Presenter",greenScreen:"Green Screen"},lP={"Headline Stroke":"Caption Box"},cP="Layout",uP="<untyped>",Gb=new Set();function Ap(i){let r=sP[i.type]??lP[i.name];if(r)return r;let e=i.name??uP;if(!Gb.has(e)){Gb.add(e);let t=`No layout label for type "${i.type}" / name "${i.name}" (layout ${i.id})`;console.warn(t),cr(t);}return i.name??cP;}function zb(i){return Hm[qo(i)];}function Hb(i){return aP[i.type]??oP;}hi();_r();mt();hi();function dP(i,r){if(i&1&&(be(0,"span",3),lt(1),Oe()),i&2){let e=r.$implicit,t=Le();Di("layout-apply-note__text--hidden",e!==t.text),Ei("aria-hidden",e!==t.text||null),Ce(),_i(e);}}var Mp=(()=>{class i{constructor(){this.infoIcon="/img/icon-library/symbols/Info.svg";}get notes(){return this.texts?.includes(this.text)?this.texts:[...(this.texts??[]),this.text];}trackByIndex(e){return e;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["layout-apply-note"]],inputs:{text:"text",texts:"texts"},standalone:!0,features:[Ft],decls:3,vars:3,consts:[[1,"layout-apply-note__icon",3,"content"],[1,"layout-apply-note__texts"],["class","layout-apply-note__text",3,"layout-apply-note__text--hidden",4,"ngFor","ngForOf","ngForTrackBy"],[1,"layout-apply-note__text"]],template:function(t,n){t&1&&(tt(0,"lib-icon",0),be(1,"span",1),at(2,dP,2,4,"span",2),Oe()),t&2&&(ke("content",n.infoIcon),Ce(2),ke("ngForOf",n.notes)("ngForTrackBy",n.trackByIndex));},dependencies:[Ci,an,Pc],styles:["[_nghost-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:8px;border-radius:8px;background-color:#f9fafb;color:#6b7280;font-family:Inter,sans-serif;font-size:12px;line-height:1.5;letter-spacing:-.12px}.layout-apply-note__icon[_ngcontent-%COMP%]{flex:none;width:16px;height:16px;margin-top:1px}.layout-apply-note__texts[_ngcontent-%COMP%]{display:grid;min-width:0}.layout-apply-note__text[_ngcontent-%COMP%]{grid-area:1/1}.layout-apply-note__text--hidden[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0});}}return i;})();var cd=["thisScene","next1","next2","next3","allOfType","all"],xa="thisScene",$m="changeTemplate",hP="applyTo",$b="/img/icon-library/video-maker/layouts",pP={thisScene:0,next1:1,next2:2,next3:3};function ru(i){return cd.includes(i);}function Rp({scope:i,currentIndex:r,scenes:e,target:t}){let n=e?.length??0;if(r<0||r>=n)return[];let o=Array.from({length:n},(E,x)=>x);if(i==="all")return o;if(i==="allOfType")return t?o.filter(E=>e[E]?.target===t):[];let _=r+(pP[i]??0);return _<n?o.slice(r,_+1):[];}function Lp(i){let{layout:r,scenes:e}=i,t=Rp(i);return!!r&&!!t.length&&t.every(n=>al(r,e[n]?.mediaCount??0));}function Wm(i){return i.layouts.find(r=>Lp(st(Ke({},i),{layout:r})));}function Wb(i){return cd.map(r=>({value:r,name:qm(st(Ke({},i),{scope:r})),disabled:!Wm(st(Ke({},i),{scope:r}))}));}function qb(i){return[{value:$m,name:"Change Template",sideIconClass:`${$b}/menu-change-template.svg`},{value:hP,name:"Apply to",sideIconClass:`${$b}/menu-apply-to.svg`,trailingText:i.find(r=>r.value===xa)?.name,submenuTitle:"APPLY TO",submenuWidth:"272px",submenuFooter:!0,children:i}];}function qm({scope:i,scenes:r,target:e}){switch(i){case"next1":return"This + next scene";case"next2":return"This + next 2 scenes";case"next3":return"This + next 3 scenes";
816case"allOfType":return"All "+Xb(e)+" scenes ("+Kb({scenes:r,target:e})+")";case"all":return"All scenes ("+(r?.length??0)+")";default:return"This scene";}}function Yb({scope:i,scenes:r,target:e}){let t="Text, media and captions stay in place.";switch(i){case"next1":return`${"Swaps the template on this scene and the next one."} ${t}`;case"next2":return`${"Swaps the template on this scene and the next 2."} ${t}`;case"next3":return`${"Swaps the template on this scene and the next 3."} ${t}`;case"allOfType":return`${"Swaps the template on all "+Kb({scenes:r,target:e})+" "+Xb(e)+" scenes."} ${t}`;case"all":return`${"Swaps the template on all "+(r?.length??0)+" scenes."} ${t}`;default:return`${"Swaps the template on this scene only."} ${t}`;}}function Xb(i){return i?ul[i]:"";}function Kb({scenes:i,target:r}){return r?(i??[]).filter(e=>e?.target===r).length:0;}mt();Bn();mt();mt();Or();var fP=["layouts"],ko=(()=>{class i{constructor(e,t,n,o,_){this.vdmPresetsService=e,this.composerSlideSelectionService=t,this.sliderV2StoryService=n,this.eventsService=o,this.composerEventsService=_,this.catalog=xt(()=>this.vdmPresetsService.pickableLayouts()),this.selectedLayoutId=xt(()=>this.sliderV2StoryService.story()?.media?.[this.composerSlideSelectionService.index()]?.metadata?.templateIds?.[0]),this.selectedLayoutTarget=xt(()=>qo(this.fullLayoutOf(this.selectedLayoutId()))),this.slideMediaCount=xt(()=>this.sliderV2StoryService.story()?.media?.[this.composerSlideSelectionService.index()]?.media?.length??0),this.scenes=xt(()=>(this.sliderV2StoryService.story()?.media??[]).map(E=>({mediaCount:E?.media?.length??0,target:qo(this.fullLayoutOf(E?.metadata?.templateIds?.[0]))})),{equal:mP}),this.pickedLayoutIdByTarget=$t(new Map()),this.rememberedLayoutIdByTarget=xt(()=>{let E=this.pickedLayoutIdByTarget(),x=this.mostUsedLayoutIdByTarget(this.sliderV2StoryService.story());return new Map(ks.map(h=>[h,[E.get(h),x.get(h)].find(y=>!!this.layoutOf(y))??cp({catalog:this.catalog(),target:h,mediaCount:Number.POSITIVE_INFINITY})?.id]));},{equal:gP}),this.panelTypeState=$t(void 0),this.panelType=this.panelTypeState.asReadonly(),this.tiles=xt(()=>{let E=this.selectedLayoutTarget(),x=this.slideMediaCount(),h=this.scenes(),y=this.composerSlideSelectionService.index();return ks.map(b=>{let p=this.tileLayout({target:b,selectedTarget:E,mediaCount:x}),c=this.scopeCandidates({target:b,selectedTarget:E,mediaCount:x});return Ke({target:b,label:ul[b],glyph:Hm[b],layoutId:p?.id,styleName:p?Ap(p):void 0,menuTitle:(""+ul[b]+" layout").toLocaleUpperCase(),menuOptions:qb(Wb({currentIndex:y,scenes:h,target:b,layouts:c})),selected:b===E},this.targetCompatibility(b,x));});}),this.catalogTiles=xt(()=>{let E=this.selectedLayoutId(),x=this.slideMediaCount();return this.catalog().map(h=>Ke({id:h.id,label:Ap(h),preview:Hb(h),type:h.type,targets:h.targets??[],target:qo(h),selected:h.id===E},this.compatibility(h,x)));}),this.previewAspectRatio=xt(()=>{let{width:E,height:x}=Ea[this.sliderV2StoryService.story()?.aspectRatio]??Ea.vertical;return`${E} / ${x}`;}),this.loaded=this.vdmPresetsService.loaded,this.hasLayouts=xt(()=>!!this.catalog().length),this.error=xt(()=>{let E=this.vdmPresetsService.failedCatalogs().filter(x=>fP.includes(x)).map(x=>ad[x]);return E.length?"Could not load "+E.join(", ")+". Please try again later.":void 0;});}select(e){this.pin(e)&&this.remember(e);}selectTarget(e){let t=this.selectedLayoutTarget();return!e||e===t?!1:this.pin(this.tileLayout({target:e,selectedTarget:t,mediaCount:this.slideMediaCount()})?.id);}applyToScope({target:e,scope:t}){let n=this.scopeCandidates({target:e,selectedTarget:this.selectedLayoutTarget(),mediaCount:this.slideMediaCount()}),o=Wm({scope:t,target:e,layouts:n,currentIndex:this.composerSlideSelectionService.index(),scenes:this.scenes()});this.applyLayoutToScope({layoutId:o?.id,scope:t,target:e,remember:!!o&&o===n[0]});}applyLayoutToScope({layoutId:e,scope:t,target:n,remember:o=!0}){let _=this.layoutOf(e),E={scope:t,target:n,currentIndex:this.composerSlideSelectionService.index(),scenes:this.scenes()};if(!Lp(st(Ke({},E),{layout:_})))return;let x=Rp(E),h=this.sliderV2StoryService.story()?.media??[],y=cl(_),b=y?this.spreadTitle({scope:t,indices:x,currentIndex:E.currentIndex}):void 0;x.every(p=>h[p]?.metadata?.templateIds?.[0]===e&&(b===void 0||h[p]?.metadata?.resources?.title===b))||(this.sliderV2StoryService.setSlidesTemplateIds(Ke({indices:x,templateIds:[e],bindsTitle:y},b!==void 0&&{title:b})),o&&this.remember(e),t==="all"?this.composerEventsService.log(this.eventsService.events.composer.layoutApplyAll):t==="thisScene"&&this.logLayoutChange(E.currentIndex));}showPanelType(e){this.panelTypeState.set(e);}hasSavedStyle(e){return this.pickedLayoutIdByTarget().has(e)||this.scenes().some(t=>t.target===e);}scopeNote({scope:e,target:t}){return Yb({scope:e,target:t,scenes:this.scenes()});}scopeNotes(e){return cd.map(t=>this.scopeNote({scope:t,target:e}));}panelScopeOptions(e){let t={currentIndex:this.composerSlideSelectionService.index(),scenes:this.scenes(),target:e};return cd.map(n=>({value:n,name:qm(st(Ke({},t),{scope:n})),disabled:!Rp(st(Ke({},t),{scope:n})).length}));}scopeFits({layoutId:e,scope:t,target:n}){return Lp({scope:t,target:n,layout:this.layoutOf(e),currentIndex:this.composerSlideSelectionService.index(),scenes:this.scenes()});}pin(e){if(!e||e===this.selectedLayoutId())return!1;let t=this.layoutOf(e);if(!t||!al(t,this.slideMediaCount()))return!1;let n=this.composerSlideSelectionService.index();return this.sliderV2StoryService.setSlideTemplateIds({index:n,templateIds:[e],bindsTitle:cl(t)}),this.logLayoutChange(n),!0;}logLayoutChange(e){this.composerEventsService.log(this.eventsService.events.composer.layoutChange,{slideNum:(e+1).toString()});}remember(e){let t=qo(this.layoutOf(e));t&&this.pickedLayoutIdByTarget.update(n=>new Map(n).set(t,e));}tileLayout({target:e,selectedTarget:t,mediaCount:n}){if(e===t)return this.layoutOf(this.selectedLayoutId());let o=this.layoutOf(this.rememberedLayoutIdByTarget().get(e));return(al(o,n)?o:void 0)??cp({catalog:this.catalog(),target:e,mediaCount:n})??o;}scopeCandidates({target:e,selectedTarget:t,mediaCount:n}){let o=e===t?this.layoutOf(this.selectedLayoutId()):this.layoutOf(this.rememberedLayoutIdByTarget().get(e)),_=this.catalog().filter(h=>qo(h)===e),E=[..._.filter(h=>h.options?.isDefault),..._.filter(h=>!h.options?.isDefault)],x=[this.tileLayout({target:e,selectedTarget:t,mediaCount:n}),...E].filter(h=>!!h&&h!==o);return[o,...new Set(x)];}mostUsedLayoutIdByTarget(e){let t=new Map(),n=new Map();for(let o of e?.media??[]){let _=this.layoutOf(o?.metadata?.templateIds?.[0]),E=qo(_);if(!E)continue;let x=(t.get(_.id)??0)+1;t.set(_.id,x),(!n.has(E)||x>t.get(n.get(E)))&&n.set(E,_.id);}return n;}labelFor(e){let t=this.fullLayoutOf(e);return t?Ap(t):void 0;}glyphFor(e){let t=this.fullLayoutOf(e);return t?zb(t):void 0;}bindsTitleFor(e){return cl(this.fullLayoutOf(e));}layoutOf(e){return e?this.catalog().find(t=>
816t.id===e):void 0;}spreadTitle({scope:e,indices:t,currentIndex:n}){if(e===xa||!t.includes(n))return;let o=this.sliderV2StoryService.story();return(o?.media?.[n]?.metadata?.resources?.title??(o?.headline??"").trim()).slice(0,1e3);}fullLayoutOf(e){return e?this.vdmPresetsService.layoutById().get(e):void 0;}compatibility(e,t){return{disabled:!al(e,t)};}targetCompatibility(e,t){let n=this.catalog().filter(o=>qo(o)===e);return{disabled:!n.length||!cp({catalog:n,target:e,mediaCount:t})};}static{this.ɵfac=function(t){return new(t||i)(Rt(Io),Rt(Rn),Rt(Yi),Rt(Ji),Rt(en));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function mP(i,r){return i.length===r.length&&i.every((e,t)=>e.mediaCount===r[t].mediaCount&&e.target===r[t].target);}function gP(i,r){return i.size===r.size&&[...i].every(([e,t])=>r.get(e)===t);}hi();function vP(i,r){if(i&1){let e=_t();be(0,"div",25)(1,"lib-button-icon",26),Ze("clicked",function(){$e(e);let n=Le(2);return We(n.onTypeBack());}),Oe(),be(2,"h2",27),lt(3),Oe()();}if(i&2){let e=Le(2);Ce(),ke("iconContent",e.backIcon),Ce(2),_i(e.panelTypeTitle());}}function _P(i,r){i&1&&(be(0,"h2",27),li(1,7),Oe());}function bP(i,r){if(i&1){let e=_t();ti(0),at(1,vP,4,2,"div",20)(2,_P,2,0,"ng-template",null,2,Vi),be(4,"div",21)(5,"lib-button-icon",22),Ze("clicked",function(){$e(e);let n=Le();return We(n.onSearchToggle());}),Oe(),be(6,"lib-button-icon",23),Ze("clicked",function(){$e(e);let n=Le();return We(n.onFiltersOpen());}),Oe(),be(7,"lib-button-icon",24),Ze("clicked",function(){$e(e);let n=Le();return We(n.close());}),Oe()(),ii();}if(i&2){let e=mi(3),t=Le();Ce(),ke("ngIf",t.panelType())("ngIfElse",e),Ce(4),ke("iconContent",t.searchIcon)("active",t.searchOpen()),Ce(),ke("disabled",!t.filtersEnabled)("iconContent",t.filterIcon)("active",!!t.appliedTags().size)("countIndicator",t.appliedTags().size||null),Ce(),ke("iconContent",t.closeIcon);}}function SP(i,r){if(i&1){let e=_t();be(0,"lib-button-icon",28),Ze("clicked",function(){$e(e);let n=Le();return We(n.onFiltersBack());}),Oe(),be(1,"h2",29),li(2,8),Oe(),be(3,"lib-button-icon",30),Ze("clicked",function(){$e(e);let n=Le();return We(n.close());}),Oe();}if(i&2){let e=Le();ke("iconContent",e.backIcon),Ce(3),ke("iconContent",e.closeIcon);}}function wP(i,r){if(i&1){let e=_t();be(0,"lib-search",31),Ze("valueChange",function(n){$e(e);let o=Le();return We(o.onSearchChange(n));})("clear",function(){$e(e);let n=Le();return We(n.onSearchClear());}),Oe();}if(i&2){let e=Le();ke("label",!1)("hasClearButton",!0)("value",e.searchTerm());}}function EP(i,r){if(i&1){let e=_t();be(0,"layouts-filters-view",32),Ze("apply",function(n){$e(e);let o=Le();return We(o.onFiltersApply(n));}),Oe();}if(i&2){let e=Le();ke("selected",e.appliedTags());}}function xP(i,r){if(i&1&&tt(0,"scene-layouts-shimmer",37),i&2){let e=Le(2);ke("tileCount",e.shimmerTileCount);}}function TP(i,r){if(i&1&&(be(0,"p",38),lt(1),Oe()),i&2){let e=Le(2);Ce(),_i(e.error());}}function CP(i,r){if(i&1&&(be(0,"h3",46),lt(1),Oe()),i&2){let e=Le().$implicit;ke("id","layouts-section-"+e.target),Ce(),_i(e.title);}}function OP(i,r){if(i&1){let e=_t();be(0,"lib-layout-banner",47),Ze("clicked",function(){let n=$e(e).$implicit,o=Le(5);return We(o.onLayoutSelected(n.id));}),tt(1,"layout-thumbnail",48),Oe();}if(i&2){let e=r.$implicit;ke("imageUrl",e.preview)("title",e.label)("value",e.id)("selected",e.selected)("showFavorite",!1),Ce(),ke("layoutId",e.id)("fallbackUrl",e.preview);}}function PP(i,r){if(i&1&&(be(0,"section",42),at(1,CP,2,2,"h3",43),be(2,"div",44),at(3,OP,2,7,"lib-layout-banner",45),Oe()()),i&2){let e=r.$implicit,t=Le(4);Ce(),ke("ngIf",!t.panelType()),Ce(),Ei("aria-labelledby",t.panelType()?null:"layouts-section-"+e.target)("aria-label",t.panelType()?e.title:null),Ce(),ke("ngForOf",e.tiles)("ngForTrackBy",t.trackByLayoutId);}}function IP(i,r){if(i&1&&(be(0,"div",40),at(1,PP,4,5,"section",41),Oe()),i&2){let e=Le(3);Ce(),ke("ngForOf",e.visibleSections())("ngForTrackBy",e.trackBySectionTarget);}}function kP(i,r){i&1&&(be(0,"p",50),li(1,9),Oe());}function AP(i,r){i&1&&(be(0,"p",50),li(1,10),Oe());}function MP(i,r){if(i&1&&at(0,AP,2,0,"p",49),i&2){Le();let e=mi(4),t=Le(3);ke("ngIf",t.hasLayouts())("ngIfElse",e);}}function RP(i,r){i&1&&(be(0,"p",50),li(1,11),Oe());}function LP(i,r){if(i&1&&at(0,kP,2,0,"p",49)(1,MP,1,2,"ng-template",null,4,Vi)(3,RP,2,0,"ng-template",null,5,Vi),i&2){let e=mi(2),t=Le(3);ke("ngIf",t.hasFilters())("ngIfElse",e);}}function DP(i,r){if(i&1&&(ti(0),at(1,IP,2,2,"div",39)(2,LP,5,2,"ng-template",null,3,Vi),ii()),i&2){let e=mi(3),t=Le(2);Ce(),ke("ngIf",t.visibleSections().length)("ngIfElse",e);}}function NP(i,r){if(i&1&&(be(0,"div",33),at(1,xP,1,1,"scene-layouts-shimmer",34)(2,TP,2,1,"p",35)(3,DP,4,2,"ng-container",36),Oe()),i&2){let e=Le();Li("--layout-banner-fi-aspect-ratio",e.previewAspectRatio()),Ce(),ke("ngIf",!e.loaded()),Ce(),ke("ngIf",e.loaded()&&e.error()),Ce(),ke("ngIf",e.loaded());}}function VP(i,r){i&1&&(be(0,"span",56),li(1,13),Oe());}function jP(i,r){if(i&1&&tt(0,"layout-apply-note",57),i&2){Le();let e=mi(4),t=Le();ke("text",t.noteFor(e.filteredOptions[e.highlightedIndex]))("texts",t.notes());}}
816function BP(i,r){if(i&1){let e=_t();be(0,"div",51)(1,"span",52),li(2,12),Oe(),be(3,"lib-dropdown",53,6),Ze("valueChange",function(n){$e(e);let o=Le();return We(o.onScopeChange(n));}),at(5,VP,2,0,"ng-template",54)(6,jP,1,2,"ng-template",55),Oe()();}if(i&2){let e=Le();Ce(3),ke("label",!1)("options",e.scopeOptions())("value",e.scope())("showSeparators",!1);}}var FP="/img/icon-library/symbols/exit-close.svg",UP="/img/icon-library/symbols/chevron-left.svg",GP="/img/icon-library/symbols/search.svg",zP="/img/icon-library/sorting & filtering/Filter.svg",HP=12,Zb=(()=>{class i extends Fn{constructor(e,t,n,o,_){super(e),this.data=e,this.dialogRef=t,this.composerLayoutsService=n,this.sliderV2PlayerService=o,this.layoutThumbnailRendererService=_,this.closeIcon=FP,this.backIcon=UP,this.searchIcon=GP,this.filterIcon=zP,this.filtersEnabled=!1,this.shimmerTileCount=HP,this.view=$t("catalog"),this.searchOpen=$t(!1),this.searchTerm=$t(""),this.appliedTags=$t(new Set()),this.loaded=this.composerLayoutsService.loaded,this.hasLayouts=this.composerLayoutsService.hasLayouts,this.error=this.composerLayoutsService.error,this.previewAspectRatio=this.composerLayoutsService.previewAspectRatio,this.panelType=this.composerLayoutsService.panelType,this.panelTypeTitle=xt(()=>ul[this.panelType()]),this.leadTarget=$t(void 0),this.scope=$t(xa),this.activeScope=xt(()=>this.panelType()?xa:this.scope()),this.scopeTarget=this.composerLayoutsService.selectedLayoutTarget,this.scopeOptions=xt(()=>this.composerLayoutsService.panelScopeOptions(this.scopeTarget())),this.visibleSections=xt(()=>{let E=this.appliedTags(),x=this.searchTerm().trim().toLowerCase(),h=this.activeScope(),y=this.scopeTarget(),b=this.panelType(),p=this.composerLayoutsService.catalogTiles().filter(c=>!b||c.target===b).filter(c=>!E.size||E.has(c.type)).filter(c=>!x||c.label.toLowerCase().includes(x)).filter(c=>c.selected||this.fitsScope({tile:c,scope:h,target:y}));return P0({tiles:p,leadTarget:this.leadTarget()}).map(c=>st(Ke({},c),{title:ul[c.target]}));}),this.hasFilters=xt(()=>!!this.appliedTags().size||!!this.searchTerm().trim()),this.unsubscribe$=new Yt(),bo(()=>{this.panelType()||oh(()=>this.scope.set(xa));},{allowSignalWrites:!0});}ngOnInit(){this.leadTarget.set(this.composerLayoutsService.selectedLayoutTarget()),this.sliderV2PlayerService.playing()&&this.sliderV2PlayerService.stop(),this.layoutThumbnailRe
816ndererService.syncPlayhead(),this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}onSearchToggle(){let e=!this.searchOpen();this.searchOpen.set(e),e||this.searchTerm.set("");}onSearchChange(e){this.searchTerm.set(e??"");}onSearchClear(){this.searchTerm.set("");}onFiltersOpen(){this.view.set("filters");}onFiltersBack(){this.view.set("catalog");}onFiltersApply(e){this.appliedTags.set(e),this.view.set("catalog");}onTypeBack(){this.composerLayoutsService.showPanelType(void 0);}onLayoutSelected(e){let t=this.activeScope();t===xa?this.composerLayoutsService.select(e):this.composerLayoutsService.applyLayoutToScope({layoutId:e,scope:t,target:this.scopeTarget()});}onScopeChange(e){if(!ru(e))return;this.scope.set(e);let t=this.composerLayoutsService.selectedLayoutId();t&&this.composerLayoutsService.applyLayoutToScope({layoutId:t,scope:e,target:this.scopeTarget()});}noteFor(e){return this.composerLayoutsService.scopeNote({scope:ru(e?.value)?e.value:this.scope(),target:this.scopeTarget()});}notes(){return this.composerLayoutsService.scopeNotes(this.scopeTarget());}fitsScope({tile:e,scope:t,target:n}){return!e.disabled&&(t===xa||this.composerLayoutsService.scopeFits({layoutId:e.id,scope:t,target:n}));}trackBySectionTarget(e,t){return t.target;}trackByLayoutId(e,t){return t.id;}static{this.ɵfac=function(t){return new(t||i)(ut(jn),ut(br),ut(ko),ut(Sr),ut(iu));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-layouts-panel"]],standalone:!0,features:[Mn,Ft],decls:10,vars:6,consts:()=>{let e;e="Search layouts";let t;t="Search layouts";let n;n="Filter layouts";let o;o="Close";let _;_="Back to all templates";let E;E="Layouts";let x;x="Back to layouts";let h;h="Close";let y;y="Layout Filters";let b;b=" No layouts match your search or filters. ";let p;p="No layouts fit this scene.";let c;c="No layouts available yet.";let d;d="Apply to";let m;return m="APPLY TO",[["filtersHead",""],["catalog",""],["allTitle",""],["noResults",""],["emptyCatalog",""],["noCatalog",""],["applyTo",""],E,y,b,p,c,d,m,[1,"layouts-panel"],[1,"layouts-panel__head"],[4,"ngIf","ngIfElse"],["class","layouts-panel__search","placeholder",e,3,"label","hasClearButton","value","valueChange","clear",4,"ngIf"],[3,"selected","apply",4,"ngIf","ngIfElse"],["class","layouts-panel__footer",4,"ngIf"],["class","layouts-panel__title-group",4,"ngIf","ngIfElse"],[1,"layouts-panel__actions"],["size","md","variant","ghost","aria-label",t,3,"clicked","iconContent","active"],["size","md","variant","ghost","aria-label",n,3,"clicked","disabled","iconContent","active","countIndicator"],["size","md","variant","ghost","aria-label",o,3,"clicked","iconContent"],[1,"layouts-panel__title-group"],["size","md","variant","ghost","aria-label",_,3,"clicked","iconContent"],[1,"layouts-panel__title"],["size","md","variant","ghost","aria-label",x,3,"clicked","iconContent"],[1,"layouts-panel__title","layouts-panel__title--filters"],["size","md","variant","ghost","aria-label",h,3,"clicked","iconContent"],["placeholder",e,1,"layouts-panel__search",3,"valueChange","clear","label","hasClearButton","value"],[3,"apply","selected"],[1,"layouts-panel__body"],["variant","grid",3,"tileCount",4,"ngIf"],["class","layouts-panel__error",4,"ngIf"],[4,"ngIf"],["variant","grid",3,"tileCount"],[1,"layouts-panel__error"],["class","layouts-panel__sections",4,"ngIf","ngIfElse"],[1,"layouts-panel__sections"],["class","layouts-panel__section",4,"ngFor","ngForOf","ngForTrackBy"],[1,"layouts-panel__section"],["class","layouts-panel__section-title",3,"id",4,"ngIf"],["role","radiogroup",1,"layouts-panel__grid"],["mode","full-image",3,"imageUrl","title","value","selected","showFavorite","clicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"layouts-panel__section-title",3,"id"],["mode","full-image",3,"clicked","imageUrl","title","value","selected","showFavorite"],["libLayoutBannerPreview","",3,"layoutId","fallbackUrl"],["class","layouts-panel__empty",4,"ngIf","ngIfElse"],[1,"layouts-panel__empty"],[1,"layouts-panel__footer"],[1,"layouts-panel__footer-label"],["menuMaxHeight","none",1,"layouts-panel__footer-field",3,"valueChange","label","options","value","showSeparators"],["libDropdownHeader",""],["libDropdownFooter",""],[1,"layouts-panel__footer-menu-title"],[3,"text","texts"]];},template:function(t,n){if(t&1&&(be(0,"div",14)(1,"div",15),at(2,bP,8,9,"ng-container",16)(3,SP,4,2,"ng-template",null,0,Vi),Oe(),at(5,wP,1,3,"lib-search",17)(6,EP,1,1,"layouts-filters-view",18)(7,NP,4,5,"ng-template",null,1,Vi)(9,BP,7,4,"div",19),Oe()),t&2){let o=mi(4),_=mi(8);Ce(2),ke("ngIf",n.view()==="catalog")("ngIfElse",o),Ce(3),ke("ngIf",n.view()==="catalog"&&n.searchOpen()),Ce(),ke("ngIf",n.view()==="filters")("ngIfElse",_),Ce(3),ke("ngIf",n.view()==="catalog"&&!n.panelType());}},dependencies:[Ci,an,ui,Rr,vh,Uv,Gv,wh,Wv,Nv,xp,Eb,Ub,Mp],styles:["[_nghost-%COMP%]{display:block;height:100%}.layouts-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background-color:#fff;font-family:Inter,sans-serif}.layouts-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:72px;padding:16px 24px;border-bottom:1px solid #E5E7EB}.layouts-panel__title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:600;line-height:1.4;color:#253658}.layouts-panel__title--filters[_ngcontent-%COMP%]{flex:1 1 auto}.layouts-panel__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.layouts-panel__search[_ngcontent-%COMP%]{flex-shrink:0;padding:16px 24px 0}.layouts-panel__body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;padding:20px 24px 24px}.layouts-panel__sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.layouts-panel__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.layouts-panel__section-title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.14px;color:#253658}.layouts-panel__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px}.layouts-panel__grid[_ngcontent-%COMP%] lib-layout-banner[_ngcontent-%COMP%]{--layout-banner-width: 100%}.layouts-panel__error[_ngcontent-%COMP%]{margin:0 0 16px;font-size:13px;line-height:1.4;color:#dc2626}.layouts-panel__empty[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.4;color:#4b5563}.layouts-panel__title-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px;min-width:0}.layouts-panel__footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:16px 24px;border-top:1px solid #E5E7EB}.layouts-panel__footer-label[_ngcontent-%COMP%]{flex:none;font-size:14px;font-weight:500;color:#6b7280}.layouts-panel__footer-field[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.layouts-panel__footer-menu-title[_ngcontent-%COMP%]{display:block;padding:8px 4px 0;font-size:12px;font-weight:500;line-height:1.4;letter-spacing:-.12px;color:#6b7280}"],changeDetection:0});}}return i;})();hi();Bn();Oo();Cc();mt();sa();Ki();Mr();es();mt();im();var Vl="SOUNDBED_NONE_ID",$P=1e3,WP=500,qP=1,ou=5,Qb={genre:[],mood:[],vibe:[]},Jb={genre:[],mood:[],vibe:[]},Ir={boostAudio:!1,musicLibrary:[],selectedId:void 0,previewMusicId:void 0,mixerLevel:ou,activeFilters:Ke({},Qb),filterOptions:Ke({},Jb)},Dp=()=>Ti((i,r)=>JSON.stringify(i)===JSON.stringify(r)),YP=i=>{switch(i){case"audio/mpeg":case"audio/mp3":return"mp3";case"audio/wav":return"wav";default:return;}},XP="img/composer/music-modal/music-item-thumbnail-purple.jpg",KP="img/composer/music-modal/music-item-thumbnail-pink.jpg",ZP="img/mediaAssets/audio/none.jpg",QP=i=>i.length%2?XP:KP,Np=(()=>{class i{constructor(e,t,n,o,_,E){if(this.storyService=e,this.videoSlidesService=t,this.composerHttpService=n,this.composerService=o,this.requestsService=_,this.sliderV2StoryService=ct(Yi),this.isSliderV2=Xn()==="v2",this.sliderV2AudioState$=Ho(this.sliderV2StoryService.story).pipe(oi(h=>({selectedId:this.resolveSoundbedId(h?.soundbed),mixerLevel:h?.soundbed?Math.round((h.soundbed.volume??1)*100):ou,boostAudio:!!h?.audioNorm})),Dp()),this.destroyed=!1,this.store=new yr(Ir),this.state$=this.store.asObservable(),this.musicLibrary$=this.state$.pipe(oi(h=>h.musicLibrary),Dp(),Ri({refCount:!0,bufferSize:1})),this.boostAudio$=this.state$.pipe(oi(h=>h.boostAudio),Ti(),Ri({refCount:!0,bufferSize:1})),this.selectedId$=this.state$.pipe(oi(h=>h.selectedId),Ti(),Ri({refCount:!0,bufferSize:1})),this.mixerLevel$=this.state$.pipe(oi(h=>h.mixerLevel),Ti(),Ri({refCount:!0,bufferSize:1})),this.previewMusicId$=this.state$.pipe(oi(h=>h.previewMusicId),Ti(),Ri({refCount:!0,bufferSize:1})),this.activeFilters$=this.state$.pipe(oi(h=>h.activeFilters),Dp(),Ri({refCount:!0,bufferSize:1})),this.filterOptions$=this.state$.pipe(oi(h=>h.filterOptions),Dp(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.previewMusicObserver$=new Yt(),this.musicMixerDebounceValueObserver$=new Yt(),this.previewDuration=0,this.sidebarMusicModalViewModel$=Vn([this.boostAudio$,this.musicLibrary$,this.selectedId$,this.previewMusicId$,this.mixerLevel$,this.activeFilters$,this.filterOptions$]).pipe(oi(([h,y,b,p,c,d,m])=>{let a=(d.genre?.length||0)+(d.mood?.length||0)+(d.vibe?.length||0);return{boostAudio:h,musicLibrary:y,selectedId:b,previewMusicId:p,mixerLevel:c,musicNoneId:Vl,activeFilterCount:a,filterOptions:m,activeFilters:d};})),E)throw new Error("SidebarMusicModalService is already loaded");this.loadFilterOptions(),this.isSliderV2?this.sliderV2AudioState$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{this.updateState(ei(Ir,y=>{y.selectedId=h.selectedId,y.mixerLevel=h.mixerLevel,y.boostAudio=h.boostAudio;}));}):this.storyService.hotfix_changesMadeByUndoRedo$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{this.storyMusicPlayer.src=h.story.audio.url,this.storyMusicPlayer.load();let y=this.resolveSoundbedId(h.story.soundbed);this.updateState(ei(Ir,b=>{b.selectedId=y,b.mixerLevel=h.story.soundbed?Math.round((h.story.soundbed.volume??1)*100):ou,b.boostAudio=h.story.composerSessionState.audioNorm;}));}),this.previewMusicObserver$.pipe(av(h=>h?_o($P):_o(0)),Pt(this.unsubscribe$)).subscribe(h=>
816{if(h){let y=this.store.getValue();for(let b of y.musicLibrary)if(b.id===h){this.previewMusicPlayer.src=b.url,this.previewMusicPlayer.load(),this.storyMusicPlayer.currentTime=0,this.previewDuration=b.duration,this.playPreviewMusic(h);break;}}else this.stopPreviewMusic();}),this.musicMixerDebounceValueObserver$.pipe(On(WP),Pt(this.unsubscribe$)).subscribe(h=>{if(this.isSliderV2){this.sliderV2StoryService.setSoundbedVolume(h/100,"soundbed:volume");return;}this.storyService.updateSoundbedVolume(h);}),this.onAudioTimeUpdate=h=>{!this.previewMusicPlayer.paused&&!this.previewMusicPlayer.ended&&(this.previewMusicPlayer.currentTime>=this.previewDuration||this.storyMusicPlayer.paused)&&this.stopPreviewMusic();};let x=this.mainAudioUrl();this.storyMusicPlayer=x?new Audio(x):new Audio(),this.previewMusicPlayer=new Audio(),this.previewMusicPlayer.addEventListener("timeupdate",this.onAudioTimeUpdate);}updateState(e){Ir=e,this.store.next(Ir);}playPreviewMusic(e){let t=this.store.getValue();this.previewMusicPlayer.volume=t.mixerLevel/100,this.storyMusicPlayer.volume=1-this.previewMusicPlayer.volume,this.storyMusicPlayer.play().then(n=>{this.updateState(ei(Ir,o=>{o.previewMusicId=e;}));}).catch(n=>{Ir.previewMusicId!==void 0&&(console.error(`Error! unable to play musicId: ${e}`,n),this.stopPreviewMusic());}),this.previewMusicPlayer.play().then(n=>{this.updateState(ei(Ir,o=>{o.previewMusicId=e;}));}).catch(n=>{Ir.previewMusicId!==void 0&&(console.error(`Error! unable to play musicId: ${e}`,n),this.stopPreviewMusic());});}stopPreviewMusic(){this.previewDuration=0,this.storyMusicPlayer.pause(),this.storyMusicPlayer.currentTime=0,this.previewMusicPlayer.pause(),this.previewMusicPlayer.currentTime=0,this.updateState(ei(Ir,e=>{e.previewMusicId=void 0;}));}onBoostAudio(e){this.isSliderV2?this.sliderV2StoryService.setAudioNorm(e):(this.storyService.updateSoundbedAudioNorm(e),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarMusicModalService$->onBoostAudio$",buildAgain:!1,changeMade:!0})),this.updateState(ei(Ir,t=>{t.boostAudio=e;}));}onMixerSliderChange(e){let t=e.target;if(this.musicMixerDebounceValueObserver$.next(parseInt(t.value)),this.previewMusicPlayer.volume=parseInt(t.value)/100,this.storyMusicPlayer.volume=1-this.previewMusicPlayer.volume,this.previewDuration=this.previewMusicPlayer.currentTime+qP,this.storyMusicPlayer.paused||this.previewMusicPlayer.paused){let n=this.store.getValue();this.previewMusicPlayer.src=this.soundbed()?.url,this.previewMusicPlayer.load(),this.storyMusicPlayer.currentTime=0,this.playPreviewMusic(n.selectedId);}this.updateState(ei(Ir,n=>{n.mixerLevel=parseInt(t.value);}));}onSelectMusicTrack(e){let t;if(e!==Vl){let n=this.store.getValue();for(let o of n.musicLibrary)if(e===o.id){t={type:"audio#remote",duration:o.duration,url:o.url,format:o.format,volume:n.mixerLevel/100,thumbnailUrl:"https://assets.bigvu.tv/image/59ba6f36bcc51473ea042f09/thumb_360.jpg",assetId:e};break;}}this.isSliderV2?t?this.sliderV2StoryService.setSoundbed(t):this.sliderV2StoryService.clearSoundbed():(this.storyService.updateSoundbed(t),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"SidebarMusicModalService$->onSelectMusicTrack$",buildAgain:!0,changeMade:!0})),this.updateState(ei(Ir,n=>{n.selectedId=e;}));}onPreviewMusicTrack(e){this.previewMusicObserver$.next(e);}applyFilters(e){this.composerService.clearMusicCache(),this.updateState(ei(Ir,t=>{t.activeFilters=e;}));}fetchMusicList(e){return kt(this,null,function*(){let t=this.composerService.musicLibraryCache;if(t&&!e){let h=this.soundbed(),y=this.resolveSoundbedId(h);return this.updateState(ei(Ir,b=>{b.musicLibrary=t.items,b.selectedId=y,b.mixerLevel=h?Math.round((h.volume??1)*100):ou,b.boostAudio=this.audioNorm();})),{metadata:t.metadata};}let n=yield this.composerHttpService.getMusicListData(e),o=this.buildMusicLibrary(n.result),_=this.soundbed(),E=this.resolveSoundbedId(_),x=E;if(E!==Vl&&!o.some(h=>h.id===E))try{let h=yield this.composerHttpService.getAssetById(E),y=this.mapMusicAssets(h.result);y.length&&o.splice(1,0,y[0]);}catch{x=Vl;}return this.composerService.setMusicCache(o,n.metadata),this.destroyed?{metadata:n.metadata}:(this.updateState(ei(Ir,h=>{h.musicLibrary=o,h.selectedId=x,h.mixerLevel=_?Math.round((_.volume??1)*100):ou,h.boostAudio=this.audioNorm();})),{metadata:n.metadata});});}loadMoreMusic(e){return kt(this,null,function*(){let t=yield this.composerHttpService.getMoreMusicData(e),n=this.mapMusicAssets(t.result),o=new Set(Ir.musicLibrary.map(E=>E.id)),_=n.filter(E=>!o.has(E.id));return this.composerService.appendToMusicCache(_,t.metadata),this.destroyed?{metadata:t.metadata}:(this.updateState(ei(Ir,E=>{E.musicLibrary=[...E.musicLibrary,..._];})),{metadata:t.metadata});});}getNoneItem(){return{id:Vl,name:"None",thumbnail:ZP,url:void 0,duration:void 0,format:void 0,favorite:!1};}mapMusicAssets(e){return e.map(t=>{let o=new c_(t).getThumbnailUrl()||QP(t.title);return{id:t.id,name:t.title,thumbnail:o,url:t.resource.url,duration:t.resource.duration,format:YP(t.resource.mime),favorite:!!t.favorite};});}buildMusicLibrary(e){return[this.getNoneItem(),...this.mapMusicAssets(e)];}soundbed(){return this.isSliderV2?this.sliderV2StoryService.story()?.soundbed:this.storyService.story?.soundbed;}audioNorm(){return this.isSliderV2?!!this.sliderV2StoryService.story()?.audioNorm:!!this.storyService.story?.composerSessionState?.audioNorm;}mainAudioUrl(){return this.isSliderV2?this.sliderV2StoryService.story()?.mainTrack?.audio?.url:this.storyService.story?.audio?.url;}resolveSoundbedId(e){if(!e)return Vl;if(e.assetId)return e.assetId;let t=e.url?.match(/\/audio\/([a-f0-9]+)\//);return t?.[1]?t[1]:Vl;}loadFilterOptions(){this.requestsService.pullMusicFilters().then(e=>{let t={genre:e?.genre||[],mood:e?.mood||[],vibe:e?.vibe||[]};this.updateState(ei(Ir,n=>{n.filterOptions=t;}));}).catch(()=>{});}
816ngOnDestroy(){this.destroyed=!0,(Ir.activeFilters.genre.length>0||Ir.activeFilters.mood.length>0||Ir.activeFilters.vibe.length>0)&&this.composerService.clearMusicCache(),this.previewMusicPlayer.removeEventListener("timeupdate",this.onAudioTimeUpdate),this.previewMusicPlayer.src=null,this.previewMusicPlayer.pause(),this.previewMusicPlayer=null,this.storyMusicPlayer.src=null,this.storyMusicPlayer.pause(),this.storyMusicPlayer=null,Ir={boostAudio:!1,musicLibrary:[],selectedId:void 0,previewMusicId:void 0,mixerLevel:ou,activeFilters:Ke({},Qb),filterOptions:Ke({},Jb)},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(Xi),Rt(Yn),Rt(nr),Rt(Ac),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();qu();hi();Bn();Oo();_r();_r();mt();Or();hi();function eI(i,r){if(i&1){let e=_t();be(0,"lib-tag",20),Ze("selected",function(){let n=$e(e).$implicit,o=Le().$implicit,_=Le();return We(_.onTagToggle(o.key,n.value));}),Oe();}if(i&2){let e=r.$implicit,t=Le().$implicit,n=Le();ke("text",e.label)("value",e.value)("isSelected",n.isSelected(t.key,e.value));}}function tI(i,r){if(i&1&&(be(0,"div",13)(1,"div",14)(2,"div",15),tt(3,"img",16),be(4,"span",17),lt(5),Oe()()(),be(6,"div",18),at(7,eI,1,3,"lib-tag",19),Oe()()),i&2){let e=r.$implicit;Ce(3),ke("src",e.icon,An)("alt",e.label),Ce(2),_i(e.label),Ce(2),ke("ngForOf",e.options);}}var eS=(()=>{class i extends Fn{constructor(e,t){super(e),this.data=e,this.eventsService=t,this.sections=[],this.selections={genre:new Set(),mood:new Set(),vibe:new Set()};}ngOnInit(){let e=this.data.filterOptions;this.sections=[{key:"genre",label:"Genre:",icon:"/img/icons/music-filter/icon-genre.svg",options:e.genre||[]},{key:"mood",label:"Mood:",icon:"/img/icons/music-filter/icon-mood.svg",options:e.mood||[]},{key:"vibe",label:"Vibe:",icon:"/img/icons/music-filter/icon-vibe.svg",options:e.vibe||[]}];let t=this.data.currentSelections;t&&(this.selections.genre=new Set(t.genre||[]),this.selections.mood=new Set(t.mood||[]),this.selections.vibe=new Set(t.vibe||[])),this.eventsService.log(this.eventsService.events.composer.musicFilterStart,Ke({},this.data.analytics));}get totalSelected(){return this.selections.genre.size+this.selections.mood.size+this.selections.vibe.size;}isSelected(e,t){return this.selections[e]?.has(t)??!1;}onTagToggle(e,t){let n=this.selections[e];n.has(t)?n.delete(t):n.add(t);}onClear(){this.selections.genre.clear(),this.selections.mood.clear(),this.selections.vibe.clear();}onApply(){let e={genre:Array.from(this.selections.genre),mood:Array.from(this.selections.mood),vibe:Array.from(this.selections.vibe)};this.eventsService.log(this.eventsService.events.composer.musicFilterApply,st(Ke({},this.data.analytics),{genreCount:e.genre.length,moodCount:e.mood.length,vibeCount:e.vibe.length,genres:e.genre,moods:e.mood,vibes:e.vibe})),this.submit(e);}static{this.ɵfac=function(t){return new(t||i)(ut(jn),ut(Ji));};}static{this.ɵcmp=Bt({type:i,selectors:[["music-filter-dialog"]],standalone:!0,features:[Mn,Ft],decls:18,vars:2,consts:[[1,"music-filter-dialog"],[1,"filter-header"],[1,"filter-header-left"],[1,"filter-title"],[1,"filter-subtitle"],[1,"header-actions"],[1,"clear-link",3,"click"],[1,"close-button",3,"click"],[1,"filter-sections"],["class","filter-section",4,"ngFor","ngForOf"],[1,"filter-footer"],["variant","ghost","size","md",3,"clicked"],["variant","primary","size","md",3,"clicked"],[1,"filter-section"],[1,"section-header"],[1,"section-header-left"],[1,"section-icon",3,"src","alt"],[1,"section-label"],[1,"section-tags"],["size","md","mode","light",3,"text","value","isSelected","selected",4,"ngFor","ngForOf"],["size","md","mode","light",3,"selected","text","value","isSelected"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),lt(4,"Filters"),Oe(),be(5,"div",4),lt(6,"Select one or multiple tags"),Oe()(),be(7,"div",5)(8,"span",6),Ze("click",function(){return n.onClear();}),lt(9,"Clear"),Oe(),be(10,"div",7),Ze("click",function(){return n.close();}),Oe()()(),be(11,"div",8),at(12,tI,8,4,"div",9),Oe(),be(13,"div",10)(14,"lib-button",11),Ze("clicked",function(){return n.close();}),lt(15,"Cancel"),Oe(),be(16,"lib-button",12),Ze("clicked",function(){return n.onApply();}),lt(17),Oe()()()),t&2&&(Ce(12),ke("ngForOf",n.sections),Ce(5),hn(" Apply",n.totalSelected>0?" ("+n.totalSelected+")":""," "));},dependencies:[Ci,an,kc,vr],styles:['.music-filter-dialog[_ngcontent-%COMP%]{width:492px;max-height:calc(100vh - 200px);padding:20px;font-family:Inter-Regular;display:flex;flex-direction:column;gap:20px}.filter-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.filter-header-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.filter-title[_ngcontent-%COMP%]{font-family:Inter-Bold;font-size:20px;color:#253658}.filter-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#4b5563}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.clear-link[_ngcontent-%COMP%]{font-size:14px;color:#253658;cursor:pointer;font-family:Inter-SemiBold}.clear-link[_ngcontent-%COMP%]:hover{color:#253658}.close-button[_ngcontent-%COMP%]{position:relative;width:32px;height:32px;border-radius:50%;cursor:pointer}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:8px;left:0;right:0;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.filter-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;overflow-y:auto;flex:1;padding-right:4px}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none}.section-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.section-icon[_ngcontent-%COMP%]{width:16px;height:16px}.section-label[_ngcontent-%COMP%]{font-family:Inter-Medium;font-size:14px;color:#253658}.section-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.filter-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:12px}']});}}return i;})();_r();mt();Bn();hi();var iI=["canvasElement"],nI=()=>[1,2,3,4,5,6],rI=()=>[1,2,3];function oI(i,r){if(i&1){let e=_t();be(0,"div",27),Ze("click",function(){$e(e);let n=Le(2);return We(n.close());}),Oe();}}function aI(i,r){if(i&1&&(be(0,"span",28),lt(1),Oe()),i&2){let e=Le().ngIf;Ce(),hn(" ",e.activeFilterCount," ");}}function sI(i,r){if(i&1){let e=_t();be(0,"lib-button-icon",29),Ze("clicked",function(){$e(e);let n=Le(2);return We(n.close());}),Oe();}if(i&2){let e=Le(2);ke("iconContent",e.closeIcon);}}function lI(i,r){i&1&&(be(0,"div",30),tt(1,"div",31)(2,"div",32),Oe());}function cI(i,r){i&1&&(be(0,"div",33),lt(1,"Preview"),Oe());}function uI(i,r){if(i&1){let e=_t();be(0,"div",34)(1,"div",35)(2,"div",36),lt(3,"Voice"),Oe(),be(4,"div",37),lt(5),Oe()(),be(6,"div",38)(7,"input",39),Ze("input",function(n){$e(e);let o=Le(2);return We(o.sidebarMusicModalService.onMixerSliderChange(n));}),Oe()(),be(8,"div",40)(9,"div",36),lt(10,"Music"),Oe(),be(11,"div",37),lt(12),Oe()()();}if(i&2){let e=Le().ngIf;ke("@enterAnimation",void 0),Ce(5),hn("",100-e.mixerLevel,"%"),Ce(2),Li("background","linear-gradient(225deg, #4481FD 0%, #4481FD "+(100-e.mixerLevel)+"% , #FF75BE "+(100-e.mixerLevel)+"% , #CD33A3 100%)"),ke("value",e.mixerLevel),Ce(5),hn("",e.mixerLevel,"%");}}function dI(i,r){i&1&&(be(0,"div",42),tt(1,"div",43)(2,"div",44),Oe());}function hI(i,r){i&1&&(ti(0),at(1,dI,3,0,"div",41),ii()),i&2&&(Ce(),ke("ngForOf",Lo(1,nI)));}function pI(i,r){if(i&1){let e=_t();be(0,"div",45),tt(1,"i",46),be(2,"span"),lt(3,"Failed to load music"),Oe(),be(4,"button",47),Ze("click",function(){$e(e);let n=Le().ngIf,o=Le();return We(o.loadMusicList(n.activeFilterCount>0?n.activeFilters:void 0));}),lt(5,"Try again"),Oe()();}}function fI(i,r){i&1&&(be(0,"div",45),tt(1,"i",48),be(2,"span"),lt(3,"No music found for the selected filters"),Oe()());}function mI(i,r){i&1&&(be(0,"div",45),tt(1,"i",49),be(2,"span"),lt(3,"No music available"),Oe()());}function gI(i,r){i&1&&tt(0,"lottie-loader",56),i&2&&ke("path","img/composer/music-modal/soundwave.json")("lottieWidth",45)("lottieHeight",45)("lottieSpeed",1);}function yI(i,r){i&1&&tt(0,"div",57);}function vI(i,r){if(i&1){let e=_t();be(0,"div",50),Ze("click",function(n){let o=$e(e).$implicit;return Le(2).sidebarMusicModalService.onSelectMusicTrack(o.id),We(n.target.scrollIntoView({behavior:"smooth",block:"center"}));})("mouseenter",function(){let n=$e(e).$implicit,o=Le().ngIf,_=Le();return We(n.id!==o.musicNoneId&&_.sidebarMusicModalService.onPreviewMusicTrack(n.id));})("mouseleave",function(){$e(e);let n=Le(2);return We(n.sidebarMusicModalService.onPreviewMusicTrack());}),be(1,"div",51),tt(2,"img",52),at(3,gI,1,4,"lottie-loader",53)(4,yI,1,0,"div",54),Oe(),be(5,"div",55),lt(6),Oe
816()();}if(i&2){let e=r.$implicit,t=Le().ngIf;Ce(),Ei("selected",e.id===t.selectedId),Ce(),ke("src",e.thumbnail,An),Ce(),ke("ngIf",e.id===t.previewMusicId),Ce(),ke("ngIf",e.favorite),Ce(2),_i(e.name);}}function _I(i,r){i&1&&(be(0,"div",42),tt(1,"div",43)(2,"div",44),Oe());}function bI(i,r){i&1&&(ti(0),at(1,_I,3,0,"div",41),ii()),i&2&&(Ce(),ke("ngForOf",Lo(1,rI)));}function SI(i,r){if(i&1){let e=_t();be(0,"div",3)(1,"div",4),at(2,oI,1,0,"div",5),be(3,"div",6)(4,"div",7),lt(5,"Music"),Oe(),be(6,"div",8)(7,"lib-button-icon",9),Ze("clicked",function(){$e(e);let n=Le();return We(n.openFilterDialog());}),Oe(),at(8,aI,2,1,"span",10),Oe(),at(9,sI,1,1,"lib-button-icon",11),Oe()(),be(10,"div",12)(11,"div",13),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(o.sidebarMusicModalService.onBoostAudio(!n.boostAudio));}),be(12,"div",14),tt(13,"div",15),Oe(),be(14,"div",16),lt(15," Boost Audio Levels."),tt(16,"br"),lt(17,"Remove Background Noise "),Oe(),tt(18,"canvas",null,0),be(20,"div",17),tt(21,"div",18),at(22,lI,3,0,"div",19)(23,cI,2,0,"div",20),Oe()(),at(24,uI,13,6,"div",21),be(25,"div",22,1),at(27,hI,2,2,"ng-container",23)(28,pI,6,0,"div",24)(29,fI,4,0,"div",24)(30,mI,4,0,"div",24)(31,vI,7,5,"div",25)(32,bI,2,2,"ng-container",23),be(33,"div",26),Ze("scrolled",function(){$e(e);let n=Le();return We(n.getMoreMusic());}),Oe()()()();}if(i&2){let e=r.ngIf,t=mi(26),n=Le();Ce(2),ke("ngIf",!n.isDocked),Ce(5),ke("iconContent","fa fa-sliders")("active",e.activeFilterCount>0),Ce(),ke("ngIf",e.activeFilterCount>0),Ce(),ke("ngIf",n.isDocked),Ce(3),Ei("checked",e.boostAudio),Ce(10),ke("ngIf",!1),Ce(),ke("ngIf",!1),Ce(),ke("ngIf",e.selectedId!==e.musicNoneId),Ce(3),ke("ngIf",n.isLoading&&e.musicLibrary.length<=1),Ce(),ke("ngIf",n.hasError&&!n.isLoading),Ce(),ke("ngIf",!n.isLoading&&!n.hasError&&e.musicLibrary.length<=1&&e.activeFilterCount>0),Ce(),ke("ngIf",!n.isLoading&&!n.hasError&&e.musicLibrary.length<=1&&e.activeFilterCount===0),Ce(),ke("ngForOf",e.musicLibrary)("ngForTrackBy",n.trackByMusicId),Ce(),ke("ngIf",n.isLoading&&e.musicLibrary.length>1),Ce(),ke("scrollContainer",t)("enabled",!!(n.assetsApiCursorData!=null&&n.assetsApiCursorData.hasNext)&&!n.isLoading);}}var wI="/img/icon-library/symbols/exit-close.svg",tS=(()=>{class i extends Fn{constructor(e,t,n,o,_,E,x){super(x),this.dialogRef=e,this.sidebarMusicModalService=t,this.composerService=n,this.matDialog=o,this.sidebarService=_,this.composerEventsService=E,this.data=x,this.isDocked=Xn()==="v2",this.closeIcon=wI,this.assetsApiCursorData=null,this.isLoading=!0,this.hasError=!1,this.unsubscribe$=new Yt(),this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();}),this.dialogRef.afterOpened().pipe($s(250),Pt(this.unsubscribe$)).subscribe(()=>{let h=document.querySelectorAll(".track-thumbnail[selected=true]")[0];h&&h.scrollIntoView({behavior:"smooth",block:"center"});});}ngOnInit(){this.viewModel$=this.sidebarMusicModalService.sidebarMusicModalViewModel$,this.loadMusicList();}ngAfterViewInit(){this.drawImages(),this.drawCircles();}openFilterDialog(){this.sidebarMusicModalService.sidebarMusicModalViewModel$.pipe(zr(1)).subscribe(e=>{let t={header:"Music Filters",currentSelections:e.activeFilters,filterOptions:e.filterOptions,analytics:{storyId:this.composerEventsService.parentStoryId,editStoryId:this.composerEventsService.editStoryId,makerVersion:this.composerEventsService.makerVersion},onSubmit:o=>{this.sidebarMusicModalService.applyFilters(o),this.loadMusicList(o),n.close();},onClose:()=>{n.close();}},n=this.matDialog.open(eS,{data:t,panelClass:"music-filter-dialog-panel",backdropClass:"music-filter-dialog-backdrop",autoFocus:!1});});}loadMusicList(e){return kt(this,null,function*(){this.hasError=!1,!e&&!!this.composerService.musicLibraryCache||(this.isLoading=!0,this.assetsApiCursorData=null);try{let n=yield this.sidebarMusicModalService.fetchMusicList(e);this.assetsApiCursorData=n.metadata;}catch{this.hasError=!0,this.assetsApiCursorData=null;}finally{this.isLoading=!1,this.sidebarService.repositionCurrentModal();}});}getMoreMusic(){return kt(this,null,function*(){if(this.assetsApiCursorData?.hasNext&&!this.isLoading)try{this.isLoading=!0;let e=yield this.sidebarMusicModalService.loadMoreMusic(this.assetsApiCursorData.nextUrl);this.assetsApiCursorData=e.metadata;}catch{this.assetsApiCursorData=null;}finally{this.isLoading=!1;}});}trackByMusicId(e,t){return t.id;}drawImages(){let e=h=>h*Math.PI/180,o=window.devicePixelRatio;this.canvas.nativeElement.width=75*o,this.canvas.nativeElement.height=93*o;let _=this.canvas.nativeElement.getContext("2d");_.scale(o,o),this.canvas.nativeElement.style.width="75px",this.canvas.nativeElement.style.height="93px";let E=new Image(),x=new Image();E.onload=()=>{_.save(),_.translate(37.5,46.5),_.rotate(e(-14)),_.drawImage(E,-25.5,-52.5,25,25),_.restore(
816);},E.src="/img/composer/music-modal/music-note.png",x.onload=()=>{_.drawImage(x,29,53,25,25),this.canvas.nativeElement.style.width="75px",this.canvas.nativeElement.style.height="93px";},x.src="/img/composer/music-modal/music-mic.png";}drawCircles(){let e=this.canvas.nativeElement.getContext("2d"),t=e.createLinearGradient(0,0,40,40);t.addColorStop(.65,"rgba(40, 179, 247, 0.1)"),t.addColorStop(.9935,"rgba(80, 106, 255, 0.1)"),e.beginPath(),e.arc(51,-3,20,0,2*Math.PI),e.fillStyle=t,e.fill(),e.closePath(),e.beginPath(),e.arc(29,39,8,0,2*Math.PI),e.fillStyle=t,e.fill(),e.closePath(),e.beginPath(),e.arc(59,94,12,0,2*Math.PI),e.fillStyle=t,e.fill(),e.closePath();}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(Np),ut(nr),ut(Ja),ut(Hr),ut(en),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-music-modal"]],viewQuery:function(t,n){if(t&1&&fn(iI,5),t&2){let o;mn(o=gn())&&(n.canvas=o.first);}},hostVars:2,hostBindings:function(t,n){t&2&&Di("docked",n.isDocked);},standalone:!0,features:[Wn([Np]),Mn,Ft],decls:2,vars:3,consts:[["canvasElement",""],["musicLibrary",""],["class","music-modal",4,"ngIf"],[1,"music-modal"],[1,"header-container"],["class","close-button",3,"click",4,"ngIf"],[1,"header-title"],[1,"header-text"],[1,"filter-button-wrapper"],["variant","ghost","size","sm",3,"clicked","iconContent","active"],["class","filter-badge",4,"ngIf"],["size","sm","variant","ghost",3,"iconContent","clicked",4,"ngIf"],[1,"body-container"],[1,"boost-audio","animation-scale-down-center",3,"click"],[1,"checkbox"],[1,"checkmark"],[1,"boost-text"],[1,"boost-preview"],[2,"opacity","0.1","width","48px","height","48px","border-radius","50%","background","linear-gradient(270deg, #28B3F7 0.65%, #506AFF 99.35%)"],["class","preview-button",4,"ngIf"],["class","preview-title",4,"ngIf"],["class","music-mixer",4,"ngIf"],[1,"music-library"],[4,"ngIf"],["class","no-results-message",4,"ngIf"],["class","music-track-container animation-scale-down-center",3,"click","mouseenter","mouseleave",4,"ngFor","ngForOf","ngForTrackBy"],["appInfiniteScroll","",1,"music-scroll-anchor",3,"scrolled","scrollContainer","enabled"],[1,"close-button",3,"click"],[1,"filter-badge"],["size","sm","variant","ghost",3,"clicked","iconContent"],[1,"preview-button"],[1,"play"],[1,"pause"],[1,"preview-title"],[1,"music-mixer"],[1,"voice"],[1,"title"],[1,"value"],[1,"mixer-slider"],["type","range","min","0","max","100",3,"input","value"],[1,"music"],["class","music-track-shimmer",4,"ngFor","ngForOf"],[1,"music-track-shimmer"],[1,"shimmer-circle"],[1,"shimmer-text"],[1,"no-results-message"],[1,"fa","fa-exclamation-triangle","no-results-icon"],[1,"retry-btn",3,"click"],[1,"fa","fa-filter","no-results-icon"],[1,"fa","fa-music","no-results-icon"],[1,"music-track-container","animation-scale-down-center",3,"click","mouseenter","mouseleave"],[1,"track-thumbnail"],["draggable","false","alt","image",3,"src"],[3,"path","lottieWidth","lottieHeight","lottieSpeed",4,"ngIf"],["class","favorite-badge",4,"ngIf"],[1,"track-name"],[3,"path","lottieWidth","lottieHeight","lottieSpeed"],[1,"favorite-badge"]],template:function(t,n){t&1&&(at(0,SI,34,18,"div",2),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[Ci,an,ui,ir,aa,Rr,m_],styles:['.music-modal[_ngcontent-%COMP%]{width:520px;height:100%;padding:32px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden;display:flex;flex-direction:column}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;flex:1}.filter-button-wrapper[_ngcontent-%COMP%]{position:relative;margin-right:36px}.filter-badge[_ngcontent-%COMP%]{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;border-radius:9px;background-color:#4481fd;color:#fff;font-size:11px;font-family:Inter-SemiBold;display:flex;align-items:center;justify-content:center;padding:0 4px}.body-container[_ngcontent-%COMP%]{margin-top:18px;display:flex;flex-direction:column;align-items:center;gap:25px;flex:1;min-height:0}.boost-audio[_ngcontent-%COMP%]{width:456px;height:93px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:16px;padding:0 16px;border-radius:10px;background:#fff;box-shadow:0 0 40px #0000001a}.boost-audio[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;border:1px solid rgba(123,141,177,.3)}.boost-audio[_ngcontent-%COMP%] .checkbox[checked=true][_ngcontent-%COMP%]{width:24px;height:24px;border-radius:50%;border:1px solid rgba(123,141,177,.3);background-color:#00abfe}.boost-audio[_ngcontent-%COMP%]:hover{cursor:pointer}.boost-audio[_ngcontent-%COMP%]:hover .checkbox[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #7b8db14d}.boost-audio[_ngcontent-%COMP%]:hover .checkbox[checked=false][_ngcontent-%COMP%]{filter:grayscale(100%);background-color:#00abfe}.checkmark[_ngcontent-%COMP%]{margin-bottom:2px;transform:rotate(45deg);height:9px;width:6px;border-bottom:2px solid #FFFFFF;border-right:2px solid #FFFFFF;visibility:hidden}.boost-audio[_ngcontent-%COMP%]:hover .checkbox[checked=false][_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%], .boost-audio[_ngcontent-%COMP%] .checkbox[checked=true][_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{visibility:visible}.boost-text[_ngcontent-%COMP%]{width:254px;color:#253658;font-size:14px;font-family:Inter-Medium;line-height:140%}.boost-preview[_ngcontent-%COMP%]{margin-left:-25px;height:93px;display:flex;flex-direction:column;justify-content:center;gap:4px}.preview-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;background:linear-gradient(270deg,#28b3f7 .65%,#506aff 99.35%);cursor:pointer}.preview-title[_ngcontent-%COMP%]{color:#253658;font-size:12px}.preview-button[_ngcontent-%COMP%] .play[_ngcontent-%COMP%]{width:12px;height:14px;border-top:7px solid transparent;border-left:12px solid #FFFFFF;border-bottom:7px solid transparent}.preview-button[_ngcontent-%COMP%] .pause[_ngcontent-%COMP%]{width:12px;height:14px;border-right:4px solid #FFFFFF;border-left:4px solid #FFFFFF}.music-mixer[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;font-family:Inter-Regular}.music-mixer[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Inter-Regular;font-size:16px}.music-mixer[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:Inter-Regular;font-size:10px;color:#25365899}.voice[_ngcontent-%COMP%], .music[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px}.music-library[_ngcontent-%COMP%]{display:flex;width:456px;flex:1;min-height:0;overflow-y:auto;align-items:flex-start;align-content:flex-start;gap:18px;flex-wrap:wrap}.no-results-message[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;padding:48px 24px;color:#7b8db1;font-family:Inter-Regular;font-size:14px;text-align:center}.no-results-icon[_ngcontent-%COMP%]{font-size:24px;color:#7b8db1;opacity:.5}.retry-btn[_ngcontent-%COMP%]{padding:6px 16px;border:1px solid #7B8DB1;border-radius:4px;background:transparent;color:#7b8db1;font-family:Inter-Regular;font-size:13px;
816cursor:pointer}.retry-btn[_ngcontent-%COMP%]:hover{background:#7b8db11a}.music-track-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.music-track-container[_ngcontent-%COMP%]:hover{cursor:pointer}.track-thumbnail[_ngcontent-%COMP%]{display:flex;position:relative}.track-thumbnail[selected=true][_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border:5px solid #4481FD}.track-thumbnail[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #7b8db14d}.track-thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:96px;height:96px;border-radius:50%}.track-thumbnail[_ngcontent-%COMP%] lottie-loader[_ngcontent-%COMP%]{position:absolute;width:45px;height:45px;top:50%;left:50%;transform:translate(-50%,-50%)}.favorite-badge[_ngcontent-%COMP%]{position:absolute;bottom:2px;right:2px;width:20px;height:20px;background-image:url(/img/mediaAssets/star-rate-filled.svg);background-repeat:no-repeat;background-position:center;background-size:contain;z-index:6}.track-name[_ngcontent-%COMP%]{color:#253658;font-family:Inter-Regular;font-size:12px;max-width:96px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.music-scroll-anchor[_ngcontent-%COMP%]{height:1px;width:100%}.music-track-shimmer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px}.shimmer-circle[_ngcontent-%COMP%]{width:96px;height:96px;border-radius:50%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_shimmer 1.5s infinite}.shimmer-text[_ngcontent-%COMP%]{width:60px;height:12px;border-radius:4px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_shimmer 1.5s infinite}@keyframes _ngcontent-%COMP%_shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.mixer-slider[_ngcontent-%COMP%]{position:relative;width:321px;margin-right:24px;margin-left:24px;margin-bottom:8px}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{-webkit-appearance:none;width:100%;height:3px;border-radius:4px;outline:none;background-color:#4481fd}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:linear-gradient(225deg,#ff75be,#cd33a3);cursor:pointer}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{box-shadow:0 0 10px #7b8db1}.slider-input[_ngcontent-%COMP%]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:linear-gradient(225deg,#ff75be,#cd33a3);cursor:pointer}.docked[_nghost-%COMP%]{display:block;height:100%}.docked[_nghost-%COMP%] .music-modal[_ngcontent-%COMP%]{width:100%;padding:16px;border-radius:0;box-sizing:border-box;background-color:#fff}.docked[_nghost-%COMP%] .header-title[_ngcontent-%COMP%]{gap:8px}.docked[_nghost-%COMP%] .filter-button-wrapper[_ngcontent-%COMP%]{margin-right:0}.docked[_nghost-%COMP%] .body-container[_ngcontent-%COMP%]{margin-top:20px;align-items:stretch}.docked[_nghost-%COMP%] .boost-audio[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.docked[_nghost-%COMP%] .boost-text[_ngcontent-%COMP%]{flex:1;width:auto}.docked[_nghost-%COMP%] .mixer-slider[_ngcontent-%COMP%]{flex:1;width:auto;margin-right:12px;margin-left:12px}.docked[_nghost-%COMP%] .music-library[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);justify-items:center;column-gap:8px;row-gap:18px;width:100%}.docked[_nghost-%COMP%] .no-results-message[_ngcontent-%COMP%], .docked[_nghost-%COMP%] .music-scroll-anchor[_ngcontent-%COMP%]{grid-column:1/-1}'],data:{animation:[Da("enterAnimation",[ga(":enter",[so({opacity:0}
816),ma("0.4s",so({opacity:1}))])])]}});}}return i;})();hi();Bn();Oo();var rS=oo(la());Ki();mt();lo();mt();vn();Xu();Or();lo();Js();mt();var iS=Symbol("free-plan"),dl=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.notificationsService=ct(En),this.composerEventsService=ct(en),this.eventsService=ct(Ji),this.composerSlideSelectionService=ct(Rn),this.uploadHelperService=ct(jc),this.planHelperService=ct(Po),this.premiumPlanService=ct(ts),this.composerLayoutsService=ct(ko),this.generatedAttaches=new Map();}addAssetToSlide(e){return kt(this,null,function*(){let{index:t,asset:n,anchor:o,mediaKey:_,scope:E="scene"}=e,x=this.sliderV2StoryService.story()?.media??[],h=x[t];if(!h)return this.notificationsService.info("Select a scene to add this item to"),!1;if(o&&ba(h)!==o||_!==void 0&&Qh(h)!==_)return this.notificationsService.info("The scenes changed while dropping. Please try again"),!1;let y=d0(n);if(y)return this.addGeneratedToSlide({index:t,anchor:o??ba(h),mediaKey:_??Qh(h),source:y,scope:E});let b=u0(n);if(!b)return this.notificationsService.error("This item cannot be added to a scene"),!1;if(b.type==="video"&&!pm(b.assetDuration))return this.addMeasuredToSlide(st(Ke({},e),{anchor:o??ba(h),mediaKey:_??Qh(h),url:b.previewUrl??b.url}));let p=Uc(x,t);if(E==="run"&&p.length>1&&h.media[0].url!==b.url)return this.addAcrossRun({slides:x,run:p,item:mm({item:b,sceneSeek:n.sceneSeek,slides:x,indexes:p}),asset:n,index:t});if($_({slides:x,index:t,item:b}))return this.joinPrevious({slides:x,index:t,asset:n});let c=mm({item:b,sceneSeek:n.sceneSeek,slides:x,indexes:[t]});return np({item:c,duration:Fr(x,t)})?(this.sliderV2StoryService.setSlideBroll(t,c),this.composerSlideSelectionService.select(t),this.logOverlayAdded({index:t,type:c.type,asset:n,fromOtherSlide:!1}),!0):(this.notificationsService.info("The overlay video duration is shorter than the slide duration"),!1);});}addGeneratedToSlide(e){return kt(this,null,function*(){let{index:t,anchor:n,mediaKey:o,source:_,scope:E}=e,x;try{x=_.file??(yield this.attachGenerated(_));}catch(h){return h!==iS&&(console.error(h),this.notificationsService.error("An error occurred while selecting your asset. Please try again.")),!1;}return this.addAssetToSlide({index:t,anchor:n,mediaKey:o,asset:x,scope:E});});}addMeasuredToSlide(e){return kt(this,null,function*(){let E=e,{url:t,asset:n}=E,o=Yd(E,["url","asset"]);this.notificationsService.info("Measuring clip\u2026");let _=(yield Qu([t])).get(t);return pm(_)?this.addAssetToSlide(st(Ke({},o),{asset:st(Ke({},n),{resource:st(Ke({},n.resource),{duration:_})})})):(cr("slider-v2: b-roll duration probe failed",{level:"warning",extra:{assetId:n.assetId,externalId:n.externalId}}),this.notificationsService.info("We couldn't read this video's length. Try another clip."),!1);});}attachGenerated(e){return kt(this,null,function*(){if((yield this.planHelperService.getOrganizationPlansDetails())?.name==="free")throw this.premiumPlanService.openPricingPage(),iS;let n=this.generatedAttaches.get(e.url);return n||(this.notificationsService.info(e.fileType==="video"?"Adding your AI video to the scene...":"Adding your AI image to the scene..."),n=this.uploadHelperService.onAttachGeneratedAIAsset(e.url,e.fileType,e.fileType==="video"?"AI Generated Video":"AI Generated Image"),this.generatedAttaches.set(e.url,n),n.catch(()=>this.generatedAttaches.delete(e.url))),n;});}moveBroll(e){let t=this.sliderV2StoryService.story()?.media??[],n=t[e.fromIndex],o=t[e.toIndex];if(!n||!o||ba(n)!==e.fromAnchor||ba(o)!==e.toAnchor)return this.notificationsService.info("The scenes changed while dropping. Please try again"),!1;let _=Q_({slides:t,fromIndex:e.fromIndex,toIndex:e.toIndex,presentation:this.carryPresentation()});return"refusal"in _?(this.notifyMoveRefusal({refusal:_.refusal,type:n.media?.[0]?.type}),!1):(this.sliderV2StoryService.patch({media:_.media}),this.composerSlideSelectionService.select(e.toIndex),this.logOverlayAdded({index:e.toIndex,type:n.media[0].type,fromOtherSlide:!0}),!0);}joinPrevious(e){let{slides:t,index:n,asset:o}=e,_=ip({slides:t,fromIndex:n-1,presentation:this.carryPresentation()});return"refusal"in _?(this.notificationsService.info("The overlay video duration is shorter than the slide duration"),!1):(this.sliderV2StoryService.patch({media:_.media}),this.composerSlideSelectionService.select(n),this.logOverlayAdded({index:n,type:_.media[n].media[0].type,asset:o,fromOtherSlide:!1}),!0);}addAcrossRun(e){let{slides:t,run:n,item:o,asset:_,index:E}=e,x=Z_({slides:t,indexes:n,item:o});return x?(this.sliderV2StoryService.patch({media:x}
816),this.composerSlideSelectionService.select(E),n.forEach(h=>this.logOverlayAdded({index:h,type:o.type,asset:_,fromOtherSlide:!1})),!0):(this.notificationsService.info("The overlay video duration is shorter than the total slides sequence duration"),!1);}notifyMoveRefusal(e){let{refusal:t,type:n}=e;t==="same-run"?this.notificationsService.info(n==="video"?"Cannot drop a video onto a slide that's already part of the same video sequence":"Cannot drop an image onto a slide that's already part of the same image sequence"):t==="too-short"?this.notificationsService.info("The overlay video duration is shorter than the slide duration"):t==="too-short-run"&&this.notificationsService.info("The overlay video duration is shorter than the total slides sequence duration");}carryPresentation(){return{bindsTitleFor:e=>this.composerLayoutsService.bindsTitleFor(e),headline:this.sliderV2StoryService.story()?.headline};}logOverlayAdded(e){let{index:t,type:n,asset:o,fromOtherSlide:_}=e;this.composerEventsService.log(this.eventsService.events.composer.addSegmentOverlay,{slideNum:(t+1).toString(),type:n,assetId:o?.assetId,externalId:o?.externalId,fromOtherSlide:_.toString()});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();var Ta=(()=>{class i{constructor(e,t,n,o,_,E,x){if(this.storyService=e,this.slidesActionsService=t,this.videoSlidesService=n,this.notificationService=o,this.slideSelectionService=_,this.sliderV2SlideMediaService=x,this.unsubscribe$=new Yt(),this.isSliderV2=Xn()==="v2",E)throw new Error("SidebarIntroOutroModalService is already loaded");this.currentSlideData=this.storyService.story?.composerSessionState?.selectedSlide,this.currentSlideIndex=this.currentSlideData?.index??this.slideSelectionService?.index()??0,this.videoSlidesService.showSelectedSlide$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{if(h===void 0)throw new Error("showSelectedSlide should not be undefined");this.currentSlideData?.index!==h.index&&(this.currentSlideData=h,this.currentSlideIndex=this.currentSlideData.index);});}onAddToSlide(e){if(this.isSliderV2){let _=this.slideSelectionService?.index();return _==null?Promise.resolve(!1):this.sliderV2SlideMediaService?.addAssetToSlide({index:_,asset:e,scope:"run"})??Promise.resolve(!1);}let t=rS.cloneDeep(e),n=this.slidesActionsService.convertDropDataToReplaceableSlide(t,this.currentSlideIndex),o=this.storyService.slideOverlayMedia(this.storyService.story.media[this.currentSlideIndex])?.url;return this.storyService.shouldHideDropletPreview(o)?this.slidesActionsService.replaceSlide(n,"add-item").then(()=>!0).catch(()=>!1):(this.notificationService.error("Cannot change while scene visual is being attached"),Promise.resolve(!1));}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(uo),Rt(Xi),Rt(En),Rt(Rn,8),Rt(i,12),Rt(dl,8));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();mt();Bn();var EI=()=>[],xI=()=>["demo","bank"],oS=(()=>{class i extends Fn{constructor(e,t,n,o){super(o),this.dialogRef=e,this.sidebarAssetsAndGenerationService=t,this.composerService=n,this.data=o,this.ASSETS_SIDEBAR_FEATURE_SOURCE=Bc.videoComposer,this.ASSETS_SIDEBAR_LIBRARY_TYPE=Lh.Library,this.isDocked=Xn()==="v2",this.sidebarHeader="Content Bank",this.addAsset=_=>this.sidebarAssetsAndGenerationService.onAddToSlide(_),this.composerService.getMediaSidebarState().pipe(sn(_=>_!==void 0),qs()).subscribe(_=>{this.lastSidebarState=_;});}ngAfterViewInit(){document.querySelector(".sidebar-modal-dialog-backdrop-bg")?.remove(),!this.isDocked&&(document.querySelector(".library-modal .sidebar-container .header-container").style.padding="0px 25px",document.querySelector(".library-modal .sidebar-container").style.boxShadow="none",document.querySelector(".library-modal .sidebar-container").style.width="unset",document.querySelector(".library-modal .asset-results-holder").style.margin="25px 0px");}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(Ta),ut(nr),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-library-modal"]],hostVars:2,hostBindings:function(t,n){t&2&&Di("docked",n.isDocked);},standalone:!0,features:[Wn([Ta,uo]),Mn,Ft],decls:3,vars:13,consts:[[1,"library-modal"],[1,"body-container"],["containerType","dialog",3,"onDialogCloseClick","
816sidebarHeader","variant","assetSidebarType","allowedMediaTypesOptions","itemsAddable","closeable","spinnerNoBackground","subTypes","featureSource","stateData","addAsset"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1)(2,"assets-sidebar",2),Ze("onDialogCloseClick",function(){return n.close();}),Oe()()()),t&2&&(Ce(2),ke("sidebarHeader",n.sidebarHeader)("variant",n.isDocked?"panel":"default")("assetSidebarType",n.ASSETS_SIDEBAR_LIBRARY_TYPE)("allowedMediaTypesOptions",Lo(11,EI))("itemsAddable",!0)("closeable",!0)("spinnerNoBackground",!0)("subTypes",Lo(12,xI))("featureSource",n.ASSETS_SIDEBAR_FEATURE_SOURCE)("stateData",n.lastSidebarState)("addAsset",n.addAsset));},dependencies:[Ci,Uh],styles:[".library-modal[_ngcontent-%COMP%]{width:529px;max-height:calc(100vh - 150px);border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden}.body-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:25px}.docked[_nghost-%COMP%]{display:block;height:100%}.docked[_nghost-%COMP%] .library-modal[_ngcontent-%COMP%]{width:100%;height:100%!important;max-height:none;border-radius:0}.docked[_nghost-%COMP%] .body-container[_ngcontent-%COMP%]{height:100%;gap:0;align-items:stretch}"]});}}return i;})();hi();Bn();Oo();Ki();mt();Bn();var TI=()=>[],aS=(()=>{class i extends Fn{constructor(e,t,n,o){super(o),this.dialogRef=e,this.sidebarAssetsAndGenerationService=t,this.composerService=n,this.data=o,this.ASSET_SIDEBAR_FEATURESOURCE=Bc.videoComposer,this.ASSETS_SIDEBAR_TYPE=Lh.Uploads,this.isDocked=Xn()==="v2",this.sidebarHeader=this.isDocked?"Library":"Media Library",this.addAsset=_=>this.sidebarAssetsAndGenerationService.onAddToSlide(_),this.composerService.getUploadsSidebarState().pipe(sn(_=>_!==void 0),qs()).subscribe(_=>{this.lastSidebarState=_;});}ngAfterViewInit(){document.querySelector(".sidebar-modal-dialog-backdrop-bg")?.remove(),!this.isDocked&&(document.querySelector(".uploads-modal .sidebar-container .header-container").style.padding="0px 25px",document.querySelector(".uploads-modal .sidebar-container").style.boxShadow="none",document.querySelector(".uploads-modal .sidebar-container").style.width="unset",document.querySelector(".uploads-modal .asset-results-holder").style.margin="25px 0px");}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(Ta),ut(nr),ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-uploads-modal"]],hostVars:2,hostBindings:function(t,n){t&2&&Di("docked",n.isDocked);},standalone:!0,features:[Wn([Ta,uo]),Mn,Ft],decls:3,vars:11,consts:[[1,"uploads-modal"],[1,"body-container"],["containerType","dialog",3,"onDialogCloseClick","sidebarHeader","variant","assetSidebarType","allowedMediaTypesOptions","itemsAddable","spinnerNoBackground","closeable","featureSource","stateData","addAsset"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1)(2,"assets-sidebar",2),Ze("onDialogCloseClick",function(){return n.close();}),Oe()()()),t&2&&(Ce(2),ke("sidebarHeader",n.sidebarHeader)("variant",n.isDocked?"panel":"default")("assetSidebarType",n.ASSETS_SIDEBAR_TYPE)("allowedMediaTypesOptions",Lo(10,TI))("itemsAddable",!0)("spinnerNoBackground",!0)("closeable",!0)("featureSource",n.ASSET_SIDEBAR_FEATURESOURCE)("stateData",n.lastSidebarState)("addAsset",n.addAsset));},dependencies:[Ci,Uh],styles:[".uploads-modal[_ngcontent-%COMP%]{width:529px;height:calc(100vh - 132px)!important;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden}.body-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:25px}.docked[_nghost-%COMP%]{display:block;height:100%}.docked[_nghost-%COMP%] .uploads-modal[_ngcontent-%COMP%]{width:100%;height:100%!important;max-height:none;border-radius:0}.docked[_nghost-%COMP%] .body-container[_ngcontent-%COMP%]{height:100%;gap:0;align-items:stretch}"]});}}return i;})();mt();hi();Bn();Oo();Ki();mt();Bn();var sS=(()=>{class i extends Fn{constructor(e,t,n,o,_,E,x,h,y,b){super(h),this.dialogRef=e,this.storyService=t,this.composerService=n,this.sidebarService=o,this.videoSlidesService=_,this.sliderV2StoryService=E,this.sidebarAssetsAndGenerationService=x,this.data=h,this.slideSelectionService=y,this.sliderV2PlayerService=b,this.unsubscribe$=new Yt(),this.composerGeneration=Xn(),this.v1SceneIndex=$t(void 0),this.sceneIndex=xt(()=>this.composerGeneration==="v2"?this.slideSelectionService?.index():this.v1SceneIndex()),this.sceneFetchPaused=xt(()=>this.composerGeneration==="v2"&&!!this.sliderV2PlayerService?.playing()),this.featureSource=Bc.videoComposer,this.isDocked=this.composerGeneration==="v2",this.updateMediaSidebarState=()=>{let p=this.composerService.uploadsSidebarState$.getValue();p&&this.composerService.uploadsSidebarState$.next(st(Ke({},p),{shouldReloadSidebar:!0}));},this.dialogRef.afterOpened().subscribe(()=>{document.querySelector(".sidebar-modal-dialog-backdrop-bg")?.remove();}),this.composerService.getImageGeneratorData().pipe(sn(p=>p!==void 0),qs()).subscribe(p=>{this.onFirstLoad=!0,this.lastGeneratedData=p;});}
816ngOnInit(){if(this.composerGeneration==="v2"){this.initSliderV2();return;}this.resolutionNumberForGeneration=this.storyService.story.composerSessionState.storyOriginalAspectRatio,this.v1SceneIndex.set(this.storyService.story.composerSessionState.selectedSlide.index),this.lastGeneratedData=st(Ke({},this.lastGeneratedData??{}),{thread:this.storyService.story.composerSessionState.aiChatThread}),this.videoSlidesService.showSelectedSlide$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{if(e===void 0)throw new Error("showSelectedSlide should not be undefined");this.v1SceneIndex.set(e.index);});}initSliderV2(){this.resolutionNumberForGeneration=this.sliderV2StoryService.story()?.aspectRatio;}updateAssetGeneratorObject(e){let t=this.composerService.uploadsSidebarState$.getValue();t&&this.composerService.uploadsSidebarState$.next(st(Ke({},t),{shouldReloadSidebar:!0})),this.composerService.imageGeneratorState$.next(e);}onAddToSlide(e){let t=this.composerService.uploadsSidebarState$.getValue();t&&this.composerService.uploadsSidebarState$.next(st(Ke({},t),{shouldReloadSidebar:!0})),this.sidebarAssetsAndGenerationService.onAddToSlide(e);}onStepChanged(){this.sidebarService.repositionCurrentModal();}ngAfterViewInit(){document.querySelector(".sidebar-modal-dialog-backdrop-bg")?.remove();}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(zi),ut(nr),ut(Hr),ut(Xi),ut(Yi),ut(Ta),ut(jn),ut(Rn,8),ut(Sr,8));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-visuals-generation-modal"]],hostVars:2,hostBindings:function(t,n){t&2&&Di("docked",n.isDocked);},standalone:!0,features:[Wn([uo,Ta]),Mn,Ft],decls:3,vars:8,consts:[[1,"image-generation-modal"],[1,"body-container"],[3,"close","updateAssetGeneratorObject","useAsset","stepChanged","title","generatingTitle","featureSource","providedRatio","sceneIndex","sceneFetchPaused","initialData","modalRef"]],template:function(t,n){t&1&&(be(0,"div",0)(1,"div",1)(2,"app-ai-image-generator",2),Ze("close",function(){return n.close();})("updateAssetGeneratorObject",function(_){return n.updateAssetGeneratorObject(_);})("useAsset",function(_){return n.sidebarAssetsAndGenerationService.onAddToSlide(_);})("stepChanged",function(){return n.onStepChanged();}),Oe()()()),t&2&&(Ce(2),ke("title","AI Agent")("generatingTitle","Generating Visuals")("featureSource",n.featureSource)("providedRatio",n.resolutionNumberForGeneration)("sceneIndex",n.sceneIndex())("sceneFetchPaused",n.sceneFetchPaused())("initialData",n.lastGeneratedData)("modalRef",n.dialogRef));},dependencies:[Ci,r0],styles:['.image-generation-modal[_ngcontent-%COMP%]{width:480px;height:100%;max-height:calc(100vh - 100px);-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden}.body-container[_ngcontent-%COMP%]{width:100%;height:100%;min-height:0}.docked[_nghost-%COMP%]{display:block;height:100%}.docked[_nghost-%COMP%] .image-generation-modal[_ngcontent-%COMP%]{width:100%;max-height:none}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.title[_ngcontent-%COMP%]{margin-top:20px;color:#25365899;font-family:Inter-Regular;font-size:13px;line-height:125%}.arrowed-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.custom-palette-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center;margin-top:16px;gap:8px}.custom-palette[_ngcontent-%COMP%]{display:flex;padding:0 6px;justify-content:center;align-items:center;gap:4px;
816height:48px;border:1px solid rgba(123,141,177,.3);border-radius:10px;background-color:#fff}.custom-palette[selected=true][_ngcontent-%COMP%]{width:170px;z-index:98}.custom-palette[selected=true][_ngcontent-%COMP%]{border:unset;box-shadow:0 0 0 2px #4481fd}.custom-palette[_ngcontent-%COMP%]:hover:not([selected=true]){box-shadow:0 0 0 1px #7b8db14d;cursor:pointer}.custom-palette[_ngcontent-%COMP%] .palette[_ngcontent-%COMP%]{margin-left:7px;margin-right:7px}.custom-palette[selected=true][_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:none}.custom-palette[_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{visibility:hidden;filter:invert(97%) sepia(0%) saturate(0%) hue-rotate(45deg) brightness(116%) contrast(102%)}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]:first-child{margin-left:0!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-left:-8px!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] > .palette-circle[_ngcontent-%COMP%]:hover[disabled=false]{box-shadow:0 0 0 1px #0000001a;z-index:99!important}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[_ngcontent-%COMP%]:hover[disabled=false] img[_ngcontent-%COMP%]{visibility:visible}.custom-palette[selected=true][_ngcontent-%COMP%] .palette[_ngcontent-%COMP%] .palette-circle[selected=true][_ngcontent-%COMP%]{transform:scale(1.25)!important;z-index:98!important}.custom-palette[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:-5px}.custom-palette[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#253658;text-align:center;font-size:14px;margin-left:5px}.palette[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.palette[_ngcontent-%COMP%] > .palette-circle[_ngcontent-%COMP%]:first-child{margin-left:0!important}.palette-circle[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;box-shadow:0 0 0 1px #0000001a}.themes-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;max-width:100%;margin-top:10px;overflow-x:hidden}.theme-item[_ngcontent-%COMP%]{height:32px;display:flex;justify-content:center;align-items:center;padding:5px}.theme-item[_ngcontent-%COMP%]:hover{cursor:pointer}.theme-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.theme-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14;border-radius:4px}.theme-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd;border-radius:4px}.theme-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:20px;object-fit:cover}.palettes-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;align-items:flex-end;max-width:100%;height:86px;overflow-x:hidden;gap:20px}.custom-palette-v1[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:flex-end;width:76px}.custom-palette-v1[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:last-child{position:relative;margin-top:-17px;margin-left:-22px;align-self:flex-start}.custom-palette-text[_ngcontent-%COMP%]{position:absolute;text-align:center;font-family:Inter-SemiBold;color:#fff;margin-top:26px;font-size:10px}.custom-palette-pen[_ngcontent-%COMP%]{position:absolute;width:14px!important;height:14px!important;margin-bottom:22px;filter:brightness(0) saturate(100%) invert(90%) sepia(18%) saturate(0%) hue-rotate(82deg) brightness(107%) contrast(103%)}.palette-item[_ngcontent-%COMP%]{height:76px;width:76px;flex-shrink:0;position:relative;display:flex;justify-content:center;align-items:center;border-radius:10px;border:1px solid rgba(123,141,177,.6);overflow:hidden}.palette-item[_ngcontent-%COMP%]:hover{cursor:pointer}.palette-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.palette-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.palette-item[selected=true][_ngcontent-%COMP%]{border:2px solid #4481FD}.palette-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.palette-thumbnail[_ngcontent-%COMP%]{position:absolute}.animations-library[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:8px;max-width:100%;margin-top:10px;overflow-x:hidden}.animation-item[_ngcontent-%COMP%]{padding:0 5px;background:#7b8db114;border-radius:10px}.animation-none-item[_ngcontent-%COMP%]{background:#7b8db114;border-radius:10px;width:75px;height:75px;flex-shrink:0;overflow:hidden}.animation-none-item[_ngcontent-%COMP%]:before{content:"";position:absolute;width:106px;margin-top:2px;margin-left:-34px;border-top:1px solid red;transform:rotate(-45deg);transform-origin:100% 0}.animation-item[_ngcontent-%COMP%]:hover, .animation-none-item[_ngcontent-%COMP%]:hover{cursor:pointer}.animation-item[selected=true][_ngcontent-%COMP%]:hover, .animation-none-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.animation-item[_ngcontent-%COMP%]:not([selected=true]):hover, .animation-none-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.animation-item[selected=true][_ngcontent-%COMP%], .animation-none-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd}.random-rotation[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:8px;max-width:100%;margin-top:10px;overflow-x:hidden}.random-rotation-item[_ngcontent-%COMP%]{padding:0 5px;background:#7b8db114;border-radius:10px}.random-rotation-none-item[_ngcontent-%COMP%]{background:#7b8db114;border-radius:10px;width:75px;height:75px;flex-shrink:0;overflow:hidden}.random-rotation-none-item[_ngcontent-%COMP%]:before{content:"";position:absolute;width:106px;margin-top:2px;margin-left:-34px;border-top:1px solid red;transform:rotate(-45deg);transform-origin:100% 0}.random-rotation-item[_ngcontent-%COMP%]:hover, .random-rotation-none-item[_ngcontent-%COMP%]:hover{cursor:pointer}.random-rotation-item[selected=true][_ngcontent-%COMP%]:hover, .random-rotation-none-item[selected=true][_ngcontent-%COMP%]:hover{cursor:default}.random-rotation-item[_ngcontent-%COMP%]:not([selected=true]):hover, .random-rotation-none-item[_ngcontent-%COMP%]:not([selected=true]):hover{background-color:#00abfe14}.random-rotation-item[selected=true][_ngcontent-%COMP%], .random-rotation-none-item[selected=true][_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #4481fd}.slider-arrow[_ngcontent-%COMP%]{margin-top:10px;position:absolute;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}.slider-arrow-left[_ngcontent-%COMP%]{left:12px}.slider-arrow-right[_ngcontent-%COMP%]{right:10px}.slider-arrow[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:12px;object-fit:cover}.slider-arrow[_ngcontent-%COMP%]:hover{background-color:#00abfe14;border-radius:50%;cursor:pointer}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.animation-scale-up-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-up-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-up-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-up-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-up-center{0%{transform:scale(1)}to{transform:scale(1.25)}}@keyframes _ngcontent-%COMP%_animation-scale-up-center-out{0%{transform:scale(1.25)}to{transform:scale(1)}} .color-picker-tooltip .branding-color-picker-container{box-shadow:0 0 16px 10px #0000002e!important}.color-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:99}.color-picker-tooltip[_ngcontent-%COMP%]:before{content:"";position:absolute;top:48.5%;left:-8px;width:0;height:0;border-right:solid 9px white;border-top:solid 7px transparent;border-bottom:solid 7px transparent}.color-picker-backdrop[_ngcontent-%COMP%]{width:100%;height:100%;background-color:#0000004d;position:fixed;top:0;left:0;overflow:hidden;z-index:98}']});}}return i;})();hi();Bn();Oo();sa();Ki();qu();var uS=oo(la());vn();mt();im();lo();Or();mt();Ki();Mr();vn();
816e_();xh();mt();var CI=5*60*1e3,OI="img/video-placeholder.svg",lS=i=>{let r=i?.split("-")[0];return r?.length===2?r:void 0;},au=(()=>{class i{constructor(){this.composerHttpService=ct(Yn),this.taskProgressService=ct(jh),this.websocketService=ct(Qs),this.localeService=ct(Jv),this.urlSources=new Map();}brollFeature(){return this.feature;}setBrollFeature(e){this.feature=e;}brollUrlSource(e){return e?this.urlSources.get(e):void 0;}resolveBrollLang(e){return kt(this,null,function*(){let t=lS(e);if(t)return t;let[n,o]=yield this.localeService.getLocale();return lS(n)??o;});}rememberOverlays(e){e.forEach(t=>{if(!t?.id||!t.library)return;let n={id:t.id,library:t.library};[t.lowResUrl,t.highResUrl].filter(o=>!!o).forEach(o=>this.urlSources.set(o,n));});}applyBroll(e){return kt(this,null,function*(){let{story:t,bRoll:n,aspectRatio:o,locale:_,onProgress:E}=e,x=t?.media??[];if(!x.length)return;let{taskId:h}=yield this.composerHttpService.getBrollsForSlides(o,yield this.resolveBrollLang(_),n.amount,n.library,x.map(b=>({text:b.text??"",duration:b.metadata?.duration})),n.assets);if(!h)throw new Error("Failed to create B-Roll task E01");let y=yield this.waitForBrollTask(h,E);if(!y)throw new Error("Failed to create B-Roll task E02");PI(x,y.overlays??[]),this.feature=st(Ke({},n),{storyTopic:y.topic??n.storyTopic}),this.rememberOverlays(y.overlays??[]);});}waitForBrollTask(e,t){this.websocketService.listen();let n=this.taskProgressService.getProgressDataForEntity(e).pipe(Ti()),o=this.taskProgressService.taskFailed$,_=n.pipe(fa(null),On(CI),oi(()=>{throw new Error("Timeout: No progress updates received for 5 minutes");}));return Xd(Kd([Vn([n,o.pipe(fa(null),sn(E=>E===null||E?.entityId===e||E?.entityIds?.includes(e)))]).pipe(Go(([E,x])=>{if(x!==null||!E)return;let h=this.taskProgressService.getProgressPercentage(E,e);t?.(h??void 0);}),sn(([E,x])=>x!==null||E?.status==="completed"||E?.taskStatus==="completed"),oi(([E,x])=>{if(x!==null)throw new Error(x.status||"Task failed");return E?.result?.broll;}),zr(1)),_]));}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function PI(i,r){for(let e of r){if(e.type==="video"&&!Number.isFinite(e.duration)){let o=`B-roll video asset has no duration: ${e.id??e.highResUrl}`;console.error(o),Qt(new Error(o));continue;}let t=0,n=e.indices??[];for(let o=0;o<n.length;o++){let _=n[o],E=i[_];if(!E){let x=`Invalid index number in b-roll indices: ${_}`;console.error(x),Qt(new Error(x));continue;}if(e.type==="image")E.media=[{thumbnailUrl:e.thumbnailUrl??e.lowResUrl,url:e.highResUrl,type:"image"}],E.metadata.effects=[...fm(E),H_(o===0?1:1.2)];else if(e.type==="video"){let x={thumbnailUrl:e.thumbnailUrl??OI,previewUrl:e.lowResUrl,url:e.highResUrl,assetDuration:cS(e.duration),seek:t,type:"video"};if(!np({item:x,duration:E.metadata?.duration})){console.warn(`B-roll clip ran out before slide ${_}; dropping the rest of its run`);break;}E.media=[x],E.metadata.effects=fm(E),t=cS(t+(E.metadata?.duration??0));}}}}function cS(i){return Number((i??0).toFixed(4));}var ud=function(i){return i.ADD="add",i.MENU="menu",i.PIN="pin",i.SAVE="save",i.PREVIEW="preview",i.AI_GENERATE="ai-generate",i;}(ud||{}),Vp=(()=>{class i{constructor(e,t,n,o,_,E,x,h,y,b,p,c,d,m){this.serverlessApiService=e,this.storyService=t,this.composerHttpService=n,this.slidesActionsService=o,this.requestsService=_,this.uploadHelperService=E,this.notificationService=x,this.composerService=h,this.eventsService=y,this.composerEventsService=b,this.sliderV2StoryService=p,this.slideSelectionService=c,this.sliderV2BrollService=d,this.sliderV2SlideMediaService=m,this.uploadStatusSubscriptions=[],this.EVENT_PATH=this.eventsService.events.composer,this.sliderV2Blacklist={bigvu:new Set(),external:new Set()},this.isSliderV2=Xn()==="v2",this.updateMediaSidebarState=()=>{let a=this.composerService.uploadsSidebarState$.getValue();a&&this.composerService.uploadsSidebarState$.next(st(Ke({},a),{shouldReloadSidebar:!0}));},this.sendEvent=(a,s)=>{this.composerEventsService.log(a,s);},this.assetsBlacklistIds=[];}
816ngOnDestroy(){this.uploadStatusSubscriptions.forEach(e=>e.unsubscribe());}initializeService(){let e=this.readContext();this.sendEvent(this.EVENT_PATH.brollSuggestStart,{slideIndex:e.slideIndex,text:e.text,currOverlay:e.currOverlay});}resetSceneBlacklist(){this.sliderV2Blacklist.bigvu=new Set(),this.sliderV2Blacklist.external=new Set();}getBrollSuggestion(e){return kt(this,null,function*(){let t=this.readContext(),{slideIndex:n,text:o,currOverlay:_}=t;e&&this.sendEvent(this.EVENT_PATH.brollSuggestRegenerate,{slideIndex:n,text:o,currOverlay:_});try{let E=t.feature,x=t.bigvuAssetsBlacklistIds,h=t.externalAssetsBlacklistIds,y=t.currentOverlaySource;if(y)switch(y.library){case"bigvu":x.add(y.id);break;case"pexels":h.add(y.id);break;}let b=this.isSliderV2&&this.sliderV2BrollService?yield this.sliderV2BrollService.resolveBrollLang(t.lang):t.lang,p=yield this.composerHttpService.getBrollSuggestionOptions(t.aspectRatio,b,E?.library,t.slides,n,t.minAssetDuration,E?.storyTopic,Array.from(x),Array.from(h),E?.assets);if(!p)throw this.notificationService.error("Error with broll suggestion, should not be undefined"),new Error("Error with broll suggestion, should not be undefined");E?.storyTopic===void 0&&(E={library:[],amount:Ml.ALL,storyTopic:p.topic},this.writeBrollFeature(E));for(let c of p.overlays)switch(c.library){case"bigvu":x.add(c.id);break;case"pexels":h.add(c.id);break;}return this.rememberOverlays(p.overlays),p.overlays=p.overlays.map(c=>st(Ke({},c),{fileType:c.type,resource:st(Ke({url:c.highResUrl},c.type==="video"&&{duration:c.duration}),{streams:{lower:{url:c.lowResUrl},high:{url:c.highResUrl}},thumbnails:{lower:{url:c.thumbnailUrl}}})})),this.sendEvent(this.EVENT_PATH.brollSuggestOutput,{slideIndex:n,text:o,currOverlay:_}),p;}catch(E){throw this.sendEvent(this.EVENT_PATH.brollSuggestOutput,{slideIndex:n,text:o,currOverlay:_,error:E}),Qt(E),new Error(E);}});}minDurationForAsset(e,t){let n=e[t],o=this.storyService.slideTypeIdentifier(n),_=this.storyService.slidePrimaryMedia(n,o),E=n.metadata.duration;for(let x=n.index-1;x>=0;x--){let h=this.storyService.slideTypeIdentifier(e[x]);if(h===o){let y=this.storyService.slidePrimaryMedia(e[x],h),b=this.storyService.slidePrimaryMedia(e[x+1],h).seek;if(_.url===y.url&&Math.abs(b-(y.seek+e[x].metadata.duration))<.01)E+=e[x].metadata.duration;else break;}else break;}for(let x=n.index+1;x<e.length;x++){let h=this.storyService.slideTypeIdentifier(e[x]);if(h===o){let y=this.storyService.slidePrimaryMedia(e[x],h),b=this.storyService.slidePrimaryMedia(e[x-1],h).seek;if(_.url===y.url&&Math.abs(y.seek-(b+e[x-1].metadata.duration))<.01)E+=e[x].metadata.duration;else break;}else break;}return E;}onAddToSlide(e){if(this.isSliderV2){let E=this.slideSelectionService?.index();if(E==null)return;this.sliderV2SlideMediaService?.addAssetToSlide({index:E,asset:e,scope:"run"});return;}let t=uS.cloneDeep(e),n=this.storyService.story.composerSessionState.selectedSlide.index,o=this.slidesActionsService.convertDropDataToReplaceableSlide(t,n),_=this.storyService.slideOverlayMedia(this.storyService.story.media[n])?.url;this.storyService.shouldHideDropletPreview(_)?this.slidesActionsService.replaceSlide(o,"add-item").then(()=>{}).catch(()=>{}):this.notificationService.error("Cannot change while scene visual is being attached");}onUploadToLibrary(e){let t={fileType:e.type,url:"highResUrl"in e?e.highResUrl:e.resource?.url,level:"desk",deskId:this.readDeskId(),title:"BRoll Suggestion",source:["video-maker"]};this.notificationService.info("Uploading suggestion to your library. It may take a while"),this.requestsService.attachAsset(t).then(n=>{let o=this.uploadHelperService.waitForUploadStatus(n,()=>{this.updateMediaSidebarState();},()=>{},"Suggestion uploaded successfully","Error: Could not upload this take!");this.uploadStatusSubscriptions.push(o);}).catch(n=>{n?this.notificationService.error(n.msg):this.notificationService.error("Error: Could not upload this take!");});}selectedSlideIndex(){return this.isSliderV2?this.slideSelectionService?.index():this.storyService.story?.composerSessionState?.selectedSlide?.index;}readDeskId(){return this.isSliderV2?this.sliderV2StoryService.story()?.deskId:this.storyService.story?.deskId;}readContext(){return this.isSliderV2?this.readSliderV2Context():this.readV1Context();}readV1Context(){let e=this.storyService.story,t=e.composerSessionState.selectedSlide,n=t.index,o=this.storyService.slideOverlayMedia(e.media[n])?.url;return{slideIndex:n,text:t.text,currOverlay:o,slides:e.media.map(_=>({text:_.text,duration:_.metadata.duration})),lang:e.metadata.locale.split("-")[0],aspectRatio:e.composerSessionState.storyOriginalAspectRatio,minAssetDuration:this.minDurationForAsset(e.media,n),feature:e.composerSessionState.bRollFeature,bigvuAssetsBlacklistIds:t.bigvuAssetsBlacklistIds,externalAssetsBlacklistIds:t.externalAssetsBlacklistIds,currentOverlaySource:e.composerSessionState.bRollUrlsMap.get(o),deskId:e.deskId};}readSliderV2Context(){let e=this.sliderV2StoryService.story(),t=e?.media??[],n=this.slideSelectionService?.index()??0,o=t[n],_=o?.media?.[0]?.url,E=Uc(t,n),x=(E.length?E:[n]).reduce((y,b)=>y+(Fr(t,b)??0),0),h=e?.metadata?.locale;return{slideIndex:n,text:o?.text??"",currOverlay:_,slides:t.map((y,b)=>({text:y.text??"",duration:Fr(t,b)??0})),lang:h?.split("-")[0],aspectRatio:e?.aspectRatio,minAssetDuration:x,feature:this.sliderV2BrollService?.brollFeature
816(),bigvuAssetsBlacklistIds:this.sliderV2Blacklist.bigvu,externalAssetsBlacklistIds:this.sliderV2Blacklist.external,currentOverlaySource:this.sliderV2BrollService?.brollUrlSource(_),deskId:e?.deskId};}writeBrollFeature(e){if(this.isSliderV2){this.sliderV2BrollService?.setBrollFeature(e);return;}this.storyService.story.composerSessionState.bRollFeature=e;}rememberOverlays(e){if(this.isSliderV2){this.sliderV2BrollService?.rememberOverlays(e);return;}for(let t of e)this.storyService.story.composerSessionState.bRollUrlsMap.set(t.lowResUrl,{id:t.id,library:t.library,url:t.lowResUrl}),this.storyService.story.composerSessionState.bRollUrlsMap.set(t.highResUrl,{id:t.id,library:t.library,url:t.highResUrl});}static{this.ɵfac=function(t){return new(t||i)(Rt(__),Rt(zi),Rt(Yn),Rt(uo),Rt(Ac),Rt(jc),Rt(En),Rt(nr),Rt(Ji),Rt(en),Rt(Yi),Rt(Rn,8),Rt(au,8),Rt(dl,8));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();hi();Ki();Mr();es();var dS=oo(la());function jp(i){return`url('${(i??"").replace(/[\r\n\f]/g,"").replace(/\\/g,"\\\\").replace(/'/g,"\\'")}')`;}function Bp(i,r){if(!(!i||!r))return{url:i.url,x:r.x,y:r.y,w:r.w,h:r.h,sheetWidth:i.sheetWidth,sheetHeight:i.sheetHeight};}function As(i){let{thumbnail:r,sb:e,withGradient:t,containerSize:n=48}=i,o="linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3))";if(e){let E=i.containerWidth??n,x=i.containerHeight??n,h=Math.max(E/e.w,x/e.h),y=e.sheetWidth*h,b=e.sheetHeight*h,p=-(e.x*h)-(e.w*h-E)/2,c=-(e.y*h)-(e.h*h-x)/2,d=`${jp(e.url)} ${p}px ${c}px / ${y}px ${b}px`;return t?`${o}, ${d}`:d;}let _=r?`${jp(r)} center/cover`:"";return t&&_?`${o}, ${_}`:_;}mt();lo();var jl={MERGE_WITH_PREV:"merge-with-prev",MERGE_WITH_NEXT:"merge-with-next",CARRY_OVERLAY:"carry-over-overlay",SPLIT_SEGMENT_IN_TWO:"split-segment-in-two",EDIT_SEGMENT_DURATION:"edit-segment-duration",REMOVE_OVERLAY:"remove-overlay",DELETE_SEGMENT:"delete-segment"},dr={slides:[],player:void 0,dragging:!1,index:0}
816,hl=()=>Ti((i,r)=>JSON.stringify(i)===JSON.stringify(r)),AI=i=>{let r={level:"NONE",fade:"NONE",endValue:100};if("effects"in i.metadata){let t=i.metadata.effects.filter(n=>n.type==="zoomPan");if(t.length>0){let n=t[0];if(t.length>1)r.level="NONE",r.fade="NONE";else if(n.attributes.fromVal===n.attributes.toVal){let o=rl(n.attributes.fromVal);return r.level=o==="100"?"NONE":o,r.fade="NONE",r.endValue=Math.round(n.attributes.fromVal*100),r;}else n.attributes.fromVal<n.attributes.toVal?(r.level=rl(n.attributes.toVal),r.fade="IN",r.endValue=Math.round(n.attributes.toVal*100)):(r.level=rl(n.attributes.fromVal),r.fade="OUT",r.endValue=Math.round(n.attributes.toVal*100));}}return r;},Ms=(()=>{class i{static{this.IS_DRAGGING=!1;}slideViewModel$(e){return Vn([this.slides$,this.currentIndex$,this.playerStatus$,this.dragging$]).pipe(oi(([t,n,o,_])=>{let E=t.length,x=t.find(h=>h.index===e);if(x)return{active:o!=="PLAYING_INTRO_OUTRO"&&x.index===n,index:x.index,indexStr:(x.index+1).toString().padStart(E.toString().length,"0"),text:x.text,timeStr:Ev(x.time*1e3,"mm:ss","en-US"),thumbnail:x.thumbnail,overlayThumbnail:x.overlayThumbnail,overlayThumbnailLoading:x.uploadingOverlay,type:x.type,playerStatus:o,canMergeWithPrev:e>0,canMergeWithNext:e<E-1,canCarryOverlayToNext:x.type?.includes("OVERLAY")&&e<E-1,canSplitSlide:x.durationInSec>=this.MIN_SPLIT_DURATION_SEC,canEditSlideDuration:E>1&&x.durationInSec>=this.MIN_SLIDE_DURATION_SEC,canDeleteSlide:e===E-1,haveOverlay:x.type?.includes("OVERLAY"),selectedText:x.selectedText,dragging:_&&x.index===n,layout:x.layout,zoomLevel:x.zoomLevel,zoomFade:x.zoomFade,zoomEndValue:x.zoomEndValue,title:x.title,subtitle:x.subtitle,thumbnailBackground:x.thumbnailBackground,overlayBackgroundThumbnail:x.overlayBackgroundThumbnail};}),hl(),Ri({refCount:!0,bufferSize:1}));}constructor(e,t,n,o,_){if(this.storyService=e,this.slidesActionsService=t,this.videoSlidesService=n,this.notifier=o,this.TYPING_INTERVAL_MS=500,this.MIN_SLIDE_DURATION_SEC=Xi.MIN_SLIDE_DURATION_SEC,this.MIN_SPLIT_DURATION_SEC=this.MIN_SLIDE_DURATION_SEC*2,this.hotfix_slideMenuOpenDebounce$=new Yt(),this.store=new yr(dr),this.state$=this.store.asObservable(),this.slides$=this.state$.pipe(oi(E=>E.slides),hl(),Ri({refCount:!0,bufferSize:1})),this.playerStatus$=this.state$.pipe(oi(E=>E.player.status),hl(),Ri({refCount:!0,bufferSize:1})),this.dragging$=this.state$.pipe(oi(E=>E.dragging),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.onCaptionsTextChanged$=new Yt(),this.onTitleTextChanged$=new Yt(),this.onSubtitleTextChanged$=new Yt(),this.onSubtitleAsCaptionsTextChanged$=new Yt(),this.currentIndex$=this.state$.pipe(oi(E=>E.index),Ti(),Ri({refCount:!0,bufferSize:1})),this.slidesViewModel$=this.slides$.pipe(oi(E=>({slidesIndexes:Array.from({length:E.length},(x,h)=>h)}))),_)throw new Error("SlidesService is already loaded");this.updateState(ei(dr,E=>{E.slides=[],E.index=0,E.player={index:0,status:"LOADING"};})),this.videoSlidesService.slideStatus$.pipe(Pt(this.unsubscribe$),hl()).subscribe(E=>{this.updateState(ei(dr,x=>{x.slides[x.index]?.selectedText&&(x.slides[x.index].selectedText=void 0),E.slideIndex>=0&&(x.index=E.slideIndex),x.player={index:E.slideIndex,status:"PAUSED"},E.status==="play"&&E.slideIndex>=0?x.player.status="PLAYING_SLIDE":E.status==="play"&&E.slideIndex===-1&&(x.player.status="PLAYING_INTRO_OUTRO");}));}),this.storyService.hotfix_storyHeadlineGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let E=this.generateSlidesFromStory();this.updateState(ei(dr,x=>{x.slides=E;}));}),this.storyService.hotfix_slideLayoutGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let E=this.generateSlidesFromStory();this.updateState(ei(dr,x=>{x.slides=E;}));}),this.storyService.hotfix_scenesGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let E=this.generateSlidesFromStory(),x=ei(dr,h=>{h.slides=E;});this.updateState(x),x.index>x.slides.length-1&&this.setActiveSlideIndex(x.slides.length-1);}),this.storyService.hotfix_themeGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let E=this.generateSlidesFromStory();this.updateState(ei(dr,x=>{x.slides=E;}));}),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(Pt(this.unsubscribe$)).subscribe(E=>{let x=this.generateSlidesFromStory();this.updateState(ei(dr,h=>{this.storyService.themeId===E.story.themeId&&(h.slides=x);})),this.setActiveSlideIndex(E.story.composerSessionState.buildSlideIndex);}),this.onCaptionsTextChanged$.pipe(On(this.TYPING_INTERVAL_MS),hl(),Pt(this.unsubscribe$)).subscribe(([E,x])=>{x=x===` 817`?"":x,this.applyCaptionsTextChange(E,x);}),this.onTitleTextChanged$.pipe(On(this.TYPING_INTERVAL_MS),hl(),Pt(this.unsubscribe$)).subscribe(([E,x])=>{this.applyTitleTextChange(E,x);}),this.onSubtitleTextChanged$.pipe(On(this.TYPING_INTERVAL_MS),hl(),Pt(this.unsubscribe$)).subscribe(([E,x])=>{this.applySubtitleTextChange(E,x);}),this.onSubtitleAsCaptionsTextChanged$.pipe(On(this.TYPING_INTERVAL_MS),hl(),Pt(this.unsubscribe$)).subscribe(([E,x])=>{let h=ei(dr,y=>{E===y.index&&(y.slides[y.index].selectedText=void 0,y.slides[y.index].text=
817x);});this.updateState(h),E===h.index&&this.slidesActionsService.updateSlideText(h.index,x);}),this.hotfix_slideMenuOpenDebounce$.pipe(On(100),Pt(this.unsubscribe$)).subscribe(E=>{this.slidesActionsService.onSlideActionMenuOpened(E);});}updateState(e){dr=e,this.store.next(dr);}applyCaptionsTextChange(e,t){let n=ei(dr,o=>{o.slides[e]&&(o.slides[e].selectedText=void 0,o.slides[e].text=t);});this.updateState(n),this.slidesActionsService.updateSlideText(e,t);}applyTitleTextChange(e,t){let n=ei(dr,o=>{o.slides[e]&&(o.slides[e].title=t);});this.updateState(n),this.slidesActionsService.updateSlideTitle(e,t);}applySubtitleTextChange(e,t){let n=ei(dr,o=>{o.slides[e]&&(o.slides[e].subtitle=t);});this.updateState(n),this.slidesActionsService.updateSlideSubtitle(e,t);}generateSlidesFromStory(){let e=this.storyService.story,t=[];if(e.type===Lr.COMPOSER){let n=e.audio.thumbnailUrl,o=this.storyService.hotfix_storyboardData;e.media.forEach((_,E)=>{let x=this.storyService.slideTypeIdentifier(_),h=this.storyService.slideOverlayMedia(_,x),y=h?.url,b=h?.thumbnailUrl,p=this.storyService.templateIdsToLayout(_.metadata.templateIds),c=AI(_),d;if(o){let a=qh(o.cues,_.metadata.time);d=Bp(o,a);}let m={index:E,text:_.text,thumbnail:n,overlayThumbnail:b,time:_.metadata.time,actions:{mergeWithPrev:!1,mergeWithNext:!1,split:!1,editDuration:!1,editText:!1,delete:!1},type:x,durationInSec:_.metadata.duration,layout:p,zoomLevel:c.level,zoomFade:c.fade,zoomEndValue:c.endValue,selectedText:void 0,title:p==="Lower 3rd"||p==="Box Video"?_.metadata.resources?.title:"",subtitle:p==="Lower 3rd"?_.metadata.resources?.subtitle:"",uploadingOverlay:(x==="OVERLAY_IMAGE"||x==="OVERLAY_VIDEO")&&!this.storyService.shouldHideDropletPreview(y),storyboardThumbnail:d,thumbnailBackground:As({thumbnail:n,sb:d,withGradient:!0}),overlayBackgroundThumbnail:As({thumbnail:n,sb:d,withGradient:!1})};t.push(m);});}else{let n={index:0,text:"Slide #0",thumbnail:void 0,overlayThumbnail:void 0,time:0,actions:{mergeWithPrev:!1,mergeWithNext:!1,split:!1,editDuration:!1,editText:!1,delete:!1},type:"VIDEO",durationInSec:0,layout:"Captions",zoomLevel:"NONE",zoomFade:"NONE",zoomEndValue:100,selectedText:void 0,title:"",subtitle:"",uploadingOverlay:!1,thumbnailBackground:As({thumbnail:void 0,sb:void 0,withGradient:!0}),overlayBackgroundThumbnail:As({thumbnail:void 0,sb:void 0,withGradient:!1})};t.push(n);}return t;}setActiveSlideIndex(e){document.getSelection().removeAllRanges();let t=this.store.getValue(),n=ei(dr,o=>{o.index!==e&&(o.slides[o.index]?.selectedText&&(o.slides[o.index].selectedText=void 0),o.index=e);});if(this.updateState(n),t.index!==e){let o=this.storyService.story;this.videoSlidesService.showSelectedSlide$.next(o.media[e]);}}playSlide(e){document.getSelection().removeAllRanges(),this.store.getValue().player.status==="LOADING"?this.notifier.error("Loading the video, please wait and try in a few seconds."):this.videoSlidesService.playerAction$.next({action:"playSlide",slideIndex:e});}pauseSlide(){this.videoSlidesService.playerAction$.next({action:"pause"});}onRemoveOverlay(e){this.slidesActionsService.removeOverlayFromSlide(e);}onMergeWithPrevSlide(e){this.slidesActionsService.mergeWithPrevSlide(e).then(t=>{this.store.getValue().index!==t&&this.setActiveSlideIndex(t);}).catch(()=>{});}onMergeWithNextSlide(e){this.slidesActionsService.mergeWithNextSlide(e).then(t=>{this.store.getValue().index!==t&&this.setActiveSlideIndex(t);}).catch(()=>{});}onCarryOverlayToNextSlide(e){this.slidesActionsService.carryOverlayToNextSlide(e,e+1).then(t=>{this.store.getValue().index!==t&&this.setActiveSlideIndex(t);}).catch(()=>{});}onSplitSlide(e){this.slidesActionsService.openSegmentEditor("segment-split",e);}onEditSlideDuration(e){let t=()=>{let n=this.generateSlidesFromStory();this.updateState(ei(dr,o=>{o.slides=n;}));};this.slidesActionsService.openSegmentEditor("segment-duration",e,t);}onDeleteSlide(e){this.slidesActionsService.deleteSlide(e);}onSlideControlsClick(e,t){let n=this.store.getValue();e===n.index?n.player.status==="PLAYING_SLIDE"?this.pauseSlide():this.playSlide(e):this.setActiveSlideIndex(e);}onSlideInfoClick(e,t){let n=this.store.getValue();t&&n.player.status==="PLAYING_SLIDE"&&(t.preventDefault(),t.stopPropagation()),e!==n.index&&this.setActiveSlideIndex(e);}selectSlideAt(e){let t=this.store.getValue();return e<0||e>=t.slides.length?!1:(e!==t.index&&this.setActiveSlideIndex(e),!0);}getCurrentIndex(){return this.store.getValue().index;}onCaptionsTextSelect(e){this.updateState(ei(dr,t=>{let n=t.slides[t.index];e.text?n.selectedText=e:n.selectedText=void 0;}));}getSlideTextByIndex(e){return this.store.getValue().slides[e].text;}setRegularText(e,t){t.stopPropagation();let n=this.store.getValue();this.slidesActionsService.formatToRegularText(e,n.slides[e].selectedText.text).then(o=>{let _=ei(dr,E=>{e===E.index&&(E.slides[E.index].text=o);});this.updateState(_),this.slidesActionsService.updateSlideText(_.index,o);}).catch(()=>{});}setBoldText(e,t){t.stopPropagation();let n=this.store.getValue();this.slidesActionsService.formatBoldText(e,n.slides[e].selectedText.text).then(o=>{let _=ei(dr,E=>{e===E.index&&(E.slides[E.index].text=o);});this.updateState(_),this.slidesActionsService.updateSlideText(_.index,o);}).catch(()=>{});}setExtraBoldText(e,t){t.stopPropagation();let n=this.store.getValue();this.slidesActionsService.formatExtraBoldText(e,n.slides[e].selectedText.text).then(o=>{let _=ei(dr,E=>{e===E.index&&(E.slides[E.index].text=o);});this.updateState(_),this.slidesActionsService.updateSlideText(_.index,o);}).catch(()=>{});}addLineBreak(e,t){t.stopPropagation();let n=this.store.getValue();this.slidesActionsService.addLineBreak(e,n.slides[e].selectedText.text).then(o=>{let _=ei(dr,E=>{e===E.index&&(E.slides[E.index].text=o);});this.updateState(_),this.slidesActionsService.updateSlideText(_.index,o);}).catch(()=>{});}onDragStarted(e,t){i.IS_DRAGGING=!0,this.updateState(ei(dr,n=>{n.dragging=!0;})),this.setActiveSlideIndex(e);}onDragEnded(e,t){i.IS_DRAGGING=!1,this.updateState(ei(dr,n=>{n.dragging=!1;}));}onDrop(e,t){i.IS_DRAGGING=!1,this.updateState(ei(dr,E=>{E.dragging=!1;}));
817let n=t.dropData??t,o=n.index;if(o===e)return;let _;o!==void 0?_=this.slidesActionsService.convertSlideDataToReplaceableSlide(o,e,!0):_=this.slidesActionsService.convertDropDataToReplaceableSlide(dS.cloneDeep(n),e),this.slidesActionsService.replaceSlide(_,"drag-item").then(()=>{this.setActiveSlideIndex(e);}).catch(()=>{});}onSlideActionMenuSelection(e,t){switch(t){case jl.MERGE_WITH_PREV:this.onMergeWithPrevSlide(e);break;case jl.MERGE_WITH_NEXT:this.onMergeWithNextSlide(e);break;case jl.CARRY_OVERLAY:this.onCarryOverlayToNextSlide(e);break;case jl.SPLIT_SEGMENT_IN_TWO:this.onSplitSlide(e);break;case jl.EDIT_SEGMENT_DURATION:this.onEditSlideDuration(e);break;case jl.REMOVE_OVERLAY:this.onRemoveOverlay(e);break;case jl.DELETE_SEGMENT:this.onDeleteSlide(e);break;default:console.error(`${t} is not a valid slide action`);break;}}onSlideActionMenuState(e,t){t===!0&&this.hotfix_slideMenuOpenDebounce$.next(e);}ngOnDestroy(){dr={slides:[],player:void 0,dragging:!1,index:0},this.storyService.clearServiceData(),this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(zi),Rt(uo),Rt(Xi),Rt(En),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Oc();ZE();vn();_r();mt();Bn();hi();var MI=["canvasElement"],RI=()=>({disabled:!1}),LI=()=>[1,2,3,4];function DI(i,r){if(i&1){let e=_t();be(0,"div",28)(1,"span"),li(2,2),Oe(),be(3,"lib-button",29),Ze("clicked",function(){$e(e);let n=Le();return We(n.getSuggestionImages());}),li(4,3),Oe()();}}function NI(i,r){if(i&1){let e=_t();be(0,"div",33)(1,"div",34),Ze("mouseenter",function(){let n=$e(e).index,o=Le(3);return We(o.onImageHover(n));})("mouseleave",function(){$e(e);let n=Le(3);return We(n.onImageHover(-1));}),tt(2,"img",35)(3,"div",36),be(4,"div",37)(5,"div",38),Ze("click",function(){$e(e);let n=Le(3);return We(n.onMenuClick());}),be(6,"select-menu",39),Ze("onSelection",function(){let n=$e(e).$implicit,o=Le(3);return We(o.addToMyUpload(n));}),Oe()(),be(7,"div",40),Ze("click",function(){let n=$e(e).$implicit,o=Le(3);return We(o.addClick(n));}),Oe()()(),be(8,"div",41),lt(9),Oe()();}if(i&2){let e=r.$implicit,t=r.index,n=Le(3);ke("imageData",e.thumbnailUrl)("dropData",e)("showOriginalElementWhileDragging",!0)("ghostDragEnabled",!1),Ce(),ke("@enterAnimation",void 0)("@borderOnHover",n.hoverId===t?"hovered":"normal"),Ce(),ke("src",e.thumbnailUrl,An),Ce(),Li("background-image","url("+e.lowResUrl+")"),Ce(3),ke("shouldOpen",!n.isLoading)("menuOptions",n.actionMenuOptions)("triggerButtonIconClass","three-dots-vertical-white-circle")("triggerButtonActiveIconClass","three-dots-vertical-white-circle-active")("contentStyle","collaborate-action-menu-content"),Ce(),Di("fade",n.shouldFadeIn),Ce(2),hn("",e.author," ");}}function VI(i,r){if(i&1&&(ti(0),at(1,NI,10,17,"div",32),ii()),i&2){let e=Le(2);Ce(),ke("ngForOf",e.assetsArray);}}function jI(i,r){i&1&&(ti(0),be(1,"div",43)(2,"div",44),tt(3,"div",45)(4,"div",46),Oe(),tt(5,"div",47),Oe(),ii());}function BI(i,r){i&1&&at(0,jI,6,0,"ng-container",42),i&2&&ke("ngForOf",Lo(1,LI));}function FI(i,r){if(i&1&&(be(0,"div",30),at(1,VI,2,1,"ng-container",31)(2,BI,1,2,"ng-template",null,1,Vi),Oe()),i&2){let e=mi(3),t=Le();Ce(),ke("ngIf",!t.isLoading)("ngIfElse",e);}}var UI=300,pS=(()=>{class i extends Fn{constructor(e,t,n,o,_,E){super(o),this.dialogRef=e,this.sidebarService=t,this.sidebarSuggestBrollModalService=n,this.data=o,this.slideSelectionService=_,this.sliderV2PlayerService=E,this.isLoading=!1,this.loadFailed=!1,this.hoverId=-1,this.actionMenuOptions=[],this.unsubscribe$=new Yt(),this.requestId=0,this.sceneResultsStale=!1,this.isDocked=Xn()==="v2",this.getSuggestionImages=x=>kt(this,null,function*(){let h=++this.requestId;try{this.isLoading=!0,this.loadFailed=!1;let y=yield this.sidebarSuggestBrollModalService.getBrollSuggestion(x);h===this.requestId&&(this.assetsArray=y.overlays);}catch(y){console.error("Error getting brolls options: ",y),Qt(y),h===this.requestId&&(this.loadFailed=!0);}finally{h===this.requestId&&(this.isLoading=!1);}}),this.onImageHover=x=>{this.hoverId=x;},this.onGenerateClick=()=>{this.sidebarSuggestBrollModalService.sendEvent(this.sidebarSuggestBrollModalService.EVENT_PATH.brollSuggestionClick,{button:ud.AI_GENERATE,slideIndex:this.sidebarSuggestBrollModalService.selectedSlideIndex()}),this.sidebarService.openSidebarModal("SidebarImageGeneratorModalComponent");},this.addClick=x=>{this.sidebarSuggestBrollModalService.sendEvent(this.sidebarSuggestBrollModalService.EVENT_PATH.brollSuggestionClick,{button:ud.ADD,slideIndex:this.sidebarSuggestBrollModalService.selectedSlideIndex()}),this.sidebarSuggestBrollModalService.onAddToSlide(x);},this.onMenuClick=()=>{this.sidebarSuggestBrollModalService.sendEvent(this.sidebarSuggestBrollModalService.EVENT_PATH.brollSuggestionClick,{button:ud.MENU,slideIndex:this.sidebarSuggestBrollModalService.selectedSlideIndex()});},this.playbackStopped$=this.sliderV2PlayerService?Ho(this.sliderV2PlayerService.playing).pipe(sn(x=>!x)):yc,this.actionMenuOptions=[new Cr("upload","Save to Media Library","","icon upload-icon-ai-generator")],this.dialogRef.backdropClick().pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.close();}),this.dialogRef.afterOpened().pipe($s(250)).subscribe(()=>{let x=document.querySelectorAll(".track-thumbnail[selected=true]")[0];x&&x.scrollIntoView({behavior:"smooth",block:"center"});});}
817ngOnInit(){if(this.sidebarSuggestBrollModalService.initializeService(),this.getSuggestionImages(),this.isDocked&&this.slideSelectionService){let e=this.slideSelectionService.changed$.pipe(Go(()=>this.dropSceneSuggestions()),sn(()=>this.sliderV2PlayerService?.playing()?(this.sceneResultsStale=!0,!1):!0)),t=this.playbackStopped$.pipe(sn(()=>this.sceneResultsStale));$u(e,t).pipe(On(UI),Pt(this.unsubscribe$)).subscribe(()=>{if(this.sliderV2PlayerService?.playing()){this.sceneResultsStale=!0;return;}this.sceneResultsStale=!1,this.sidebarSuggestBrollModalService.resetSceneBlacklist(),this.getSuggestionImages();});}}ngAfterViewInit(){document.querySelector(".sidebar-modal-dialog-backdrop-bg")?.remove();}dropSceneSuggestions(){++this.requestId,this.assetsArray=[],this.isLoading=!0,this.loadFailed=!1;}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}addToMyUpload(e){this.sidebarSuggestBrollModalService.onUploadToLibrary(e);}static{this.ɵfac=function(t){return new(t||i)(ut(br),ut(Hr),ut(Vp),ut(jn),ut(Rn,8),ut(Sr,8));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar-sugges-broll-modal"]],viewQuery:function(t,n){if(t&1&&fn(MI,5),t&2){let o;mn(o=gn())&&(n.canvas=o.first);}},hostVars:2,hostBindings:function(t,n){t&2&&Di("docked",n.isDocked);},standalone:!0,features:[Wn([Vp,Ms,uo]),Mn,Ft],decls:34,vars:5,consts:()=>{let e;e="We couldn't load suggestions.";let t;return t="Try again",[["results",""],["showShimmer",""],e,t,[1,"music-modal"],[1,"header-container"],[1,"close-button",3,"click"],[1,"header-title"],[1,"header-text"],[1,"body-container"],[1,"generate-image"],[1,"text-wrapper"],[1,"generate-text-title"],["src","/img/composer/broll-suggestion-modal/crown.svg",1,"crown-icon"],[1,"generate-text-paragraph"],[1,"generate",3,"click"],["src","/img/composer/broll-suggestion-modal/ai-starts-outlined.svg","alt","generate"],["src","/img/generate-img-robot.svg",1,"ai-robot"],[1,"images-section-title"],[1,"images-title"],[1,"regenerate-section-btn",3,"click"],["src","img/composer/broll-suggestion-modal/regenerate.svg","alt","generate"],[1,"regenerate",3,"ngClass","disabled"],[1,"image-results-text-wrapper"],["class","load-failed","role","status",4,"ngIf","ngIfElse"],[1,"powered-by-pexels"],["href","https://www.pexels.com/","target","_blank"],["src","/img/translate-captions/pexels-logo.png","alt","powered by pexels"],["role","status",1,"load-failed"],["variant","secondary","size","sm",3,"clicked"],[1,"image-results-wrapper"],[4,"ngIf","ngIfElse"],["mwlDraggable","","dragWrapper","",3,"imageData","dropData","showOriginalElementWhileDragging","ghostDragEnabled",4,"ngFor","ngForOf"],["mwlDraggable","","dragWrapper","",3,"imageData","dropData","showOriginalElementWhileDragging","ghostDragEnabled"],[1,"broll-suggestion-image",3,"mouseenter","mouseleave"],["alt","image",3,"src"],[1,"blurred-background-layer"],[1,"action-buttons"],[1,"action-menu-container",3,"click"],[3,"onSelection","shouldOpen","menuOptions","triggerButtonIconClass","triggerButtonActiveIconClass","contentStyle"],[1,"add-button",3,"click"],[1,"author-name"],[4,"ngFor","ngForOf"],[1,"image-shimmer"],[1,"section-container"],[1,"preview-section"],[1,"title-section"],[1,"wave"]];},template:function(t,n){if(t&1){let o=_t();be(0,"div",4)(1,"div",5)(2,"div",6),Ze("click",function(){return $e(o),We(n.close());}),Oe(),be(3,"div",7)(4,"div",8),lt(5,"Visual Suggestion"),Oe()()(),be(6,"div",9)(7,"div",10)(8,"div",11)(9,"div",12),lt(10," Craft Your Custom AI Image in a Flash! "),tt(11,"img",13),Oe(),be(12,"div",14),lt(13," Visuals that perfectly match your video. "),Oe(),be(14,"button",15),Ze("click",function(){return $e(o),We(n.onGenerateClick());}),tt(15,"img",16),lt(16," Generate "),Oe()(),tt(17,"img",17),Oe(),be(18,"div",18)(19,"div",19),lt(20," Stock Visuals "),Oe(),be(21,"div",20),Ze("click",function(){return $e(o),We(n.getSuggestionImages(!0));}),tt(22,"img",21),be(23,"button",22),lt(24," Regenerate "),Oe()()(),be(25,"div",23),at(26,DI,5,0,"div",24)(27,FI,4,2,"ng-template",null,0,Vi),Oe(),be(29,"div",25)(30,"span"),lt(31," B-Roll Visuals provided by "),Oe(),be(32,"a",26),tt(33,"img",27),Oe()()()();}if(t&2){let o=mi(28);Ce(23),ke("ngClass",Lo(4,RI))("disabled",!1),Ce(3),ke("ngIf",n.loadFailed&&!n.isLoading)("ngIfElse",o);}},dependencies:[Ci,xc,an,ui,I_,Fh,t_,vr],styles:['.music-modal[_ngcontent-%COMP%]{width:520px;max-height:calc(100vh - 100px);padding:20px;border-radius:20px;-webkit-user-select:none;user-select:none;font-family:Inter-Regular;overflow-y:hidden;background-color:#fff}.docked[_nghost-%COMP%]{display:block}.docked[_nghost-%COMP%] .music-modal[_ngcontent-%COMP%]{width:100%;max-height:calc(100vh - var(--composer-header-offset));border-radius:0;overflow-y:auto;box-sizing:border-box}.header-container[_ngcontent-%COMP%]{position:relative}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;width:30px;height:30px;border-radius:50%}.close-button[_ngcontent-%COMP%]:hover{background-color:#00abfe14;cursor:pointer}.close-button[_ngcontent-%COMP%]:before, .close-button[_ngcontent-%COMP%]:after{position:absolute;content:" ";height:17px;width:1.5px;background-color:#253658;top:7px!important;left:0!important;right:0!important;margin:0 auto}.close-button[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.close-button[_ngcontent-%COMP%]:after{transform:rotate(-45deg)}.header-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.header-text[_ngcontent-%COMP%]{font-size:18px;font-family:Inter-SemiBold;width:100%}.body-container[_ngcontent-%COMP%]{margin-top:18px;display:flex;flex-direction:column;align-items:center}.generate-image[_ngcontent-%COMP%]{width:100%;height:144px;display:flex;flex-direction:row;align-items:center;gap:16px;padding:0 16px;border-radius:10px;background:#fff;justify-content:space-between;border:1px solid rgba(123,141,177,.2)}.generate-image[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;background:#7b8db114;border-radius:10px;font-weight:700;font-size:14px;line-height:15px;gap:6px;color:#7b8db1;flex-shrink:0;min-width:100px;height:24px;padding:unset}.generate[_ngcontent-%COMP%]{background:unset!important;color:#4481fd!important}.text-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:40%;gap:8px}.image-results-text-wrapper[_ngcontent-%COMP%]{width:100%}.load-failed[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 0;color:#4b6fa5;font-size:14px}.image-results-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;gap:6px;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}.broll-suggestion-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;object-fit:cover;object-position:center;width:100%;height:100%;z-index:2}.ai-robot[_ngcontent-%COMP%]{height:100%}
817.three-dots-vertical-white-circle[_ngcontent-%COMP%]{background-image:url(/img/3-w.svg);width:24px;height:24px;object-fit:contain;background-repeat:no-repeat;padding:0;display:block}.three-dots-vertical-white-circle-active[_ngcontent-%COMP%]{background-image:url(/img/3-w-selected.svg);width:24px;height:24px;object-fit:contain;background-repeat:no-repeat;padding:0;display:block}.generate-text-title[_ngcontent-%COMP%]{position:relative;font-size:16px;font-weight:600}.generate-text-paragraph[_ngcontent-%COMP%]{font-size:14px;font-weight:400}.images-section-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%;margin-top:25px;margin-bottom:12px}.images-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600}.regenerate-section-btn[_ngcontent-%COMP%]{display:flex;align-content:center}.regenerate[_ngcontent-%COMP%]{color:#4481fd;font-size:14px;font-weight:600}.powered-by-pexels[_ngcontent-%COMP%]{display:flex;color:#7b8db1;font-size:12px;gap:10px;justify-content:flex-start;width:100%;align-items:center;margin-top:10px}.powered-by-pexels[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:24px}.crown-icon[_ngcontent-%COMP%]{position:absolute;left:95%;top:-2px}.animation-scale-down-center[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.animation-scale-down-center[_ngcontent-%COMP%]:not(:hover){animation:_ngcontent-%COMP%_animation-scale-down-center-out .4s cubic-bezier(.25,.46,.45,.94) both}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes _ngcontent-%COMP%_animation-scale-down-center-out{0%{transform:scale(.95)}to{transform:scale(1)}}.mixer-slider[_ngcontent-%COMP%]{position:relative;width:321px;margin-right:24px;margin-left:24px;margin-bottom:8px}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{-webkit-appearance:none;width:100%;height:3px;border-radius:4px;outline:none;background-color:#4481fd}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:linear-gradient(225deg,#ff75be,#cd33a3);cursor:pointer}.mixer-slider[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{box-shadow:0 0 10px #7b8db1}.slider-input[_ngcontent-%COMP%]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:linear-gradient(225deg,#ff75be,#cd33a3);cursor:pointer}.action-buttons[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:row;justify-content:space-between;z-index:12;top:0;width:100%;padding:10px}.add-button[_ngcontent-%COMP%]{position:absolute;border-radius:40px;z-index:3;cursor:pointer;background-size:cover;background-position:center;background-image:url(/img/plus-with-background-white-grey.svg);transition:opacity .3s ease-in-out;width:22px;height:22px;right:10px;top:10px}.add-button[_ngcontent-%COMP%]:hover:not(.fade){opacity:.6}.add-button[_ngcontent-%COMP%]:before{content:"";position:absolute;background-image:url(/img/selected-asset.svg);background-size:cover;background-position:center;opacity:0;transition:opacity .3s ease-in-out;width:22px;height:22px;display:block}.add-button.fade[_ngcontent-%COMP%]:before{opacity:1} .broll-suggestion-image .action-menu-container .mat-mdc-menu-trigger.triggers{padding:unset!important}.broll-suggestion-image[_ngcontent-%COMP%]{height:146px;flex-shrink:0;position:relative;overflow:hidden;border-radius:8px}.broll-suggestion-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-position:center;object-fit:cover;position:relative;z-index:2}.upload-btn-image[_ngcontent-%COMP%]{padding:8px 9px;display:flex;justify-content:center;align-items:center;position:absolute;right:7px;top:14px;border-radius:4px;background:#fff;color:#4481fd;text-align:center;font-size:13px;font-weight:700}.action-menu-container[_ngcontent-%COMP%]{position:absolute;z-index:1;left:10px;top:10px}.select-btn-image[_ngcontent-%COMP%]{padding:8px 9px;display:flex;justify-content:center;align-items:center;border-radius:4px;background:#fff;color:#4481fd;text-align:center;font-size:13px;font-weight:700}.blurred-background-layer[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center;filter:blur(15px);z-index:1;pointer-events:none}
817.author-name[_ngcontent-%COMP%]{font-size:12px;font-weight:500;margin-left:5px}.image-shimmer[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;height:163.4px;gap:10px;overflow:hidden;width:100%}.preview-row[_ngcontent-%COMP%]{width:100%;display:flex;gap:20px;height:100%}.section-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;height:100%;width:100%}.title-section[_ngcontent-%COMP%]{width:100%;height:12px;display:flex;gap:3px;background:#4481fd33;flex-shrink:0}.preview-section[_ngcontent-%COMP%]{height:100%;width:100%;background:#4481fd33;border-radius:10px}.wave[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff26;transform:translate(-100%);animation:_ngcontent-%COMP%_wave 1.5s infinite}@keyframes _ngcontent-%COMP%_wave{0%{transform:translate(-100%)}50%{transform:translate(100%)}to{transform:translate(100%)}}'],data:{animation:[Da("enterAnimation",[ga(":enter",[so({opacity:0}),ma("0.4s",so({opacity:1}))])]),Da("borderOnHover",[Yf("normal",so({border:"3px solid transparent"})),Yf("hovered",so({border:"3px solid #4481FD"})),ga("normal <=> hovered",ma("0.3s ease"))])]}});}}return i;})();mt();mt();var Ca=(()=>{class i{constructor(){this.isOpen=$t(!1);}toggle(){this.isOpen.update(e=>!e);}open(){this.isOpen.set(!0);}close(){this.isOpen.set(!1);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();_a();var Ao={sections:void 0,openedModal:void 0},GI=()=>Ti((i,r)=>JSON.stringify(i)===JSON.stringify(r)),zI=100,HI=57,$I=16,WI=30,fS=30,qI=new Set(["SidebarThemesModalComponent","SidebarMusicModalComponent","SidebarUploadsModalComponent","SidebarLibraryModalComponent","SidebarImageGeneratorModalComponent","SidebarBRollSuggestionModalComponent"]),YI=new Set(["SidebarUploadsModalComponent","SidebarLibraryModalComponent","SidebarImageGeneratorModalComponent","SidebarBRollSuggestionModalComponent"]),XI=new Set(["SidebarBRollSuggestionModalComponent"]),Xm=new Set(["SidebarLayoutsPanelComponent"]);function KI(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;}var Hr=(()=>{class i{constructor(e,t,n,o){if(this.videoSlidesService=e,this.storyService=t,this.dialogHelperService=n,this.store=new yr(Ao),this.state$=this.store.asObservable(),this.sections$=this.state$.pipe(oi(_=>_.sections),GI(),Ri({refCount:!0,bufferSize:1})),this.openedModal$=this.state$.pipe(oi(_=>_.openedModal),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.currenView$=new Yt(),this.sidebarModals={SidebarResizeModalComponent:w0,SidebarResizeModalV2Component:Lm,SidebarAutoZoomModalComponent:Y0,SidebarIntroOutroModalComponent:ib,SidebarThemesModalComponent:Sb,SidebarThemesModalV1Component:Vm,SidebarLayoutsPanelComponent:Zb,SidebarMusicModalComponent:tS,SidebarLibraryModalComponent:oS,SidebarUploadsModalComponent:aS,SidebarImageGeneratorModalComponent:sS,SidebarBRollSuggestionModalComponent:pS},this.sliderV2StoryService=ct(Yi),this.agentLauncher=ct(Ca,{optional:!0}),this.composerGeneration=Xn(),this.isSliderV2=this.composerGeneration==="v2",this.isSliderV2$=pa(this.isSliderV2),this.sliderV2IsResized$=Ho(this.sliderV2StoryService.story).pipe(oi(_=>fp(_)!=="none"),Ti()),this.sliderV2HasSoundbed$=Ho(this.sliderV2StoryService.story).pipe(oi(_=>!!_?.soundbed),Ti()),this.sidebarViewModel$=Vn([this.sections$,this.openedModal$,this.isSliderV2$]).pipe(oi(([_,E,x])=>({sections:_?.map(y=>st(Ke({},y),{items:y.items.filter(b=>!(x&&b.hiddenInSliderV2)).map(b=>st(Ke({},b),{disabled:x&&!!b.disabledInSliderV2}))})),openedModal:E}))),o)throw new Error("SidebarService is already loaded");this.storyService.hotfix_storyCreated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Resize"?x.badge="zoom"in this.storyService.story:x.label==="Themes"?x.badge=this.storyService.story.metadata?.speechSyncAnimation||this.storyService.isRandomRotationEnabled():x.label==="Intro/Outro"?x.badge="intro"in this.storyService.story||"outtro"in this.storyService.story:x.label==="Music"&&(x.badge="soundbed"in this.storyService.story);}));}),this.updateState(ei(Ao,_=>{_.sections=[{title:"Style",items:[{badge:!1,label:"Resize",icon:"/img/icon-library/actions/crop-stroke-small.svg",modalComponentName:"SidebarResizeModalComponent"},{badge:!1,label:"AI Zoom",icon:"/img/icon-library/ai/ai-zoom-stroke-small.svg",modalComponentName:"SidebarAutoZoomModalComponent",disabledInSliderV2:!0},{badge:!1,label:"Themes",icon:"/img/icon-library/actions/theme-design-color-stroke-small.svg",modalComponentName:"SidebarThemesModalComponent"},{badge:!1,label:"Intro/Outro",icon:"/img/icon-library/content-scripts/video-pages-business-stroke-small.svg",modalComponentName:"SidebarIntroOutroModalComponent",hiddenInSliderV2:!0},{badge:!1,label:"Music",icon:"/img/icon-library/video-music/music-stroke-small.svg",modalComponentName:"SidebarMusicModalComponent"}]},{title:"Media",items:[{badge:!1,label:"Library",icon:"/img/icon-library/actions/upload-2-stroke-small.svg",modalComponentName:"SidebarUploadsModalComponent"},{badge:!1,label:"Content Bank",icon:"/img/icon-library/images-media/content-bank-stroke-small.svg",modalComponentName:"SidebarLibraryModalComponent"},{badge:!1,label:"AI Visuals",icon:"/img/icon-library/ai/chatbot-ai-roboto-stroke-small.svg",modalComponentName:"SidebarImageGeneratorModalComponent"},{badge:!1,label:"Suggest",icon:"/img/icon-library/ai/ai-stroke-small.svg",modalComponentName:"SidebarBRollSuggestionModalComponent"}]}];})),this.storyService.hotfix_storyZoomGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Resize"&&(x.badge="zoom"in this.storyService.story);}));}),this.isSliderV2&&(this.sliderV2IsResized$.pipe(Pt(this.unsubscribe$)).subscribe(_=>{this.updateState(ei(Ao,E=>{for(let x of E.sections)for(let h of x.items)h.label==="Resize"&&(h.badge=_);}));}),this.sliderV2HasSoundbed$.pipe(Pt(this.unsubscribe$)).subscribe(_=>{this.updateState(ei(Ao,E=>{for(let x of E.sections)for(let h of x.items)h.label==="Music"&&(h.badge=_);}));})),this.storyService.hotfix_introOutroGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Intro/Outro"&&(x.badge="intro"in this.storyService.story||"outtro"in this.storyService.story);}));}),this.storyService.hotfix_storySoundbedGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Music"&&(x.badge="soundbed"in this.storyService.story);}));}),this.storyService.hotfix_storySpeechSyncAnimationGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Themes"&&(x.badge=this.storyService.story.metadata?.speechSyncAnimation||this.storyService.isRandomRotationEnabled());}));}),this.storyService.hotfix_storyRandomRotationGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.updateState(ei(Ao,_=>{for(let E of _.sections)for(let x of E.items)x.label==="Themes"&&(x.badge=this.storyService.story.metadata?.speechSyncAnimation||this.storyService.isRandomRotationEnabled());}));});}updateState(e){Ao=e,this.store.next(Ao);}
817set sidebarViewContainerRef(e){this._sidebarViewContainerRef=e;}get openedModalName(){return this.store.getValue().openedModal;}closeSidebarModal(){this.currentDialogRef=void 0,this.dialogHelperService.close(),this.updateState(ei(Ao,e=>{e.openedModal=void 0;}));}toggleAgentDrawer(){this.agentLauncher&&(!this.agentLauncher.isOpen()&&this.openedModalName&&!Xm.has(this.openedModalName)&&this.closeSidebarModal(),this.agentLauncher.toggle());}isDisabledForThisSession(e){return this.isSliderV2?this.store.getValue().sections?.some(t=>t.items.some(n=>n.modalComponentName===e&&n.disabledInSliderV2))??!1:!1;}openSidebarModal(e,t,n){if(this.isDisabledForThisSession(e))return;if(Xm.has(e)||this.agentLauncher?.close(),this.videoSlidesService.playerAction$.next({action:"pause"}),this.dialogHelperService.close(),this.store.getValue().openedModal===e){this.closeSidebarModal();return;}if(e in this.sidebarModals){let _=new va();Object.assign(_,n?.data??{}),_.onClose=()=>{this.closeSidebarModal();},_.onSubmit=c=>{this.closeSidebarModal();};let E=n?.drawer??(e==="SidebarImageGeneratorModalComponent"&&!this.isSliderV2),x=!E&&qI.has(e)&&this.isSliderV2,h=!E&&Xm.has(e),y=x||h,b=new Do();b.disableClose=!0,b.panelClass=E?["sidebar-modal-dialog","sidebar-modal-drawer"]:x?["sidebar-modal-dialog","sidebar-modal-docked",...(YI.has(e)?["sidebar-modal-docked-wide"]:[]),...(XI.has(e)?["sidebar-modal-docked-fit"]:[])]:h?["sidebar-modal-dialog","sidebar-modal-docked-right"]:["sidebar-modal-dialog","sidebar-modal-card"],b.backdropClass="sidebar-modal-dialog-backdrop-bg",b.viewContainerRef=this._sidebarViewContainerRef,b.enterAnimationDuration="0ms",b.exitAnimationDuration=KI()?"1ms":E||y?"280ms":"160ms",this.menuItemEl=t;let p;try{p=this.dialogHelperService.open(_,this.resolveModalComponent(e),b);}catch(c){console.error(`[SidebarService] ${e} failed to open`,c),Qt(c),this.discardOrphanedOverlays(),this.currentDialogRef=void 0;return;}this.currentDialogRef=p,p.afterOpened().pipe(zr(1)).subscribe(()=>{requestAnimationFrame(()=>{!E&&!y&&this.repositionModal(p),this.paneOf(p)?.classList.add("sidebar-modal-positioned");});}),p.beforeClosed().pipe(zr(1)).subscribe(()=>{this.paneOf(p)?.classList.add("sidebar-modal-closing");}),this.updateState(ei(Ao,c=>{c.openedModal=e;}));}else throw this.updateState(ei(Ao,_=>{_.openedModal=e;})),new Error("modalComponentName is not set");}resolveModalComponent(e){return e==="SidebarThemesModalComponent"&&!this.isSliderV2?Vm:e==="SidebarResizeModalComponent"&&this.isSliderV2?Lm:this.sidebarModals[e];}paneOf(e){if(e)return document.getElementById(e.id)?.closest(".cdk-overlay-pane")??void 0;}discardOrphanedOverlays(){document.querySelectorAll(".cdk-overlay-pane.sidebar-modal-dialog, .sidebar-modal-dialog-backdrop-bg").forEach(e=>e.remove());}sudoBarHeight(){let e=getComputedStyle(document.documentElement).getPropertyValue("--sudo-bar-height");return parseFloat(e)||0;}repositionModal(e){let t=this.paneOf(e);if(!t?.classList.contains("sidebar-modal-card"))return;let n=t.getBoundingClientRect().height,o=this.sudoBarHeight()+HI+WI,_=window.innerHeight-fS-n,E;if(this.menuItemEl){let h=this.menuItemEl.getBoundingClientRect(),b=h.top+h.height/2-n/2;E=Math.max(o,Math.min(b,Math.max(o,_)));}else{let h=window.innerHeight-fS-o,y=o+Math.max(0,(h-n)/2);E=Math.max(o,Math.min(y,Math.max(o,_)));}let x=zI+$I;e.updatePosition({left:`${x}px`,top:`${E}px`});}repositionCurrentModal(){this.currentDialogRef&&requestAnimationFrame(()=>this.repositionModal(this.currentDialogRef));}ngOnDestroy(){Ao={sections:void 0,openedModal:void 0},this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(Xi),Rt(zi),Rt(co),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Number.prototype.bvFixed=function(){return Number(this.valueOf().toFixed(4));};var $r={scenes:[],logo:void 0,index:0,introScene:!1,availableLayouts:{}},ZI=(i,r)=>i.level===r.level&&i.fade===r.fade&&i.isAutoZoomed===r.isAutoZoomed,eo=(()=>{class i{static{this.LAYOUT_CONFIGS=[{key:"Captions",icon:"layout-captions.svg",title:"Captions"},{key:"Highlight",icon:"layout-highlight.svg",title:"Highlight"},{key:"Split",icon:"layout-split.svg",title:"Split"},{key:"Box Video",icon:"layout-box-video.svg",title:"Box"},{key:"Quote",icon:"layout-quote.svg",title:"Quote"},{key:"Lower 3rd",icon:"layout-lower3rd.svg",title:"Lower 3rd"},{key:"Dual",icon:"layout-dual.svg",title:"Dual"},{key:"Circle",icon:"layout-circle.svg",title:"Circle"},{key:"BG Removal",icon:"layout-bg-removal.svg",title:"On Screen"}];}static layoutUiTitle(e){return i.LAYOUT_CONFIGS.find(t=>t.key===e)?.title??String(e);}constructor(e,t,n,o,_,E,x){if(this.dialog=e,this.videoSlidesService=t,this.storyService=n,this.eventsService=o,this.composerEventsService=_,this.sidebarService=E,this.MIN_ZOOM_SIZE=5,this.MAX_ZOOM_SIZE=35,this.store=new yr($r),this.state$=this.store.asObservable(),this.scenes$=this.state$.pipe(oi(h=>h.scenes),Ti(),Ri({refCount:!0,bufferSize:1})),this.scenesCount$=this.state$.pipe(oi(h=>h.scenes.length),Ti(),Ri({refCount:!0,bufferSize:1})),this.currentSceneLogoVisible$=this.state$.pipe(oi(h=>h.scenes[h.index]?.logoVisible),Ti(),Ri({refCount:!0,bufferSize:1})),this.currentSceneZoom$=this.state$.pipe(oi(h=>h.scenes[h.index]?.zoom),Ti(ZI),Ri({refCount:!0,bufferSize:1})),this.currentSceneLayout$=this.state$.pipe(oi(h=>h.scenes[h.index]?.selectedLayout),Ti(),Ri({refCount:!0,bufferSize:1})),this.currentSceneSupportedLayouts$=this.state$.pipe(oi(h=>h.scenes[h.index]?.supportedLayouts),Ti(),Ri({refCount:!0,bufferSize:1})),this.currentIndex$=this.state$.pipe(oi(h=>h.index),Ti(),Ri({refCount:!0,bufferSize:1})),this.availableLayouts$=this.state$.pipe(oi(h=>h.availableLayouts),Ti(),Ri({refCount:!0,bufferSize:1})),this.introScene$=this.state$.pipe(oi(h=>h.introScene),Ti(),Ri({refCount:!0,bufferSize:1})),this.logo$=this.state$.pipe(oi(h=>h.logo),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.zoomChangeEventDebounce$=new Yt(),this._zoomInputsCache=null,this._zoomInputsCacheVersion=-1,this._zoomInputsVersion=0,this._sequenceMapCache=null,this._sequenceMapCacheVersion=-1,this.sceneEditorViewModel$=Vn([this.currentIndex$,this.introScene$,this.scenes$,this.currentSceneLayout$]).pipe(sn(([h,y,b,p])=>h<=b.length-1),oi(([h,y,b,p])=>({active:!y&&b[h].active,index:h,showLogo:p!==void 0,showZoom:!0,showLayout:!0}))),this.sceneLogoViewModel$=Vn([this.currentSceneLogoVisible$,this.logo$,this.currentIndex$,this.storyService.hotfix_transformEffectsGotUpdated$.pipe(fa(void 0))]).pipe(oi(([h,y,b])=>{let p=!this.storyService.isSlideHaveLogoTransform(b);return y?{hasLogo:!!y.url,url:y.url,logoVisible:h,size:y.size,sizeRange:y.sizeRange,showSize:p}:{hasLogo:!1,url:void 0,logoVisible:!1,size:void 0,sizeRange:void 0,showSize:p};})),this.sceneZoomViewModel$=Vn([this.currentSceneLayout$,this.currentSceneZoom$,this.currentIndex$,this.scenesCount$]).pipe(oi(([h,y,b])=>{let p=h===void 0||this.storyService.isMultipleMediaLayout(h),c=this.storyService.story?.media?.[b]?.metadata?.duration??0,d=!sm(c),m=null,a=null,s=!1,l=this.buildSequenceMap();if(l.size>0&&!p){let g=l.get(b)??null;g&&g.meetsThreshold&&(m=g.fromVal,a=g.toVal,g.startIdx!==g.endIdx&&(d=!1));let f=m!==null?Math.round(m*100):null,v=a!==null?Math.round(a*100):null;((f===110||v===110)&&y.isAutoZoomed||y.level==="110"&&y.isAutoZoomed)&&(s=!0);}return st(Ke({},y),{index:b,disableAll:p,disableFade:d,sequenceFromVal:m,sequenceToVal:a,isAi110:s});})),this.sceneLayoutsViewModel$=Vn([this.currentSceneLayout$,this.availableLayouts$,this.currentSceneSupportedLayouts$,this.scenesCount$]).pipe(oi(([h,y,b,p])=>({selectedLayout:h,disableAll:h===void 0,availableLayouts:y,supportedLayouts:b,scenesCount:p,layouts:b?i.LAYOUT_CONFIGS.filter(c=>b.includes(c.key)):[]}))),x)throw new Error("ScenesService is already loaded");this.storyService.hotfix_storyCreated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let h="logo"in this.storyService.story?this.storyService.story.logo:void 0,y=this.generateScenesFromStory();this.updateState(ei($r,p=>{p.scenes=y,h&&(p.logo={assetId:h.asset.assetId,url:h.asset.resource.url,size:h.size*100,sizeRange:{min:this.MIN_ZOOM_SIZE,max:this.MAX_ZOOM_SIZE}});})),this.invalidateZoomInputsCache();let b=this.buildSlideZoomInputs();if(b.length>0){let p=Kh(b);p.length>0&&(nl(this.storyService.story.media,p),this.invalidateZoomInputsCache(),b=this.buildSlideZoomInputs());let c=D_(b);if(c.length>0){nl(this.storyService.story.media,c),this.invalidateZoomInputsCache();let d=this.generateScenesFromStory();this.updateState(ei($r,m=>
817{m.scenes=d;}));}}}),this.videoSlidesService.slideStatus$.pipe(Pt(this.unsubscribe$),Ws("slideIndex")).subscribe(h=>{this.setSceneIndex(h.slideIndex);}),this.videoSlidesService.selectSlideByIndex$.pipe(Pt(this.unsubscribe$),Ti()).subscribe(h=>{this.setSceneIndex(h);}),this.zoomChangeEventDebounce$.pipe(On(5e3),sn(([h,y])=>JSON.stringify(h)!==JSON.stringify(y)),Pt(this.unsubscribe$)).subscribe(([h,y])=>{h.fade==="NONE"&&h.level==="100"&&(Qt(new Error("Zoom level 100 can only be used with fade")),h.level=h.level==="100"?"NONE":h.level),y.fade==="NONE"&&y.level==="100"&&(Qt(new Error("Zoom level 100 can only be used with fade")),y.level=y.level==="100"?"NONE":y.level);let p=h.fade==="NONE"&&y.fade!=="NONE"?"Fade added":h.fade!=="NONE"&&y.fade==="NONE"?y.level==="NONE"?"Fade removed":"Zoom added":h.fade!==y.fade?"Fade changed":y.fade!=="NONE"&&h.level!==y.level?"Fade zoom changed":h.level==="NONE"&&y.level!=="NONE"?"Zoom added":h.level!=="NONE"&&y.level==="NONE"?"Zoom removed":h.level!==y.level?"Zoom changed":"No change";if(p==="Zoom added"||p==="Fade added")this.composerEventsService.log(this.eventsService.events.composer.zoomAdd,{slideNum:(y.index+1).toString(),layout:y.layout,percent:y.level,effect:p==="Zoom added"?"none":y.fade});else if(p==="Zoom removed"||p==="Fade removed")this.composerEventsService.log(this.eventsService.events.composer.zoomRemove,{slideNum:(y.index+1).toString(),layout:y.layout});else if(p==="Zoom changed"||p==="Fade changed"||p==="Fade zoom changed"){let c="percent";p==="Fade changed"?c="effect":p==="Fade zoom changed"&&(c="both"),this.composerEventsService.log(this.eventsService.events.composer.zoomChange,{slideNum:(y.index+1).toString(),layout:y.layout,change:c});}}),Vn([this.logo$,this.scenes$]).pipe(ra(1),sn(()=>this.storyService.story.media),On(250),Pt(this.unsubscribe$)).subscribe(([h,y])=>{let b=this.storyService.story.media.length;if(b!=y.length)throw new Error("scenes length is different than story media");let p=h?{assetId:h.assetId,size:h.size/100,url:h.url}:void 0;this.storyService.updateStoryLogo(p);for(let c=0;c<b;c++)this.storyService.updateSlideLogo(c,y[c].logoVisible),this.storyService.story.media[c]?.metadata?.effects?.find(s=>s.type==="zoomPan")?.attributes?.ease==="linear"||this.storyService.updateSlideZoom_HF(c,y[c].zoom.level,y[c].zoom.fade),this.storyService.updateSlideLayout(c,y[c].selectedLayout,!0);if(this.storyService.hotfix_slideLayoutGotUpdated$.next(),!this.storyService.story.composerSessionState.scenesChangeMadeByStoryHotfix){let c=!this.storyService.story.composerSessionState.scenesChangeMadeByUndoRedo,d=c;this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"ScenesService",buildAgain:d,changeMade:c});}this.storyService.story.composerSessionState.scenesChangeMadeByUndoRedo=!1,this.storyService.story.composerSessionState.scenesChangeMadeByStoryHotfix=!1;}),this.storyService.hotfix_scenesGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.invalidateZoomInputsCache(),this.storyService.story.composerSessionState.scenesChangeMadeByStoryHotfix=!0;let h=this.generateScenesFromStory();this.updateState(ei($r,y=>{y.scenes=h,y.index>=y.scenes.length&&(y.index=y.scenes.length-1);}));}),this.storyService.hotfix_themeGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{this.storyService.story.composerSessionState.scenesChangeMadeByStoryHotfix=!0;let h=this.generateScenesFromStory();this.updateState(ei($r,y=>{y.scenes=h,y.availableLayouts=this.storyService.availableLayouts;}));}),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{let y="logo"in h.story?h.story.logo:void 0;if(this.storyService.story.composerSessionState.scenesChangeMadeByUndoRedo=!0,this.storyService.themeId===h.story.themeId){let b=this.generateScenesFromStory();this.updateState(ei($r,p=>{p.scenes=b,y?p.logo={assetId:y.assetId,url:y.url,size:y.size*100,sizeRange:{min:this.MIN_ZOOM_SIZE,max:this.MAX_ZOOM_SIZE}}:delete p.logo;}));}});}updateState(e){$r=e,this.store.next($r);}setSceneIndex(e){this.updateState(ei($r,t=>{t.index=e<0?0:e,t.introScene=e<0;}));}setLogoVisibility(e){this.setLogoVisibilityAt(this.store.getValue().index,e);}setLogoVisibilityAt(e,t){let n=this.store.getValue();return e<0||e>=n.scenes.length?!1:(this.updateState(ei($r,o=>{o.scenes[e].logoVisible=t;})),t||this.storyService.removeLogoTransformFromSlide(e),!0);}hasLogoSelected(){return!!this.store.getValue().logo?.url;}setZoomLevel(e){this.setZoomLevelAt(this.store.getValue().index,e);}setZoomLevelAt(e,t){t=t==="100"?"NONE":t;let n=this.store.getValue();if(e<0||e>=n.scenes.length)return!1;this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.filter(y=>y!==e),this.invalidateZoomInputsCache();let o=this.buildSlideZoomInputs();if(ns(o,e)){let y=Xh(o,e);this.applyZoomUpdates(y,{skipRebuild:!0});}let E=e+1<n.scenes.length?this.storyService.slideTypeIdentifier(this.storyService.story.media[e]):void 0,x=e+1<n.scenes.length?this.storyService.slideTypeIdentifier(this.storyService.story.media[e+1]):void 0,h=ei($r,y=>{e+1<y.scenes.length&&E==="VIDEO"&&x==="VIDEO"&&y.scenes[e].zoom.fade==="IN"&&y.scenes[e+1].zoom.level==="120"&&(y.scenes[e+1].zoom.level="NONE",y.scenes[e+1].zoom.fade="NONE"),y.scenes[e].zoom.level=t,y.scenes[e].zoom.fade="NONE",y.scenes[e].zoom.isAutoZoomed=!1;});return this.updateState(h),this.zoomChangeEventDebounce$.next([{index:e,level:n.scenes[e].zoom.level,fade:n.scenes[e].zoom.fade,layout:n.scenes[e].selectedLayout},{index:e,level:h.scenes[e].zoom.level,fade:h.scenes[e].zoom.fade,layout:h.scenes[e].selectedLayout}]),!0;}setZoomFade(e){this.setZoomFadeAt(this.store.getValue().index,e);}setZoomFadeAt(e,t){let n=this.store.getValue();if(e<0||e>=n.scenes.length)return!1;if(t==="IN"||t==="OUT"){this.invalidateZoomInputsCache();let x=this.buildSlideZoomInputs(),h=ns(x,e);if(h&&h.startIdx!==h.endIdx&&h.fadeDirection!==t){this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.filter(p=>p!==e);let y=N_(x,e,t);this.applyZoomUpdates(y);let b=this.store.getValue();return this.zoomChangeEventDebounce$.next([{index:e,level:n.scenes[e].zoom.level,fade:n.scenes[e].zoom.fade,layout:n.scenes[e].selectedLayout},{index:e,level:b.scenes[e].zoom.level,fade:b.scenes[e].zoom.fade,layout:b.scenes[e].selectedLayout}]),!0;}}if(t!=="NONE"){let x=this.storyService.story.media[e]?.metadata?.duration??0;if(!sm(x))return!1;}this.storyService.story.composerSessionState.autoZoomSlidesIndexes=this.storyService.story.composerSessionState.autoZoomSlidesIndexes.filter(x=>x!==e);let o=e+1<n.scenes.length?this.storyService.slideTypeIdentifier(this.storyService.story.media[e]):void 0,_=e+1<n.scenes.length?this.storyService.slideTypeIdentifier(this.storyService.story.media[e+1]):void 0,E=e
817i($r,x=>{switch(t){case"IN":x.scenes[e].zoom.fade="IN",e+1<x.scenes.length&&o==="VIDEO"&&_==="VIDEO"&&(x.scenes[e+1].zoom.level="120",x.scenes[e+1].zoom.fade="NONE");break;case"OUT":x.scenes[e].zoom.fade="OUT";break;case"NONE":x.scenes[e].zoom.fade!=="NONE"&&e+1<x.scenes.length&&o==="VIDEO"&&_==="VIDEO"&&x.scenes[e+1].zoom.level==="120"&&(x.scenes[e+1].zoom.level="NONE",x.scenes[e+1].zoom.fade="NONE"),x.scenes[e].zoom.level="NONE",x.scenes[e].zoom.fade="NONE";break;}x.scenes[e].zoom.isAutoZoomed=!1;});return this.updateState(E),this.zoomChangeEventDebounce$.next([{index:e,level:n.scenes[e].zoom.level,fade:n.scenes[e].zoom.fade,layout:n.scenes[e].selectedLayout},{index:e,level:E.scenes[e].zoom.level,fade:E.scenes[e].zoom.fade,layout:E.scenes[e].selectedLayout}]),!0;}generateScenesFromStory(){let e=this.storyService.story,t=[];if(e.type===Lr.COMPOSER)for(let n=0;n<e.media.length;n++){let o=e.media[n],_={level:"NONE",fade:"NONE"};if("effects"in o.metadata){let h=o.metadata.effects.filter(y=>y.type==="zoomPan");if(h.length>0){let y=h[0],b=rl(y.attributes.fromVal),p=rl(y.attributes.toVal);if(h.length>1)p="NONE",b="NONE",_.level="NONE",_.fade="NONE";else if(y.attributes.fromVal===y.attributes.toVal){let c=rl(y.attributes.fromVal);_.level=c==="100"?"NONE":c,_.fade="NONE";}else y.attributes.fromVal<y.attributes.toVal?(_.level="NONE",_.fade="IN"):(_.level="NONE",_.fade="OUT");y.attributes.ease!=="linear"&&this.storyService.updateSlideZoom(n,b,p,void 0,{skipRecalc:!0});}}let E={active:!0,logoVisible:"bug"in o,haveOverlay:this.storyService.slideTypeIdentifier(o)?.includes("OVERLAY"),zoom:{level:_.level,fade:_.fade,isAutoZoomed:this.storyService.story.composerSessionState.autoZoomSlidesIndexes.includes(n)},selectedLayout:this.storyService.isThemeSet?this.storyService.templateIdsToLayout(o.metadata.templateIds):void 0,supportedLayouts:this.storyService.getSupportedLayoutsForSlide(n)};t.push(E);}else{let n={active:!0,logoVisible:!1,haveOverlay:!1,zoom:{level:"NONE",fade:"NONE",isAutoZoomed:!1},selectedLayout:"Captions",supportedLayouts:this.storyService.getSupportedLayoutsForSlide()};t.push(n);}return t;}applyLogoSettingsOnAllScenes(){let e=this.store.getValue(),t=e.scenes[e.index].logoVisible,n=e.logo.assetId;this.updateState(ei($r,o=>{for(let _ of o.scenes)_.logoVisible=t;})),t||this.storyService.removeLogoTransformFromAllSlides(),this.composerEventsService.log(this.eventsService.events.composer.logoApplyAll,{logoId:n,visible:t.toString()});}setLogoSize(e){this.updateState(ei($r,t=>{t.logo.size=e;}));}setSceneLayout(e){this.setSceneLayoutAt(this.store.getValue().index,e);}getSceneSnapshot(e){let t=this.store.getValue();if(e<0||e>=t.scenes.length)return null;let n=t.scenes[e];return{selectedLayout:n.selectedLayout,zoom:Ke({},n.zoom),logoVisible:n.logoVisible};}getSceneLayoutAt(e){return this.getSceneSnapshot(e)?.selectedLayout??null;}setSceneLayoutAt(e,t){let n=this.store.getValue();if(e<0||e>=n.scenes.length||!n.scenes[e].supportedLayouts.includes(t))return!1;if(this.storyService.isMultipleMediaLayout(t)){this.invalidateZoomInputsCache();let o=this.buildSlideZoomInputs();if(ns(o,e)){let E=Xh(o,e);this.applyZoomUpdates(E,{skipRebuild:!0});}}return this.updateState(ei($r,o=>{this.applyLayoutToScene(o.scenes[e],t);})),this.composerEventsService.log(this.eventsService.events.composer.layoutChange,{slideNum:(e+1).toString(),oldLayout:n.scenes[e].selectedLayout,newLayout:t}),!0;}applyLayoutOnAllScenes(e){if(this.storyService.isMultipleMediaLayout(e)){this.invalidateZoomInputsCache();let t=this.buildSlideZoomInputs(),n=new Set();for(let o=0;o<t.length;o++){if(n.has(o))continue;let _=ns(t,o);if(_){let E=Xh(t,o);this.applyZoomUpdates(E,{skipRebuild:!0});for(let x=_.startIdx;x<=_.endIdx;x++)n.add(x);}}}this.updateState(ei($r,t=>{for(let n of t.scenes)n.supportedLayouts.includes(e)&&this.applyLayoutToScene(n,e);})),this.composerEventsService.log(this.eventsService.events.composer.layoutApplyAll,{layout:e});}applyLayoutToScene(e,t){e.selectedLayout=t,this.storyService.isMultipleMediaLayout(t)&&(e.zoom.fade="NONE",e.zoom.level="NONE");}openAddLogoDialog(){let e=this.dialog.open(Gh,{backdropClass:"backdropBackgroun
817d",panelClass:"assets-uploads-library-modal-dialog",data:{assetType:"image",assetSubType:"logo",allowedMediaTypesOptions:[new Cr("image","Image")],level:"desk,system",onSubmit:t=>{e.close(),this.updateState(ei($r,n=>{n.logo={assetId:t.assetId,url:t.resource.url,size:this.MAX_ZOOM_SIZE/2,sizeRange:{min:this.MIN_ZOOM_SIZE,max:this.MAX_ZOOM_SIZE}};})),this.composerEventsService.log(this.eventsService.events.composer.logoSave,{logoId:t.assetId});},onClose:()=>{e.close(),this.composerEventsService.log(this.eventsService.events.composer.logoCancel);}}});this.composerEventsService.log(this.eventsService.events.composer.logoStart);}openAutoZoom(){this.sidebarService.openSidebarModal("SidebarAutoZoomModalComponent");}buildSlideZoomInputs(){let e=this.storyService.story;if(!e?.media)return[];if(this._zoomInputsCache&&this._zoomInputsCacheVersion===this._zoomInputsVersion)return this._zoomInputsCache;let t=Zh(this.storyService.mapMediaToRawInputs(e.media));return this._zoomInputsCache=t,this._zoomInputsCacheVersion=this._zoomInputsVersion,t;}buildSequenceMap(){if(this._sequenceMapCache&&this._sequenceMapCacheVersion===this._zoomInputsVersion)return this._sequenceMapCache;let e=this.buildSlideZoomInputs(),t=new Map(),n=new Set();for(let o=0;o<e.length;o++){if(n.has(o))continue;let _=ns(e,o);if(_)for(let E=_.startIdx;E<=_.endIdx;E++)t.set(E,_),n.add(E);else t.set(o,null);}return this._sequenceMapCache=t,this._sequenceMapCacheVersion=this._zoomInputsVersion,t;}invalidateZoomInputsCache(){this._zoomInputsVersion++;}applyZoomUpdates(e,{skipRebuild:t=!1}={}){if(!e.length)return;if(nl(this.storyService.story.media,e),this.invalidateZoomInputsCache(),t){let o=new Set(e.map(E=>E.slideIndex)),_=this.generateScenesFromStory();this.updateState(ei($r,E=>{for(let x of o)x>=0&&x<E.scenes.length&&x<_.length&&(E.scenes[x]=_[x]);}));return;}this.storyService.story.composerSessionState.scenesChangeMadeByStoryHotfix=!0;let n=this.generateScenesFromStory();this.updateState(ei($r,o=>{o.scenes=n;})),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"applyZoomUpdates",buildAgain:!0,changeMade:!0,isFirstLoad:!1});}ngOnDestroy(){$r={scenes:[],logo:void 0,index:0,introScene:!1,availableLayouts:{}},this._zoomInputsCache=null,this._sequenceMapCache=null,this.storyService.clearServiceData(),this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(Ja),Rt(Xi),Rt(zi),Rt(Ji),Rt(en),Rt(Hr),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();Mr();es();mt();var Oa={scenesAmount:0,isIntroExist:!1,isOutroExist:!1,durationInSec:0,isPlayingAll:!1,isPlayingIntro:!1,isPlayingOutro:!1,isPlayerLoading:!0,thumbnailUrl:void 0},su=(()=>{class i{constructor(e,t,n,o){if(this.videoSlidesService=e,this.storyService=t,this.thumbnailBlobCacheService=n,this.store=new yr(Oa),this.state$=this.store.asObservable(),this.scenesAmount$=this.state$.pipe(oi(h=>h.scenesAmount),Ti(),Ri({refCount:!0,bufferSize:1})),this.isIntroExist$=this.state$.pipe(oi(h=>h.isIntroExist),Ti(),Ri({refCount:!0,bufferSize:1})),this.isOutroExist$=this.state$.pipe(oi(h=>h.isOutroExist),Ti(),Ri({refCount:!0,bufferSize:1})),this.durationInSec$=this.state$.pipe(oi(h=>h.durationInSec),Ti(),Ri({refCount:!0,bufferSize:1})),this.isPlayingAll$=this.state$.pipe(oi(h=>h.isPlayingAll),Ti(),Ri({refCount:!0,bufferSize:1})),this.isPlayingIntro$=this.state$.pipe(oi(h=>h.isPlayingIntro),Ti(),Ri({refCount:!0,bufferSize:1})),this.isPlayingOutro$=this.state$.pipe(oi(h=>h.isPlayingOutro),Ti(),Ri({refCount:!0,bufferSize:1})),this.isPlayerLoading$=this.state$.pipe(oi(h=>h.isPlayerLoading),On(500),Ti(),Ri({refCount:!0,bufferSize:1})),this.thumbnailUrl$=this.state$.pipe(oi(h=>h.thumbnailUrl),Ti(),Ri({refCount:!0,bufferSize:1})),this.unsubscribe$=new Yt(),this.infoPanelViewModel$=Vn([this.scenesAmount$,this.isIntroExist$,this.isOutroExist$,this.durationInSec$,this.isPlayingAll$,this.isPlayingIntro$,this.isPlayingOutro$,this.isPlayerLoading$,this.thumbnailUrl$]).pipe(oi(([h,y,b,p,c,d,m,a,s])=>({scenesAmount:h,isIntroExist:y,isOutroExist:b,durationInSec:p,isPlayingAll:c,isPlayingIntro:d,isPlayingOutro:m,isPlayerLoading:a,thumbnailUrl:s}))),o)throw new Error("InfoPanelService is already loaded");let _=t.story,E=0,x=0;"audio"in _&&(E=_.audio.duration,E+="intro"in _?_.intro.data.duration:0,E+="outtro"in _?_.outtro.data.duration:0,this.thumbnailBlobCacheService.getThumbnailBlobUrl(_.audio.thumbnailUrl).then(h=>{this.updateState(ei(Oa,y=>{y.thumbnailUrl=h;}));})),"media"in _&&(x=_.media.length),this.updateState(ei(Oa,h=>{h.scenesAmount=x,h.isIntroExist="intro"in _,h.isOutroExist="outtro"in _,h.durationInSec=E;})),this.videoSlidesService.playerStatus$.pipe(Pt(this.unsubscribe$),Ti()).subscribe(h=>{this.updateState(ei(Oa,y=>{h.isPlaying?(y.isPlayingAll=h.type==="playAll",y.isPlayingIntro=h.type==="playIntro",y.isPlayingOutro=h.type==="playOutro"):(y.isPlayingAll=!1,y.isPlayingIntro=!1,y.isPlayingOutro=!1);}));}),this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{this.updateState(ei(Oa,y=>{y.isPlayerLoading=h;}));}),this.storyService.hotfix_scenesGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let h=t.story;this.updateState(ei(Oa,y=>{y.scenesAmount=h.media.length,y.durationInSec=h.audio.duration;}));}),this.storyService.hotfix_introOutroGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let h=t.story,y=h.audio.duration;y+="intro"in h?h.intro.data.duration:0,y+="outtro"in h?h.outtro.data.duration:0,this.updateState(ei(Oa,b=>{b.isIntroExist="intro"in h,b.isOutroExist="outtro"in h,b.durationInSec=y;}));}),this.storyService.hotfix_storyThumbnailGotUpdated$.pipe(Pt(this.unsubscribe$)).subscribe(()=>{let h=t.story;this.thumbnailBlobCacheService.getThumbnailBlobUrl(h.audio.thumbnailUrl).then(y=>{this.updateState(ei(Oa,b=>{b.thumbnailUrl=y;}));});}),this.storyService.hotfix_changesMadeByUndoRedo$.pipe(Pt(this.unsubscribe$)).subscribe(h=>{let y=h.story.audio.duration;y+="intro"in h.story?h.story.intro.data.duration:0,y+="outtro"in h.story?h.story.outtro.data.duration:0,this.updateState(ei(Oa,b=>{b.scenesAmount=h.story.media.length,b.isIntroExist="intro"in h.story,b.isOutroExist="outtro"in h.story,b.durationInSec=y;}));});}updateState(e){Oa=e,this.store.next(Oa);}
817ngOnDestroy(){Oa={scenesAmount:0,isIntroExist:!1,isOutroExist:!1,durationInSec:0,isPlayingAll:!1,isPlayingIntro:!1,isPlayingOutro:!1,isPlayerLoading:!0,thumbnailUrl:void 0},this.storyService.clearServiceData(),this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(Rt(Xi),Rt(zi),Rt(il),Rt(i,12));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();Ki();Mr();Jf();Ki();mt();mt();var Fp=(()=>{class i{constructor(e,t){this.handleMousedown=()=>{document.addEventListener("mouseup",this.handleMouseup,!1);},this.handleMouseup=()=>{document.removeEventListener("mouseup",this.handleMouseup,!1),this.processSelection();},this.handleSelectionchange=()=>{this.hasSelection&&this.processSelection();},this.elementRef=e,this.zone=t,this.hasSelection=!1,this.textSelectEvent=new Mi();}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("mousedown",this.handleMousedown,!1),document.removeEventListener("mouseup",this.handleMouseup,!1),document.removeEventListener("selectionchange",this.handleSelectionchange,!1);}ngOnInit(){this.zone.runOutsideAngular(()=>{this.elementRef.nativeElement.addEventListener("mousedown",this.handleMousedown,!1),document.addEventListener("selectionchange",this.handleSelectionchange,!1);});}getRangeContainer(e){for(var t=e.commonAncestorContainer;t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;return t;}isRangeFullyContained(e){for(var t=this.elementRef.nativeElement,n=e.commonAncestorContainer;n.nodeType!==Node.ELEMENT_NODE;)n=n.parentNode;return t.contains(n);}processSelection(){var e=document.getSelection();if(this.hasSelection&&this.zone.runGuarded(()=>{this.hasSelection=!1,this.textSelectEvent.next({text:void 0,boundingRect:void 0});}),!(!e.rangeCount||!e.toString())){var t=e.getRangeAt(0),n=this.getRangeContainer(t);if(this.elementRef.nativeElement.contains(n)){var o=t.getBoundingClientRect(),_=this.viewportToHost(o,n);this.zone.runGuarded(()=>{this.hasSelection=!0,this.textSelectEvent.emit({text:e.toString(),boundingRect:{left:_.left,top:_.top,width:_.width,height:_.height}});});}}}viewportToHost(e,t){var n=this.elementRef.nativeElement,o=n.getBoundingClientRect(),_=e.left-o.left,E=e.top-o.top,x=t;do _+=x.scrollLeft,E+=x.scrollTop;while(x!==n&&(x=x.parentNode));return{left:_,top:E,width:e.width,height:e.height};}static{this.ɵfac=function(t){return new(t||i)(ut(oa),ut(To));};}static{this.ɵdir=_c({type:i,selectors:[["","textSelect",""]],outputs:{textSelectEvent:"textSelect"},standalone:!0});}}return i;})();mt();mt();var mS=(()=>{class i{constructor(e,t,n){this.element=e,this.cdRef=t,this.renderer=n,this.draggable=!0,this.dragStart=new Mi(),this.dragEnd=new Mi(),this._options={},this._isDraggableInitialized=!1,this.onDragStart=(o,_)=>{this.element.nativeElement.style.opacity=0,this.dragStart.emit(),this.cdRef.detectChanges();},this.onDragEnd=(o,_)=>{this.element.nativeElement.style.opacity=1,this.dragEnd.emit(),this.cdRef.detectChanges();},this.helperElement=()=>{let o=this.renderer.createElement("div");this.renderer.setStyle(o,"width","65px"),this.renderer.setStyle(o,"height","65px"),this.renderer.setStyle(o,"borderRadius","10px"),this.renderer.setStyle(o,"border","solid 2px #4481FD"),this.renderer.setStyle(o,"zIndex","9999"),this.renderer.setStyle(o,"position","relative");let _=this.renderer.createElement("img");this.renderer.setStyle(_,"position","absolute"),this.renderer.setStyle(_,"top","-9px"),this.renderer.setStyle(_,"right","-8px"),this.renderer.setStyle(_,"zIndex","9999"),this.renderer.setAttribute(_,"src","/img/composer-icons/drag.svg");let E=this.renderer.createElement("div"),x="linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("+this.thumbnail+") center/cover";return this.renderer.setStyle(E,"background",x),this.renderer.setStyle(E,"width","100%"),this.renderer.setStyle(E,"height","100%"),this.renderer.setStyle(E,"borderRadius","10px"),this.renderer.appendChild(o,E),this.renderer.appendChild(o,_),o;};}ngOnChanges(e){this._isDraggableInitialized&&this._options&&e.draggable&&(this.draggable?jQuery(this.element.nativeElement).draggable("enable"):jQuery(this.element.nativeElement).draggable("disable")),this._options&&e.dragData&&this.dragData&&jQuery(this.element.nativeElement).data("dragData",this.dragData);}
817ngOnInit(){this.dragStart&&(this._options.start=this.onDragStart),this.dragEnd&&(this._options.stop=this.onDragEnd),this._options.containment="body",this._options.scroll=!1,this._options.addClasses=!1,this._options.revert="invalid",this._options.appendTo="body",this._options.refreshPositions=!1,this._options.cursorAt={top:0,left:0},this._options.disabled=!0,this._options.helper=this.helperElement,this.dragData&&jQuery(this.element.nativeElement).data("dragData",this.dragData),jQuery(this.element.nativeElement).draggable(this._options),this.draggable&&jQuery(this.element.nativeElement).draggable("enable"),this._isDraggableInitialized=!0;}static{this.ɵfac=function(t){return new(t||i)(ut(oa),ut(Ks),ut(fv));};}static{this.ɵdir=_c({type:i,selectors:[["","cdkVirtualDragWrapper",""]],inputs:{draggable:"draggable",thumbnail:"thumbnail",dragData:"dragData"},outputs:{dragStart:"dragStart",dragEnd:"dragEnd"},standalone:!0,features:[Wa]});}}return i;})();mt();mt();var Up=(()=>{class i{constructor(e){this.element=e,this.droppable=!0,this.drop=new Mi(),this._options={},this._isDroppableInitialized=!1,this.onDrop=(t,n)=>{let o=jQuery(n.draggable).data("dragData");this.drop.emit(o);};}ngOnChanges(e){this._isDroppableInitialized&&this._options&&e.droppable&&(this.droppable?jQuery(this.element.nativeElement).droppable("enable"):jQuery(this.element.nativeElement).droppable("disable"));}ngOnInit(){this._options.greedy=!0,this._options.tolerance="pointer",this._options.disabled=!0,this.drop&&(this._options.drop=this.onDrop),this.dropHoverClass&&(this._options.hoverClass=this.dropHoverClass),jQuery(this.element.nativeElement).droppable(this._options),this.droppable&&jQuery(this.element.nativeElement).droppable("enable"),this._isDroppableInitialized=!0;}ngOnDestroy(){if(this._isDroppableInitialized){this._isDroppableInitialized=!1;try{jQuery(this.element.nativeElement).droppable("destroy");}catch{}}}static{this.ɵfac=function(t){return new(t||i)(ut(oa));};}static{this.ɵdir=_c({type:i,selectors:[["","cdkVirtualDropWrapper",""]],inputs:{droppable:"droppable",dropHoverClass:"dropHoverClass"},outputs:{drop:"drop"},standalone:!0,features:[Wa]});}}return i;})();hi();Oc();l_();mt();am();function e2(i,r){i&1&&(be(0,"div",56),tt(1,"i",57),Oe());}function t2(i,r){i&1&&(be(0,"div",58),tt(1,"i",59),Oe());}function i2(i,r){i&1&&tt(0,"i",60);}function n2(i,r){i&1&&tt(0,"div"),i&2&&Li("width",100,"%")("height",100,"%")("background-image","url(/img/composer-icons/movie-brand-filled.svg)");}function r2(i,r){i&1&&Qr(0);}function o2(i,r){if(i&1){let e=_t();be(0,"div",61),Ze("drop",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onDrop(o.index,n));}),be(1,"div",62),lt(2),Oe()();}if(i&2){let e=Le().ngIf;Li("background",e.thumbnailBackground),Ei("dragging",e.dragging?"":null),Ce(2),_i(e.indexStr);}}function a2(i,r){if(i&1&&tt(0,"div",63),i&2){let e=Le().ngIf;Li("background",e.overlayBackgroundThumbnail);}}function s2(i,r){i&1&&Qr(0);}function l2(i,r){i&1&&(be(0,"div",68),tt(1,"div")(2,"div"),Oe());}function c2(i,r){if(i&1){let e=_t();be(0,"div",64),at(1,s2,1,0,"ng-container",22),be(2,"div",65),Ze("dragStart",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onDragStarted(o.index,n));})("dragEnd",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onDragEnded(o.index,n));})("drop",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onDrop(o.index,n));}),tt(3,"div",66),be(4,"div",62),lt(5),Oe(),at(6,l2,3,0,"div",67),Oe()();}if(i&2){let e=Le().ngIf,t=mi(13),n=mi(15);Ce(),ke("ngIf",e.dragging)("ngIfThen",t)("ngIfElse",n),Ce(),Li("background","linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("+e.overlayThumbnail+") center/cover"),ke("draggable",!e.overlayThumbnailLoading)("droppable",!e.overlayThumbnailLoading)("thumbnail",e.overlayThumbnail)("dragData",e),Ce(3),_i(e.indexStr),Ce(),ke("ngIf",e.overlayThumbnailLoading);}}function u2(i,r){if(i&1&&Qr(0,69),i&2){Le();let e=mi(25);ke("ngTemplateOutlet",e);}}function d2(i,r){if(i&1&&Qr(0,69),i&2){Le();let e=mi(27);ke("ngTemplateOutlet",e);}}function h2(i,r){if(i&1&&Qr(0,69),i&2){Le();let e=mi(23);ke("ngTemplateOutlet",e);}}function p2(i,r){i&1&&Qr(0);}function f2(i,r){if(i&1&&(ti(0),at(1,p2,1,0,"ng-container",22),ii()),i&2){Le();let e=mi(4),t=mi(6),n=Le().ngIf;Ce(),ke("ngIf",n.selectedText.text===" ")("ngIfThen",t)("ngIfElse",e);}}function m2(i,r){if(i&1){let e=_t();be(0,"div",71,9)(2,"div",72),Ze("click",function(n){$e(e);let o=Le(2).ngIf,_=Le();return We(_.slidesService.setRegularText(o.index,n));}),be(3,"span"),lt(4,"Regular"),Oe()(),be(5,"div",72),Ze("click",function(n){$e(e);let o=Le(2).ngIf,_=Le();
817return We(_.slidesService.setBoldText(o.index,n));}),be(6,"span",73),lt(7,"Highlight"),Oe()(),be(8,"div",72),Ze("click",function(n){$e(e);let o=Le(2).ngIf,_=Le();return We(_.slidesService.setExtraBoldText(o.index,n));}),be(9,"span",74),lt(10,"Extra Highlight"),Oe()()();}if(i&2){let e=mi(1);Le();let t=mi(1),n=Le().ngIf;Li("top",t.offsetTop+n.selectedText.boundingRect.top-e.clientHeight-n.selectedText.boundingRect.height/2,"px")("left",t.offsetLeft+n.selectedText.boundingRect.left+n.selectedText.boundingRect.width/2-e.clientWidth/2,"px");}}function g2(i,r){if(i&1){let e=_t();be(0,"div",75,9),Ze("click",function(n){$e(e);let o=Le(2).ngIf,_=Le();return We(_.slidesService.addLineBreak(o.index,n));}),tt(2,"div",76),be(3,"span"),lt(4,"New Line"),Oe()();}if(i&2){let e=mi(1);Le();let t=mi(1),n=Le().ngIf;Li("top",t.offsetTop+n.selectedText.boundingRect.top-e.clientHeight-n.selectedText.boundingRect.height/2,"px")("left",t.offsetLeft+n.selectedText.boundingRect.left+n.selectedText.boundingRect.width/2-e.clientWidth/2,"px");}}function y2(i,r){if(i&1){let e=_t();be(0,"div",70,6),Ze("textSelect",function(n){$e(e);let o=Le(2);return We(o.slidesService.onCaptionsTextSelect(n));})("input",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onCaptionsTextChanged$.next([o.index,n.target.innerText]));})("focus",function(n){$e(e);let o=Le(2);return We(o.onCaptionsFocus(n));})("blur",function(n){$e(e);let o=Le(2);return We(o.onCaptionsBlur(n));}),Oe(),at(2,f2,2,3,"ng-container",12)(3,m2,11,4,"ng-template",null,7,Vi)(5,g2,5,4,"ng-template",null,8,Vi);}if(i&2){let e=mi(1),t=Le().ngIf,n=Le();ke("innerHTML",n.captionsDoubleBuffer,th),Ei("playing",t.playerStatus==="PLAYING_SLIDE"?"true":null)("contenteditable",t.active)("placeholder",!n.inCaptionsEditMode&&e.innerHTML.length===0?"true":null)("active",t.active?"":null),Ce(2),ke("ngIf",t.selectedText);}}function v2(i,r){if(i&1){let e=_t();be(0,"div",77)(1,"div",78),lt(2,"Title"),Oe(),be(3,"div",79)(4,"input",80,10),Ze("input",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onTitleTextChanged$.next([o.index,n.target.value]));})("focus",function(n){$e(e);let o=Le(2);return We(o.onTitleFocus(n));})("blur",function(n){$e(e);let o=Le(2);return We(o.onTitleBlur(n));}),Oe()(),be(6,"div",81),lt(7,"Subtitle"),Oe(),be(8,"div",82)(9,"input",80,11),Ze("input",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onSubtitleTextChanged$.next([o.index,n.target.value]));})("focus",function(n){$e(e);let o=Le(2);return We(o.onSubtitleFocus(n));})("blur",function(n){$e(e);let o=Le(2);return We(o.onSubtitleBlur(n));}),Oe()()();}if(i&2){let e=mi(5),t=mi(10),n=Le().ngIf,o=Le();Ce(4),ke("value",o.titleDoubleBuffer)("disabled",n.active?null:"true"),Ei("placeholder",!o.inTitleEditMode&&e.innerHTML.length===0?"No Title":null),Ce(5),ke("value",o.subtitleDoubleBuffer)("disabled",n.active?null:"true"),Ei("placeholder",!o.inSubtitleEditMode&&t.innerHTML.length===0?"No Subtitle":null);}}function _2(i,r){if(i&1){let e=_t();be(0,"div",77)(1,"div",78),lt(2,"Title"),Oe(),be(3,"div",79)(4,"input",80,10),Ze("input",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onTitleTextChanged$.next([o.index,n.target.value]));})("focus",function(n){$e(e);let o=Le(2);return We(o.onTitleFocus(n));})("blur",function(n){$e(e);let o=Le(2);return We(o.onTitleBlur(n));}),Oe()(),be(6,"div",81),lt(7,"Captions"),Oe(),be(8,"div",82)(9,"input",80,11),Ze("input",function(n){$e(e);let o=Le().ngIf,_=Le();return We(_.slidesService.onSubtitleAsCaptionsTextChanged$.next([o.index,n.target.value]));})("focus",function(n){$e(e);let o=Le(2);return We(o.onSubtitleFocus(n));})("blur",function(n){$e(e);let o=Le(2);return We(o.onSubtitleBlur(n));}),Oe()()();}if(i&2){let e=mi(5),t=mi(10),n=Le().ngIf,o=Le();Ce(4),ke("value",o.titleDoubleBuffer)("disabled",n.active?null:"true"),Ei("placeholder",!o.inTitleEditMode&&e.innerHTML.length===0?"No Title":null),Ce(5),ke("value",o.subtitleAsCaptionsDoubleBuffer)("disabled",n.active?null:"true"),Ei("placeholder",!o.inSubtitleEditMode&&t.innerHTML.length===0?"No Captions":null);}}function b2(i,r){if(i&1&&(be(0,"div",83),tt(1,"img",84),be(2,"div",85),lt(3),Oe()()),i&2){let e=Le().ngIf;Ce(3),hn("",e.zoomEndValue,"%");}}function S2(i,r){if(i&1&&(be(0,"div",83),tt(1,"img",86),be(2,"div",85),lt(3),Oe()()),i&2){let e=Le().ngIf;Ce(3),hn("",e.zoomEndValue,"%");}}function w2(i,r){i&1&&(be(0,"div",85),lt(1,"100%"),Oe());}function E2(i,r){i&1&&(be(0,"div",85),lt(1,"110%"),Oe());}function x2(i,r){i&1&&(be(0,"div",85),lt(1,"120%"),Oe());}function T2(i,r){i&1&&(be(0,"div",85),lt(1,"130%"),Oe());}function C2(i,r){if(i&1&&(be(0,"div",85),lt(1),Oe()),i&2){let e=Le(2).ngIf;Ce(),hn("",e.zoomEndValue,"%");}}function O2(i,r){if(i&1&&(be(0,"div"),at(1,w2,2,0,"div",87)(2,E2,2,0,"div",87)(3,x2,2,0,"div",87)(4,T2,2,0,"div",87)(5,C2,2,1,"div",87),Oe
817()),i&2){let e=Le().ngIf;Ce(),ke("ngIf",e.zoomLevel=="NONE"),Ce(),ke("ngIf",e.zoomLevel=="110"),Ce(),ke("ngIf",e.zoomLevel=="120"),Ce(),ke("ngIf",e.zoomLevel=="130"),Ce(),ke("ngIf",e.zoomLevel==null?null:e.zoomLevel.startsWith("CUSTOM_"));}}function P2(i,r){i&1&&tt(0,"img",88);}function I2(i,r){i&1&&tt(0,"img",89);}function k2(i,r){i&1&&tt(0,"img",90);}function A2(i,r){i&1&&tt(0,"img",91);}function M2(i,r){i&1&&tt(0,"img",92);}function R2(i,r){i&1&&tt(0,"img",93);}function L2(i,r){i&1&&tt(0,"img",94);}function D2(i,r){i&1&&tt(0,"img",95);}function N2(i,r){i&1&&tt(0,"img",96);}function V2(i,r){i&1&&tt(0,"span",97);}function j2(i,r){i&1&&tt(0,"span",98);}function B2(i,r){i&1&&tt(0,"span",99);}function F2(i,r){i&1&&tt(0,"span",100);}function U2(i,r){i&1&&tt(0,"span",101);}function G2(i,r){i&1&&tt(0,"span",102);}function z2(i,r){i&1&&tt(0,"span",103);}function H2(i,r){i&1&&tt(0,"span",104);}function $2(i,r){i&1&&tt(0,"span",105);}function W2(i,r){if(i&1&&tt(0,"span",106),i&2){let e=Le().ngIf;Ei("tooltip-text","Zoom Fade In "+e.zoomEndValue+"%");}}function q2(i,r){if(i&1&&tt(0,"span",106),i&2){let e=Le().ngIf;Ei("tooltip-text","Zoom Fade Out "+e.zoomEndValue+"%");}}function Y2(i,r){i&1&&tt(0,"span",107);}function X2(i,r){i&1&&tt(0,"span",108);}function K2(i,r){i&1&&tt(0,"span",109);}function Z2(i,r){i&1&&tt(0,"span",110);}function Q2(i,r){if(i&1&&tt(0,"span",111),i&2){let e=Le().ngIf;Ei("tooltip-text","Zoom "+e.zoomEndValue+"%");}}function J2(i,r){if(i&1){let e=_t();ti(0),be(1,"div",13)(2,"div",14),Ze("click",function(n){let o=$e(e).ngIf,_=Le();return We(_.slidesService.onSlideControlsClick(o.index,n));}),at(3,e2,2,0,"div",15)(4,t2,2,0,"div",16),be(5,"div",17),lt(6),Oe()(),be(7,"div",18),Ze("click",function(n){let o=$e(e).ngIf,_=Le();return We(_.slidesService.onSlideInfoClick(o.index,n));}),be(8,"div",19),at(9,i2,1,0,"i",20)(10,n2,1,6,"div",21),Oe(),at(11,r2,1,0,"ng-container",22)(12,o2,3,4,"ng-template",null,0,Vi)(14,a2,1,2,"ng-template",null,1,Vi)(16,c2,7,11,"ng-template",null,2,Vi),ti(18,23),at(19,u2,1,1,"ng-container",24)(20,d2,1,1,"ng-container",24)(21,h2,1,1,"ng-container",25),ii(),at(22,y2,7,6,"ng-template",null,3,Vi)(24,v2,11,6,"ng-template",null,4,Vi)(26,_2,11,6,"ng-template",null,5,Vi),be(28,"div",26)(29,"ui-dropdown-menu",27),Ze("onSelection",function(n){let o=$e(e).ngIf,_=Le();return We(_.slidesService.onSlideActionMenuSelection(o.index,n.value));})("menuState",function(n){let o=$e(e).ngIf,_=Le();return We(_.slidesService.onSlideActionMenuState(o.index,n));}),Oe()(),be(30,"div",28),at(31,b2,4,1,"div",29)(32,S2,4,1,"div",29)(33,O2,6,5,"div",12)(34,P2,1,0,"img",30)(35,I2,1,0,"img",31)(36,k2,1,0,"img",32)(37,A2,1,0,"img",33)(38,M2,1,0,"img",34)(39,R2,1,0,"img",35)(40,L2,1,0,"img",36)(41,D2,1,0,"img",37)(42,N2,1,0,"img",38),be(43,"div",39),at(44,V2,1,0,"span",40)(45,j2,1,0,"span",41)(46,B2,1,0,"span",42)(47,F2,1,0,"span",43)(48,U2,1,0,"span",44)(49,G2,1,0,"span",45)(50,z2,1,0,"span",46)(51,H2,1,0,"span",47)(52,$2,1,0,"span",48),Oe(),be(53,"div",49),at(54,W2,1,1,"span",50)(55,q2,1,1,"span",50)(56,Y2,1,0,"span",51)(57,X2,1,0,"span",52)(58,K2,1,0,"span",53)(59,Z2,1,0,"span",54)(60,Q2,1,1,"span",55),Oe()()()(),ii();}if(i&2){let e=r.ngIf,t=mi(13),n=mi(17),o=Le();Ce(2),Ei("active",e.active?"":null),Ce(),ke("ngIf",e.active&&e.playerStatus==="PAUSED"),Ce(),ke("ngIf",e.active&&e.playerStatus==="PLAYING_SLIDE"),Ce(2),_i(e.timeStr),Ce(),Ei("active",e.active?"":null),Ce(2),ke("ngIf",e.type==="OVERLAY_IMAGE"),Ce(),ke("ngIf",e.type==="VIDEO"||e.type==="OVERLAY_VIDEO"),Ce(),ke("ngIf",e.type==="VIDEO")("ngIfThen",t)("ngIfElse",n),Ce(7),ke("ngSwitch",e.layout),Ce(),ke("ngSwitchCase","Lower 3rd"),Ce(),ke("ngSwitchCase","Box Video"),Ce(9),ke("menuOptions",o.dropDownOptions)("triggerButtonIconClass","three-dots-menu-icon")("contentStyle","default-dropdown-menu-styling videomaker-slide-actions-menu-dropdown")("iconOnly",!0),Ce(2),ke("ngIf",e.zoomFade=="IN"),Ce(),ke("ngIf",e.zoomFade=="OUT"),Ce(),ke("ngIf",e.zoomFade=="NONE"),Ce(),ke("ngIf",e.layout=="Captions"),Ce(),ke("ngIf",e.layout=="Highlight"),Ce(),ke("ngIf",e.layout=="Lower 3rd"),Ce(),ke("ngIf",e.layout=="Quote"),Ce(),ke("ngIf",e.layout=="Split"),Ce(),ke("ngIf",e.layout=="Dual"),Ce(),ke("ngIf",e.layout=="Box Video"),Ce(),ke("ngIf",e.layout=="Circle"),Ce(),ke("ngIf",e.layout=="BG Removal"),Ce(2),ke("ngIf",e.layout=="Highlight"),Ce(),ke("ngIf",e.layout=="Lower 3rd"),Ce(),ke("ngIf",e.layout=="Quote"),Ce(),ke("ngIf",e.layout=="Split"),Ce(),ke("ngIf",e.layout=="Captions"),Ce(),ke("ngIf",e.layout=="Dual"),Ce(),ke("ngIf",e.layout=="Box Video"),Ce(),ke("ngIf",e.layout=="Circle"),Ce(),ke("ngIf",e.layout=="BG Removal"),Ce(2),ke("ngIf",e.zoomFade=="IN"),Ce(),ke("ngIf",e.zoomFade=="OUT"),Ce(),ke("ngIf",e.zoomLevel=="NONE"),Ce(),ke("ngIf",e.zoomLevel=="110"),Ce(),ke("ngIf",e.zoomLevel=="120"),Ce(),ke("ngIf",e.zoomLevel=="130"),Ce(),ke("ngIf",e.zoomLevel==null?null:e.zoomLevel.startsWith("
817CUSTOM_"));}}var gS=(()=>{class i{constructor(e){this.slidesService=e,this.unsubscribe$=new Yt(),this.inCaptionsEditMode=!1,this.inTitleEditMode=!1,this.inSubtitleEditMode=!1;}ngOnChanges(e){"index"in e&&(this.viewModel$=this.slidesService.slideViewModel$(this.index),this.inCaptionsEditMode=!1,this.inTitleEditMode=!1,this.inSubtitleEditMode=!1,this.unsubscribe$.next(),this.captionsDoubleBuffer="",this.titleDoubleBuffer="",this.subtitleDoubleBuffer="",this.subtitleAsCaptionsDoubleBuffer="",this.viewModel$.pipe(sn(t=>t!==void 0),Pt(this.unsubscribe$)).subscribe(t=>{this.setDropDownOptions(t);let n=this.captionsDoubleBuffer.replace(/<br>/g,` 818`);!this.inCaptionsEditMode&&t.text!==void 0&&this.captionsDoubleBuffer!==t.text&&(this.captionsDoubleBuffer=t.text.replace(/\n/g,"<br>")),n=this.titleDoubleBuffer.replace(/<br>/g,` 819`),!this.inTitleEditMode&&t.title!==void 0&&this.titleDoubleBuffer!==t.title&&(this.titleDoubleBuffer=t.title.replace(/\n/g,"<br>")),n=this.subtitleDoubleBuffer.replace(/<br>/g,` 820`),!this.inSubtitleEditMode&&t.subtitle!==void 0&&this.subtitleDoubleBuffer!==t.subtitle&&(this.subtitleDoubleBuffer=t.subtitle.replace(/\n/g,"<br>")),n=this.subtitleAsCaptionsDoubleBuffer.replace(/<br>/g,` 821`),!this.inSubtitleEditMode&&t.text!==void 0&&this.subtitleAsCaptionsDoubleBuffer!==t.text&&(this.subtitleAsCaptionsDoubleBuffer=t.text);}));}ngOnInit(){}setDropDownOptions(e){let t=(n,o,_,E)=>new Cr(n,o,_,E);this.dropDownOptions=[e.canMergeWithPrev&&t("merge-with-prev","Merge With Prev","project-card-menu-option","asset-mediabox-icon icon-merge-with-prev"),e.canMergeWithNext&&t("merge-with-next","Merge With Next","project-card-menu-option","asset-mediabox-icon icon-merge-with-next"),e.canCarryOverlayToNext&&t("carry-over-overlay","Carry Over Overlay","project-card-menu-option","asset-mediabox-icon icon-carry-over-overlay"),e.canSplitSlide&&t("split-segment-in-two","Split Segment In Two","project-card-menu-option","asset-mediabox-icon icon-split-segment-in-two"),e.canEditSlideDuration&&t("edit-segment-duration","Edit Segment Duration","project-card-menu-option","asset-mediabox-icon icon-edit-segment-duration"),e.haveOverlay&&t("remove-overlay","Remove Overlay","project-card-menu-option","asset-mediabox-icon icon-remove-overlay"),e.canDeleteSlide&&t("delete-segment","Delete Segment","project-card-menu-option redish-100-color","asset-mediabox-icon icon-delete-segment")].filter(n=>n instanceof Cr);}onCaptionsFocus(e){this.inCaptionsEditMode=!0;}onCaptionsBlur(e){this.inCaptionsEditMode=!1;}onTitleFocus(e){this.inTitleEditMode=!0;}onTitleBlur(e){this.inTitleEditMode=!1;}onSubtitleFocus(e){this.inSubtitleEditMode=!0;}onSubtitleBlur(e){this.inSubtitleEditMode=!1;}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(Ms));};}static{this.ɵcmp=Bt({type:i,selectors:[["slide"]],inputs:{index:"index"},standalone:!0,features:[Wa,Ft],decls:2,vars:3,consts:[["defaultThumbnail",""],["backgroundThumbnail",""],["overlayThumbnail",""],["defaultSlideEditor",""],["titleSubtitleEditor",""],["titleCaptionEditor",""],["slideTextEditor",""],["formattingMenuTemplate",""],["addLineBreakTemplate",""],["formattingMenu",""],["slideTitleEditor",""],["slideSubTitleEditor",""],[4,"ngIf"],[1,"slide-container"],[1,"slide-controls",3,"click"],["class","slide-play-icon",4,"ngIf"],["class","slide-pause-icon",4,"ngIf"],[1,"slide-time"],[1,"slide-info",3,"click"],[1,"slide-icon"],["style","font-size: 14px; color: #B0BAD0","class","fa fa-image",4,"ngIf"],[3,"width","height","background-image",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],[3,"ngSwitch"],[3,"ngTemplateOutlet",4,"ngSwitchCase"],[3,"ngTemplateOutlet",4,"ngSwitchDefault"],[1,"slide-actions-menu"],[3,"onSelection","menuState","menuOptions","triggerButtonIconClass","contentStyle","iconOnly"],[1,"slide-attributes"],["style","display: flex; flex-direction: row; column-gap: 3px;",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-captions.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-highlight.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-lower3rd.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-quote.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-split.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","/img/icon-library/video-maker/layouts/dual-small.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","/img/icon-library/video-maker/layouts/box-video-small.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","/img/icon-library/video-maker/layouts/circle-small.svg","draggable","false","alt","image",4,"ngIf"],["class","slide-attributes-icon","src","img/composer-icons/slide-attributes/slide-attrib-bg-removal.svg","draggable","false","alt","image",4,"ngIf"],[1,"hover-elm-tooltip",2,"width","20px","height","16px","position","absolute"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Highlight Layer",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Lower 3rd Layer",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Quote Layer",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Split Layer",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Captions Layout",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Dual Layout",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Box Video Layout",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","Presenter Circle Layout",4,"ngIf"],["class","hover-tooltip hover-tooltip-layouts","tooltip-text","BG Removal Layout",4,"ngIf"],[1,"hover-elm-tooltip",2,"width","40px","height","16px","position","absolute","margin-right","20px"],["class","hover-tooltip hover-tooltip-fade",4,"ngIf"],["class","hover-tooltip","tooltip-text","Zoom 100%",4,"ngIf"],["class","hover-tooltip","tooltip-text","Zoom 110%",4,"ngIf"],["class","hover-tooltip","tooltip-text","Zoom 120%",4,"ngIf"],["class","hover-tooltip","tooltip-text","Zoom 130%",4,"ngIf"],["class","hover-tooltip",4,"ngIf"],[1,"slide-play-icon"],[1,"fa","fa-play","fa-fw"],[1,"slide-pause-icon"],[1,"fa","fa-pause","fa-fw"],[1,"fa","fa-image",2,"font-size","14px","color","#B0BAD0"],["cdkVirtualDropWrapper","","dropHoverClass","drop-over-active",1,"slide-thumbnail",3,"drop"],[1,"slide-index"],[1,"slide-overlay-bg-thumbnail"],[1,"slide-overlay-thumbnail"],["cdkVirtualDragWrapper","","cdkVirtualDropWrapper","","dropHoverClass","drop-over-active",1,"slide-overlay-fg-thumbnail",3,"dragStart","dragEnd","drop","draggable","droppable","thumbnail","dragData"],[1,"slide-overlay-drag-icon"],["class","lds-ripple",4,"ngIf"],[1,"lds-ripple"],[3,"ngTemplateOutlet"],[1,"slide-text",3,"textSelect","input","focus","blur","innerHTML"],[1,"text-formatting-menu"],[3,"click"],[2,"font-weight","bold"],[2,"font-weight","bolder"],[1,"text-formatting-menu",3,"click"],[1,"newline-icon"],[1,"tp-editor"],[1,"tp-title"],[1,"tp-title-input"],["type","text",3,"input","focus","blur","value","disabled"],[1,"tp-subtitle"],[1,"tp-subtitle-input"],[2,"display","flex","flex-direction","row","column-gap","3px"],["src","img/composer-icons/zoom-fade.svg","draggable","false","alt","image",1,"slide-attributes-fade-in"],[1,"slide-attributes-zoom"],["src","img/composer-icons/zoom-fade.svg","draggable","false","alt","image",1,"slide-attributes-fade-out"],["class","slide-attributes-zoom",4,"ngIf"],["src","img/composer-icons/slide-attributes/slide-attrib-captions.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","img/composer-icons/slide-attributes/slide-attrib-highlight.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","img/composer-icons/slide-attributes/slide-attrib-lower3rd.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","img/composer-icons/slide-attributes/slide-attrib-quote.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","img/composer-icons/slide-attributes/slide-attrib-split.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","/img/icon-library/video-maker/layouts/dual-small.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","/img/icon-library/video-maker/layouts/box-video-small.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","/img/icon-library/video-maker/layouts/circle-small.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["src","img/composer-icons/slide-attributes/slide-attrib-bg-removal.svg","draggable","false","alt","image",1,"slide-attributes-icon"],["tooltip-text","Highlight Layer",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Lower 3rd Layer",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Quote Layer",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Split Layer",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Captions Layout",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Dual Layout",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Box Video Layout",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","Presenter Circle Layout",1,"hover-tooltip","hover-tooltip-layouts"],["tooltip-text","BG Removal Layout",1,"hover-tooltip","hover-tooltip-layouts"],[1,"hover-tooltip","hover-tooltip-fade"],["tooltip-text","Zoom 100%",1,"hover-tooltip"],["tooltip-text","Zoom 110%",1,"hover-tooltip"],["tooltip-text","Zoom 120%",1,"hover-tooltip"],["tooltip-text","Zoom 130%",1,"hover-tooltip"],[1,"hover-tooltip"]],template:function(t,n){t&1&&(at(0,J2,61,45,"ng-container",12),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[ui,Up,mS,Fp,Mh,Dc,ir,Xa,Ka,Tc,ah],styles:['@charset "UTF-8";.slide-container[_ngcontent-%COMP%]{margin-top:12px;display:flex;justify-content:space-around;align-items:center;height:80px;-webkit-user-select:none;user-select:none}.slide-container[_ngcontent-%COMP%] ~ .slide-container[_ngcontent-%COMP%]{margin-top:0}
821.slide-controls[_ngcontent-%COMP%]{color:#25365899;background-color:#4481fd14;width:54px;height:25px;margin-left:10px;border-radius:4px;display:flex;justify-content:space-evenly;align-items:center;font-family:Inter-Regular;font-style:normal;font-weight:400;font-size:12px;cursor:pointer}.slide-controls[active][_ngcontent-%COMP%]{height:26px;color:#fff;background-color:#4481fd;font-weight:700;font-size:10px}.slide-play-icon[_ngcontent-%COMP%], .slide-pause-icon[_ngcontent-%COMP%]{font-size:11px;padding-left:5px;padding-top:1px}.slide-controls[active][_ngcontent-%COMP%] .slide-time[_ngcontent-%COMP%]{padding-right:5px}.slide-info[_ngcontent-%COMP%]{background:#fff;outline:1px solid rgba(37,54,88,.1490196078);width:440px;height:80px;border-radius:10px;display:grid;grid-template-columns:35px 66px 263px 75px;grid-template-rows:1fr 1fr;gap:0px 0px;grid-template-areas:"icon thumbnail captions menu" "icon thumbnail captions attributes";align-items:center;justify-items:center;cursor:pointer}.slide-info[active][_ngcontent-%COMP%]{outline:3px solid #4481FD;cursor:default}.slide-icon[_ngcontent-%COMP%]{grid-area:icon;width:16px;height:16px;display:flex;align-items:center;justify-content:center;margin-left:4px}.slide-thumbnail[_ngcontent-%COMP%], .slide-overlay-fg-thumbnail[_ngcontent-%COMP%]{grid-area:thumbnail;justify-self:start;width:48px;height:48px;border-radius:10px;display:flex;align-items:center;justify-content:center}.slide-thumbnail[dragging][_ngcontent-%COMP%], [dragging].slide-overlay-fg-thumbnail[_ngcontent-%COMP%]{margin-top:5px}.slide-overlay-thumbnail[_ngcontent-%COMP%]{width:62px;height:72px;grid-area:thumbnail;display:flex;align-items:flex-start;flex-direction:column;justify-content:center}.slide-overlay-bg-thumbnail[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:10px;background-size:cover;background-position:center}.slide-overlay-fg-thumbnail[_ngcontent-%COMP%]{position:absolute;margin-top:15px;margin-left:8px;box-shadow:-3px -3px 6px #0000004d;cursor:pointer}.slide-overlay-drag-icon[_ngcontent-%COMP%]{position:absolute;top:-6px;right:-6px;width:16px;height:16px;background-image:url(/img/composer-icons/drag.svg)}.slide-index[_ngcontent-%COMP%]{position:absolute;color:#fff;font-weight:700;font-size:12px}.slide-text[_ngcontent-%COMP%]{grid-area:captions;display:flex;flex-direction:column;justify-content:center;width:266px;height:64px;font-family:Inter-Regular;font-style:normal;font-weight:400;font-size:13px;line-height:17px;color:#253658;overflow:hidden;word-break:break-word;padding-left:8px;
821unicode-bidi:plaintext}.slide-text[active][_ngcontent-%COMP%]{background:#7b8db114;border-radius:10px;color:#253658;overflow-y:scroll;cursor:text;-webkit-user-select:text;user-select:text}.slide-text[playing][_ngcontent-%COMP%]{cursor:pointer}.slide-text[placeholder][_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;color:#b3adad}.slide-text[placeholder][_ngcontent-%COMP%]:before{content:"No Captions"}.slide-actions-menu[_ngcontent-%COMP%]{grid-area:menu;justify-self:end;align-self:start;width:24px;height:24px;color:#253658;margin-right:8px;margin-top:8px}.slide-action-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start}.slide-action-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:10px}.slide-action-button[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:25px;height:25px;background-size:cover}.slide-attributes[_ngcontent-%COMP%]{grid-area:attributes;justify-self:end;align-self:end;width:100%;height:16px;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;column-gap:8px;padding-right:8px;margin-bottom:8px}.slide-attributes-fade-in[_ngcontent-%COMP%]{width:10px;height:10px;transform:scaleX(-1);filter:invert(45%) sepia(71%) saturate(3118%) hue-rotate(206deg) brightness(101%) contrast(98%)}.slide-attributes-fade-out[_ngcontent-%COMP%]{width:10px;height:10px;filter:brightness(0) saturate(100%) invert(35%) sepia(42%) saturate(2970%) hue-rotate(232deg) brightness(95%) contrast(113%)}.slide-attributes-zoom[_ngcontent-%COMP%]{color:#253658;font-family:Inter-Medium;font-weight:500;font-size:9px;font-style:normal}.slide-attributes-icon[_ngcontent-%COMP%]{width:16px;height:16px}.text-formatting-menu[_ngcontent-%COMP%]{color:#fff;background-color:#333;border-radius:10px;position:absolute;animation:fade-in .3s linear 1,move-up .3s linear 1;-webkit-user-select:none;user-select:none;box-shadow:2px 2px 5px #0000004d;white-space:nowrap;padding:12px 15px;display:flex;flex-direction:row;justify-content:center;column-gap:12px;align-items:center;height:42px;cursor:pointer}.text-formatting-menu[_ngcontent-%COMP%]:after{bottom:-11px;font-size:13px;left:50%;line-height:19px;content:"\\25bc";color:#333;position:absolute;transform:translate(-50%)}.drop-over-active[_ngcontent-%COMP%]{transform:scale(.9);transition:all .2s ease-in-out}.newline-icon[_ngcontent-%COMP%]{width:20px;height:20px;background:url(/img/composer-icons/newline.svg) center/cover no-repeat}.lds-ripple[_ngcontent-%COMP%]{position:absolute;width:62px;height:62px}.lds-ripple[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;border:4px solid #fff;opacity:1;border-radius:50%;animation:_ngcontent-%COMP%_lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.lds-ripple[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){animation-delay:-.5s}@keyframes _ngcontent-%COMP%_lds-ripple{0%{top:31px;left:31px;width:0;height:0;opacity:1}to{top:0;left:0;width:62px;height:62px;opacity:0}}.hover-tooltip[_ngcontent-%COMP%]{position:relative;z-index:999}.hover-tooltip[_ngcontent-%COMP%]:before{content:attr(tooltip-text);position:absolute;font-family:Inter-Medium;font-weight:500;font-size:11px;display:flex;align-items:center;justify-content:center;border-radius:6px;width:max-content;max-width:240px;padding:8px 12px;background:#404040;color:#fff}.hover-tooltip[_ngcontent-%COMP%]:after{position:absolute;content:"";width:0px;height:0px;border-width:5px;border-style:solid;border-color:transparent transparent #404040 transparent;top:-10px;left:38px}.hover-tooltip[_ngcontent-%COMP%]:before, .hover-tooltip[_ngcontent-%COMP%]:after{opacity:0;visibility:hidden;transition:opacity .1s ease-in-out 0s}.hover-elm-tooltip[_ngcontent-%COMP%]:hover > .hover-tooltip[_ngcontent-%COMP%]:before, .hover-elm-tooltip[_ngcontent-%COMP%]:hover > .hover-tooltip[_ngcontent-%COMP%]:after{opacity:1;visibility:visible;transition:opacity ease-in-out .2s;margin-left:-18px;margin-top:20px}.hover-tooltip-fade[_ngcontent-%COMP%]:before{margin-left:-60px!important}.hover-tooltip-fade[_ngcontent-%COMP%]:after{top:-10px!important;
821left:20px!important}.hover-tooltip-layouts[_ngcontent-%COMP%]:before{margin-left:0!important;right:-30px!important}.hover-tooltip-layouts[_ngcontent-%COMP%]:after{left:25px!important}.tp-editor[_ngcontent-%COMP%]{grid-area:captions;display:grid;grid-template-columns:52px 208px;grid-template-rows:1fr 1fr;gap:10px 8px;grid-template-areas:"title title-input" "subtitle subtitle-input";height:64px;width:266px;align-items:center;justify-items:end;margin-right:9px;margin-top:3px}.tp-title[_ngcontent-%COMP%]{grid-area:title}.tp-subtitle[_ngcontent-%COMP%]{grid-area:subtitle}.tp-title-input[_ngcontent-%COMP%]{grid-area:title-input}.tp-subtitle-input[_ngcontent-%COMP%]{grid-area:subtitle-input}.tp-title[_ngcontent-%COMP%], .tp-subtitle[_ngcontent-%COMP%]{color:#253658;font-family:Inter-SemiBold;font-weight:600;font-size:11px}.tp-editor[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:27px;width:208px;border-radius:4px;border:unset;background:#7b8db114;padding:0 8px;text-overflow:ellipsis;overflow:hidden;color:#253658;font-family:Inter-Regular;font-size:11px;font-weight:400}.tp-editor[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{-webkit-user-select:none;user-select:none;pointer-events:none;cursor:pointer}.tp-editor[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#b3adad}']});}}return i;})();hi();mt();mt();mt();var cs=(()=>{class i{constructor(){this._slidesActions=$t(null),this._slidesService=$t(null);}register(e,t){this._slidesService.set(e),this._slidesActions.set(t);}actions(){return this._slidesActions();}slides(){return this._slidesService();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function tk(i,r){if(i&1&&tt(0,"slide",4),i&2){let e=r.$implicit;ke("index",e);}}function ik(i,r){if(i&1&&(ti(0),be(1,"div",1)(2,"cdk-virtual-scroll-viewport",2),at(3,tk,1,1,"slide",3),Oe()(),ii()),i&2){let e=r.ngIf;Ce(3),ke("cdkVirtualForOf",e.slidesIndexes);}}var Gp=(()=>{class i{constructor(e,t,n,o){this.slidesService=e,this.storyService=t,this.slidesActions=n,this.agentGateway=o,this.unsubscribe$=new Yt();}ngOnInit(){this.agentGateway.register(this.slidesService,this.slidesActions),this.viewModel$=this.slidesService.slidesViewModel$,this.slidesService.currentIndex$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.scrollToIndex(e);});}ngAfterViewInit(){this.viewport.renderedRangeStream.pipe(Pt(this.unsubscribe$),Ti()).subscribe(e=>{this.storyService.totalRenderedVirtualSlides$.getValue()!==e.end-e.start&&this.storyService.totalRenderedVirtualSlides$.next(e.end-e.start);});}scrollToIndex(e){this.viewport&&!Ms.IS_DRAGGING&&this.viewport.scrollToIndex(e-3,"smooth");}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(Ms),ut(zi),ut(uo),ut(cs));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-video-slider-wrapper"]],viewQuery:function(t,n){if(t&1&&fn(Qf,5),t&2){let o;mn(o=gn())&&(n.viewport=o.first);}},standalone:!0,features:[Wn([Ms,uo]),Ft],decls:2,vars:3,consts:[[4,"ngIf"],[1,"slides-container"],["itemSize","88"],[3,"index",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"index"]],template:function(t,n){t&1&&(at(0,ik,4,1,"ng-container",0),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[ui,Qf,Lv,Dv,gS,ir],styles:[".slides-container[_ngcontent-%COMP%]{margin-top:12px}.slides-container[_ngcontent-%COMP%] .cdk-virtual-scroll-content-wrapper{contain:inherit!important}.example-list[_ngcontent-%COMP%]{width:1000px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:flex;flex-direction:row;background:#fff;border-radius:4px;overflow:hidden}.example-box[_ngcontent-%COMP%]{padding:20px 10px;border-right:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff;font-size:14px;flex-grow:1;flex-basis:0}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
821.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box[_ngcontent-%COMP%]:last-child{border:none}.example-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .example-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.videoslide-maker-scenes[_ngcontent-%COMP%]{height:393px}.slideOutUp[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_slideOutUp;animation-name:_ngcontent-%COMP%_slideOutUp;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes _ngcontent-%COMP%_slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes _ngcontent-%COMP%_slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}"],changeDetection:0});}}return i;})();hi();mt();function nk(i,r){if(i&1&&tt(0,"img",18),i&2){let e=Le().ngIf;ke("src",e.thumbnailUrl,An);}}function rk(i,r){i&1&&tt(0,"img",19);}function ok(i,r){i&1&&tt(0,"img",20);}function ak(i,r){i&1&&tt(0,"img",19);}function sk(i,r){i&1&&tt(0,"img",20);}function lk(i,r){i&1&&tt(0,"div");}function ck(i,r){i&1&&(tt(0,"img",19),be(1,"span"),lt(2,"Play All"),Oe());}function uk(i,r){i&1&&(tt(0,"img",20),be(1,"span"),lt(2,"Stop"),Oe());}function dk(i,r){if(i&1){let e=_t();be(0,"div",3)(1,"div",4),at(2,nk,1,1,"img",5),Oe(),be(3,"div",6)(4,"span"),lt(5,"Presenter"),Oe(),tt(6,"img",7),Oe(),be(7,"div",8)(8,"div",9),lt(9),Oe(),be(10,"div",10),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(n.isIntroExist&&o.onPlayIntoOutro("intro",n.isPlayingIntro));}),at(11,rk,1,0,"img",11)(12,ok,1,0,"img",12),be(13,"span"),lt(14,"Intro"),Oe()(),be(15,"div",13),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(n.isOutroExist&&o.onPlayIntoOutro("outro",n.isPlayingOutro));}),at(16,ak,1,0,"img",11)(17,sk,1,0,"img",12),be(18,"span"),lt(19,"Outro"),Oe()(),be(20,"div",14),tt(21,"img",15),be(22,"span"),lt(23),qi(24,"date"),Oe()()(),be(25,"div",16),Ze("click",function(){let n=$e(e).ngIf,o=Le();return We(!n.isPlayerLoading&&o.onPlayButtonClick(n.isPlayingAll));}),at(26,lk,1,0,"div",17)(27,ck,3,0,"ng-template",null,0,Vi)(29,uk,3,0,"ng-template",null,1,Vi),Oe()();}if(i&2){let e=r.ngIf,t=mi(28),n=mi(30);Ce(2),ke("ngIf",e.thumbnailUrl),Ce(7),hn("",e.scenesAmount," Scenes"),Ce(),Ei("disabled",!e.isIntroExist||e.isPlayerLoading)("isPlaying",e.isPlayingIntro),Ce(),ke("ngIf",!e.isPlayingIntro),Ce(),ke("ngIf",e.isPlayingIntro),Ce(3),Ei("disabled",!e.isOutroExist||e.isPlayerLoading)("isPlaying",e.isPlayingOutro),Ce(),ke("ngIf",!e.isPlayingOutro),Ce(),ke("ngIf",e.isPlayingOutro),Ce(6),_i(Ec(24,16,e.durationInSec*1e3,"mm:ss")),Ce(2),Ei("disabled",e.isPlayerLoading)("isPlaying",e.isPlayingAll),Ce(),ke("ngIf",!e.isPlayingAll)("ngIfThen",t)("ngIfElse",n);}}var zp=(()=>{class i{constructor(e,t){this.infoPanelService=e,this.videoSlidesService=t;}ngOnInit(){this.viewModel$=this.infoPanelService.infoPanelViewModel$;}onPlayButtonClick(e){e?this.videoSlidesService.playerAction$.next({action:"pause"}):this.videoSlidesService.playerAction$.next({action:"playAll"});}onPlayIntoOutro(e,t){if(t)this.videoSlidesService.playerAction$.next({action:"pause"});else{let n=e==="intro"?"playIntro":"playOutro";this.videoSlidesService.playerAction$.next({action:n});}}static{this.ɵfac=function(t){return new(t||i)(ut(su),ut(Xi));};}static{this.ɵcmp=Bt({type:i,selectors:[["info-panel"]],standalone:!0,features:[Ft],decls:2,vars:3,consts:[["playingAll",""],["stopAll",""],["class","info-panel-container",4,"ngIf"],[1,"info-panel-container"],[1,"story-thumbnail"],["class","thumbnail-image","draggable","false","alt","image",3,"src",4,"ngIf"],[1,"title"],["src","/img/composer-icons/icons-takes-filled.svg","draggable","false","alt","image"],[1,"info"],[1,"scenes-amount"],[1,"intro-outro-button","intro",3,"click"],["src","/img/composer/player-icons/play.svg","draggable","false","alt","image",4,"ngIf"],["src","/img/composer/player-icons/stop.svg","draggable","false","alt","image",4,"ngIf"],[1,"intro-outro-button","outro",3,"click"],[1,"duration"],["src","/img/composer-icons/clock-icon.svg","draggable","false","alt","image"],[1,"play-all-button",3,"click"],[4,"ngIf","ngIfThe
821n","ngIfElse"],["draggable","false","alt","image",1,"thumbnail-image",3,"src"],["src","/img/composer/player-icons/play.svg","draggable","false","alt","image"],["src","/img/composer/player-icons/stop.svg","draggable","false","alt","image"]],template:function(t,n){t&1&&(at(0,dk,31,19,"div",2),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[ui,ir,Tv],styles:['*[_ngcontent-%COMP%]{font-family:Inter,sans-serif}.info-panel-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:64px 350px 93px;grid-template-rows:28px 1fr;gap:0px 0px;grid-template-areas:"thumbnail title play-all" "thumbnail info play-all";width:513px;height:52px;-webkit-user-select:none;user-select:none;margin-top:40px;margin-left:20px}.story-thumbnail[_ngcontent-%COMP%]{grid-area:thumbnail;align-self:center;width:48px;height:48px;border-radius:10px;background-color:#fff}.thumbnail-image[_ngcontent-%COMP%]{width:inherit;height:inherit;border-radius:10px;object-fit:cover}.title[_ngcontent-%COMP%]{grid-area:title;font-weight:700;font-size:20px;color:#253658;display:flex;column-gap:7px}.title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px}.info[_ngcontent-%COMP%]{grid-area:info;align-self:center;justify-self:stretch;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.scenes-amount[_ngcontent-%COMP%]{margin-top:4px;max-width:68px;margin-right:8px;font-weight:600;font-size:14px;white-space:nowrap;color:#253658}.intro-outro-button[_ngcontent-%COMP%]{height:24px;border-radius:20px;display:flex;align-items:center;justify-content:center;column-gap:6px}.intro-outro-button[_ngcontent-%COMP%]:hover{cursor:pointer}.intro-outro-button[disabled=true][_ngcontent-%COMP%]{background-color:#7b8db14d!important}.intro-outro-button[isPlaying=true][_ngcontent-%COMP%]{background-color:#ff4d5b!important}.intro-outro-button[disabled=true][_ngcontent-%COMP%]:hover{cursor:default}.intro-outro-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:700;font-size:14px;color:#fff}.intro-outro-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:12px;height:12px}.intro[_ngcontent-%COMP%]{width:73px;background:#00d096}.outro[_ngcontent-%COMP%]{width:80px;background:#aa58ee}.duration[_ngcontent-%COMP%]{width:66px;margin-right:30px;display:flex;justify-content:space-around;align-items:center}.duration[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;height:18px}.duration[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:400;font-size:15px;color:#253658}.play-all-button[_ngcontent-%COMP%]{grid-area:play-all;align-self:end;width:99px;height:40px;background:#4481fd;border-radius:10px;display:flex;column-gap:5px;align-items:center;justify-content:center}.play-all-button[_ngcontent-%COMP%]:hover{cursor:pointer}.play-all-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Inter-Bold;font-weight:700;font-size:12px;line-height:15px;color:#fff}.play-all-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:12px;height:12px}.play-all-button[disabled=true][_ngcontent-%COMP%]{background-color:#7b8db14d!important}.play-all-button[disabled=true][_ngcontent-%COMP%]:hover{cursor:default}.play-all-button[isPlaying=true][_ngcontent-%COMP%]{background-color:#ff4d5b!important}']});}}return i;})();Jf();_r();mt();hi();mt();hi();function hk(i,r){i&1&&tt(0,"img",11);}function pk(i,r){i&1&&(ti(0),tt(1,"img",12)(2,"img",13),ii());}function fk(i,r){if(i&1){let e=_t();be(0,"div",4)(1,"div",5),Ze("click",function(){$e(e);let n=Le(2);return We(n.onAgentLauncherClick());}),be(2,"div",6),at(3,hk,1,0,"img",7)(4,pk,3,0,"ng-container",8),Oe(),be(5,"div",9)(6,"div",10),lt(7,"AI Agent"),Oe()()()();}if(i&2){let e=Le(2);Ce(),Di("agent-v2",e.isSliderV2),Ce(),Ei("selected",e.agentLauncher==null?null:e.agentLauncher.isOpen()),Ce(),ke("ngIf",!e.isSliderV2),Ce(),ke("ngIf",e.isSliderV2);}}function mk(i,r){i&1&&tt(0,"div",19);}function gk(i,r){if(i&1){let e=_t();be(0,"div",16),Ze("click",function(n){let o=$e(e).$implicit,_=Le(3);return We(_.onOpenModal(o,n));}),be(1,"div",6),tt(2,"img",17),Oe(),be(3,"div",9),at(4,mk,1,0,"div",18),be(5,"div",10),lt(6),Oe
821()()();}if(i&2){let e=r.$implicit,t=Le(2).ngIf;Di("item--disabled",e.disabled),Ei("aria-disabled",e.disabled||null),Ce(),Ei("selected",t.openedModal==e.modalComponentName),Ce(),Al("ngSrc",e.icon),Al("alt",e.label),Ce(2),ke("ngIf",e.badge),Ce(2),_i(e.label);}}function yk(i,r){if(i&1&&(be(0,"div",4)(1,"div",14),lt(2),Oe(),at(3,gk,7,8,"div",15),Oe()),i&2){let e=r.$implicit;Ce(2),_i(e.title),Ce(),ke("ngForOf",e.items);}}function vk(i,r){if(i&1&&(be(0,"div",1),at(1,fk,8,5,"div",2)(2,yk,4,2,"div",3),Oe()),i&2){let e=r.ngIf,t=Le();Ce(),ke("ngIf",t.agentLauncher),Ce(),ke("ngForOf",e.sections);}}var Hp=(()=>{class i{constructor(e,t){this.sidebarService=e,this.viewContainerRef=t,this.agentLauncher=ct(Ca,{optional:!0}),this.isSliderV2=Xn()==="v2";}ngOnInit(){this.viewModel$=this.sidebarService.sidebarViewModel$;}ngAfterViewInit(){this.sidebarService.sidebarViewContainerRef=this.viewContainerRef;}onOpenModal(e,t){if(e.disabled)return;let n=t.currentTarget;this.sidebarService.openSidebarModal(e.modalComponentName,n);}onAgentLauncherClick(){this.sidebarService.toggleAgentDrawer();}static{this.ɵfac=function(t){return new(t||i)(ut(Hr),ut(mv));};}static{this.ɵcmp=Bt({type:i,selectors:[["sidebar"]],standalone:!0,features:[Ft],decls:2,vars:3,consts:[["class","sidebar",4,"ngIf"],[1,"sidebar"],["class","section",4,"ngIf"],["class","section",4,"ngFor","ngForOf"],[1,"section"],[1,"item","composer-agent-launcher",3,"click"],[1,"item-icon"],["ngSrc","/img/icon-library/ai/ai-chat-stroke.svg","width","24","height","24","draggable","false","alt","AI Agent",4,"ngIf"],[4,"ngIf"],[2,"position","relative"],[1,"item-label"],["ngSrc","/img/icon-library/ai/ai-chat-stroke.svg","width","24","height","24","draggable","false","alt","AI Agent"],["ngSrc","/img/icon-library/ai/ai-agent-sparkles-stroke.svg","width","24","height","24","draggable","false","alt","AI Agent",1,"agent-v2-icon","agent-v2-icon--stroke"],["ngSrc","/img/icon-library/ai/ai-agent-sparkles-fill.svg","width","24","height","24","draggable","false","alt","","aria-hidden","true",1,"agent-v2-icon","agent-v2-icon--fill"],[1,"title"],["class","item",3,"item--disabled","click",4,"ngFor","ngForOf"],[1,"item",3,"click"],["width","24","height","24","draggable","false",3,"ngSrc","alt"],["class","item-badge",4,"ngIf"],[1,"item-badge"]],template:function(t,n){t&1&&(at(0,vk,3,2,"div",0),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[Ci,an,ui,ir,Ov],styles:[".sidebar[_ngcontent-%COMP%]{width:100px;height:100%;max-height:calc(100vh - var(--composer-header-height) - var(--sudo-bar-height, 0px));padding:30px 18px;display:inline-flex;flex-direction:column;align-items:flex-start;gap:27px;background-color:#fff;color:#253658;-webkit-user-select:none;user-select:none;font-family:Inter;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;border-right:1px solid rgba(37,54,88,.0784313725)}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar{visibility:hidden}.sidebar[_ngcontent-%COMP%]:hover{scrollbar-width:auto;-ms-overflow-style:auto}.sidebar[_ngcontent-%COMP%]:hover::-webkit-scrollbar{visibility:visible}.section[_ngcontent-%COMP%]{width:64px;display:flex;flex-direction:column;align-items:center;gap:12px}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:500}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1px;cursor:pointer;text-align:center}.item[_ngcontent-%COMP%]:hover .item-icon[_ngcontent-%COMP%]{background-color:#4481fd14;border-radius:8px}.item--disabled[_ngcontent-%COMP%]{cursor:default;opacity:.4}.item--disabled[_ngcontent-%COMP%]:hover .item-icon[_ngcontent-%COMP%]{background-color:transparent;border-radius:0}.item-icon[_ngcontent-%COMP%]{display:flex;padding:8px;align-items:center;gap:10px}.item-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:brightness(0) saturate(100%) invert(37%) sepia(59%) saturate(2151%) hue-rotate(210deg) brightness(108%) contrast(98%)}.item-icon[selected=true][_ngcontent-%COMP%]{background:linear-gradient(270deg,#28b3f7 .65%,#506aff 99.35%);border-radius:8px}.item-icon[selected=true][_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(2%) hue-rotate(186deg) brightness(109%) contrast(101%)}.item-badge[_ngcontent-%COMP%]{width:4px;height:4px;border-radius:2px;background-color:#00d096;position:absolute;margin-left:-9px;margin-top:6px}.item-label[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:1.24}.item.agent-v2[_ngcontent-%COMP%]{gap:6px}.item.agent-v2[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{position:relative;width:40px;height:40px;padding:0;justify-content:center;overflow:hidden;background-repeat:no-repeat;box-shadow:0 24px 48px #0000001f;background-color:#4481fd;background-image:url(/img/ai-agents/agent-launcher-blob-default.svg);background-size:74.78px 71.87px;background-position:-19.22px -15.26px;border-radius:999px}.item.agent-v2[_ngcontent-%COMP%] .agent-v2-icon[_ngcontent-%COMP%]{position:absolute;filter:none}.item.agent-v2[_ngcontent-%COMP%] .agent-v2-icon--fill[_ngcontent-%COMP%]{opacity:0}
821.item.agent-v2[_ngcontent-%COMP%] .item-label[_ngcontent-%COMP%]{font-weight:500;line-height:1.4;letter-spacing:-.12px;color:#2563eb}.item.agent-v2[_ngcontent-%COMP%]:hover .item-icon[_ngcontent-%COMP%]{background-color:#84a9ff;background-image:url(/img/ai-agents/agent-launcher-blob-hover.svg);background-size:83.31px 73.79px;background-position:-24.31px -14.07px;border-radius:999px}.item.agent-v2[_ngcontent-%COMP%]:active .item-icon[_ngcontent-%COMP%], .item.agent-v2[_ngcontent-%COMP%] .item-icon[selected=true][_ngcontent-%COMP%]{background-color:#6690ff;background-image:url(/img/ai-agents/agent-launcher-blob-active.svg);background-size:74.37px 81.59px;background-position:-18.83px -20.23px;border-radius:999px}.item.agent-v2[_ngcontent-%COMP%]:active .item-icon[_ngcontent-%COMP%] .agent-v2-icon--stroke[_ngcontent-%COMP%], .item.agent-v2[_ngcontent-%COMP%] .item-icon[selected=true][_ngcontent-%COMP%] .agent-v2-icon--stroke[_ngcontent-%COMP%]{opacity:0}.item.agent-v2[_ngcontent-%COMP%]:active .item-icon[_ngcontent-%COMP%] .agent-v2-icon--fill[_ngcontent-%COMP%], .item.agent-v2[_ngcontent-%COMP%] .item-icon[selected=true][_ngcontent-%COMP%] .agent-v2-icon--fill[_ngcontent-%COMP%]{opacity:1}"]});}}return i;})();mt();qu();hi();_r();mt();Ki();var vt={SLIDE_NOT_FOUND:"slide_not_found",SLIDE_REF_MISMATCH:"slide_ref_mismatch",PROJECT_DRIFTED:"project_drifted",OUT_OF_RANGE:"out_of_range",MERGE_NON_ADJACENT:"merge_non_adjacent",MERGE_RANGE_INVERTED:"merge_range_inverted",MERGE_REJECTED:"merge_rejected",MERGE_BROLL_TOO_SHORT:"merge_broll_too_short",DELETE_NOT_LAST:"delete_not_last",SPLIT_NOT_POSSIBLE:"split_not_possible",INVALID_VALUE:"invalid_value",NO_SOUNDBED:"no_soundbed",NO_LOGO_SELECTED:"no_logo_selected",SERVICE_NOT_READY:"service_not_ready",UNSUPPORTED_OP:"unsupported_op",APPLY_FAILED:"apply_failed",CANCELLED:"cancelled",NO_STORY:"no_story",NOT_CONNECTED:"not_connected",TURN_TIMEOUT:"turn_timeout",CONNECTION_LOST:"connection_lost",AGENT_RUN_FAILED:"AGENT_RUN_FAILED"};function Si(i,r={}){let e="That change couldn't be applied.";if(!i)return e;switch(i){case vt.PROJECT_DRIFTED:return"The project changed while I was working \u2014 try asking again.";case vt.SLIDE_REF_MISMATCH:return"The slide references don't line up with the project right now \u2014 try again.";case vt.SLIDE_NOT_FOUND:return"That slide isn't in the project anymore.";case vt.OUT_OF_RANGE:return"That slide is out of range.";case vt.MERGE_NON_ADJACENT:return"Only slides next to each other can be merged.";case vt.MERGE_RANGE_INVERTED:return"That range of slides can't be merged.";case vt.MERGE_REJECTED:return"Those slides couldn't be merged.";case vt.MERGE_BROLL_TOO_SHORT:return"The overlay video duration is shorter than the total merged sequence duration.";case vt.DELETE_NOT_LAST:return"Only the last slide can be deleted \u2014 try merging a middle slide into a neighbor instead.";case vt.SPLIT_NOT_POSSIBLE:return"That slide is too short to split at that point.";case vt.INVALID_VALUE:return"That value isn't valid for this change.";case vt.NO_SOUNDBED:return"There's no music track on this project yet.";case vt.NO_LOGO_SELECTED:return"No logo is selected for this project yet \u2014 pick one in the logo panel first.";case vt.SERVICE_NOT_READY:return"The editor isn't ready yet \u2014 try again in a moment.";case vt.UNSUPPORTED_OP:return"That change isn't available in this version of the Video Maker.";case vt.APPLY_FAILED:return e;case vt.CANCELLED:return"Cancelled by you. The agent may still finish its current step.";case vt.NO_STORY:return"Open a project first.";case vt.NOT_CONNECTED:return"The agent isn't connected yet \u2014 try again in a moment.";case vt.TURN_TIMEOUT:return"The agent took too long to respond \u2014 please try again.";case vt.CONNECTION_LOST:return"The connection dropped mid-request \u2014 please try again.";case vt.AGENT_RUN_FAILED:return"The agent hit a problem finishing that request \u2014 please try again.";default:return e;}}mt();var No=(()=>{class i{static{this.CANCEL_CACHE_LIMIT=64;}static{this.SEEN_RUN_CACHE_LIMIT=256;}static{this.TURN_TIMEOUT_MS=9e4;}static{this.TURN_ABSOLUTE_TIMEOUT_MS=3e5;}constructor(){this._timeline=$t([]),this._conversationId=$t(null),this._inFlightTurn=$t(null),this._cancelledRunIds=[],this._seenRunIds=[],this._pendingBaseRevision=null,this._pendingIdentitySeeds=null,this._turnGeneration=0,this._turnTimeoutHandle=null,this._turnDeadlineAt=0,this.timeline=this._timeline.asReadonly(),this.conversationId=this._conversationId.asReadonly(),this.isTurnInFlight=xt(()=>this._inFlightTurn()!==null),this.turnTimedOut$=new Yt(),this._touchedSlideIds=new Set(),ct(ao).onDestroy(()=>this.clearTurnWatchdog());}setConversationId(e){this._conversationId.set(e);}appendTimelineItem(e){this._timeline.update(t=>[...t,e]);}updateToolResultCard(e,t){this._timeline.update(n=>n.map(o=>{if(o.kind!=="tool_result")return o;let _=o.payload;return _.toolResult.toolCallId!==e?o:st(Ke({},o),{payload:{toolResult:Ke(Ke({},_.toolResult),t)}});}));}startTurn(e,t=null,n=null){this._turnGeneration+=1,this._touchedSlideIds.clear(),this.rememberSeenRunId(e);let o=new Map();if(n)for(let _ of n)o.set(_.opaqueId,{liveIndex:_.position-1,snapshotPosition:_.position,originalId:_.originalId});this._inFlightTurn.set({runId:e,generation:this._turnGeneration,baseRevision:t,slideIdentityMap:o}),this.armTurnWatchdog();}armTurnWatchdog(){this._turnDeadlineAt=Date.now()+i.TURN_ABSOLUTE_TIMEOUT_MS,this.scheduleTur
821nWatchdog();}touchTurnWatchdog(){this._inFlightTurn()!==null&&this.scheduleTurnWatchdog();}scheduleTurnWatchdog(){this.clearTurnWatchdog();let e=this._turnDeadlineAt-Date.now(),t=Math.max(0,Math.min(i.TURN_TIMEOUT_MS,e));this._turnTimeoutHandle=setTimeout(()=>{this._turnTimeoutHandle=null,this._inFlightTurn()!==null&&(this.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:vt.TURN_TIMEOUT,errorMessage:Si(vt.TURN_TIMEOUT)}}),this.cancelCurrentRun(),this.turnTimedOut$.next());},t);}clearTurnWatchdog(){this._turnTimeoutHandle!==null&&(clearTimeout(this._turnTimeoutHandle),this._turnTimeoutHandle=null);}getSlideIdentity(e){return this._inFlightTurn()?.slideIdentityMap.get(e);}findOpaqueIdAtLiveIndex(e){let t=this._inFlightTurn()?.slideIdentityMap;if(!t)return null;for(let[n,o]of t)if(o.liveIndex===e)return n;return null;}removeSlideFromIdentityMap(e,t){this._inFlightTurn.update(n=>{if(!n||!n.slideIdentityMap.has(e))return n;let o=new Map(n.slideIdentityMap);return o.delete(e),st(Ke({},n),{slideIdentityMap:this.shiftDownAfter(o,t)});});}shiftIdentityMapForRemove(e){this._inFlightTurn.update(t=>t&&st(Ke({},t),{slideIdentityMap:this.shiftDownAfter(new Map(t.slideIdentityMap),e)}));}shiftDownAfter(e,t){return e.forEach((n,o)=>{n.liveIndex>t&&e.set(o,st(Ke({},n),{liveIndex:n.liveIndex-1}));}),e;}shiftIdentityMapForInsert(e){this._inFlightTurn.update(t=>{if(!t)return t;let n=new Map(t.slideIdentityMap);return n.forEach((o,_)=>{o.liveIndex>=e&&n.set(_,st(Ke({},o),{liveIndex:o.liveIndex+1}));}),st(Ke({},t),{slideIdentityMap:n});});}endTurn(){this.clearTurnWatchdog(),this._inFlightTurn.set(null);}tryLatchRunId(e){if(!e)return!0;let t=this._inFlightTurn();return t?t.runId?t.runId===e:this._seenRunIds.includes(e)?!1:(this.rememberSeenRunId(e),this._inFlightTurn.update(n=>n&&st(Ke({},n),{runId:e})),!0):!1;}rememberSeenRunId(e){!e||this._seenRunIds.includes(e)||(this._seenRunIds.push(e),this._seenRunIds.length>i.SEEN_RUN_CACHE_LIMIT&&this._seenRunIds.shift());}isRunSeen(e){return e?this._seenRunIds.includes(e):!1;}cancelCurrentRun(){let e=this._inFlightTurn();e?.runId&&(this._cancelledRunIds.includes(e.runId)||(this._cancelledRunIds.push(e.runId),this._cancelledRunIds.length>i.CANCEL_CACHE_LIMIT&&this._cancelledRunIds.shift())),this._turnGeneration+=1,this.clearTurnWatchdog(),this._inFlightTurn.set(null);}isRunCancelled(e){return e?this._cancelledRunIds.includes(e):!1;}markSlideTouched(e){this._touchedSlideIds.add(e);}touchedSlideIds(){return this._touchedSlideIds;}activeRunId(){return this._inFlightTurn()?.runId??null;}stashPendingBaseRevision(e){this._pendingBaseRevision=e;}consumePendingBaseRevision(){let e=this._pendingBaseRevision;return this._pendingBaseRevision=null,e;}stashPendingIdentitySeeds(e){this._pendingIdentitySeeds=e;}consumePendingIdentitySeeds(){let e=this._pendingIdentitySeeds;return this._pendingIdentitySeeds=null,e;}reset(){this.clearTurnWatchdog(),this._timeline.set([]),this._conversationId.set(null),this._inFlightTurn.set(null),this._pendingBaseRevision=null,this._pendingIdentitySeeds=null,this._touchedSlideIds.clear();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();sa();vn();KE();Os();XE();mt();vn();mt();Or();mt();var _k="maker",pl=(()=>
821{class i{constructor(){this.eventsService=ct(Ji),this.events=this.eventsService.events.agent,this.contextFn=null;}registerContext(e){this.contextFn=e;}log(e,t={}){let n=oh(()=>this.contextFn?.()??{conversationId:null,storyId:null}),o={};n.conversationId!=null&&(o.conversationId=n.conversationId),n.storyId!=null&&(o.storyId=n.storyId),o.feature=_k,this.eventsService.log(e,Ke(Ke({},o),t));}toolName(e){switch(e.kind){case"slide.select":return"slide_select";case"text.update":return"text_update";case"structure.merge":return"structure_merge";case"structure.merge_range":return"structure_merge_range";case"structure.split":return"structure_split";case"structure.delete":return"structure_delete";case"visual.layout":return"visual_layout";case"visual.auto_zoom":return"visual_auto_zoom";case"visual.zoom":return e.to==="NONE"?"visual_clear_zoom":"visual_zoom";case"logo.visibility":return"logo_visibility";case"ui.open_panel":return"ui_panel_suggest";case"audio.update":return"audio_update";case"overlay.edit":return e.action==="add"?"overlay_add":"overlay_remove";case"style.preview_or_update":switch(e.action){case"theme":return"style_theme";case"logo":return"style_logo";case"aspect_ratio":return"style_aspect_ratio";case"caption_animation":return"style_caption_animation";case"random_rotation":return"style_random_rotation";}case"story.read":return"story_read";}}toolCategory(e){let t=this.toolName(e);return t==="text_update"?"Text":t.startsWith("structure_")?"Structure":t==="slide_select"?"Navigation":t.startsWith("visual_")?"Visual":t==="logo_visibility"?"Branding":t.startsWith("overlay_")?"Overlay":t==="audio_update"?"Audio":t.startsWith("style_")?"Style":"UI";}toolAction(e){switch(e.kind){case"audio.update":return e.action;case"logo.visibility":return e.visible?"show":"hide";case"style.preview_or_update":return e.action==="aspect_ratio"?String(e.proposedValue):e.action==="caption_animation"?e.proposedValue==null?"off":String(e.proposedValue):e.action==="random_rotation"?e.proposedValue?"on":"off":void 0;default:return;}}targetCount(e){let t=e.targetSlideIds;return t&&t.length||1;}toolResultStatus(e){return e.status==="no_op"||e.status==="rejected_stale"?"refused":e.status;}toolResultReason(e){let t=e.reasonCode;if(t)return t;if(e.status==="no_op")return"no_op";if(e.status==="rejected_stale")return"rejected_stale";}appliedCount(e){if(e.status!=="applied"&&e.status!=="partially_applied")return 0;let t=e.appliedTargetSlideIds;if(Array.isArray(t))return t.length;let n=e.targetSlideIds;return Array.isArray(n)&&n.length>0?n.length:1;}panelId(e){return e.panel??null;}logApiError(e){typeof navigator<"u"&&navigator.onLine===!1||this.log(this.events.agentApiError,e);}pickerType(e){switch(e){case"logo_picker":return"logo";case"music_picker":return"music";case"theme_picker":return"theme";case"overlay_stock_picker":return"overlay-stock";default:return null;}}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();mt();mt();sa();vn();Ki();var ua=class{};mt();Ki();mt();var yS=["text_update","structure_merge","structure_merge_range","structure_split","structure_delete","slide_select","visual_zoom","visual_clear_zoom","visual_auto_zoom","visual_layout","logo_visibility","overlay_remove","overlay_add","audio_set_volume","audio_set_soundbed_volume","audio_set_normalization","audio_set_soundbed","audio_remove_soundbed","style_aspect_ratio","style_caption_animation","style_random_rotation","style_theme","style_logo","ui_open_logo_picker","ui_open_music_picker","ui_open_theme_picker","ui_open_overlay_picker"],vS=["text_update","structure_merge","structure_merge_range","structure_split","structure_delete","slide_select","style_aspect_ratio","audio_set_volume","audio_set_soundbed_volume","audio_set_normalization","audio_set_soundbed","audio_remove_soundbed","ui_open_music_picker","ui_open_theme_picker","ui_open_overlay_picker"];mt();var Bl=(()=>{class i extends ua{constructor(){super(...arguments),this.sliderV2StoryService=ct(Yi),this.selection=ct(Rn),this.snapshotSlideHashes=new Map(),this.handles=[],this.pendingIdentitySeeds=[];}
821forEachSnapshotSlide(e){this.snapshotSlideHashes.forEach((t,n)=>e(n,t));}slideHashAtIndex(e){let t=this.sliderV2StoryService.story()?.media??[];if(!(e<0||e>=t.length))return this.hashSlide(t[e]);}getInitialSlideIdentitySeeds(){return this.pendingIdentitySeeds.slice();}noteSlideRemoved(e){e<0||e>=this.handles.length||this.handles.splice(e,1);}noteSlideInserted(e){e<0||e>this.handles.length||this.handles.splice(e,0,this.mintHandle());}hashSlide(e){let t=this.hashChars(e?.text??"");t=t+this.hashChars(e?.metadata?.resources?.title??"")|0,t=t+this.hashChars(e?.metadata?.resources?.subtitle??"")|0,t=t+(e?.logoEnabled?7:0)|0,t=t+Math.round((e?.metadata?.time??0)*1e3)|0,t=t+Math.round((e?.metadata?.duration??0)*1e3)|0;for(let n of e?.metadata?.templateIds??[])t=t+this.hashChars(n)|0;t=t+(e?.metadata?.segmentation?.length??0)|0;for(let n of e?.metadata?.effects??[])n?.type==="transform"&&(t=t+this.hashChars(JSON.stringify(n))|0);return t|0;}coarseRevision(e){if(!e)return 0;let t=e.media??[],n=t.length*1e6|0;for(let o of t)n=n+this.hashSlide(o)|0;return n=n+this.hashChars(e.aspectRatio??"")|0,n=n+this.hashChars(JSON.stringify(e.style??{}))|0,n=n+this.hashChars(e.headline??"")|0,n=n+this.hashChars(JSON.stringify(e.zoom??{}))|0,n=n+this.hashChars(String(e.soundbed?.assetId??""))|0,n=n+Math.round((e.soundbed?.volume??0)*1e3)|0,n=n+(e.audioNorm?1:0)|0,n|0;}buildMeta(){let e=this.sliderV2StoryService.story();if(!e)return null;let t=e.media??[];this.handles.length!==t.length&&(this.handles=t.map(()=>this.mintHandle())),this.snapshotSlideHashes=new Map();let n=[],o=t.map((x,h)=>{let y=this.handles[h];return n.push({opaqueId:y,originalId:null,position:h+1}),this.snapshotSlideHashes.set(y,this.hashSlide(x)),{id:y,position:h+1,durationSec:Number(x?.metadata?.duration??0)||0,textSnippet:this.firstLine(x?.text??x?.metadata?.resources?.title??""),hasFace:!1,hasOverlay:!1,zoom:{level:"NONE",fade:"NONE"},logoVisible:!!x?.logoEnabled};});this.pendingIdentitySeeds=n;let _=this.selection.index(),E=_!=null&&_>=0?o[_]?.id??null:null;return{storyId:e.storyId?String(e.storyId):"",baseRevision:this.coarseRevision(e),selectedSlideId:E,aspectRatio:e.aspectRatio??"horizontal",themeId:null,slidesIndex:o,captionsAnimation:null,randomRotation:!1,logoSelected:!!e.logo?.assetId,supportedOps:this.supportedOps()};}getDeskId(){let e=this.sliderV2StoryService.story();return e?.deskId?String(e.deskId):void 0;}getStoryId(){let e=this.sliderV2StoryService.story();return e?.storyId?String(e.storyId):null;}supportedOps(){return vS;}mintHandle(){let e=new Uint8Array(8);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.random()*256|0;let t="";for(let n=0;n<e.length;n++)t+=(e[n]%36).toString(36);return`s_${t}`;}firstLine(e){if(!e)return"";let t=e.trim();return t.length>80?t.slice(0,77)+"\u2026":t;}hashChars(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return t;}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qa(i)))(n||i);};})();}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();var us=class{},Zm=(()=>{class i extends us{constructor(){super(...arguments),this.videoSlides=ct(Xi),this.mutations$=this.videoSlides.shouldBuildVDMAgain$;}acknowledgeSelfApply(){}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qa(i)))(n||i);};})();}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})(),Qm=(()=>{class i extends us{constructor(){super(),this.storyService=ct(Yi),this.snapshot=ct(Bl),this.subject=new Yt(),this.mutations$=this.subject.asObservable(),this.lastFingerprint=null,bo(()=>{let e=this.snapshot.coarseRevision(this.storyService.story());if(this.lastFingerprint===null){this.lastFingerprint=e;return;}e!==this.lastFingerprint&&(this.lastFingerprint=e,this.subject.next({caller:"slider-v2-story",buildAgain:!0,changeMade:!0,isFirstLoad:!1}));},{allowSignalWrites:!0});}acknowledgeSelfApply(){this.lastFingerprint=this.snapshot.coarseRevision(this.storyService.story());}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function _S(i,r){return`${i}:${r}`;}function bS(i,r){let e=5381,t=`${i}|${r}`;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n)|0;return`c_${(e>>>0).toString(36)}`;}function SS(i){let r=i.totalDurationSec!==null?{durationSec:{value:i.totalDurationSec,source:"timeline",confidence:"observed"},capabilities:["durationSec"]}:{capabilities:[]};return Ke(Ke({runId:i.runId,continuationIndex:i.continuationIndex,maxContinuations:i.maxContinuations,idempotencyKey:_S(i.runId,i.continuationIndex),outcomes:i.outcomes,snapshot:i.snapshot,measured:r,userInterrupted:i.userInterrupted},i.supportedOps?{supportedOps:[...i.supportedOps]}:{}),i.echo?Ke({pendingIntent:i.echo.pendingIntent??null,continuationToken:i.echo.continuationToken},i.echo.turnFacts!==void 0?{turnFacts:i.echo.turnFacts}:{}):{});}function wS(i){return i.kind==="delete"?{type:"delete",consumed:[...i.deletedHandles],produced:[],invalidated:[...i.deletedHandles]}:{type:"merge",consumed:[...i.consumedHandles],produced:[{handle:i.survivorHandle,source:[i.survivorHandle,...i.consumedHandles]}],invalidated:[...i.consumedHandles]};}function ES(){return{phase:"idle",runId:null,continuationIndex:0,maxContinuations:2,stopReason:null};}function xS(i,r,e){return{phase:"awaiting_decision",runId:i,continuationIndex:r,maxContinuations:e,stopReason:null};}function TS(i,r){if(i.phase==="continuation_turn"&&r.runId===i.runId&&r.decision==="stop")return{next:st(Ke({},i),{phase:"idle",stopReason:r.reason}),action:{kind:"stop",reason:r.reason}};if(!(i.phase==="awaiting_decision"&&r.runId===i.runId&&Number(r.continuationIndex)===i.continuationIndex&&r.idempotencyKey===_S(i.runId??"",i.continuationIndex)))return{next:i,action:{kind:"ignore_stale"}};if(r.decision==="continue"){let n=i.continuationIndex+1;return n>i.maxContinuations?{next:st(Ke({},i),{phase:"idle",stopReason:"client_budget_exhausted"}),action:{kind:"stop",reason:"client_budget_exhausted"}}:{next:st(Ke({},i),{continuationIndex:n}),action:{kind:"emit_next",nextContinuationIndex:n}};}return{next:st(Ke({},i),{phase:"idle",stopReason:r.reason}),action:{kind:"stop",reason:r.reason}};}function CS(i,r){return i.phase!=="awaiting_decision"||!r||r!==i.runId?i:st(Ke({},i),{phase:"continuation_turn"});}function OS(i,r){if(i.phase!=="continuation_turn")return{next:i,action:{kind:"ignore_stale"}};if(!r)return{next:st(Ke({},i),{phase:"idle",stopReason:"server_terminal"}),action:{kind:"stop",reason:"server_terminal"}};let e=i.continuationIndex+1;return e>i.maxContinuations?{next:st(Ke({},i),{phase:"idle",stopReason:"client_budget_exhausted"}),action:{kind:"stop",reason:"client_budget_exhausted"}}:{next:st(Ke({},i),{phase:"awaiting_decision",continuationIndex:e}),action:{kind:"emit_next",nextContinuationIndex:e}};}function PS(i){return i.phase==="idle"?i:st(Ke({},i),{phase:"idle",stopReason:"user_interrupted"});}function IS(i){return i.phase!=="awaiting_decision"?i:st(Ke({},i),{phase:"idle",stopReason:"emit_failed"});}function kS(i,r){return i.phase!=="awaiting_decision"?i:st(Ke({},i),{phase:"idle",stopReason:r});}function AS(){return{observationEmitted:0,observationDropped:0,decisionAccepted:0,decisionIgnoredStale:0,lastTerminalReason:null};}function MS(i,r){switch(r.kind){case"observation_emitted":return st(Ke({},i),{observationEmitted:i.observationEmitted+1});case"observation_dropped":return st(Ke({},i),{observationDropped:i.observationDropped+1});case"decision_accepted":return st(Ke({},i),{decisionAccepted:i.decisionAccepted+1});case"decision_ignored_stale":return st(Ke({},i),{decisionIgnoredStale:i.decisionIgnoredStale+1});case"terminal":return st(Ke({},i),{lastTerminalReason:r.reason});}}var bk=800;function RS(i){return!(i.phase==="idle"||i.agentApplying||i.msSinceAgentApply!==null&&i.msSinceAgentApply>=0&&i.msSinceAgentApply<bk||!i.changeMade||i.isFirstLoad);}function LS(i){switch(i){case"applied":return"applied";case"partially_applied":return"partially_applied";case"failed":return"failed";case"no_op":return"no_op";default:return null;}}mt();var Rs=(()=>
821{class i{static{this.DECISION_TIMEOUT_MS=3e4;}constructor(){this.snapshot=ct(ua),this.conversation=ct(No),this.mutationSignal=ct(us),this.observationOut$=new Yt(),this.lastDecision=$t(null),this._telemetry=$t(AS()),this.telemetry=this._telemetry.asReadonly(),this.state=ES(),this.collectedOutcomes=[],this.decisionTimeoutHandle=null,this.pendingEcho=null,this.agentApplyDepth=0,this.lastAgentApplyEndedAt=0,this.mutationSignal.mutations$.pipe(qn()).subscribe(e=>this.onStoryMutation(e)),ct(ao).onDestroy(()=>this.clearDecisionWatchdog());}setState(e){let t=e===this.state;this.state=e,e.phase!=="awaiting_decision"?this.clearDecisionWatchdog():(!t||this.decisionTimeoutHandle===null)&&this.armDecisionWatchdog();}armDecisionWatchdog(){this.clearDecisionWatchdog(),this.decisionTimeoutHandle=setTimeout(()=>{this.decisionTimeoutHandle=null,this.stopLocally("decision_timeout");},i.DECISION_TIMEOUT_MS);}clearDecisionWatchdog(){this.decisionTimeoutHandle!==null&&(clearTimeout(this.decisionTimeoutHandle),this.decisionTimeoutHandle=null);}stopLocally(e){let t=this.state;this.setState(kS(t,e)),this.state!==t&&(this.pendingEcho=null,console.warn("[composer-loop] loop stopped locally",{reason:e,runId:t.runId,continuationIndex:t.continuationIndex}),Qt(new Error(`[composer-loop] loop stopped locally: ${e}`)),this.track({kind:"terminal",reason:e}));}onRunFailed(e){this.isRunActive(e)&&this.stopLocally("run_failed");}beginAgentApply(){this.agentApplyDepth+=1;}endAgentApply(){this.agentApplyDepth=Math.max(0,this.agentApplyDepth-1),this.agentApplyDepth===0&&(this.lastAgentApplyEndedAt=Date.now());}recordOutcome(e,t){let n=LS(e.status);if(n===null)return;let o=t&&(n==="applied"||n==="partially_applied")?wS(t):void 0;this.collectedOutcomes.push(Ke(Ke({opId:e.idempotencyKey,status:n},n==="no_op"?{noOpReason:"client_no_op"}:{}),o?{remap:o}:{}));}onTurnEnded(e){let t=this.collectedOutcomes;if(this.collectedOutcomes=[],this.state.phase==="continuation_turn"){let{next:_,action:E}=OS(this.state,this.pendingEcho!==null);this.setState(_),E.kind==="emit_next"?this.emitObservation(t,!1):E.kind==="stop"&&(this.pendingEcho=null,this.track({kind:"terminal",reason:E.reason}));return;}if(!this.pendingEcho)return;let n=e??`local_${crypto.randomUUID()}`,o=this.pendingEcho?.maxContinuations??2;this.setState(xS(n,0,o)),this.emitObservation(t,!1);}onContinuationTurnStarted(e){this.setState(CS(this.state,e));}setContinuationRequest(e){e&&(this.pendingEcho=e);}onDecision(e){let{next:t,action:n}=TS(this.state,e);switch(this.setState(t),n.kind){case"ignore_stale":this.track({kind:"decision_ignored_stale"});return;case"emit_next":this.track({kind:"decision_accepted"}),this.emitObservation([],!1);return;case"stop":this.pendingEcho=null,this.track({kind:"decision_accepted"}),this.track({kind:"terminal",reason:n.reason}),this.lastDecision.set(e);return;}}notifyUserTurn(){let e=this.state.phase==="awaiting_decision",t=PS(this.state);e&&this.emitObservation([],!0),this.setState(t),this.collectedOutcomes=[],this.pendingEcho=null,e&&this.track({kind:"terminal",reason:"user_interrupted"});}onStoryMutation(e){RS({phase:this.state.phase,agentApplying:this.agentApplyDepth>0,changeMade:e.changeMade===!0,isFirstLoad:e.isFirstLoad===!0,msSinceAgentApply:this.lastAgentApplyEndedAt>0?Date.now()-this.lastAgentApplyEndedAt:null})&&(console.warn("[composer-loop] manual story edit while awaiting decision \u2014 aborting loop",{caller:e.caller,runId:this.state.runId,continuationIndex:this.state.continuationIndex}),this.notifyUserTurn());}onEmitFailed(e){let t=this.state;this.setState(IS(t)),this.track({kind:"observation_dropped",reason:e}),this.state!==t&&(console.warn("[composer-loop] observation emit failed \u2014 loop stopped locally",{reason:e,runId:t.runId,continuationIndex:t.continuationIndex}),Qt(new Error(`[composer-loop] observation emit failed: ${e}`)),this.track({kind:"terminal",reason:"emit_failed"}));}currentState(){return this.state;}isRunActive(e){return!!e&&this.state.phase!=="idle"&&this.state.runId===e;}emitObservation(e,t){let n=this.snapshot.buildMeta();this.conversation.stashPendingBaseRevision(n?.baseRevision??null),this.conversation.stashPendingIdentitySeeds(n?this.snapshot.getInitialSlideIdentitySeeds():null);let o=this.pendingEcho;this.pendingEcho=null;let _=SS({runId:this.state.runId??"",continuationIndex:this.state.continuationIndex,maxContinuations:this.state.maxContinuations,outcomes:e,snapshot:this.buildSnapshotRefs(n),totalDurationSec:this.measureTotalDuration(n),userInterrupted:t,echo:o,supportedOps:this.snapshot.supp
821ortedOps()});this.track({kind:"observation_emitted"}),this.observationOut$.next(_);}track(e){this._telemetry.update(t=>MS(t,e)),console.debug("[composer-loop]",e.kind,st(Ke({},e),{runId:this.state.runId,continuationIndex:this.state.continuationIndex}));}buildSnapshotRefs(e){return e?e.slidesIndex.map(t=>({handle:t.id,position:t.position,contentHash:bS(t.textSnippet,t.durationSec)})):[];}measureTotalDuration(e){if(!e||e.slidesIndex.length===0)return null;let t=e.slidesIndex.reduce((n,o)=>n+(o.durationSec||0),0);return Math.round(t*10)/10;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();var fl=(()=>{class i{constructor(){this.conversation=ct(No),this.analytics=ct(pl),this.runLoop=ct(Rs);}surfaceCard(e,t){this.runLoop.recordOutcome(e,t),this.trackCardSurfaced(e),this.conversation.appendTimelineItem({kind:"tool_result",id:crypto.randomUUID(),payload:{toolResult:e}});}trackCardSurfaced(e){if(e.kind==="ui.open_panel"){e.status==="applied"&&this.analytics.log(this.analytics.events.agentPanelSuggestStart,{pickerType:this.analytics.pickerType(this.analytics.panelId(e))});return;}if(e.status==="pending_confirm"){this.analytics.log(this.analytics.events.agentToolConfirmStart,{tool:this.analytics.toolName(e)});return;}let t=this.analytics.toolResultReason(e);this.analytics.log(this.analytics.events.agentToolResult,Ke({tool:this.analytics.toolName(e),category:this.analytics.toolCategory(e),status:this.analytics.toolResultStatus(e),appliedCount:this.analytics.appliedCount(e)},t!==void 0?{reason:t}:{}));}surfaceMissingSlideError(e){console.warn("[composer-agent] missing slide reference",e),this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:"slide_not_found",errorMessage:Si(vt.SLIDE_NOT_FOUND)}});}detectPositionMismatch(e,t){if(typeof e!="number"||e<=0)return null;let n=this.conversation.getSlideIdentity(t);return!n||n.snapshotPosition===e?null:"Slide reference mismatch: the agent said \"slide "+e+"\" but that slide was at position "+n.snapshotPosition+". Refused to avoid editing the wrong slide.";}findSlideIndex(e){let t=this.conversation.getSlideIdentity(e);return t?t.liveIndex:-1;}markTouchedByOpaqueId(e){e&&this.conversation.markSlideTouched(e);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();var wk={Captions:"captions",Split:"split",Quote:"quote",Highlight:"highlight","Lower 3rd":"lower3rd",Dual:"dual","Box Video":"boxVideo",Circle:"circle","BG Removal":"bgRemoval"},DS={captions:"Captions",split:"Split",quote:"Quote",highlight:"Highlight",lower3rd:"Lower 3rd",dual:"Dual",boxVideo:"Box Video",circle:"Circle",bgRemoval:"BG Removal"},Jm="captions";function NS(i){if(!i)return Jm;let r=wk[i];return r||(DS[i]?i:(console.warn(`[layout-tokens] unknown layout "${i}" in snapshot; defaulting to "${Jm}"`),Jm));}function VS(i){return i?DS[i]??null:null;}var ds=class{};mt();var dd=(()=>{class i{constructor(){this.conversation=ct(No),this.runLoop=ct(Rs),this.analytics=ct(pl),this.ctx=ct(fl),this.editor=ct(ds),this.snapshot=ct(ua),this.seenIdempotencyKeys=[],this.dispatchChain=Promise.resolve(),this.chainEpoch=0;}static{this.IDEMPOTENCY_CACHE_LIMIT=256;}rememberIdempotencyKey(e){return e?this.seenIdempotencyKeys.includes(e)?!0:(this.seenIdempotencyKeys.push(e),this.seenIdempotencyKeys.length>i.IDEMPOTENCY_CACHE_LIMIT&&this.seenIdempotencyKeys.shift(),!1):!1;}resetDispatchChain(){this.dispatchChain=Promise.resolve(),this.chainEpoch++;}scheduleEndTurnAfterChain(){let e=this.chainEpoch;this.dispatchChain=this.dispatchChain.then(()=>{if(e!==this.chainEpoch)return;let t=this.conversation.activeRunId();this.conversation.endTurn(),this.runLoop.onTurnEnded(t);});}dispatch(e){if(!this.rememberIdempotencyKey(e.idempotencyKey)&&!this.conversation.isRunCancelled(e.runId)&&this.conversation.isTurnInFlight()){if(e.kind==="visual.layout"){let t=VS(e.layout);if(t===null){console.error("[composer-agent] unknown layout token from server",{layout:e.layout}),this.ctx.surfaceCard(st(Ke({}
821,e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}e=st(Ke({},e),{layout:t});}this.dispatchChain=this.dispatchChain.then(()=>kt(this,null,function*(){if(!this.conversation.isRunCancelled(e.runId)&&this.conversation.isTurnInFlight()){this.runLoop.beginAgentApply();try{if((e.kind==="ui.open_panel"?null:this.findExternallyDriftedSlideId())!==null){this.ctx.surfaceCard(st(Ke({},e),{status:"rejected_stale",reasonCode:vt.PROJECT_DRIFTED,errorMessage:Si(vt.PROJECT_DRIFTED)}));return;}return yield this.dispatchOne(e);}finally{this.runLoop.endAgentApply();}}})).catch(t=>{console.error("[composer-agent] dispatchOne failed",{kind:e.kind,err:t}),Qt(t instanceof Error?t:new Error(`[composer-agent] dispatchOne failed: ${e.kind}`)),this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED)}));});}}dispatchOne(e){return kt(this,null,function*(){if(e.kind!=="ui.open_panel"&&e.kind!=="story.read"){let t=this.analytics.toolAction(e);this.analytics.log(this.analytics.events.agentToolStart,st(Ke({tool:this.analytics.toolName(e),category:this.analytics.toolCategory(e)},t!==void 0?{action:t}:{}),{targetCount:this.analytics.targetCount(e),confirmationGated:e.requiresConfirmation===!0}));}yield this.editor.apply(e);});}findExternallyDriftedSlideId(){let e=this.conversation.touchedSlideIds(),t=null;
821return this.snapshot.forEachSnapshotSlide((n,o)=>{if(t!==null||e.has(n))return;let _=this.conversation.getSlideIdentity(n);if(!_)return;let E=this.snapshot.slideHashAtIndex(_.liveIndex);if(E===void 0){t=n;return;}E!==o&&(t=n);}),t;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();var $p="composer";var Wp=["composer_tool_results","reasoning_stream"];mt();var eg="bigvu-web-socket/agent-v2",Fl=eg,Ek=1e4,xk=1e4,Tk=15e3,Ck=1e4,Ok=1e3,Pk=5,tg=(()=>{class i{static{this.SEQ_DEDUP_RUN_LIMIT=8;}static{this.SEQ_DEDUP_KEY_LIMIT=512;}constructor(){if(this.cookieService=ct(Mv),this.conversation=ct(No),this.toolDispatcher=ct(dd),this.runLoop=ct(Rs),this.analytics=ct(pl),this.destroyRef=ct(ao),this.socket=null,this.userClosing=!1,this.reconnectAttempts=0,this.reconnectTimeoutHandle=null,this.turnToolCount=0,this.lastUserMessage=null,this._connectionState=$t("disconnected"),this.connectionState=this._connectionState.asReadonly(),this.authTimeoutHandle=null,this.connectTimeoutHandle=null,this.lastReasoningChunk=null,this.discardedConversationIds=new Set(),this.pendingCorrelationIds=new Set(),this._sendInFlight=$t(!1),this.sendInFlight=this._sendInFlight.asReadonly(),this.sendAckTimeoutHandle=null,this.runSeenSeqKeys=new Map(),this.pendingResume=null,this.resumeTimeoutHandle=null,this.runLoop.observationOut$.pipe(qn(this.destroyRef)).subscribe(e=>{let t=this.sendObservation(e);t!=="sent"&&(console.warn("[composer-loop] agentObservation dropped",{reason:t,runId:e.runId,continuationIndex:e.continuationIndex}),this.runLoop.onEmitFailed(t));}),typeof window<"u"){let e=()=>{!this.userClosing&&this._connectionState()==="failed"&&this.connect();};window.addEventListener("online",e),this.destroyRef.onDestroy(()=>window.removeEventListener("online",e));}this.conversation.turnTimedOut$.pipe(qn(this.destroyRef)).subscribe(()=>{this.pendingResume=null,this.clearResumeTimeout(),this.toolDispatcher.resetDispatchChain(),this.runLoop.notifyUserTurn();}),this.destroyRef.onDestroy(()=>{this.userClosing=!0,this.clearReconnectTimeout(),this.clearResumeTimeout(),this.clearSendAckTimeout(),this.clearAuthTimeout(),this.clearConnectTimeout(),this.teardownSocket();});}discardConversation(e){e&&this.discardedConversationIds.add(e),this.pendingCorrelationIds.clear();}connect(){let e=this._connectionState();e==="connecting"||e==="authenticating"||e==="connected"||(this.userClosing=!1,this.reconnectAttempts=0,this.clearReconnectTimeout(),this.openSocket());}openSocket(){this.teardownSocket(),this._connectionState.set("connecting"),this.armConnectTimeout();let e=Rv(Tr.globals.websocket,{reconnection:!1,transports:["websocket"]});this.socket=e,e.on("connect",()=>{this.sendAgentAuth();}),e.on(eg,t=>this.routeIncoming(t)),e.on("connect_error",()=>{let t=this._connectionState();(t==="connecting"||t==="authenticating")&&(this.clearConnectTimeout(),this.clearAuthTimeout(),this.reconnectAttempts===0&&this.analytics.logApiError({endpoint:Fl,error:"connect_error"}),this._connectionState.set("failed"));}),e.on("disconnect",()=>this.onSocketDisconnected());}onSocketDisconnected(){if(this.clearAuthTimeout(),this.clearConnectTimeout(),this.releaseSendLatch(),this.clearResumeTimeout(),this.userClosing)return;this._connectionState()!=="failed"&&this._connectionState.set("disconnected");let e=this.runLoop.currentState(),t=this.conversation.activeRunId()??(e.phase!=="idle"?e.runId:null),n=this.conversation.conversationId();t&&n?this.pendingResume={conversationId:n,runId:t}:this.conversation.isTurnInFlight()&&this.failDisconnectedRun(),this.scheduleReconnect();}scheduleReconnect(){if(this.userClosing)return;if(typeof navigator<"u"&&navigator.onLine===!1){this.clearReconnectTimeout(),this._connectionState.set("failed");return;}if(this.reconnectAttempts>=Pk){console.warn("[composer-agent] reconnect budget exhausted \u2014 giving up",{attempts:this.reconnectAttempts}),Qt(new Error("[composer-agent] reconnect budget exhausted")),this.pendingResume||this.conversation.isTurnInFlight()?this.failDisconnectedRun():this.analytics.logApiError({endpoint:Fl,error:vt.CONNECTION_LOST}),this._connectionState.set("failed");return;}this.reconnectAttempts+=1;let e=Ok*this.reconnectAttempts;this.clearReconnectTimeout(),this.reconnectTimeoutHandle=setTimeout(()=>{this.reconnectTimeoutHandle=null,!this.userClosing&&this.openSocket();},e);}teardownSocket(){this.socket&&(this.socket.removeAllListeners(),this.socket.disconnect(),this.socket=null);}clearReconnectTimeout(){this.reconnectTimeoutHandle!==null&&(clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=null);}disconnect(){this.userClosing=!0,this.clearReconnectTimeout(),this.teardownSocket(),this._connectionState.set("disconnected");}emitAgent(e){!this.socket||!this.socket.connected||this.socket.emit(eg,e);}sendUserMessage(e){if(this._connectionState()!=="connected")return{accepted:!1,reason:"not_connected"};this.runLoop.notifyUserTurn();let t=e.data?.messages?.[0]?.content?.message;return typeof t=="string"&&(this.lastUserMessage=t),e.clientCorrelationId&&this.pendingCorrelationIds.add(e.clientCorrelationId),this.emitAgent(e),this.latchSend(),{accepted:!0};}latchSend(){this.clearSendAckTimeout(),this._sendInFlight.set(!0),this.sendAckTimeoutHandle=setTimeout(()=>{this.sendAckTimeoutHandle=null,this._sendInFlight.set(!1);},Tk);}releaseSendLatch(){this.clearSendAckTimeout(),this._sendInFlight.set(!1);}clearSendAckTimeout(){this.sendAckTimeoutHandle!==null&&(clearTimeout(this.sendAckTimeoutHandle),this.sendAckTimeoutHandle=null);}
821maybeSendResumeRun(){let e=this.pendingResume;if(!e)return;if(!(this.conversation.isTurnInFlight()||this.runLoop.currentState().phase!=="idle")||this.conversation.isRunCancelled(e.runId)){this.pendingResume=null;return;}let n={v:2,type:"resumeRun",conversationId:e.conversationId,clientCorrelationId:crypto.randomUUID(),runId:e.runId};this.emitAgent(n),this.clearResumeTimeout(),this.resumeTimeoutHandle=setTimeout(()=>{this.resumeTimeoutHandle=null,this.pendingResume&&(console.warn("[composer-agent] resumeRun got no resumeComplete \u2014 killing the dropped run",{runId:this.pendingResume.runId}),Qt(new Error("[composer-agent] resumeRun got no resumeComplete within the window")),this.failDisconnectedRun());},Ck);}failDisconnectedRun(e=!0){this.pendingResume=null,this.clearResumeTimeout(),this.analytics.logApiError({endpoint:Fl,error:vt.CONNECTION_LOST}),e&&this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:vt.CONNECTION_LOST,errorMessage:Si(vt.CONNECTION_LOST)}}),this.conversation.cancelCurrentRun(),this.toolDispatcher.resetDispatchChain(),this.runLoop.notifyUserTurn();}clearResumeTimeout(){this.resumeTimeoutHandle!==null&&(clearTimeout(this.resumeTimeoutHandle),this.resumeTimeoutHandle=null);}sendObservation(e){if(this._connectionState()!=="connected")return"not_connected";let t=this.conversation.conversationId();if(!t)return"no_conversation";let n={v:2,type:"agentObservation",conversationId:t,clientCorrelationId:crypto.randomUUID(),data:{observation:e}};return this.emitAgent(n),"sent";}cancelCurrentTurn(){let e=this.conversation.conversationId();if(!e||this._connectionState()!=="connected")return;let t=this.conversation.activeRunId(),n=st(Ke({v:2,type:"cancel",conversationId:e,clientCorrelationId:crypto.randomUUID()},t?{runId:t}:{}),{data:Ke({conversationId:e},t?{runId:t}:{})});this.emitAgent(n);}isConnected(){return this._connectionState()==="connected";}sendAgentAuth(){this.clearConnectTimeout();let e=this.cookieService.getCookie("access_token");if(!e){this.analytics.logApiError({endpoint:Fl,error:"no_access_token"}),this._connectionState.set("failed");return;}this._connectionState.set("authenticating");let t=this.conversation.conversationId(),n=st(Ke({v:2,type:"auth"},t?{conversationId:t}:{}),{clientCorrelationId:crypto.randomUUID(),token:e,agentType:$p,capabilities:Wp});this.emitAgent(n),this.clearAuthTimeout(),this.authTimeoutHandle=setTimeout(()=>{this._connectionState()==="authenticating"&&(this.analytics.logApiError({endpoint:Fl,error:"auth_timeout"}),this._connectionState.set("failed"));},Ek);}matchesActiveRun(e){if(!e)return!0;let t=this.conversation.activeRunId();return t?t===e:!1;}envelopeRunId(e){let t=e.runId;if(typeof t=="string"&&t)return t;let n=e.data?.runId;return typeof n=="string"&&n?n:null;}isDuplicateBySeq(e){let t=this.envelopeRunId(e),n=e.data?.seq;if(!t||typeof n!="number")return!1;let o=this.runSeenSeqKeys.get(t);if(!o&&(o=new Set(),this.runSeenSeqKeys.set(t,o),this.runSeenSeqKeys.size>i.SEQ_DEDUP_RUN_LIMIT)){let E=this.runSeenSeqKeys.keys().next().value;E!==void 0&&this.runSeenSeqKeys.delete(E);}let _=`${e.type}:${n}`;return o.has(_)?(console.warn("[composer-agent] dropping duplicate envelope (runId, type, seq already seen)",{runId:t,key:_}),!0):(o.size<i.SEQ_DEDUP_KEY_LIMIT&&o.add(_),!1);}routeIncoming(e){if(!Ik(e))return;if(e.type==="auth"){this.clearAuthTimeout();let n=e.status;this._connectionState.set(n==="OK"?"connected":"failed"),n==="OK"&&(this.reconnectAttempts=0,this.maybeSendResumeRun());return;}if(e.conversationId&&this.discardedConversationIds.has(e.conversationId))return;let t=this.conversation.conversationId();if(!(e.conversationId&&t&&e.conversationId!==t)){if(e.conversationId&&!t){let n=e.clientCorrelationId;if(n&&this.pendingCorrelationIds.has(n))this.pendingCorrelationIds.delete(n),this.conversation.setConversationId(e.conversationId);else return;}if(!(e.type!=="agentMessageProcessing"&&this.isDuplicateBySeq(e)))switch(e.type){case"agentMessageProcessing":{let n=e.data,o=this.envelopeRunId(e);if(this.conversation.isRunCancelled(o))return;if(n?.role==="continuation"){if(this.runLoop.currentState().phase!=="awaiting_decision"||!this.runLoop.isRunActive(o)){console.warn("[composer-agent] continuation processing outside the awaited window \u2014 ignored",{procRunId:o}),Qt(new Error("[composer-agent] continuation processing outside the awaited window"));return;}}else if(o&&this.conversation.isRunSeen(o))return;if(this.conversation.isTurnInFlight()){let E=this.conversation.activeRunId();if(o&&E&&o===E)return;console.warn("[composer-agent] agentMessageProcessing for another run while a turn is in flight \u2014 ignored",{procRunId:o,activeRunId:E}),Qt(new Error("[composer-agent] agentMessageProcessing for another run while a turn is in flight"));return;}o&&this.runSeenSeqKeys.delete(o),this.releaseSendLatch();let _=e.clientCorrelationId;_&&this.pendingCorrelationIds.delete(_),this.lastReasoningChunk=null,this.turnToolCount=0,this.conversation.startTurn(o,this.conversation.consumePendingBaseRevision(),this.conversation.consumePendingIdentitySeeds()),n?.role==="continuation"&&this.runLoop.onContinuationTurnStarted(o);break;}case"agentReasoning":{let n=e.data,o=this.envelopeRunId(e);if(o?!this.conversation.tryLatchRunId(o):!this.conversation.isTurnInFlight())return;this.conversation.touchTurnWatchdog();let _=n?.chunk??"";if(!_)break;this.lastReasoningChunk=_.trim(),this.conversation.appendTimelineItem({kind:"reasoning",id:crypto.randomUUID(),payload:{chunk:_}});break;}case"agentToolCall":{let n=e.data;if(!n?.toolResult)break;if(!this.conversation.tryLatchRunId(n.toolResult.runId))return;this.conversation.touchTurnWatchdog(),this.turnToolCount+=1,this.toolDispatcher.dispatch(n.toolResult);break;}case"agentToolError":{let n=e.data;if(!this.matchesActiveRun(this.envelopeRunId(e)))return;this.conversation.touchTurnWatchdog();let o=n?.errorCode??"";this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:o||"tool_error",errorMessage:Si(o,n?.errorParam
821s)}});break;}case"agentMessage":{let n=e.data,o=this.envelopeRunId(e);if(this.conversation.isRunCancelled(o))return;let _=this.conversation.tryLatchRunId(o);if(!_&&!this.runLoop.isRunActive(o))return;_&&this.conversation.touchTurnWatchdog();let E=n?.message?.trim();if(E&&E!==this.lastReasoningChunk&&this.conversation.appendTimelineItem({kind:"assistant_text",id:crypto.randomUUID(),payload:{text:E}}),_){let h=this.turnToolCount>0;this.analytics.log(this.analytics.events.agentAiResponse,st(Ke({responseType:h?"action":"message"},h?{toolCount:this.turnToolCount}:{}),{response:E||this.lastReasoningChunk||"",userMessage:this.lastUserMessage??""}));}let x=e.data?.continuation;x&&this.runLoop.setContinuationRequest(x),this.toolDispatcher.scheduleEndTurnAfterChain();break;}case"error":{let n=e.data,o=this.envelopeRunId(e);if(this.releaseSendLatch(),this.analytics.logApiError({endpoint:Fl,error:n?.errorCode??"unknown"}),this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:n?.errorCode??"unknown",errorMessage:Si(n?.errorCode)}}),this.pendingResume&&(!o||o===this.pendingResume.runId)){this.failDisconnectedRun(!1);break;}(o?this.conversation.activeRunId()===o:this.conversation.isTurnInFlight())&&this.conversation.isTurnInFlight()&&this.toolDispatcher.scheduleEndTurnAfterChain(),this.runLoop.onRunFailed(o);let E=this._connectionState();(E==="connecting"||E==="authenticating")&&this._connectionState.set("failed");break;}case"heartbeat":{this.emitAgent({v:2,type:"heartbeatAck",clientCorrelationId:crypto.randomUUID(),ts:new Date().toISOString()});break;}case"disconnect":{let n=e.data?.status;console.debug("[composer-agent] server disconnect notice",{status:n}),this.userClosing=!1;break;}case"agentContinuationDecision":{let n=e.data;n&&this.runLoop.onDecision(n);break;}case"resumeComplete":{let n=this.envelopeRunId(e);if(this.pendingResume&&n===this.pendingResume.runId){let o=e.data?.replayedCount;console.debug("[composer-agent] resumeComplete \u2014 run replayed",{runId:n,replayedCount:o}),this.pendingResume=null,this.clearResumeTimeout();}break;}case"heartbeatAck":case"cancelAck":case"userMessage":case"getHistory":case"resumeRun":break;}}}clearAuthTimeout(){this.authTimeoutHandle!==null&&(clearTimeout(this.authTimeoutHandle),this.authTimeoutHandle=null);}armConnectTimeout(){this.clearConnectTimeout(),this.connectTimeoutHandle=setTimeout(()=>{this.connectTimeoutHandle=null,this._connectionState()==="connecting"&&(this.analytics.logApiError({endpoint:Fl,error:"connect_timeout"}),this._connectionState.set("failed"));},xk);}clearConnectTimeout(){this.connectTimeoutHandle!==null&&(clearTimeout(this.connectTimeoutHandle),this.connectTimeoutHandle=null);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function Ik(i){if(!i||typeof i!="object")return!1;let r=i;return typeof r.type=="string"&&kk.has(r.type);}var kk=new Set(["auth","userMessage","agentMessage","agentMessageProcessing","agentReasoning","agentToolCall","agentToolError","agentObservation","agentContinuationDecision","cancel","cancelAck","getHistory","heartbeat","heartbeatAck","error","resumeRun","resumeComplete","disconnect"]);mt();vn();var Ak=["logo_picker","music_picker","theme_picker","overlay_stock_picker"];function hd(i){return typeof i=="string"&&Ak.includes(i);}function lu(i){let r=i.status==="pending_confirm"||i.dismissed===!0;switch(i.kind){case"ui.open_panel":return hd(i.panel)?i.panel:null;case"style.preview_or_update":return!i.requiresConfirmation||!r?null:i.action==="theme"?"theme_picker":i.action==="logo"?"logo_picker":null;case"audio.update":return i.action==="soundbed"&&r?"music_picker":null;case"overlay.edit":return i.action==="add"&&r?"overlay_stock_picker":null;default:return null;}}function jS(i){switch(i){case"logo_picker":return{title:"Project logo",buttonLabel:"Choose a logo\u2026"};case"music_picker":return{title:"Background music",buttonLabel:"Choose a track\u2026"};case"theme_picker":return{title:"Project theme",buttonLabel:"Open theme picker\u2026"};case"overlay_stock_picker":return{title:"Media library \u2014 adds to the selected slide",buttonLabel:"Pick from library\u2026"};}}mt();var ig=(()=>{class i extends ds{constructor(){super(...arguments),this.conversation=ct(No),this.ctx=ct(fl),this.slidesGateway=ct(cs,{optional:!0}),this.scenesService=ct(eo),this.storyService=ct(zi),this.videoSlidesService=ct(Xi);}get slidesActions(){return this.slidesGateway?.actions()??null;}apply(e){return kt(this,null,function*(){switch(e.kind){case"story.read":return;case"slide.select":this.applySlideSelect(e);return;case"structure.split":this.applyStructureSplit(e);return;case"overlay.edit":this.applyOverlayEdit(e);return;case"visual.layout":this.applyVisualLayout(e);return;case"logo.visibility":this.applyLogoVisibility(e);return;case"ui.open_panel":if(!hd(e.panel)){this.ctx.surfaceCard(st(Ke({}
821,e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;case"text.update":this.applyTextUpdate(e);return;case"structure.merge":yield this.applyStructureMerge(e);return;case"structure.merge_range":yield this.applyStructureMergeRange(e);return;case"structure.delete":this.applyStructureDelete(e);return;case"visual.zoom":this.applyVisualZoom(e);return;case"audio.update":this.applyAudioUpdate(e);return;case"style.preview_or_update":this.applyStylePreviewOrUpdate(e);return;case"visual.auto_zoom":yield this.applyVisualAutoZoom(e);return;default:Mk(e);}});}applyCaptionAnimation(e){let t=["highlightWord","boxHighlight","reveal","singleWord"],n=e.proposedValue,o=typeof n=="string"?n.trim():n==null?"":null,_=o!=null?o.toLowerCase():null,E=new Set(["","off","none","no","no animation","disabled","disable"]),x=_!=null&&E.has(_),h=x?void 0:_?t.find(p=>p.toLowerCase()===_):void 0;if(!x&&!h){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}if((this.story()?.metadata?.speechSyncAnimation??null)===(h??null)){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:x?"Captions animation was already off.":"Captions animation was already \""+h+"\"."}));return;}this.storyService.updateSpeechSyncAnimationId(h),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"composer-agent.caption_animation",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",requiresConfirmation:!1}));}applyRandomRotation(e){let t=e.proposedValue;if(typeof t!="boolean"){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}if((()=>{try{return this.storyService.isRandomRotationEnabled();}catch{return!1;}})()===t){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:t?"Random rotation was already on.":"Random rotation was already off."}));return;}this.storyService.updateRandomRotation(t),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"composer-agent.random_rotation",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",requiresConfirmation:!1}));}applyVisualAutoZoom(e){return kt(this,null,function*(){if(e.kind==="visual.auto_zoom")try{let t=yield this.storyService.setAutoZoomData();if(this.conversation.isRunCancelled(e.runId)||!this.conversation.isTurnInFlight())return;this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"composer-agent.auto_zoom",buildAgain:!0,changeMade:!0,isFirstLoad:!1});let n=Array.isArray(t)?t.length:0;this.ctx.surfaceCard(st(Ke({},e),{status:"applied",noteMessage:n>0?"Auto-zoom applied to "+n+" slide(s).":"Auto-zoom analyzed the project (no zoom changes recommended)."}));}catch(t){console.error("[composer-agent] auto-zoom failed",t),Qt(t instanceof Error?t:new Error("[composer-agent] auto-zoom failed")),this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED)}));}});}applyTextUpdate(e){let t=this.slidesGateway?.slides();if(!t){this.ctx.surfaceCard(st(Ke({},e),{status:"failed"}));return;}let n=e.targetSlideIds&&e.targetSlideIds.length>1?e.targetSlideIds:[e.targetSlideId],o=e.indexHints&&e.indexHints.length===n.length?e.indexHints:n.map((y,b)=>b===0&&e.indexHint||0),_=[],E=[];for(let y=0;y<n.length;y++){let b=n[y],p=o[y],c=this.ctx.findSlideIndex(b);if(c<0){_.push({slideId:b,reason:Si(vt.SLIDE_NOT_FOUND)});continue;}if(this.ctx.detectPositionMismatch(p,b)){_.push({slideId:b,reason:Si(vt.SLIDE_REF_MISMATCH)});continue;}E.push({slideId:b,index:c});}if(_.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH),skippedTargetSlideIds:_.map(y=>y.slideId),skipReasons:Object.fromEntries(_.map(y=>[y.slideId,y.reason]))}));return;}let x=[],h=[];for(let{slideId:y,index:b}of E){switch(e.field){case"text":t.applyCaptionsTextChange(b,e.after);break;case"title":t.applyTitleTextChange(b,e.after);break;case"subtitle":t.applySubtitleTextChange(b,e.after);break;}this.ctx.markTouchedByOpaqueId(y),x.push(y);}if(x.length===0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED),skippedTargetSlideIds:h.map(y=>y.slideId),skipReasons:h.length?Object.fromEntries(h.map(y=>[y.slideId,y.reason])):void 0}));return;}if(h.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",appliedTargetSlideIds:x,skippedTargetSlideIds:h.map(y=>y.slideId),skipReasons:Object.fromEntries(h.map(y=>[y.slideId,y.reason])),noteMessage:"Updated "+e.field+" on "+x.length+" of "+n.length+" slides \u2014 "+h.length+" skipped."}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied",appliedTargetSlideIds:x,noteMessage:x.length>1?"Updated "+e.field+" on "+x.length+" slides.":void 0}));}applyStructureMergeRange(e){return kt(this,null,function*(){if(e.kind!=="structure.merge_range")return;if(!this.slidesActions){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SERVICE_NOT_READY,errorMessage:Si(vt.SERVICE_NOT_READY)}));return;}let t=this.story(),o=(t?.media&&t.media.length>0?t.media:t?.slides??[]).length,_=Math.max(1,Math.min(o,e.fromPosition|0)),E=Math.max(1,Math.min(o,e.toPosition|0));if(E<=_){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.MERGE_RANGE_INVERTED,errorMessage:Si(vt.MERGE_RANGE_INVERTED)}));return;}let x=_-1,h=_,y=E-_,b=0,p=null,c=this.conversation.findOpaqueIdAtLiveIndex(x);this.ctx.markTouchedByOpaqueId(c);let d=[];for(let s=0;s<y;s++){if(this.conversation.isRunCancelled(e.runId)||!this.conversation.isTurnInFlight())return;let l=this.conversation.findOpaqueIdAtLiveIndex(h);this.ctx.markTouchedByOpaqueId(l);try{yield this.slidesActions.mergeSlides(h,x),b++,l&&d.push(l);}catch{p=`overlay duration or slide type prevented merging position ${_
821+b+1} into the result`;break;}l&&this.conversation.removeSlideFromIdentityMap(l,h);}if(this.conversation.isRunCancelled(e.runId)||!this.conversation.isTurnInFlight())return;if(b===0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.MERGE_REJECTED,errorMessage:Si(vt.MERGE_REJECTED)}));return;}let m=_+b,a=c&&d.length>0?{kind:"merge",survivorHandle:c,consumedHandles:d}:void 0;b===y?this.ctx.surfaceCard(st(Ke({},e),{status:"applied",noteMessage:"Merged slides "+_+"\u2013"+E+" into slide "+_+"."}),a):this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",noteMessage:"Merged slides "+_+"\u2013"+m+" into slide "+_+". Stopped before position "+(m+1)+": "+p+"."}),a);});}applyStructureMerge(e){return kt(this,null,function*(){if(!this.slidesActions){this.ctx.surfaceCard(st(Ke({},e),{status:"failed"}));return;}if(e.sourceSlideIds.length<2){this.ctx.surfaceCard(st(Ke({},e),{status:"failed"}));return;}let t=this.ctx.findSlideIndex(e.sourceSlideIds[0]),n=this.ctx.findSlideIndex(e.sourceSlideIds[1]);if(t<0||n<0){this.ctx.surfaceMissingSlideError(e.sourceSlideIds.join(", "));return;}if(Math.abs(n-t)!==1){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.MERGE_NON_ADJACENT,errorMessage:Si(vt.MERGE_NON_ADJACENT)}));return;}try{let o=e.sourceSlideIds[0],_=e.sourceSlideIds[1];this.ctx.markTouchedByOpaqueId(o),this.ctx.markTouchedByOpaqueId(_),yield this.slidesActions.mergeSlides(n,t),this.conversation.removeSlideFromIdentityMap(_,n);}catch{this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.MERGE_REJECTED,errorMessage:Si(vt.MERGE_REJECTED)}));return;}this.conversation.isRunCancelled(e.runId)||!this.conversation.isTurnInFlight()||this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}),{kind:"merge",survivorHandle:e.sourceSlideIds[0],consumedHandles:[e.sourceSlideIds[1]]});});}applyStructureDelete(e){if(e.deletedSlideIds.length>1){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",requiresConfirmation:!1,reasonCode:vt.DELETE_NOT_LAST,errorMessage:Si(vt.DELETE_NOT_LAST)}));return;}if(!this.slidesActions){this.ctx.surfaceCard(st(Ke({},e),{status:"failed"}));return;}let t=e.deletedSlideIds[0],n=this.ctx.findSlideIndex(t);if(n<0){this.ctx.surfaceMissingSlideError(t);return;}let o=this.story(),_=o?.media&&o.media.length>0?o.media.length:o?.slides?.length??0;if(n!==_-1){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.DELETE_NOT_LAST,errorMessage:Si(vt.DELETE_NOT_LAST,{position:n+1,last:_})}));return;}let E=t;this.ctx.markTouchedByOpaqueId(E),this.slidesActions.deleteSlide(n),this.conversation.removeSlideFromIdentityMap(E,n),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}),{kind:"delete",deletedHandles:[E]});}applyStructureSplit(e){if(!this.slidesActions){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SERVICE_NOT_READY,errorMessage:Si(vt.SERVICE_NOT_READY)}));return;}let t=e.sourceSlideId,n=this.ctx.findSlideIndex(t);if(n<0){this.ctx.surfaceMissingSlideError(t);return;}if(!this.slidesActions.splitSlideAtTime(n,e.splitAtSec)){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SPLIT_NOT_POSSIBLE,errorMessage:Si(vt.SPLIT_NOT_POSSIBLE)}));return;}this.ctx.markTouchedByOpaqueId(t),this.conversation.shiftIdentityMapForInsert(n+1),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",noteMessage:"Split slide "+(n+1)+" at "+e.splitAtSec.toFixed(1)+"s."}));}applyVisualZoom(e){let t=this.scenesService,n=[],o=[],_=e.indexHints??[];for(let h=0;h<e.targetSlideIds.length;h++){let y=e.targetSlideIds[h],b=this.ctx.findSlideIndex(y);if(b<0){n.push({slideId:y,reason:Si(vt.SLIDE_NOT_FOUND)});continue;}if(this.ctx.detectPositionMismatch(_[h],y)){n.push({slideId:y,reason:Si(vt.SLIDE_REF_MISMATCH)});continue;}o.push({slideId:y,idx:b});}if(n.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH),skippedTargetSlideIds:n.map(h=>h.slideId),skipReasons:Object.fromEntries(n.map(h=>[h.slideId,h.reason]))}));return;}let E=[],x=[];for(let{slideId:h,idx:y}of o){let b=t.setZoomLevelAt(y,e.to),p=!0;(e.fade==="IN"||e.fade==="OUT")&&(p=t.setZoomFadeAt(y,e.fade)),b&&p?(E.push(h),this.ctx.markTouchedByOpaqueId(h)):b?x.push({slideId:h,reason:Si(vt.APPLY_FAILED)}):x.push({slideId:h,reason:Si(vt.OUT_OF_RANGE)});}if(E.length===0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED),skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:x.length?Object.fromEntries(x.map(h=>[h.slideId,h.reason])):void 0}));return;}if(x.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",appliedTargetSlideIds:E,skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:Object.fromEntries(x.map(h=>[h.slideId,h.reason])),noteMessage:"Zoom applied to "+E.length+" of "+e.targetSlideIds.length+" slides \u2014 "+x.length+" skipped."}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied",appliedTargetSlideIds:E}));}
821applySlideSelect(e){if(e.kind!=="slide.select")return;let t=this.slidesGateway?.slides();if(!t){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SERVICE_NOT_READY,errorMessage:Si(vt.SERVICE_NOT_READY)}));return;}let n=this.ctx.findSlideIndex(e.targetSlideId);if(n<0){this.ctx.surfaceMissingSlideError(e.targetSlideId);return;}if(this.ctx.detectPositionMismatch(e.indexHint,e.targetSlideId)){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH)}));return;}if(!t.selectSlideAt(n)){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.OUT_OF_RANGE,errorMessage:Si(vt.OUT_OF_RANGE,{position:n+1})}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));}applyVisualLayout(e){if(e.kind!=="visual.layout")return;let t=this.scenesService,n=[],o=[],_=e.indexHints??[];for(let h=0;h<e.targetSlideIds.length;h++){let y=e.targetSlideIds[h],b=this.ctx.findSlideIndex(y);if(b<0){n.push({slideId:y,reason:Si(vt.SLIDE_NOT_FOUND)});continue;}if(this.ctx.detectPositionMismatch(_[h],y)){n.push({slideId:y,reason:Si(vt.SLIDE_REF_MISMATCH)});continue;}o.push({slideId:y,idx:b});}if(n.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH),skippedTargetSlideIds:n.map(h=>h.slideId),skipReasons:Object.fromEntries(n.map(h=>[h.slideId,h.reason]))}));return;}let E=[],x=[];for(let{slideId:h,idx:y}of o)t.setSceneLayoutAt(y,e.layout)?(E.push(h),this.ctx.markTouchedByOpaqueId(h)):x.push({slideId:h,reason:Si(vt.APPLY_FAILED)});if(E.length===0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED),skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:x.length?Object.fromEntries(x.map(h=>[h.slideId,h.reason])):void 0}));return;}if(x.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",appliedTargetSlideIds:E,skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:Object.fromEntries(x.map(h=>[h.slideId,h.reason])),noteMessage:"Layout \""+eo.layoutUiTitle(e.layout)+"\" applied to "+E.length+" of "+e.targetSlideIds.length+" slides \u2014 "+x.length+" skipped."}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied",appliedTargetSlideIds:E}));}applyLogoVisibility(e){let t=this.scenesService;if(e.visible&&!t.hasLogoSelected()){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.NO_LOGO_SELECTED,errorMessage:Si(vt.NO_LOGO_SELECTED)}));return;}let n=[],o=[],_=e.indexHints??[];for(let h=0;h<e.targetSlideIds.length;h++){let y=e.targetSlideIds[h],b=this.ctx.findSlideIndex(y);if(b<0){n.push({slideId:y,reason:Si(vt.SLIDE_NOT_FOUND)});continue;}if(this.ctx.detectPositionMismatch(_[h],y)){n.push({slideId:y,reason:Si(vt.SLIDE_REF_MISMATCH)});continue;}o.push({slideId:y,idx:b});}if(n.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH),skippedTargetSlideIds:n.map(h=>h.slideId),skipReasons:Object.fromEntries(n.map(h=>[h.slideId,h.reason]))}));return;}let E=[],x=[];for(let{slideId:h,idx:y}of o)t.setLogoVisibilityAt(y,e.visible)?(E.push(h),this.ctx.markTouchedByOpaqueId(h)):x.push({slideId:h,reason:Si(vt.APPLY_FAILED)});if(E.length===0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.APPLY_FAILED,errorMessage:Si(vt.APPLY_FAILED),skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:x.length?Object.fromEntries(x.map(h=>[h.slideId,h.reason])):void 0}));return;}if(x.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",appliedTargetSlideIds:E,skippedTargetSlideIds:x.map(h=>h.slideId),skipReasons:Object.fromEntries(x.map(h=>[h.slideId,h.reason])),noteMessage:e.visible?"Logo shown on "+E.length+" of "+e.targetSlideIds.length+" slides \u2014 "+x.length+" skipped.":"Logo hidden on "+E.length+" of "+e.targetSlideIds.length+" slides \u2014 "+x.length+" skipped."}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied",appliedTargetSlideIds:E}));}applyAudioUpdate(e){let t=this.story();if(!t){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.NO_STORY,errorMessage:Si(vt.NO_STORY)}));return;}switch(e.action){case"soundbed_volume":{if(!t.soundbed){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.NO_SOUNDBED,errorMessage:Si(vt.NO_SOUNDBED)}));return;}if(typeof e.value!="number"||!isFinite(e.value)){this.ctx.surfaceCard(st(Ke({}
821,e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}if(e.value<0||e.value>100){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}let n=(t.soundbed?.volume??1)*100;if(Math.round(n)===Math.round(e.value)){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Soundbed volume was already "+Math.round(n)+"%."}));return;}this.storyService.updateSoundbedVolume(e.value),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"audio_norm":if(typeof e.value=="boolean"){let n=!!t.composerSessionState?.audioNorm;if(n===e.value){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:n?"Audio normalization was already on.":"Audio normalization was already off."}));return;}this.storyService.updateSoundbedAudioNorm(e.value),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;case"volume":{if(typeof e.value!="number"||!isFinite(e.value)||e.value<0||e.value>100){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}if(!t.soundbed){Math.round(e.value)===100?this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Voiceover is already at full volume."})):this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.NO_SOUNDBED,errorMessage:Si(vt.NO_SOUNDBED)}));return;}let n=(1-(t.soundbed?.volume??1))*100;if(Math.round(n)===Math.round(e.value)){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Voiceover volume was already "+Math.round(n)+"%."}));return;}this.storyService.updateSoundbedVolume(100-e.value),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"remove":{if(!t.soundbed){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"There is no background music to remove."}));return;}this.storyService.updateSoundbed(null),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"composer-agent.audio_remove",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"soundbed":this.ctx.surfaceCard(st(Ke({},e),{status:"pending_confirm",requiresConfirmation:!0}));return;default:this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}}applyStylePreviewOrUpdate(e){if(e.action==="caption_animation"){this.applyCaptionAnimation(e);return;}if(e.action==="random_rotation"){this.applyRandomRotation(e);return;}if(e.action!=="aspect_ratio"){this.ctx.surfaceCard(st(Ke({},e),{status:"pending_confirm",requiresConfirmation:!0}));return;}let t=typeof e.proposedValue=="string"?e.proposedValue.toLowerCase():"";if(t!=="vertical"&&t!=="horizontal"&&t!=="square"){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.INVALID_VALUE,errorMessage:Si(vt.INVALID_VALUE)}));return;}if(this.story()?.aspectRatio===t){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Project is already "+t+"."}));return;}this.storyService.updateAspectRatio(t),this.videoSlidesService.shouldBuildVDMAgain$.next({caller:"composer-agent.aspect_ratio",buildAgain:!0,changeMade:!0,isFirstLoad:!1}),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",requiresConfirmation:!1}));}applyOverlayEdit(e){if(e.kind!=="overlay.edit")return;if(e.action!=="remove"){this.ctx.surfaceCard(st(Ke({},e),{status:"pending_confirm",requiresConfirmation:!0}));return;}if(!this.slidesActions){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SERVICE_NOT_READY,errorMessage:Si(vt.SERVICE_NOT_READY)}));return;}let t=this.ctx.findSlideIndex(e.targetSlideId);if(t<0){this.ctx.surfaceMissingSlideError(e.targetSlideId);return;}let n=this.story(),_=(n?.media&&n.media.length>0?n.media:n?.slides??[])[t],E=(()=>{try{return this.storyService.slideTypeIdentifier(_);}catch{return;}})();if(!E||!E.includes("OVERLAY")){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Slide "+(t+1)+" has no overlay to remove."}));return;}this.ctx.markTouchedByOpaqueId(e.targetSlideId),this.slidesActions.removeOverlayFromSlide(t),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));}story(){return this.storyService.story;}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qa(i)))(n||i);};})();}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();function Mk(i){throw new Error(`Unhandled ComposerToolResult kind: ${JSON.stringify(i)}`);}mt();mt();var Rk=new Set(["theme_picker","music_picker","overlay_stock_picker"]),ng=(()=>{class i extends ds{constructor(){super(...arguments),this.conversation=ct(No),this.ctx=ct(fl),this.snapshot=ct(Bl),this.mutationSignal=ct(us),this.storyService=ct(Yi),this.selection=ct(Rn),this.player=ct(Sr);}apply(e){switch(e.kind){case"story.read":return;case"ui.open_panel":if(!hd(e.panel)||!Rk.has(e.panel)){this.fail(e,vt.UNSUPPORTED_OP);return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;case"slide.select":this.applySlideSelect(e);return;case"text.update":this.applyTextUpdate(e);return;case"structure.merge":this.applyStructureMerge(e);return;case"structure.merge_range":this.applyStructureMergeRange(e);return;case"structure.delete":this.applyStructureDelete(e);return;case"structure.split":this.applyStructureSplit(e);return;case"style.preview_or_update":this.applyStylePreviewOrUpdate(e);return;case"audio.update":this.applyAudioUpdate(e);return;default:this.fail(e,vt.UNSUPPORTED_OP);}}applySlideSelect(e){if(e.kind!=="slide.select")return;let t=this.ctx.findSlideIndex(e.targetSlideId);if(t<0){this.ctx.surfaceMissingSlideError(e.targetSlideId);return;}if(this.ctx.detectPositionMismatch(e.indexHint,e.targetSlideId)){this.fail(e,vt.SLIDE_REF_MISMATCH);return;}let n=this.media();if(t>=n.length){this.fail(e,vt.OUT_OF_RANGE,{position:t+1});return;}this.moveCursorTo(t),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));}applyTextUpdate(e){if(e.field!=="text"){this.fail(e,vt.UNSUPPORTED_OP);return;}let t=e.targetSlideIds&&e.targetSlideIds.length>1?e.targetSlideIds:[e.targetSlideId],n=e.indexHints&&e.indexHints.length===t.length?e.indexHints:t.map((p,c)=>c===0&&e.indexHint||0),o=[],_=[];for(let p=0;p<t.length;p++){let c=t[p],d=this.ctx.findSlideIndex(c);if(d<0){o.push({slideId:c,reason:Si(vt.SLIDE_NOT_FOUND)});continue;}if(this.ctx.detectPositionMismatch(n[p],c)){o.push({slideId:c,reason:Si(vt.SLIDE_REF_MISMATCH)});continue;}_.push({slideId:c,index:d});}if(o.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.SLIDE_REF_MISMATCH,errorMessage:Si(vt.SLIDE_REF_MISMATCH),skippedTargetSlideIds:o.map(p=>p.slideId),skipReasons:Object.fromEntries(o.map(p=>[p.slideId,p.reason]))}));return;}let E=this.media(),x=[],h=[],y=[];for(let{slideId:p,index:c}of _){if(c>=E.length){y.push(p);continue;}let d=ep(E,c,e.after);if(!d){h.push(p);continue;}E=d,this.ctx.markTouchedByOpaqueId(p),x.push(p);}if(x.length===0){if(y.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.OUT_OF_RANGE,errorMessage:Si(vt.OUT_OF_RANGE),skippedTargetSlideIds:[...h,...y],skipReasons:this.skipReasonsFor({unchangedIds:h,staleIds:y})}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:t.length>1?"Those slides already had that text.":"That slide already had that text."}));return;}this.commit(E);let b=[...h,...y];if(b.length>0){this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",appliedTargetSlideIds:x,skippedTargetSlideIds:b,skipReasons:this.skipReasonsFor({unchangedIds:h,staleIds:y}),noteMessage:"Updated "+e.field+" on "+x.length+" of "+t.length+" slides \u2014 "+b.length+" skipped."}));return;}this.ctx.surfaceCard(st(Ke({},e),{status:"applied",appliedTargetSlideIds:x,noteMessage:x.length>1?"Updated "+e.field+" on "+x.length+" slides.":void 0}));}applyStructureMerge(e){if(e.sourceSlideIds.length<2){this.fail(e,vt.INVALID_VALUE);return;}let t=e.sourceSlideIds[0],n=e.sourceSlideIds[1],o=this.ctx.findSlideIndex(t),_=this.ctx.findSlideIndex(n);if(o<0||_<0){this.ctx.surfaceMissingSlideError(e.sourceSlideIds.join(", "));return;}if(Math.abs(_-o)!==1){this.fail(e,vt.MERGE_NON_ADJACENT);return;}let E={slides:this.media(),fromIndex:_,intoIndex:o};if(ed(E)){this.fail(e,vt.MERGE_BROLL_TOO_SHORT);return;}let x=Gc(E);if(!x){this.fail(e,vt.MERGE_REJECTED);return;}this.ctx.markTouchedByOpaqueId(t),this.ctx.markTouchedByOpaqueId(n),this.commit(x,Math.min(_,o)),this.forgetSlide(n,_),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}),{kind:"merge",survivorHandle:t,consumedHandles:[n]});}applyStructureMergeRange(e){if(e.kind!=="structure.merge_range")return;let t=this.media().length,n=Math.max(1,Math.min(t,e.fromPosition|0)),o=Math.max(1,Math.min(t,e.toPosition|0));if(o<=n){this.fail(e,vt.MERGE_RANGE_INVERTED);return;}let _=n-1,E=n,x=o-n,h=this.conversation.findOpaqueIdAtLiveIndex(_);this.ctx.markTouchedByOpaqueId(h);let y=this.media(),b=[],p=0,c=!1;for(let a=0;a<x;a++){let s=this.conversation.findOpaqueIdAtLiveIndex(E),l={slides:y,fromIndex:E,intoIndex:_};if(ed(l)){c=!0;break;}let g=Gc(l);if(!g)break;y=g,p++,this.ctx.markTouchedByOpaqueId(s),s&&b.push(s),this.forgetSlide(s,E);}if(p===0){this.fail(e,c?vt.MERGE_BROLL_TOO_SHORT:vt.MERGE_REJECTED);return;}this.commit(y,_);let d=h&&b.length>0?{kind:"merge",survivorHandle:h,consumedHandles:b}:void 0;if(p===x){this.ctx.surfaceCard(st(Ke({},e),{status:"applied",noteMessage:"Merged slides "+n+"\u2013"+o+" into slide "+n+"."}),d);return;}let m=n+p;this.ctx.surfaceCard(st(Ke({},e),{status:"partially_applied",noteMessage:"Merged slides "+n+"\u2013"+m+" into slide "+n+". Couldn't merge past position "+(m+1)+"."}),d);}applyStructureDelete(e){if(e.deletedSlideIds.length>1){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",requiresConfirmation:!1,reasonCode:vt.DELET
821E_NOT_LAST,errorMessage:Si(vt.DELETE_NOT_LAST)}));return;}let t=e.deletedSlideIds[0],n=this.ctx.findSlideIndex(t);if(n<0){this.ctx.surfaceMissingSlideError(t);return;}let o=this.media();if(!Ju(o,n)){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:vt.DELETE_NOT_LAST,errorMessage:Si(vt.DELETE_NOT_LAST,{position:n+1,last:o.length})}));return;}let _=Jh(o,n);if(!_){this.fail(e,vt.APPLY_FAILED);return;}this.ctx.markTouchedByOpaqueId(t),this.commit(_,n-1),this.forgetSlide(t,n),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}),{kind:"delete",deletedHandles:[t]});}applyStructureSplit(e){let t=e.sourceSlideId,n=this.ctx.findSlideIndex(t);if(n<0){this.ctx.surfaceMissingSlideError(t);return;}let o=this.media(),_=o[n];if(!_){this.ctx.surfaceMissingSlideError(t);return;}let E=_.metadata.time+e.splitAtSec,x=rp({slides:o,index:n,splitAtSec:E});if(!x){this.fail(e,vt.SPLIT_NOT_POSSIBLE);return;}this.ctx.markTouchedByOpaqueId(t),this.commit(x,n),this.conversation.shiftIdentityMapForInsert(n+1),this.snapshot.noteSlideInserted(n+1),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",noteMessage:"Split slide "+(n+1)+" at "+e.splitAtSec.toFixed(1)+"s."}));}applyStylePreviewOrUpdate(e){if(e.action!=="aspect_ratio"){this.fail(e,vt.UNSUPPORTED_OP);return;}let t=typeof e.proposedValue=="string"?e.proposedValue.toLowerCase():"";if(t!=="vertical"&&t!=="horizontal"&&t!=="square"){this.fail(e,vt.INVALID_VALUE);return;}let n=this.storyService.story();if(!n){this.fail(e,vt.NO_STORY);return;}if(n.aspectRatio===t){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Project is already "+t+"."}));return;}this.storyService.setAspectRatioAndClearZoom(t),this.mutationSignal.acknowledgeSelfApply(),this.ctx.surfaceCard(st(Ke({},e),{status:"applied",requiresConfirmation:!1}));}applyAudioUpdate(e){let t=this.storyService.story();if(!t){this.fail(e,vt.NO_STORY);return;}switch(e.action){case"soundbed_volume":{if(!t.soundbed){this.fail(e,vt.NO_SOUNDBED);return;}if(!this.isPercent(e.value)){this.fail(e,vt.INVALID_VALUE);return;}let n=(t.soundbed.volume??1)*100;if(Math.round(n)===Math.round(e.value)){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Soundbed volume was already "+Math.round(n)+"%."}));return;}this.storyService.setSoundbedVolume(e.value/100),this.mutationSignal.acknowledgeSelfApply(),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"audio_norm":{if(typeof e.value!="boolean"){this.fail(e,vt.INVALID_VALUE);return;}let n=!!t.audioNorm;if(n===e.value){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:n?"Audio normalization was already on.":"Audio normalization was already off."}));return;}this.storyService.setAudioNorm(e.value),this.mutationSignal.acknowledgeSelfApply(),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"volume":{if(!this.isPercent(e.value)){this.fail(e,vt.INVALID_VALUE);return;}if(!t.soundbed){Math.round(e.value)===100?this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Voiceover is already at full volume."})):this.fail(e,vt.NO_SOUNDBED);return;}let n=(1-(t.soundbed.volume??1))*100;if(Math.round(n)===Math.round(e.value)){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"Voiceover volume was already "+Math.round(n)+"%."}));return;}this.storyService.setSoundbedVolume((100-e.value)/100),this.mutationSignal.acknowledgeSelfApply(),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"remove":{if(!t.soundbed){this.ctx.surfaceCard(st(Ke({},e),{status:"no_op",noteMessage:"There is no background music to remove."}));return;}this.storyService.clearSoundbed(),this.mutationSignal.acknowledgeSelfApply(),this.ctx.surfaceCard(st(Ke({},e),{status:"applied"}));return;}case"soundbed":this.ctx.surfaceCard(st(Ke({},e),{status:"pending_confirm",requiresConfirmation:!0}));return;default:this.fail(e,vt.INVALID_VALUE);}}isPercent(e){return typeof e=="number"&&isFinite(e)&&e>=0&&e<=100;}media(){return this.storyService.story()?.media??[];}commit(e,t){this.storyService.patch({media:e}),t!==void 0&&this.moveCursorTo(Math.min(Math.max(t,0),e.length-1)),this.mutationSignal.acknowledgeSelfApply();}moveCursorTo(e){let t=this.media(),n=t[e];this.selection.select(e),this.player.pauseAtSlide(n?.metadata?.time,Fr(t,e));}staleSkipReasons(e){let t=Si(vt.OUT_OF_RANGE);return Object.fromEntries(e.map(n=>[n,t]));}skipReasonsFor({unchangedIds:e,staleIds:t}){return Ke(Ke({},Object.fromEntries(e.map(n=>[n,"That slide already had that text."]))),this.staleSkipReasons(t));}forgetSlide(e,t){e?this.conversation.removeSlideFromIdentityMap(e,t):this.conversation.shiftIdentityMapForRemove(t),this.snapshot.noteSlideRemoved(t);}fail(e,t,n){this.ctx.surfaceCard(st(Ke({},e),{status:"failed",reasonCode:t,errorMessage:Si(t,n)}));}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qa(i)))(n||i);};})();}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();mt();var rg=(()=>{class i extends ua{constructor(){super(...arguments),this.storyService=ct(zi),this.slidesGateway=ct(cs,{optional:!0}),this.scenesService=ct(eo),this._snapshotSlideHashes=new Map(),this._pendingIdentitySeeds=[],this._stableHandleByOriginalId=new Map(),this._stableHandleBySlideRef=new WeakMap();}get slidesService(){return this.slidesGateway?.slides()??null;}
821forEachSnapshotSlide(e){this._snapshotSlideHashes.forEach((t,n)=>e(n,t));}slideHashAtIndex(e){let t=this.storyService.story;if(!t)return;let n=t.media&&t.media.length>0?t.media:t.slides??[];if(!(e<0||e>=n.length))return this.hashSlide(n[e]);}getInitialSlideIdentitySeeds(){return this._pendingIdentitySeeds.slice();}hashSlide(e){let t=this.hashChars(e?.text??"");t=t+this.hashChars(e?.metadata?.resources?.title??"")|0,t=t+this.hashChars(e?.metadata?.resources?.subtitle??"")|0,t=t+(e?.bug?7:0)|0;let n=e?.metadata?.templateIds??[];for(let _ of n)t=t+this.hashChars(_)|0;let o=e?.metadata?.effects??[];for(let _ of o)_?.type==="zoomPan"&&(t=t+Math.round((_?.attributes?.fromVal??0)*1e3)|0,t=t+Math.round((_?.attributes?.toVal??0)*1e3)|0);return t|0;}randomToken(){let e=new Uint8Array(8);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.random()*256|0;let t="";for(let n=0;n<e.length;n++)t+=(e[n]%36).toString(36);return t;}buildMeta(){let e=this.storyService.story;if(!e)return null;let t=e.media&&e.media.length>0?e.media:e.slides??[],n=this.scenesService,o=l=>n.getSceneLayoutAt(l)??void 0,_=l=>{let f=(l?.metadata?.effects??[]).filter(I=>I?.type==="zoomPan");if(f.length!==1)return{level:"NONE",fade:"NONE"};let v=f[0],S=Number(v?.attributes?.fromVal??1),w=Number(v?.attributes?.toVal??1),C=I=>{let O=Math.round(I*100);return O<=100?"NONE":O<=110?110:O<=120?120:130;};return S===w?{level:C(S),fade:"NONE"}:S<w?{level:C(w),fade:"IN"}:{level:C(S),fade:"OUT"};},E=(l,g)=>{if((g?.metadata?.effects??[]).some(w=>w?.type==="zoomPan"))return _(g);let S=n?.getSceneSnapshot(l)?.zoom;return{level:S?.level??"NONE",fade:S?.fade??"NONE"};},x=l=>{try{let g=this.storyService.slideTypeIdentifier(l);return g?g.includes("OVERLAY"):!1;}catch{return!1;}};this._snapshotSlideHashes=new Map();let h=[],y=t.map((l,g)=>{let f=l?.id!=null?String(l.id):l?._id!=null?String(l._id):null,v=f?this.stableHandleFor(f):l&&typeof l=="object"?this.stableHandleForSlideRef(l):`s_${this.randomToken()}`;return h.push({opaqueId:v,originalId:f,position:g+1}),this._snapshotSlideHashes.set(v,this.hashSlide(l)),{id:v,position:g+1,durationSec:Number(l?.durationSec??l?.duration??l?.metadata?.duration??0)||0,textSnippet:this.firstLine(l?.text??l?.metadata?.resources?.title??""),hasFace:!1,layout:NS(o(g)??"Captions"),hasOverlay:x(l),zoom:E(g,l),logoVisible:n?.getSceneSnapshot(g)?.logoVisible??!!l?.bug};});this._pendingIdentitySeeds=h;let b=this.currentSlideIndex(),p=b!=null?y[b]?.id??null:null,c=e.metadata?.speechSyncAnimation,m=typeof c=="string"&&["highlightWord","boxHighlight","reveal","singleWord"].includes(c)?c:null,a=(()=>{try{return this.storyService.isRandomRotationEnabled();}catch{return!1;}})(),s=this.scenesService.hasLogoSelected()??!!e.logo?.url;return{storyId:e.id?String(e.id):"",baseRevision:this.coarseRevision(t,e),selectedSlideId:p,aspectRatio:e.aspectRatio??"horizontal",themeId:e.themeId?String(e.themeId):null,slidesIndex:y,captionsAnimation:m,randomRotation:a,logoSelected:s,supportedOps:this.supportedOps()};}stableHandleFor(e){let t=this._stableHandleByOriginalId.get(e);return t||(t=`s_${this.randomToken()}`,this._stableHandleByOriginalId.set(e,t)),t;}stableHandleForSlideRef(e){let t=this._stableHandleBySlideRef.get(e);return t||(t=`s_${this.randomToken()}`,this._stableHandleBySlideRef.set(e,t)),t;}firstLine(e){if(!e)return"";let t=e.trim();return t.length>80?t.slice(0,77)+"\u2026":t;}currentSlideIndex(){return this.slidesService?.getCurrentIndex()??null;}hashChars(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return t;}coarseRevision(e,t){let n=e.length*1e6;for(let _ of e){n+=this.hashChars(_?.text??""),n+=this.hashChars(_?.metadata?.resources?.title??""),n+=this.hashChars(_?.metadata?.resources?.subtitle??"");let E=_?.metadata?.templateIds??[];for(let h of E)n+=this.hashChars(h);let x=_?.metadata?.effects??[];for(let h of x)h?.type==="zoomPan"&&(n+=Math.round((h?.attributes?.fromVal??0)*1e3),n+=Math.round((h?.attributes?.toVal??0)*1e3));}let o=this.scenesService;for(let _=0;_<e.length;_++){let E=o.getSceneSnapshot(_);E&&(n+=this.hashChars(E.selectedLayout??""),n+=this.hashChars(E.zoom?.level??""),n+=this.hashChars(E.zoom?.fade??""),n+=E.logoVisible?7:0);}return t&&(n+=this.hashChars(String(t.soundbed?.assetId??""))+Math.round((t.soundbed?.volume??0)*1e3),n+=this.hashChars(String(t.logo?.assetId??""))+Math.round((t.logo?.size??0)*1e3),n+=this.hashChars(String(t.themeId??""))+this.hashChars(String(t.themeVariationId??"")),n+=this.hashChars(String(t.aspectRatio??"")),n+=t.composerSessionState?.audioNorm?1:0),n|0;}getDeskId(){let e=this.storyService.story;if(e?.deskId)return String(e.deskId);}getStoryId(){let e=this.storyService.story;return e?.id?String(e.id):null;}supportedOps(){return yS;}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qa(i)))(n||i);};})();}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();mt();var og=(()=>{class i{constructor(){this.sidebarService=ct(Hr,{optional:!0}),this.scenesService=ct(eo,{optional:!0});}open(e){switch(e){case"logo_picker":{let t=this.scenesService;if(!t)return console.error("[composer-agent] logo picker unavailable \u2014 scenes service not registered"),{opened:!1};try{t.openAddLogoDialog();}catch(n){return console.error("[composer-agent] logo dialog failed to open",n),{opened:!1};}return{opened:!0};}case"music_picker":return this.openSidebarModal("SidebarMusicModalComponent");case"theme_picker":return this.openSidebarModal("SidebarThemesModalComponent",{tab:"style"});case"overlay_stock_picker":return this.openSidebarModal("SidebarLibraryModalComponent");}}openSidebarModal(e,t){if(!this.sidebarService)return console.error("[composer-agent] sidebar modals unavailable \u2014 SidebarService not in scope"),{opened:!1};if(this.sidebarService.openedModalName===e)return{opened:!0};try{this.sidebarService.openSidebarModal(e,void 0,t?{data:t}:void 0);}catch(n){return console.error("[composer-agent] sidebar modal failed to open",{componentName:e,err:n}),{opened:!1};}return{opened:!0};}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();hi();mt();hi();mt();hi();_r();mt();var Lk=["*",[["","actions",""]]],Dk=["*","[actions]"];function Nk(i,r){if(i&1&&(be(0,"span",9),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.slideRef());}}function Vk(i,r){if(i&1&&(be(0,"p",10),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.result().errorMessage);}}function jk(i,r){if(i&1&&(be(0,"p",11),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.result().noteMessage);}}var hs=(()=>{class i{constructor(){this.result=Zr.required(),this.kindLabel=xt(()=>this.result().kind.replace(/_/g," ")),this.slideRef=xt(()=>{let e=this.result();switch(e.kind){case"text.update":case"slide.select":return"slide "+e.indexHint+"";case"structure.merge":case"structure.delete":return e.indexHints.length?"slides "+e.indexHints.join(", ")+"":"";case"structure.split":return`slide ${e.resultingSlideIds.length?"\u2014":""}`;case"visual.zoom":case"visual.layout":case"logo.visibility":return e.targetSlideIds.length===1?"one slide":""+e.targetSlideIds.length+" slides";default:return"";}}),this.status=xt(()=>{if(this.result().kind==="ui.open_panel"&&this.result().status==="applied")return{text:"suggested",color:"primary"};let e={text:"pending",color:"primary"};
821switch(this.result().status){case"applied":return{text:"applied",color:"success"};case"partially_applied":return{text:"partial",color:"warning"};case"pending_confirm":return{text:"confirm",color:"warning"};case"failed":return{text:"failed",color:"danger"};case"rejected_stale":return{text:"stale",color:"neutral"};case"no_op":return{text:"no change",color:"neutral"};case"planned":return e;default:return e;}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-base-result-card"]],inputs:{result:[Kr.SignalBased,"result"]},standalone:!0,features:[Ft],ngContentSelectors:Dk,decls:12,vars:8,consts:[[1,"composer-result-card"],[1,"composer-result-card__head"],[1,"composer-result-card__kind"],["class","composer-result-card__ref",4,"ngIf"],["size","small","shape","rounded",3,"color","text"],[1,"composer-result-card__body"],["class","composer-result-card__error",4,"ngIf"],["class","composer-result-card__note",4,"ngIf"],[1,"composer-result-card__foot"],[1,"composer-result-card__ref"],[1,"composer-result-card__error"],[1,"composer-result-card__note"]],template:function(t,n){t&1&&(rh(Lk),be(0,"article",0)(1,"header",1)(2,"span",2),lt(3),Oe(),at(4,Nk,2,1,"span",3),tt(5,"lib-badge",4),Oe(),be(6,"div",5),Wu(7),at(8,Vk,2,1,"p",6)(9,jk,2,1,"p",7),Oe(),be(10,"footer",8),Wu(11,1),Oe()()),t&2&&(Di("is-destructive",n.result().requiresConfirmation),Ce(3),_i(n.kindLabel()),Ce(),ke("ngIf",n.slideRef()),Ce(),ke("color",n.status().color)("text",n.status().text),Ce(3),ke("ngIf",n.result().errorMessage),Ce(),ke("ngIf",n.result().noteMessage));},dependencies:[ui,Ic],styles:["[_nghost-%COMP%]{display:block}.composer-result-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:10px;background:var(--surface-secondary, #f7f8fa);border:1px solid var(--border-subtle, #e4e7ec)}.composer-result-card.is-destructive[_ngcontent-%COMP%]{border-color:var(--border-warning, #f0b78a);background:var(--surface-warning, #fff7ee)}.composer-result-card__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-secondary, #667085)}.composer-result-card__kind[_ngcontent-%COMP%]{font-weight:600;color:var(--text-primary, #253658);text-transform:lowercase;letter-spacing:.02em}.composer-result-card__ref[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;color:var(--text-secondary, #667085)}.composer-result-card__head[_ngcontent-%COMP%] lib-badge[_ngcontent-%COMP%]{margin-left:auto}.composer-result-card__body[_ngcontent-%COMP%]{font-size:13px;color:var(--text-primary, #253658)}.composer-result-card__error[_ngcontent-%COMP%]{margin:6px 0 0;padding:6px 8px;border-radius:6px;background:var(--surface-danger, #fdecec);color:var(--text-danger, #b42318);font-size:12px}.composer-result-card__note[_ngcontent-%COMP%]{margin:6px 0 0;padding:6px 8px;border-radius:6px;background:var(--surface-secondary, #f7f8fa);color:var(--text-secondary, #667085);font-size:12px;font-style:italic}.composer-result-card__foot[_ngcontent-%COMP%]:empty{display:none}.composer-result-card__foot[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end}"],changeDetection:0});}}return i;})();mt();function Bk(i,r){i&1&&(be(0,"span"),lt(1,"\xA0"),Oe());}function Fk(i,r){if(i&1&&(be(0,"span",4),lt(1),at(2,Bk,2,0,"span",5),Oe()),i&2){let e=r.$implicit,t=Le();Di("is-add",e.kind==="add")("is-remove",e.kind==="remove"),Ce(),hn(" ",e.text,""),Ce(),ke("ngIf",!t.isPunctuationOnly(e.text));}}var BS=(()=>{class i{constructor(){this.result=Zr.required(),this.diff=xt(()=>{let e=this.result();return Uk(e.before,e.after);});}trackBySeg(e,t){return`${e}:${t.kind}:${t.text}`;}isPunctuationOnly(e){return /^[.,;:!?]+$/.test(e);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-text-diff-card"]],inputs:{result:[Kr.SignalBased,"result"]},standalone:!0,features:[Ft],decls:5,vars:4,consts:[[3,"result"],[1,"diff"],["class","diff__seg",3,"is-add","is-remove",4,"ngFor","ngForOf","ngForTrackBy"],[1,"diff__field"],[1,"diff__seg"],[4,"ngIf"]],template:function(t,n){t&1&&(be(0,"composer-base-result-card",0)(1,"div",1),at(2,Fk,3,6,"span",2),Oe(),be(3,"p",3),lt(4),Oe()()),t&2&&(ke("result",n.result()),Ce(2),ke("ngForOf",n.diff())("ngForTrackBy",n.trackBySeg),Ce(2),hn("field: ",n.result().field,""));},dependencies:[an,hs],styles:[".diff[_ngcontent-%COMP%]{line-height:1.5;word-break:break-word}.diff__seg.is-add[_ngcontent-%COMP%]{background:#d9fadf;color:#065f2b;text-decoration:none}.diff__seg.is-remove[_ngcontent-%COMP%]{background:#ffe1e0;color:#861611;text-decoration:line-through}.diff__field[_ngcontent-%COMP%]{margin:8px 0 0;font-size:11px;color:var(--text-secondary, #667085)}"],changeDetection:0});}}return i;})();
821function Uk(i,r){let e=i.split(/\s+/).filter(Boolean),t=r.split(/\s+/).filter(Boolean),n=e.length,o=t.length,_=Array.from({length:n+1},()=>new Array(o+1).fill(0));for(let y=n-1;y>=0;y--)for(let b=o-1;b>=0;b--)_[y][b]=e[y]===t[b]?_[y+1][b+1]+1:Math.max(_[y+1][b],_[y][b+1]);let E=[],x=0,h=0;for(;x<n&&h<o;)e[x]===t[h]?(E.push({kind:"same",text:e[x]}),x++,h++):_[x+1][h]>=_[x][h+1]?(E.push({kind:"remove",text:e[x]}),x++):(E.push({kind:"add",text:t[h]}),h++);for(;x<n;)E.push({kind:"remove",text:e[x++]});for(;h<o;)E.push({kind:"add",text:t[h++]});return E;}mt();hi();mt();function Gk(i,r){if(i&1&&(be(0,"li",6),lt(1),Oe()),i&2){let e=r.$implicit;Ce(),hn(" ",e," ");}}function zk(i,r){if(i&1&&(be(0,"ol",4),at(1,Gk,2,1,"li",5),Oe()),i&2){let e=Le();Ce(),ke("ngForOf",e.involvedHints())("ngForTrackBy",e.trackByIndex);}}function Hk(i,r){if(i&1&&(be(0,"p",7),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.note());}}var FS=(()=>{class i{constructor(){this.result=Zr.required(),this.verb=xt(()=>{let e=this.result();switch(e.kind){case"structure.merge":return"Merged "+e.sourceSlideIds.length+" slides into one";case"structure.split":return"Split at "+e.splitAtSec.toFixed(1)+"s";case"structure.delete":return e.deletedSlideIds.length>1?"Delete "+e.deletedSlideIds.length+" slides":"Deleted 1 slide";}}),this.involvedHints=xt(()=>{let e=this.result();switch(e.kind){case"structure.merge":case"structure.delete":return e.indexHints;case"structure.split":return[];}}),this.note=xt(()=>{let e=this.result();return e.kind==="structure.merge"&&e.status==="applied"?"Merge is non-reversible from the agent panel \u2014 use the editor's native undo.":"";});}trackByIndex(e,t){return t;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-structure-summary-card"]],inputs:{result:[Kr.SignalBased,"result"]},standalone:!0,features:[Ft],decls:5,vars:4,consts:[[3,"result"],[1,"structure__verb"],["class","structure__strip",4,"ngIf"],["class","structure__note",4,"ngIf"],[1,"structure__strip"],["class","structure__slide",4,"ngFor","ngForOf","ngForTrackBy"],[1,"structure__slide"],[1,"structure__note"]],template:function(t,n){t&1&&(be(0,"composer-base-result-card",0)(1,"p",1),lt(2),Oe(),at(3,zk,2,2,"ol",2)(4,Hk,2,1,"p",3),Oe()),t&2&&(ke("result",n.result()),Ce(2),_i(n.verb()),Ce(),ke("ngIf",n.involvedHints().length),Ce(),ke("ngIf",n.note()));},dependencies:[an,ui,hs],styles:[".structure__verb[_ngcontent-%COMP%]{margin:0;font-weight:500}.structure__strip[_ngcontent-%COMP%]{list-style:none;margin:6px 0 0;padding:0;display:flex;gap:4px;flex-wrap:wrap}.structure__slide[_ngcontent-%COMP%]{min-width:28px;padding:4px 8px;text-align:center;font-size:12px;font-weight:500;background:var(--surface-primary, #fff);border:1px solid var(--border-subtle, #e4e7ec);border-radius:6px}.structure__note[_ngcontent-%COMP%]{margin:6px 0 0;font-size:11px;color:var(--text-secondary, #667085)}"],changeDetection:0});}}return i;})();mt();hi();mt();function $k(i,r){if(i&1&&(be(0,"p",7),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.fadeNote());}}var US=(()=>{class i{constructor(){this.result=Zr.required(),this.toScale=xt(()=>{let e=this.result().to;if(e==="NONE"||e==="100")return"scale(1)";let t=parseInt(typeof e=="string"&&e.startsWith("CUSTOM_")?e.slice(7):e,10),n=isFinite(t)?t:120;return`scale(${Math.min(1.4,n/100)})`;}),this.caption=xt(()=>{let e=this.result(),t=e.targetSlideIds.length;return t===1?""+e.from+" \u2192 "+e.to+" on 1 slide":""+e.from+" \u2192 "+e.to+" on "+t+" slides";}),this.fadeNote=xt(()=>{let e=this.result().fade;return!e||e==="NONE"?"":e==="IN"?"fade in":"fade out";});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-zoom-card"]],inputs:{result:[Kr.SignalBased,"result"]},standalone:!0,features:[Ft],decls:9,vars:5,consts:[[3,"result"],[1,"zoom"],[1,"zoom__frame","zoom__frame--from"],[1,"zoom__arrow"],[1,"zoom__frame","zoom__frame--to"],[1,"zoom__caption"],["class","zoom__fade",4,"ngIf"],[1,"zoom__fade"]],template:function(t,n){t&1&&(be(0,"composer-base-result-card",0)(1,"div",1),tt(2,"div",2),be(3,"span",3),lt(4,"\u2192"),Oe(),tt(5,"div",4),Oe(),be(6,"p",5),lt(7),Oe(),at(8,$k,2,1,"p",6),Oe()),t&2&&(ke("result",n.result()),Ce(5),Li("transform",n.toScale()),Ce(2),_i(n.caption()),Ce(),ke("ngIf",n.fadeNote()));},dependencies:[ui,hs],styles:[".zoom[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:4px}.zoom__frame[_ngcontent-%COMP%]{width:36px;height:24px;border:1.5px solid var(--text-secondary, #667085);border-radius:4px;position:relative;background:var(--surface-primary, #fff);transition:transform .2s ease;transform-origin:center}.zoom__frame--from[_ngcontent-%COMP%]{opacity:.6}.zoom__frame--to[_ngcontent-%COMP%]{border-color:var(--text-primary, #253658)}.zoom__arrow[_ngcontent-%COMP%]{font-size:16px;color:var(--text-secondary, #667085)}.zoom__caption[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12px}.zoom__fade[_ngcontent-%COMP%]{margin:4px 0 0;font-size:11px;color:var(--text-secondary, #667085)}"],changeDetection:0});}}return i;})();mt();mt();var GS=(()=>{class i{constructor(){this.result=Zr.required(),this.description=xt(()=>{let e=this.result();switch(e.kind){case"slide.select":return"Selected slide "+e.indexHint+".";case"visual.layout":return"Layout set to "+eo.layoutUiTitle(e.layout)+" on "+e.targetSlideIds.length+" slide(s).";case"logo.visibility":return e.visible?"Logo shown on "+e.targetSlideIds.length+" slide(s).":"Logo hidden on "+e.targetSlideIds.length+" slide(s).";case"overlay.edit":return e.action==="add"?"Added "+(e.overlayType??"overlay")+" on slide.":"Removed overlay from slide.";case"audio.update":{let t=e.value;switch(e.action){case"volume":return"Voiceover volume set to "+t+"%.";case"soundbed":return"Soundbed swap pending \u2014 pick a track to apply.";case"soundbed_volume":return"Soundbed volume set to "+t+"%.";case"audio_norm":return t?"Audio normalization enabled.":"Audio normalization disabled.";
821case"remove":return"Background music removed.";default:return"Audio update.";}}default:return`${e.kind} \xB7 ${e.status}`;}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-generic-status-card"]],inputs:{result:[Kr.SignalBased,"result"]},standalone:!0,features:[Ft],decls:3,vars:2,consts:[[3,"result"],[1,"generic__desc"]],template:function(t,n){t&1&&(be(0,"composer-base-result-card",0)(1,"p",1),lt(2),Oe()()),t&2&&(ke("result",n.result()),Ce(2),_i(n.description()));},dependencies:[hs],styles:[".generic__desc[_ngcontent-%COMP%]{margin:0;font-size:13px}"],changeDetection:0});}}return i;})();mt();hi();_r();mt();function Wk(i,r){if(i&1){let e=_t();be(0,"lib-button",6),Ze("clicked",function(){$e(e);let n=Le();return We(n.dismiss.emit(n.result()));}),li(1,0),Oe();}}function qk(i,r){if(i&1){let e=_t();be(0,"lib-button",7),Ze("clicked",function(){$e(e);let n=Le();return We(n.openPanel.emit(n.result()));}),lt(1),Oe();}if(i&2){let e=Le();Ce(),hn(" ",e.buttonLabel()," ");}}var zS=(()=>{class i{constructor(){this.result=Zr.required(),this.openPanel=bc(),this.dismiss=bc(),this.panel=xt(()=>lu(this.result())),this.chrome=xt(()=>{let e=this.panel();return e?jS(e):null;}),this.title=xt(()=>this.chrome()?.title??""),this.buttonLabel=xt(()=>this.chrome()?.buttonLabel??""),this.showOpenButton=xt(()=>{let e=this.result();return this.panel()!==null&&e.dismissed!==!0&&e.status!=="rejected_stale"&&e.status!=="failed";}),this.dismissable=xt(()=>{let e=this.result();return e.requiresConfirmation===!0&&e.status==="pending_confirm"&&e.dismissed!==!0;});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-panel-suggest-card"]],inputs:{result:[Kr.SignalBased,"result"]}
821,outputs:{openPanel:"openPanel",dismiss:"dismiss"},standalone:!0,features:[Ft],decls:6,vars:4,consts:()=>{let e;return e="Dismiss",[e,[3,"result"],[1,"panel-suggest__title"],["actions",""],["size","sm","variant","secondary",3,"clicked",4,"ngIf"],["size","sm","variant","primary",3,"clicked",4,"ngIf"],["size","sm","variant","secondary",3,"clicked"],["size","sm","variant","primary",3,"clicked"]];},template:function(t,n){t&1&&(be(0,"composer-base-result-card",1)(1,"p",2),lt(2),Oe(),ti(3,3),at(4,Wk,2,0,"lib-button",4)(5,qk,2,1,"lib-button",5),ii(),Oe()),t&2&&(ke("result",n.result()),Ce(2),_i(n.title()),Ce(2),ke("ngIf",n.dismissable()),Ce(),ke("ngIf",n.showOpenButton()));},dependencies:[ui,vr,hs],styles:[".panel-suggest__title[_ngcontent-%COMP%]{margin:0;font-weight:500}"],changeDetection:0});}}return i;})();mt();function Yk(i,r){i&1&&Qr(0);}function Xk(i,r){if(i&1&&(be(0,"div",8),at(1,Yk,1,0,"ng-container",9),Oe()),i&2){Le(2);let e=mi(4);Ce(),ke("ngTemplateOutlet",e);}}function Kk(i,r){if(i&1){let e=_t();ti(0),be(1,"button",4),Ze("click",function(){$e(e);let n=Le();return We(n.toggle());}),tt(2,"span",5),be(3,"span",6),lt(4),Oe()(),at(5,Xk,2,1,"div",7),ii();}if(i&2){let e=Le();Ce(),Di("open",e.expanded()),Ei("aria-expanded",e.expanded()),Ce(3),_i(e.toolCallLabel),Ce(),ke("ngIf",e.expanded());}}function Zk(i,r){i&1&&Qr(0);}function Qk(i,r){if(i&1&&at(0,Zk,1,0,"ng-container",9),i&2){Le();let e=mi(4);ke("ngTemplateOutlet",e);}}function Jk(i,r){if(i&1){let e=_t();be(0,"composer-panel-suggest-card",11),Ze("openPanel",function(n){$e(e);let o=Le(2);return We(o.openPanel.emit(n));})("dismiss",function(n){$e(e);let o=Le(2);return We(o.dismiss.emit(n));}),Oe();}if(i&2){let e=Le(2);ke("result",e.result());}}function eA(i,r){if(i&1&&tt(0,"composer-text-diff-card",15),i&2){let e=Le(3);ke("result",e.asText());}}function tA(i,r){if(i&1&&tt(0,"composer-structure-summary-card",15),i&2){let e=Le(3);ke("result",e.asMerge());}}function iA(i,r){if(i&1&&tt(0,"composer-structure-summary-card",15),i&2){let e=Le(3);ke("result",e.asSplit());}}function nA(i,r){if(i&1&&tt(0,"composer-structure-summary-card",15),i&2){let e=Le(3);ke("result",e.asDelete());}}function rA(i,r){if(i&1&&tt(0,"composer-zoom-card",15),i&2){let e=Le(3);ke("result",e.asZoom());}}function oA(i,r){if(i&1&&tt(0,"composer-generic-status-card",15),i&2){let e=Le(3);ke("result",e.result());}}function aA(i,r){if(i&1&&(ti(0,12),at(1,eA,1,1,"composer-text-diff-card",13)(2,tA,1,1,"composer-structure-summary-card",13)(3,iA,1,1,"composer-structure-summary-card",13)(4,nA,1,1,"composer-structure-summary-card",13)(5,rA,1,1,"composer-zoom-card",13)(6,oA,1,1,"composer-generic-status-card",14),ii()),i&2){let e=Le(2);ke("ngSwitch",e.kind()),Ce(),ke("ngSwitchCase","text.update"),Ce(),ke("ngSwitchCase","structure.merge"),Ce(),ke("ngSwitchCase","structure.split"),Ce(),ke("ngSwitchCase","structure.delete"),Ce(),ke("ngSwitchCase","visual.zoom");}}function sA(i,r){if(i&1&&at(0,Jk,1,1,"composer-panel-suggest-card",10)(1,aA,7,6,"ng-template",null,2,Vi),i&2){let e=mi(2),t=Le();ke("ngIf",t.hasPanelAffordance())("ngIfElse",e);}}var HS=(()=>{class i{constructor(){this.result=Zr.required(),this.openPanel=bc(),this.dismiss=bc(),this.kind=xt(()=>this.result().kind),this.expanded=$t(!1),this.toolCallLabel="Tool Call",this.collapsible=xt(()=>this.hasPanelAffordance()?!1:this.result().status==="applied");}toggle(){this.expanded.update(e=>!e);}hasPanelAffordance(){return lu(this.result())!==null;}asText(){return this.result();}asMerge(){return this.result();}asSplit(){return this.result();}asDelete(){return this.result();}asZoom(){return this.result();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-result-card-switch"]],inputs:{result:[Kr.SignalBased,"result"]}
821,outputs:{openPanel:"openPanel",dismiss:"dismiss"},standalone:!0,features:[Ft],decls:5,vars:2,consts:[["plainCard",""],["cardBody",""],["opSwitch",""],[4,"ngIf","ngIfElse"],["type","button",1,"tool-call-toggle",3,"click"],["aria-hidden","true",1,"tool-call-caret"],[1,"tool-call-label"],["class","tool-call-body",4,"ngIf"],[1,"tool-call-body"],[4,"ngTemplateOutlet"],[3,"result","openPanel","dismiss",4,"ngIf","ngIfElse"],[3,"openPanel","dismiss","result"],[3,"ngSwitch"],[3,"result",4,"ngSwitchCase"],[3,"result",4,"ngSwitchDefault"],[3,"result"]],template:function(t,n){if(t&1&&at(0,Kk,6,5,"ng-container",3)(1,Qk,1,1,"ng-template",null,0,Vi)(3,sA,3,2,"ng-template",null,1,Vi),t&2){let o=mi(2);ke("ngIf",n.collapsible())("ngIfElse",o);}},dependencies:[ui,Xa,Ka,Tc,ah,BS,FS,US,GS,zS],styles:[".tool-call-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:2px 0;background:none;border:none;cursor:pointer;font:inherit;font-size:13px;line-height:1;color:var(--text-secondary, #667085)}.tool-call-caret[_ngcontent-%COMP%]{width:14px;height:14px;flex-shrink:0;background-color:currentColor;-webkit-mask:url(/img/icon-library/symbols/chevron-left.svg) no-repeat center/contain;mask:url(/img/icon-library/symbols/chevron-left.svg) no-repeat center/contain;transform:rotate(180deg);transition:transform .15s ease}.tool-call-toggle.open[_ngcontent-%COMP%] .tool-call-caret[_ngcontent-%COMP%]{transform:rotate(270deg)}.tool-call-body[_ngcontent-%COMP%]{margin-top:6px}"],changeDetection:0});}}return i;})();_a();mt();function lA(i,r){if(i&1&&tt(0,"lib-chat-message",28),i&2){let e=r.ngIf;ke("text",e.text);}}function cA(i,r){i&1&&(be(0,"div",31),li(1,2),Oe());}function uA(i,r){if(i&1){let e=_t();ti(0),be(1,"lib-chat-message",29),Ze("likeClick",function(){$e(e);let n=Le().$implicit,o=Le(3);return We(o.onAgentFeedback("like",n.id));})("dislikeClick",function(){$e(e);let n=Le().$implicit,o=Le(3);return We(o.onAgentFeedback("dislike",n.id));}),Oe(),at(2,cA,2,0,"div",30),ii();}if(i&2){let e=r.ngIf,t=Le().$implicit,n=Le(3);Ce(),ke("text",e.text)("showLike",!n.hasAgentFeedback(t.id))("showDislike",!n.hasAgentFeedback(t.id)),Ce(),ke("ngIf",n.hasAgentFeedback(t.id));}}function dA(i,r){if(i&1&&tt(0,"lib-chat-message",32),i&2){let e=r.ngIf;ke("text",e.errorMessage);}}function hA(i,r){if(i&1&&tt(0,"lib-chat-message",32),i&2){let e=r.ngIf;ke("text",e.chunk);}}function pA(i,r){if(i&1){let e=_t();be(0,"composer-result-card-switch",33),Ze("openPanel",function(n){$e(e);let o=Le(4);return We(o.onCardOpenPanel(n));})("dismiss",function(n){$e(e);let o=Le(4);return We(o.onCardDismiss(n));}),Oe();}if(i&2){let e=r.ngIf;ke("result",e.toolResult);}}function fA(i,r){if(i&1&&(ti(0),at(1,lA,1,1,"lib-chat-message",24)(2,uA,3,4,"ng-container",25)(3,dA,1,1,"lib-chat-message",26)(4,hA,1,1,"lib-chat-message",26)(5,pA,1,1,"composer-result-card-switch",27),ii()),i&2){let e=r.$implicit,t=Le(3);Ce(),ke("ngIf",t.asUserText(e)),Ce(),ke("ngIf",t.asAssistantText(e)),Ce(),ke("ngIf",t.asError(e)),Ce(),ke("ngIf",t.asReasoning(e)),Ce(),ke("ngIf",t.asToolResult(e));}}function mA(i,r){i&1&&tt(0,"app-chat-typing-indicator",34);}function gA(i,r){if(i&1){let e=_t();be(0,"section",21),Ze("scroll",function(n){$e(e);let o=Le(2);return We(o.onTimelineScroll(n));}),at(1,fA,6,5,"ng-container",22)(2,mA,1,0,"app-chat-typing-indicator",23),Oe();}if(i&2){let e=Le(2);Ce(),ke("ngForOf",e.timeline())("ngForTrackBy",e.trackByTimelineId),Ce(),ke("ngIf",e.isTurnInFlight());}}function yA(i,r){i&1&&(be(0,"div",35)(1,"p"),li(2,3),Oe()());}function vA(i,r){if(i&1){let e=_t();be(0,"div",36)(1,"lib-button",37),Ze("clicked",function(){$e(e);let n=Le(2);return We(n.onCancel());}),ti(2),li(3,4),ii(),Oe()();}}function _A(i,r){i&1&&(be(0,"div",38)(1,"span"),li(2,5),Oe()());}function bA(i,r){if(i&1){let e=_t();be(0,"div",39)(1,"span"),li(2,6),Oe(),be(3,"lib-button",40),Ze("clicked",function(){$e(e);let n=Le(2);return We(n.retryConnection());}),ti(4),li(5,7),ii(),Oe()();}}function SA(i,r){if(i&1){let e=_t();be(0,"aside",9)(1,"header",10)(2,"h2",11),li(3,1),Oe(),be(4,"div",12)(5,"lib-button-icon",13),Ze("clicked",function(){$e(e);let n=Le();return We(n.clearConversation());}),Oe(),be(6,"lib-button-icon",14),Ze("clicked",function(){$e(e);let n=Le();return We(n.onDismissClick());}),Oe()()(),at(7,gA,3,3,"section",15)(8,yA,3,0,"ng-template",null,0,Vi),be(10,"footer",16),at(11,vA,4,0,"div",17)(12,_A,3,0,"div",18)(13,bA,6,0,"div",19),be(14,"lib-input-prompt",20),Ze("valueChange",function(n){$e(e);let o=Le();return We(o.onInputChange(n));})("submitClick",function(){$e(e);let n=Le();return We(n.onSubmit());})("keydown",function(n){$e(e);let o=Le();return We(o.onPromptKeydown(n));}),Oe()()();}if(i&2){let e=mi(9),t=Le();Di("is-open",t.isOpen()),ke("@slideInOut",void 0),Ce(7),ke("ngIf",t.hasContent())("ngIfElse",e),Ce(4),ke("ngIf",t.isTurnInFlight()),Ce(),ke("ngIf",t.isConnecting()),Ce(),ke("ngIf",t.connectionFailed()),Ce(),ke("value",t.inputValue())("state","default")("showRecordButton",!1)("submitDisabled",t.isTurnInFlight());}}var qp=(()=>
821{class i{static{this.STICK_THRESHOLD_PX=120;}constructor(){this.conversation=ct(No),this.socket=ct(tg),this.snapshot=ct(ua),this.toolDispatcher=ct(dd),this.runLoop=ct(Rs),this.panelLauncher=ct(og),this.launcher=ct(Ca),this.analytics=ct(pl),this.dialogHelper=ct(co),this.isOpen=this.launcher.isOpen,this.inputValue=$t(""),this.timeline=this.conversation.timeline,this.isTurnInFlight=this.conversation.isTurnInFlight,this.connectionState=this.socket.connectionState,this.pendingSubmitText=$t(null),this.isConnecting=xt(()=>this.connectionState()==="connecting"||this.connectionState()==="authenticating"||this.pendingSubmitText()!==null),this.connectionFailed=xt(()=>this.connectionState()==="failed"||this.connectionState()==="disconnected"),this.hasContent=xt(()=>this.timeline().length>0||this.isTurnInFlight()),this.host=ct(oa),this.stickToBottom=!0,this.feedbackAnsweredIds=$t(new Set()),this.analytics.registerContext(()=>({conversationId:this.conversation.conversationId(),storyId:this.snapshot.getStoryId()})),bo(()=>{this.timeline(),this.isTurnInFlight(),this.isOpen()&&requestAnimationFrame(()=>this.scrollTimelineToBottom());}),bo(()=>{let e=this.connectionState(),t=this.pendingSubmitText();t&&(e==="connected"?(this.pendingSubmitText.set(null),this.dispatchUserMessage(t)):(e==="failed"||e==="disconnected")&&(this.pendingSubmitText.set(null),this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:vt.NOT_CONNECTED,errorMessage:Si(vt.NOT_CONNECTED)}})));},{allowSignalWrites:!0}),bo(()=>{this.isOpen()&&!this.socket.isConnected()&&this.socket.connect();},{allowSignalWrites:!0}),bo(()=>{this.isOpen()&&this.analytics.log(this.analytics.events.agentOpen,{openType:"new"});});}scrollTimelineToBottom(){if(!this.stickToBottom)return;let e=this.host.nativeElement.querySelector(".composer-agent-sidebar__timeline");e&&(e.scrollTop=e.scrollHeight);}onTimelineScroll(e){let t=e.target;this.stickToBottom=t.scrollHeight-t.scrollTop-t.clientHeight<i.STICK_THRESHOLD_PX;}close(){this.launcher.close();}onDismissClick(){this.isOpen()&&(this.analytics.log(this.analytics.events.agentDismiss,{method:"exit"}),this.close());}onEscape(){this.isOpen()&&this.onDismissClick();}clearConversation(){this.analytics.log(this.analytics.events.agentResetStart),this.isTurnInFlight()&&(this.socket.cancelCurrentTurn(),this.conversation.cancelCurrentRun(),this.toolDispatcher.resetDispatchChain()),this.runLoop.notifyUserTurn(),this.socket.discardConversation(this.conversation.conversationId()),this.socket.releaseSendLatch(),this.conversation.reset(),this.inputValue.set(""),this.analytics.log(this.analytics.events.agentReset);}onInputChange(e){this.inputValue.set(e);}onCancel(){this.isTurnInFlight()&&(this.socket.cancelCurrentTurn(),this.conversation.cancelCurrentRun(),this.toolDispatcher.resetDispatchChain(),this.runLoop.notifyUserTurn(),this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:vt.CANCELLED,errorMessage:Si(vt.CANCELLED)}}));}onPromptKeydown(e){e.key==="Enter"&&(!e.metaKey&&!e.ctrlKey||(e.preventDefault(),this.onSubmit()));}onSubmit(){let e=this.inputValue().trim();if(!(!e||this.isTurnInFlight()||this.pendingSubmitText()!==null||this.socket.sendInFlight())){if(this.stickToBottom=!0,this.analytics.log(this.analytics.events.agentMessageSent,{message:e,isSuggestion:!1}),this.conversation.appendTimelineItem({kind:"user_text",id:crypto.randomUUID(),payload:{text:e}}),this.inputValue.set(""),!this.socket.isConnected()){this.pendingSubmitText.set(e),this.socket.connect();return;}this.dispatchUserMessage(e);}}dispatchUserMessage(e){let t=this.snapshot.buildMeta();if(this.conversation.stashPendingBaseRevision(t?.baseRevision??null),this.conversation.stashPendingIdentitySeeds(t?this.snapshot.getInitialSlideIdentitySeeds():null),!t){this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:vt.NO_STORY,errorMessage:Si(vt.NO_STORY)}});return;}let n={v:2,type:"userMessage",conversationId:this.conversation.conversationId()??void 0,clientCorrelationId:crypto.randomUUID(),deskId:this.snapshot.getDeskId(),data:{messages:[{role:"user",content:{message:e}}],meta:st(Ke({},t),{agentType:$p}),capabilities:[...Wp]}},o=this.socket.sendUserMessage(n);o.accepted||this.conversation.appendTimelineItem({kind:"error",id:crypto.randomUUID(),payload:{errorCode:o.reason??vt.NOT_CONNECTED,errorMessage:Si(vt.NOT_CONNECTED)}});}retryConnection(){this.socket.connect();}trackByTimelineId(e,t){return t.id;}asUserText(e){return e.kind==="user_text"?e.payload:null;}asAssistantText(e){return e.kind==="assistant_text"?e.payload:null;}asError(e){return e.kind==="error"?e.payload:null;}asReasoning(e){return e.kind==="reasoning"?e.payload:null;}asToolResult(e){return e.kind==="tool_result"?e.payload:null;}hasAgentFeedback(e){return this.feedbackAnsweredIds().has(e);}onAgentFeedback(e,t){this.hasAgentFeedback(t)||(this.feedbackAnsweredIds.update(n=>new Set(n).add(t)),this.analytics.log(this.analytics.events.agentResultClick,{button:e}),e==="like"?this.analytics.log(this.analytics.events.agentFeedback,{featureStage:"result",button:e}):this.openFeedbackDialog(e));}openFeedbackDialog(e){let t=new Nh();t.title="Your feedback is important",t.inputPlaceholder="Type your feedback here",t.inputVariant="text-area",t.confirmButtonText="Send",t.showClearButton=!1,t.showValidationErrors=!1,t.onSubmit=o=>{let _=o?.trim();this.analytics.log(this.analytics.events.agentFeedback,Ke({featureStage:"result",button:e},_?{message:_}:{})),this.dialogHelper.close();},t.onClose=()=>{this.dialogHelper.close();};let n=new Do();n.panelClass="confirmation-with-input-dialog",this.dialogHelper.open(t,Vh,n);}onCardDismiss(e){e.requiresConfirmation===!0&&this.analytics.log(this.analytics.events.agentToolConfirmClick,{tool:this.analytics.toolName(e),button:"cancelled"}),this.conversation.updateToolResultCard(e.toolCallId,{status:"no_op",dismissed:!0,noteMessage:"Dismissed \u2014 nothing was changed."});}onCardOpenPanel(e){let t=lu(e);
821if(!t||this.isTurnInFlight())return;if(e.kind==="ui.open_panel"?this.analytics.log(this.analytics.events.agentPanelSuggestClick,{pickerType:this.analytics.pickerType(t)}):this.analytics.log(this.analytics.events.agentToolConfirmClick,{tool:this.analytics.toolName(e),button:"confirmed"}),!this.panelLauncher.open(t).opened){this.conversation.updateToolResultCard(e.toolCallId,{status:"failed",errorMessage:Si(vt.SERVICE_NOT_READY)});return;}this.stickToBottom=!0,this.close();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-agent-sidebar"]],hostBindings:function(t,n){t&1&&Ze("keydown.escape",function(){return n.onEscape();},!1,wc);},standalone:!0,features:[Wn([No,tg,dd,fl,Rs,og,rg,Bl,{provide:ua,useFactory:()=>Xn()==="v2"?ct(Bl):ct(rg)},ig,ng,{provide:ds,useFactory:()=>Xn()==="v2"?ct(ng):ct(ig)},Zm,Qm,{provide:us,useFactory:()=>Xn()==="v2"?ct(Qm):ct(Zm)}]),Ft],decls:1,vars:1,consts:()=>{let e;e="Clear conversation";let t;t="Clear conversation and start over";let n;n="Close AI agent";let o;o="Message the agent\u2026";let _;_="AI Agent";let E;E="Agent is responding";let x;x="Thanks for your feedback!";let h;h=" Ask the agent to edit your project. Only some edits are supported for now \u2014 more are on the way. ";let y;y="Stop the agent";let b;b="Stop";let p;p="Connecting to the agent\u2026";let c;c="Retry connecting to the agent";let d;d="Can't reach the agent.";let m;return m="Retry",[["emptyState",""],_,x,h,b,p,d,m,["class","composer-agent-sidebar",3,"is-open",4,"ngIf"],[1,"composer-agent-sidebar"],[1,"composer-agent-sidebar__header"],[1,"composer-agent-sidebar__title"],[1,"composer-agent-sidebar__header-actions"],["size","sm","variant","ghost","iconContent","/img/icon-library/trash-bin/delete-trash.svg","title",e,"aria-label",t,3,"clicked"],["size","sm","variant","ghost","iconContent","/img/icon-library/basic-ui/close-regular.svg","aria-label",n,3,"clicked"],["class","composer-agent-sidebar__timeline",3,"scroll",4,"ngIf","ngIfElse"],[1,"composer-agent-sidebar__input"],["class","composer-agent-sidebar__inflight",4,"ngIf"],["class","composer-agent-sidebar__conn","role","status",4,"ngIf"],["class","composer-agent-sidebar__conn composer-agent-sidebar__conn--error","role","alert",4,"ngIf"],["placeholder",o,3,"valueChange","submitClick","keydown","value","state","showRecordButton","submitDisabled"],[1,"composer-agent-sidebar__timeline",3,"scroll"],[4,"ngFor","ngForOf","ngForTrackBy"],["role","status","aria-label",E,4,"ngIf"],["type","user","mode","light","state","message",3,"text",4,"ngIf"],[4,"ngIf"],["type","agent","mode","light","state","message",3,"text",4,"ngIf"],[3,"result","openPanel","dismiss",4,"ngIf"],["type","user","mode","light","state","message",3,"text"],["type","agent","mode","light","state","content",3,"likeClick","dislikeClick","text","showLike","showDislike"],["class","composer-agent-sidebar__feedback-thanks","role","status",4,"ngIf"],["role","status",1,"composer-agent-sidebar__feedback-thanks"],["type","agent","mode","light","state","message",3,"text"],[3,"openPanel","dismiss","result"],["role","status","aria-label",E],[1,"composer-agent-sidebar__empty"],[1,"composer-agent-sidebar__inflight"],["size","sm","variant","ghost","aria-label",y,3,"clicked"],["role","status",1,"composer-agent-sidebar__conn"],["role","alert",1,"composer-agent-sidebar__conn","composer-agent-sidebar__conn--error"],["size","sm","variant","ghost","aria-label",c,3,"clicked"]];},template:function(t,n){t&1&&at(0,SA,15,12,"aside",8),t&2&&ke("ngIf",n.isOpen());},dependencies:[ui,an,zv,Hv,vr,Rr,T_,HS],styles:["[_nghost-%COMP%]{display:block;position:absolute;top:0;bottom:0;left:100px;width:375px;clip-path:inset(-100vh -100vw -100vh 0);pointer-events:none;z-index:1000}.composer-agent-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-right:1px solid #E5E7EB;box-sizing:border-box;overflow:hidden;position:absolute;inset:0;pointer-events:auto}.composer-agent-sidebar__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #E5E7EB}.composer-agent-sidebar__header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.composer-agent-sidebar__title[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:600;color:#253658}.composer-agent-sidebar__timeline[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.composer-agent-sidebar__feedback-thanks[_ngcontent-%COMP%]{margin-top:-6px;font-size:12px;line-height:16px;color:#6b7280}.composer-agent-sidebar__empty[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;align-items:center;justify-content:center;padding:24px;color:#4b5563;font-size:14px;text-align:center}.composer-agent-sidebar__input[_ngcontent-%COMP%]{padding:12px 16px;border-top:1px solid #E5E7EB}.composer-agent-sidebar__inflight[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;margin-bottom:8px}"],data:{animation:[Da("slideInOut",[ga(":enter",[so({transform:"translateX(-100%)"}),ma("280ms cubic-bezier(0.2, 0, 0.2, 1)",so({transform:"translateX(0)"}))]),ga(":leave",[ma("280ms cubic-bezier(0.2, 0, 0.2, 1)",so({transform:"translateX(-100%)"}))])])]},changeDetection:0});}}return i;})();Os();hi();Na();nm();Cc();rm();hi();hi();Ki();hi();Oc();am();kv();mt();function wA(i,r){if(i&1){let e=_t();ti(0),be(1,"div",2),tt(2,"ui-dropdown-menu",3),be(3,"ui-button",4),Ze("onClick",function(){let n=$e(e).ngIf,o=Le();return We(n.isAutoZoomed?o.sceneService.setZoomLevel("NONE"):o.sceneService.openAutoZoom());}),Oe()(),ii();}if(i&2){let e=r.ngIf,t=Le();Ce(),Ei("disabled",e.disableAll),Ce(),ke("selectedOption",t.selectedOption)("menuOptions",t.menuOptions)("contentStyle","default-dropdown-menu-styling videomaker-zoom-menu-dropdown-content")("toggleMenuIconClass","grey-triangle closed")("variant","stroke")("size","lg")("customClass","videomaker-zoom-menu-dropdown"),Ce(),ke("iconOnly",e.isAutoZoomed?"symbol-redo-icon":"ai-stroke-icon")("customClass","auto-zoom-button");}}var $S=(()=>{class i{constructor(e){this.sceneService=e,this.lastDisableFade=null,this.lastIsAi110=null,this.unsubscribe$=new Yt();}ngOnInit(){this.viewModel$=this.sceneService.sceneZoomViewModel$,this.menuOptions=this.buildMenuOptions(!1,!1),this.selectedOption=this.menuOptions[0];}ngAfterViewInit(){this.viewModel$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{(e.disableFade!==this.lastDisableFade||e.isAi110!==this.lastIsAi110)&&(this.menuOptions=this.buildMenuOptions(e.disableFade,e.isAi110),this.lastDisableFade=e.disableFade,this.lastIsAi110=e.isAi110);let t=this.menuOptions[0];if(e.fade!=="NONE"){if(e.isAi110){let o=e.fade==="IN"?"IN_110":"OUT_110";t=this.menuOptions.find(_=>_.value===o)??this.menuOptions[0];}else t=this.menuOptions.find(o=>o.value===e.fade)??this.menuOptions[0];}
821else if(typeof e.level=="string"&&e.level.startsWith("CUSTOM_")){let o=parseFloat(e.level.substring(7)),_=isNaN(o)?100:Math.round(o*100);t=new Cr(e.level,`${_}%`);}else e.level!=="NONE"&&(t=this.menuOptions.find(o=>o.value===e.level)??this.menuOptions[0]);let n=t?.name;if(e.sequenceFromVal!==null&&e.sequenceToVal!==null&&e.fade!=="NONE"){let o=Math.round(e.sequenceFromVal*100),_=Math.round(e.sequenceToVal*100);n=`${o}% - ${_}%`;}this.selectedOption=new Cr(t?.value,n,e.isAutoZoomed?"videomaker-auto-zoomed":void 0,e.isAutoZoomed?"img/icon-library/ai/ai-stroke-small.svg":t?.sideIconClass);});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}buildMenuOptions(e,t){let n=[new Cr("None","None",void 0,void 0,()=>{this.sceneService.setZoomLevel("NONE");}),new Kf(),new Xf("Close-up"),new Cr("110","110%",void 0,void 0,()=>this.sceneService.setZoomLevel("110")),new Cr("120","120%",void 0,void 0,()=>this.sceneService.setZoomLevel("120")),new Cr("130","130%",void 0,void 0,()=>this.sceneService.setZoomLevel("130")),new Kf(),new Xf("In/Out Effect")];return t&&n.push(new Cr("IN_110","100% - 110%","in-out-icon disabled-option","img/icon-library/video-maker/layouts/zoom-in-small.svg",void 0),new Cr("OUT_110","110% - 100%","in-out-icon-out disabled-option","img/icon-library/video-maker/layouts/zoom-out-small.svg",void 0)),n.push(new Cr("IN","100% - 120%",e?"in-out-icon disabled-option":"in-out-icon","img/icon-library/video-maker/layouts/zoom-in-small.svg",e?void 0:()=>this.sceneService.setZoomFade("IN")),new Cr("OUT","120% - 100%",e?"in-out-icon-out disabled-option":"in-out-icon-out","img/icon-library/video-maker/layouts/zoom-out-small.svg",e?void 0:()=>this.sceneService.setZoomFade("OUT"))),n;}static{this.ɵfac=function(t){return new(t||i)(ut(eo));};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-zoom"]],standalone:!0,features:[Ft],decls:4,vars:3,consts:[[1,"component-title"],[4,"ngIf"],[1,"zoom-container"],[3,"selectedOption","menuOptions","contentStyle","toggleMenuIconClass","variant","size","customClass"],["variant","half-filled-royal","size","md",3,"onClick","iconOnly","customClass"]],template:function(t,n){t&1&&(be(0,"div",0),lt(1,"Zoom"),Oe(),at(2,wA,4,10,"ng-container",1),qi(3,"async")),t&2&&(Ce(2),ke("ngIf",Qi(3,1,n.viewModel$)));},dependencies:[ui,ir,Dc,mh],styles:['[_nghost-%COMP%]{display:block;height:100%}.scene-editor[_ngcontent-%COMP%]{font-family:Inter;font-weight:400;-webkit-user-select:none;user-select:none;height:100%;background-color:#fff;padding:16px;min-width:691px}.scene-editor-overlay[_ngcontent-%COMP%]{position:absolute;width:570px;height:212px;z-index:1;cursor:not-allowed}.scene-title[_ngcontent-%COMP%]{color:#253658;font-family:Inter;font-weight:700;font-size:16px;line-height:normal;letter-spacing:.16px}.scene-editor-components[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;grid-template-rows:1fr 1fr;gap:0px 63px;grid-template-areas:"layouts layouts" "zoom logo";height:192px}.layout-component[_ngcontent-%COMP%]{grid-area:layouts;justify-self:start;align-self:start}.zoom-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:zoom}.logo-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:logo}.component-title[_ngcontent-%COMP%]{margin-top:12px;color:#253658;font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:19.6px}.zoom-container[_ngcontent-%COMP%]{margin-top:6px;display:flex;justify-content:flex-start;align-items:center;gap:6px}.zoom-container[disabled=true][_ngcontent-%COMP%]{opacity:.3;pointer-events:none} .zoom-container ui-dropdown-menu .videomaker-zoom-menu-dropdown{width:176px!important} .zoom-container ui-dropdown-menu .videomaker-auto-zoomed img{filter:brightness(0) saturate(100%) invert(37%) sepia(59%) saturate(2151%) hue-rotate(210deg) brightness(108%) contrast(98%)!important} .videomaker-zoom-menu-dropdown-content{width:182px!important;max-width:182px!important;min-width:182px!important} .videomaker-zoom-menu-dropdown-content button{height:32px!important;min-height:32px!important;border-bottom:unset!important} .videomaker-zoom-menu-dropdown-content button .in-out-icon img{border-radius:unset!important} .videomaker-zoom-menu-dropdown-content button.disabled-option{opacity:.4;pointer-events:none;cursor:default} .zoom-container ui-button .auto-zoom-button .ai-stroke-icon{filter:brightness(0) saturate(100%) invert(37%) sepia(59%) saturate(2151%) hue-rotate(210deg) brightness(108%) contrast(98%)!important} .zoom-container ui-button .auto-zoom-button .symbol-redo-icon{filter:brightness(0) saturate(100%) invert(37%) sepia(59%) saturate(2151%) hue-rotate(210deg) brightness(108%) contrast(98%)!important}']});}}return i;})();mt();qu();Ki();fh();hi();kv();mt();fh();function EA(i,r){if(i&1){let e=_t();be(0,"ui-button",9),Ze("onClick",function(){$e(e);let n=Le(2);return We(n.addLogo.emit());}),Oe();}i&2&&ke("iconOnly","symbol-add-icon")("customClass","logo-add-button");}function xA(i,r){i&1&&tt(0,"img",13);}function TA(i,r){if(i&1){let e=_t();be(0,"div",10)(1,"ui-button",11),Ze("onClick",function(n){$e(e);let o=Le().ngIf,_=Le();return We(o.logoVisible?_.addLogo.emit():_.onSetLogoVisibility(n,!o.logoVisible));}),Oe(),at(2,xA,1,0,"img",12),Oe();}if(i&2){let e=Le().ngIf;Ce(),ke("iconOnlyImg",e.url)("customClass","logo-edit-button"+(e.logoVisible?" logo-button-selected":"")),Ce(),ke("ngIf",e.logoVisible);}}function CA(i,r){if(i&1){let e=_t();be(0,"div",14)(1,"span"),lt(2,"Apply to all scenes?"),Oe(),be(3,"div",15)(4,"button",16),lt(5," No "),Oe(),be(6,"button",17),Ze("click",function(){$e(e);let n=Le(2);return We(n.applyToAll.emit());}),lt(7," Yes "),Oe()()();}if(i&2){let e=Le().ngIf;Li("margin-left",e.logoVisible?"0px":"-50px"),ke("@fadeInDelay",void 0);}}function OA(i,r){if(i&1){let e=_t();be(0,"div",18),lt(1," Size "),be(2,"div",19)(3,"input",20),Ze("ngModelChange",function(n){$e(e);let o=Le(2);return We(o.sizeChange.emit(n));}),Oe()()();}if(i&2){let e=Le().ngIf;Ce(3),ke("min",e.sizeRange.min)("max",e.sizeRange.max)("ngModel",e.size);}}function PA(i,r){if(i&1){let e=_t();ti(0),be(1,"div",2)(2,"div",3)(3,"ui-button",4),Ze("onClick",function(n){let o=$e(e).ngIf,_=Le();return We(_.onSetLogoVisibility(n,!o.logoVisible));}),Oe(),at(4,EA,1,2,"ui-button",5)(5,TA,3,3,"div",6)(6,CA,8,3,"div",7)(7,OA,4,3,"div",8),Oe()(),ii();}if(i&2){let e=r.ngIf,t=Le();Ce(3),ke("iconOnly","logo-hide-icon")("customClass","logo-hide-button"+(e.logoVisible?"":" logo-button-selected"))("disabled",!e.hasLogo),Ce(),ke("ngIf",!e.hasLogo),Ce(),ke("ngIf",e.hasLogo),Ce(),ke("ngIf",t.tooltipVisible),Ce(),ke("ngIf",e.logoVisible&&e.showSize);}}var cu=(()=>{class i{constructor(e){this.changeDetectorRef=e,this.visibilityChange=new Mi(),this.addLogo=new Mi(),this.applyToAll=new Mi(),this.sizeChange=new Mi(),this.tooltipVisible=!1,this.unsubscribe$=new Yt();}onSetLogoVisibility(e,t){e.stopPropagation(),this.visibilityChange.emit(t),this.openApplyAllPrompt();}openApplyAllPrompt(){this.tooltipVisible=!0,this.changeDetectorRef.markForCheck(),this.tooltipDismissal?.unsubscribe(),this.tooltipDismissal=_o(0).pipe(Qd(()=>$a(document,"click")),zr(1),Pt(this.unsubscribe$)).subscribe(()=>{this.tooltipVisible=!1,this.changeDetectorRef.markForCheck();});}
821ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(Ks));};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-logo"]],inputs:{viewModel:"viewModel"},outputs:{visibilityChange:"visibilityChange",addLogo:"addLogo",applyToAll:"applyToAll",sizeChange:"sizeChange"},standalone:!0,features:[Ft],decls:3,vars:1,consts:[[1,"component-title"],[4,"ngIf"],[1,"logo-container"],[1,"logo-buttons"],["variant","half-filled-royal","size","md",3,"onClick","iconOnly","customClass","disabled"],["variant","half-filled-royal","size","md",3,"iconOnly","customClass","onClick",4,"ngIf"],["class","logo-edit-button-container",4,"ngIf"],["class","apply-to-all-tooltip",3,"margin-left",4,"ngIf"],["class","size-slider",4,"ngIf"],["variant","half-filled-royal","size","md",3,"onClick","iconOnly","customClass"],[1,"logo-edit-button-container"],["variant","half-filled-royal","size","md",3,"onClick","iconOnlyImg","customClass"],["class","edit-button-hover-icon","src","/img/icon-library/basic-ui/edit-small-stroke.svg","draggable","false","alt","image",4,"ngIf"],["src","/img/icon-library/basic-ui/edit-small-stroke.svg","draggable","false","alt","image",1,"edit-button-hover-icon"],[1,"apply-to-all-tooltip"],[1,"tooltip-buttons"],[1,"tooltip-discard-button"],[1,"tooltip-approve-button",3,"click"],[1,"size-slider"],[1,"size-slider-inner"],["type","range",1,"range-slider",3,"ngModelChange","min","max","ngModel"]],template:function(t,n){t&1&&(be(0,"div",0),lt(1,"Logo"),Oe(),at(2,PA,8,7,"ng-container",1)),t&2&&(Ce(2),ke("ngIf",n.viewModel));},dependencies:[ui,ph,ch,hh,uh,dh,mh],styles:['[_nghost-%COMP%]{display:block;height:100%}.scene-editor[_ngcontent-%COMP%]{font-family:Inter;font-weight:400;-webkit-user-select:none;user-select:none;height:100%;background-color:#fff;padding:16px;min-width:691px}.scene-editor-overlay[_ngcontent-%COMP%]{position:absolute;width:570px;height:212px;z-index:1;cursor:not-allowed}.scene-title[_ngcontent-%COMP%]{color:#253658;font-family:Inter;font-weight:700;font-size:16px;line-height:normal;letter-spacing:.16px}.scene-editor-components[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;grid-template-rows:1fr 1fr;gap:0px 63px;grid-template-areas:"layouts layouts" "zoom logo";height:192px}.layout-component[_ngcontent-%COMP%]{grid-area:layouts;justify-self:start;align-self:start}.zoom-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:zoom}.logo-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:logo}.component-title[_ngcontent-%COMP%]{margin-top:12px;color:#253658;font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:19.6px}[_nghost-%COMP%]{display:block;padding-top:12px}.component-title[_ngcontent-%COMP%]{margin-top:0}.logo-container[_ngcontent-%COMP%]{margin-top:6px}.logo-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:8px}.add-button[_ngcontent-%COMP%]{display:none;margin-top:5px;padding:10px;justify-content:center;align-items:center;gap:4px;width:148px;height:40px;background:#4481fd;color:#fff;border-radius:10px;font-family:Inter-Bold;font-weight:700;font-size:12px}.add-button[_ngcontent-%COMP%]:hover{cursor:pointer}.logo-edit-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.logo-edit-button-container[_ngcontent-%COMP%]:hover .edit-button-hover-icon[_ngcontent-%COMP%]{display:block}.edit-button-hover-icon[_ngcontent-%COMP%]{display:none;position:absolute;pointer-events:none;filter:brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(2%) hue-rotate(186deg) brightness(109%) contrast(101%)} .logo-container ui-button .add-logo-button .add-logo-icon{filter:brightness(0) saturate(100%) invert(37%) sepia(59%) saturate(2151%) hue-rotate(210deg) brightness(108%) contrast(98%)!important} .logo-container ui-button .logo-hide-button{padding:0!important;width:40px!important} .logo-container ui-button .logo-hide-icon{width:40px!important;height:40px!important;background-size:40px 40px!important} .logo-container ui-button .logo-add-button{border-style:dashed!important;border-color:#7b8db199!important;border-width:1px!important} .logo-container ui-button .logo-edit-button{border-style:solid!important;border-color:#7b8db199!important;border-width:1px!important;width:40px!important} .logo-container ui-button .logo-button-selected{border:2px solid #4481FD!important}.size-slider[_ngcontent-%COMP%]{grid-area:size;font-family:Inter-Regular;font-weight:400;font-size:12px;color:#253658;display:flex;align-items:center;column-gap:7px}.size-slider-inner[_ngcontent-%COMP%]{width:121px;height:25px;border-radius:10px;background-color:#fff}.range-slider[_ngcontent-%COMP%]{margin-top:14px;margin-left:7px;appearance:none;width:105px;height:0px;border-radius:2px;border:1px solid rgba(123,141,177,.6)}.range-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;width:24px;height:16px;border-radius:10px;background:#4481fd;cursor:pointer}.range-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:24px;height:16px;border-radius:10px;background:#4481fd;cursor:pointer}.range-slider[_ngcontent-%COMP%]::-ms-thumb{appearance:none;width:24px;height:16px;border-radius:10px;background:#4481fd;cursor:pointer}.apply-to-all-tooltip-background[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;z-index:98;top:0;left:0}.apply-to-all-tooltip[_ngcontent-%COMP%]{margin-top:-132px;margin-left:0;z-index:999;position:absolute;width:144px;height:70px;border-radius:10px;box-shadow:0 0 3px #383636db;display:flex;flex-direction:column;align-items:center;font-family:Inter-Regular;font-weight:400;font-size:12px;padding:10px;background:linear-gradient(266deg,#091519 45%,#404040);color:#fff}.apply-to-all-tooltip[_ngcontent-%COMP%]:after{content:" ";width:0;height:0;position:absolute;
821left:45%;top:100%;transform:rotate(180deg);border-width:5px;border-style:solid;border-color:transparent transparent #000 transparent}.tooltip-buttons[_ngcontent-%COMP%]{display:flex;margin-top:10px}.tooltip-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_scale-down .4s cubic-bezier(.25,.46,.45,.94) both}.tooltip-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{opacity:.7}.tooltip-discard-button[_ngcontent-%COMP%]{width:42px;height:22px;border-radius:6px;background-color:#fff;margin-right:6px;font-family:Inter-Regular;font-weight:400;font-size:12px}.tooltip-approve-button[_ngcontent-%COMP%]{width:42px;height:22px;border-radius:6px;background-color:#4481fd;margin-left:6px;font-family:Inter-Regular;font-weight:400;font-size:12px}@keyframes _ngcontent-%COMP%_scale-down{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.95);transform:scale(.95)}}'],data:{animation:[Da("fadeInDelay",[ga(":enter",[so({opacity:0}),ma("200ms 300ms",so({opacity:1}))])])]}});}}return i;})();qu();Ki();hi();mt();function IA(i,r){if(i&1){let e=_t();be(0,"div",9)(1,"span"),lt(2,"Apply to all scenes?"),Oe(),be(3,"div",10)(4,"button",11),lt(5,"No"),Oe(),be(6,"button",12),Ze("click",function(n){$e(e);let o=Le().$implicit,_=Le(2);return We(_.onApplyAll(n,o.key));}),lt(7,"Yes"),Oe()()();}i&2&&ke("@fadeInDelay",void 0);}function kA(i,r){if(i&1){let e=_t();be(0,"div",4),Ze("click",function(n){let o=$e(e).$implicit,_=Le().ngIf,E=Le();return We(E.onLayoutClick(n,o.key,_));}),be(1,"div",5),tt(2,"img",6),Oe(),be(3,"span",7),lt(4),Oe(),at(5,IA,8,1,"div",8),Oe();}if(i&2){let e=r.$implicit,t=Le().ngIf,n=Le();Di("tooltip-active",n.tooltipLayout===e.key),Ei("selected",t.selectedLayout==e.key)("disabled",t.disableAll||!t.availableLayouts[e.key]),Ce(2),ke("src","/img/composer-icons/layouts/"+e.icon,An),Ce(2),_i(e.title),Ce(),ke("ngIf",n.tooltipLayout===e.key);}}function AA(i,r){if(i&1&&(be(0,"div",2),at(1,kA,6,7,"div",3),Oe()),i&2){let e=r.ngIf;Ce(),ke("ngForOf",e.layouts);}}var WS=(()=>{class i{constructor(e){this.sceneService=e,this.tooltipLayout=null,this.unsubscribe$=new Yt();}ngOnInit(){this.viewModel$=this.sceneService.sceneLayoutsViewModel$;}onLayoutClick(e,t,n){t!==n.selectedLayout&&(e.stopPropagation(),this.sceneService.setSceneLayout(t),n.scenesCount>1&&(this.tooltipLayout=t,$a(document,"click").pipe(Pt(this.unsubscribe$),zr(1)).subscribe(()=>{this.tooltipLayout=null;})));}onApplyAll(e,t){e.stopPropagation(),this.sceneService.applyLayoutOnAllScenes(t),this.tooltipLayout=null;}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}static{this.ɵfac=function(t){return new(t||i)(ut(eo));};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-layout"]],standalone:!0,features:[Ft],decls:4,vars:3,consts:[[1,"component-title"],["class","layout-items",4,"ngIf"],[1,"layout-items"],["class","layout-item",3,"tooltip-active","click",4,"ngFor","ngForOf"],[1,"layout-item",3,"click"],[1,"layout-item-icon"],["draggable","false","alt","image",3,"src"],[1,"layout-item-title"],["class","apply-to-all-tooltip",4,"ngIf"],[1,"apply-to-all-tooltip"],[1,"tooltip-buttons"],[1,"tooltip-discard-button"],[1,"tooltip-approve-button",3,"click"]],template:function(t,n){t&1&&(be(0,"div",0),lt(1,"Layout"),Oe(),at(2,AA,2,1,"div",1),qi(3,"async")),t&2&&(Ce(2),ke("ngIf",Qi(3,1,n.viewModel$)));},dependencies:[ui,an,ir],styles:['[_nghost-%COMP%]{display:block;height:100%}.scene-editor[_ngcontent-%COMP%]{font-family:Inter;font-weight:400;-webkit-user-select:none;user-select:none;height:100%;background-color:#fff;padding:16px;min-width:691px}.scene-editor-overlay[_ngcontent-%COMP%]{position:absolute;width:570px;height:212px;z-index:1;cursor:not-allowed}.scene-title[_ngcontent-%COMP%]{color:#253658;font-family:Inter;font-weight:700;font-size:16px;line-height:normal;letter-spacing:.16px}.scene-editor-components[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;grid-template-rows:1fr 1fr;gap:0px 63px;grid-template-areas:"layouts layouts" "zoom logo";height:192px}.layout-component[_ngcontent-%COMP%]{grid-area:layouts;justify-self:start;align-self:start}
821.zoom-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:zoom}.logo-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:logo}.component-title[_ngcontent-%COMP%]{margin-top:12px;color:#253658;font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:19.6px}.layout-items[_ngcontent-%COMP%]{display:flex;column-gap:10px;justify-content:center;align-items:center;margin-top:6px}.layout-item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;cursor:pointer}.layout-item[_ngcontent-%COMP%]:not(.layout-item-selected):not(.tooltip-active):hover{animation:_ngcontent-%COMP%_animation-scale-down-center .4s cubic-bezier(.25,.46,.45,.94) both}.layout-item[disabled=true][_ngcontent-%COMP%]{opacity:.3;pointer-events:none}.layout-item[selected=true][_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-of-type{border:3px solid #4481FD}.layout-item-icon[_ngcontent-%COMP%]{width:86px;height:56px;background:#fff;border:2px solid rgba(37,54,88,.1490196078);border-radius:12px;display:flex;justify-content:center;align-items:center}.layout-item-title[_ngcontent-%COMP%]{font-family:Inter;font-weight:400;font-size:12px;color:#253658;line-height:16.8px;margin-top:4px}@keyframes _ngcontent-%COMP%_animation-scale-down-center{0%{transform:scale(1)}to{transform:scale(.95)}}.apply-to-all-tooltip[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translate(-50%);z-index:999;width:144px;height:70px;border-radius:10px;box-shadow:0 0 3px #383636db;display:flex;flex-direction:column;align-items:center;font-family:Inter-Regular;font-weight:400;font-size:12px;padding:10px;background:linear-gradient(266deg,#091519 45%,#404040);color:#fff}.apply-to-all-tooltip[_ngcontent-%COMP%]:after{content:" ";width:0;height:0;position:absolute;left:50%;transform:translate(-50%);top:100%;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.tooltip-buttons[_ngcontent-%COMP%]{display:flex;margin-top:10px}.tooltip-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{animation:_ngcontent-%COMP%_scale-down .4s cubic-bezier(.25,.46,.45,.94) both}.tooltip-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{opacity:.7}.tooltip-discard-button[_ngcontent-%COMP%]{width:42px;height:22px;border-radius:6px;background-color:#fff;margin-right:6px;font-family:Inter-Regular;font-weight:400;font-size:12px;border:none;cursor:pointer}.tooltip-approve-button[_ngcontent-%COMP%]{width:42px;height:22px;border-radius:6px;background-color:#4481fd;margin-left:6px;font-family:Inter-Regular;font-weight:400;font-size:12px;border:none;cursor:pointer}@keyframes _ngcontent-%COMP%_scale-down{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.95);transform:scale(.95)}}'],data:{animation:[Da("fadeInDelay",[ga(":enter",[so({opacity:0}),ma("200ms 300ms",so({opacity:1}))])])]}});}}return i;})();mt();function MA(i,r){i&1&&tt(0,"div",8);}function RA(i,r){i&1&&tt(0,"scene-layout",9);}function LA(i,r){i&1&&tt(0,"scene-zoom",10);}function DA(i,r){if(i&1){let e=_t();be(0,"scene-logo",11),qi(1,"async"),Ze("visibilityChange",function(n){$e(e);let o=Le(2);return We(o.sceneService.setLogoVisibility(n));})("addLogo",function(){$e(e);let n=Le(2);return We(n.sceneService.openAddLogoDialog());})("applyToAll",function(){$e(e);let n=Le(2);return We(n.sceneService.applyLogoSettingsOnAllScenes());})("sizeChange",function(n){$e(e);let o=Le(2);return We(o.sceneService.setLogoSize(n));}),Oe();}if(i&2){let e=Le(2);ke("viewModel",Qi(1,1,e.logoViewModel$));}}function NA(i,r){if(i&1&&(be(0,"div",1),at(1,MA,1,0,"div",2),qi(2,"async"),be(3,"div",3),lt(4),qi(5,"number"),Oe(),be(6,"div",4),at(7,RA,1,0,"scene-layout",5)(8,LA,1,0,"scene-zoom",6)(9,DA,2,3,"scene-logo",7),Oe()()),i&2){let e=r.ngIf,t=Le();Ce(),ke("ngIf",!e.active||Qi(2,5,t.videoSlidesService.setPreviewDisabledOnLoadingVideo$)),Ce(3),hn("Scene ",Ec(5,7,e.index+1,"2.0"),""),Ce(3),ke("ngIf",e.showLayout),Ce(),ke("ngIf",e.showZoom),Ce(),ke("ngIf",e.showLogo);}}var qS=(()=>{class i{constructor(e,t){this.sceneService=e,this.videoSlidesService=t;}ngOnInit(){this.viewModel$=this.sceneService.sceneEditorViewModel$,this.logoViewModel$=this.sceneService.sceneLogoViewModel$;}static{this.ɵfac=function(t){return new(t||i)(ut(eo),ut(Xi));};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-editor-v1"]],standalone:!0,features:[Ft],decls:2,vars:3,consts:[["class","scene-editor",4,"ngIf"],[1,"scene-editor"],["class","scene-editor-overlay",4,"ngIf"],[1,"scene-title"],[1,"scene-editor-components"],["class","layout-component",4,"ngIf"],["class","zoom-component",4,"ngIf"],["class","logo-component",3,"viewModel","visibilityChange","addLogo","applyToAll","sizeChange",4,"ngIf"],[1,"scene-editor-overlay"],[1,"layout-component"],[1,"zoom-component"],[1,"logo-component",3,"visibilityChange","addLogo","applyToAll","sizeChange","viewModel"]],template:function(t,n){t&1&&(at(0,NA,10,10,"div",0),qi(1,"async")),t&2&&ke("ngIf",Qi(1,1,n.viewModel$));},dependencies:[ui,WS,cu,$S,ir,lh],styles:['[_nghost-%COMP%]{display:block;height:100%}
821.scene-editor[_ngcontent-%COMP%]{font-family:Inter;font-weight:400;-webkit-user-select:none;user-select:none;height:100%;background-color:#fff;padding:16px;min-width:691px}.scene-editor-overlay[_ngcontent-%COMP%]{position:absolute;width:570px;height:212px;z-index:1;cursor:not-allowed}.scene-title[_ngcontent-%COMP%]{color:#253658;font-family:Inter;font-weight:700;font-size:16px;line-height:normal;letter-spacing:.16px}.scene-editor-components[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;grid-template-rows:1fr 1fr;gap:0px 63px;grid-template-areas:"layouts layouts" "zoom logo";height:192px}.layout-component[_ngcontent-%COMP%]{grid-area:layouts;justify-self:start;align-self:start}.zoom-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:zoom}.logo-component[_ngcontent-%COMP%]{width:238px;height:78px;grid-area:logo}.component-title[_ngcontent-%COMP%]{margin-top:12px;color:#253658;font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:19.6px}']});}}return i;})();mt();hi();mt();Bn();Oc();Or();mt();var VA=.175,Yp=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.composerSlideSelectionService=ct(Rn),this.dialog=ct(Ja),this.eventsService=ct(Ji
821),this.composerEventsService=ct(en),this.logoUrl=xt(()=>{let e=this.sliderV2StoryService.story()?.logo;return e?.url??e?.asset?.resource?.url;}),this.hasLogo=xt(()=>!!this.sliderV2StoryService.story()?.logo?.assetId),this.currentSceneLogoVisible=xt(()=>{let e=this.composerSlideSelectionService.index();return this.hasLogo()&&this.sliderV2StoryService.story()?.media?.[e]?.logoEnabled===!0;});}openPicker(){let e=new O_();e.assetType="image",e.assetSubType="logo",e.allowedMediaTypesOptions=[new Cr("image","Image")],e.level="desk,system";let t=this.dialog.open(Gh,{backdropClass:"backdropBackground",panelClass:"assets-uploads-library-modal-dialog",data:e});return this.composerEventsService.log(this.eventsService.events.composer.logoStart),new Promise(n=>{let o=!1;e.onSubmit=_=>{o=!0,t.close(),n(this.applyPickedAsset(_));},e.onClose=()=>t.close(),t.afterClosed().subscribe(()=>{o||(o=!0,this.composerEventsService.log(this.eventsService.events.composer.logoCancel),n(!1));});});}setCurrentSceneLogoVisible(e){return this.hasLogo()?(this.sliderV2StoryService.setSlideLogoEnabled(this.composerSlideSelectionService.index(),e),!0):!1;}applyCurrentSceneToAllScenes(){if(!this.hasLogo())return;let e=this.currentSceneLogoVisible();this.sliderV2StoryService.setAllSlidesLogoEnabled(e),this.composerEventsService.log(this.eventsService.events.composer.logoApplyAll,{logoId:this.sliderV2StoryService.story()?.logo?.assetId,visible:e.toString()});}applyPickedAsset(e){let t=e?.resource?.url;if(!e?.assetId||!t)return!1;let n=this.sliderV2StoryService.story()?.logo,o=!n?.assetId;return this.sliderV2StoryService.setLogo({assetId:e.assetId,size:n?.size??VA,url:t,asset:{assetId:e.assetId,resource:{url:t}}},this.composerSlideSelectionService.index()),this.composerEventsService.log(this.eventsService.events.composer.logoSave,{logoId:e.assetId}),o;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();hi();_r();mt();hi();function jA(i,r){i&1&&tt(0,"scene-layouts-shimmer");}function BA(i,r){if(i&1&&(be(0,"p",13),lt(1),Oe()),i&2){let e=Le();Ce(),_i(e.error());}}function FA(i,r){i&1&&(be(0,"p",14),li(1,2),Oe());}function UA(i,r){i&1&&(be(0,"p",14),li(1,3),Oe());}function GA(i,r){if(i&1&&tt(0,"layout-apply-note",19),i&2){let e=r.highlighted,t=Le().$implicit,n=Le(2);ke("text",n.noteFor(t.target,e))("texts",n.notesFor(t.target));}}function zA(i,r){if(i&1){let e=_t();be(0,"lib-layout-banner",17),Ze("selectedChange",function(){let n=$e(e).$implicit,o=Le(2);return We(o.onTargetSelected(n.target));})("menuSelect",function(n){let o=$e(e).$implicit,_=Le(2);return We(_.onMenuSelect(o.target,n));}),at(1,GA,1,2,"ng-template",18),Oe();}if(i&2){let e=r.$implicit,t=Le(2);ke("iconContent",e.glyph)("title",e.label)("subtitle",e.styleName)("value",e.target)("selected",e.selected)("preserveIconColor",!0)("menuOptions",e.menuOptions)("menuTitle",e.menuTitle)("menuValue",t.menuValue)("menuShowSeparators",!1);}}function HA(i,r){if(i&1&&(be(0,"div",15),at(1,zA,2,10,"lib-layout-banner",16),Oe()),i&2){let e=Le();Ce(),ke("ngForOf",e.tiles())("ngForTrackBy",e.trackByTarget);}}var YS=(()=>{class i{constructor(){this.seeAllClicked=new Mi(),this.changeTemplateClicked=new Mi(),this.styleFirstPicked=new Mi(),this.composerLayoutsService=ct(ko),this.tiles=xt(()=>this.composerLayoutsService.tiles().filter(e=>e.selected||!e.disabled)),this.loaded=this.composerLayoutsService.loaded,this.hasLayouts=this.composerLayoutsService.hasLayouts,this.error=this.composerLayoutsService.error,this.chevronRightIcon="/img/icon-library/symbols/chevron-right.svg",this.menuValue=xa;}onTargetSelected(e){let t=this.composerLayoutsService.hasSavedStyle(e);this.composerLayoutsService.selectTarget(e)&&!t&&this.styleFirstPicked.emit(e);}onMenuSelect(e,t){t?.value===$m?this.changeTemplateClicked.emit(e):ru(t?.value)&&this.composerLayoutsService.applyToScope({target:e,scope:t.value});}noteFor(e,t){return this.composerLayoutsService.scopeNote({scope:ru(t?.value)?t.value:xa,target:e});}notesFor(e){return this.composerLayoutsService.scopeNotes(e);}trackByTarget(e,t){return t.target;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-layouts-strip"]],outputs:{seeAllClicked:"seeAllClicked",changeTemplateClicked:"changeTemplateClicked",styleFirstPicked:"styleFirstPicked"},standalone:!0,features:[Ft],decls:12,vars:6,consts:()=>{let e;e="Scene layout";let t;t="Layouts";let n;n="All templates";let o;o="No layouts available yet.";let _;_="No layouts fit this scene.";let E;return E="Layout options",[t,n,o,_,[1,"layouts"],[1,"layouts__head"],[1,"layouts__title"],[1,"layouts__actions"],["size","sm","variant","ghost",1,"layouts__see-all",3,"clicked","rightIconContent"],[4,"ngIf"],["class","layouts__error",4,"ngIf"],["class","layouts__empty",4,"ngIf"],["class","layouts__strip","role","radiogroup","aria-label",e,4,"ngIf"],[1,"layouts__error"],[1,"layouts__empty"],["role","radiogroup","aria-label",e,1,"layouts__strip"],["size","md","menuVisibility","hover-or-selected","menuWidth","240px","menuMaxHeight","none","menuAriaLabel",E,3,"iconContent","title","subtitle","value","selected","preserveIconColor","menuOptions","menuTitle","menuValue","menuShowSeparators","selectedChange","menuSelect",4,"ngFor","ngForOf","ngForTrackBy"],["size","md","menuVisibility","hover-or-selected","menuWidth","240px","menuMaxHeight","none","menuAriaLabel",E,3,"selectedChange","menuSelect","iconContent","title","subtitle","value","selected","preserveIconColor","menuOptions","menuTitle","menuValue","menuShowSeparators"],["libDropdownMenuFooterTpl",""],[3,"text","texts"]];},template:function(t,n){t&1&&(be(0,"div",4)(1,"div",5)(2,"span",6),li(3,0),Oe(),be(4,"div",7)(5,"lib-button",8),Ze("clicked",function(){return n.seeAllClicked.emit
821();}),li(6,1),Oe()()(),at(7,jA,1,0,"scene-layouts-shimmer",9)(8,BA,2,1,"p",10)(9,FA,2,0,"p",11)(10,UA,2,0,"p",11)(11,HA,2,2,"div",12),Oe()),t&2&&(Ce(5),ke("rightIconContent",n.chevronRightIcon),Ce(2),ke("ngIf",!n.loaded()),Ce(),ke("ngIf",n.loaded()&&n.error()),Ce(),ke("ngIf",n.loaded()&&!n.error()&&!n.hasLayouts()),Ce(),ke("ngIf",n.loaded()&&!n.error()&&n.hasLayouts()&&!n.tiles().length),Ce(),ke("ngIf",n.loaded()&&n.tiles().length));},dependencies:[Ci,an,ui,vr,wh,bh,xp,Mp],styles:["[_nghost-%COMP%]{display:block;min-width:0}.layouts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;overflow:hidden}.layouts__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.layouts__title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.14px;color:#253658}.layouts__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}lib-button.layouts__see-all[_ngcontent-%COMP%]{--btn-font-size: 12px;--btn-text-color: #2563EB;--btn-icon-color: #2563EB;--btn-text-color-hover: #2563EB;--btn-icon-color-hover: #2563EB}.layouts__error[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.4;color:#dc2626}.layouts__empty[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.4;color:#4b5563}.layouts__strip[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:flex-start;gap:12px;margin-top:-8px;padding:8px 8px 0 0;overflow-x:auto;scrollbar-width:none;--ddm-menu-radius: 12px;--ddm-menu-padding: 4px}.layouts__strip[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.layouts__strip[_ngcontent-%COMP%] lib-layout-banner[_ngcontent-%COMP%]{flex:none}"],changeDetection:0});}}return i;})();hi();_r();mt();var XS=(()=>{class i{constructor(){this.options=[],this.aiIcon="/img/icon-library/ai/ai-stroke-small.svg";}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-zoom-control"]],standalone:!0,features:[Ft],decls:6,vars:6,consts:()=>{let e;e="None";let t;t="Auto zoom";let n;return n="Zoom",[n,[1,"zoom-block"],[1,"zoom-block__title"],[1,"zoom-block__row"],["type","outside","placeholder",e,1,"zoom-block__dropdown",3,"label","required","options","disabled"],["size","md","variant","tertiary","aria-label",t,1,"zoom-block__ai",3,"iconContent","disabled"]];},template:function(t,n){t&1&&(be(0,"div",1)(1,"span",2),li(2,0),Oe(),be(3,"div",3),tt(4,"lib-dropdown",4)(5,"lib-button-icon",5),Oe()()),t&2&&(Ce(4),ke("label",!1)("required",!1)("options",n.options)("disabled",!0),Ce(),ke("iconContent",n.aiIcon)("disabled",!0));},dependencies:[Ci,Rr,vh],styles:[".zoom-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.zoom-block__title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.14px;color:#253658}.zoom-block__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px}.zoom-block__dropdown[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.zoom-block__ai[_ngcontent-%COMP%]{flex-shrink:0}"],changeDetection:0});}}return i;})();mt();var ag="SidebarLayoutsPanelComponent",KS=(()=>{class i{constructor(){this.composerLayoutsService=ct(ko),this.composerSlideSelectionService=ct(Rn),this.sidebarService=ct(Hr),this.sliderV2LogoService=ct(Yp),this.logoBlock=gv.required(cu),this.sceneNumber=xt(()=>String(this.composerSlideSelectionService.index()+1).padStart(2,"0")),this.logoViewModel=xt(()=>({hasLogo:this.sliderV2LogoService.hasLogo(),url:this.sliderV2LogoService.logoUrl(),logoVisible:this.sliderV2LogoService.currentSceneLogoVisible(),size:void 0,sizeRange:void 0,showSize:!1}));}onSeeAllLayouts(){let e=this.isLayoutsPanelOpen()&&!!this.composerLayoutsService.panelType();this.composerLayoutsService.showPanelType(void 0),e||this.sidebarService.openSidebarModal(ag);}onChangeTemplate(e){this.composerLayoutsService.showPanelType(e),this.isLayoutsPanelOpen()||this.sidebarService.openSidebarModal(ag);}isLayoutsPanelOpen(){return this.sidebarService.openedModalName===ag;}onLogoVisibilityChange(e){this.sliderV2LogoService.setCurrentSceneLogoVisible(e);}onAddLogo(){return kt(this,null,function*(){(yield this.sliderV2LogoService.openPicker())&&this.logoBlock().openApplyAllPrompt();});}onApplyLogoToAll(){this.sliderV2LogoService.applyCurrentSceneToAllScenes();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-editor-v2"]],viewQuery:function(t,n){t&1&&yv(n.logoBlock,cu,5),t&2&&vv();},standalone:!0,features:[Ft],decls:8,vars:2,consts:()=>{let e;return e="Scene "+"\uFFFD0\uFFFD"+"",[e,[1,"scene-editor-v2"],[1,"scene-editor-v2__title"],[1,"scene-editor-v2__row"],[1,"scene-editor-v2__settings"],[1,"scene-editor-v2__logo",3,"visibilityChange","addLogo","applyToAll","viewModel"],[1,"scene-editor-v2__layouts",3,"seeAllClicked","changeTemplateClicked","styleFirstPicked"]];},template:function(t,n){t&1&&(be(0,"div",1)(1,"span",2),li(2,0),Oe(),be(3,"div",3)(4,"div",4)(5,"scene-logo",5),Ze("visibilityChange",function(_){return n.onLogoVisibilityChange(_);})("addLogo",function(){return n.onAddLogo();})("applyToAll",function(){return n.onApplyLogoToAll();}),Oe(),tt(6,"scene-zoom-control"),Oe(),be(7,"scene-layouts-strip",6),Ze("seeAllClicked",function(){return n.onSeeAllLayouts();})("changeTemplateClicked",function(_){return n.onChangeTemplate(_);})("styleFirstPicked",function(_){return n.onChangeTemplate(_);}),Oe()()()),t&2&&(Ce(2),Ys(n.sceneNumber()),Xs(2),Ce(3),ke("viewModel",n.logoViewModel()));},dependencies:[Ci,YS,cu,XS],styles:["[_nghost-%COMP%]{display:block;height:100%}.scene-editor-v2[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;height:100%;padding:20px 45px 32px;background-color:#fff;font-family:Inter,sans-serif;-webkit-user-select:none;user-select:none;box-sizing:border-box}.scene-editor-v2__title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:1.4;letter-spacing:-.16px;color:#253658}.scene-editor-v2__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px;min-width:0}.scene-editor-v2__settings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;flex:0 0 280px;width:280px}.scene-editor-v2__logo[_ngcontent-%COMP%]{padding-top:0}.scene-editor-v2__logo[_ngcontent-%COMP%] .component-title{font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.14px;color:#253658}.scene-editor-v2__layouts[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}"],changeDetection:0});}}return i;})();mt();hi();function $A(i,r){i&1&&tt(0,"scene-editor-v2");}function WA(i,r){i&1&&tt(0,"scene-editor-v1");}var Xp=(()=>{class i{constructor(){this.isSliderV2=Xn()==="v2";}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-editor"]],standalone:!0,features:[Ft],decls:3,vars:2,consts:[["v1Bar",""],[4,"ngIf","ngIfElse"]],template:function(t,n){if(t&1&&at(0,$A,1,0,"scene-editor-v2",1)(1,WA,1,0,"ng-template",null,0,Vi),t&2){let o=mi(2);
821ke("ngIf",n.isSliderV2)("ngIfElse",o);}},dependencies:[Ci,ui,qS,KS],styles:["[_nghost-%COMP%]{display:block;height:242px}"],changeDetection:0});}}return i;})();mt();hi();mt();hi();function qA(i,r){i&1&&tt(0,"img",4);}function YA(i,r){i&1&&tt(0,"img",5);}function XA(i,r){if(i&1){let e=_t();be(0,"button",6),Ze("click",function(){$e(e);let n=Le();return We(n.onClick());}),tt(1,"img",7),Oe();}if(i&2){let e=Le();ke("title",e.notSavedTooltip),Ei("aria-label",e.notSavedTooltip);}}var Kp=(()=>{class i{constructor(){this.status="not-saved",this._lastSavedAt=null,this.notSavedTooltip="Unsaved changes \u2014 click to save now",this.saveNowClick=new Mi();}set lastSavedAt(e){this._lastSavedAt=e,this.notSavedTooltip=this.computeTooltip(e);}get lastSavedAt(){return this._lastSavedAt;}onClick(){this.status==="not-saved"&&this.saveNowClick.emit();}computeTooltip(e){return e?`Unsaved changes \u2014 last saved at ${e.toLocaleTimeString()}. Click to save now.`:"Unsaved changes \u2014 click to save now";}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-save-indicator"]],inputs:{status:"status",lastSavedAt:"lastSavedAt"},outputs:{saveNowClick:"saveNowClick"},standalone:!0,features:[Ft],decls:4,vars:4,consts:[[3,"ngSwitch"],["class","composer-save-indicator__icon composer-save-indicator__icon--spinning","src","/img/icon-library/symbols/retry-reload.svg","alt","Saving","title","Saving...",4,"ngSwitchCase"],["class","composer-save-indicator__icon","src","/img/icon-library/status/saved-small.svg","alt","All changes saved","title","All changes saved",4,"ngSwitchCase"],["type","button","class","composer-save-indicator__icon composer-save-indicator__icon--not-saved",3,"title","click",4,"ngSwitchCase"],["src","/img/icon-library/symbols/retry-reload.svg","alt","Saving","title","Saving...",1,"composer-save-indicator__icon","composer-save-indicator__icon--spinning"],["src","/img/icon-library/status/saved-small.svg","alt","All changes saved","title","All changes saved",1,"composer-save-indicator__icon"],["type","button",1,"composer-save-indicator__icon","composer-save-indicator__icon--not-saved",3,"click","title"],["src","/img/icon-library/status/not-saved-stroke.svg","alt","",1,"composer-save-indicator__icon-img"]],template:function(t,n){t&1&&(ti(0,0),at(1,qA,1,0,"img",1)(2,YA,1,0,"img",2)(3,XA,2,2,"button",3),ii()),t&2&&(ke("ngSwitch",n.status),Ce(),ke("ngSwitchCase","saving"),Ce(),ke("ngSwitchCase","saved"),Ce(),ke("ngSwitchCase","not-saved"));},dependencies:[Ci,Xa,Ka],styles:[".composer-save-indicator__icon[_ngcontent-%COMP%]{display:inline-block;width:24px;height:24px;vertical-align:middle}.composer-save-indicator__icon--spinning[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_composer-save-spin 1s linear infinite}@keyframes _ngcontent-%COMP%_composer-save-spin{to{transform:rotate(360deg)}}.composer-save-indicator__icon--not-saved[_ngcontent-%COMP%]{border:0;padding:0;background:none;cursor:pointer}.composer-save-indicator__icon--not-saved[_ngcontent-%COMP%]:focus-visible{outline:2px solid currentColor;outline-offset:2px}.composer-save-indicator__icon--not-saved[_ngcontent-%COMP%] .composer-save-indicator__icon-img[_ngcontent-%COMP%]{width:100%;height:100%;display:block}"]});}}return i;})();mt();_a();La();Or();o_();Xu();Js();Na();hi();xh();var QA=()=>[];function JA(i,r){i&1&&(ti(0),tt(1,"sidebar"),be(2,"div",9),tt(3,"info-panel")(4,"composer-video-slider-wrapper"),Oe(),tt(5,"scene-editor")(6,"composer-agent-sidebar"),ii());}var pd=(()=>{class i{constructor(e,t,n,o,_,E,x,h,y,b,p,c,d,m,a,s,l,g,f){this.storyService=e,this.videoSlidesService=t,this.undoRedoService=n,this.dialogHelperService=o,this.savePromptGuardService=_,this.styleVideoService=E,this.route=x,this.router=h,this.composerHttpService=y,this.composerService=b,this.eventsService=p,this.paymentService=c,this.premiumPlanService=d,this.planHelperService=m,this.composerEventsService=a,this.ngxSpinner=s,this.location=l,this.mediaUtilityService=g,this.websocketService=f,this.tutorialCourseId="65e6e55b3550d51d41d5258a",this.tutorialLessonId="",this.tutorialBtnStyle=zh.white,this.tutorialBtnCustomStyle={height:"40px",width:"90px"},this.unsubscribe$=new Yt(),this.discardModalFlag=!0,this.goBackLink=["/boards"],this.undoRedoState$=this.undoRedoService.undoRedoButtonsActive$.pipe(oi(O=>O),fa({undoActive:!1,redoActive:!1})),this.undoDisabled$=Vn([this.undoRedoState$,this.undoRedoService.isButtonOnUndoDisabled$.pipe(fa(!1))]).pipe(oi(([{undoActive:O}
821,M])=>M||!O)),this.redoDisabled$=Vn([this.undoRedoState$,this.undoRedoService.isButtonOnUndoDisabled$.pipe(fa(!1))]).pipe(oi(([{redoActive:O},M])=>M||!O)),this.saveStatus$=this.videoSlidesService.savingInfo$.pipe(oi(O=>O.isSaving?"saving":O.successfullySaved?"saved":"not-saved"),Ti()),this.lastSavedAt=null,this.isPublishing=!1,this.isFullscreen=!1,this.fullScreenIconUrl="/img/icon-library/basic-ui/full-screen-enter-stroke.svg",this.exitFullscreenIconUrl="/img/icon-library/basic-ui/full-screen-exit-stroke.svg",this.openDiscardModal=()=>{let O="Do you want to save the changes before you quit?";this.storyService.story.composerSessionState.autoSave=!1,this.dialogHelperService.showUiConfirmationDialog({title:"Save Changes?",msg:O,confirmationText:"Save",cancellationText:"No",onSubmit:this.onConfirmation,onClose:this.onDismiss}),this.composerEventsService.log(this.eventsService.events.composer.savePopup);},this.onDismiss=()=>{this.dialogHelperService.close(),this.savePromptGuardService.discard(),this.storyService.story.composerSessionState.autoSave=!0;},this.onConfirmation=()=>{this.dialogHelperService.close(),this.videoPreviewComponent.saveAndGenerateVideo(!1).then(()=>{this.savePromptGuardService.discard();}),this.composerEventsService.log(this.eventsService.events.composer.saveStory),this.storyService.story.composerSessionState.autoSave=!0;},this.paymentService.checkForSuccessPayment(this.route.snapshot.queryParams).then(O=>{let N=this.route.snapshot.url.map(G=>G.path).join("/");O&&this.location.replaceState(`composer/${N}`);}),this.composerService.fetchMusicList();let v=this.router.getCurrentNavigation()?.extras?.state?.folderId||history.state?.folderId;v&&(this.goBackLink=["/boards",v]);let S,w,C=this.getStoryFromRoute();this.parentStoryId=C.parent?.storyId??(C.type===Lr.COMPOSER?void 0:C.id),this.parentStoryId&&(this.goBackLink=this.parentTakesLink());let I=this.router.getCurrentNavigation()?.extras?.state;I?"source"in I||(C.composerSessionState.bRollFeature=I.features?.bRoll,S=C.videos.find(O=>O.id===I.mediaId),this.composerEventsService.videoDuration=S?.duration,"segmentation"in C&&C.segmentation.length>0&&(w=S&&C.segmentation.find(O=>O.status===2&&O.groupId===S.groupId&&O.sourceLocale===O.locale),this.composerEventsService.originLang=w?.locale)):this.composerEventsService.videoDuration=C.audio?.duration,C.composerSessionState.storyParent=C.parent??{segmentationUrl:w?.url,locale:w?.locale,storyId:C.id,videoId:S?.id,groupId:S?.groupId},C.parent||(this.composerEventsService.takeId=C.composerSessionState.storyParent.videoId,this.composerEventsService.parentStoryId=C.composerSessionState.storyParent.storyId);}ngOnInit(){Tr.isLocal&&typeof window<"u"&&(window.__COMPOSER_E2E__={getStorySnapshot:()=>{let e=this.storyService.story;try{return structuredClone(e);}catch{return JSON.parse(JSON.stringify(e));}}}),this.mediaUtilityService.fullscreenState$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.isFullscreen=e,this.onFullscreen(e);}),this.story=this.getStoryFromRoute(),this.storyHeadline=this.story.headline,this.story.type===Lr.COMPOSER&&(this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0}),this.lastSavedAt=new Date()),this.videoSlidesService.savingInfo$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{e.successfullySaved===!0&&e.isSaving===!1&&(this.lastSavedAt=new Date());}),this.undoRedoService.composerLocalHistory$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{e!==null&&(this.storyHeadline=e.story.headline);}),this.composerHttpService.getThemesList().then(e=>{this.storyService.hotfix_themesListUpdated$.next(e.result);}),this.composerHttpService.getWorkspaceBusinessData().then(e=>{Object.keys(e).length===0&&(e.ownerName=this.story.author?.fullName),this.storyService.hotfix_businessDataUpdated$.next(e);});}ngAfterViewInit(){}getStoryFromRoute(){return this.route.snapshot.data.story;}onUndo(){this.undoRedoService.undo(),this.composerEventsService.log(this.eventsService.events.composer.undoAction),this.videoPreviewComponent.isVDMStudioActive&&this.composerEventsService.log(this.eventsService.events.composer.makerStudioUndo,{slideNum:(this.videoPreviewComponent.selectedSlide.index+1).toString(),takeId:this.composerEventsService.takeId});}onRedo(){this.undoRedoService.redo(),this.composerEventsService.log(this.eventsService.events.composer.redoAction),this.videoPreviewComponent.isVDMStudioActive&&this.composerEventsService.log(this.eventsService.events.composer.makerStudioRedo,{slideNum:(this.videoPreviewComponent.selectedSlide.index+1).toString(),takeId:this.composerEventsService.takeId});}get fullscreenIconUrl(){return this.isFullscreen?this.exitFullscreenIconUrl:this.fullScreenIconUrl;}onFullscreenToggle(){this.mediaUtilityService.showFullscreen(document.documentElement);}onFullscreen(e){e?this.composerEventsService.log(this.eventsService.events.composer.enterFullScreen):this.composerEventsService.log(this.eventsService.events.composer.exitFullScreen);}onBackClick(){this.composerEventsService.log(this.eventsService.events.composer.closeStory),this.router.navigate(this.goBackLink);}
821parentTakesLink(){return["/script-story",this.parentStoryId,"takes"];}onCtaButtonClick(){return kt(this,null,function*(){if(this.isPublishing)return;if(yield this.planHelperService.isFreeByCurrentPlan()){this.ngxSpinner.show("subscription-spinner"),this.videoPreviewComponent.saveAndGenerateVideo(!1).then(()=>{this.ngxSpinner.hide("subscription-spinner");let n=window.location.pathname.replace(/^\/|\/$/g,"");this.premiumPlanService.openPricingDialog(Mc.PRO,n,n,Rc.videoMakerCreate);});return;}let t=this.composerEventsService.buildApplyThemePayload({story:this.story,wrapperThumbnailData:this.videoPreviewComponent.wrapperThumbnailData,lowerThird:this.storyService.isStoryHaveLowerThirdSlides()});this.composerEventsService.log(this.eventsService.events.composer.generateStory,t),this.isPublishing=!0;try{yield this.videoPreviewComponent.saveAndGenerateVideo(!0),this.websocketService.connect();let n=this.story?.folderId,o=this.parentStoryId?this.parentTakesLink():n?["/boards",n]:["/boards"];this.router.navigate(o);}catch{}finally{this.isPublishing=!1;}});}onSaveNowClick(){this.videoPreviewComponent&&(this.videoSlidesService.savingInfo$.next({isSaving:!0}),this.videoPreviewComponent.saveAndGenerateVideo(!1).then(()=>{this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0});}).catch(()=>{this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1});}));}onHeadlineInputValueChange(e){let t=e;this.storyHeadline=t,this.videoSlidesService.storyHeadline$.next(t),this.savePromptGuardService.isDirty.next(!0);}ngOnDestroy(){this.isFullscreen&&this.mediaUtilityService.showFullscreen(document.documentElement),this.unsubscribe$.next(),this.unsubscribe$.complete(),this.storyService.totalRenderedVirtualSlides$.next(50),this.storyService.hotfix_themesListUpdated$.next(void 0),this.storyService.hotfix_businessDataUpdated$.next(void 0),this.composerService.musicListUpdated$.next(void 0),this.composerService.clearMusicCache(),this.styleVideoService.styleSidebarCroppingData$.next(void 0),this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),this.videoSlidesService.playerStatus$.next({isPlaying:!1}),this.videoSlidesService.playerAction$.next({action:"pause"}),this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.next(!1),this.composerService.imageGeneratorState$.next(void 0);}static{this.ɵfac=function(t){return new(t||i)(ut(zi),ut(Xi),ut($c),ut(co),ut(So),ut(is),ut(zo),ut(Co),ut(Yn),ut(nr),ut(Ji),ut(Ih),ut(ts),ut(Po),ut(en),ut(ya),ut(Ya),ut(el),ut(Qs));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-wrapper"]],viewQuery:function(t,n){if(t&1&&fn(Cm,5),t&2){let o;mn(o=gn())&&(n.videoPreviewComponent=o.first);}},standalone:!0,features:[Wn([{provide:Wh,useValue:"v1"},su,eo,as,en,Hr,el,il,cs,Ca,ap]),Ft],decls:13,vars:33,consts:[[3,"backClick","projectTitleChange","undoClick","redoClick","saveClick","projectTitle","placeHolderText","editableTitle","showAIButton","metadata","showSaveButton","saveButtonText","saveButtonLoading","saveButtonDisabled","undoDisabled","redoDisabled"],["slot","right",1,"composer-header-actions"],[3,"featureName","courseId","lessonId","btnStyle","btnCustomStyle"],[3,"saveNowClick","status","lastSavedAt"],["variant","ghost",3,"clicked","iconContent","title"],["name","subscription-spinner","type","none",3,"fullScreen"],[1,"composer-wrapper-container"],[3,"sidebarWidth","infoPanelWidth","sceneEditorHeight","headerHeight"],[4,"ngIf"],["cdkVirtualScrollingElement","",1,"info-panel-slides-container"]],template:function(t,n){t&1&&(be(0,"lib-header-workspace",0),qi(1,"async"),qi(2,"async"),Ze("backClick",function(){return n.onBackClick();})("projectTitleChange",function(_){return n.onHeadlineInputValueChange(_);})("undoClick",function(){return n.onUndo();})("redoClick",function(){return n.onRedo();})("saveClick",function(){return n.onCtaButtonClick();}),be(3,"div",1),tt(4,"tutorial-button",2),be(5,"composer-save-indicator",3),qi(6,"async"),Ze("saveNowClick",function(){return n.onSaveNowClick();}),Oe(),be(7,"lib-button-icon",4),Ze("clicked",function(){return n.onFullscreenToggle();}),Oe()()(),be(8,"ngx-spinner",5),tt(9,"lottie-loader"),Oe(),be(10,"div",6),tt(11,"composer-video-preview",7),at(12,JA,7,0,"ng-container",8),Oe()),t&2&&(ke("projectTitle",n.storyHeadline)("placeHolderText","Project title")("editableTitle",!0)("showAIButton",!1)("metadata",Lo(32,QA))("showSaveButton",!0)("saveButtonText",n.isPublishing?"Creating...":"Create")("saveButtonLoading",n.isPublishing)("saveButtonDisabled",n.isPublishing)("undoDisabled",Qi(1,26,n.undoDisabled$))("redoDisabled",Qi(2,28,n.redo
821Disabled$)),Ce(4),ke("featureName","Video Maker")("courseId",n.tutorialCourseId)("lessonId",n.tutorialLessonId)("btnStyle",n.tutorialBtnStyle)("btnCustomStyle",n.tutorialBtnCustomStyle),Ce(),ke("status",Qi(6,30,n.saveStatus$))("lastSavedAt",n.lastSavedAt),Ce(2),ke("iconContent",n.fullscreenIconUrl)("title",n.isFullscreen?"Exit fullscreen":"Enter fullscreen"),Ce(),ke("fullScreen",!0),Ce(3),ke("sidebarWidth",100)("infoPanelWidth",548)("sceneEditorHeight",244)("headerHeight",56),Ce(),ke("ngIf",n.storyService.story));},dependencies:[ui,ir,_h,Rr,Hh,Kp,Cm,gh,zp,Gp,Hp,Qa,Za,aa,Xp,qp],styles:['[_nghost-%COMP%]{--composer-header-height: 56px;display:flex;flex-direction:column;min-height:calc(100vh - var(--sudo-bar-height, 0px))}lib-header-workspace[_ngcontent-%COMP%]{flex:0 0 auto;border-bottom:1px solid rgba(37,54,88,.0784313725)}.composer-wrapper-container[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;position:relative}.composer-wrapper-container[_ngcontent-%COMP%]{background:linear-gradient(270deg,#f4fbfe 2.37%,#f6f8ff 99.35%);display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:1fr auto;gap:0px 0px;grid-auto-flow:row;grid-template-areas:"actions-sidebar vdm-previewer slides-sidebar" "actions-sidebar scene-editor slides-sidebar"}composer-video-preview[_ngcontent-%COMP%]{grid-area:vdm-previewer}sidebar[_ngcontent-%COMP%]{grid-area:actions-sidebar}.info-panel-slides-container[_ngcontent-%COMP%]{grid-area:slides-sidebar}scene-editor[_ngcontent-%COMP%]{grid-area:scene-editor;align-self:end;border-top:1px solid rgba(37,54,88,.0784313725)}.info-panel-slides-container[_ngcontent-%COMP%]{width:548px;height:calc(100vh - var(--composer-header-height) - var(--sudo-bar-height, 0px));overflow-y:scroll;overflow-x:hidden;padding-bottom:100px;border-left:1px solid rgba(37,54,88,.0784313725);background-color:#fff}.composer-header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}']});}}return i;})();Ki();Mr();mt();hi();La();Os();Or();mt();sa();La();hi();mt();sa();Ki();vn();lo();mt();var eM=6e4,tM=12e4,iM=10,nM=10008,sg=i=>i==="saved"||i==="clean",uu=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.composerHttpService=ct(Yn),this.videoSlidesService=ct(Xi),this.notifier=ct(En),this.destroyRef=ct(ao),this._saved=new Yt(),this.saved$=this._saved.asObservable(),this.discarded=!1,this.savedAtAction=0;let e=Ho(this.sliderV2StoryService.story).pipe(ra(1),sn(()=>this.sliderV2StoryService.isDirty()),qn(this.destroyRef),uv());e.subscribe(()=>{this.markUnsaved(),this.sliderV2StoryService.actionCount()-this.savedAtAction>=iM&&this.autoSave();}),e.pipe(On(eM)).subscribe(()=>void this.autoSave()),e.pipe(lv(()=>_o(tM)),qn(this.destroyRef)).subscribe(()=>void this.autoSave());}markUnsaved(){this.inFlight||this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1});}autoSave(){return this.sliderV2StoryService.isUnsaved()&&!this.sliderV2StoryService.hasUserEdits()?Promise.resolve("skipped"):this.save();}flush(){return this.save(this.sliderV2StoryService.story());}saveNow(){return kt(this,null,function*(){(yield this.flush())==="saved"&&this.notifier.info("Story saved.");});}discardPendingChanges(){this.discarded=!0;}save(e){this.savedAtAction=this.sliderV2StoryService.actionCount();let t=this.inFlight?this.inFlight.then(o=>this.runIfPending(o,e)):this.runIfPending(void 0,e);this.inFlight=t;let n=()=>{this.inFlight===t&&(this.inFlight=void 0);};return t.then(n,n),t;}runIfPending(e,t){return kt(this,null,function*(){if(this.discarded)return"skipped";let n=t?this.sliderV2StoryService.rebaseSnapshot(t):this.sliderV2StoryService.story();if(!this.sliderV2StoryService.hasPendingChangesFor(n)){this.sliderV2StoryService.settleDirty();let o=e??"clean";return sg(o)&&!this.sliderV2StoryService.isDirty()&&this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0}),o;}return this.runSave(n);});}runSave(e){return kt(this,null,function*(){this.videoSlidesService.savingInfo$.next({isSaving:!0});try{let t=yield this.sliderV2StoryService.save(e);return this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!this.sliderV2StoryService.isDirty()}),this._saved.next(t),"saved";}catch(t){return this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),this.isVersionConflict(t)?(yield this.resolveVersionConflict(e),"conflict"):(this.notifier.error("Something went wrong on saving."),"failed");}});}resolveVersionConflict(e){return kt(this,null,function*(){let t=this.sliderV2StoryService.story()?.storyId??e?.storyId;if(t)try{let n=yield this.composerHttpService.getSliderV2Story(t);yield z_(n),this.sliderV2StoryService.reload(n),this.savedAtAction=this.sliderV2StoryService.actionCount(),this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0}),this._saved.next(n),this.notifier.info("This project was updated elsewhere, so it has been reloaded.");}catch(n){Qt(n),this.notifier.error("This project was updated elsewhere. Please reload the page.");}});}isVersionConflict(e){return e?.error?.code===nM;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();var ml=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.sliderV2AutosaveService=ct(uu),this.composerEventsService=ct(en),this.savePromptGuardService=ct(So),this.location=ct(Ya),this.route=ct(zo),this.destroyRef=ct(ao),bo(()=>this.savePromptGuardService.isDirty.next(this.sliderV2StoryService.isDirty())),this.sliderV2AutosaveService.saved$.pipe(qn(this.destroyRef)).subscribe(e=>this.onSaved(e));}parentTakesLink(){let e=this.parentStoryId();return e?[`/${p_}`,e,f_.takes]:void 0;}parentStoryId(){let e=this.sliderV2StoryService.story()?.parent?.storyId;if(e)return e;
821let t=this.route.snapshot.data.story;return t?.parent?.storyId??(t?.type===Lr.SLIDER_V2?void 0:t?.id);}onSaved(e){!e?.storyId||this.composerEventsService.editStoryId===e.storyId||(this.composerEventsService.editStoryId=e.storyId,this.location.replaceState(`/composer/v2/${e.storyId}`));}ngOnDestroy(){this.savePromptGuardService.isDirty.next(!1);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();vn();Or();lo();om();e_();function lg(i,r){if(!(!i||!r))return i>r?"horizontal":i<r?"vertical":"square";}function ZS(i){let{url:r,timeoutMs:e=8e3,createImage:t=()=>new Image()}=i;return r?new Promise(n=>{let o=t(),_,E=x=>{clearTimeout(_),o.onload=void 0,o.onerror=void 0,n(x);};_=setTimeout(()=>E(void 0),e),o.onload=()=>E(lg(o.naturalWidth,o.naturalHeight)),o.onerror=()=>E(void 0),o.src=r;}):Promise.resolve(void 0);}var aM={vertical:"bottom",horizontal:"left"},QS=2;function cg(i,r){return(i??[]).find(e=>e?.mediaId===r||e?.id===r);}function JS(i){let{videos:r,segmentation:e,mediaId:t}=i,n=cg(r,t);return n?lM(n)?!n.streams?.length||!n.streams[0]?.url?{ready:!1,blocker:"This recording is still being processed. Try again in a moment.",reason:`take ${t} has no playable stream (streams=${n.streams?.length??0})`}:cM(e,n.groupId)?{ready:!0}:{ready:!1,blocker:"This recording has no captions yet, so it cannot be turned into a video.",reason:`take ${t} has no completed segmentation for groupId ${n.groupId}`}:{ready:!1,blocker:"This recording is still being processed. Try again in a moment.",reason:`take ${t} audio not extracted (url=${!!n.audio?.url}, status=${n.audio?._opt?.status})`}:{ready:!1,blocker:"This recording could not be found.",reason:`no take matches mediaId ${t}`};}function e1(i){let{audio:r,segmentationUrl:e,locale:t,aspectRatio:n,defaultTemplateId:o,logoEnabled:_,parent:E,headline:x,wordsPerSlide:h,emphasize:y}=i;return st(Ke({segmentationUrl:e,duration:r?.duration,mainTrack:sM({audio:r,fallbackAspectRatio:n}),aspectRatio:n,headline:x,defaultTemplateId:o,defaultAlign:aM,logoEnabled:_,locale:t,emphasize:!!y},h?{wordsPerSlide:h}:{}),{parent:E});}function t1(i){let r=i?.streams?.[0];if(!r?.url)return;let e=i.streams[i.streams.length-1],t=i.thumbnails?.[i.thumbnails.length-1];return{duration:i.duration,assetDuration:i.duration,url:r.url,format:r.container,volume:1,thumbnailUrl:t?.url,previewUrl:e?.url,sourceAspectRatio:lg(r.width,r.height)};}function i1(i){let{story:r,take:e}=i;if(r?.parent)return r.parent;let t=ug(r?.segmentation,e?.groupId);return{segmentationUrl:t?.url,locale:t?.locale,storyId:r?.id,videoId:e?.id,groupId:e?.groupId};}function sM(i){let{audio:r,fallbackAspectRatio:e}=i;return{video:{url:r?.url,aspectRatio:r?.sourceAspectRatio??e,format:r?.format,duration:r?.duration,thumbnailUrl:Zu(r?.thumbnailUrl)?void 0:r?.thumbnailUrl,previewUrl:r?.previewUrl},audio:{url:r?.url,format:r?.format,duration:r?.duration,volume:r?.volume??1}};}function n1(i){let r=i?.split("-")[0]?.toLowerCase();return!!r&&Qv.includes(r);}function lM(i){return i.audio?.url?i.audio._opt?.status===void 0||i.audio._opt.status===QS:!1;}function cM(i,r){return(i??[]).find(e=>r1(e,r));}function ug(i,r){return(i??[]).find(e=>r1(e,r)&&e.sourceLocale===e.locale);}function r1(i,r){return i?.groupId===r&&i?.status===QS&&!i?.deleted;}mt();var uM="vertical",dM=6*60*1e3,o1="We couldn't turn this take into a video. Please try again.",a1=8e3,Zp=(()=>{class i{constructor(){this.composerHttpService=ct(Yn),this.vdmPresetsService=ct(Io),this.sliderV2StoryService=ct(Yi),this.sliderV2BrollService=ct(au),this.deskManagerHelperService=ct(Lc),this.composerEventsService=ct(en),this.sliderV2Analytics=ct(ls),this.eventsService=ct(Ji
821),this.notifier=ct(En);}compose(e){return kt(this,null,function*(){let{story:t,importState:n}=e;try{let o=n?.mediaId,_=cg(t?.videos,o),E=JS({videos:t?.videos,segmentation:t?.segmentation,mediaId:o});if(!E.ready)return this.notifier.error(E.blocker),{ok:!1,reason:`Slider v2 compose precondition failed: ${E.reason}`};let x=zm(this.vdmPresetsService.pickableLayoutsRecord());if(!x)return this.notifier.error("No layouts are available, so this project cannot be created."),{ok:!1,reason:"Slider v2 compose precondition failed: the layouts catalog is empty"};this.seedAnalyticsContext({story:t,take:_}),this.eventsService.log(this.eventsService.events.script.openInComposer,{storyId:this.composerEventsService.parentStoryId,takeId:this.composerEventsService.takeId,hasCaptions:!0});let h=t1(_),y=yield this.resolveAspectRatio({audio:h,importState:n}),b=n?.segmentation?.lang,p=yield this.composerHttpService.composeSliderV2(e1({audio:h,segmentationUrl:n?.segmentation?.url,locale:b,aspectRatio:y,defaultTemplateId:x,logoEnabled:!!t?.logo,parent:i1({story:t,take:_}),headline:t?.headline,wordsPerSlide:n?.features?.wordsPerSlide,emphasize:n?.features?.emphasize})),c=p?.story;return c?(p.emphasis&&(this.composerEventsService.emphasizedCaptions=Ke({segments:[]},p.emphasis)),c.deskId=this.deskManagerHelperService.getSelectedWorkspaceId(),c.folderId=c.folderId??t?.folderId,c.locale=c.locale??b,this.applyPresenterStoryFields({composed:c,story:t,locale:b}),yield this.applyBrollIfRequested({composed:c,importState:n,aspectRatio:y,locale:b,onActivity:e.onActivity}),this.sliderV2StoryService.loadUnsaved(c),this.sliderV2Analytics.logOpen(!1),this.composerEventsService.log(this.eventsService.events.composer.loadingEnded,{takeId:this.composerEventsService.takeId,numSlides:c.media?.length.toString(),videoDuration:this.composerEventsService.videoDuration?.toString()}),{ok:!0}):(this.notifier.error(o1,{duration:a1}),{ok:!1,reason:"Slider v2 compose returned no story"});}catch(o){return console.error("Error composing slider v2 story:",o),Qt(o),this.notifier.error(o1,{duration:a1}),{ok:!1,reason:`Slider v2 compose threw: ${o}`};}});}applyBrollIfRequested(e){return kt(this,null,function*(){let{composed:t,importState:n,aspectRatio:o,locale:_,onActivity:E}=e,x=n?.features?.bRoll;if(!x)return;let h={stallBudgetMs:dM};E?.(h);try{yield this.sliderV2BrollService.applyBroll({story:t,bRoll:x,aspectRatio:o,locale:_,onProgress:y=>E?.(st(Ke({},h),{percentage:y}))});}catch(y){Qt(y),console.error("Error! Failed to add B-Roll.",y),this.notifier.error("Something went wrong while adding B-Roll.");}});}applyPresenterStoryFields(e){let{composed:t,story:n,locale:o}=e;t.style=L0(t.style,{captionStyles:this.vdmPresetsService.captionStyles(),colorPalettes:this.vdmPresetsService.colorPalettes(),highlightPresets:this.vdmPresetsService.highlightPresets()});let _=t.headline||n?.headline,E=this.vdmPresetsService.layoutsRecord();if(t.media=t.media?.map(y=>cl(E?.[y?.metadata?.templateIds?.[0]])?tp({slide:y,bindsTitle:!0,headline:_}):y),n?.logo?.assetId){let y=n.logo.url??n.logo.asset?.resource?.url,b=Ke({assetId:n.logo.assetId,size:n.logo.size},y?{url:y}:{});t.logo=b;}let x=n?.author?.fullName?.trim(),h=n?.author?.profileImgUrl;(x||h)&&(t.user=Ke(Ke({},x?{name:x}:{}),h?{avatar:h}:{})),n1(o)&&(t.rtlLayout=!0);}resolveAspectRatio(e){return kt(this,null,function*(){let{audio:t,importState:n}=e,o=n?.features?.orientation;return o||(t?.sourceAspectRatio?t.sourceAspectRatio:(yield ZS({url:t?.thumbnailUrl}))??uM);});}seedAnalyticsContext(e){let{story:t,take:n}=e;this.composerEventsService.parentStoryId=t?.parent?.storyId??t?.id,this.composerEventsService.takeId=n?.id,this.composerEventsService.videoDuration=n?.duration,this.composerEventsService.originLang=ug(t?.segmentation,n?.groupId)?.locale;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();var hM=Object.freeze([{below:25,label:"Business Info",colorClass:"phase-caption--business"},{below:50,label:"Themes",colorClass:"phase-caption--themes"},{below:75,label:"Media",colorClass:"phase-caption--media"},{below:1/0,label:"Captions",colorClass:"phase-caption--captions"}]);function s1(i,r=90){let e=r-5,t=Math.log(2*e),n=Math.max(0,i),o=e*Math.exp(-t*Math.min(1,n/15e3));return Math.min(r,Math.round(r-o));}function l1(i,r){let e=Math.min(1,Math.max(0,r)/600),t=1-Math.pow(1-e,2);return Math.min(100,Math.round(i+(100-i)*t));}function c1(i){let r=hM.find(e=>i<e.below);return{label:r.label,colorClass:r.colorClass};}mt();var fM=(i,r)=>r.label,mM=i=>[i];function gM(i,r){if(i&1&&(be(0,"span",15),lt(1),Oe()),i&2){let e=r.$implicit;ke("ngClass",e.colorClass),Ce(),_i(e.label);}}function yM(i,r){if(i&1&&(be(0,"div",10),tt(1,"progress-bar",11),be(2,"div",12),lt(3),Oe(),be(4,"div",13)(5,"span",14),li(6,0),Oe(),ih(7,gM,2,2,"span",15,fM),Oe()()),i&2){let e=Le(2);Ce(),ke("progressValue",e.progress()),Ce(2),hn("",e.progress(),"%"),Ce(4),nh(bv(2,mM,e.phase()));}}function vM(i,r){i&1&&(be(0,"div",18),li(1,4),Oe());}function _M(i,r){i&1&&(be(0,"div",18),li(1,5),Oe());}function bM(i,r){if(i&1){let e=_t();be(0,"div",16)(1,"div",17),at(2,vM,2,0,"div",18)(3,_M,2,0),be(4,"div",19),li(5,1),Oe()(),be(6,"div",20)(7,"button",21),Ze("click",function(){$e(e);let n=Le(2);return We(n.onCloseCrashReportPopup());}),li(8,2),Oe(),be(9,"button",22),Ze("click",function(){$e(e);let n=Le(2);return We(n.onCloseCrashReportPopup(!0));}),li(10,3),Oe()()();}if(i&2){let e=Le(2);Ce(2),kl(2,e.crashedFromStall()?2:3);}}function SM(i,r){if(i&1&&(be(0,"div",7),at(1,yM,9,4,"div",8)(2,bM,11,1,"div",9),Oe()),i&2){let e=Le();Ce(),ke("ngIf",e.isComposing()),Ce(),ke("ngIf",e.showCrashDialog());}}var wM=3e4,EM=400,h1=(()=>{class i{constructor(){this.composeService=ct(Zp),this.composerEventsService=ct(en),this.eventsService=ct(Ji
821),this.route=ct(zo),this.router=ct(Co),this.location=ct(Ya),this.sliderV2SessionService=ct(ml),this.composed=new Mi(),this.isComposing=$t(!0),this.showCrashDialog=$t(!1),this.crashedFromStall=$t(!1),this.progress=$t(5),this.phase=xt(()=>c1(this.progress())),this.realProgressFloor=5,this.settled=!1,this.destroyed=!1;}ngOnInit(){return kt(this,null,function*(){this.armWatchdog();let e=this.route.snapshot.data.importState,t=e?.features?.bRoll?45:90;this.curveStartedAt=Date.now(),this.ticker=setInterval(()=>this.progress.set(s1(Date.now()-this.curveStartedAt,t)),120);let n=yield this.composeService.compose({story:this.route.snapshot.data.story,importState:e,onActivity:o=>this.onComposeActivity(o)});if(clearTimeout(this.watchdog),clearInterval(this.ticker),!this.destroyed){if(!n.ok){console.error(n.reason),this.onFailed();return;}this.settled=!0,this.showCrashDialog.set(!1),this.location.replaceState("/composer/v2"),yield this.animateToComplete(),!this.destroyed&&(this.settleTimer=setTimeout(()=>{this.isComposing.set(!1),this.composed.emit();},EM));}});}ngOnDestroy(){this.settled=!0,this.destroyed=!0,clearTimeout(this.watchdog),clearTimeout(this.settleTimer),clearInterval(this.ticker),this.stopFinishAnimation();}animateToComplete(){let e=this.progress(),t=Date.now();return new Promise(n=>{this.finishResolve=n,this.finishTicker=setInterval(()=>{this.progress.set(l1(e,Date.now()-t)),this.progress()>=100&&this.stopFinishAnimation();},120);});}stopFinishAnimation(){clearInterval(this.finishTicker),this.finishTicker=void 0,this.finishResolve?.(),this.finishResolve=void 0;}onComposeActivity(e){if(this.armWatchdog(e.stallBudgetMs),this.ticker&&(clearInterval(this.ticker),this.ticker=void 0,this.realProgressFloor=this.progress()),e.percentage===void 0||e.percentage===null)return;let t=Math.max(0,90-this.realProgressFloor);this.progress.set(Math.min(90,Math.floor(this.realProgressFloor+e.percentage/100*t)));}armWatchdog(e=wM){this.settled||(clearTimeout(this.watchdog),this.watchdog=setTimeout(()=>this.onFailed(!0),e));}onCloseCrashReportPopup(e=!1){e&&this.eventsService.log(this.eventsService.events.composer.sendCrashReport,{storyId:this.composerEventsService.parentStoryId,editStoryId:this.composerEventsService.editStoryId}),this.showCrashDialog.set(!1),this.router.navigate(this.sliderV2SessionService.parentTakesLink()??[Tr.globals.projectsPage]);}onFailed(e=!1){e||this.crashedFromStall.set(!1),!this.settled&&(this.settled=!0,clearTimeout(this.watchdog),clearInterval(this.ticker),this.isComposing.set(!1),this.crashedFromStall.set(e),this.showCrashDialog.set(!0),this.composerEventsService.log(this.eventsService.events.composer.reportCrash));}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-compose-bootstrap"]],outputs:{composed:"composed"},standalone:!0,features:[Ft],decls:1,vars:1,consts:()=>{let e;e="Loading";let t;t=" Sending us the report will help us make sure it doesn't happen in the future. ";let n;n="Don't send";let o;o="Send report & Exit";let _;_="This is taking longer than expected";let E;return E="We couldn't create this video",[e,t,n,o,_,E,["class","progress-bar-container",4,"ngIf"],[1,"progress-bar-container"],["class","progress-info-wrapper",4,"ngIf"],["class","crash-dialog-wrapper",4,"ngIf"],[1,"progress-info-wrapper"],[1,"progress-bar-wrapper",3,"progressValue"],[1,"progress-percent"],[1,"loader-status-text-wrapper"],[1,"loader-status-prefix"],[1,"cssanimation","fadeInBottom",3,"ngClass"],[1,"crash-dialog-wrapper"],[1,"crash-dialog-container"],[1,"crash-dialog-title"],[1,"crash-dialog-subtitle"],[1,"crash-dialog-actions"],[1,"crash-dialog-dismiss",3,"click"],[1,"crash-dialog-send",3,"click"]];},template:function(t,n){t&1&&at(0,SM,3,2,"div",6),t&2&&ke("ngIf",n.isComposing()||n.showCrashDialog());},dependencies:[xc,ui,Dh],styles:[".progress-bar-container[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:1001;background-color:#253658c4;display:flex;justify-content:center;align-items:center;transition:all 1s ease}.progress-info-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;align-items:center}.progress-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:27px;display:flex;justify-content:center;align-items:center}.progress-percent[_ngcontent-%COMP%]{position:absolute;opacity:.6;color:#fff;font-size:14px;font-weight:700;line-height:27px}.loader-status-text-wrapper[_ngcontent-%COMP%]{width:auto;color:#fff;font-size:14px;font-weight:800;position:relative;padding-top:10px}.loader-status-prefix[_ngcontent-%COMP%]{padding-right:5px}.cssanimation[_ngcontent-%COMP%]{animation-duration:.7s;animation-fill-mode:both;margin-left:3px}.fadeInBottom[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_fadeInBottom}@keyframes _ngcontent-%COMP%_fadeInBottom{0%{opacity:0;transform:translateY(100%)}to{opacity:1}}.crash-dialog-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;position:absolute;bottom:15%;max-width:727px;height:107px;background-color:#fff;border-radius:10px}.crash-dialog-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-left:28px;width:50%}.crash-dialog-title[_ngcontent-%COMP%]{font-size:18px;font-weight:700;line-height:normal;color:#253658;padding-top:21px}.crash-dialog-subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:normal;color:#253658;padding-top:10px}.crash-dialog-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:auto}.crash-dialog-dismiss[_ngcontent-%COMP%]{margin:0 10px 0 0;padding:9px 24px 10px 25px;border-radius:10px;background-color:#7b8db114}.crash-dialog-send[_ngcontent-%COMP%]{margin:0 0 0 10px;padding:9px 17px 10px;border-radius:10px;background-color:#00abfe;color:#fff}.phase-caption--business[_ngcontent-%COMP%]{color:#00d096}.phase-caption--themes[_ngcontent-%COMP%]{color:#4481fd}.phase-caption--media[_ngcontent-%COMP%]{color:#aa58ee}.phase-caption--captions[_ngcontent-%COMP%]{color:#ff86bc}"],changeDetection:0});}}return i;})();Jf();_r();Os();hi();Na();nm();Cc();rm();mt();hi();sa();La();Ki();vn();_r();Os();lo();mt();sa();vn();lo();mt();var Qp;function xM(i){i?.type!=="elementFocused"&&i?.type!=="edited"||Qp?.(i);}function TM(i){return i?.code==="superseded";}var du=(()=>
821{class i{constructor(){this.vdmBridgeLoaderService=ct(eu),this.sliderV2PlayerService=ct(Sr),this.sliderV2StoryService=ct(Yi),this.composerSlideSelectionService=ct(Rn),this.notifier=ct(En),this.zone=ct(To),this._isEditing=$t(!1),this.isEditing=this._isEditing.asReadonly(),this._isOpening=$t(!1),this.isOpening=this._isOpening.asReadonly(),this.holdsRepaints=xt(()=>this._isOpening()||this._isEditing()),this._selectedElementId=$t(void 0),this.selectedElementId=this._selectedElementId.asReadonly(),this._isGesturing=$t(!1),this.isGesturing=this._isGesturing.asReadonly(),this._gestureCount=$t(0),this.gestureCount=this._gestureCount.asReadonly(),this._applyScope=$t("thisScene"),this.applyScope=this._applyScope.asReadonly(),this._isRestoring=$t(!1),this.isRestoring=this._isRestoring.asReadonly(),this.past=$t([]),this.future=$t([]),this.canUndo=xt(()=>this._isEditing()&&!this._isRestoring()&&this.past().length>0),this.canRedo=xt(()=>this._isEditing()&&!this._isRestoring()&&this.future().length>0),this.sessionTime=0,this.slideIndex=$t(0),this.editedLayoutId=xt(()=>this._isEditing()?this.editedSlide()?.metadata?.templateIds?.[0]:void 0),this.sameLayoutSceneCount=xt(()=>{let e=this._isEditing()?this.editedSlide():void 0;if(!e)return 0;let t=e.metadata?.templateIds??[];return t.length?(this.sliderV2StoryService.story()?.media??[]).filter(n=>i0(t,n)).length:0;}),this.editableIds=new Set(),this.touchedElementIds=new Set(),this.generation=0,this.openingSlideIndex=0,this.onStudioPayload=e=>{!this._isEditing()||this._isRestoring()||this.zone.run(()=>{let t=e.studioId||void 0;if(e.type==="elementFocused"){this._selectedElementId.set(t);return;}t&&this._selectedElementId.set(t);let n=JSON.stringify(e.transforms?.[t]??null);if(e.state!=="end"){this._isGesturing()||(this.transformAtGestureStart=n),this._isGesturing.set(!0);return;}t&&n!==this.transformAtGestureStart&&(this.touchedElementIds.add(t),this.recordStep()),this.transformAtGestureStart=void 0,this._isGesturing.set(!1),this._gestureCount.update(o=>o+1);});},this.composerSlideSelectionService.changed$.pipe(qn(ct(ao))).subscribe(e=>{let t=this._isEditing()?this.slideIndex():this._isOpening()?this.openingSlideIndex:e;e!==t&&this.close();});}open(){return kt(this,null,function*(){if(this._isEditing()||this._isOpening())return;let e=++this.generation;this.openingSlideIndex=this.sliderV2PlayerService.currentSlideIndex,this._isOpening.set(!0),this.sliderV2PlayerService.stop();try{if(yield this.vdmBridgeLoaderService.ensureStudioLoaded(),e!==this.generation||(yield this.sliderV2PlayerService.whenIdle(),e!==this.generation))return;let t=this.sliderV2StoryService.story();if(t&&t!==this.sliderV2PlayerService.loadedSource&&(yield this.sliderV2PlayerService.load(t),e!==this.generation))return;let n=this.sliderV2PlayerService.playerStory;if(!n||!window.StudioBridge)throw new Error("[slider-v2-studio] no story on the player to edit");let o=this.sliderV2PlayerService.currentSlideIndex,_=this.sliderV2PlayerService.currentTime,E=yield this.attachStudio({story:n,time:_,generation:e});if(!E)return;if(!E.length){window.StudioBridge.close(),this.notifier.info("There's nothing to scale or move on this scene.");return;}this.startSession({story:n,slideIndex:o,time:_,editableIds:E});}catch(t){if(TM(t))return;if(e!==this.generation){this.closeOrphanedStudio(e);return;}Qt(t),this.notifier.error("Scale & position isn't available right now. Please try again."),this.closeOrphanedStudio(e);}finally{e===this.generation&&this._isOpening.set(!1);}});}close(){if(this.generation++,this._isOpening.set(!1),!this._isEditing())return;let e=window.StudioBridge;try{this.commit();}catch(t){Qt(t);}finally{this.endSession(),e?.close();}}undo(){let e=this.past();!this.canUndo()||!this.current||(this.past.set(e.slice(0,-1)),this.future.update(t=>[...t,this.current]),this.restore(e[e.length-1]));}redo(){let e=this.future();!this.canRedo()||!this.current||(this.future.set(e.slice(0,-1)),this.past.update(t=>[...t,this.current]),this.restore(e[e.length-1]));}setApplyScope(e){this._applyScope.set(e);}clearSelection(){this._selectedElementId.set(void 0),this._isGesturing.set(!1);}isEditable(e){return this.editableIds.has(e);}closeOrphanedStudio(e){if(!(e!==this.generation&&(this._isOpening()||this._isEditing())))try{window.StudioBridge?.close();}catch(n){Qt(n);}}attachStudio(e){return kt(this,null,function*(){let{story:t,time:n,generation:o}=e,_=yield window.StudioBridge.load({story:t,options:{aspectRatio:t.aspectRatio,rtlLayout:!!t.rtlLayout}});if(o!==this.generation){this.closeOrphanedStudio(o);return;}if(yield window.StudioBridge.seekToTime(n),o!==this.generation){this.closeOrphanedStudio(o);return;}return _??[];});}restore(e){return kt(this,null,function*(){let t=++this.generation,n=this.slideIndex();this.current=e,this.touchedElementIds.clear(),e.touched.forEach(o=>this.touchedElementIds.add(o)),this.clearSelection(),this.transformAtGestureStart=void 0,this._isRestoring.set(!0),window.StudioBridge?.close();try{let o=this.sliderV2StoryService.story();if(yield this.sliderV2PlayerService.load(st(Ke({},o),{media:o.media.map((x,h)=>h===n?ym(x,e.transforms):x)})),t!==this.generation)return;let _=this.sliderV2PlayerService.playerStory;if(!_||!window.StudioBridge)throw new Error("[slider-v2-studio] no story on the player to restore into");let E=yield this.attachStudio({story:_,time:this.sessionTime,generation:t});if(!E)return;if(!E.length)throw new Error("[slider-v2-studio] nothing editable after restoring a step");this.editableIds=new Set(E),this._selectedElementId.set(this.autoSelectedElementId(E)),this._isRestoring.set(!1);}catch(o){if(t!==this.generation)return;Qt(o),this.notifier.error("Scale & position isn't available right now. Please try again."),this.close();}});}autoSelectedElementId(e){let t=new Set(e);return(window.VDMBridge?.getPlayer()?.getElementTree()??[]).find(_=>_.captionSlot===!0&&t.has(_.id))?.id??e[0];}
821startSession(e){this.slideIndex.set(e.slideIndex),this.sessionTime=e.time,this.editableIds=new Set(e.editableIds),this.touchedElementIds.clear(),this._selectedElementId.set(this.autoSelectedElementId(e.editableIds)),this._isGesturing.set(!1),this.past.set([]),this.future.set([]),this.current={transforms:op(e.story.media?.[e.slideIndex]?.metadata?.effects),touched:new Set()},window.StudioBridge.setDesktopCallback(xM),Qp=this.onStudioPayload,this._isEditing.set(!0),this._applyScope.set("thisScene");}endSession(){Qp===this.onStudioPayload&&(Qp=void 0),this._isEditing.set(!1),this._isRestoring.set(!1),this._selectedElementId.set(void 0),this._isGesturing.set(!1),this.past.set([]),this.future.set([]),this.current=void 0,this.touchedElementIds.clear(),this.editableIds=new Set(),this.transformAtGestureStart=void 0;}recordStep(){let e=this.current;this.future.set([]);let t;try{t=this.producedStory();}catch(o){Qt(o);}if(!t)return;let n=t.media?.[this.slideIndex()];this.current={transforms:op(n?.metadata?.effects),touched:new Set(this.touchedElementIds)},e&&this.past.update(o=>[...o.slice(-(V_-1)),e]);}sessionTransforms(){if(this._isRestoring())return this.current?.transforms;let e=this.producedStory()?.media?.[this.slideIndex()];return e?op(e.metadata?.effects):void 0;}producedStory(){return window.StudioBridge?.produceStory(!0);}commit(){if(!this.touchedElementIds.size)return;let e=this.slideIndex(),t=this.sliderV2StoryService.story(),n=t?.media?.[e],o=this.sessionTransforms();if(!n||!o)return;let _=ym(n,o),E=this._applyScope()==="sameLayout"&&!!n.metadata?.templateIds?.length;E&&this.sliderV2StoryService.rememberLayoutTransforms(n.metadata?.templateIds?.[0],o.filter(h=>this.touchedElementIds.has(h.elementId)));let x=E?n0({media:t.media,slideIndex:e,merged:_,transforms:o,touched:this.touchedElementIds}):_===n?t.media:t.media.map((h,y)=>y===e?_:h);x!==t.media&&this.sliderV2StoryService.patch({media:x});}editedSlide(){return this.sliderV2StoryService.story()?.media?.[this.slideIndex()];}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();vn();var OM=1,PM=5e3,IM=3e3,kM=15e3,AM=1/60,MM=.04;function f1(i){return kt(this,null,function*(){let r=i?.video?.thumbnailUrl;if(r)return r;let e=i?.video?.previewUrl??i?.video?.url;if(e)try{let[t]=yield hg(e,n=>[Math.min(OM,n/2)]);if(!t)throw new Error("no frame was captured");return t;}catch(t){Qt(t,{level:"warning",tags:{feature:"slider-v2-crop"},extra:{stage:"capture-backdrop-frame"}}),console.warn("[slider-v2-crop] could not capture a crop backdrop frame",t);return;}});}function hg(t,n){return kt(this,arguments,function*(i,r,e={}){let{width:o,height:_,quality:E=.9,signal:x,onFrame:h,onStall:y}=e,b=document.createElement("video");b.crossOrigin="anonymous",b.muted=!0,b.preload="auto",b.playsInline=!0;try{let p=p1({video:b,type:"loadedmetadata",timeoutMs:PM,signal:x});b.src=i;let c=yield p;if(c==="aborted")return[];if(c!=="ok")throw new Error(`video failed to load (${c})`);let d=b.duration;if(!(d>0))throw new Error("video reported no duration");if(!b.videoWidth||!b.videoHeight)throw new Error("video reported no dimensions");let m=b.videoWidth/b.videoHeight,a=o&&_?{w:o,h:_}:_?{w:Math.round(_*m),h:_}:o?{w:o,h:Math.round(o/m)}:{w:b.videoWidth,h:b.videoHeight},s=document.createElement("canvas");s.width=Math.max(1,Math.round(a.w)),s.height=Math.max(1,Math.round(a.h));let l=s.getContext("2d"),g=Date.now()+kM,f=[];for(let v of r(d)){if(x?.aborted)return f;let S=Math.min(Math.max(v,0),Math.max(d-MM,0));if(Math.abs(b.currentTime-S)>=AM){let w=Math.min(IM,Math.max(g-Date.now(),0)),C=p1({video:b,type:"seeked",timeoutMs:w,signal:x});b.currentTime=S;let I=yield C;(I==="timeout"||I==="error")&&y?.(f.length);}if(x?.aborted)return f;try{l.drawImage(b,0,0,s.width,s.height),f.push(s.toDataURL("image/jpeg",E));}catch(w){throw new Error(`could not read the frame back: ${w}`);}h?.(f.length-1,f[f.length-1]);}return f;}finally{b.removeAttribute("src"),b.load();}});}function p1(i){let{video:r,type:e,timeoutMs:t,signal:n}=i;return new Promise(o=>{let _=!1,E=p=>{_||(_=!0,clearTimeout(b),r.removeEventListener(e,x),r.removeEventListener("error",h),n?.removeEventListener("abort",y),o(p));},x=()=>E("ok"),h=()=>E("error"),y=()=>E("aborted"),b=setTimeout(()=>E("timeout"),t);if(n?.aborted){E("aborted");return;}r.addEventListener(e,x),r.addEventListener("error",h),n?.addEventListener("abort",y);});}function m1(i){let{box:r,canvasWidth:e,canvasHeight:t,canvasRect:n,stageRect:o}=i;if(!r||!(e>0)||!(t>0)||!(n?.width>0)||!(n?.height>0))return;let _=n.width/e,E=n.height/t,x=n.left-o.left,h=n.top-o.top,y=x+(r.x+r.w/2)*_,b=h+r.y*E,p=h+(r.y+r.h)*E,c=b<42&&p+42<=o.height,d=48,m=Math.max(d,o.width-48),a=c?p+8:b-8,s=c?0:34,l=c?Math.max(s,o.height-34):Math.max(s,o.height);return{left:Math.min(Math.max(y,d),m),top:Math.min(Math.max(a,s),l),below:c};}mt();hi();var RM=["stage"],LM=["canvas"],DM=["studioSlot"];function NM(i,r){i&1&&(be(0,"lib-badge",29),li(1,4),Oe());}
821function VM(i,r){if(i&1&&(be(0,"span",25)(1,"span",26)(2,"span"),lt(3),Oe(),at(4,NM,2,0,"lib-badge",27),Oe(),be(5,"span",28),lt(6),Oe()()),i&2){let e=r.$implicit;Ce(3),_i(e.name),Ce(),ke("ngIf",e.value==="sameLayout"),Ce(2),_i(e.subtitle);}}function jM(i,r){if(i&1&&(be(0,"div",30),tt(1,"lib-icon",31),be(2,"span",32),li(3,5),Oe()()),i&2){let e=Le(2);Ce(),ke("content",e.infoIcon);}}function BM(i,r){if(i&1){let e=_t();be(0,"lib-floating-toolbar",21)(1,"lib-dropdown-menu",22),Ze("valueChange",function(n){$e(e);let o=Le();return We(o.onApplyScopeChange(n));}),at(2,VM,7,3,"ng-template",23)(3,jM,4,1,"ng-template",24),Oe()();}if(i&2){let e=r.ngIf,t=Le();Li("left",e.left,"px")("top",e.top,"px"),Di("preview-v2__studio-toolbar--below",e.below),Ce(),ke("showSeparators",!1)("options",t.applyToOptions())("value",t.applyScope());}}function FM(i,r){i&1&&(ti(0),li(1,6),ii());}function UM(i,r){i&1&&(ti(0),li(1,7),ii());}function GM(i,r){if(i&1){let e=_t();be(0,"div",33,2)(2,"lib-button",34),Ze("clicked",function(){$e(e);let n=Le();return We(n.onToggleStudio());}),at(3,FM,2,0,"ng-container",35)(4,UM,2,0,"ng-template",null,3,Vi),Oe()();}if(i&2){let e=mi(5),t=Le();Ce(2),ke("leftIconContent",t.isStudioEditing()?t.backToPreviewIcon:t.scalePositionIcon)("preserveIconColor",!t.isStudioEditing())("disabled",!t.isStudioEditing()&&!t.canOpenStudio())("loading",t.isStudioOpening()),Ce(),ke("ngIf",t.isStudioEditing())("ngIfElse",e);}}function zM(i,r){if(i&1){let e=_t();be(0,"img",36),Ze("click",function(){$e(e);let n=Le();return We(n.onTogglePlay());}),Oe();}}function HM(i,r){i&1&&(be(0,"div",37),tt(1,"span",38),Oe());}function $M(i,r){i&1&&(be(0,"div",39),tt(1,"span",38),Oe());}function WM(i,r){if(i&1){let e=_t();be(0,"div",40)(1,"p",41),lt(2),Oe(),be(3,"lib-button",42),Ze("clicked",function(){$e(e);let n=Le();return We(n.onRetryLoad());}),li(4,8),Oe()();}if(i&2){let e=r.ngIf,t=Le();Ce(2),_i(e),Ce(),ke("loading",t.isRetrying());}}function qM(i,r){i&1&&(be(0,"div",49),tt(1,"span",38),Oe());}function YM(i,r){if(i&1&&tt(0,"img",53),i&2){let e=Le().ngIf;ke("src",e.image,An);}}function XM(i,r){if(i&1&&(be(0,"div",50),at(1,YM,1,1,"img",51),tt(2,"composer-cropper",52),Oe()),i&2){let e=r.ngIf;Li("width",e.width,"px")("height",e.height,"px"),Ce(),ke("ngIf",e.image);}}function KM(i,r){if(i&1){let e=_t();ti(0),tt(1,"div",43),be(2,"div",44)(3,"lib-button",45),Ze("clicked",function(){$e(e);let n=Le();return We(n.onCropCancel());}),ti(4),li(5,9),ii(),Oe(),be(6,"lib-button",46),Ze("clicked",function(){$e(e);let n=Le();return We(n.onCropSave());}),ti(7),li(8,10),ii(),Oe()(),at(9,qM,2,0,"div",47)(10,XM,3,5,"div",48),ii();}if(i&2){let e=Le();Ce(6),ke("disabled",!e.cropView()),Ce(3),ke("ngIf",!e.cropView()),Ce(),ke("ngIf",e.cropView());}}var Jp=i=>Math.min(1,Math.max(0,i)),ZM=(i,r)=>i?{x:i.x1*r.width,y:i.y1*r.height,width:(i.x2-i.x1)*r.width,height:(i.y2-i.y1)*r.height}:void 0,QM=(i,r)=>({x1:Jp(i.x/r.width),y1:Jp(i.y/r.height),x2:Jp((i.x+i.width)/r.width),y2:Jp((i.y+i.height)/r.height)}),JM=150,eR=8e3,tR=150,iR=64,g1=16,nR=({viewport:i,chrome:r})=>({width:Math.max(0,i.width-r.sidebarWidth-r.scenesRailWidth-2*g1),height:Math.max(0,i.height-r.headerHeight-r.sceneEditorHeight-iR-2*g1)}),y1=(()=>{class i{constructor(){this.sliderV2PlayerService=ct(Sr),this.sliderV2StoryService=ct(Yi),this.sliderV2CropService=ct(ol),this.sliderV2StudioService=ct(du),this.composerLayoutsService=ct(ko),this.agentLauncher=ct(Ca,{optional:!0}),this.styleVideoService=ct(is),this.composerService=ct(nr),this.sliderV2SessionService=ct(ml),this.notifier=ct(En),this.router=ct(Co),this.destroyRef=ct(ao),this.injector=ct(eh),this.sidebarWidth=Zr(0),this.scenesRailWidth=Zr(0),this.sceneEditorHeight=Zr(0),this.headerHeight=Zr(56),this.viewport=$t({width:window.innerWidth,height:window.innerHeight}),this.stageSize=xt(()=>nR({viewport:this.viewport(),chrome:{sidebarWidth:this.sidebarWidth(),scenesRailWidth:this.scenesRailWidth(),sceneEditorHeight:this.sceneEditorHeight(),headerHeight:this.headerHeight()}})),this.isPlaying=this.sliderV2PlayerService.playing,this.isReady=$t(!1),this.isBuffering=$t(!1),this.isSeeking=yh(Ho(this.sliderV2PlayerService.seekPending).pipe(Qd(e=>e?_o(tR).pipe(oi(()=>!0)):pa(!1))),{initialValue:!1}),this.isApplying=this.sliderV2PlayerService.applying,this.loadError=$t(void 0),this.isRetrying=$t(!1),this.isCropping=this.sliderV2CropService.isCropping,this.isStudioEditing=this.sliderV2StudioService.isEditing,this.isStudioOpening=this.sliderV2StudioService.isOpening,this.scalePositionIcon="/img/icon-library/actions/scale-position-stroke-small.svg",this.backToPreviewIcon="/img/icon-library/symbols/chevron-left.svg",this.infoIcon="/img/icon-library/symbols/Info.svg",this.applyScope=this.sliderV2StudioService.applyScope,this.studioAnchor=xt(()=>{let e=this.sliderV2StudioService.selectedElementId();if(this.sliderV2StudioService.gestureCount(),!this.isStudioEditing()||!e||this.sliderV2StudioService.isGesturing()||this.isCropping())return;let t=this.canvasRef?.nativeElement,n=this.stageRef?.nativeElement;if(!(!t||!n))return m1({box:this.sliderV2PlayerService.elementWireframeBox(e),canvasWidth:t.width,canvasHeight:t.height,canvasRect:t.getBoundingClientRect(),stageRect:n.getBoundingClientRect()});}),this.applyToOptions=xt(()=>{let e=this.composerLayoutsService.labelFor(this.sliderV2StudioService.editedLayoutId());return[{value:"sameLayout",name:"Same layout",subtitle:e?"Apply changes to all scenes using "+e+" layout.":"Apply changes to all scenes using this layout.",disabled:this.sliderV2StudioService.sameLayoutSceneCount()<2}
821,{value:"thisScene",name:"This scene only",subtitle:"Apply changes to the selected scene only."}];}),this.canOpenStudio=xt(()=>this.isReady()&&!this.isPlaying()&&!this.isBuffering()&&!this.isSeeking()&&!this.isApplying()&&!this.isCropping()&&!this.loadError()),this.cropView=$t(void 0),this.cropZoom=xt(()=>this.sliderV2StoryService.story()?.zoom),this.destroyed=!1,this.cropGeneration=0,this.canvasSize=xt(()=>Ea[this.sliderV2StoryService.story()?.aspectRatio]??Ea.vertical),this.sourceAspect=xt(()=>this.sliderV2StoryService.story()?.mainTrack?.video?.aspectRatio),this.targetAspect=xt(()=>this.sliderV2CropService.targetAspect()??this.sliderV2StoryService.story()?.aspectRatio),this.onDocumentPointerDown=e=>{if(!this.sliderV2StudioService.isEditing())return;let t=e.target;if(t===this.canvasRef?.nativeElement){this.clearSelectionOnMiss(e);return;}this.stageRef?.nativeElement?.contains(t)||this.studioSlotRef?.nativeElement?.contains(t)||t?.closest?.(".cdk-overlay-container .dropdown-menu-panel")||t?.closest?.(".cdk-overlay-container .dropdown-menu-overlay-backdrop")||t?.closest?.(".header-workspace-center")||this.sliderV2StudioService.close();};}ngOnInit(){return kt(this,null,function*(){this.subscribeToPlayer(),this.subscribeToCrop(),document.addEventListener("pointerdown",this.onDocumentPointerDown,!0),yield this.sliderV2PlayerService.init(),!this.destroyed&&(yield this.repaint(this.sliderV2StoryService.story()),!this.destroyed&&this.subscribeToStore());});}onTogglePlay(){if(!(this.isStudioEditing()||this.isStudioOpening())){if(this.isPlaying()){this.sliderV2PlayerService.stop();return;}this.sliderV2PlayerService.play();}}onToggleStudio(){if(this.isStudioEditing()){this.sliderV2StudioService.close();return;}this.canOpenStudio()&&this.sliderV2StudioService.open();}onEscape(e){if(!(!(this.isStudioEditing()||this.isStudioOpening())||e.defaultPrevented||this.agentLauncher?.isOpen())){if(this.applyToMenu?.isOpen){this.applyToMenu.closeMenu();return;}this.sliderV2StudioService.close();}}onApplyScopeChange(e){(e==="sameLayout"||e==="thisScene")&&this.sliderV2StudioService.setApplyScope(e);}onCropped(e){let t=this.targetAspect();t?this.sliderV2StoryService.setAspectRatioAndZoom(t,e):this.sliderV2StoryService.setZoom(e),this.sliderV2CropService.close();}onCropSave(){!this.cropper||this.cropper.showDetectionDialog||this.cropper.cropVideo();}onCropCancel(){if(this.cropper){this.cropper.cancelCropping();return;}this.onCropCancelled();}onCropCancelled(){this.sliderV2CropService.close();}onWindowResize(){this.viewport.set({width:window.innerWidth,height:window.innerHeight}),this.sliderV2CropService.isCropping()&&this.sliderV2CropService.close(),this.sliderV2StudioService.close();}ngOnDestroy(){this.destroyed=!0,document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),this.sliderV2CropService.close(),this.sliderV2StudioService.close(),this.sliderV2PlayerService.dispose();}clearSelectionOnMiss(e){this.sliderV2PlayerService.elementIdAt(e,n=>this.sliderV2StudioService.isEditable(n))||this.sliderV2StudioService.clearSelection();}subscribeToPlayer(){this.sliderV2PlayerService.ready$.pipe(qn(this.destroyRef)).subscribe(()=>{this.isReady.set(!0),this.isBuffering.set(!1),this.sliderV2PlayerService.pauseAtSlide(0,Fr(this.sliderV2StoryService.story()?.media??[],0));}),this.sliderV2PlayerService.buffering$.pipe(qn(this.destroyRef)).subscribe(()=>this.isBuffering.set(!0)),$u(this.sliderV2PlayerService.started$,this.sliderV2PlayerService.time$,this.sliderV2PlayerService.paused$,this.sliderV2PlayerService.pauseSettled$.pipe(sn(()=>!this.sliderV2PlayerService.playing())),this.sliderV2PlayerService.ended$).pipe(qn(this.destroyRef)).subscribe(()=>this.isBuffering.set(!1)),this.sliderV2PlayerService.loadFailed$.pipe(qn(this.destroyRef)).subscribe(e=>this.onLoadFailed(e)),this.sliderV2PlayerService.started$.pipe(qn(this.destroyRef)).subscribe(()=>this.sliderV2StudioService.close());}subscribeToStore(){$u(Ho(this.sliderV2StoryService.story,{injector:this.injector}).pipe(ra(1),On(JM),sn(t=>!!t&&t!==this.lastLoaded&&!this.sliderV2StudioService.holdsRepaints()),oi(t=>({story:t,force:!1}))),Ho(this.sliderV2StudioService.holdsRepaints,{injector:this.injector}).pipe(ra(1),sn(t=>!t),oi(()=>this.sliderV2StoryService.story()),sn(t=>!!t),oi(t=>({story:t,force:!0})))).pipe(ov(t=>Hu(this.repaint(t.story,t.force)).pipe(vc(n=>(Qt(n),yc)))),qn(this.destroyRef)).subscribe(),this.sliderV2StoryService.repaintAnnounced$.pipe(qn(this.destroyRef)).subscribe(()=>this.sliderV2PlayerService.beginApply());}repaint(e,t=!1){return kt(this,null,function*(){let n=this.sliderV2PlayerService.applyToken();try{if(!e||!t&&e===this.lastLoaded)return;this.lastLoaded=e,yield this.sliderV2PlayerService.load(e);}finally{this.sliderV2PlayerService.endApply(n);}});}subscribeToCrop(){Ho(this.sliderV2CropService.isCropping,{injector:this.injector}).pipe(qn(this.destroyRef)).subscribe(e=>void this.onCroppingChanged(e)),this.composerService.cropAction$.pipe(qn(this.destroyRef)).subscribe(e=>this.onCropAction(e));}onCropAction(e){let t=this.cropView();if(!(!t||!this.sliderV2CropService.isCropping())){if(e===ca.CANCEL_CROPPING){this.onCropCancelled();return;}if(Array.isArray(e)&&e[0]===ca.CROP_VIDEO){let n=e[1];if(![n?.x,n?.y,n?.width,n?.height].every(Number.isFinite)||n.width<=0||n.height<=0){this.onCropCancelled();return;}this.onCropped(QM(n,t));}}}onCroppingChanged(e){return kt(this,null,function*(){let t=++this.cropGeneration;if(!e){this.cropView.set(void 0),this.styleVideoService.styleSidebarCroppingData$.next(void 0);return;}this.sliderV2PlayerService.stop();let n=this.measureCropStage();if(!n){cr("slider-v2: custom crop unavailable \u2014 no measurable stage",{level:"warning",extra:{s
821ourceAspect:this.sourceAspect(),targetAspect:this.targetAspect()}}),this.notifier.error("Custom crop isn't available for this video."),this.sliderV2CropService.close();return;}let o=yield f1(this.sliderV2StoryService.story()?.mainTrack);this.destroyed||t!==this.cropGeneration||!this.sliderV2CropService.isCropping()||(this.styleVideoService.styleSidebarCroppingData$.next({storyAspectRatio:this.targetAspect(),wrapperThumbnail:{width:n.width,height:n.height,aspectRatio:this.sourceAspect()},cropCoordinates:this.targetAspect()===this.sliderV2StoryService.story()?.aspectRatio?ZM(this.cropZoom(),n):void 0,thumbnailURL:o}),this.cropView.set(st(Ke({},n),{image:o})));});}measureCropStage(){let e=this.stageRef?.nativeElement?.getBoundingClientRect(),t=Ea[this.sourceAspect()];if(!e?.width||!e?.height||!t)return;let n=t.height/t.width,o=Math.min(e.height,e.width*n);return{width:o/n,height:o,image:void 0};}onLoadFailed(e){if(this.isReady.set(!1),this.isBuffering.set(!1),this.isRetrying.set(!1),this.sliderV2PlayerService.endApply(),this.notifier.error(e.message,{duration:eR}),!e.recoverable){this.router.navigate(this.sliderV2SessionService.parentTakesLink()??[Tr.globals.projectsPage]);return;}this.loadError.set(e.message);}onRetryLoad(){return kt(this,null,function*(){if(!this.isRetrying()){this.isRetrying.set(!0),this.loadError.set(void 0);try{if(yield this.sliderV2PlayerService.init(),this.destroyed)return;yield this.repaint(this.sliderV2StoryService.story(),!0);}finally{this.isRetrying.set(!1);}}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-video-preview-v2"]],viewQuery:function(t,n){if(t&1&&(fn(RM,5),fn(LM,5),fn(DM,5),fn(td,5),fn(tm,5)),t&2){let o;mn(o=gn())&&(n.stageRef=o.first),mn(o=gn())&&(n.canvasRef=o.first),mn(o=gn())&&(n.studioSlotRef=o.first),mn(o=gn())&&(n.cropper=o.first),mn(o=gn())&&(n.applyToMenu=o.first);}},hostVars:4,hostBindings:function(t,n){t&1&&Ze("keydown.escape",function(_){return n.onEscape(_);},!1,wc)("resize",function(){return n.onWindowResize();},!1,Sc),t&2&&Di("preview-v2--cropping",n.isCropping())("preview-v2--studio",n.isStudioEditing());},inputs:{sidebarWidth:[Kr.SignalBased,"sidebarWidth"],scenesRailWidth:[Kr.SignalBased,"scenesRailWidth"],sceneEditorHeight:[Kr.SignalBased,"sceneEditorHeight"],headerHeight:[Kr.SignalBased,"headerHeight"]},standalone:!0,features:[Ft],decls:12,vars:15,consts:()=>{let e;e="Element actions";let t;t="Play";let n;n="Apply to";let o;o="APPLY TO";let _;_="Recommended";let E;E="Only edited elements will be applied. Other elements stay unchanged.";let x;x="Back to preview";let h;h="Scale & position";let y;y="Try again";let b;b="Cancel";let p;p="Save";let c;return c="Video frame",[["stage",""],["canvas",""],["studioSlot",""],["scalePositionLabel",""],_,E,x,h,y,b,p,[1,"preview-v2"],["id","vdm-container",1,"preview-v2__stage"],[1,"preview-v2__canvas",3,"click","width","height"],["class","preview-v2__studio-toolbar","ariaLabel",e,3,"preview-v2__studio-toolbar--below","left","top",4,"ngIf"],["class","preview-v2__studio-slot",4,"ngIf"],["class","preview-v2__play","src","/img/composer-icons/preview-play-icon.svg","width","60","height","60","draggable","false","alt",t,3,"click",4,"ngIf"],["class","preview-v2__buffering",4,"ngIf"],["class","preview-v2__applying",4,"ngIf"],["class","preview-v2__error",4,"ngIf"],[4,"ngIf"],["ariaLabel",e,1,"preview-v2__studio-toolbar"],["triggerVariant","button","triggerOpenOn","hover","buttonLabel",n,"buttonSize","xs","buttonVariant","ghost","menuTitle",o,"menuWidth","356px","menuMaxHeight","none",3,"valueChange","showSeparators","options","value"],["libDropdownMenuOptionTpl",""],["libDropdownMenuFooterTpl",""],[1,"apply-to-option"],[1,"apply-to-option__title"],["size","small","color","primary",4,"ngIf"],[1,"apply-to-option__subtitle"],["size","small","color","primary"],[1,"apply-to-info"],[1,"apply-to-info__icon",3,"content"],[1,"apply-to-info__text"],[1,"preview-v2__studio-slot"],["size","sm","variant","secondary",3,"clicked","leftIconContent","preserveIconColor","disabled","loading"],[4,"ngIf","ngIfElse"],["src","/img/composer-icons/preview-play-icon.svg","width","60","height","60","draggable","false","alt",t,1,"preview-v2__play",3,"click"],[1,"preview-v2__buffering"],[1,"preview-v2__spinner"],[1,"preview-v2__applying"],[1,"preview-v2__error"],[1,"preview-v2__error-message"],["size","md","variant","secondary","mode","dark",3,"clicked","loading"],[1,"preview-v2__crop-scrim"],[1,"preview-v2__crop-actions"],["size","sm","variant","ghost",1,"preview-v2__crop-cancel",3,"clicked"],["size","sm","variant","primary",3,"clicked","disabled"],["class","preview-v2__buffering preview-v2__buffering--crop",4,"ngIf"],["class","preview-v2__crop-stage",3,"width","height",4,"ngIf"],[1,"preview-v2__buffering","preview-v2__buffering--crop"],[1,"preview-v2__crop-stage"],["class","preview-v2__crop-backdrop","draggable","false","alt",c,3,"src",4,"ngIf"],["variant","minimal"],["draggable","false","alt",c,1,"preview-v2__crop-backdrop",3,"src"]];},template:function(t,n){if(t&1){let o=_t();be(0,"div",11)(1,"div",12,0)(3,"canvas",13,1),Ze("click",function(){return $e(o),We(n.onTogglePlay());}),Oe(),at(5,BM,4,9,"lib-floating-toolbar",14),Oe(),at(6,GM,6,6,"div",15)(7,zM,1,0,"img",16)(8,HM,2,0,"div",17)(9,$M,2,0,"div",18)(10,WM,5,2,"div",19)(11,KM,11,3,"ng-container",20),Oe();}t&2&&(Ce(),Li("width",n.stageSize().width,"px")("height",n.stageSize().height,"px"),Ce(2),Di("preview-v2__canvas--cropping",n.isCropping()),ke("width",n.canvasSize().width)("height",n.canvasSize().height),Ce(2),ke("ngIf",n.studioAnchor()),Ce(),ke("ngIf",!n.isCropping()),Ce(),ke("ngIf",n.isReady()&&!n.isPlaying()&&!n.isBuffering()&&!n.isSeeking()&&!n.isCropping()&&!n.isApplying()&&!n.isStudioEditing()&&!n.isStudioOpening()),Ce(),ke("ngIf",(n.isBuffering()||n.isSeeking()&&!n.isApplying()&&!n.loadError())&&!n.isCropping()&&!n.isStudioEditing()),Ce(),ke("ngIf",n.isApplying()&&!n.isCropping()&&!n.loadError()),
821Ce(),ke("ngIf",n.loadError()),Ce(),ke("ngIf",n.isCropping()));},dependencies:[Ci,ui,td,Ic,vr,tm,Yv,Pc,bh,$v],styles:["[_nghost-%COMP%]{display:block;min-height:0;overflow:hidden}.preview-v2--cropping[_nghost-%COMP%]{overflow:visible}.preview-v2[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;min-height:0;padding-top:64px}.preview-v2__stage[_ngcontent-%COMP%]{position:relative;display:flex;flex:none;align-items:center;justify-content:center;max-width:100%;max-height:100%;min-height:0}[_nghost-%COMP%] .preview-v2__stage>canvas:not(.preview-v2__canvas){right:0;bottom:0;margin:auto;max-width:100%;max-height:100%}.preview-v2__studio-toolbar[_ngcontent-%COMP%]{position:absolute;z-index:2;transform:translate(-50%,-100%)}.preview-v2__studio-toolbar--below[_ngcontent-%COMP%]{transform:translate(-50%)}.apply-to-option[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;gap:2px;min-width:0;font-family:Inter,sans-serif;line-height:1.4}.apply-to-option__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#253658;font-size:14px;letter-spacing:-.14px}.apply-to-option__subtitle[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;letter-spacing:-.12px;white-space:normal}.apply-to-info[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;margin-top:4px;padding:8px;border-radius:8px;background-color:#f9fafb;color:#6b7280;font-family:Inter,sans-serif;font-size:12px;line-height:1.5;letter-spacing:-.12px}.apply-to-info__icon[_ngcontent-%COMP%]{flex:none;width:16px;height:16px;margin-top:1px}.preview-v2__studio-slot[_ngcontent-%COMP%]{position:absolute;top:32px;right:45px;z-index:1}.preview-v2__canvas[_ngcontent-%COMP%]{display:block;max-width:100%;max-height:100%;object-fit:contain;cursor:pointer}.preview-v2__canvas--cropping[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.preview-v2__crop-scrim[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:1000;width:100%;height:100%;background-color:#00000080;-webkit-user-select:none;user-select:none;animation:_ngcontent-%COMP%_preview-v2-crop-scrim-in .3s ease-in-out}.preview-v2__crop-actions[_ngcontent-%COMP%]{position:absolute;top:32px;right:45px;z-index:1000;display:flex;align-items:center;gap:8px}.preview-v2__crop-cancel[_ngcontent-%COMP%]{--btn-text-color: #FFFFFF;--btn-icon-color: #FFFFFF;--btn-text-color-hover: #FFFFFF;--btn-icon-color-hover: #FFFFFF;--btn-text-color-active: #FFFFFF;--btn-icon-color-active: #FFFFFF}.preview-v2__crop-stage[_ngcontent-%COMP%]{position:absolute;z-index:1000}.preview-v2__crop-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;-webkit-user-select:none;user-select:none}.preview-v2__play[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none}.preview-v2__buffering[_ngcontent-%COMP%], .preview-v2__applying[_ngcontent-%COMP%]{position:absolute;display:flex;align-items:center;justify-content:center}.preview-v2__buffering--crop[_ngcontent-%COMP%]{z-index:1000}.preview-v2__error[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:column;align-items:center;gap:16px;max-width:320px;padding:24px;text-align:center}.preview-v2__error-message[_ngcontent-%COMP%]{margin:0;color:#fff;font-size:14px;line-height:20px}.preview-v2__spinner[_ngcontent-%COMP%]{width:40px;height:40px;border:3px solid #E1E7F0;border-top-color:#2563eb;border-radius:50%;animation:_ngcontent-%COMP%_preview-v2-spin .8s linear infinite}@keyframes _ngcontent-%COMP%_preview-v2-spin{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_preview-v2-crop-scrim-in{0%{opacity:0}to{opacity:1}}"],changeDetection:0});}}return i;})();mt();mt();var ef=(()=>{class i{constructor(){this.composerHttpService=ct(Yn),this.sliderV2StoryService=ct(Yi),this._data=$t(void 0),this.data=this._data.asReadonly(),bo(()=>{let e=this.sliderV2StoryService.story()?.parent?.storyboard?.vttUrl;this.load(e);},{allowSignalWrites:!0});}backgroundAt(e){let t=this._data(),n=t&&qh(t.cues,e.time);return As({thumbnail:this.sliderV2StoryService.story()?.mainTrack?.video?.thumbnailUrl,sb:Bp(t,n),withGradient:e.withGradient,containerWidth:e.width,containerHeight:e.height});}load(e){return kt(this,null,function*(){if(e!==this.loadedUrl){if(this.loadedUrl=e,!e){this._data.set(void 0);return;}try{let t=yield this.composerHttpService.getStoryboardVtt(e);this._data.set(R_(t));}catch(t){console.warn("Failed to fetch storyboard VTT, falling back to the main track poster",t),this._data.set(void 0);}}});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})();mt();sa();Ki();vn();_a();Yu();Or();lo();function rR(i){return!Number.isFinite(i)||i<1?[]:Array.from({length:Math.floor(i)},(r,e)=>(e+.5)/Math.floor(i));}function v1({duration:i,count:r}){return!Number.isFinite(i)||i<=0?[]:rR(r).map(e=>e*i);}function _1(i){let{startSeek:r,dxPx:e,stripWidthPx:t,range:n}=i,o=i.windowWidthPct??S1(n),_=t*(100-o)/100;return!n||!Number.isFinite(_)||_<=0?Ll(n,r):Ll(n,r+e*n.max/_);}function b1(i){let{seek:r,range:e,stripWidthPx:t,minWidthPx:n}=i;
821if(!e?.assetDuration)return{leftPct:0,widthPct:100};let o=Number.isFinite(t)&&t>0&&Number.isFinite(n)?Math.min(100,n/t*100):0,_=Math.max(S1(e),o);return{leftPct:e.max>0?Ll(e,r)/e.max*(100-_):0,widthPct:_};}function S1(i){return i?.assetDuration?Math.min(1,i.windowDuration/i.assetDuration)*100:100;}function tf(i){let r=Math.max(0,Math.round((Number.isFinite(i)?i:0)*10)),e=Math.floor(r/10);return`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}.${r%10}`;}function w1(i){if(!i)return"";let r=i.split(/[?#]/)[0],e=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(e);}catch{return e;}}function E1(i){let r=(i??[]).reduce((t,n)=>t+n,0);if(!Number.isFinite(r)||r<=0)return[];let e=0;return i.slice(0,-1).map(t=>(e+=t,e/r));}var pg=class{constructor(r){this.capacity=r,this.strips=new Map();}get(r){let e=this.strips.get(r);return e&&(this.strips.delete(r),this.strips.set(r,e)),e;}set(r,e){for(this.strips.delete(r),this.strips.set(r,e);this.strips.size>this.capacity;)this.strips.delete(this.strips.keys().next().value);}},fg=new pg(20);mt();hi();Bn();Ki();_r();Oo();mt();hi();var oR=["strip"],aR=["player"];function sR(i,r){if(i&1&&tt(0,"img",20),i&2){let e=Le();ke("src",e.data.mediaUrl,An)("alt",e.data.fileName);}}function lR(i,r){if(i&1){let e=_t();be(0,"video",21,1),Ze("loadedmetadata",function(){$e(e);let n=Le();return We(n.onLoadedMetadata());})("loadeddata",function(){$e(e);let n=Le();return We(n.onPreviewLoaded());})("error",function(){$e(e);let n=Le();return We(n.onPreviewLoaded());})("pause",function(){$e(e);let n=Le();return We(n.onPlayerPaused());}),Oe(),be(2,"lib-button-icon",22),Ze("clicked",function(){$e(e);let n=Le();return We(n.togglePlay());}),Oe();}if(i&2){let e=Le();ke("src",e.data.mediaUrl,An),Ei("poster",e.data.posterUrl,An),Ce(2),ke("iconContent",e.playing()?e.pauseIcon:e.playIcon)("ariaLabel",e.playing()?e.pauseLabel:e.playLabel);}}function cR(i,r){i&1&&(be(0,"span",23),li(1,6),Oe());}function uR(i,r){if(i&1&&tt(0,"div",37),i&2){let e=r.index,t=Le(2);Li("background-image",t.cellImages()[e]),Di("is-pending",t.framesPending()&&!t.cellImages()[e]);}}function dR(i,r){if(i&1&&tt(0,"div",40),i&2){let e=r.$implicit;Li("left",e,"%");}}function hR(i,r){if(i&1&&(be(0,"span",41),lt(1),Oe()),i&2){let e,t=r.$implicit,n=r.index,o=Le(3);Li("left",t,"%"),Ce(),_i((e=o.data.sceneNumbers==null?null:o.data.sceneNumbers[n])!==null&&e!==void 0?e:n+1);}}function pR(i,r){if(i&1&&(ti(0),at(1,dR,1,2,"div",38)(2,hR,2,3,"span",39),ii()),i&2){let e=Le(2);Ce(),ke("ngForOf",e.sceneCutsPct),Ce(),ke("ngForOf",e.sceneStartsPct);}}function fR(i,r){if(i&1&&tt(0,"div",42),i&2){let e=Le(2);Li("left",e.playheadPct(),"%");}}function mR(i,r){if(i&1&&(ti(0),li(1,7),ii()),i&2){let e=Le(2);Ce(),Ys(e.lengthLabel())(e.sceneCount),Xs(1);}}function gR(i,r){if(i&1&&(ti(0),li(1,8),ii(),lt(2)),i&2){let e=Le(2);Ce(2),hn(" ",e.lengthLabel()," ");}}function yR(i,r){if(i&1){let e=_t();be(0,"div",24)(1,"div",25)(2,"span",26),lt(3),Oe(),be(4,"span",27),lt(5),Oe()(),be(6,"div",28,2),at(8,uR,1,4,"div",29),be(9,"div",30),Ze("pointerdown",function(n){$e(e);let o=Le();return We(o.onPointerDown(n));})("pointermove",function(n){$e(e);let o=Le();return We(o.onPointerMove(n));})("pointerup",function(n){$e(e);let o=Le();return We(o.onPointerUp(n));})("pointercancel",function(n){$e(e);let o=Le();return We(o.onPointerUp(n));})("keydown",function(n){$e(e);let o=Le();return We(o.onKeyDown(n));}),at(10,pR,3,2,"ng-container",31)(11,fR,1,2,"div",32),Oe()(),be(12,"div",33)(13,"span",34),lt(14),qi(15,"timeMMSS"),Oe(),be(16,"span",35),at(17,mR,2,2,"ng-container",36)(18,gR,3,1,"ng-template",null,3,Vi),Oe(),be(20,"span",34),lt(21),qi(22,"timeMMSS"),Oe()()();}if(i&2){let e=mi(19),t=Le();Ce(2),Li("left",t.geometry().leftPct,"%"),Ce(),_i(t.startLabel()),Ce(),Li("left",t.geometry().leftPct+t.geometry().widthPct,"%"),Ce(),_i(t.endLabel()),Ce(3),ke("ngForOf",t.cells),Ce(),Li("left",t.geometry().leftPct,"%")("width",t.geometry().widthPct,"%"),Di("is-fixed",!t.draggable()),Ei("tabindex",t.draggable()?0:-1)("aria-label",t.windowLabel)("aria-valuemin",0)("aria-valuemax",t.range.max)("aria-valuenow",t.seek())("aria-valuetext",t.startLabel())("aria-disabled",!t.draggable()),Ce(),ke("ngIf",t.sceneCount>1),Ce(),ke("ngIf",t.playing()),Ce(3),_i(Qi(15,26,0)),Ce(3),ke("ngIf",t.sceneCount>1)("ngIfElse",e),Ce(4),_i(Qi(22,28,t.range.assetDuration));}}var mg=10,vR=48,_R=2,bR=.7,SR=56,wR=1e3,ER=50,xR=.05,TR=.1,CR=1,x1=(()=>{class i extends Fn{constructor(e){super(e),this.data=e,this.seek=$t(0),this.frames=$t([]),this.framesPending=$t(!0),this.playing=$t(!1),this.playhead=$t(0),this.cells=Array.from({length:mg}),this.cellImages=xt(()=>this.cells.map((t,n)=>{let o=this.frames()[n]??this.data.posterUrl;return o?jp(o):null;})),this.playIcon="/img/icon-library/video-music/play-filled-small.svg",this.pauseIcon="/img/icon-library/video-music/pause-filled-small.svg",this.playLabel="Play the selected part",this.pauseL
821abel="Pause",this.windowLabel="Where the B-roll starts",this.lengthLabel=xt(()=>tf(this.range.windowDuration)),this.startLabel=xt(()=>tf(this.seek())),this.endLabel=xt(()=>tf(this.seek()+this.range.windowDuration)),this.draggable=xt(()=>(this.range?.max??0)>0),this.changed=xt(()=>this.seek()!==this.initialSeek),this.geometry=xt(()=>b1({seek:this.seek(),range:this.range,stripWidthPx:this.stripWidth(),minWidthPx:SR})),this.playheadPct=xt(()=>{let t=(this.playhead()-this.seek())/this.range.windowDuration;return Math.min(Math.max(t,0),1)*100;}),this.stripWidth=$t(0),this.previewLoaded=new Promise(t=>{this.markPreviewLoaded=t;}),this.frameAbort=new AbortController(),this.playAttempt=0,this.dragStartX=0,this.dragStartSeek=0,this.range=e.range,this.isImage=e.mode==="image",this.sceneCutsPct=E1(e.range?.sceneDurations).map(t=>t*100),this.sceneStartsPct=[0,...this.sceneCutsPct],this.sceneCount=e.range?.sceneDurations?.length??1,this.initialSeek=Ll(e.range,e.seek),this.seek.set(this.initialSeek),this.playhead.set(this.initialSeek);}ngOnInit(){this.loadFrames();}ngAfterViewInit(){this.measureStrip();}ngOnDestroy(){this.frameAbort.abort(),this.playbackPoll?.unsubscribe();}onPointerDown(e){this.draggable()&&(this.measureStrip(),this.pause(),this.dragPointerId=e.pointerId,this.dragStartX=e.clientX,this.dragStartSeek=this.seek(),e.target.setPointerCapture(e.pointerId),e.preventDefault());}onPointerMove(e){e.pointerId===this.dragPointerId&&this.moveTo(_1({startSeek:this.dragStartSeek,dxPx:e.clientX-this.dragStartX,stripWidthPx:this.stripWidth(),windowWidthPct:this.geometry().widthPct,range:this.range}));}onPointerUp(e){e.pointerId===this.dragPointerId&&(e.target.releasePointerCapture(e.pointerId),this.dragPointerId=void 0);}onKeyDown(e){if(!this.draggable())return;let t=e.shiftKey?CR:TR,n;switch(e.key){case"ArrowLeft":case"ArrowDown":n=this.seek()-t;break;case"ArrowRight":case"ArrowUp":n=this.seek()+t;break;case"Home":n=0;break;case"End":n=this.range.max;break;default:return;}e.preventDefault(),this.pause(),this.moveTo(n);}togglePlay(){this.playing()?this.pause():this.play();}onLoadedMetadata(){this.seekPlayer(this.seek());}onPreviewLoaded(){this.markPreviewLoaded();}onPlayerPaused(){this.playing.set(!1),this.playbackPoll?.unsubscribe();}apply(){this.submit({seek:this.seek()});}moveTo(e){let t=Ll(this.range,e);t!==this.seek()&&(this.seek.set(t),this.playhead.set(t),this.seekPlayer(t));}play(){let e=this.playerRef?.nativeElement;if(!e)return;let t=this.windowEnd();(e.currentTime<this.seek()||e.currentTime>=t)&&this.seekPlayer(this.seek());let n=++this.playAttempt;e.play().catch(()=>{n===this.playAttempt&&this.playing()&&this.onPlayerPaused();}),this.playing.set(!0),this.playbackPoll?.unsubscribe(),this.playbackPoll=_o(0,ER).subscribe(()=>{this.playhead.set(e.currentTime),e.currentTime>=this.windowEnd()&&(this.pause(),this.seekPlayer(this.seek()));});}pause(){this.playAttempt++,this.playerRef?.nativeElement?.pause(),this.onPlayerPaused();}windowEnd(){return this.seek()+this.range.windowDuration-xR;}seekPlayer(e){let t=this.playerRef?.nativeElement;t&&Number.isFinite(t.duration)&&(t.currentTime=Math.min(e,t.duration)),this.playhead.set(e);}measureStrip(){this.stripWidth.set(this.stripRef?.nativeElement?.getBoundingClientRect().width??0);}loadFrames(){return kt(this,null,function*(){let e=this.data.mediaUrl;if(this.isImage||!e){this.framesPending.set(!1);return;}let t=fg.get(e);if(t){this.frames.set([...t]),this.framesPending.set(!1);return;}if(yield Promise.race([this.previewLoaded,tv(_o(wR))]),this.frameAbort.signal.aborted)return;let n=!1;try{let o=yield hg(e,_=>v1({duration:_,count:mg}),{height:Math.round(vR*Math.min(window.devicePixelRatio||1,_R)),quality:bR,signal:this.frameAbort.signal,onFrame:(_,E)=>this.frames.update(x=>{let h=[...x];return h[_]=E,h;}),onStall:()=>n=!0});this.frameAbort.signal.aborted||(this.frames.set(o),o.length===mg&&!n&&fg.set(e,o));}catch(o){console.warn("[adjust-broll] could not build the filmstrip",o);}finally{this.frameAbort.signal.aborted||this.framesPending.set(!1);}});}static{this.ɵfac=function(t){return new(t||i)(ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["adjust-broll-modal"]],viewQuery:function(t,n){if(t&1&&(fn(oR,5),fn(aR,5)),t&2){let o;mn(o=gn())&&(n.stripRef=o.first),mn(o=gn())&&(n.playerRef=o.first);}},standalone:!0,features:[Mn,Ft],decls:18,vars:7,consts:()=>{let e;e="Adjust B-Roll";let t;t="Choose which part of the B-roll plays in this segment.";let n;n="Close adjust B-roll";let o;o="Cancel";let _;_="Apply";let E;E="Drag to choose where the B-roll starts";let x;x="Segment length "+"\uFFFD0\uFFFD"+" \xB7 "+"\uFFFD1\uFFFD"+" scenes \xB7 fixed";let h;return h="Segment length",[["videoPreview",""],["player",""],["strip",""],["singleLength",""],o,_,E,x,h,["title",e,"subtitle",t,"closeAriaLabel",n,1,"adjust-broll",3,"closed"],["modal
821-body","",1,"adjust-broll__body"],[1,"adjust-broll__preview"],["class","adjust-broll__image",3,"src","alt",4,"ngIf","ngIfElse"],[1,"adjust-broll__meta"],[1,"adjust-broll__file",3,"title"],["class","adjust-broll__hint",4,"ngIf"],["class","adjust-broll__timeline",4,"ngIf"],["modal-footer",""],["variant","ghost","size","md",3,"clicked"],["variant","primary","size","md",3,"clicked","disabled"],[1,"adjust-broll__image",3,"src","alt"],["preload","metadata","muted","","playsinline","",1,"adjust-broll__video",3,"loadedmetadata","loadeddata","error","pause","src"],["size","xl","variant","alpha","radius","999px",1,"adjust-broll__play",3,"clicked","iconContent","ariaLabel"],[1,"adjust-broll__hint"],[1,"adjust-broll__timeline"],["aria-hidden","true",1,"adjust-broll__marks"],[1,"adjust-broll__mark"],[1,"adjust-broll__mark","adjust-broll__mark--end"],[1,"adjust-broll__strip"],["class","adjust-broll__cell",3,"is-pending","background-image",4,"ngFor","ngForOf"],["role","slider","aria-orientation","horizontal",1,"adjust-broll__window",3,"pointerdown","pointermove","pointerup","pointercancel","keydown"],[4,"ngIf"],["class","adjust-broll__playhead",3,"left",4,"ngIf"],[1,"adjust-broll__scale"],[1,"adjust-broll__scale-end"],[1,"adjust-broll__length"],[4,"ngIf","ngIfElse"],[1,"adjust-broll__cell"],["class","adjust-broll__cut",3,"left",4,"ngFor","ngForOf"],["class","adjust-broll__scene-badge","aria-hidden","true",3,"left",4,"ngFor","ngForOf"],[1,"adjust-broll__cut"],["aria-hidden","true",1,"adjust-broll__scene-badge"],[1,"adjust-broll__playhead"]];},template:function(t,n){if(t&1){let o=_t();be(0,"lib-modal",9),Ze("closed",function(){return $e(o),We(n.close());}),be(1,"div",10)(2,"div",11),at(3,sR,1,2,"img",12)(4,lR,3,4,"ng-template",null,0,Vi),Oe(),be(6,"div",13)(7,"span",14),lt(8),Oe(),at(9,cR,2,0,"span",15),Oe(),at(10,yR,23,30,"div",16),Oe(),be(11,"div",17)(12,"lib-button",18),Ze("clicked",function(){return $e(o),We(n.close());}),ti(13),li(14,4),ii(),Oe(),be(15,"lib-button",19),Ze("clicked",function(){return $e(o),We(n.apply());}),ti(16),li(17,5),ii(),Oe()()();}if(t&2){let o=mi(5);Ce(3),ke("ngIf",n.isImage)("ngIfElse",o),Ce(4),ke("title",n.data.fileName),Ce(),_i(n.data.fileName),Ce(),ke("ngIf",!n.isImage),Ce(),ke("ngIf",!n.isImage),Ce(5),ke("disabled",!n.changed());}},dependencies:[Ci,an,ui,Eh,vr,Rr,tl],styles:['[_nghost-%COMP%]{display:block;font-family:Inter,sans-serif;-webkit-user-select:none;user-select:none}.adjust-broll[_ngcontent-%COMP%]{--modal-width: 500px}.adjust-broll__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.adjust-broll__preview[_ngcontent-%COMP%]{position:relative;overflow:hidden;border-radius:16px;background-color:#fff;aspect-ratio:16/9}.adjust-broll__video[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:contain;background-color:#000}.adjust-broll__image[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover}.adjust-broll__play[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.adjust-broll__reframe[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px}.adjust-broll__meta[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.adjust-broll__file[_ngcontent-%COMP%]{overflow:hidden;color:#253658;font-size:16px;font-weight:600;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.adjust-broll__hint[_ngcontent-%COMP%]{flex:none;color:#4b5563;font-size:14px;line-height:1.4}.adjust-broll__timeline[_ngcontent-%COMP%]{display:flex;flex-direction:column}.adjust-broll__marks[_ngcontent-%COMP%]{position:relative;height:22px}.adjust-broll__mark[_ngcontent-%COMP%]{position:absolute;top:0;transform:translate(-50%);color:#4481fd;font-size:12px;line-height:1.4;white-space:nowrap}.adjust-broll__mark[_ngcontent-%COMP%]:after{position:absolute;bottom:-5px;left:50%;border-top:4px solid #4481FD;border-right:4px solid transparent;border-left:4px solid transparent;transform:translate(-50%);content:""}.adjust-broll__strip[_ngcontent-%COMP%]{position:relative;display:flex;height:48px;overflow:hidden;border-radius:8px;background-color:#fff}.adjust-broll__cell[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;background-position:center;background-size:cover}.adjust-broll__cell.is-pending[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#0000000a 25%,#00000014 37%,#0000000a 63%);background-size:400% 100%;animation:_ngcontent-%COMP%_adjust-broll-shimmer 1.4s ease infinite}.adjust-broll__window[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;border:2px solid #4481FD;border-radius:8px;
821cursor:grab;box-shadow:0 0 0 9999px #ffffffa6;touch-action:none}.adjust-broll__window[_ngcontent-%COMP%]:active{cursor:grabbing}.adjust-broll__window.is-fixed[_ngcontent-%COMP%]{cursor:default}.adjust-broll__window[_ngcontent-%COMP%]:focus-visible{border-color:#4481fd;box-shadow:0 0 0 9999px #ffffffa6,0 0 0 2px #c7d9fe}.adjust-broll__cut[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:2px;transform:translate(-50%);background-color:#4481fd;pointer-events:none}.adjust-broll__scene-badge[_ngcontent-%COMP%]{position:absolute;top:4px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:4px;border-radius:50%;background-color:#0000004d;color:#fff;font-size:12px;font-weight:500;line-height:1;pointer-events:none}.adjust-broll__playhead[_ngcontent-%COMP%]{position:absolute;top:-2px;bottom:-2px;width:2px;background-color:#253658}.adjust-broll__playhead[_ngcontent-%COMP%]:before{position:absolute;top:-3px;left:50%;width:8px;height:8px;border-radius:50%;background-color:#253658;transform:translate(-50%);content:""}.adjust-broll__scale[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;margin-top:8px;color:#4b5563;font-size:12px;line-height:1.4}.adjust-broll__scale-end[_ngcontent-%COMP%]{flex:1 1 0}.adjust-broll__scale-end[_ngcontent-%COMP%]:last-child{text-align:right}.adjust-broll__length[_ngcontent-%COMP%]{flex:none}@keyframes _ngcontent-%COMP%_adjust-broll-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}'],changeDetection:0});}}return i;})();function gg(i,r){if(i===`*${r}*`)return"*";if(i===`/${r}/`)return"/";}function yg(i,r){if(i!==r||i.length<3)return;let e=i.slice(1,-1);if(e.trim()===e)return i.startsWith("*")&&i.endsWith("*")?T1(e,"*")?"*":void 0:i.startsWith("/")&&i.endsWith("/")&&T1(e,"/")?"/":void 0;}24/7;function T1(i,r){return i.split(r).length-1<2;}function vg(i,r,e,t){if(!(!t&&r!==e))switch(i){case"regular":return t?e:void 0;case"highlight":return t==="*"?void 0:`*${e}*`;case"extra-highlight":return t==="/"?void 0:`/${e}/`;case"new-line":return` 822`;}}function C1(i){let r=P1(i);return r&&r.text.length<=1e3?r:void 0;}function O1(i){return(P1(i)?.text.length??0)>1e3;}function P1(i){let r=i.text??"",e=Math.max(0,i.start),t=Math.min(r.length,i.end);if(t<=e)return;let n=r.slice(e,t);if(i.format==="new-line"&&n!==" ")return;let o=OR({text:r,start:e,end:t,format:i.format}),_=vg(i.format,r.slice(o.start,o.end),o.word,o.pair);return _===void 0?void 0:{text:r.slice(0,o.start)+_+r.slice(o.end),caret:o.start+_.length};}function OR(i){let{text:r,start:e,end:t,format:n}=i,o=r.slice(e,t);if(n==="new-line")return{start:e,end:t,pair:void 0,word:o};let _=yg(o,o);if(_)return{start:e,end:t,pair:_,word:o.slice(1,-1)};let E=Math.max(0,e-1),x=Math.min(r.length,t+1),h=gg(r.slice(E,x),o);return h?{start:E,end:x,pair:h,word:o}:{start:e,end:t,pair:void 0,word:o};}mt();var I1=500,k1={regular:"Regular",highlight:"Highlight","extra-highlight":"Extra Highlight","new-line":"New Line"};function A1(i){return(i??"").replace(/\r\n?/g,` 823`).replace(/\u00a0/g," ");}var hu=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.composerSlideSelectionService=ct(Rn),this.sliderV2PlayerService=ct(Sr),this.dialogHelperService=ct(co),this.composerEventsService=ct(en),this.eventsService=ct(Ji
823),this.notificationsService=ct(En),this.composerLayoutsService=ct(ko),this.destroyRef=ct(ao),this.captionEditsReported=new Yt(),this.titleEditsReported=new Yt(),this._timingDialogOpen=$t(!1),this.timingDialogOpen=this._timingDialogOpen.asReadonly(),this.captionEditsReported.pipe(On(I1),qn(this.destroyRef)).subscribe(e=>this.reportCaptionChange(e,"captions")),this.titleEditsReported.pipe(On(I1),qn(this.destroyRef)).subscribe(e=>this.reportCaptionChange(e,"title"));}actionsFor(e){let t=this.slides();return{canMergeWithPrev:lm(t,e),canMergeWithNext:cm(t,e),canCarryOverlay:W_(t,e),canSplit:um(t,e),canEditDuration:dm(t,e),canAdjustBroll:X_(t,e),canRemoveOverlay:gm(t,e),canDelete:Ju(t,e)};}run(e,t){switch(e){case"merge-with-prev":return this.mergeWithPrev(t);case"merge-with-next":return this.mergeWithNext(t);case"carry-over-overlay":return this.carryOverlayToNext(t);case"split-segment-in-two":return this.openSplitDialog(t);case"adjust-broll":return this.openAdjustBrollDialog(t);case"edit-segment-duration":return this.openDurationDialog(t);case"remove-overlay":return this.removeOverlay(t);case"delete-segment":return this.delete(t);}}mergeWithPrev(e){!lm(this.slides(),e)||this.refuseMerge({fromIndex:e,intoIndex:e-1})||(this.logMenuChoice("Merge With Prev",e),this.commit(Gc({slides:this.slides(),fromIndex:e,intoIndex:e-1}),e-1));}mergeWithNext(e){!cm(this.slides(),e)||this.refuseMerge({fromIndex:e+1,intoIndex:e})||(this.logMenuChoice("Merge With Next",e),this.commit(Gc({slides:this.slides(),fromIndex:e+1,intoIndex:e}),e));}delete(e){Ju(this.slides(),e)&&(this.logMenuChoice("Delete",e),this.commit(Jh(this.slides(),e),Math.max(e-1,0)));}carryOverlayToNext(e){let t=this.slides(),n=ip({slides:t,fromIndex:e,presentation:this.carryPresentation()});if("refusal"in n){n.refusal==="too-short"&&this.notificationsService.info("The overlay video duration is shorter than the slide duration");return;}let o=e+1;this.logMenuChoice("Carry Overlay To Next Slide",e),this.composerEventsService.log(this.eventsService.events.composer.addSegmentOverlay,st(Ke({},this.baseEventPayload(o)),{type:t[e].media[0].type,fromOtherSlide:"false"})),this.commit(n.media,o);}removeOverlay(e){let t=this.slides();gm(t,e)&&(this.logMenuChoice("Remove Overlay",e),this.composerEventsService.log(this.eventsService.events.composer.removeSegmentOverlay,st(Ke({},this.baseEventPayload(e)),{type:t[e].media[0].type})),this.commit(q_({slides:t,index:e}),e));}openSplitDialog(e){um(this.slides(),e)&&(this.logMenuChoice("Split Segment in Two",e),this.openTimingDialog("segment-split",e));}openDurationDialog(e){dm(this.slides(),e)&&(this.logMenuChoice("Edit Segment Duration",e),this.openTimingDialog("segment-duration",e));}openAdjustBrollDialog(e){let t=this.slides(),n=Y_(t,e);if(!n)return;let o=t[e],_=t[n.runIndexes[0]].media[0];this.logMenuChoice("Adjust B-Roll",e),this.sliderV2PlayerService.pauseAtSlide(o.metadata?.time??0,Fr(t,e));let E=n.runIndexes.map(y=>ba(t[y])),x=new va();x.header="Adjust B-Roll",x.mode=n.mode,x.fileName=w1(_.url),n.mode==="video"?(x.mediaUrl=_.previewUrl??_.url,x.posterUrl=_.thumbnailUrl,x.seek=n.seek,x.range=n.range,x.sceneNumbers=n.runIndexes.map(y=>String(y+1).padStart(2,"0"))):x.mediaUrl=_.url,x.onClose=()=>this.dialogHelperService.close(),x.onSubmit=y=>{this.dialogHelperService.close(),this.onAdjustBrollSubmit({index:e,anchors:E,url:_.url,seek:y?.seek});};let h=new Do();h.panelClass=["common-dialog","adjust-broll-dialog-panel"],this.dialogHelperService.open(x,x1,h);}captionChanged(e){this.isStaleCaptionEdit(e)||(this.applyCaptionChange(e),this.captionEditsReported.next(e.index));}titleChanged(e){if(this.isStaleCaptionEdit(e))return;let t=hm({slides:this.slides(),index:e.index,title:A1(e.text)});if(!t)return;let n=e.anchor?`title:${e.index}:${e.anchor}`:`title:${e.index}`;this.sliderV2StoryService.patch({media:t},{coalesceKey:n}),this.titleEditsReported.next(e.index);}isStaleCaptionEdit(e){if(!e?.anchor)return!1;let t=this.slides()[e.index];return!t||ba(t)!==e.anchor;}captionFormatted(e){if(this.isStaleCaptionEdit(e))return;let t=IR(e.format,e.text);if(t===void 0)return;this.logCaptionFormat(e.format,e.index);let n=B_(this.slides(),e.index,t);n&&this.sliderV2StoryService.patch({media:n});}titleFormatted(e){if(this.isStaleCaptionEdit(e))return;let t=hm({slides:this.slides(),index:e.index,title:A1(e.text)});t&&(this.logCaptionFormat(e.format,e.index),this.sliderV2StoryService.patch({media:t}));}onMenuOpened(e){this.composerEventsService.log(this.eventsService.events.composer.segmentMenuOpen,st(Ke({},this.baseEventPayload(e)),{takeId:this.composerEventsService.takeId}));}carryPresentation(){return{bindsTitleFor:e=>this.composerLayoutsService.bindsTitleFor(e),headline:this.sliderV2StoryService.story()?.headline};}slides(){return this.sliderV2StoryService.story()?.media??[];}refuseMerge(e){return ed(Ke({slides:this.slides()},e))?(this.notificationsService.info("The overlay video duration is shorter than the total merged sequence duration"),!0):!1;}commit(e,t){if(!e?.length)return;this.sliderV2StoryService.patch({media:e});let n=Math.min(Math.max(t,0),e.length-1);this.composerSlideSelectionService.select(n),this.sliderV2PlayerService.pauseAtSlide(e[n]?.metadata?.time??0,Fr
823(e,n));}applyCaptionChange(e){let t=_g(e.text),n=ep(this.slides(),e.index,t);if(!n)return;let o=e.anchor?`caption:${e.index}:${e.anchor}`:`caption:${e.index}`;this.sliderV2StoryService.patch({media:n},{coalesceKey:o});}reportCaptionChange(e,t){this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionChange,st(Ke({},this.baseEventPayload(e)),{textType:t}));}logCaptionFormat(e,t){this.composerEventsService.log(this.eventsService.events.composer.segmentCaptionTooltip,Ke(Ke({},this.baseEventPayload(t)),e==="new-line"?{action:k1[e]}:{style:k1[e]}));}openTimingDialog(e,t){let n=this.sliderV2StoryService.story(),o=n?.media??[],_=o[t];if(!_)return;this.sliderV2PlayerService.pauseAtSlide(_.metadata?.time??0,Fr(o,t));let E=n?.mainTrack?.video?.previewUrl??n?.mainTrack?.video?.url,x=new va();if(x.type=e,e==="segment-duration")x.header="Edit Segment Duration",x.leftSegment=t>0?this.toTimingSegment({slides:o,index:t-1}):void 0,x.mainSegment=st(Ke({},this.toTimingSegment({slides:o,index:t})),{previewUrl:E}),x.rightSegment=t+1<o.length?this.toTimingSegment({slides:o,index:t+1}):void 0;else{x.header="Split Segment In Two";let y=(_.metadata?.duration??0)/2;x.mainSegment={index:t+1,time:_.metadata?.time??0,duration:y,previewUrl:E},x.rightSegment={index:t+2,time:_.metadata.time+y,duration:y};}x.onClose=()=>{this._timingDialogOpen.set(!1),this.dialogHelperService.close();},x.onSubmit=y=>{this._timingDialogOpen.set(!1),this.dialogHelperService.close(),this.onTimingDialogSubmit(e,t,y?.dialogData);};let h=new Do();h.disableClose=!0,h.panelClass="remove-mat-dialog-padding",this._timingDialogOpen.set(!0),this.dialogHelperService.open(x,$h,h);}onTimingDialogSubmit(e,t,n){if(!n)return;if(e==="segment-split"){this.composerEventsService.log(this.eventsService.events.composer.segmentSplitSave,this.baseEventPayload(t));let y=rp({slides:this.slides(),index:t,splitAtSec:n.rightSegment?.time});y||cr("slider-v2: split rejected",{level:"warning",extra:{index:t,splitAtSec:n.rightSegment?.time}}),this.commit(y,t);return;}let o={left:n.leftSegment?{index:t-1,time:n.leftSegment.time,duration:n.leftSegment.duration}:void 0,main:{index:t,time:n.mainSegment.time,duration:n.mainSegment.duration},right:n.rightSegment?{index:t+1,time:n.rightSegment.time,duration:n.rightSegment.duration}:void 0},_=this.slides(),E=j_(_,o),x=E&&e0({before:_,after:E});x||cr("slider-v2: timing edit rejected as non-contiguous",{level:"warning",extra:{index:t,edit:o}});let h=[o.left,o.main,o.right].filter(Boolean).map(y=>y.index);if(x&&t0({slides:x,indexes:h})){cr("slider-v2: timing edit refused, b-roll uncovered",{level:"warning",extra:{index:t,edit:o}}),this.notificationsService.info("The overlay video duration is shorter than the slide duration");return;}this.composerEventsService.log(this.eventsService.events.composer.segmentDurationSave,this.baseEventPayload(t)),this.commit(x,t);}onAdjustBrollSubmit(e){let{index:t,anchors:n,url:o,seek:_}=e;if(!Number.isFinite(_))return;let E=this.slides(),x=Uc(E,t),h=E[x[0]]?.media?.[0];h?.type!=="video"||h.url!==o||!(x.length===n.length&&x.every((b,p)=>ba(E[b])===n[p]))||this.commit(K_(E,t,_),t);}toTimingSegment(e){let{slides:t,index:n}=e,o=J_(t,n);return Ke({index:n+1,time:t[n].metadata.time,duration:t[n].metadata.duration},o?{dropMedia:o}:{});}logMenuChoice(e,t){this.composerEventsService.log(this.eventsService.events.composer.segmentMenuSelect,st(Ke({},this.baseEventPayload(t)),{choice:e,takeId:this.composerEventsService.takeId}));}baseEventPayload(e){return{slideNum:(e+1).toString()};}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac});}}return i;})(),PR=".slide-text";function IR(i,r){let e=window.getSelection();if(!e?.rangeCount)return;let t=e.getRangeAt(0),n=kR(t);if(!n){e.removeAllRanges();return;}let o=AR(t,i,r),_=o.range.toString(),E=vg(i,_,o.word,o.pair);if(E===void 0){e.removeAllRanges();return;}if(_g(n.innerText).length-_.length+E.length>1e3){e.removeAllRanges();return;}return o.range.deleteContents(),o.range.insertNode(document.createTextNode(E)),e.removeAllRanges(),_g(n.innerText);}function kR(i){let r=i.commonAncestorContainer;return(r.nodeType===Node.ELEMENT_NODE?r:r.parentElement)?.closest(PR)??null;}function _g(i){return i===` 824`?"":(i??"").replace(/\u00a0/g," ");}function AR(i,r,e){if(r==="new-line")return{range:i,pair:void 0,word:e};let t=yg(i.toString(),e);if(t)return{range:i,pair:t,word:e.slice(1,-1)};let n=i.cloneRange();if(!MR(n))return{range:i,pair:void 0,word:e};let o=gg(n.toString(),e);return o?{range:n,pair:o,word:e}:{range:i,pair:void 0,word:e};}function MR(i){let r=i.startContainer,e=i.endContainer;return r.nodeType!==Node.TEXT_NODE||e.nodeType!==Node.TEXT_NODE?!1:(i.startOffset>0&&i.setStart(r,i.startOffset-1),i.endOffset<e.length&&i.setEnd(e,i.endOffset+1),!0);}mt();hi();mt();hi();_r();mt();hi();function LR(i,r){i&1&&(ti(0),li(1,4),ii());}function DR(i,r){i&1&&(ti(0),li(1,5),ii());}var bg="/img/icon-library",M1=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.sliderV2PlayerService=ct(Sr),this.playIcon=`${bg}/video-music/play-filled-small.svg`,this.clockIcon=`${bg}/symbols/time-watch-clock-small.svg`,this.plusIcon=`${bg}/symbols/plus.svg`,this.stopIcon="/img/composer/player-icons/stop.svg",this.thumbnailUrl=xt(()=>this.sliderV2StoryService.story()?.mainTrack?.video?.thumbnailUrl),this.title="Presenter",this.avatarInitial=xt(()=>(this.sliderV2StoryService.story()?.user?.name??this.title).charAt(0).toUpperCase()),this.scenesAmount=xt(()=>this.sliderV2StoryService.story()?.media?.length??0),this.durationInSec=xt(()=>{let e=this.sliderV2StoryService.story()?.media??[],t=e[e.length-1];return t?(t.metadata?.time??0)+(t.metadata?.duration??0):0;}),this.isPlaying=this.sliderV2PlayerService.playing;}onPlayAllClick(){if(this.isPlaying()){this.sliderV2PlayerService.stop();return;}this.sliderV2PlayerService.play(0);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["rail-header-v2"]],standalone:!0,features:[Ft],decls:28,vars:18,consts:()=>{let e;e="Add scene";let t;t=""+"\uFFFD0\uFFFD"+" Scenes";let n;n="Intro";let o;o="Outro";let _;_="Play All";let E;return E="Stop",[["stopLabel",""],t,n,o,_,E,[1,"rail-header"],["variant","square","customSize","52px",1,"rail-header__avatar",3,"avatarImage","imageFallback"],[1,"rail-header__identity"],[1,"rail-header__title"],[1,"rail-header__meta"],[1,"rail-header__scenes"],["size","sm",3,"disabled"],[1,"rail-header__tag-icon",3,"content"],[1,"rail-header__duration"],[1,"rail-header__duration-icon",3,"content"],[1,"rail-header__actions"],["size","md","variant","tertiary","aria-label",e,3,"disabled","iconContent"],["size","md","variant","secondary",1,"rail-header__play-all",3,"clicked","destructive","leftIconContent"],[4,"ngIf","ngIfElse"]];},template:function(t,n){if(t&1){let o=_t();be(0,"div",6),tt(1,"lib-avatar",7),be(2,"div",8)(3,"h2",9),lt(4),Oe(),be(5,"div",10)(6,"span",11),ti(7),li(8,1),ii(),Oe(),be(9,"lib-tag",12),tt(10,"lib-icon",13),ti(11),li(12,2),ii(),Oe(),be(13,"lib-tag",12),tt(14,"lib-icon",13),ti(15),li(16,3),ii(),Oe(),be(17,"span",14),tt(18,"lib-icon",15),be(19,"span"),lt(20),qi(21,"timeMMSS"),Oe()()()(),be(22,"div",16),tt(23,"lib-button-icon",17),be(24,"lib-button",18),Ze("clicked",function(){return $e(o),We(n.onPlayAllClick());}),at(25,LR,2,0,"ng-container",19)(26,DR,2,0,"ng-template",null,0,Vi),Oe()()();}if(t&2){let o=mi(27);Ce(),ke("avatarImage",n.thumbnailUrl())("imageFallback",n.avatarInitial()),Ce(3),_i(n.title),Ce(4),Ys(n.scenesAmount()),Xs(8),Ce(),ke("disabled",!0),Ce(),ke("content",n.playIcon),Ce(3),ke("disabled",!0),Ce(),ke("content",n.playIcon),Ce(4),ke("content",n.clockIcon),Ce(2),_i(Qi(21,16,n.durationInSec())
824),Ce(3),ke("disabled",!0)("iconContent",n.plusIcon),Ce(),ke("destructive",n.isPlaying())("leftIconContent",n.isPlaying()?n.stopIcon:n.playIcon),Ce(),ke("ngIf",!n.isPlaying())("ngIfElse",o);}},dependencies:[Ci,ui,Fv,vr,Rr,Pc,kc,tl],styles:["[_nghost-%COMP%]{display:block;font-family:Inter,sans-serif}.rail-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;column-gap:12px;height:52px;margin-top:20px;-webkit-user-select:none;user-select:none}.rail-header__identity[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;row-gap:2px}.rail-header__title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;line-height:1.4;letter-spacing:-.2px;color:#253658;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rail-header__meta[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:8px;height:20px}.rail-header__scenes[_ngcontent-%COMP%], .rail-header__duration[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:4px;flex:0 0 auto;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:-.12px;white-space:nowrap;color:#253658}.rail-header__duration-icon[_ngcontent-%COMP%]{width:16px;height:16px}.rail-header__tag-icon[_ngcontent-%COMP%]{width:12px;height:12px;margin-right:2px}.rail-header__actions[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;column-gap:8px}"],changeDetection:0});}}return i;})();function pu(i){return i instanceof HTMLElement?i.isContentEditable||["INPUT","TEXTAREA"].includes(i.tagName.toUpperCase()):!1;}mt();hi();_r();Oc();l_();var NR=["box-sizing","width","border-top-width","border-right-width","border-bottom-width","border-left-width","padding-top","padding-right","padding-bottom","padding-left","font-family","font-size","font-style","font-weight","font-variant","font-stretch","line-height","letter-spacing","word-spacing","text-indent","text-transform","tab-size","white-space","word-break","overflow-wrap"];function R1(i){let{textarea:r,start:e,end:t}=i,n=window.getComputedStyle(r),o=document.createElement("div");NR.forEach(h=>{o.style.setProperty(h,n.getPropertyValue(h));}),o.style.position="absolute",o.style.visibility="hidden",o.style.top="0",o.style.left="-9999px",o.style.overflow="hidden",o.style.borderStyle="solid";let _=r.value??"",E=document.createElement("span");E.textContent=_.slice(e,t)||" ",o.textContent=_.slice(0,e),o.appendChild(E),document.body.appendChild(o);let x={left:E.offsetLeft-r.scrollLeft,top:E.offsetTop-r.scrollTop,width:E.offsetWidth,height:E.offsetHeight};return document.body.removeChild(o),x;}mt();hi();am();var VR=["captionEditor"];function jR(i,r){if(i&1&&tt(0,"i",33),i&2){let e=Le();ke("ngClass",e.playing?"fa-pause":"fa-play");}}function BR(i,r){i&1&&tt(0,"img",36);}function FR(i,r){if(i&1&&(be(0,"div",34),at(1,BR,1,0,"img",35),Oe()),i&2){let e=Le();
824ke("dropData",e.brollDragData)("imageData",e.tile.brollThumbnailUrl),Ce(),ke("ngIf",e.tile.brollType==="video");}}function UR(i,r){if(i&1){let e=_t();be(0,"div",22)(1,"span",37),li(2,4),Oe(),be(3,"lib-textarea",38),Ze("valueChange",function(n){$e(e);let o=Le();return We(o.onTitleInput(n));})("focusin",function(){$e(e);let n=Le();return We(n.onTitleFocus());})("focusout",function(){$e(e);let n=Le();return We(n.onTitleBlur());})("click",function(n){$e(e);let o=Le();return We(o.onTitleClick(n));})("mouseup",function(){$e(e);let n=Le();return We(n.onTitleSelect());})("keyup",function(){$e(e);let n=Le();return We(n.onTitleSelect());})("select",function(){$e(e);let n=Le();return We(n.onTitleSelect());}),Oe()();}if(i&2){let e=Le();Ce(3),ke("height",e.titleHeight)("label",!1)("required",!1)("aiButton",!1)("value",e.titleValue),Ei("active",e.selected?"":null);}}function GR(i,r){i&1&&(be(0,"span",37),li(1,5),Oe());}function zR(i,r){i&1&&(ti(0),li(1,6),ii());}function HR(i,r){i&1&&(ti(0),li(1,7),ii());}function $R(i,r){i&1&&Qr(0);}function WR(i,r){if(i&1&&(ti(0),at(1,$R,1,0,"ng-container",39),ii()),i&2){let e=Le(),t=mi(22),n=mi(24);Ce(),ke("ngIf",e.selectedText.text===" ")("ngIfThen",n)("ngIfElse",t);}}function qR(i,r){if(i&1){let e=_t();be(0,"div",40,3),Ze("mousedown",function(n){$e(e);let o=Le();return We(o.onPopoverMousedown(n));}),be(2,"div",41),Ze("click",function(n){$e(e);let o=Le();return We(o.onFormat("regular",n));}),be(3,"span"),li(4,8),Oe()(),be(5,"div",41),Ze("click",function(n){$e(e);let o=Le();return We(o.onFormat("highlight",n));}),be(6,"span",42),li(7,9),Oe()(),be(8,"div",41),Ze("click",function(n){$e(e);let o=Le();return We(o.onFormat("extra-highlight",n));}),be(9,"span",43),li(10,10),Oe()()();}if(i&2){let e=mi(1),t=Le();Li("top",t.popoverTop(e),"px")("left",t.popoverLeft(e),"px");}}function YR(i,r){if(i&1){let e=_t();be(0,"div",44,3),Ze("mousedown",function(n){$e(e);let o=Le();return We(o.onPopoverMousedown(n));})("click",function(n){$e(e);let o=Le();return We(o.onFormat("new-line",n));}),tt(2,"div",45),be(3,"span"),li(4,11),Oe()();}if(i&2){let e=mi(1),t=Le();Li("top",t.popoverTop(e),"px")("left",t.popoverLeft(e),"px");}}function XR(i,r){if(i&1){let e=_t();be(0,"div",46)(1,"ui-dropdown-menu",47),Ze("onSelection",function(n){$e(e);let o=Le();return We(o.onMenuSelection(n));})("menuState",function(n){$e(e);let o=Le();return We(o.onMenuState(n));}),Oe()();}if(i&2){let e=Le();Ce(),ke("menuOptions",e.dropDownOptions)("triggerButtonIconClass","three-dots-menu-icon")("contentStyle","default-dropdown-menu-styling videomaker-slide-actions-menu-dropdown")("iconOnly",!0);}}function KR(i,r){if(i&1&&tt(0,"img",48),i&2){let e=Le();ke("src",e.tile.layoutGlyph,An);}}function ZR(i,r){if(i&1&&tt(0,"span",49),i&2){let e=Le();Ei("tooltip-text",e.tile.layoutLabel);}}function QR(i){return i?.source==="scene-broll";}var JR="project-card-menu-option",eL=25,tL=17,iL=3,gl=(i,r,e,t="")=>new Cr(i,r,`${JR} ${t}`.trim(),`asset-mediabox-icon ${e}`),D1=(()=>{class i{constructor(){this.selected=!1,this.playing=!1,this.activated=new Mi(),this.transportToggled=new Mi(),this.actionSelected=new Mi(),this.menuOpened=new Mi(),this.captionChanged=new Mi(),this.titleChanged=new Mi(),this.mediaDropped=new Mi(),this.brollMoved=new Mi(),this.captionFormatted=new Mi(),this.titleFormatted=new Mi(),this.captionsHtml="",this.showPlaceholder=!0,this.captionLimitReached=!1,this.titleLimitReached=!1,this.dropDownOptions=[],this.selectionSource="caption",this.isEditing=!1,this.titleValue="",this.isEditingTitle=!1;}ngOnChanges(e){e.selected&&!this.selected&&(this.selectedText=void 0),e.tile&&(this.dropDownOptions=this.buildMenu(this.tile?.actions),this.brollDragData={source:"scene-broll",fromIndex:this.tile?.index,fromAnchor:this.tile?.anchor},this.isEditing&&this.tile?.anchor!==this.editingAnchor&&(this.isEditing=!1,this.editingAnchor=void 0,this.selectedText=void 0,this.captionLimitReached=!1,this.captionEditor?.nativeElement?.blur()),this.isEditing||(this.captionsHtml=L1(this.tile?.text??""),this.showPlaceholder=!this.tile?.text),this.isEditingTitle&&(!this.tile?.hasTitle||this.tile?.anchor!==this.editingAnchor)&&(this.isEditingTitle=!1,this.editingAnchor=void 0,this.titleLimitReached=!1,this.titleElement()?.blur()),this.isEditingTitle||(this.titleValue=this.tile?.title??""));}onTextSelect(e){if(e?.text){this.selectedText=e,this.selectionSource="caption";return;}this.selectionSource==="caption"&&(this.selectedText=void 0);}onTitleSelect(){let e=this.titleElement();if(!this.selected||!e)return;let t=e.selectionStart??0,n=e.selectionEnd??0;if(n<=t){this.selectionSource==="title"&&(this.selectedText=void 0);return;}let o=R1({textarea:e,start:t,end:n}),_=this.popoverOrigin(e);this.selectionSource="title",this.selectedText={text:e.value.slice(t,n),boundingRect:{left:_.left+o.left,top:_.top+o.top,width:o.width,height:o.height}};}popoverTop(e){let t=this.selectedText?.boundingRect;return t?(this.selectionSource==="title"?t.top:this.captionEditor.nativeElement.offsetTop+t.top-this.captionEditor.nativeElement.scrollTop)-e.clientHeight-t.height/2:0;}popoverLeft(e){let t=this.selectedText?.boundingRect;return t?(this.selectionSource==="title"?t.left:this.captionEditor.nativeElement.offsetLeft+t.left)+t.width/2-e.clientWidth/2:0;}onPopoverMousedown(e){e.preventDefault();}onFormat(e,t){t.stopPropagation();let n=this.selectedText?.text;if(this.selectedText=void 0,n!==void 0){if(this.selectionSource==="title"){this.formatTitle(e,n);return;}
824this.captionFormatted.emit({index:this.tile.index,anchor:this.editingAnchor,format:e,text:n});}}onMediaDrop(e){if(!(!e||e instanceof Event)){if(QR(e)){this.brollMoved.emit({fromIndex:e.fromIndex,fromAnchor:e.fromAnchor,toIndex:this.tile.index,toAnchor:this.tile.anchor});return;}this.mediaDropped.emit({index:this.tile.index,anchor:this.tile.anchor,asset:e});}}onActivate(){this.activated.emit(this.tile.index);}onTransport(e){e.stopPropagation(),this.transportToggled.emit(this.tile.index);}onCaptionClick(e){this.selected&&e.stopPropagation();}onActivateKey(e){pu(e.target)||(e.preventDefault(),this.onActivate());}onMenuSelection(e){this.actionSelected.emit({index:this.tile.index,action:e?.value});}onMenuState(e){e&&this.menuOpened.emit(this.tile.index);}onCaptionFocus(){this.isEditing=!0,this.editingAnchor=this.tile?.anchor;}onCaptionBlur(){this.isEditing=!1,this.editingAnchor=void 0,this.captionLimitReached=!1,this.captionsHtml=L1(this.tile?.text??""),this.showPlaceholder=!this.tile?.text;}onCaptionInput(e){let t=this.capCaption(e);this.showPlaceholder=!t||t===` 825`,this.captionChanged.emit({index:this.tile.index,anchor:this.editingAnchor,text:t});}ngAfterViewChecked(){let e=this.titleElement(),t=this.selected?0:-1;e&&e.tabIndex!==t&&(e.tabIndex=t);}onTitleFocus(){this.selected||this.onActivate();let e=this.titleElement();e&&(e.maxLength=1e3),this.isEditingTitle=!0,this.editingAnchor=this.tile?.anchor;}onTitleBlur(){this.selectionSource==="title"&&(this.selectedText=void 0),this.isEditingTitle=!1,this.editingAnchor=void 0,this.titleLimitReached=!1,this.titleValue=this.tile?.title??"",this.titleEditor&&(this.titleEditor.value=this.titleValue);let e=this.titleElement();e&&e.value!==this.titleValue&&(e.value=this.titleValue);}onTitleInput(e){this.titleLimitReached=!1,this.titleChanged.emit({index:this.tile.index,anchor:this.editingAnchor,text:e??""});}onTitleClick(e){this.selected&&e.stopPropagation();}get titleHeight(){let e=Math.min((this.titleValueForHeight().match(/\n/g)?.length??0)+1,iL);return`${eL+(e-1)*tL}px`;}onCaptionBeforeInput(e){let t=this.captionEditor?.nativeElement;if(!t||!e.inputType?.startsWith("insert"))return;let n=document.getSelection(),o=n&&!n.isCollapsed?n.toString().length:0,_=e.data?.length??e.dataTransfer?.getData("text")?.length??1;if((t.innerText??"").length-o+_<=1e3){this.captionLimitReached=!1;return;}e.preventDefault(),this.captionLimitReached=!0;}capCaption(e){let t=e??"";return t.length<=1e3?(this.captionLimitReached=!1,t):(this.captionLimitReached=!0,t.slice(0,1e3));}formatTitle(e,t){let n=this.titleElement();if(!n)return;let o=n.selectionStart??0,_=n.selectionEnd??0;if(n.value.slice(o,_)!==t)return;let E=C1({text:n.value,start:o,end:_,format:e});if(!E){this.titleLimitReached=O1({text:n.value,start:o,end:_,format:e});return;}this.titleLimitReached=!1,n.value=E.text,n.setSelectionRange(E.caret,E.caret),this.titleEditor&&(this.titleEditor.value=E.text),this.titleFormatted.emit({index:this.tile.index,anchor:this.editingAnchor,format:e,text:E.text});}titleValueForHeight(){return(this.isEditingTitle?this.titleElement()?.value:void 0)??this.titleValue??"";}popoverOrigin(e){let t=this.captionEditor?.nativeElement?.offsetParent,n=e.getBoundingClientRect();if(!t)return{left:n.left,top:n.top};let o=t.getBoundingClientRect();return{left:n.left-o.left-t.clientLeft+t.scrollLeft,top:n.top-o.top-t.clientTop+t.scrollTop};}buildMenu(e){return e?[e.canMergeWithPrev&&gl("merge-with-prev","Merge With Prev","icon-merge-with-prev"),e.canMergeWithNext&&gl("merge-with-next","Merge With Next","icon-merge-with-next"),e.canCarryOverlay&&gl("carry-over-overlay","Carry Over Overlay","icon-carry-over-overlay"),e.canSplit&&gl("split-segment-in-two","Split Segment In Two","icon-split-segment-in-two"),e.canAdjustBroll&&gl("adjust-broll","Adjust B-Roll","icon-adjust-broll"),e.canEditDuration&&gl("edit-segment-duration","Edit Segment Duration","icon-edit-segment-duration"),e.canRemoveOverlay&&gl("remove-overlay","Remove Overlay","icon-remove-overlay"),e.canDelete&&gl("delete-segment","Delete Segment","icon-delete-segment","redish-100-color")].filter(t=>t instanceof Cr):[];}titleElement(){return this.titleEditor?.textareaInputRef?.nativeElement;}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scene-tile-v2"]],viewQuery:function(t,n){if(t&1&&(fn(em,5),fn(VR,5)),t&2){let o;mn(o=gn())&&(n.titleEditor=o.first),mn(o=gn())&&(n.captionEditor=o.first);}},inputs:{tile:"tile",selected:"selected",playing:"playing"},outputs:{activated:"activated",transportToggled:"transportToggled",actionSelected:"actionSelected",menuOpened:"menuOpened",captionChanged:"captionChanged",titleChanged:"titleChanged",mediaDropped:"mediaDropped",brollMoved:"brollMoved",captionFormatted:"captionFormatted",titleFormatted:"titleFormatted"},standalone:!0,features:[Wa,Ft],decls:31,vars:27,consts:()=>{let e;e="Play scene";let t;t="No Title";let n;n="Title";let o;o="Captions";let _;_="Caption limit reached";let E;E="Title limit reached";let x;x="Regular";let h;h="Highlight";let y;y="Extra Highlight";let b;return b="New Line",[["captionEditor",""],["formattingMenuTemplate",""],["addLineBreakTemplate",""],["formattingMenu",""],n,o,_,E,x,h,y,b,[1,"slide-container",3,"click"],["type","button","aria-label",e,1,"slide-control
825s",3,"click"],["class","slide-transport-icon fa fa-fw",3,"ngClass",4,"ngIf"],[1,"slide-time"],["role","radio",1,"slide-info",3,"keydown.enter","keydown.space"],["cdkVirtualDropWrapper","","dropHoverClass","slide-thumbnail-drop-over",1,"slide-thumbnail",3,"drop"],[1,"slide-index"],["class","slide-broll-drag","dragWrapper","",3,"dropData","imageData",4,"ngIf"],[1,"slide-fields"],["class","slide-field",4,"ngIf"],[1,"slide-field"],["class","slide-field-label",4,"ngIf"],[1,"slide-text",3,"click","beforeinput","input","focus","blur","textSelect","innerHTML"],["role","status","aria-live","polite",1,"slide-text-limit"],[4,"ngIf"],[1,"slide-meta"],["class","slide-actions-menu",4,"ngIf"],[1,"slide-attributes"],["class","slide-attributes-icon","draggable","false","alt","",3,"src",4,"ngIf"],[1,"hover-elm-tooltip"],["class","hover-tooltip hover-tooltip-layouts",4,"ngIf"],[1,"slide-transport-icon","fa","fa-fw",3,"ngClass"],["dragWrapper","",1,"slide-broll-drag",3,"dropData","imageData"],["class","slide-broll-glyph","src","/img/icon-library/video/video.svg","alt","","aria-hidden","true",4,"ngIf"],["src","/img/icon-library/video/video.svg","alt","","aria-hidden","true",1,"slide-broll-glyph"],[1,"slide-field-label"],["placeholder",t,1,"slide-title",3,"valueChange","focusin","focusout","click","mouseup","keyup","select","height","label","required","aiButton","value"],[4,"ngIf","ngIfThen","ngIfElse"],[1,"text-formatting-menu",3,"mousedown"],[3,"click"],[2,"font-weight","bold"],[2,"font-weight","bolder"],[1,"text-formatting-menu",3,"mousedown","click"],[1,"newline-icon"],[1,"slide-actions-menu"],[3,"onSelection","menuState","menuOptions","triggerButtonIconClass","contentStyle","iconOnly"],["draggable","false","alt","",1,"slide-attributes-icon",3,"src"],[1,"hover-tooltip","hover-tooltip-layouts"]];},template:function(t,n){if(t&1){let o=_t();be(0,"div",12),Ze("click",function(){return $e(o),We(n.onActivate());}),be(1,"button",13),Ze("click",function(E){return $e(o),We(n.onTransport(E));}),at(2,jR,1,1,"i",14),be(3,"div",15),lt(4),qi(5,"timeMMSS"),Oe()(),be(6,"div",16),Ze("keydown.enter",function(E){return $e(o),We(n.onActivateKey(E));})("keydown.space",function(E){return $e(o),We(n.onActivateKey(E));}),be(7,"div",17),Ze("drop",function(E){return $e(o),We(n.onMediaDrop(E));}),be(8,"div",18),lt(9),Oe(),at(10,FR,2,3,"div",19),Oe(),be(11,"div",20),at(12,UR,4,6,"div",21),be(13,"div",22),at(14,GR,2,0,"span",23),be(15,"div",24,0),Ze("click",function(E){return $e(o),We(n.onCaptionClick(E));})("beforeinput",function(E){return $e(o),We(n.onCaptionBeforeInput(E));})("input",function(){$e(o);let E=mi(16);return We(n.onCaptionInput(E.innerText));})("focus",function(){return $e(o),We(n.onCaptionFocus());})("blur",function(){return $e(o),We(n.onCaptionBlur());})("textSelect",function(E){return $e(o),We(n.onTextSelect(E));}),Oe()()(),be(17,"p",25),at(18,zR,2,0,"ng-container",26)(19,HR,2,0,"ng-container",26),Oe(),at(20,WR,2,3,"ng-container",26)(21,qR,11,4,"ng-template",null,1,Vi)(23,YR,5,4,"ng-template",null,2,Vi),be(25,"div",27),at(26,XR,2,4,"div",28),be(27,"div",29),at(28,KR,1,1,"img",30),be(29,"div",31),at(30,ZR,1,1,"span",32),Oe()()()()();}t&2&&(Ce(),Ei("active",n.selected?"":null)("aria-pressed",n.selected&&n.playing),Ce(),ke("ngIf",n.selected),Ce(2),_i(Qi(5,25,n.tile.time)),Ce(2),Ei("titled",n.tile.hasTitle?"":null)("tabindex",n.selected?0:-1)("aria-checked",n.selected)("active",n.selected?"":null),Ce(),Li("background",n.tile.thumbnailBackground),Ce(2),_i(n.tile.number),Ce(),ke("ngIf",n.tile.brollType),Ce(),Ei("titled",n.tile.hasTitle?"":null),Ce(),ke("ngIf",n.tile.hasTitle),Ce(2),ke("ngIf",n.tile.hasTitle),Ce(),ke("innerHTML",n.captionsHtml,th),Ei("contenteditable",n.selected)("placeholder",n.showPlaceholder?"true":null)("active",n.selected?"":null),Ce(3),ke("ngIf",n.captionLimitReached),Ce(),ke("ngIf",n.titleLimitReached&&!n.captionLimitReached),Ce(),ke("ngIf",n.selectedText),Ce(6),ke("ngIf",n.dropDownOptions.length),Ce(2),ke("ngIf",n.tile.layoutGlyph),Ce(2),ke("ngIf",n.tile.layoutLabel));},dependencies:[Ci,xc,ui,Mh,Dc,tl,Fp,em,Up,Fh],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.slide-container[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:10px;-webkit-user-select:none;user-select:none;cursor:pointer}
825.slide-controls[_ngcontent-%COMP%]{flex:0 0 auto;width:54px;height:25px;padding:0;border:none;border-radius:6px;background-color:#ebf2ff;color:#4b6fa5;display:flex;align-items:center;justify-content:center;column-gap:4px;font-family:inherit;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:-.12px;cursor:pointer}.slide-controls[_ngcontent-%COMP%]:focus-visible{box-shadow:inset 0 0 0 2px #253658}.slide-controls[active][_ngcontent-%COMP%]{background-color:#4481fd;color:#fff;font-weight:700;font-size:10px;letter-spacing:0}.slide-transport-icon[_ngcontent-%COMP%]{font-size:10px}.slide-info[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;box-sizing:border-box;min-height:72px;padding:10px;border-radius:12px;background:#fff;box-shadow:0 0 0 1px #e5e7eb;display:flex;align-items:center;column-gap:8px;cursor:pointer;position:relative}.slide-info[active][_ngcontent-%COMP%]{box-shadow:0 0 0 2px #4481fd;cursor:default}.slide-info[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #4481fd}.slide-thumbnail[_ngcontent-%COMP%]{flex:0 0 auto;align-self:flex-start;width:52px;height:52px;border-radius:8px;display:flex;align-items:center;justify-content:center;position:relative;transition:transform .2s ease-in-out,box-shadow .2s ease-in-out}.slide-thumbnail-drop-over[_ngcontent-%COMP%]{transform:scale(1.08);box-shadow:0 0 0 2px #4481fd}.slide-broll-drag[_ngcontent-%COMP%]{position:absolute;inset:0;border-radius:inherit;cursor:grab}.slide-broll-glyph[_ngcontent-%COMP%]{position:absolute;right:3px;bottom:3px;width:14px;height:14px;padding:1px;border-radius:6px;background:#fff;pointer-events:none}.slide-index[_ngcontent-%COMP%]{color:#fff;font-weight:700;font-size:12px;letter-spacing:-.12px}.slide-text[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;box-sizing:border-box;padding:6px;border-radius:8px;font-size:14px;font-weight:400;line-height:1.4;letter-spacing:-.14px;color:#253658;word-break:break-word;unicode-bidi:plaintext;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.slide-text[active][_ngcontent-%COMP%]{display:block;background:#ebf2ff;max-height:114px;overflow-y:auto;-webkit-user-select:text;user-select:text;white-space:pre-wrap}.slide-text[placeholder][_ngcontent-%COMP%]:not([active]){display:flex;align-items:center;justify-content:center}.slide-text[placeholder][_ngcontent-%COMP%]{color:#9ca3af}.slide-text[placeholder][_ngcontent-%COMP%]:before{content:"No Captions"}.slide-text-limit[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:10px;margin:0;font-size:11px;line-height:14px;color:#dc2626;pointer-events:none}.slide-fields[_ngcontent-%COMP%]:not([titled]), .slide-fields[_ngcontent-%COMP%]:not([titled]) > .slide-field[_ngcontent-%COMP%]{display:contents}.slide-info[titled][_ngcontent-%COMP%]{padding:8px}.slide-fields[titled][_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;row-gap:4px}.slide-fields[titled][_ngcontent-%COMP%] > .slide-field[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:6px;min-width:0}.slide-field-label[_ngcontent-%COMP%]{flex:0 0 52px;font-size:12px;font-weight:600;line-height:1.4;letter-spacing:-.12px;color:#253658}.slide-fields[titled][_ngcontent-%COMP%] .slide-text[_ngcontent-%COMP%]{flex:1 1 0;padding:4px 8px;border-radius:6px;font-size:12px;letter-spacing:-.12px;background:#f0f3f9;-webkit-line-clamp:1}.slide-fields[titled][_ngcontent-%COMP%] .slide-text[active][_ngcontent-%COMP%]{background:#ebf2ff}.slide-fields[titled][_ngcontent-%COMP%] .slide-text[placeholder][_ngcontent-%COMP%]:not([active]){justify-content:flex-start}.slide-title[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;pointer-events:none}.slide-title[active][_ngcontent-%COMP%]{pointer-events:auto}.slide-title[_ngcontent-%COMP%] .textarea-wrapper{padding:4px 8px;border:none;border-radius:6px;background-color:#f0f3f9}.slide-title[active][_ngcontent-%COMP%] .textarea-wrapper{background-color:#ebf2ff}.slide-title[_ngcontent-%COMP%] .textarea-input{font-size:12px;line-height:1.4;letter-spacing:-.12px;white-space:pre;overflow:hidden}.slide-title[active][_ngcontent-%COMP%] .textarea-input{overflow-y:auto}.slide-meta[_ngcontent-%COMP%]{flex:0 0 62px;align-self:stretch;min-height:52px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}.slide-actions-menu[_ngcontent-%COMP%]{width:24px;height:24px;color:#253658}.slide-attributes[_ngcontent-%COMP%]{position:relative;height:28px;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;column-gap:8px}.slide-attributes-icon[_ngcontent-%COMP%]{width:auto;height:28px}.hover-elm-tooltip[_ngcontent-%COMP%]{position:absolute;right:0;width:20px;height:28px}.hover-tooltip[_ngcontent-%COMP%]{position:relative;z-index:999}.hover-tooltip[_ngcontent-%COMP%]:before{content:attr(tooltip-text);position:absolute;font-family:Inter,sans-serif;font-weight:500;font-size:11px;display:flex;align-items:center;justify-content:center;border-radius:6px;width:max-content;max-width:240px;padding:8px 12px;background:#000c;color:#fff}.hover-tooltip[_ngcontent-%COMP%]:after{position:absolute;content:"";width:0px;height:0px;border-width:5px;border-style:solid;border-color:transparent transparent rgba(0,0,0,.8) transparent;top:-10px;left:38px}.hover-tooltip[_ngcontent-%COMP%]:before, .hover-tooltip[_ngcontent-%COMP%]:after{opacity:0;visibility:hidden;transition:opacity .1s ease-in-out 0s}.hover-elm-tooltip[_ngcontent-%COMP%]:hover > .hover-tooltip[_ngcontent-%COMP%]:before, .hover-elm-tooltip[_ngcontent-%COMP%]:hover > .hover-tooltip[_ngcontent-%COMP%]:after{opacity:1;visibility:visible;transition:opacity ease-in-out .2s;margin-left:-18px;margin-top:20px}.hover-tooltip-layouts[_ngcontent-%COMP%]:before{margin-left:0!important;right:-30px!important}.hover-tooltip-layouts[_ngcontent-%COMP%]:after{left:25px!important}.text-formatting-menu[_ngcontent-%COMP%]{color:#fff;background-color:#000c;border-radius:10px;position:absolute;-webkit-user-select:none;user-select:none;box-shadow:2px 2px 5px #0000004d;white-space:nowrap;padding:12px 15px;display:flex;flex-direction:row;justify-content:center;column-gap:12px;align-items:center;height:42px;
825cursor:pointer;z-index:1}.text-formatting-menu[_ngcontent-%COMP%]:after{bottom:-11px;font-size:13px;left:50%;line-height:19px;content:"\\25bc";color:#000c;position:absolute;transform:translate(-50%)}.newline-icon[_ngcontent-%COMP%]{width:20px;height:20px;background:url(/img/composer-icons/newline.svg) center/cover no-repeat} .default-dropdown-menu-styling.videomaker-slide-actions-menu-dropdown{max-height:calc(100vh - 48px)!important;overflow-y:auto}'],changeDetection:0});}}return i;})();function L1(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>");}mt();hi();var nL=["sceneRow"];function rL(i,r){if(i&1){let e=_t();be(0,"scene-tile-v2",5,0),Ze("activated",function(n){$e(e);let o=Le();return We(o.onSceneSelected(n));})("transportToggled",function(n){$e(e);let o=Le();return We(o.onTransportToggled(n));})("actionSelected",function(n){$e(e);let o=Le();return We(o.onActionSelected(n));})("menuOpened",function(n){$e(e);let o=Le();return We(o.onMenuOpened(n));})("captionChanged",function(n){$e(e);let o=Le();return We(o.onCaptionChanged(n));})("titleChanged",function(n){$e(e);let o=Le();return We(o.onTitleChanged(n));})("captionFormatted",function(n){$e(e);let o=Le();return We(o.onCaptionFormatted(n));})("titleFormatted",function(n){$e(e);let o=Le();return We(o.onTitleFormatted(n));})("mediaDropped",function(n){$e(e);let o=Le();return We(o.onMediaDropped(n));})("brollMoved",function(n){$e(e);let o=Le();return We(o.onBrollMoved(n));}),Oe();}if(i&2){let e=r.$implicit,t=Le();ke("tile",e)("selected",e.index===t.selectedIndex())("playing",t.playing());}}function oL(i,r){i&1&&(be(0,"p",6),li(1,1),Oe());}var aL=3,sL=84,N1=52,lL=.05,V1=(()=>{class i{constructor(){this.sliderV2StoryService=ct(Yi),this.sliderV2PlayerService=ct(Sr),this.sliderV2StoryboardService=ct(ef),this.composerSlideSelectionService=ct(Rn),this.composerLayoutsService=ct(ko),this.sliderV2SlidesActionsService=ct(hu),this.sliderV2SlideMediaService=ct(dl),this.host=ct(oa),this.injector=ct(eh),this.slides=xt(()=>this.sliderV2StoryService.story()?.media??[]),this.selectedIndex=this.composerSlideSelectionService.index,this.playing=this.sliderV2PlayerService.playing,this.tiles=xt(()=>{let e=this.slides();return e.map((t,n)=>{let o=t.metadata?.templateIds?.[0],_=t.metadata?.time??0;return{index:n,anchor:ba(t),number:String(n+1).padStart(2,"0"),text:t.text,hasTitle:this.composerLayoutsService.bindsTitleFor(o),title:t.metadata?.resources?.title??"",time:_,duration:Fr(e,n),layoutLabel:this.composerLayoutsService.labelFor(o),layoutGlyph:this.composerLayoutsService.glyphFor(o),thumbnailBackground:this.thumbnailBackgroundFor(t,_),brollType:t.media?.[0]?.type,brollThumbn
825ailUrl:t.media?.[0]?.thumbnailUrl,actions:this.sliderV2SlidesActionsService.actionsFor(n)};});}),this.sceneCount=xt(()=>this.slides().length),bo(()=>this.scrollToIndex(this.selectedIndex()));}onSceneSelected(e){this.composerSlideSelectionService.select(e);let t=this.tiles()[e];this.sliderV2PlayerService.pauseAtSlide(t?.time,t?.duration);}onTransportToggled(e){if(e!==this.selectedIndex()){this.onSceneSelected(e);return;}if(this.playing()){this.sliderV2PlayerService.stop();return;}let t=this.tiles()[e];t&&this.sliderV2PlayerService.play(t.time,this.segmentEndFor(t));}onActionSelected(e){this.sliderV2SlidesActionsService.run(e.action,e.index);}onMenuOpened(e){this.sliderV2SlidesActionsService.onMenuOpened(e);}onArrowKey(e,t){if(pu(e.target))return;let n=this.selectedIndex()+t;n<0||n>=this.sceneCount()||(e.preventDefault(),this.onSceneSelected(n),qf(()=>this.rows?.get(n)?.nativeElement?.querySelector(".slide-info")?.focus(),{injector:this.injector}));}onCaptionChanged(e){this.sliderV2SlidesActionsService.captionChanged(e);}onTitleChanged(e){this.sliderV2SlidesActionsService.titleChanged(e);}onCaptionFormatted(e){this.sliderV2SlidesActionsService.captionFormatted(e);}onTitleFormatted(e){this.sliderV2SlidesActionsService.titleFormatted(e);}trackByIndex(e,t){return t.index;}segmentEndFor(e){let t=o=>Math.max(o-lL,e.time);if(Number.isFinite(e.duration))return t(e.time+e.duration);let n=this.sliderV2StoryService.story()?.mainTrack?.video?.duration;if(!(!Number.isFinite(n)||n<=e.time))return t(n);}onMediaDropped(e){this.sliderV2SlideMediaService.addAssetToSlide(e);}onBrollMoved(e){this.sliderV2SlideMediaService.moveBroll(e);}thumbnailBackgroundFor(e,t){let n=e.media?.[0]?.thumbnailUrl;return n?As({thumbnail:n,sb:void 0,withGradient:!0}):this.sliderV2StoryboardService.backgroundAt({time:t,width:N1,height:N1,withGradient:!0});}scrollToIndex(e){qf(()=>{let t=this.rows?.get(e)?.nativeElement,n=this.host.nativeElement;if(!t)return;let o=t.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop,_=o<n.scrollTop,E=o+t.offsetHeight>n.scrollTop+n.clientHeight;!_&&!E||n.scrollTo({top:Math.max(o-aL*sL,0),behavior:"smooth"});},{injector:this.injector});}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=Bt({type:i,selectors:[["scenes-rail-v2"]],viewQuery:function(t,n){if(t&1&&fn(nL,5,oa),t&2){let o;mn(o=gn())&&(n.rows=o);}},standalone:!0,features:[Ft],decls:4,vars:3,consts:()=>{let e;e="Scene";let t;return t="This project has no scenes yet.",[["sceneRow",""],t,["role","radiogroup","aria-label",e,1,"slides-container",3,"keydown.arrowdown","keydown.arrowup"],[3,"tile","selected","playing","activated","transportToggled","actionSelected","menuOpened","captionChanged","titleChanged","captionFormatted","titleFormatted","mediaDropped","brollMoved",4,"ngFor","ngForOf","ngForTrackBy"],["class","scenes-rail-empty",4,"ngIf"],[3,"activated","transportToggled","actionSelected","menuOpened","captionChanged","titleChanged","captionFormatted","titleFormatted","mediaDropped","brollMoved","tile","selected","playing"],[1,"scenes-rail-empty"]];},template:function(t,n){t&1&&(tt(0,"rail-header-v2"),be(1,"div",2),Ze("keydown.arrowdown",function(_){return n.onArrowKey(_,1);})("keydown.arrowup",function(_){return n.onArrowKey(_,-1);}),at(2,rL,2,3,"scene-tile-v2",3),Oe(),at(3,oL,2,0,"p",4)),t&2&&(Ce(2),ke("ngForOf",n.tiles())("ngForTrackBy",n.trackByIndex),Ce(),ke("ngIf",!n.sceneCount()));},dependencies:[Ci,an,ui,M1,D1],styles:[".slides-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin-top:12px}.scenes-rail-empty[_ngcontent-%COMP%]{margin-top:12px;font-family:Inter,sans-serif;font-size:13px;line-height:1.4;color:#25365899}"],changeDetection:0});}}return i;})();vn();mt();_a();La();Or();o_();Xu();Js();Na();hi();xh();lo();a_();mt();_a();lo();YE();s_();qE();mt();hi();Bn();_r();Oo();Yu();_a();Or();Os();mt();var cL="makerV2",nf=class extends va{},j1=(()=>{class i extends Fn{constructor(e){super(e),this.data=e,this.dialogHelper=ct(co),this.eventsService=ct(Ji
825),this.closeIcon="/img/icon-library/symbols/exit-close.svg",this.appVersion=Tr.version,this.dontShowAgain=!1,this.onGotIt=()=>{this.submit();},this.onClose=()=>{this.close();};}onDontShowAgainChange(e){this.dontShowAgain=e,(this.data.onDontShowAgainChange?.(e)??!0)||(this.dontShowAgain=!1,this.data.onDontShowAgainFailed?.());}onSendFeedback(){this.logFeedbackEvent(this.eventsService.events.genericFeature.featureFeedbackStart);let e=new Nh();e.title="Your feedback is important",e.inputPlaceholder="Type your feedback here",e.inputVariant="text-area",e.confirmButtonText="Send",e.showClearButton=!1,e.showValidationErrors=!1,e.onSubmit=n=>{this.logFeedbackEvent(this.eventsService.events.genericFeature.featureFeedback,"send",n?.trim()),this.dialogHelper.close();},e.onClose=()=>{this.logFeedbackEvent(this.eventsService.events.genericFeature.featureFeedback,"dismiss"),this.dialogHelper.close();};let t=new Do();t.panelClass="confirmation-with-input-dialog",this.dialogHelper.open(e,Vh,t);}logFeedbackEvent(e,t,n){this.eventsService.log(e,Ke(Ke({feature:cL},t?{button:t}:{}),n?{text:n}:{}));}static{this.ɵfac=function(t){return new(t||i)(ut(jn));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-alpha-gate-dialog"]],standalone:!0,features:[Mn,Ft],decls:45,vars:5,consts:()=>{let e;e="ALPHA";let t;t="SHIPS WEEKLY";let n;n="Close";let o;o="Don't show this again";let _;_="Welcome to WordPlay";let E;E="You're one of the first people inside. WordPlay is in alpha \u2014 the core works, the edges aren't finished yet.";let x;x="Things can break.";let h;h="Renders may fail and layouts may shift. Keep a copy of anything you can't afford to lose.";let y;y="New features every week.";let b;b="Subtitle styles, overlays and agent skills land continuously \u2014 what's missing today may ship Thursday.";let p;p="Your feedback steers it.";let c;c="Use the feedback button in the toolbar whenever something feels wrong. We read every note.";let d;d=" Got it \u2014 start creating ";let m;m="Alpha build \xB7 v"+"\uFFFD0\uFFFD"+" \xB7 Not for production work";let a;return a="Send feedback",[_,E,x,h,y,b,p,c,d,m,a,[1,"composer-alpha-gate",3,"title","showCloseButton"],["modal-body","",1,"gate"],[1,"gate-header"],[1,"gate-header-text"],[1,"gate-title-row"],[1,"gate-title"],["color","primary","shape","rectangle","size","small","text",e],["color","primary","shape","rounded","size","small","text",t],[1,"gate-subtitle"],["variant","ghost","size","sm","ariaLabel",n,1,"gate-close",3,"clicked","iconContent"],[1,"gate-points"],[1,"point-card"],["aria-hidden","true",1,"point-number"],[1,"point-text"],[1,"point-title"],[1,"point-body"],["variant","primary","size","lg",1,"gate-cta",3,"clicked"],["text",o,1,"gate-dont-show",3,"checked"],[1,"gate-footer"],[1,"gate-build-info"],["type","button",1,"gate-feedback",3,"click"]];},template:function(t,n){t&1&&(be(0,"lib-modal",11)(1,"div",12)(2,"div",13)(3,"div",14)(4,"div",15)(5,"h2",16),li(6,0),Oe(),tt(7,"lib-badge",17)(8,"lib-badge",18),Oe(),be(9,"p",19),li(10,1),Oe()(),be(11,"lib-button-icon",20),Ze("clicked",function(){return n.onClose();}),Oe()(),be(12,"ol",21)(13,"li",22)(14,"span",23),lt(15,"1"),Oe(),be(16,"div",24)(17,"span",25),li(18,2),Oe(),be(19,"span",26),li(20,3),Oe()()(),be(21,"li",22)(22,"span",23),lt(23,"2"),Oe(),be(24,"div",24)(25,"span",25),li(26,4),Oe(),be(27,"span",26),li(28,5),Oe()()(),be(29,"li",22)(30,"span",23),lt(31,"3"),Oe(),be(32,"div",24)(33,"span",25),li(34,6),Oe(),be(35,"span",26),li(36,7),Oe()()()(),be(37,"lib-button",27),Ze("clicked",function(){return n.onGotIt();}),li(38,8),Oe(),be(39,"lib-checkbox",28),Ze("checked",function(_){return n.onDontShowAgainChange(_);}),Oe(),be(40,"div",29)(41,"span",30),li(42,9),Oe(),be(43,"button",31),Ze("click",function(){return n.onSendFeedback();}),li(44,10),Oe()()()()),t&2&&(ke("title","")("showCloseButton",!1),Ce(11),ke("iconContent",n.closeIcon),Ce(28),ke("checked",n.dontShowAgain),Ce(3),Ys(n.appVersion),Xs(42));},dependencies:[Ci,Eh,Ic,vr,Rr,jv],styles:['@charset "UTF-8";.composer-alpha-gate[_ngcontent-%COMP%]{--modal-width: 500px;--modal-gap: 0}.gate[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;width:100%}.gate-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.gate-header-text[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}.gate-title-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}.gate-title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;line-height:1.4;letter-spacing:-.2px;color:#253658}.gate-close[_ngcontent-%COMP%]{flex-shrink:0;margin-top:-2px}.gate-subtitle[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:400;line-height:1.4;letter-spacing:-.14px;color:#4b5563}.gate-points[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.point-card[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid #E1E7F0;border-radius:12px}.point-number[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:22px;height:22px;border:1px solid #C7D9FE;border-radius:999px;font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.14px;color:#2563eb}.point-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.point-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:1.4;color:#253658}.point-body[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:1.4;color:#4b5563}.gate-cta[_ngcontent-%COMP%]{width:100%;--button-min-width: 100%}.gate-dont-show[_ngcontent-%COMP%]{color:#4b5563}.gate-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.4}.gate-build-info[_ngcontent-%COMP%]{flex:1;min-width:0;font-weight:400;color:#9ca3af}.gate-feedback[_ngcontent-%COMP%]{flex-shrink:0;padding:0;border:none;background:none;font:inherit;font-weight:500;color:#4481fd;cursor:pointer}.gate-feedback[_ngcontent-%COMP%]:hover{text-decoration:underline}.gate-feedback[_ngcontent-%COMP%]:focus-visible{border-radius:4px;box-shadow:0 0 0 2px #c7d9fe}']});}}return i;})();mt();var B1="true",F1=(()=>{class i{constructor(){this.storage=ct(Av),this.dialogHelper=ct(co),this.notifier=ct(En),this.userHelper=ct(Ah);}storageKey(){let e=this.userHelper.userData?.userId;return e?`${Zf}:${e}`:Zf;}shouldShow(){return this.storage.load(this.storageKey())!==B1;}setDismissedForever(e){return e?this.storage.save(this.storageKey(),B1):(this.storage.remove(this.storageKey()),!0);}open(){let e=new nf();e.onDontShowAgainChange=n=>this.setDismissedForever(n),e.onDontShowAgainFailed=()=>this.notifier.error("Couldn't save that preference \u2014 your browser is blocking storage."),e.onSubmit=()=>this.dialogHelper.close(),e.onClose=()=>this.dialogHelper.close();let t=new Do();t.panelClass=["common-dialog","composer-alpha-gate-panel"],this.dialogHelper.open(e,j1,t);}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();var hL=()=>[];function pL(i,r){if(i&1){let e=_t();be(0,"composer-compose-bootstrap",10),Ze("composed",function(){$e(e);let n=Le();return We(n.onComposeSettled());}),Oe();}}function fL(i,r){i&1&&tt(0,"composer-video-preview-v2",11),i&2&&ke("sidebarWidth",100)("scenesRailWidth",548)("sceneEditorHeight",243)("headerHeight",57);}function mL(i,r){i&1&&tt(0,"scenes-rail-v2");}function gL(i,r){i&1&&(ti(0),be(1,"div",12),tt(2,"info-panel")(3,"composer-video-slider-wrapper"),Oe(),ii());}function yL(i,r){i&1&&tt(0,"scene-editor");}function vL(i,r){i&1&&tt(0,"composer-agent-sidebar");}var Sg=(()=>{class i{windowBeforeUnload(e){this.savePromptGuardService.isDirty.value&&(cr("composer-v2: unload with unsaved edits",{level:"info",extra:{pendingMs:this.sliderV2StoryService.pendingEditsAgeMs}}),e.preventDefault(),e.returnValue="");}constructor(e,t,n,o,_,E,x,h,y,b,p,c,d,m,a,s,l,g,f,v,S,w,C,I,O,M,N,G,H,B){this.storyService=e,this.videoSlidesService=t,this.dialogHelperService=n,this.sliderV2SlidesActionsService=o,this.savePromptGuardService=_,this.styleVideoService=E,this.route=x,this.router=h,this.composerHttpService=y,this.composerService=b,this.eventsService=p,this.paymentService=c,this.premiumPlanService=d,this.planHelperService=m,this.composerEventsService=a,this.ngxSpinner=s,this.location=l,this.mediaUtilityService=g,this.websocketService=f,this.sliderV2StoryService=v,this.sliderV2AutosaveService=S,this.sliderV2CropService=w,this.composerSlideSelectionService=C,this.sliderV2PlayerService=I,this.sliderV2StudioService=O,this.notifier=M,this.creditsService=N,this.sliderV2SessionService=G,this.alphaGate=H,this.sliderV2Analytics=B,this.sceneEditorHeight=242,this.showComposeBootstrap=!1,this.tutorialCourseId="65e6e55b3550d51d41d5258a",this.tutorialLessonId="",this.tutorialBtnStyle=zh.white,this.tutorialBtnCustomStyle={height:"40px",width:"90px"},this.unsubscribe$=new Yt(),this.discardModalFlag=!0,this.goBackLink=["/boards"],this.saveStatus$=this.videoSlidesService.savingInfo$.pipe(oi(K=>K.isSaving?"saving":K.successfullySaved?"saved":"not-saved"),Ti()),this.lastSavedAt=null,this.isPublishing=!1,this.isFullscreen=!1,this.fullScreenIconUrl="/img/icon-library/basic-ui/full-screen-enter-stroke.svg",this.exitFullscreenIconUrl="/img/icon-library/basic-ui/full-screen-exit-stroke.svg",this.openDiscardModal=()=>{this.dialogHelperService.showUiConfirmationDialog({title:"Save Changes?",msg:"Do you want to save the changes before you quit?",confirmationText:"Save",cancellationText:"No",onSubmit:this.onConfirmation,onClose:this.onDismiss}),this.composerEventsService.log(this.eventsService.events.composer.savePopup);},this.onDismiss=()=>{this.dialogHelperService.close(),this.sliderV2AutosaveService.discardPendingChanges(),this.savePromptGuardService.discard();},this.onConfirmation=()=>kt(this,null,function*(){this.dialogHelperService.close(),yield this.sliderV2AutosaveService.flush(),this.savePromptGuardService.discard(),this.composerEventsService.log(this.eventsService.events.composer.saveStory);}
825),this.paymentService.checkForSuccessPayment(this.route.snapshot.queryParams).then(K=>{let U=this.route.snapshot.url.map(Z=>Z.path).join("/");K&&this.location.replaceState(`composer/${U}`);}),this.composerService.fetchMusicList();let z=this.router.getCurrentNavigation()?.extras?.state?.folderId||history.state?.folderId;z&&(this.goBackLink=["/boards",z]);let te=this.getStoryFromRoute();if(te?.type===Lr.SLIDER_V2){let K=te;this.composerEventsService.videoDuration=K.mainTrack?.video?.duration;}}ngOnInit(){Tr.isLocal&&typeof window<"u"&&(window.__COMPOSER_E2E__={getStorySnapshot:()=>{let e=this.sliderV2StoryService.story()??this.storyService.story;try{return structuredClone(e);}catch{return JSON.parse(JSON.stringify(e));}}}),this.mediaUtilityService.fullscreenState$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{this.isFullscreen=e,this.onFullscreen(e);}),this.story=this.getStoryFromRoute(),this.storyService.clear(),this.story?.type===Lr.SLIDER_V2&&(this.sliderV2StoryService.load(this.story),this.adoptMeasuredMediaDurations(this.story),this.sliderV2Analytics.logOpen(!0)),this.storyHeadline=this.story?.headline,this.showComposeBootstrap=!!this.route.snapshot.data.importState,this.story?.type===Lr.SLIDER_V2&&(this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!0}),this.lastSavedAt=new Date()),this.videoSlidesService.savingInfo$.pipe(Pt(this.unsubscribe$)).subscribe(e=>{e.successfullySaved===!0&&e.isSaving===!1&&(this.lastSavedAt=new Date());}),this.composerHttpService.getWorkspaceBusinessData().then(e=>{Object.keys(e).length===0&&(e.ownerName=this.story?.author?.fullName),this.storyService.hotfix_businessDataUpdated$.next(e);}).catch(e=>{Qt(e),this.storyService.hotfix_businessDataUpdated$.next({ownerName:this.story?.author?.fullName});}),this.showComposeBootstrap||this.openAlphaGateIfNeeded();}onComposeSettled(){this.openAlphaGateIfNeeded();}openAlphaGateIfNeeded(){this.alphaGate.shouldShow()&&this.alphaGate.open();}ngAfterViewInit(){}getStoryFromRoute(){return this.route.snapshot.data.story;}adoptMeasuredMediaDurations(e){let t=this.sliderV2StoryService.session;G_(e).then(n=>this.sliderV2StoryService.adoptMediaDurations(n,t));}get fullscreenIconUrl(){return this.isFullscreen?this.exitFullscreenIconUrl:this.fullScreenIconUrl;}onFullscreenToggle(){this.mediaUtilityService.showFullscreen(document.documentElement);}onFullscreen(e){e?this.composerEventsService.log(this.eventsService.events.composer.enterFullScreen):this.composerEventsService.log(this.eventsService.events.composer.exitFullScreen);}get canStepHistory(){return!this.isPublishing&&!this.sliderV2CropService.isCropping()&&!this.sliderV2SlidesActionsService.timingDialogOpen();}get undoDisabled(){if(this.sliderV2StudioService.isOpening())return!0;let e=this.sliderV2StudioService.isEditing()?this.sliderV2StudioService.canUndo():this.sliderV2StoryService.canUndo();return!this.canStepHistory||!e;}get redoDisabled(){if(this.sliderV2StudioService.isOpening())return!0;let e=this.sliderV2StudioService.isEditing()?this.sliderV2StudioService.canRedo():this.sliderV2StoryService.canRedo();return!this.canStepHistory||!e;}onUndo(){if(this.sliderV2StudioService.isEditing()){this.canStepHistory&&this.sliderV2StudioService.canUndo()&&(this.sliderV2StudioService.undo(),this.composerEventsService.log(this.eventsService.events.composer.undoAction));return;}this.sliderV2StudioService.close(),!(!this.canStepHistory||!this.sliderV2StoryService.undo())&&(this.afterHistoryStep(),this.composerEventsService.log(this.eventsService.events.composer.undoAction));}onRedo(){if(this.sliderV2StudioService.isEditing()){this.canStepHistory&&this.sliderV2StudioService.canRedo()&&(this.sliderV2StudioService.redo(),this.composerEventsService.log(this.eventsService.events.composer.redoAction));return;}this.sliderV2StudioService.close(),!(!this.canStepHistory||!this.sliderV2StoryService.redo())&&(this.afterHistoryStep(),this.composerEventsService.log(this.eventsService.events.composer.redoAction));}onKeydown(e){if(!(e.metaKey||e.ctrlKey)||pu(e.target))return;let t=e.key.toLowerCase(),n=t==="z"&&!e.shiftKey,o=t==="z"&&e.shiftKey||t==="y";!n&&!o||!this.canStepHistory||(e.preventDefault(),n?this.onUndo():this.onRedo());}afterHistoryStep(){let e=this.sliderV2StoryService.story()?.headline;e!==this.storyHeadline&&(this.storyHeadline=e,this.videoSlidesService.storyHeadline$.next(e));let t=this.sliderV2StoryService.story()?.media;if(!t?.length)return;let n=Math.max(0,Math.min(this.composerSlideSelectionService.index(),t.length-1))||0;this.composerSlideSelectionService.select(n);let o=t[n]?.metadata?.time;o!==void 0&&this.sliderV2PlayerService.pauseAtSlide(o,Fr(t,n));}onBackClick(){this.composerEventsService.log(this.eventsService.events.composer.closeStory),this.router.navigate(this.exitLink());}exitLink(){return this.sliderV2SessionService.parentTakesLink()??this.goBackLink;}onCtaButtonClick(){return kt(this,null,function*(){if(!this.isPublishing){this.sliderV2Analytics.logCreate(),this.isPublishing=!0;try{if(yield this.planHelperService.isFreeByCurrentPlan()){this.ngxSpinner.show("subscription-spinner"),yield this.sliderV2AutosaveService.flush(),this.ngxSpinner.hide("subscription-spinner");let n=window.location.pathname.replace(/^\/|\/$/g,"");this.premiumPlanService.openPricingDialog(Mc.PRO,n,n,Rc.videoMakerCreate);return;}if(!sg(yield this.sliderV2AutosaveService.flush()))return;let e=this.sliderV2StoryService.story()?.storyId;
825if(!e){Qt(new Error("Slider v2 create: save succeeded with no storyId")),this.notifier.error("Something went wrong while requesting to generate video.");return;}yield this.composerHttpService.generateSliderV2Video(e),this.sliderV2Analytics.logApplyTheme(),this.notifier.info("Generating video"),this.websocketService.connect(),this.discardModalFlag=!1,(yield this.router.navigate(this.exitLink()).catch(()=>!1))||(this.discardModalFlag=!0);}catch(e){this.creditsService.handleCreditError(e)||(Qt(e),this.notifier.error(e?.responseJSON?.msg||"Something went wrong while requesting to generate video."));}finally{this.isPublishing=!1;}}});}onSaveNowClick(){this.sliderV2AutosaveService.saveNow();}onHeadlineInputValueChange(e){let t=e;this.storyHeadline=t,this.videoSlidesService.storyHeadline$.next(t),this.sliderV2StoryService.setHeadline(t);}ngOnDestroy(){if(typeof window<"u"&&delete window.__COMPOSER_E2E__,this.isFullscreen&&this.mediaUtilityService.showFullscreen(document.documentElement),this.unsubscribe$.next(),this.unsubscribe$.complete(),this.sliderV2StoryService.story()){let e=this.sliderV2StoryService.session;this.sliderV2AutosaveService.flush().finally(()=>this.sliderV2StoryService.clear(e));}else this.sliderV2StoryService.clear();this.sliderV2CropService.close(),this.storyService.totalRenderedVirtualSlides$.next(50),this.storyService.hotfix_themesListUpdated$.next(void 0),this.storyService.hotfix_businessDataUpdated$.next(void 0),this.composerService.musicListUpdated$.next(void 0),this.composerService.clearMusicCache(),this.styleVideoService.styleSidebarCroppingData$.next(void 0),this.videoSlidesService.savingInfo$.next({isSaving:!1,successfullySaved:!1}),this.videoSlidesService.playerStatus$.next({isPlaying:!1}),this.videoSlidesService.playerAction$.next({action:"pause"}),this.videoSlidesService.setPreviewDisabledOnLoadingVideo$.next(!1),this.composerService.imageGeneratorState$.next(void 0);}static{this.ɵfac=function(t){return new(t||i)(ut(zi),ut(Xi),ut(co),ut(hu),ut(So),ut(is),ut(zo),ut(Co),ut(Yn),ut(nr),ut(Ji),ut(Ih),ut(ts),ut(Po),ut(en),ut(ya),ut(Ya),ut(el),ut(Qs),ut(Yi),ut(uu),ut(ol),ut(Rn),ut(Sr),ut(du),ut(En),ut(kh),ut(ml),ut(F1),ut(ls));};}static{this.ɵcmp=Bt({type:i,selectors:[["composer-v2-wrapper"]],hostBindings:function(t,n){t&1&&Ze("beforeunload",function(_){return n.windowBeforeUnload(_);},!1,Sc)("keydown",function(_){return n.onKeydown(_);},!1,wc);},standalone:!0,features:[Wn([{provide:Wh,useValue:"v2"},su,eo,as,en,Hr,el,il,cs,Ca,ap,Rn,ko,iu,Yp,dl,Sr,du,uu,Zp,au,ef,ml,hu,ls]),Ft],decls:16,vars:30,consts:[[3,"undoClick","redoClick","backClick","projectTitleChange","saveClick","projectTitle","placeHolderText","editableTitle","showAIButton","metadata","showSaveButton","saveButtonText","saveButtonLoading","saveButtonDisabled","undoDisabled","redoDisabled"],["slot","right",1,"composer-header-actions"],[3,"featureName","courseId","lessonId","btnStyle","btnCustomStyle"],[3,"saveNowClick","status","lastSavedAt"],["variant","ghost",3,"clicked","iconContent","title"],["name","subscription-spinner","type","none",3,"fullScreen"],[1,"composer-wrapper-container"],[3,"composed",4,"ngIf"],[3,"sidebarWidth","scenesRailWidth","sceneEditorHeight","headerHeight",4,"ngIf"],[4,"ngIf"],[3,"composed"],[3,"sidebarWidth","scenesRailWidth","sceneEditorHeight","headerHeight"],["cdkVirtualScrollingElement","",1,"info-panel-slides-container"]],template:function(t,n){t&1&&(be(0,"lib-header-workspace",0),Ze("undoClick",function(){return n.onUndo();})("redoClick",function(){return n.onRedo();})("backClick",function(){return n.onBackClick();})("projectTitleChange",function(_){return n.onHeadlineInputValueChange(_);})("saveClick",function(){return n.onCtaButtonClick();}),be(1,"div",1),tt(2,"tutorial-button",2),be(3,"composer-save-indicator",3),qi(4,"async"),Ze("saveNowClick",function(){return n.onSaveNowClick();}),Oe(),be(5,"lib-button-icon",4),Ze("clicked",function(){return n.onFullscreenToggle();}),Oe()()(),be(6,"ngx-spinner",5),tt(7,"lottie-loader"),Oe(),be(8,"div",6),at(9,pL,1,0,"composer-compose-bootstrap",7)(10,fL,1,4,"composer-video-preview-v2",8),tt(11,"sidebar"),at(12,mL,1,0,"scenes-rail-v2",9)(13,gL,4,0,"ng-container",9)(14,yL,1,0,"scene-editor",9)(15,vL,1,0,"composer-agent-sidebar",9),Oe()),t&2&&(ke("projectTitle",n.storyHeadline)("placeHolderText","Project title")("editableTitle",!0)("showAIButton",!1)("metadata",Lo(29,hL))("showSaveButton",!0)("saveButtonText",n.isPublishing?"Creating...":"Create")("saveButtonLoading",n.isPublishing)("saveButtonDisabled",n.isPublishing)("undoDisabled",n.undoDisabled)("redoDisabled",n.redo
825Disabled),Ce(2),ke("featureName","Video Maker")("courseId",n.tutorialCourseId)("lessonId",n.tutorialLessonId)("btnStyle",n.tutorialBtnStyle)("btnCustomStyle",n.tutorialBtnCustomStyle),Ce(),ke("status",Qi(4,27,n.saveStatus$))("lastSavedAt",n.lastSavedAt),Ce(2),ke("iconContent",n.fullscreenIconUrl)("title",n.isFullscreen?"Exit fullscreen":"Enter fullscreen"),Ce(),ke("fullScreen",!0),Ce(3),ke("ngIf",n.showComposeBootstrap),Ce(),ke("ngIf",n.sliderV2StoryService.story()),Ce(2),ke("ngIf",n.sliderV2StoryService.story()),Ce(),ke("ngIf",n.storyService.story),Ce(),ke("ngIf",n.sliderV2StoryService.story()),Ce(),ke("ngIf",n.sliderV2StoryService.story()));},dependencies:[ui,ir,_h,Rr,Hh,Kp,h1,y1,gh,zp,Gp,Hp,Qa,Za,aa,Xp,qp,V1],styles:['[_nghost-%COMP%]{--composer-header-height: 56px;display:flex;flex-direction:column;height:calc(100vh - var(--sudo-bar-height, 0px))}lib-header-workspace[_ngcontent-%COMP%]{flex:0 0 auto;border-bottom:1px solid rgba(37,54,88,.0784313725)}.composer-wrapper-container[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;position:relative}.composer-wrapper-container[_ngcontent-%COMP%]{background:linear-gradient(270deg,#f4fbfe 2.37%,#f6f8ff 99.35%);display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:minmax(0,1fr) auto;gap:0px 0px;grid-auto-flow:row;grid-template-areas:"actions-sidebar vdm-previewer slides-sidebar" "actions-sidebar scene-editor slides-sidebar"}composer-video-preview[_ngcontent-%COMP%], composer-video-preview-v2[_ngcontent-%COMP%]{grid-area:vdm-previewer}sidebar[_ngcontent-%COMP%]{grid-area:actions-sidebar}.info-panel-slides-container[_ngcontent-%COMP%], scenes-rail-v2[_ngcontent-%COMP%]{grid-area:slides-sidebar}scenes-rail-v2[_ngcontent-%COMP%]{display:block;width:548px;height:calc(100vh - var(--composer-header-height) - var(--sudo-bar-height, 0px));overflow-y:scroll;overflow-x:hidden;padding:0 20px 100px;border-left:1px solid #E1E7F0;background-color:#fff}scene-editor[_ngcontent-%COMP%]{grid-area:scene-editor;align-self:end;border-top:1px solid #E1E7F0}.info-panel-slides-container[_ngcontent-%COMP%]{width:548px;height:calc(100vh - var(--composer-header-height) - var(--sudo-bar-height, 0px));overflow-y:scroll;overflow-x:hidden;padding-bottom:100px;border-left:1px solid rgba(37,54,88,.0784313725);background-color:#fff}.composer-header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}']});}}return i;})();Ki();Mr();Os();var rf=oo(la());vn();mt();La();lo();var fd=(()=>{class i{constructor(e,t,n,o){this.composerHttpService=e,this.storyService=t,this.router=n,this.notifier=o;}composerInitialSessionState(){return{buildSlideIndex:void 0,audioNorm:!1,storyParent:void 0,introOutroChangeMadeByUndoRedo:!1,scenesChangeMadeByUndoRedo:!1,scenesChangeMadeByStoryHotfix:!1,themesChangeMadeByUndoRedo:!1,resizeChangeMadeByUndoRedo:!1,autoSave:!0,storyOriginalAspectRatio:void 0,bRollFeature:void 0,selectedSlide:void 0,bRollUrlsMap:new Map(),generatedOriginalUrlsMap:new Map(),baseMedia:void 0,isAttachingExternalMedia:!1,overlaysAssetIdMap:new Map(),overlaysExternalIdMap:new Map(),autoZoomSlidesIndexes:[],transformEffectPerLayout:new Map(),personBoundingBoxMap:new Map(),aiChatThread:[]};}resolve(e){if(e.params.captions||e.params.storyId||e.params.storyId&&!e.params.type)return this.captureImportState(e),this.composerHttpService.getComposerStory(e.params.storyId).pipe(Go(t=>{let n=rf.cloneDeep(e.data);n.rawStory=rf.cloneDeep(t),t.composerSessionState=this.composerInitialSessionState(),this.storyService.story=t,e.data=n;}),vc(t=>(Qt(t),t.status===404&&this.notifier.error("Story has been deleted."),this.router.navigate([Tr.globals.projectsPage]),pa(null))));this.router.navigate([Tr.globals.projectsPage]);}captureImportState(e){let t=this.router.getCurrentNavigation()?.extras?.state??history.state,n=t&&!("source"in t)?t:void 0,o=rf.cloneDeep(e.data);o.importState=n,e.data=o;}static{this.ɵfac=function(t){return new(t||i)(Rt(Yn),Rt(zi),Rt(Co),Rt(En));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();Ki();Mr();Os();var U1=oo(la());vn();mt();La();lo();
825var _L=8e3,of=class extends Error{constructor(r){super(`Slider v2 composer does not support story type ${r}`),this.storyType=r,this.name="ComposerV2UnsupportedStoryError";}},wg=(()=>{class i{constructor(e,t,n,o){this.composerHttpService=e,this.vdmPresetsService=t,this.router=n,this.notifier=o;}resolve(e){return e.params.storyId?(this.captureImportState(e),nv([Hu(this.composerHttpService.getSliderV2Story(e.params.storyId)).pipe(Go(t=>this.admitStory(t,e))),Hu(this.vdmPresetsService.fetchAll())]).pipe(oi(([t])=>t),vc(t=>(t instanceof of?this.notifier.info("This project can't be opened in the alpha Video Maker."):t.status===404?(Qt(t),this.notifier.error("This project no longer exists.")):(Qt(t),this.notifier.error("We couldn't open this project. Check your connection and try again.",{duration:_L})),this.abortEntry())))):(this.notifier.info("This project was never saved, so there's nothing to reopen."),this.abortEntry());}abortEntry(){return this.router.navigated||this.router.navigate([Tr.globals.projectsPage]),yc;}admitStory(e,t){if(!(e?.type===Lr.SLIDER_V2||(e?.type===Lr.SCRIPT||e?.type===Lr.SEQUENCE)&&t.data.importState))throw new of(e?.type);}captureImportState(e){let t=this.router.getCurrentNavigation()?.extras?.state??history.state,n=U1.cloneDeep(e.data);n.importState=bL(t)?t:void 0,e.data=n;}static{this.ɵfac=function(t){return new(t||i)(Rt(Yn),Rt(Io),Rt(Co),Rt(En));};}static{this.ɵprov=Zt({token:i,factory:i.ɵfac,providedIn:"root"});}}return i;})();function bL(i){return!i||"source"in i?!1:!!i.mediaId&&!!i.segmentation;}hi();mt();var SL=[{path:"v2",component:Sg,canDeactivate:[So],resolve:{story:wg}},{path:"v2/:storyId",component:Sg,canActivate:[Ku],canDeactivate:[So],resolve:{story:wg}},{path:"",component:pd,canDeactivate:[So],resolve:{story:fd}},{path:":storyId",component:pd,canActivate:[Ku],canDeactivate:[So],resolve:{story:fd}},{path:":storyId/:mediaId",component:pd,canActivate:[Ku],canDeactivate:[So],resolve:{story:fd}},{path:":storyId/:mediaId/:captions",component:pd,canActivate:[Ku],canDeactivate:[So],resolve:{story:fd}}],uK=(()=>{class i{static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵmod=pv({type:i});}static{this.ɵinj=hv({providers:[Vc,h_],imports:[Ci,Pv.forChild(SL)]});}}return i;})();export{uK as ComposerModule,SL as routes};/**i18n:a22416d48d5d315853b2ff30dd429c3cf66bb88014970864ad6c2ff7ea890e29*/ 826//# debugId=abe5d4eb-f0aa-5c28-9c6f-bd43c6241ef2
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.