1const H=(a=X.UNKNOWN_ERR,i,r,c)=>{const o=_o(i)?i.type:zp(i)?X.NETWORK_FAILED_ERR:a,d=du(i)||_o(i)?i.message:"",h=d?`${d} 2 ${r??""}: ${kr(i)}`:`${r??""}: ${kr(i)}`,g=_o(i)&&i.errorArgs!==void 0?i.errorArgs:c;return{__internal:"MediaProcessingError",type:o,message:h,errorArgs:g}},_o=a=>typeof a=="object"&&a!==null&&"__internal"in a,du=a=>a instanceof Error,Xp=a=>a instanceof DOMException,zp=a=>du(a)&&a.name==="TypeError"&&a.message==="Network request failed",Hp=a=>{if(Xp(a))return`DOMException ${a.name}(${a.code}): ${a.message}`;const i=Object.getOwnPropertyNames(a);try{return JSON.stringify(a,i)}catch(r){return`{${i.map(o=>`${o}: ${a[o]}`).join(", ")}} (stringify failed: ${r})`}},kr=a=>{switch(typeof a){case"string":return a;case"undefined":return"undefined";case"function":return`function ${a.name}`;case"number":case"bigint":case"symbol":case"boolean":return a.toString();case"object":return a!==null?Hp(a):"null"}};class $p extends Error{}class vn extends $p{constructor(){super("Zone is an abstract class")}}function Ti(a){return typeof a>"u"}function qp(){try{return typeof Intl<"u"&&Intl.DateTimeFormat}catch{return!1}}function Kp(){return!Ti(Intl.DateTimeFormat.prototype.formatToParts)}function Vs(a,i=2){return a.toString().length<i?("0".repeat(i)+a).slice(-i):a.toString()}function mu(a){if(!(Ti(a)||a===null||a===""))return parseInt(a,10)}function Zp(a){if(!(Ti(a)||a===null||a==="")){const i=parseFloat("0."+a)*1e3;return Math.floor(i)}}function Jp(a){let i=Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute,a.second,a.millisecond);return a.year<100&&a.year>=0&&(i=new Date(i),i.setUTCFullYear(i.getUTCFullYear()-1900)),+i}function Qp(a,i,r,c=null){const o=new Date(a),d={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};c&&(d.timeZone=c);const h=Object.assign({timeZoneName:i},d),g=qp();if(g&&Kp()){const R=new Intl.DateTimeFormat(r,h).formatToParts(o).find(L=>L.type.toLowerCase()==="timezonename");return R?R.value:null}
2else if(g){const R=new Intl.DateTimeFormat(r,d).format(o);return new Intl.DateTimeFormat(r,h).format(o).substring(R.length).replace(/^[, \u200e]+/,"")}else return null}function Au(a,i){let r=parseInt(a,10);Number.isNaN(r)&&(r=0);const c=parseInt(i,10)||0,o=r<0||Object.is(r,-0)?-c:c;return r*60+o}function So(a,i){const r=Math.trunc(a/60),c=Math.abs(a%60),o=r>=0&&!Object.is(r,-0)?"+":"-",d=`${o}${Math.abs(r)}`;switch(i){case"short":return`${o}${Vs(Math.abs(r),2)}:${Vs(c,2)}`;case"narrow":return c>0?`${d}:${c}`:d;case"techie":return`${o}${Vs(Math.abs(r),2)}${Vs(c,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}const pu=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;class gu{get type(){throw new vn}get name(){throw new vn}get universal(){throw new vn}offsetName(i,r){throw new vn}formatOffset(i,r){throw new vn}offset(i){throw new vn}equals(i){throw new vn}get isValid(){throw new vn}}const jp=RegExp(`^${pu.source}$`);let xs={};function eg(a){return xs[a]||(xs[a]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),xs[a]}const tg={year:0,month:1,day:2,hour:3,minute:4,second:5};function ng(a,i){const r=a.format(i).replace(/\u200E/g,""),c=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r),[,o,d,h,g,R,L]=c;return[h,o,d,g,R,L]}function rg(a,i){const r=a.formatToParts(i),c=[];for(let o=0;o<r.length;o++){const{type:d,value:h}=r[o],g=tg[d];Ti(g)||(c[g]=parseInt(h,10))}return c}let Is={};class Fs extends gu{static create(i){return Is[i]||(Is[i]=new Fs(i)),Is[i]}static resetCache(){Is={},xs={}}static isValidSpecifier(i){return!!(i&&i.match(jp))}static isValidZone(i){try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}static parseGMTOffset(i){if(i){const r=i.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(r)return-60*parseInt(r[1])}return null}constructor(i){super(),this.zoneName=i,this.valid=Fs.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get universal(){return!1}offsetName(i,{format:r,locale:c}){return Qp(i,r,c,this.name)}formatOffset(i,r){return So(this.offset(i),r)}offset(i){const r=new Date(i),c=eg(this.name),[o,d,h,g,R,L]=c.formatToParts?rg(c,r):ng(c,r),b=Jp({year:o,month:d,day:h,hour:g===24?0:g,minute:R,second:L,millisecond:0});let I=+r;const N=I%1e3;return I-=N>=0?N:1e3+N,(b-I)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let co=null;class Fr extends gu{static get utcInstance(){return co===null&&(co=new Fr(0)),co}static instance(i){return i===0?Fr.utcInstance:new Fr(i)}static parseSpecifier(i){if(i){const r=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new Fr(Au(r[1],r[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${So(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,r){return So(this.fixed,r)}get universal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}function Ur(...a){const i=a.reduce((r,c)=>r+c.source,"");return RegExp(`^${i}$`)}function Br(...a){return i=>a.reduce(([r,c,o],d)=>{const[h,g,R]=d(i,o);return[Object.assign(r,h),c||g,R]},[{},null,1]).slice(0,2)}function Eu(...a){return(i,r)=>{const c={};let o;for(o=0;o<a.length;o++)c[a[o]]=mu(i[r+o]);return[c,null,r+o]}}const Cu=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Tu=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,Su=RegExp(`${Tu.source}${Cu.source}?`),Po=RegExp(`(?:T${Su.source})?`),ig=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,sg=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ag=/(\d{4})-?(\d{3})/,og=Eu("weekYear","weekNumber","weekDay"),_g=Eu("year","ordinal"),cg=/(\d{4})-(\d\d)-(\d\d)/,Ru=RegExp(`${Tu.source} ?(?:${Cu.source}|(${pu.source}
2))?`),ug=RegExp(`(?: ${Ru.source})?`);function Mr(a,i,r){const c=a[i];return Ti(c)?r:mu(c)}function Vu(a,i){return[{year:Mr(a,i),month:Mr(a,i+1,1),day:Mr(a,i+2,1)},null,i+3]}function Gr(a,i){return[{hour:Mr(a,i,0),minute:Mr(a,i+1,0),second:Mr(a,i+2,0),millisecond:Zp(a[i+3])},null,i+4]}function Si(a,i){const r=!a[i]&&!a[i+1],c=Au(a[i+1],a[i+2]),o=r?null:Fr.instance(c);return[{},o,i+3]}function Iu(a,i){const r=a[i]?Fs.create(a[i]):null;return[{},r,i+1]}Ur(ig,Po);Ur(sg,Po);Ur(ag,Po);Ur(Su);Br(Vu,Gr,Si);Br(og,Gr,Si);Br(_g,Gr);Br(Gr,Si);Ur(cg,ug);Ur(Ru);Br(Vu,Gr,Si,Iu);Br(Gr,Si,Iu);const vu={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}};Object.assign({years:{months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3}},vu);const Rt=146097/400,Lr=146097/4800;Object.assign({years:{months:12,weeks:Rt/7,days:Rt,hours:Rt*24,minutes:Rt*24*60,seconds:Rt*24*60*60,milliseconds:Rt*24*60*60*1e3},quarters:{months:3,weeks:Rt/28,days:Rt/4,hours:Rt*24/4,minutes:Rt*24*60/4,seconds:Rt*24*60*60/4,milliseconds:Rt*24*60*60*1e3/4},months:{weeks:Lr/7,days:Lr,hours:Lr*24,minutes:Lr*24*60,seconds:Lr*24*60*60,milliseconds:Lr*24*60*60*1e3}},vu);class ue{static _zero=new ue(0);_micros;constructor(i){this._micros=i}static fromUS(i){return new ue(Math.round(i))}static fromMS(i){return new ue(Math.round(i*1e3))}static fromSec(i){return new ue(Math.round(i*1e6))}static zero(){return ue._zero}static doOverlap(i,r,c,o){return i.lt(o)&&c.lt(r)}get as(){return{us:(i="raw",r)=>ue._round(this._micros,i,r),ms:(i="raw",r)=>ue._round(this._micros/1e3,i,r),sec:(i="raw",r)=>ue._round(this._micros/1e6,i,r)}}lt(i){return this._micros<i._micros}lte(i){return this._micros<=i._micros}gt(i){return this._micros>i._micros}gte(i){return this._micros>=i._micros}eq(i,r=0){return Math.abs(this._micros-i._micros)<=r}add(i){return new ue(this._micros+i._micros)}sub(i){return new ue(this._micros-i._micros)}mul(i){return new ue(Math.round(this._micros*i))}div(i){if(i===0)throw new Error("Division by zero at Time.div");return new ue(Math.round(this._micros/i))}mod(i){if(i._micros===0)throw new Error("Division by zero at Time.mod");const r=this._micros%i._micros;return new ue(r)}roundTo(i=0){return ue.fromUS(this.as.us("round",i))}static compare(i,r){return i._micros-r._micros}static min(...i){if(i.length===0)throw new Error("Time.min requires at least one Time argument");let r=i[0];for(const c of i)c._micros<r._micros&&(r=c);return r}static max(...i){if(i.length===0)throw new Error("Time.max requires at least one Time argument");let r=i[0];for(const c of i)c._micros>r._micros&&(r=c);return r}
2static _round(i,r,c){if(r==="raw")return i;const o=10**(c??0);switch(r){case"round":return Math.round(i/o)*o;case"floor":return Math.floor(i/o)*o;case"ceil":return Math.ceil(i/o)*o}}}const Zn=(a,i)=>Math.round(a.as.sec()*i),uo=(a,i)=>ue.fromSec(a/i),Ou=a=>new Promise(i=>setTimeout(i,a)),Us=(a,i,r)=>{const c=setTimeout(()=>r(),i);return a.then(()=>clearTimeout(c),()=>clearTimeout(c)),a},lg=(a,i)=>{let r;return new Promise((c,o)=>{r=setTimeout(()=>o(new Error("Timeout")),i),a.then(c,o).finally(()=>clearTimeout(r))})},Pu=async(a,i,r,c)=>{let o;for(let d=0;d<=i;d++)try{if(d>0&&o)try{c?.(o,d),await Ou(r(d))}catch{}return await a()}catch(h){o=h}throw o};function Nc(a,i){(i==null||i>a.length)&&(i=a.length);for(var r=0,c=Array(i);r<i;r++)c[r]=a[r];return c}function fg(a){if(Array.isArray(a))return a}function hg(a,i){var r=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(r!=null){var c,o,d,h,g=[],R=!0,L=!1;try{if(d=(r=r.call(a)).next,i!==0)for(;!(R=(c=d.call(r)).done)&&(g.push(c.value),g.length!==i);R=!0);}catch(y){L=!0,o=y}finally{try{if(!R&&r.return!=null&&(h=r.return(),Object(h)!==h))return}finally{if(L)throw o}}return g}}function dg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mg(a,i){return fg(a)||hg(a,i)||Ag(a,i)||dg()}function Ag(a,i){if(a){if(typeof a=="string")return Nc(a,i);var r={}.toString.call(a).slice(8,-1);return r==="Object"&&a.constructor&&(r=a.constructor.name),r==="Map"||r==="Set"?Array.from(a):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nc(a,i):void 0}}const wu=Object.entries,kc=Object.setPrototypeOf,pg=Object.isFrozen,gg=Object.getPrototypeOf,Eg=Object.getOwnPropertyDescriptor;let Be=Object.freeze,Ge=Object.seal,xr=Object.create,Lu=typeof Reflect<"u"&&Reflect,Ro=Lu.apply,Vo=Lu.construct;Be||(Be=function(i){return i});Ge||(Ge=function(i){return i});Ro||(Ro=function(i,r){for(var c=arguments.length,o=new Array(c>2?c-2:0),d=2;d<c;d++)o[d-2]=arguments[d];return i.apply(r,o)});Vo||(Vo=function(i){for(var r=arguments.length,c=new Array(r>1?r-1:0),o=1;o<r;o++)c[o-1]=arguments[o];return new i(...c)});const yr=Le(Array.prototype.forEach),Cg=Le(Array.prototype.lastIndexOf),Uc=Le(Array.prototype.pop),br=Le(Array.prototype.push),Tg=Le(Array.prototype.splice),wn=Array.isArray,pi=Le(String.prototype.toLowerCase),lo=Le(String.prototype.toString),Bc=Le(String.prototype.match),mi=Le(String.prototype.replace),Gc=Le(String.prototype.indexOf),Sg=Le(String.prototype.trim),Rg=Le(Number.prototype.toString),Vg=Le(Boolean.prototype.toString),Wc=typeof BigInt>"u"?null:Le(BigInt.prototype.toString),Yc=typeof Symbol>"u"?null:Le(Symbol.prototype.toString),Fe=Le(Object.prototype.hasOwnProperty),Ai=Le(Object.prototype.toString),De=Le(RegExp.prototype.test),Jn=Ig(TypeError);function Le(a){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var r=arguments.length,c=new Array(r>1?r-1:0),o=1;o<r;o++)c[o-1]=arguments[o];return Ro(a,i,c)}}function Ig(a){return function(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return Vo(a,r)}}function ce(a,i){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pi;if(kc&&kc(a,null),!wn(i))return a;let c=i.length;for(;c--;){let o=i[c];if(typeof o=="string"){const d=r(o);d!==o&&(pg(i)||(i[c]=d),o=d)}a[o]=!0}return a}function vg(a){for(let i=0;i<a.length;i++)Fe(a,i)||(a[i]=null);return a}function He(a){const i=xr(null);for(const c of wu(a)){var r=mg(c,2);const o=r[0],d=r[1];Fe(a,o)&&(wn(d)?i[o]=vg(d):d&&typeof d=="object"&&d.constructor===Object?i[o]=He(d):i[o]=d)}return i}function Og(a){switch(typeof a){case"string":return a;case"number":return Rg(a);case"boolean":return Vg(a);case"bigint":return Wc?Wc(a):"0";case"symbol":return Yc?Yc(a):"Symbol()";case"undefined":return Ai(a);case"function":case"object":{if(a===null)return Ai(a);const i=a,r=bt(i,"toString");if(typeof r=="function"){const c=r(i);return typeof c=="string"?c:Ai(c)}return Ai(a)}default:return Ai(a)}}function bt(a,i){for(;a!==null;){const c=Eg(a,i);if(c){if(c.get)return Le(c.get);if(typeof c.value=="function")return Le(c.value)}a=gg(a)}function r(){return null}return r}function Pg(a){try{return De(a,""),!0}catch{return!1}}const Xc=Be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fo=Be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ho=Be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wg=Be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mo=Be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Lg=Be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zc=Be(["#text"]),Hc=Be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
3spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ao=Be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$c=Be(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vs=Be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yg=Ge(/{{[\w\W]*|^[\w\W]*}}/g),bg=Ge(/<%[\w\W]*|^[\w\W]*%>/g),xg=Ge(/\${[\w\W]*/g),Dg=Ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),Fg=Ge(/^aria-[\-\w]+$/),qc=Ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mg=Ge(/^(?:\w+script|data):/i),Ng=Ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kg=Ge(/^html$/i),Ug=Ge(/^[a-z][.\w]*(-[.\w]+)+$/i),Kc=Ge(/<[/\w!]/g),Zc=Ge(/<[/\w]/g),Bg=Ge(/<\/no(script|embed|frames)/i),Gg=Ge(/\/>/i),lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wg=function(){return typeof window>"u"?null:window},Yg=function(i,r){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let c=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(c=r.getAttribute(o));const d="dompurify"+(c?"#"+c:"");try{return i.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},Jc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},On=function(i,r,c,o){return Fe(i,r)&&wn(i[r])?ce(o.base?He(o.base):{},i[r],o.transform):c};function yu(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wg();const i=w=>yu(w);if(i.version="3.4.13",i.removed=[],!a||!a.document||a.document.nodeType!==lt.document||!
vendor: 4,437 bytes, line 3
3a.Element)return i.isSupported=!1,i;let r=a.document;const c=r,o=c.currentScript;a.DocumentFragment;const d=a.HTMLTemplateElement,h=a.Node,g=a.Element,R=a.NodeFilter,L=a.NamedNodeMap;L===void 0&&(a.NamedNodeMap||a.MozNamedAttrMap),a.HTMLFormElement;const y=a.DOMParser,b=a.trustedTypes,I=g.prototype,N=bt(I,"cloneNode"),W=bt(I,"remove"),$=bt(I,"nextSibling"),Y=bt(I,"childNodes"),U=bt(I,"parentNode"),F=bt(I,"shadowRoot"),B=bt(I,"attributes"),z=h&&h.prototype?bt(h.prototype,"nodeType"):null,ge=h&&h.prototype?bt(h.prototype,"nodeName"):null,Me=h&&h.prototype?bt(h.prototype,"ownerDocument"):null;if(typeof d=="function"){const w=r.createElement("template");w.content&&w.content.ownerDocument&&(r=w.content.ownerDocument)}let K,Ae="",$e,xt=!1,Vt=0;const Vi=function(){if(Vt>0)throw Jn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},rn=function(f){Vi(),Vt++;try{return K.createHTML(f)}finally{Vt--}},Ii=function(f){Vi(),Vt++;try{return K.createScriptURL(f)}finally{Vt--}},Gs=function(){return xt||($e=Yg(b,o),xt=!0),$e},tr=r,It=tr.implementation,vt=tr.createNodeIterator,Ws=tr.createDocumentFragment,nr=tr.getElementsByTagName,ft=c.importNode;let Ee=Jc();i.isSupported=typeof wu=="function"&&typeof U=="function"&&It&&It.createHTMLDocument!==void 0;const Ys=yg,Xs=bg,sn=xg,rr=Dg,zs=Fg,Ln=Mg,an=Ng,Hs=Ug;let yn=qc,de=null;const ir=ce({},[...Xc,...fo,...ho,...mo,...zc]);let ae=null;const Gt=ce({},[...Hc,...Ao,...$c,...vs]);let Ve=Object.seal(xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),qe=null,Wr=null;const Dt=Object.seal(xr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let on=!0,Ke=!0,_n=!1,bn=!0,Ft=!1,je=!0,Wt=!1,Yt=!1,Ot=null,cn=null,xn=!1,Mt=!1,un=!1,ln=!1,sr=!0,ar=!1;const or="user-content-";let Dn=!0,_r=!1,fn={},ht=null;const cr=ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Yr=null;const vi=ce({},["audio","video","img","source","image","track"]);let Xr=null;const Oi=ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ur="http://www.w3.org/1998/Math/MathML",Fn="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml";let hn=dt,zr=!1,Mn=null;const $s=ce({},[ur,Fn,dt],lo),lr=Be(["mi","mo","mn","ms","mtext"]);let Hr=ce({},lr);const Pi=Be(["annotation-xml"]);let $r=ce({},Pi);const qs=ce({},["title","style","font","a","script"]);let Nn=null;const Ks=["application/xhtml+xml","text/html"],Zs="text/html";let Te=null,Xt=null;const Js=r.createElement("form"),wi=function(f){return f instanceof RegExp||f instanceof Function},qr=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Xt&&Xt===f)return;(!f||typeof f!="object")&&(f={}),f=He(f),Nn=Ks.indexOf(f.PARSER_MEDIA_TYPE)===-1?Zs:f.PARSER_MEDIA_TYPE,Te=Nn==="application/xhtml+xml"?lo:pi,de=On(f,"ALLOWED_TAGS",ir,{transform:Te}),ae=On(f,"ALLOWED_ATTR",Gt,{transform:Te}),Mn=On(f,"ALLOWED_NAMESPACES",$s,{transform:lo}),Xr=On(f,"ADD_URI_SAFE_ATTR",Oi,{transform:Te,base:Oi}),Yr=On(f,"ADD_DATA_URI_TAGS",vi,{transform:Te,base:vi}),ht=On(f,"FORBID_CONTENTS",cr,{transform:Te}),qe=On(f,"FORBID_TAGS",He({}),{transform:Te}),Wr=On(f,"FORBID_ATTR",He({}),{transform:Te}),fn=Fe(f,"USE_PROFILES")?f.USE_PROFILES&&typeof f.USE_PROFILES=="object"?He(f.USE_PROFILES):f.USE_PROFILES:!1,on=f.ALLOW_ARIA_ATTR!==!1,Ke=f.ALLOW_DATA_ATTR!==!1,_n=f.ALLOW_UNKNOWN_PROTOCOLS||!1,bn=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=f.SAFE_FOR_TEMPLATES||!1,je=f.SAFE_FOR_XML!==!1,Wt=f.WHOLE_DOCUMENT||!1,Mt=f.RETURN_DOM||!1,un=f.RETURN_DOM_FRAGMENT||!1,ln=f.RETURN_TRUSTED_TYPE||!1,xn=f.FORCE_BODY||!1,sr=f.SANITIZE_DOM!==!1,ar=f.SANITIZE_NAMED_PROPS||!1,Dn=f.KEEP_CONTENT!==!1,_r=f.IN_PLACE||!1,yn=Pg(f.ALLOWED_URI_REGEXP)?f.ALLOWED_URI_REGEXP:qc,hn=typeof f.NAMESPACE=="str
3ing"?f.NAMESPACE:dt,Hr=Fe(f,"MATHML_TEXT_INTEGRATION_POINTS")&&f.MATHML_TEXT_INTEGRATION_POINTS&&typeof f.MATHML_TEXT_INTEGRATION_POINTS=="object"?He(f.MATHML_TEXT_INTEGRATION_POINTS):ce({},lr),$r=Fe(f,"HTML_INTEGRATION_POINTS")&&f.HTML_INTEGRATION_POINTS&&typeof f.HTML_INTEGRATION_POINTS=="object"?He(f.HTML_INTEGRATION_POINTS):ce({},Pi);const C=Fe(f,"CUSTOM_ELEMENT_HANDLING")&&f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING=="object"?He(f.CUSTOM_ELEMENT_HANDLING):xr(null);if(Ve=xr(null),Fe(C,"tagNameCheck")&&wi(C.tagNameCheck)&&(Ve.tagNameCheck=C.tagNameCheck),Fe(C,"attributeNameCheck")&&wi(C.attributeNameCheck)&&(Ve.attributeNameCheck=C.attributeNameCheck),Fe(C,"allowCustomizedBuiltInElements")&&typeof C.allowCustomizedBuiltInElements=="boolean"&&(Ve.allowCustomizedBuiltInElements=C.allowCustomizedBuiltInElements),Ge(Ve),Ft&&(Ke=!1),un&&(Mt=!0),fn&&(de=ce({},zc),ae=xr(null),fn.html===!0&&(ce(de,Xc),ce(ae,Hc)),fn.svg===!0&&(ce(de,fo),ce(ae,Ao),ce(ae,vs)),fn.svgFilters===!0&&(ce(de,ho),ce(ae,Ao),ce(ae,vs)),fn.mathMl===!0&&(ce(de,mo),ce(ae,$c),ce(ae,vs))),Dt.tagCheck=null,Dt.attributeCheck=null,Fe(f,"ADD_TAGS")&&(typeof f.ADD_TAGS=="function"?Dt.tagCheck=f.ADD_TAGS:wn(f.ADD_TAGS)&&(de===ir&&(de=He(de)),ce(de,f.ADD_TAGS,Te))),Fe(f,"ADD_ATTR")&&(typeof f.ADD_ATTR=="function"?Dt.attributeCheck=f.ADD_ATTR:wn(f.ADD_ATTR)&&(ae===Gt&&(ae=He(ae)),ce(ae,f.ADD_ATTR,Te))),Fe(f,"ADD_URI_SAFE_ATTR")&&wn(f.ADD_URI_SAFE_ATTR)&&ce(Xr,f.ADD_URI_SAFE_ATTR,Te),Fe(f,"FORBID_CONTENTS")&&wn(f.FORBID_CONTENTS)&&(ht===cr&&(ht=He(ht)),ce(ht,f.FORBID_CONTENTS,Te)),Fe(f,"ADD_FORBID_CONTENTS")&&wn(f.ADD_FORBID_CONTENTS)&&(ht===cr&&(ht=He(ht)),ce(ht,f.ADD_FORBID_CONTENTS,Te)),Dn&&(de["#text"]=!0),Wt&&ce(de,["html","head","body"]),de.table&&(ce(de,["tbody"]),delete qe.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const P=K;K=f.TRUSTED_TYPES_POLICY;try{Ae=rn("")}catch(M){throw K=P,M}}else f.TRUSTED_TYPES_POLICY===null?(K=void 0,Ae=""):(K===void 0&&(K=Gs()),K&&typeof Ae=="string"&&(Ae=rn("")));Be&&Be(f),Xt=f},Li=ce({},[...fo,...ho,...wg]),yi=ce({},[...mo,...Lg]),Qs=function(f,C,P){return C.namespaceURI===dt?f==="svg":C.namespaceURI===ur?f==="svg"&&(P==="annotation-xml"||Hr[P]):!!Li[f]},fr=function(f,C,P){return C.namespaceURI===dt?f==="math":C.namespaceURI===Fn?f==="math"&&$r[P]:!!yi[f]},js=function(f,C,P){return C.namespaceURI===Fn&&!$r[P]||C.namespaceURI===ur&&!Hr[P]?!1:!yi[f]&&(qs[f]||!Li[f])},hr=function(f){let C=U(f);(!C||!C.tagName)&&(C={namespaceURI:hn,tagName:"template"});const P=pi(f.tagName),M=pi(C.tagName);return Mn[f.namespaceURI]?f.namespaceURI===Fn?Qs(P,C,M):f.namespaceURI===ur?fr(P,C,M):f.namespaceURI===dt?js(P,C,M):!!(Nn==="application/xhtml+xml"&&Mn[f.namespaceURI]):!1},Nt=function(f){br(i.removed,{element:f});try{U(f).removeChild(f)}catch{if(W(f),!U(f))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dr=function(f){dn(f);const C=Y(f);if(C){const M=[];yr(C,G=>{br(M,G)}),yr(M,G=>{try{W(G)}catch{}})}const P=B(f);if(P)for(let M=P.length-1;M>=0;--M){const G=P[M],Q=G&&G.name;if(typeof Q=="string")try{f.removeAttribute(Q)}catch{}}},zt=function(f,C){try{br(i.removed,{attribute:C.getAttributeNode(f),from:C})}catch{br(i.removed,{attribute:null,from:C})}if(C.removeAttribute(f),f==="is")if(Mt||un)try{Nt(C)}catch{}else try{C.setAttribute(f,"")}catch{}},bi=function(f){const C=B(f);if(C)for(let P=C.length-1;P>=0;--P){const M=C[P],G=M&&M.name;if(!(typeof G!="string"||ae[Te(G)]))try{f.removeAttribute(G)}catch{}}},dn=function(f){const C=[f];for(;C.length>0;){const P=C.pop();(z?z(P):P.nodeType)===lt.element&&bi(P);const G=Y(P);if(G)for(let Q=G.length-1;Q>=0;--Q)C.push(G[Q])}},xi=function(f){if(!je)return;const C=[f];for(;C.length>0;){const P=C.pop(),M=z?z(P):P.nodeType;if(M===lt.processingInstruction||M===lt.comment&&De(Zc,P.data)){try{W(P)}catch{}continue}if(M===lt.element){const Q=P,le=Te(ge?ge(P):P.nodeName);try{Q.hasAttribute&&Q.hasAttribute("patchsrc")&&Q.removeAttribute("patchsrc"),Q.hasAttribute&&Q.hasAttribute("for")&&le!=="label"&&le!=="output"&&Q.removeAttribute("for")}catch{}}const G=Y(P);if(G)for(let Q=G.length-1;Q>=0;--Q)C.push(G[Q])}},Di=function(f){let C=null,P=null;if(xn)f="<remove></remove>"+f;else{const Q=Bc(f,/^[\r\n\t ]+/);P=Q&&Q[0]}Nn==="application/xhtml+xml"&&hn===dt&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const M=K?rn(f):f;if(hn===dt)try{C=new y().parseFromString(M,Nn)}catch{}if(!C||!C.documentElement){C=It.createDocument(hn,"template",null);try{C.documentElement.innerHTML=zr?Ae:M}catch{}}const G=C.body||C.documentElement;return f&&P&&G.insertBefore(r.createTextNode(P),G.childNodes[0]||null),hn===dt?nr.call(C,Wt?"html":"body")[0]:Wt?C.documentElement:G},Fi=function(f){const C=Me?Me(f):f.ownerDocument;return vt.call(C||f,f,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},mr=function(f){return f=mi(f,Ys," "),f=mi(f,Xs," "),f=mi(f,sn," "),f},Kr=function(f){var C;f.normalize();const P=Me?Me(f):f.ownerDocument,M=vt.call(P||f,f,R.SHOW_TEXT|R.SHOW_COMMENT|R.SHOW_CDATA_SECTION|R.SHOW_PROCESSING_INSTRUCTION,null);let G=M.nextNode();for(;G;)G.data=mr(G.data),G=M.nextNode();const Q=(C=f.querySelectorAll)===null||C===void 0?void 0:C.call(f,"template");Q&&yr(Q,le=>{Ht(le.content)&&Kr(le.content)})},kn=function(f){const C=ge?ge(f):null;return typeof C!="string"||Te(C)!=="form"?!1:typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||f.attributes!==B(f)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function"||f.nodeType!==z(f)||f.childNodes!==Y(f)},Ht=function(f){if(!z||typeof f!="object"||f===null)return!1;try{return z(f)===lt.documentFragment}catch{return!1}},mn=function(f){if(!z||typeof f!="object"||f===null)return!1;try{return typeof z(f)=="number"}catch{return!1}};function et(w,f,C){w.length!==0&&yr(w,P=>{P.call(i,f,C,Xt)})}const ea=function(f,C){return!!(je&&f.hasChildNodes()&&!mn(f.firstElementChild)&&De(Kc,f.textContent)&&De(Kc,f.innerHTML)||je&&f.namespaceURI===dt&&C==="style"&&mn(f.firstElementChild)||f.nodeType===lt.processingInstruction||je&&f.nodeType===lt.comment&&De(Zc,f.data))},Mi=function(f,C,P){if(!qe[C]&&Jr(C)&&(Ve.tagNameCheck instanceof RegExp&&De(Ve.tagNameCheck,C)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(C)))return!1;if(Dn&&!ht[C]){const M=U(f),G=Y(f);if(G&&M){const Q=G.length;for(let le=Q-1;le>=0;--le){const Se=f===P?N(G[le],!0):G[le];M.insertBefore(Se,$(f))}}}return Nt(f),!0},Un=function(f,C,P,M){return f.length===0?C:C===P||C===M?He(C):C}
3,Zr=function(f,C){if(et(Ee.beforeSanitizeElements,f,null),f!==C&&U(f)===null)return _r&&dn(f),!0;if(kn(f))return Nt(f),!0;const P=Te(ge?ge(f):f.nodeName);if(de=Un(Ee.uponSanitizeElement,de,ir,Ot),et(Ee.uponSanitizeElement,f,{tagName:P,allowedTags:de}),f!==C&&U(f)===null)return _r&&dn(f),!0;if(ea(f,P))return Nt(f),!0;if(qe[P]||!(Dt.tagCheck instanceof Function&&Dt.tagCheck(P))&&!de[P]){const G=Mi(f,P,C);return G===!1&&et(Ee.afterSanitizeElements,f,null),G}if((z?z(f):f.nodeType)===lt.element&&!hr(f)||(P==="noscript"||P==="noembed"||P==="noframes")&&De(Bg,f.innerHTML))return Nt(f),!0;if(Ft&&f.nodeType===lt.text){const G=mr(f.textContent);f.textContent!==G&&(br(i.removed,{element:f.cloneNode()}),f.textContent=G)}return et(Ee.afterSanitizeElements,f,null),!1},Ni=function(f,C,P){if(Wr[C]||je&&C==="patchsrc"||je&&C==="for"&&f!=="label"&&f!=="output"||sr&&(C==="id"||C==="name")&&(P in r||P in Js))return!1;const M=ae[C]||Dt.attributeCheck instanceof Function&&Dt.attributeCheck(C,f);if(!(Ke&&De(rr,C))){if(!(on&&De(zs,C))){if(M){if(!Xr[C]){if(!De(yn,mi(P,an,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&f!=="script"&&Gc(P,"data:")===0&&Yr[f])){if(!(_n&&!De(Ln,mi(P,an,"")))){if(P)return!1}}}}}else if(!(Jr(f)&&(Ve.tagNameCheck instanceof RegExp&&De(Ve.tagNameCheck,f)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(f))&&(Ve.attributeNameCheck instanceof RegExp&&De(Ve.attributeNameCheck,C)||Ve.attributeNameCheck instanceof Function&&Ve.attributeNameCheck(C,f))||C==="is"&&Ve.allowCustomizedBuiltInElements&&(Ve.tagNameCheck instanceof RegExp&&De(Ve.tagNameCheck,P)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(P))))return!1}}return!0},ki=ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jr=function(f){return!ki[pi(f)]&&De(Hs,f)},Qr=function(f,C,P,M){if(K&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!P)switch(b.getAttributeType(f,C)){case"TrustedHTML":return rn(M);case"TrustedScriptURL":return Ii(M)}return M},ta=function(f,C,P,M){try{P?f.setAttributeNS(P,C,M):f.setAttribute(C,M),kn(f)?Nt(f):Uc(i.removed)}catch{zt(C,f)}},jr=function(f){et(Ee.beforeSanitizeAttributes,f,null);const C=f.attributes;if(!C||kn(f))return;ae=Un(Ee.uponSanitizeAttribute,ae,Gt,cn);const P={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0};let M=C.length;const G=Te(f.nodeName);for(;M--;){const Q=C[M],le=Q.name,Se=Q.namespaceURI,We=Q.value,Ye=Te(le),Ar=We;let Ne=le==="value"?Ar:Sg(Ar);if(P.attrName=Ye,P.attrValue=Ne,P.keepAttr=!0,P.forceKeepAttr=void 0,et(Ee.uponSanitizeAttribute,f,P),Ne=P.attrValue,ar&&(Ye==="id"||Ye==="name")&&Gc(Ne,or)!==0&&(zt(le,f),Ne=or+Ne),je&&De(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ne)){zt(le,f);continue}if(Ye==="attributename"&&Bc(Ne,"href")){zt(le,f);continue}if(!P.forceKeepAttr){if(!P.keepAttr){zt(le,f);continue}if(!bn&&De(Gg,Ne)){zt(le,f);continue}if(Ft&&(Ne=mr(Ne)),!Ni(G,Ye,Ne)){zt(le,f);continue}Ne=Qr(G,Ye,Se,Ne),Ne!==Ar&&ta(f,le,Se,Ne)}}et(Ee.afterSanitizeAttributes,f,null)},An=function(f){let C=null;const P=Fi(f);for(et(Ee.beforeSanitizeShadowDOM,f,null);C=P.nextNode();)if(et(Ee.uponSanitizeShadowNode,C,null),Zr(C,f),jr(C),Ht(C.content)&&An(C.content),(z?z(C):C.nodeType)===lt.element){const G=F(C);Ht(G)&&(Bn(G),An(G))}et(Ee.afterSanitizeShadowDOM,f,null)},Bn=function(f){const C=[{node:f,shadow:null}];for(;C.length>0;){const P=C.pop();if(P.shadow){An(P.shadow);continue}const M=P.node,Q=(z?z(M):M.nodeType)===lt.element,le=Y(M);if(le)for(let Se=le.length-1;Se>=0;--Se)C.push({node:le[Se],shadow:null});if(Q){const Se=ge?ge(M):null;if(typeof Se=="string"&&Te(Se)==="template"){const We=M.content;Ht(We)&&C.push({node:We,shadow:null})}}if(Q){const Se=F(M);Ht(Se)&&C.push({node:null,shadow:Se},{node:Se,shadow:null})}}};return i.sanitize=function(w){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,P=null,M=null,G=null;if(zr=!w,zr&&(w="<!-->"),typeof w!="string"&&!mn(w)&&(w=Og(w),typeof w!="string"))throw Jn("dirty is not a string, aborting");if(!i.isSupported)return w;Yt?(de=Ot,ae=cn):qr(f),(Ee.uponSanitizeElement.length>0||Ee.uponSanitizeAttribute.length>0)&&(de=He(de)),Ee.uponSanitizeAttribute.length>0&&(ae=He(ae)),i.removed=[];
3const Q=_r&&typeof w!="string"&&mn(w);if(Q){xi(w);const We=ge?ge(w):w.nodeName;if(typeof We=="string"){const Ye=Te(We);if(!de[Ye]||qe[Ye])throw dr(w),Jn("root node is forbidden and cannot be sanitized in-place")}if(kn(w))throw dr(w),Jn("root node is clobbered and cannot be sanitized in-place");try{Bn(w)}catch(Ye){throw dr(w),Ye}}else if(mn(w))C=Di("<!---->"),P=C.ownerDocument.importNode(w,!0),P.nodeType===lt.element&&P.nodeName==="BODY"||P.nodeName==="HTML"?C=P:C.appendChild(P),Bn(P);else{if(!Mt&&!Ft&&!Wt&&w.indexOf("<")===-1)return K&&ln?rn(w):w;if(C=Di(w),!C)return Mt?null:ln?Ae:""}C&&xn&&Nt(C.firstChild);const le=Q?w:C;try{const We=Fi(le);for(;M=We.nextNode();)Zr(M,le),jr(M),Ht(M.content)&&An(M.content)}catch(We){throw Q&&(dr(w),yr(i.removed,Ye=>{Ye.element&&dn(Ye.element)})),We}if(Q)return yr(i.removed,We=>{We.element&&dn(We.element)}),Ft&&Kr(w),w;if(Mt){if(Ft&&Kr(C),un)for(G=Ws.call(C.ownerDocument);C.firstChild;)G.appendChild(C.firstChild);else G=C;return(ae.shadowroot||ae.shadowrootmode)&&(G=ft.call(c,G,!0)),G}let Se=Wt?C.outerHTML:C.innerHTML;return Wt&&de["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&De(kg,C.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+C.ownerDocument.doctype.name+`> 4`+Se),Ft&&(Se=mr(Se)),K&&ln?rn(Se):Se},i.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qr(w),Yt=!0,Ot=de,cn=ae},i.clearConfig=function(){Xt=null,Yt=!1,Ot=null,cn=null,K=$e,Ae=""},i.isValidAttribute=function(w,f,C){Xt||qr({});const P=Te(w),M=Te(f);return Ni(P,M,C)},i.addHook=function(w,f){typeof f=="function"&&Fe(Ee,w)&&br(Ee[w],f)},i.removeHook=function(w,f){if(Fe(Ee,w)){if(f!==void 0){const C=Cg(Ee[w],f);return C===-1?void 0:Tg(Ee[w],C,1)[0]}return Uc(Ee[w])}},i.removeHooks=function(w){Fe(Ee,w)&&(Ee[w]=[])},i.removeAllHooks=function(){Ee=Jc()},i}yu();var X=(a=>(a.NOT_IMPLEMENTED="EEE",a.LOGIC_ERR="E00",a.UNKNOWN_ERR="E01",a.IMAGE_ASSET_LOST="E02",a.VIDEO_ASSET_LOST="E03",a.FFMPEG_SPAWN_FAILED="E04",a.FILE_READ_ERROR="E05",a.VIDEO_FORMAT_ERR="E06",a.VIDEO_DECODE_ERR="E07",a.VIDEO_RENDER_ERR="E08",a.CANVAS_CTX_ERR="E09",a.VIDEO_ENCODE_ERR="E10",a.NO_SUPPORTED_CONFIG="E11",a.ENCODED_VIDEO_NOT_FOUND="E12",a.CHAR_ASSET_LOST="E13",a.SIMPLE_CHARACTER_ASSET_LOST="E14",a.WATERMARK_LOST="E15",a.DISK_WRITE_ERR="E16",a.DISK_NO_SPACE="E17",a.MUXER_ERR="E18",a.CANVAS_RENDER_EMPTY_BLOB="E19",a.MUXING_AUDIO_FAILED="E20",a.AUDIO_EXPORT_ERR="E21",a.SOURCE_LOST="E22",a.ALPHA_MODE_ERR="E23",a.ASSET_CHUNK_LOST="E24",a.CTX_LOST="E25",a.ENCODER_TIMEOUT="E26",a.ENCODER_OPERATION_ERR="E27",a.NETWORK_FAILED_ERR="E28",a.BITMAP_CREATION_ERR="E29",a.AUDIO_LOGIC_ERR="E30",a.AUDIO_DECODE_ERR="E31",a.AUDIO_ENCODE_ERR="E32",a.AUDIO_DECODER_CONFIG_ERR="E33",a.DECODER_WORKER_SPAWN_ERR="E34",a.AUDIO_FORMAT_ERR="E35",a.IMAGE_EXPORT_GENERAL_ERROR="E36",a.RENDERER_INIT_HWACCEL_UNAVAILABLE="E37",a.AUDIO_ENCODER_TIMEOUT="E38",a.AUDIO_ENCODER_CONFIG_ERR="E39",a))(X||{});const bu=a=>{switch(a){case"mp3":return["mp3","mp4a.69","mp4a.6B"];case"aac":return["mp4a.40.2","mp4a.40.02","mp4a.40.5","mp4a.40.05","mp4a.40.29","mp4a.67"];case"pcm-u8":return["pcm-u8"];case"pcm-s16":return["pcm-s16"];case"pcm-s24":return["pcm-s24"];case"pcm-s32":return["pcm-s32"];case"pcm-f32":return["pcm-f32"];case"opus":return["opus"];case"vorbis":return["vorbis"];default:throw new Error(`invalid codec: ${a}`)}},Xg=a=>{const i=["mp3","aac","pcm-u8","pcm-s16","pcm-s24","pcm-s32","pcm-f32","opus","vorbis"];for(const r of i)if(bu(r).includes(a.codec))return r;throw new Error(`invalid codec: ${a.codec}`)},Io=(a,i)=>Array.from({length:a},()=>new Float32Array(i));class xu{constructor(i){this._numberOfChannels=i,this._buffer=Io(this._numberOfChannels,0),this._length=0}_numberOfChannels;_buffer;_length;get length(){return this._length}get numberOfChannels(){return this._numberOfChannels}destroy=()=>{this._buffer=[],this._length=0};push(i){const r=i[0].length;this._ensureCapacity(r+this._length);for(let c=0;c<this._numberOfChannels;c++)this._buffer[c].set(i[c],this._length);this._length+=r}shift(i){const r=Math.min(i,this._length),c=Io(this._numberOfChannels,r);for(let o=0;o<this._numberOfChannels;o++){const d=this._buffer[o].subarray(0,r);c[o].set(d),this._buffer[o].copyWithin(0,r)}return this._length-=r,c}subarray(i,r){const c=i??0,o=r??this._length;return Array.from({length:this._numberOfChannels},(d,h)=>this._buffer[h].subarray(c,o))}_ensureCapacity(i){const r=this._buffer[0].length;if(i-r>0)for(let o=0;o<this._numberOfChannels;o++){const d=new Float32Array(i);d.set(this._buffer[o]),this._buffer[o]=d}}}const zg=1;class Hg{_state=null;process(i){this._state===null&&(this._state={queue:new xu(i.data.length),timelineIndex:i.timelineIndex,fadeWidth:Qc(i.sampleRate),fadeInRemaining:Qc(i.sampleRate),sampleRate:i.sampleRate,isShortStream
4:!0});const r=this._state;if(r.queue.push(i.data),r.queue.length<r.fadeWidth*2)return[];const c=r.queue.length-r.fadeWidth,o={data:r.queue.shift(c),timelineIndex:r.timelineIndex,sampleRate:r.sampleRate};return r.timelineIndex+=c,r.fadeInRemaining=this._applyFadeIn(o,r.fadeWidth,r.fadeInRemaining),r.isShortStream=!1,[o]}flush=()=>{if(this._state===null)return[];const i=this._state,r=i.queue.length,c=i.isShortStream?$g(i.fadeWidth,r):i.fadeWidth,o={timelineIndex:i.timelineIndex,sampleRate:i.sampleRate,data:i.queue.shift(r)};return i.isShortStream&&(i.fadeInRemaining=this._applyFadeIn(o,c,c)),this.clear(),o.data[0].length===0?[]:(this._applyFadeOut(o,c),[o])};clear=()=>{this._state!==null&&this._state.queue.destroy(),this._state=null};_applyFadeIn(i,r,c){if(c<=0)return c;const o=r-c,d=Math.min(c,i.data[0].length);for(const h of i.data)for(let g=0;g<d;g++)h[g]*=(o+g)/r;return c-d}_applyFadeOut(i,r){const c=i.data[0].length,o=Math.min(c,r),d=c-o;for(const h of i.data)for(let g=0;g<o;g++)h[d+g]*=o>1?(o-1-g)/(o-1):0}}const Qc=a=>Math.max(1,Math.round(a*zg/1e3)),$g=(a,i)=>Math.max(1,Math.min(a,Math.floor(i/2))),er=(a,i)=>Math.round(a/1e6*i),Du=(a,i)=>Math.round(a/i*1e6),jc=(a,i,r)=>Math.round(a*r/i);var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qg(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var gi={exports:{}};var Kg=gi.exports,eu;function Zg(){return eu||(eu=1,(function(a,i){(function(){var r,c="4.17.21",o=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",g="Invalid `variable` option passed into `_.template`",R="__lodash_hash_undefined__",L=500,y="__lodash_placeholder__",b=1,I=2,N=4,W=1,$=2,Y=1,U=2,F=4,B=8,z=16,ge=32,Me=64,K=128,Ae=256,$e=512,xt=30,Vt="...",Vi=800,rn=16,Ii=1,Gs=2,tr=3,It=1/0,vt=9007199254740991,Ws=17976931348623157e292,nr=NaN,ft=4294967295,Ee=ft-1,Ys=ft>>>1,Xs=[["ary",K],["bind",Y],["bindKey",U],["curry",B],["curryRight",z],["flip",$e],["partial",ge],["partialRight",Me],["rearg",Ae]],sn="[object Arguments]",rr="[object Array]",zs="[object AsyncFunction]",Ln="[object Boolean]",an="[object Date]",Hs="[object DOMException]",yn="[object Error]",de="[object Function]",ir="[object GeneratorFunction]",ae="[object Map]",Gt="[object Number]",Ve="[object Null]",qe="[object Object]",Wr="[object Promise]",Dt="[object Proxy]",on="[object RegExp]",Ke="[object Set]",_n="[object String]",bn="[object Symbol]",Ft="[object Undefined]",je="[object WeakMap]",Wt="[object WeakSet]",Yt="[object ArrayBuffer]",Ot="[object DataView]",cn="[object Float32Array]",xn="[object Float64Array]",Mt="[object Int8Array]",un="[object Int16Array]",ln="[object Int32Array]",sr="[object Uint8Array]",ar="[object Uint8ClampedArray]",or="[object Uint16Array]",Dn="[object Uint32Array]",_r=/\b__p \+= '';/g,fn=/\b(__p \+=) '' \+/g,ht=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cr=/&(?:amp|lt|gt|quot|#39);/g,Yr=/[&<>"']/g,vi=RegExp(cr.source),Xr=RegExp(Yr.source),Oi=/<%-([\s\S]+?)%>/g,ur=/<%([\s\S]+?)%>/g,Fn=/<%=([\s\S]+?)%>/g,dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hn=/^\w*$/,zr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mn=/[\\^$.*+?()[\]{}|]/g,$s=RegExp(Mn.source),lr=/^\s+/,Hr=/\s/,Pi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$r=/\{\n\/\* \[wrapped with (.+)\] \*/,qs=/,? & /,Nn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ks=/[()=,{}\[\]\/\s]/,Zs=/\\(\\)?/g,Te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xt=/\w*$/,Js=/^[-+]0x[0-9a-f]+$/i,wi=/^0b[01]+$/i,qr=/^\[object .+?Constructor\]$/,Li=/^0o[0-7]+$/i,yi=/^(?:0|[1-9]\d*)$/,Qs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 14,920 bytes, line 4
47f]/g,fr=/($^)/,js=/['\n\r\u2028\u2029\\]/g,hr="\\ud800-\\udfff",Nt="\\u0300-\\u036f",dr="\\ufe20-\\ufe2f",zt="\\u20d0-\\u20ff",bi=Nt+dr+zt,dn="\\u2700-\\u27bf",xi="a-z\\xdf-\\xf6\\xf8-\\xff",Di="\\xac\\xb1\\xd7\\xf7",Fi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mr="\\u2000-\\u206f",Kr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kn="A-Z\\xc0-\\xd6\\xd8-\\xde",Ht="\\ufe0e\\ufe0f",mn=Di+Fi+mr+Kr,et="['â]",ea="["+hr+"]",Mi="["+mn+"]",Un="["+bi+"]",Zr="\\d+",Ni="["+dn+"]",ki="["+xi+"]",Jr="[^"+hr+mn+Zr+dn+xi+kn+"]",Qr="\\ud83c[\\udffb-\\udfff]",ta="(?:"+Un+"|"+Qr+")",jr="[^"+hr+"]",An="(?:\\ud83c[\\udde6-\\uddff]){2}",Bn="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+kn+"]",f="\\u200d",C="(?:"+ki+"|"+Jr+")",P="(?:"+w+"|"+Jr+")",M="(?:"+et+"(?:d|ll|m|re|s|t|ve))?",G="(?:"+et+"(?:D|LL|M|RE|S|T|VE))?",Q=ta+"?",le="["+Ht+"]?",Se="(?:"+f+"(?:"+[jr,An,Bn].join("|")+")"+le+Q+")*",We="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ye="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ar=le+Q+Se,Ne="(?:"+[Ni,An,Bn].join("|")+")"+Ar,Ju="(?:"+[jr+Un+"?",Un,An,Bn,ea].join("|")+")",Qu=RegExp(et,"g"),ju=RegExp(Un,"g"),na=RegExp(Qr+"(?="+Qr+")|"+Ju+Ar,"g"),el=RegExp([w+"?"+ki+"+"+M+"(?="+[Mi,w,"$"].join("|")+")",P+"+"+G+"(?="+[Mi,w+C,"$"].join("|")+")",w+"?"+C+"+"+M,w+"+"+G,Ye,We,Zr,Ne].join("|"),"g"),tl=RegExp("["+f+hr+bi+Ht+"]"),nl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],il=-1,Re={};Re[cn]=Re[xn]=Re[Mt]=Re[un]=Re[ln]=Re[sr]=Re[ar]=Re[or]=Re[Dn]=!0,Re[sn]=Re[rr]=Re[Yt]=Re[Ln]=Re[Ot]=Re[an]=Re[yn]=Re[de]=Re[ae]=Re[Gt]=Re[qe]=Re[on]=Re[Ke]=Re[_n]=Re[je]=!1;var Ce={};Ce[sn]=Ce[rr]=Ce[Yt]=Ce[Ot]=Ce[Ln]=Ce[an]=Ce[cn]=Ce[xn]=Ce[Mt]=Ce[un]=Ce[ln]=Ce[ae]=Ce[Gt]=Ce[qe]=Ce[on]=Ce[Ke]=Ce[_n]=Ce[bn]=Ce[sr]=Ce[ar]=Ce[or]=Ce[Dn]=!0,Ce[yn]=Ce[de]=Ce[je]=!1;var sl={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},al={"&":"&","<":"<",">":">",'"':""","'":"'"},ol={"&":"&","<":"<",">":">",""":'"',"'":"'"},_l={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cl=parseFloat,ul=parseInt,Lo=typeof Os=="object"&&Os&&Os.Object===Object&&Os,ll=typeof self=="object"&&self&&self.Object===Object&&self,ke=Lo||ll||Function("return this")(),ra=i&&!i.nodeType&&i,Gn=ra&&!0&&a&&!a.nodeType&&a,yo=Gn&&Gn.exports===ra,ia=yo&&Lo.process,mt=(function(){try{var p=Gn&&Gn.require&&Gn.require("util").types;return p||ia&&ia.binding&&ia.binding("util")}catch{}})(),bo=mt&&mt.isArrayBuffer,xo=mt&&mt.isDate,Do=mt&&mt.isMap,Fo=mt&&mt.isRegExp,Mo=mt&&mt.isSet,No=mt&&mt.isTypedArray;function st(p,S,T){switch(T.length){case 0:return p.call(S);case 1:return p.call(S,T[0]);case 2:return p.call(S,T[0],T[1]);case 3:return p.call(S,T[0],T[1],T[2])}return p.apply(S,T)}function fl(p,S,T,D){for(var j=-1,fe=p==null?0:p.length;++j<fe;){var ye=p[j];S(D,ye,T(ye),p)}return D}function At(p,S){for(var T=-1,D=p==null?0:p.length;++T<D&&S(p[T],T,p)!==!1;);return p}function hl(p,S){for(var T=p==null?0:p.length;T--&&S(p[T],T,p)!==!1;);return p}function ko(p,S){for(var T=-1,D=p==null?0:p.length;++T<D;)if(!S(p[T],T,p))return!1;return!0}function pn(p,S){for(var T=-1,D=p==null?0:p.length,j=0,fe=[];++T<D;){var ye=p[T];S(ye,T,p)&&(fe[j++]=ye)}return fe}function Ui(p,S){var T=p==null?0:p.length;return!!T&&pr(p,S,0)>-1}function sa(p,S,T){for(var D=-1,j=p==null?0:p.length;++D<j;)if(T(S,p[D]))return!0;return!1}function Ie(p,S){for(var T=-1,D=p==null?0:p.length,j=Array(D);++T<D;)j[T]=S(p[T],T,p);return j}function gn(p,S){for(var T=-1,D=S.length,j=p.length;++T<D;)p[j+T]=S[T];return p}function aa(p,S,T,D){var j=-1,fe=p==null?0:p.length;for(D&&fe&&(T=p[++j]);++j<fe;)T=S(T,p[j],j,p);return T}function dl(p,S,T,D){var j=p==null?0:p.length;for(D&&j&&(T=p[--j]);j--;)T=S(T,p[j],j,p);return T}function oa(p,S){for(var T=-1,D=p==null?0:p.length;++T<D;)if(S(p[T],T,p))return!0;return!1}var ml=_a("length");function Al(p){return p.split("")}function pl(p){return p.match(Nn)||[]}function Uo(p,S,T){var D;return T(p,function(j,fe,ye){if(S(j,fe,ye))return D=fe,!1}),D}function Bi(p,S,T,D){for(var j=p.length,fe=T+(D?1:-1);D?fe--:++fe<j;)if(S(p[fe],fe,p))return fe;return-1}function pr(p,S,T){return S===S?wl(p,S,T):Bi(p,Bo,T)}function gl(p,S,T,D){for(var j=T-1,fe=p.length;++j<fe;)if(D(p[j],S))return j;return-1}function Bo(p){return p!==p}function Go(p,S){var T=p==null?0:p.length;return T?ua(p,S)/T:nr}function _a(p){return function(S){return S==null?r:S[p]}}function ca(p){return function(S){return p==null?r:p[S]}}function Wo(p,S,T,D,j){return j(p,function(fe,ye,pe){T=D?(D=!1,fe):S(T,fe,ye,pe)}),T}function El(p,S){var T=p.length;for(p.sort(S);T--;)p[T]=p[T].value;return p}function ua(p,S){for(var T,D=-1,j=p.length;++D<j;){var fe=S(p[D]);fe!==r&&(T=T===r?fe:T+fe)}return T}function la(p,S){for(var T=-1,D=Array(p);++T<p;)D[T]=S(T);return D}function Cl(p,S){return Ie(S,function(T){return[T,p[T]]})}function Yo(p){return p&&p.slice(0,$o(p)+1).replace(lr,"")}function at(p){return function(S){return p(S)}}function fa(p,S){return Ie(S,function(T){return p[T]})}function ei(p,S){return p.has(S)}function Xo(p,S){for(var T=-1,D=p.length;++T<D&&pr(S,p[T],0)>-1;);return T}function zo(p,S){for(var T=p.length;T--&&pr(S,p[T],0)>-1;);return T}function Tl(p,S){for(var T=p.length,D=0;T--;)p[T]===S&&++D;return D}var Sl=ca(sl),Rl=ca(al);function Vl(p){return"\\"+_l[p]}function Il(p,S){return p==null?r:p[S]}function gr(p){return tl.test(p)}function vl(p){return nl.test(p)}function Ol(p){for(var S,T=[];!(S=p.next()).done;)T.push(S.value);return T}function ha(p){var S=-1,T=Array(p.size);return p.forEach(function(D,j){T[++S]=[j,D]}),T}function Ho(p,S){return function(T){return p(S(T))}}function En(p,S){for(var T=-1,D=p.length,j=0,fe=[];++T<D;){var ye=p[T];(ye===S||ye===y)&&(p[T]=y,fe[j++]=T)}return fe}function Gi(p){var S=-1,T=Array(p.size);return p.forEach(function(D){T[++S]=D}),T}function Pl(p){var S=-1,T=Array(p.size);return p.forEach(function(D){T[++S]=[D,D]}),T}function wl(p,S,T){for(var D=T-1,j=p.length;++D<j;)if(p[D]===S)return D;return-1}function Ll(p,S,T){for(var D=T+1;D--;)if(p[D]===S)return D;return D}function Er(p){return gr(p)?bl(p):ml(p)}function Pt(p){return gr(p)?xl(p):Al(p)}function $o(p){for(var S=p.length;S--&&Hr.test(p.charAt(S)););return S}var yl=ca(ol);function bl(p){for(var S=na.lastIndex=0;na.test(p);)++S;return S}function xl(p){return p.match(na)||[]}function Dl(p){return p.match(el)||[]}var Fl=(function p(S){S=S==null?ke:Cr.defaults(ke.Object(),S,Cr.pick(ke,rl));var T=S.Array,D=S.Date,j=S.Error,fe=S.Function,ye=S.Math,pe=S.Object,da=S.RegExp,Ml=S.String,pt=S.TypeError,Wi=T.prototype,Nl=fe.prototype,Tr=pe.prototype,Yi=S["__core-js_shared__"],Xi=Nl.toString,me=Tr.hasOwnProperty,kl=0,qo=(function(){var e=/[^.]+$/.exec(Yi&&Yi.keys&&Yi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),zi=Tr.toString,Ul=Xi.call(pe),Bl=ke._,Gl=da("^"+Xi.call(me).replace(Mn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hi=yo?S.Buffer:r,Cn=S.Symbol,$i=S.Uint8Array,Ko=Hi?Hi.allocUnsafe:r,qi=Ho(pe.getPrototypeOf,pe),Zo=pe.create,Jo=Tr.propertyIsEnumerable,Ki=Wi.splice,Qo=Cn?Cn.isConcatSpreadable:r,ti=Cn?Cn.iterator:r,Wn=Cn?Cn.toStringTag:r,Zi=(function(){try{var e=$n(pe,"defineProperty");return e({},"",{}),e}catch{}})(),Wl=S.clearTimeout!==ke.clearTimeout&&S.clearTimeout,Yl=D&&D.now!==ke.Date.now&&D.now,Xl=S.setTimeout!==ke.setTimeout&&S.setTimeout,Ji=ye.ceil,Qi=ye.floor,ma=pe.getOwnPropertySymbols,zl=Hi?Hi.isBuffer:r,jo=S.isFinite,Hl=Wi.join,$l=Ho(pe.keys,pe),be=ye.max,Xe=ye.min,ql=D.now,Kl=S.parseInt,e_=ye.random,Zl=Wi.reverse,Aa=$n(S,"DataView"),ni=$n(S,"Map"),pa=$n(S,"Promise"),Sr=$n(S,"Set"),ri=$n(S,"WeakMap"),ii=$n(pe,"create"),ji=ri&&new ri,Rr={},Jl=qn(Aa),Ql=qn(ni),jl=qn(pa),ef=qn(Sr),tf=qn(ri),es=Cn?Cn.prototype:r,si=es?es.valueOf:r,t_=es?es.toString:r;function u(e){if(Oe(e)&&!ee(e)&&!(e instanceof oe)){if(e instanceof gt)return e;if(me.call(e,"__wrapped__"))return nc(e)}return new gt(e)}var Vr=(function(){function e(){}return function(t){if(!ve(t))return{};if(Zo)return Zo(t);e.prototype=t;var n=new e;return e.prototype=r,n}})();function ts(){}function gt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}u.templateSettings={escape:Oi,evaluate:ur,interpolate:Fn,variable:"",imports:{_:u}},u.prototype=ts.prototype,u.prototype.constructor=u,gt.prototype=Vr(ts.prototype),gt.prototype.constructor=gt;function oe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ft,this.__views__=[]}function nf(){var e=new oe(this.__wrapped__);return e.__actions__=tt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=tt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=tt(this.__views__),e}function rf(){if(this.__filtered__){var e=new oe(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function sf(){var e=this.__wrapped__.value(),t=this.__dir__,n=ee(e),s=t<0,_=n?e.length:0,l=ph(0,_,this.__views__),m=l.start,A=l.end,E=A-m,V=s?A:m-1,v=this.__iteratees__,O=v.length,x=0,k=Xe(E,this.__takeCount__);if(!n||!s&&_==E&&k==E)return I_(e,this.__actions__);var Z=[];e:for(;E--&&x<k;){V+=t;for(var ne=-1,J=e[V];++ne<O;){var se=v[ne],_e=se.iteratee,ct=se.type,Qe=_e(J);if(ct==Gs)J=Qe;else if(!Qe){if(ct==Ii)continue e;break e}}Z[x++]=J}return Z}oe.prototype=Vr(ts.prototype),oe.prototype.constructor=oe;function Yn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function af(){this.__data__=ii?ii(null):{},this.size=0}function of(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function _f(e){var t=this.__data__;if(ii){var n=t[e];return n===R?r:n}return me.call(t,e)?t[e]:r}function cf(e){var t=this.__data__;return ii?t[e]!==r:me.call(t,e)}function uf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ii&&t===r?R:t,this}Yn.prototype.clear=af,Yn.prototype.delete=of,Yn.prototype.get=_f,Yn.prototype.has=cf,Yn.prototype.set=uf;function $t(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function lf(){this.__data__=[],this.size=0}function ff(e){var t=this.__data__,n=ns(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():Ki.call(t,n,1),--this.size,!0}function hf(e){var t=this.__data__,n=ns(t,e);return n<0?r:t[n][1]}function df(e){return ns(this.__data__,e)>-1}function mf(e,t){var n=this.__data__,s=ns(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}$t.prototype.clear=lf,$t.prototype.delete=ff,$t.prototype.get=hf,$t.prototype.has=df,$t.prototype.set=mf;function qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function Af(){this.size=0,this.__data__={hash:new Yn,map:new(ni||$t),string:new Yn}}function pf(e){var t=ds(this,e).delete(e);return this.size-=t?1:0,t}function gf(e){return ds(this,e).get(e)}function Ef(e){return ds(this,e).has(e)}function Cf(e,t){var n=ds(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}qt.prototype.clear=Af,qt.prototype.delete=pf,qt.prototype.get=gf,qt.prototype.has=Ef,qt.prototype.set=Cf;function Xn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qt;++t<n;)this.add(e[t])}function Tf(e){return this.__data__.set(e,R),this}function Sf(e){return this.__data__.has(e)}Xn.prototype.add=Xn.prototype.push=Tf,Xn.prototype.has=Sf;function wt(e){var t=this.__data__=new $t(e);this.size=t.size}function Rf(){this.__data__=new $t,this.size=0}function Vf(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function If(e){return this.__data__.get(e)}function vf(e){return this.__data__.has(e)}function Of(e,t){var n=this.__data__;if(n instanceof $t){var s=n.__data__;if(!ni||s.length<o-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new qt(s)}return n.set(e,t),this.size=n.size,this}wt.prototype.clear=Rf,wt.prototype.delete=Vf,wt.prototype.get=If,wt.prototype.has=vf,wt.prototype.set=Of;function n_(e,t){var n=ee(e),s=!n&&Kn(e),_=!n&&!s&&In(e),l=!n&&!s&&!_&&Pr(e),m=n||s||_||l,A=m?la(e.length,Ml):[],E=A.length;for(var V in e)(t||me.call(e,V))&&!(m&&(V=="length"||_&&(V=="offset"||V=="parent")||l&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Qt(V,E)))&&A.push(V);return A}function r_(e){var t=e.length;return t?e[Pa(0,t-1)]:r}function Pf(e,t){return ms(tt(e),zn(t,0,e.length))}function wf(e){return ms(tt(e))}function ga(e,t,n){(n!==r&&!Lt(e[t],n)||n===r&&!(t in e))&&Kt(e,t,n)}function ai(e,t,n){var s=e[t];(!(me.call(e,t)&&Lt(s,n))||n===r&&!(t in e))&&Kt(e,t,n)}function ns(e,t){for(var n=e.length;n--;)if(Lt(e[n][0],t))return n;return-1}function Lf(e,t,n,s){return Tn(e,function(_,l,m){t(s,_,n(_),m)}),s}function i_(e,t){return e&&Ut(t,xe(t),e)}function yf(e,t){return e&&Ut(t,rt(t),e)}function Kt(e,t,n){t=="__proto__"&&Zi?Zi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ea(e,t){for(var n=-1,s=t.length,_=T(s),l=e==null;++n<s;)_[n]=l?r:ja(e,t[n]);return _}function zn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function Et(e,t,n,s,_,l){var m,A=t&b,E=t&I,V=t&N;if(n&&(m=_?n(e,s,_,l):n(e)),m!==r)return m;if(!ve(e))return e;var v=ee(e);
vendor: 3,363 bytes, line 4
4if(v){if(m=Eh(e),!A)return tt(e,m)}else{var O=ze(e),x=O==de||O==ir;if(In(e))return P_(e,A);if(O==qe||O==sn||x&&!_){if(m=E||x?{}:$_(e),!A)return E?_h(e,yf(m,e)):oh(e,i_(m,e))}else{if(!Ce[O])return _?e:{};m=Ch(e,O,A)}}l||(l=new wt);var k=l.get(e);if(k)return k;l.set(e,m),Sc(e)?e.forEach(function(J){m.add(Et(J,t,n,J,e,l))}):Cc(e)&&e.forEach(function(J,se){m.set(se,Et(J,t,n,se,e,l))});var Z=V?E?Ua:ka:E?rt:xe,ne=v?r:Z(e);return At(ne||e,function(J,se){ne&&(se=J,J=e[se]),ai(m,se,Et(J,t,n,se,e,l))}),m}function bf(e){var t=xe(e);return function(n){return s_(n,e,t)}}function s_(e,t,n){var s=n.length;if(e==null)return!s;for(e=pe(e);s--;){var _=n[s],l=t[_],m=e[_];if(m===r&&!(_ in e)||!l(m))return!1}return!0}function a_(e,t,n){if(typeof e!="function")throw new pt(h);return hi(function(){e.apply(r,n)},t)}function oi(e,t,n,s){var _=-1,l=Ui,m=!0,A=e.length,E=[],V=t.length;if(!A)return E;n&&(t=Ie(t,at(n))),s?(l=sa,m=!1):t.length>=o&&(l=ei,m=!1,t=new Xn(t));e:for(;++_<A;){var v=e[_],O=n==null?v:n(v);if(v=s||v!==0?v:0,m&&O===O){for(var x=V;x--;)if(t[x]===O)continue e;E.push(v)}else l(t,O,s)||E.push(v)}return E}var Tn=x_(kt),o_=x_(Ta,!0);function xf(e,t){var n=!0;return Tn(e,function(s,_,l){return n=!!t(s,_,l),n}),n}function rs(e,t,n){for(var s=-1,_=e.length;++s<_;){var l=e[s],m=t(l);if(m!=null&&(A===r?m===m&&!_t(m):n(m,A)))var A=m,E=l}return E}function Df(e,t,n,s){var _=e.length;for(n=te(n),n<0&&(n=-n>_?0:_+n),s=s===r||s>_?_:te(s),s<0&&(s+=_),s=n>s?0:Vc(s);n<s;)e[n++]=t;return e}function __(e,t){var n=[];return Tn(e,function(s,_,l){t(s,_,l)&&n.push(s)}),n}function Ue(e,t,n,s,_){var l=-1,m=e.length;for(n||(n=Sh),_||(_=[]);++l<m;){var A=e[l];t>0&&n(A)?t>1?Ue(A,t-1,n,s,_):gn(_,A):s||(_[_.length]=A)}return _}var Ca=D_(),c_=D_(!0);function kt(e,t){return e&&Ca(e,t,xe)}function Ta(e,t){return e&&c_(e,t,xe)}function is(e,t){return pn(t,function(n){return jt(e[n])})}function Hn(e,t){t=Rn(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[Bt(t[n++])];return n&&n==s?e:r}function u_(e,t,n){var s=t(e);return ee(e)?s:gn(s,n(e))}function Ze(e){return e==null?e===r?Ft:Ve:Wn&&Wn in pe(e)?Ah(e):wh(e)}function Sa(e,t){return e>t}function Ff(e,t){return e!=null&&me.call(e,t)}function Mf(e,t){return e!=null&&t in pe(e)}function Nf(e,t,n){return e>=Xe(t,n)&&e<be(t,n)}function Ra(e,t,n){for(var s=n?sa:Ui,_=e[0].length,l=e.length,m=l,A=T(l),E=1/0,V=[];m--;){var v=e[m];m&&t&&(v=Ie(v,at(t))),E=Xe(v.length,E),A[m]=!n&&(t||_>=120&&v.length>=120)?new Xn(m&&v):r}v=e[0];var O=-1,x=A[0];e:for(;++O<_&&V.length<E;){var k=v[O],Z=t?t(k):k;if(k=n||k!==0?k:0,!(x?ei(x,Z):s(V,Z,n))){for(m=l;--m;){var ne=A[m];if(!(ne?ei(ne,Z):s(e[m],Z,n)))continue e}x&&x.push(Z),V.push(k)}}return V}function kf(e,t,n,s){return kt(e,function(_,l,m){t(s,n(_),l,m)}),s}function _i(e,t,n){t=Rn(t,e),e=J_(e,t);var s=e==null?e:e[Bt(Tt(t))];return s==null?r:st(s,e,n)}function l_(e){return Oe(e)&&Ze(e)==sn}function Uf(e){return Oe(e)&&Ze(e)==Yt}function Bf(e){return Oe(e)&&Ze(e)==an}function ci(e,t,n,s,_){return e===t?!0:e==null||t==null||!Oe(e)&&!Oe(t)?e!==e&&t!==t:Gf(e,t,n,s,ci,_)}function Gf(e,t,n,s,_,l){var m=ee(e),A=ee(t),E=m?rr:ze(e),V=A?rr:ze(t);E=E==sn?qe:E,V=V==sn?qe:V;var v=E==qe,O=V==qe,x=E==V;if(x&&In(e)){if(!In(t))return!1;m=!0,v=!1}if(x&&!v)return l||(l=new wt),m||Pr(e)?X_(e,t,n,s,_,l):dh(e,t,E,n,s,_,l);if(!(n&W)){var k=v&&me.call(e,"__wrapped__"),Z=O&&me.call(t,"__wrapped__");
vendor: 10,967 bytes, line 4
4if(k||Z){var ne=k?e.value():e,J=Z?t.value():t;return l||(l=new wt),_(ne,J,n,s,l)}}return x?(l||(l=new wt),mh(e,t,n,s,_,l)):!1}function Wf(e){return Oe(e)&&ze(e)==ae}function Va(e,t,n,s){var _=n.length,l=_,m=!s;if(e==null)return!l;for(e=pe(e);_--;){var A=n[_];if(m&&A[2]?A[1]!==e[A[0]]:!(A[0]in e))return!1}for(;++_<l;){A=n[_];var E=A[0],V=e[E],v=A[1];if(m&&A[2]){if(V===r&&!(E in e))return!1}else{var O=new wt;if(s)var x=s(V,v,E,e,t,O);if(!(x===r?ci(v,V,W|$,s,O):x))return!1}}return!0}function f_(e){if(!ve(e)||Vh(e))return!1;var t=jt(e)?Gl:qr;return t.test(qn(e))}function Yf(e){return Oe(e)&&Ze(e)==on}function Xf(e){return Oe(e)&&ze(e)==Ke}function zf(e){return Oe(e)&&Ts(e.length)&&!!Re[Ze(e)]}function h_(e){return typeof e=="function"?e:e==null?it:typeof e=="object"?ee(e)?A_(e[0],e[1]):m_(e):Fc(e)}function Ia(e){if(!fi(e))return $l(e);var t=[];for(var n in pe(e))me.call(e,n)&&n!="constructor"&&t.push(n);return t}function Hf(e){if(!ve(e))return Ph(e);var t=fi(e),n=[];for(var s in e)s=="constructor"&&(t||!me.call(e,s))||n.push(s);return n}function va(e,t){return e<t}function d_(e,t){var n=-1,s=nt(e)?T(e.length):[];return Tn(e,function(_,l,m){s[++n]=t(_,l,m)}),s}function m_(e){var t=Ga(e);return t.length==1&&t[0][2]?K_(t[0][0],t[0][1]):function(n){return n===e||Va(n,e,t)}}function A_(e,t){return Ya(e)&&q_(t)?K_(Bt(e),t):function(n){var s=ja(n,e);return s===r&&s===t?eo(n,e):ci(t,s,W|$)}}function ss(e,t,n,s,_){e!==t&&Ca(t,function(l,m){if(_||(_=new wt),ve(l))$f(e,t,m,n,ss,s,_);else{var A=s?s(za(e,m),l,m+"",e,t,_):r;A===r&&(A=l),ga(e,m,A)}},rt)}function $f(e,t,n,s,_,l,m){var A=za(e,n),E=za(t,n),V=m.get(E);if(V){ga(e,n,V);return}var v=l?l(A,E,n+"",e,t,m):r,O=v===r;if(O){var x=ee(E),k=!x&&In(E),Z=!x&&!k&&Pr(E);v=E,x||k||Z?ee(A)?v=A:Pe(A)?v=tt(A):k?(O=!1,v=P_(E,!0)):Z?(O=!1,v=w_(E,!0)):v=[]:di(E)||Kn(E)?(v=A,Kn(A)?v=Ic(A):(!ve(A)||jt(A))&&(v=$_(E))):O=!1}O&&(m.set(E,v),_(v,E,s,l,m),m.delete(E)),ga(e,n,v)}function p_(e,t){var n=e.length;if(n)return t+=t<0?n:0,Qt(t,n)?e[t]:r}function g_(e,t,n){t.length?t=Ie(t,function(l){return ee(l)?function(m){return Hn(m,l.length===1?l[0]:l)}:l}):t=[it];var s=-1;t=Ie(t,at(q()));var _=d_(e,function(l,m,A){var E=Ie(t,function(V){return V(l)});return{criteria:E,index:++s,value:l}});return El(_,function(l,m){return ah(l,m,n)})}function qf(e,t){return E_(e,t,function(n,s){return eo(e,s)})}function E_(e,t,n){for(var s=-1,_=t.length,l={};++s<_;){var m=t[s],A=Hn(e,m);n(A,m)&&ui(l,Rn(m,e),A)}return l}function Kf(e){return function(t){return Hn(t,e)}}function Oa(e,t,n,s){var _=s?gl:pr,l=-1,m=t.length,A=e;for(e===t&&(t=tt(t)),n&&(A=Ie(e,at(n)));++l<m;)for(var E=0,V=t[l],v=n?n(V):V;(E=_(A,v,E,s))>-1;)A!==e&&Ki.call(A,E,1),Ki.call(e,E,1);return e}function C_(e,t){for(var n=e?t.length:0,s=n-1;n--;){var _=t[n];if(n==s||_!==l){var l=_;Qt(_)?Ki.call(e,_,1):ya(e,_)}}return e}function Pa(e,t){return e+Qi(e_()*(t-e+1))}function Zf(e,t,n,s){for(var _=-1,l=be(Ji((t-e)/(n||1)),0),m=T(l);l--;)m[s?l:++_]=e,e+=n;return m}function wa(e,t){var n="";if(!e||t<1||t>vt)return n;do t%2&&(n+=e),t=Qi(t/2),t&&(e+=e);while(t);return n}function ie(e,t){return Ha(Z_(e,t,it),e+"")}function Jf(e){return r_(wr(e))}function Qf(e,t){var n=wr(e);return ms(n,zn(t,0,n.length))}function ui(e,t,n,s){if(!ve(e))return e;t=Rn(t,e);for(var _=-1,l=t.length,m=l-1,A=e;A!=null&&++_<l;){var E=Bt(t[_]),V=n;if(E==="__proto__"||E==="constructor"||E==="prototype")return e;if(_!=m){var v=A[E];V=s?s(v,E,A):r,V===r&&(V=ve(v)?v:Qt(t[_+1])?[]:{})}ai(A,E,V),A=A[E]}return e}var T_=ji?function(e,t){return ji.set(e,t),e}:it,jf=Zi?function(e,t){return Zi(e,"toString",{configurable:!0,enumerable:!1,value:no(t),writable:!0})}:it;function eh(e){return ms(wr(e))}function Ct(e,t,n){var s=-1,_=e.length;t<0&&(t=-t>_?0:_+t),n=n>_?_:n,n<0&&(n+=_),_=t>n?0:n-t>>>0,t>>>=0;for(var l=T(_);++s<_;)l[s]=e[s+t];return l}function th(e,t){var n;return Tn(e,function(s,_,l){return n=t(s,_,l),!n}),!!n}function as(e,t,n){var s=0,_=e==null?s:e.length;if(typeof t=="number"&&t===t&&_<=Ys){for(;s<_;){var l=s+_>>>1,m=e[l];m!==null&&!_t(m)&&(n?m<=t:m<t)?s=l+1:_=l}return _}return La(e,t,it,n)}function La(e,t,n,s){var _=0,l=e==null?0:e.length;if(l===0)return 0;t=n(t);for(var m=t!==t,A=t===null,E=_t(t),V=t===r;_<l;){var v=Qi((_+l)/2),O=n(e[v]),x=O!==r,k=O===null,Z=O===O,ne=_t(O);if(m)var J=s||Z;else V?J=Z&&(s||x):A?J=Z&&x&&(s||!k):E?J=Z&&x&&!k&&(s||!ne):k||ne?J=!1:J=s?O<=t:O<t;J?_=v+1:l=v}return Xe(l,Ee)}function S_(e,t){for(var n=-1,s=e.length,_=0,l=[];++n<s;){var m=e[n],A=t?t(m):m;if(!n||!Lt(A,E)){var E=A;l[_++]=m===0?0:m}}return l}function R_(e){return typeof e=="number"?e:_t(e)?nr:+e}function ot(e){if(typeof e=="string")return e;if(ee(e))return Ie(e,ot)+"";if(_t(e))return t_?t_.call(e):"";var t=e+"";return t=="0"&&1/e==-It?"-0":t}function Sn(e,t,n){var s=-1,_=Ui,l=e.length,m=!0,A=[],E=A;if(n)m=!1,_=sa;else if(l>=o){var V=t?null:fh(e);if(V)return Gi(V);m=!1,_=ei,E=new Xn}else E=t?[]:A;e:for(;++s<l;){var v=e[s],O=t?t(v):v;if(v=n||v!==0?v:0,m&&O===O){for(var x=E.length;x--;)if(E[x]===O)continue e;t&&E.push(O),A.push(v)}else _(E,O,n)||(E!==A&&E.push(O),A.push(v))}return A}function ya(e,t){return t=Rn(t,e),e=J_(e,t),e==null||delete e[Bt(Tt(t))]}function V_(e,t,n,s){return ui(e,t,n(Hn(e,t)),s)}function os(e,t,n,s){for(var _=e.length,l=s?_:-1;(s?l--:++l<_)&&t(e[l],l,e););return n?Ct(e,s?0:l,s?l+1:_):Ct(e,s?l+1:0,s?_:l)}function I_(e,t){var n=e;return n instanceof oe&&(n=n.value()),aa(t,function(s,_){return _.func.apply(_.thisArg,gn([s],_.args))},n)}function ba(e,t,n){var s=e.length;if(s<2)return s?Sn(e[0]):[];for(var _=-1,l=T(s);++_<s;)for(var m=e[_],A=-1;++A<s;)A!=_&&(l[_]=oi(l[_]||m,e[A],t,n));return Sn(Ue(l,1),t,n)}function v_(e,t,n){for(var s=-1,_=e.length,l=t.length,m={};++s<_;){var A=s<l?t[s]:r;n(m,e[s],A)}return m}function xa(e){return Pe(e)?e:[]}function Da(e){return typeof e=="function"?e:it}function Rn(e,t){return ee(e)?e:Ya(e,t)?[e]:tc(he(e))}var nh=ie;function Vn(e,t,n){var s=e.length;return n=n===r?s:n,!t&&n>=s?e:Ct(e,t,n)}var O_=Wl||function(e){return ke.clearTimeout(e)};function P_(e,t){if(t)return e.slice();var n=e.length,s=Ko?Ko(n):new e.constructor(n);return e.copy(s),s}function Fa(e){var t=new e.constructor(e.byteLength);return new $i(t).set(new $i(e)),t}function rh(e,t){var n=t?Fa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function ih(e){var t=new e.constructor(e.source,Xt.exec(e));return t.lastIndex=e.lastIndex,t}function sh(e){return si?pe(si.call(e)):{}}function w_(e,t){var n=t?Fa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function L_(e,t){if(e!==t){var n=e!==r,s=e===null,_=e===e,l=_t(e),m=t!==r,A=t===null,E=t===t,V=_t(t);if(!A&&!V&&!l&&e>t||l&&m&&E&&!A&&!V||s&&m&&E||!n&&E||!_)return 1;if(!s&&!l&&!V&&e<t||V&&n&&_&&!s&&!l||A&&n&&_||!m&&_||!E)return-1}return 0}function ah(e,t,n){for(var s=-1,_=e.criteria,l=t.criteria,m=_.length,A=n.length;++s<m;){var E=L_(_[s],l[s]);if(E){if(s>=A)return E;var V=n[s];return E*(V=="desc"?-1:1)}}return e.index-t.index}function y_(e,t,n,s){for(var _=-1,l=e.length,m=n.length,A=-1,E=t.length,V=be(l-m,0),v=T(E+V),O=!s;++A<E;)v[A]=t[A];for(;++_<m;)(O||_<l)&&(v[n[_]]=e[_]);for(;V--;)v[A++]=e[_++];return v}function b_(e,t,n,s){for(var _=-1,l=e.length,m=-1,A=n.length,E=-1,V=t.length,v=be(l-A,0),O=T(v+V),x=!s;++_<v;)O[_]=e[_];for(var k=_;++E<V;)O[k+E]=t[E];for(;++m<A;)(x||_<l)&&(O[k+n[m]]=e[_++]);return O}function tt(e,t){var n=-1,s=e.length;for(t||(t=T(s));++n<s;)t[n]=e[n];return t}function Ut(e,t,n,s){var _=!n;n||(n={});for(var l=-1,m=t.length;++l<m;){var A=t[l],E=s?s(n[A],e[A],A,n,e):r;E===r&&(E=e[A]),_?Kt(n,A,E):ai(n,A,E)}return n}function oh(e,t){return Ut(e,Wa(e),t)}function _h(e,t){return Ut(e,z_(e),t)}function _s(e,t){return function(n,s){var _=ee(n)?fl:Lf,l=t?t():{};return _(n,e,q(s,2),l)}}function Ir(e){return ie(function(t,n){var s=-1,_=n.length,l=_>1?n[_-1]:r,m=_>2?n[2]:r;for(l=e.length>3&&typeof l=="function"?(_--,l):r,m&&Je(n[0],n[1],m)&&(l=_<3?r:l,_=1),t=pe(t);++s<_;){var A=n[s];A&&e(t,A,s,l)}return t})}function x_(e,t){return function(n,s){if(n==null)return n;if(!nt(n))return e(n,s);for(var _=n.length,l=t?_:-1,m=pe(n);(t?l--:++l<_)&&s(m[l],l,m)!==!1;);return n}}function D_(e){return function(t,n,s){for(var _=-1,l=pe(t),m=s(t),A=m.length;A--;){var E=m[e?A:++_];if(n(l[E],E,l)===!1)break}return t}}function ch(e,t,n){var s=t&Y,_=li(e);function l(){var m=this&&this!==ke&&this instanceof l?_:e;return m.apply(s?n:this,arguments)}return l}function F_(e){return function(t){t=he(t);var n=gr(t)?Pt(t):r,s=n?n[0]:t.charAt(0),_=n?Vn(n,1).join(""):t.slice(1);return s[e]()+_}}function vr(e){return function(t){return aa(xc(bc(t).replace(Qu,"")),e,"")}}function li(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Vr(e.prototype),s=e.apply(n,t);return ve(s)?s:n}}function uh(e,t,n){var s=li(e);function _(){for(var l=arguments.length,m=T(l),A=l,E=Or(_);A--;)m[A]=arguments[A];var V=l<3&&m[0]!==E&&m[l-1]!==E?[]:En(m,E);if(l-=V.length,l<n)return B_(e,t,cs,_.placeholder,r,m,V,r,r,n-l);var v=this&&this!==ke&&this instanceof _?s:e;return st(v,this,m)}return _}function M_(e){return function(t,n,s){var _=pe(t);if(!nt(t)){var l=q(n,3);t=xe(t),n=function(A){return l(_[A],A,_)}}var m=e(t,n,s);return m>-1?_[l?t[m]:m]:r}}function N_(e){return Jt(function(t){var n=t.length,s=n,_=gt.prototype.thru;for(e&&t.reverse();s--;){var l=t[s];if(typeof l!="function")throw new pt(h);if(_&&!m&&hs(l)=="wrapper")var m=new gt([],!0)}for(s=m?s:n;++s<n;){l=t[s];var A=hs(l),E=A=="wrapper"?Ba(l):r;E&&Xa(E[0])&&E[1]==(K|B|ge|Ae)&&!E[4].length&&E[9]==1?m=m[hs(E[0])].apply(m,E[3]):m=l.length==1&&Xa(l)?m[A]():m.thru(l)}return function(){var V=arguments,v=V[0];if(m&&V.length==1&&ee(v))return m.plant(v).value();for(var O=0,x=n?t[O].apply(this,V):v;++O<n;)x=t[O].call(this,x);return x}})}function cs(e,t,n,s,_,l,m,A,E,V){var v=t&K,O=t&Y,x=t&U,k=t&(B|z),Z=t&$e,ne=x?r:li(e);function J(){for(var se=arguments.length,_e=T(se),ct=se;ct--;)_e[ct]=arguments[ct];if(k)var Qe=Or(J),ut=Tl(_e,Qe);if(s&&(_e=y_(_e,s,_,k)),l&&(_e=b_(_e,l,m,k)),se-=ut,k&&se<V){var we=En(_e,Qe);return B_(e,t,cs,J.placeholder,n,_e,we,A,E,V-se)}var yt=O?n:this,tn=x?yt[e]:e;return se=_e.length,A?_e=Lh(_e,A):Z&&se>1&&_e.reverse(),v&&E<se&&(_e.length=E),this&&this!==ke&&this instanceof J&&(tn=ne||li(tn)),tn.apply(yt,_e)}return J}function k_(e,t){return function(n,s){return kf(n,e,t(s),{})}}function us(e,t){return function(n,s){var _;if(n===r&&s===r)return t;if(n!==r&&(_=n),s!==r){if(_===r)return s;typeof n=="string"||typeof s=="string"?(n=ot(n),s=ot(s)):(n=R_(n),s=R_(s)),_=e(n,s)}return _}}function Ma(e){return Jt(function(t){return t=Ie(t,at(q())),ie(function(n){var s=this;return e(t,function(_){return st(_,s,n)})})})}
vendor: 4,858 bytes, line 4
4function ls(e,t){t=t===r?" ":ot(t);var n=t.length;if(n<2)return n?wa(t,e):t;var s=wa(t,Ji(e/Er(t)));return gr(t)?Vn(Pt(s),0,e).join(""):s.slice(0,e)}function lh(e,t,n,s){var _=t&Y,l=li(e);function m(){for(var A=-1,E=arguments.length,V=-1,v=s.length,O=T(v+E),x=this&&this!==ke&&this instanceof m?l:e;++V<v;)O[V]=s[V];for(;E--;)O[V++]=arguments[++A];return st(x,_?n:this,O)}return m}function U_(e){return function(t,n,s){return s&&typeof s!="number"&&Je(t,n,s)&&(n=s=r),t=en(t),n===r?(n=t,t=0):n=en(n),s=s===r?t<n?1:-1:en(s),Zf(t,n,s,e)}}function fs(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=St(t),n=St(n)),e(t,n)}}function B_(e,t,n,s,_,l,m,A,E,V){var v=t&B,O=v?m:r,x=v?r:m,k=v?l:r,Z=v?r:l;t|=v?ge:Me,t&=~(v?Me:ge),t&F||(t&=-4);var ne=[e,t,_,k,O,Z,x,A,E,V],J=n.apply(r,ne);return Xa(e)&&Q_(J,ne),J.placeholder=s,j_(J,e,t)}function Na(e){var t=ye[e];return function(n,s){if(n=St(n),s=s==null?0:Xe(te(s),292),s&&jo(n)){var _=(he(n)+"e").split("e"),l=t(_[0]+"e"+(+_[1]+s));return _=(he(l)+"e").split("e"),+(_[0]+"e"+(+_[1]-s))}return t(n)}}var fh=Sr&&1/Gi(new Sr([,-0]))[1]==It?function(e){return new Sr(e)}:so;function G_(e){return function(t){var n=ze(t);return n==ae?ha(t):n==Ke?Pl(t):Cl(t,e(t))}}function Zt(e,t,n,s,_,l,m,A){var E=t&U;if(!E&&typeof e!="function")throw new pt(h);var V=s?s.length:0;if(V||(t&=-97,s=_=r),m=m===r?m:be(te(m),0),A=A===r?A:te(A),V-=_?_.length:0,t&Me){var v=s,O=_;s=_=r}var x=E?r:Ba(e),k=[e,t,n,s,_,v,O,l,m,A];if(x&&Oh(k,x),e=k[0],t=k[1],n=k[2],s=k[3],_=k[4],A=k[9]=k[9]===r?E?0:e.length:be(k[9]-V,0),!A&&t&(B|z)&&(t&=-25),!t||t==Y)var Z=ch(e,t,n);else t==B||t==z?Z=uh(e,t,A):(t==ge||t==(Y|ge))&&!_.length?Z=lh(e,t,n,s):Z=cs.apply(r,k);var ne=x?T_:Q_;return j_(ne(Z,k),e,t)}function W_(e,t,n,s){return e===r||Lt(e,Tr[n])&&!me.call(s,n)?t:e}function Y_(e,t,n,s,_,l){return ve(e)&&ve(t)&&(l.set(t,e),ss(e,t,r,Y_,l),l.delete(t)),e}function hh(e){return di(e)?r:e}function X_(e,t,n,s,_,l){var m=n&W,A=e.length,E=t.length;if(A!=E&&!(m&&E>A))return!1;var V=l.get(e),v=l.get(t);if(V&&v)return V==t&&v==e;var O=-1,x=!0,k=n&$?new Xn:r;for(l.set(e,t),l.set(t,e);++O<A;){var Z=e[O],ne=t[O];if(s)var J=m?s(ne,Z,O,t,e,l):s(Z,ne,O,e,t,l);if(J!==r){if(J)continue;x=!1;break}if(k){if(!oa(t,function(se,_e){if(!ei(k,_e)&&(Z===se||_(Z,se,n,s,l)))return k.push(_e)})){x=!1;break}}else if(!(Z===ne||_(Z,ne,n,s,l))){x=!1;break}}return l.delete(e),l.delete(t),x}function dh(e,t,n,s,_,l,m){switch(n){case Ot:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yt:return!(e.byteLength!=t.byteLength||!l(new $i(e),new $i(t)));case Ln:case an:case Gt:return Lt(+e,+t);case yn:return e.name==t.name&&e.message==t.message;case on:case _n:return e==t+"";case ae:var A=ha;case Ke:var E=s&W;if(A||(A=Gi),e.size!=t.size&&!E)return!1;var V=m.get(e);if(V)return V==t;s|=$,m.set(e,t);var v=X_(A(e),A(t),s,_,l,m);return m.delete(e),v;case bn:if(si)return si.call(e)==si.call(t)}return!1}function mh(e,t,n,s,_,l){var m=n&W,A=ka(e),E=A.length,V=ka(t),v=V.length;if(E!=v&&!m)return!1;for(var O=E;O--;){var x=A[O];if(!(m?x in t:me.call(t,x)))return!1}var k=l.get(e),Z=l.get(t);if(k&&Z)return k==t&&Z==e;var ne=!0;l.set(e,t),l.set(t,e);for(var J=m;++O<E;){x=A[O];var se=e[x],_e=t[x];if(s)var ct=m?s(_e,se,x,t,e,l):s(se,_e,x,e,t,l);if(!(ct===r?se===_e||_(se,_e,n,s,l):ct)){ne=!1;break}J||(J=x=="constructor")}if(ne&&!J){var Qe=e.constructor,ut=t.constructor;Qe!=ut&&"constructor"in e&&"constructor"in t&&!(typeof Qe=="function"&&Qe instanceof Qe&&typeof ut=="function"&&ut instanceof ut)&&(ne=!1)}return l.delete(e),l.delete(t),ne}function Jt(e){return Ha(Z_(e,r,sc),e+"")}function ka(e){return u_(e,xe,Wa)}function Ua(e){return u_(e,rt,z_)}var Ba=ji?function(e){return ji.get(e)}:so;function hs(e){for(var t=e.name+"",n=Rr[t],s=me.call(Rr,t)?n.length:0;s--;){var _=n[s],l=_.func;if(l==null||l==e)return _.name}return t}function Or(e){var t=me.call(u,"placeholder")?u:e;return t.placeholder}function q(){var e=u.iteratee||ro;return e=e===ro?h_:e,arguments.length?e(arguments[0],arguments[1]):e}function ds(e,t){var n=e.__data__;return Rh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ga(e){for(var t=xe(e),n=t.length;n--;){var s=t[n],_=e[s];t[n]=[s,_,q_(_)]}return t}function $n(e,t){var n=Il(e,t);return f_(n)?n:r}function Ah(e){var t=me.call(e,Wn),n=e[Wn];try{e[Wn]=r;var s=!0}catch{}var _=zi.call(e);return s&&(t?e[Wn]=n:delete e[Wn]),_}var Wa=ma?function(e){return e==null?[]:(e=pe(e),pn(ma(e),function(t){return Jo.call(e,t)}))}:ao,z_=ma?function(e){for(var t=[];e;)gn(t,Wa(e)),e=qi(e);return t}:ao,ze=Ze;(Aa&&ze(new Aa(new ArrayBuffer(1)))!=Ot||ni&&ze(new ni)!=ae||pa&&ze(pa.resolve())!=Wr||Sr&&ze(new Sr)!=Ke||ri&&ze(new ri)!=je)&&(ze=function(e){var t=Ze(e),n=t==qe?e.constructor:r,s=n?qn(n):"";if(s)switch(s){case Jl:return Ot;case Ql:return ae;case jl:return Wr;case ef:return Ke;
vendor: 12,458 bytes, lines 4-6
4case tf:return je}return t});function ph(e,t,n){for(var s=-1,_=n.length;++s<_;){var l=n[s],m=l.size;switch(l.type){case"drop":e+=m;break;case"dropRight":t-=m;break;case"take":t=Xe(t,e+m);break;case"takeRight":e=be(e,t-m);break}}return{start:e,end:t}}function gh(e){var t=e.match($r);return t?t[1].split(qs):[]}function H_(e,t,n){t=Rn(t,e);for(var s=-1,_=t.length,l=!1;++s<_;){var m=Bt(t[s]);if(!(l=e!=null&&n(e,m)))break;e=e[m]}return l||++s!=_?l:(_=e==null?0:e.length,!!_&&Ts(_)&&Qt(m,_)&&(ee(e)||Kn(e)))}function Eh(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function $_(e){return typeof e.constructor=="function"&&!fi(e)?Vr(qi(e)):{}}function Ch(e,t,n){var s=e.constructor;switch(t){case Yt:return Fa(e);case Ln:case an:return new s(+e);case Ot:return rh(e,n);case cn:case xn:case Mt:case un:case ln:case sr:case ar:case or:case Dn:return w_(e,n);case ae:return new s;case Gt:case _n:return new s(e);case on:return ih(e);case Ke:return new s;case bn:return sh(e)}}function Th(e,t){var n=t.length;if(!n)return e;var s=n-1;return t[s]=(n>1?"& ":"")+t[s],t=t.join(n>2?", ":" "),e.replace(Pi,`{ 5/* [wrapped with `+t+`] */ 6`)}function Sh(e){return ee(e)||Kn(e)||!!(Qo&&e&&e[Qo])}function Qt(e,t){var n=typeof e;return t=t??vt,!!t&&(n=="number"||n!="symbol"&&yi.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,n){if(!ve(n))return!1;var s=typeof t;return(s=="number"?nt(n)&&Qt(t,n.length):s=="string"&&t in n)?Lt(n[t],e):!1}function Ya(e,t){if(ee(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||_t(e)?!0:hn.test(e)||!dt.test(e)||t!=null&&e in pe(t)}function Rh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xa(e){var t=hs(e),n=u[t];if(typeof n!="function"||!(t in oe.prototype))return!1;if(e===n)return!0;var s=Ba(n);return!!s&&e===s[0]}function Vh(e){return!!qo&&qo in e}var Ih=Yi?jt:oo;function fi(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Tr;return e===n}function q_(e){return e===e&&!ve(e)}function K_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in pe(n))}}function vh(e){var t=Es(e,function(s){return n.size===L&&n.clear(),s}),n=t.cache;return t}function Oh(e,t){var n=e[1],s=t[1],_=n|s,l=_<(Y|U|K),m=s==K&&n==B||s==K&&n==Ae&&e[7].length<=t[8]||s==(K|Ae)&&t[7].length<=t[8]&&n==B;if(!(l||m))return e;s&Y&&(e[2]=t[2],_|=n&Y?0:F);var A=t[3];if(A){var E=e[3];e[3]=E?y_(E,A,t[4]):A,e[4]=E?En(e[3],y):t[4]}return A=t[5],A&&(E=e[5],e[5]=E?b_(E,A,t[6]):A,e[6]=E?En(e[5],y):t[6]),A=t[7],A&&(e[7]=A),s&K&&(e[8]=e[8]==null?t[8]:Xe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=_,e}function Ph(e){var t=[];if(e!=null)for(var n in pe(e))t.push(n);return t}function wh(e){return zi.call(e)}function Z_(e,t,n){return t=be(t===r?e.length-1:t,0),function(){for(var s=arguments,_=-1,l=be(s.length-t,0),m=T(l);++_<l;)m[_]=s[t+_];_=-1;for(var A=T(t+1);++_<t;)A[_]=s[_];return A[t]=n(m),st(e,this,A)}}function J_(e,t){return t.length<2?e:Hn(e,Ct(t,0,-1))}function Lh(e,t){for(var n=e.length,s=Xe(t.length,n),_=tt(e);s--;){var l=t[s];e[s]=Qt(l,n)?_[l]:r}return e}function za(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Q_=ec(T_),hi=Xl||function(e,t){return ke.setTimeout(e,t)},Ha=ec(jf);function j_(e,t,n){var s=t+"";return Ha(e,Th(s,yh(gh(s),n)))}function ec(e){var t=0,n=0;return function(){var s=ql(),_=rn-(s-n);if(n=s,_>0){if(++t>=Vi)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ms(e,t){var n=-1,s=e.length,_=s-1;for(t=t===r?s:t;++n<t;){var l=Pa(n,_),m=e[l];e[l]=e[n],e[n]=m}return e.length=t,e}var tc=vh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zr,function(n,s,_,l){t.push(_?l.replace(Zs,"$1"):s||n)}),t});function Bt(e){if(typeof e=="string"||_t(e))return e;var t=e+"";return t=="0"&&1/e==-It?"-0":t}function qn(e){if(e!=null){try{return Xi.call(e)}catch{}try{return e+""}catch{}}return""}function yh(e,t){return At(Xs,function(n){var s="_."+n[0];t&n[1]&&!Ui(e,s)&&e.push(s)}),e.sort()}function nc(e){if(e instanceof oe)return e.clone();var t=new gt(e.__wrapped__,e.__chain__);return t.__actions__=tt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function bh(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=be(te(t),0);var s=e==null?0:e.length;if(!s||t<1)return[];for(var _=0,l=0,m=T(Ji(s/t));_<s;)m[l++]=Ct(e,_,_+=t);return m}function xh(e){for(var t=-1,n=e==null?0:e.length,s=0,_=[];++t<n;){var l=e[t];l&&(_[s++]=l)}return _}function Dh(){var e=arguments.length;if(!e)return[];for(var t=T(e-1),n=arguments[0],s=e;s--;)t[s-1]=arguments[s];return gn(ee(n)?tt(n):[n],Ue(t,1))}var Fh=ie(function(e,t){return Pe(e)?oi(e,Ue(t,1,Pe,!0)):[]}),Mh=ie(function(e,t){var n=Tt(t);return Pe(n)&&(n=r),Pe(e)?oi(e,Ue(t,1,Pe,!0),q(n,2)):[]}),Nh=ie(function(e,t){var n=Tt(t);return Pe(n)&&(n=r),Pe(e)?oi(e,Ue(t,1,Pe,!0),r,n):[]});function kh(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:te(t),Ct(e,t<0?0:t,s)):[]}function Uh(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:te(t),t=s-t,Ct(e,0,t<0?0:t)):[]}function Bh(e,t){return e&&e.length?os(e,q(t,3),!0,!0):[]}function Gh(e,t){return e&&e.length?os(e,q(t,3),!0):[]}function Wh(e,t,n,s){var _=e==null?0:e.length;return _?(n&&typeof n!="number"&&Je(e,t,n)&&(n=0,s=_),Df(e,t,n,s)):[]}function rc(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var _=n==null?0:te(n);return _<0&&(_=be(s+_,0)),Bi(e,q(t,3),_)}function ic(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var _=s-1;return n!==r&&(_=te(n),_=n<0?be(s+_,0):Xe(_,s-1)),Bi(e,q(t,3),_,!0)}function sc(e){var t=e==null?0:e.length;return t?Ue(e,1):[]}function Yh(e){var t=e==null?0:e.length;return t?Ue(e,It):[]}function Xh(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:te(t),Ue(e,t)):[]}function zh(e){for(var t=-1,n=e==null?0:e.length,s={};++t<n;){var _=e[t];s[_[0]]=_[1]}return s}function ac(e){return e&&e.length?e[0]:r}function Hh(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var _=n==null?0:te(n);return _<0&&(_=be(s+_,0)),pr(e,t,_)}function $h(e){var t=e==null?0:e.length;return t?Ct(e,0,-1):[]}var qh=ie(function(e){var t=Ie(e,xa);return t.length&&t[0]===e[0]?Ra(t):[]}),Kh=ie(function(e){var t=Tt(e),n=Ie(e,xa);return t===Tt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ra(n,q(t,2)):[]}),Zh=ie(function(e){var t=Tt(e),n=Ie(e,xa);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?Ra(n,r,t):[]});function Jh(e,t){return e==null?"":Hl.call(e,t)}function Tt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Qh(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var _=s;return n!==r&&(_=te(n),_=_<0?be(s+_,0):Xe(_,s-1)),t===t?Ll(e,t,_):Bi(e,Bo,_,!0)}function jh(e,t){return e&&e.length?p_(e,te(t)):r}var ed=ie(oc);function oc(e,t){return e&&e.length&&t&&t.length?Oa(e,t):e}function td(e,t,n){return e&&e.length&&t&&t.length?Oa(e,t,q(n,2)):e}function nd(e,t,n){return e&&e.length&&t&&t.length?Oa(e,t,r,n):e}var rd=Jt(function(e,t){var n=e==null?0:e.length,s=Ea(e,t);return C_(e,Ie(t,function(_){return Qt(_,n)?+_:_}).sort(L_)),s});function id(e,t){var n=[];if(!(e&&e.length))return n;var s=-1,_=[],l=e.length;for(t=q(t,3);++s<l;){var m=e[s];t(m,s,e)&&(n.push(m),_.push(s))}return C_(e,_),n}function $a(e){return e==null?e:Zl.call(e)}function sd(e,t,n){var s=e==null?0:e.length;return s?(n&&typeof n!="number"&&Je(e,t,n)?(t=0,n=s):(t=t==null?0:te(t),n=n===r?s:te(n)),Ct(e,t,n)):[]}function ad(e,t){return as(e,t)}function od(e,t,n){return La(e,t,q(n,2))}function _d(e,t){var n=e==null?0:e.length;if(n){var s=as(e,t);if(s<n&&Lt(e[s],t))return s}return-1}function cd(e,t){return as(e,t,!0)}function ud(e,t,n){return La(e,t,q(n,2),!0)}function ld(e,t){var n=e==null?0:e.length;if(n){var s=as(e,t,!0)-1;if(Lt(e[s],t))return s}return-1}function fd(e){return e&&e.length?S_(e):[]}function hd(e,t){return e&&e.length?S_(e,q(t,2)):[]}function dd(e){var t=e==null?0:e.length;return t?Ct(e,1,t):[]}function md(e,t,n){return e&&e.length?(t=n||t===r?1:te(t),Ct(e,0,t<0?0:t)):[]}function Ad(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:te(t),t=s-t,Ct(e,t<0?0:t,s)):[]}function pd(e,t){return e&&e.length?os(e,q(t,3),!1,!0):[]}function gd(e,t){return e&&e.length?os(e,q(t,3)):[]}var Ed=ie(function(e){return Sn(Ue(e,1,Pe,!0))}),Cd=ie(function(e){var t=Tt(e);return Pe(t)&&(t=r),Sn(Ue(e,1,Pe,!0),q(t,2))}),Td=ie(function(e){var t=Tt(e);return t=typeof t=="function"?t:r,Sn(Ue(e,1,Pe,!0),r,t)});function Sd(e){return e&&e.length?Sn(e):[]}function Rd(e,t){return e&&e.length?Sn(e,q(t,2)):[]}function Vd(e,t){return t=typeof t=="function"?t:r,e&&e.length?Sn(e,r,t):[]}function qa(e){if(!(e&&e.length))return[];var t=0;return e=pn(e,function(n){if(Pe(n))return t=be(n.length,t),!0}),la(t,function(n){return Ie(e,_a(n))})}function _c(e,t){if(!(e&&e.length))return[];var n=qa(e);return t==null?n:Ie(n,function(s){return st(t,r,s)})}var Id=ie(function(e,t){return Pe(e)?oi(e,t):[]}),vd=ie(function(e){return ba(pn(e,Pe))}),Od=ie(function(e){var t=Tt(e);return Pe(t)&&(t=r),ba(pn(e,Pe),q(t,2))}),Pd=ie(function(e){var t=Tt(e);return t=typeof t=="function"?t:r,ba(pn(e,Pe),r,t)}),wd=ie(qa);function Ld(e,t){return v_(e||[],t||[],ai)}function yd(e,t){return v_(e||[],t||[],ui)}var bd=ie(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,_c(e,n)});function cc(e){var t=u(e);return t.__chain__=!0,t}function xd(e,t){return t(e),e}function As(e,t){return t(e)}var Dd=Jt(function(e){var t=e.length,n=t?e[0]:0,s=this.__wrapped__,_=function(l){return Ea(l,e)};return t>1||this.__actions__.length||!(s instanceof oe)||!Qt(n)?this.thru(_):(s=s.slice(n,+n+(t?1:0)),s.__actions__.push({func:As,args:[_],thisArg:r}),new gt(s,this.__chain__).thru(function(l){return t&&!l.length&&l.push(r),l}))});function Fd(){return cc(this)}function Md(){return new gt(this.value(),this.__chain__)}function Nd(){this.__values__===r&&(this.__values__=Rc(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function kd(){return this}function Ud(e){for(var t,n=this;n instanceof ts;){var s=nc(n);s.__index__=0,s.__values__=r,t?_.__wrapped__=s:t=s;var _=s;n=n.__wrapped__}return _.__wrapped__=e,t}function Bd(){var e=this.__wrapped__;if(e instanceof oe){var t=e;return this.__actions__.length&&(t=new oe(this)),t=t.reverse(),t.__actions__.push({func:As,args:[$a],thisArg:r}),new gt(t,this.__chain__)}return this.thru($a)}function Gd(){return I_(this.__wrapped__,this.__actions__)}var Wd=_s(function(e,t,n){me.call(e,n)?++e[n]:Kt(e,n,1)});function Yd(e,t,n){var s=ee(e)?ko:xf;return n&&Je(e,t,n)&&(t=r),s(e,q(t,3))}function Xd(e,t){var n=ee(e)?pn:__;return n(e,q(t,3))}var zd=M_(rc),Hd=M_(ic);function $d(e,t){return Ue(ps(e,t),1)}function qd(e,t){return Ue(ps(e,t),It)}function Kd(e,t,n){return n=n===r?1:te(n),Ue(ps(e,t),n)}function uc(e,t){var n=ee(e)?At:Tn;return n(e,q(t,3))}function lc(e,t){var n=ee(e)?hl:o_;return n(e,q(t,3))}var Zd=_s(function(e,t,n){me.call(e,n)?e[n].push(t):Kt(e,n,[t])});function Jd(e,t,n,s){e=nt(e)?e:wr(e),n=n&&!s?te(n):0;var _=e.length;return n<0&&(n=be(_+n,0)),Ss(e)?n<=_&&e.indexOf(t,n)>-1:!!_&&pr(e,t,n)>-1}var Qd=ie(function(e,t,n){var s=-1,_=typeof t=="function",l=nt(e)?T(e.length):[];return Tn(e,function(m){l[++s]=_?st(t,m,n):_i(m,t,n)}),l}),jd=_s(function(e,t,n){Kt(e,n,t)});function ps(e,t){var n=ee(e)?Ie:d_;return n(e,q(t,3))}function em(e,t,n,s){return e==null?[]:(ee(t)||(t=t==null?[]:[t]),n=s?r:n,ee(n)||(n=n==null?[]:[n]),g_(e,t,n))}var tm=_s(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function nm(e,t,n){var s=ee(e)?aa:Wo,_=arguments.length<3;return s(e,q(t,4),n,_,Tn)}function rm(e,t,n){var s=ee(e)?dl:Wo,_=arguments.length<3;return s(e,q(t,4),n,_,o_)}function im(e,t){var n=ee(e)?pn:__;return n(e,Cs(q(t,3)))}function sm(e){var t=ee(e)?r_:Jf;return t(e)}function am(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=te(t);var s=ee(e)?Pf:Qf;return s(e,t)}function om(e){var t=ee(e)?wf:eh;return t(e)}function _m(e){if(e==null)return 0;if(nt(e))return Ss(e)?Er(e):e.length;var t=ze(e);return t==ae||t==Ke?e.size:Ia(e).length}function cm(e,t,n){var s=ee(e)?oa:th;return n&&Je(e,t,n)&&(t=r),s(e,q(t,3))}var um=ie(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Je(e,t[0],t[1])?t=[]:n>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),g_(e,Ue(t,1),[])}),gs=Yl||function(){return ke.Date.now()};function lm(e,t){if(typeof t!="function")throw new pt(h);return e=te(e),function(){if(--e<1)return t.apply(this,arguments)}}
vendor: 4,685 bytes, line 6
6function fc(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Zt(e,K,r,r,r,r,t)}function hc(e,t){var n;if(typeof t!="function")throw new pt(h);return e=te(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Ka=ie(function(e,t,n){var s=Y;if(n.length){var _=En(n,Or(Ka));s|=ge}return Zt(e,s,t,n,_)}),dc=ie(function(e,t,n){var s=Y|U;if(n.length){var _=En(n,Or(dc));s|=ge}return Zt(t,s,e,n,_)});function mc(e,t,n){t=n?r:t;var s=Zt(e,B,r,r,r,r,r,t);return s.placeholder=mc.placeholder,s}function Ac(e,t,n){t=n?r:t;var s=Zt(e,z,r,r,r,r,r,t);return s.placeholder=Ac.placeholder,s}function pc(e,t,n){var s,_,l,m,A,E,V=0,v=!1,O=!1,x=!0;if(typeof e!="function")throw new pt(h);t=St(t)||0,ve(n)&&(v=!!n.leading,O="maxWait"in n,l=O?be(St(n.maxWait)||0,t):l,x="trailing"in n?!!n.trailing:x);function k(we){var yt=s,tn=_;return s=_=r,V=we,m=e.apply(tn,yt),m}function Z(we){return V=we,A=hi(se,t),v?k(we):m}function ne(we){var yt=we-E,tn=we-V,Mc=t-yt;return O?Xe(Mc,l-tn):Mc}function J(we){var yt=we-E,tn=we-V;return E===r||yt>=t||yt<0||O&&tn>=l}function se(){var we=gs();if(J(we))return _e(we);A=hi(se,ne(we))}function _e(we){return A=r,x&&s?k(we):(s=_=r,m)}function ct(){A!==r&&O_(A),V=0,s=E=_=A=r}function Qe(){return A===r?m:_e(gs())}function ut(){var we=gs(),yt=J(we);if(s=arguments,_=this,E=we,yt){if(A===r)return Z(E);if(O)return O_(A),A=hi(se,t),k(E)}return A===r&&(A=hi(se,t)),m}return ut.cancel=ct,ut.flush=Qe,ut}var fm=ie(function(e,t){return a_(e,1,t)}),hm=ie(function(e,t,n){return a_(e,St(t)||0,n)});function dm(e){return Zt(e,$e)}function Es(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new pt(h);var n=function(){var s=arguments,_=t?t.apply(this,s):s[0],l=n.cache;if(l.has(_))return l.get(_);var m=e.apply(this,s);return n.cache=l.set(_,m)||l,m};return n.cache=new(Es.Cache||qt),n}Es.Cache=qt;function Cs(e){if(typeof e!="function")throw new pt(h);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function mm(e){return hc(2,e)}var Am=nh(function(e,t){t=t.length==1&&ee(t[0])?Ie(t[0],at(q())):Ie(Ue(t,1),at(q()));var n=t.length;return ie(function(s){for(var _=-1,l=Xe(s.length,n);++_<l;)s[_]=t[_].call(this,s[_]);return st(e,this,s)})}),Za=ie(function(e,t){var n=En(t,Or(Za));return Zt(e,ge,r,t,n)}),gc=ie(function(e,t){var n=En(t,Or(gc));return Zt(e,Me,r,t,n)}),pm=Jt(function(e,t){return Zt(e,Ae,r,r,r,t)});function gm(e,t){if(typeof e!="function")throw new pt(h);return t=t===r?t:te(t),ie(e,t)}function Em(e,t){if(typeof e!="function")throw new pt(h);return t=t==null?0:be(te(t),0),ie(function(n){var s=n[t],_=Vn(n,0,t);return s&&gn(_,s),st(e,this,_)})}function Cm(e,t,n){var s=!0,_=!0;if(typeof e!="function")throw new pt(h);return ve(n)&&(s="leading"in n?!!n.leading:s,_="trailing"in n?!!n.trailing:_),pc(e,t,{leading:s,maxWait:t,trailing:_})}function Tm(e){return fc(e,1)}function Sm(e,t){return Za(Da(t),e)}function Rm(){if(!arguments.length)return[];var e=arguments[0];return ee(e)?e:[e]}function Vm(e){return Et(e,N)}function Im(e,t){return t=typeof t=="function"?t:r,Et(e,N,t)}function vm(e){return Et(e,b|N)}function Om(e,t){return t=typeof t=="function"?t:r,Et(e,b|N,t)}function Pm(e,t){return t==null||s_(e,t,xe(t))}function Lt(e,t){return e===t||e!==e&&t!==t}var wm=fs(Sa),Lm=fs(function(e,t){return e>=t}),Kn=l_((function(){return arguments})())?l_:function(e){return Oe(e)&&me.call(e,"callee")&&!Jo.call(e,"callee")},ee=T.isArray,ym=bo?at(bo):Uf;function nt(e){return e!=null&&Ts(e.length)&&!jt(e)}function Pe(e){return Oe(e)&&nt(e)}function bm(e){return e===!0||e===!1||Oe(e)&&Ze(e)==Ln}var In=zl||oo,xm=xo?at(xo):Bf;function Dm(e){return Oe(e)&&e.nodeType===1&&!di(e)}function Fm(e){if(e==null)return!0;if(nt(e)&&(ee(e)||typeof e=="string"||typeof e.splice=="function"||In(e)||Pr(e)||Kn(e)))return!e.length;var t=ze(e);if(t==ae||t==Ke)return!e.size;if(fi(e))return!Ia(e).length;for(var n in e)if(me.call(e,n))return!1;return!0}function Mm(e,t){return ci(e,t)}function Nm(e,t,n){n=typeof n=="function"?n:r;var s=n?n(e,t):r;return s===r?ci(e,t,r,n):!!s}function Ja(e){if(!Oe(e))return!1;var t=Ze(e);return t==yn||t==Hs||typeof e.message=="string"&&typeof e.name=="string"&&!di(e)}function km(e){return typeof e=="number"&&jo(e)}function jt(e){if(!ve(e))return!1;var t=Ze(e);return t==de||t==ir||t==zs||t==Dt}function Ec(e){return typeof e=="number"&&e==te(e)}function Ts(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vt}function ve(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Oe(e){return e!=null&&typeof e=="object"}var Cc=Do?at(Do):Wf;
vendor: 4,095 bytes, line 6
6function Um(e,t){return e===t||Va(e,t,Ga(t))}function Bm(e,t,n){return n=typeof n=="function"?n:r,Va(e,t,Ga(t),n)}function Gm(e){return Tc(e)&&e!=+e}function Wm(e){if(Ih(e))throw new j(d);return f_(e)}function Ym(e){return e===null}function Xm(e){return e==null}function Tc(e){return typeof e=="number"||Oe(e)&&Ze(e)==Gt}function di(e){if(!Oe(e)||Ze(e)!=qe)return!1;var t=qi(e);if(t===null)return!0;var n=me.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Xi.call(n)==Ul}var Qa=Fo?at(Fo):Yf;function zm(e){return Ec(e)&&e>=-vt&&e<=vt}var Sc=Mo?at(Mo):Xf;function Ss(e){return typeof e=="string"||!ee(e)&&Oe(e)&&Ze(e)==_n}function _t(e){return typeof e=="symbol"||Oe(e)&&Ze(e)==bn}var Pr=No?at(No):zf;function Hm(e){return e===r}function $m(e){return Oe(e)&&ze(e)==je}function qm(e){return Oe(e)&&Ze(e)==Wt}var Km=fs(va),Zm=fs(function(e,t){return e<=t});function Rc(e){if(!e)return[];if(nt(e))return Ss(e)?Pt(e):tt(e);if(ti&&e[ti])return Ol(e[ti]());var t=ze(e),n=t==ae?ha:t==Ke?Gi:wr;return n(e)}function en(e){if(!e)return e===0?e:0;if(e=St(e),e===It||e===-It){var t=e<0?-1:1;return t*Ws}return e===e?e:0}function te(e){var t=en(e),n=t%1;return t===t?n?t-n:t:0}function Vc(e){return e?zn(te(e),0,ft):0}function St(e){if(typeof e=="number")return e;if(_t(e))return nr;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Yo(e);var n=wi.test(e);return n||Li.test(e)?ul(e.slice(2),n?2:8):Js.test(e)?nr:+e}function Ic(e){return Ut(e,rt(e))}function Jm(e){return e?zn(te(e),-vt,vt):e===0?e:0}function he(e){return e==null?"":ot(e)}var Qm=Ir(function(e,t){if(fi(t)||nt(t)){Ut(t,xe(t),e);return}for(var n in t)me.call(t,n)&&ai(e,n,t[n])}),vc=Ir(function(e,t){Ut(t,rt(t),e)}),Rs=Ir(function(e,t,n,s){Ut(t,rt(t),e,s)}),jm=Ir(function(e,t,n,s){Ut(t,xe(t),e,s)}),eA=Jt(Ea);function tA(e,t){var n=Vr(e);return t==null?n:i_(n,t)}var nA=ie(function(e,t){e=pe(e);var n=-1,s=t.length,_=s>2?t[2]:r;for(_&&Je(t[0],t[1],_)&&(s=1);++n<s;)for(var l=t[n],m=rt(l),A=-1,E=m.length;++A<E;){var V=m[A],v=e[V];(v===r||Lt(v,Tr[V])&&!me.call(e,V))&&(e[V]=l[V])}return e}),rA=ie(function(e){return e.push(r,Y_),st(Oc,r,e)});function iA(e,t){return Uo(e,q(t,3),kt)}function sA(e,t){return Uo(e,q(t,3),Ta)}function aA(e,t){return e==null?e:Ca(e,q(t,3),rt)}function oA(e,t){return e==null?e:c_(e,q(t,3),rt)}function _A(e,t){return e&&kt(e,q(t,3))}function cA(e,t){return e&&Ta(e,q(t,3))}function uA(e){return e==null?[]:is(e,xe(e))}function lA(e){return e==null?[]:is(e,rt(e))}function ja(e,t,n){var s=e==null?r:Hn(e,t);return s===r?n:s}function fA(e,t){return e!=null&&H_(e,t,Ff)}function eo(e,t){return e!=null&&H_(e,t,Mf)}var hA=k_(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=zi.call(t)),e[t]=n},no(it)),dA=k_(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=zi.call(t)),me.call(e,t)?e[t].push(n):e[t]=[n]},q),mA=ie(_i);function xe(e){return nt(e)?n_(e):Ia(e)}function rt(e){return nt(e)?n_(e,!0):Hf(e)}function AA(e,t){var n={};return t=q(t,3),kt(e,function(s,_,l){Kt(n,t(s,_,l),s)}),n}function pA(e,t){var n={};return t=q(t,3),kt(e,function(s,_,l){Kt(n,_,t(s,_,l))}),n}var gA=Ir(function(e,t,n){ss(e,t,n)}),Oc=Ir(function(e,t,n,s){ss(e,t,n,s)}),EA=Jt(function(e,t){var n={};if(e==null)return n;var s=!1;t=Ie(t,function(l){return l=Rn(l,e),s||(s=l.length>1),l}),Ut(e,Ua(e),n),s&&(n=Et(n,b|I|N,hh));for(var _=t.length;_--;)ya(n,t[_]);return n});function CA(e,t){return Pc(e,Cs(q(t)))}var TA=Jt(function(e,t){return e==null?{}:qf(e,t)});function Pc(e,t){if(e==null)return{};var n=Ie(Ua(e),function(s){return[s]});return t=q(t),E_(e,n,function(s,_){return t(s,_[0])})}function SA(e,t,n){t=Rn(t,e);var s=-1,_=t.length;for(_||(_=1,e=r);++s<_;){var l=e==null?r:e[Bt(t[s])];l===r&&(s=_,l=n),e=jt(l)?l.call(e):l}return e}function RA(e,t,n){return e==null?e:ui(e,t,n)}function VA(e,t,n,s){return s=typeof s=="function"?s:r,e==null?e:ui(e,t,n,s)}var wc=G_(xe),Lc=G_(rt);function IA(e,t,n){var s=ee(e),_=s||In(e)||Pr(e);if(t=q(t,4),n==null){var l=e&&e.constructor;_?n=s?new l:[]:ve(e)?n=jt(l)?Vr(qi(e)):{}:n={}}
vendor: 3,024 bytes, lines 6-14
6return(_?At:kt)(e,function(m,A,E){return t(n,m,A,E)}),n}function vA(e,t){return e==null?!0:ya(e,t)}function OA(e,t,n){return e==null?e:V_(e,t,Da(n))}function PA(e,t,n,s){return s=typeof s=="function"?s:r,e==null?e:V_(e,t,Da(n),s)}function wr(e){return e==null?[]:fa(e,xe(e))}function wA(e){return e==null?[]:fa(e,rt(e))}function LA(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=St(n),n=n===n?n:0),t!==r&&(t=St(t),t=t===t?t:0),zn(St(e),t,n)}function yA(e,t,n){return t=en(t),n===r?(n=t,t=0):n=en(n),e=St(e),Nf(e,t,n)}function bA(e,t,n){if(n&&typeof n!="boolean"&&Je(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=en(e),t===r?(t=e,e=0):t=en(t)),e>t){var s=e;e=t,t=s}if(n||e%1||t%1){var _=e_();return Xe(e+_*(t-e+cl("1e-"+((_+"").length-1))),t)}return Pa(e,t)}var xA=vr(function(e,t,n){return t=t.toLowerCase(),e+(n?yc(t):t)});function yc(e){return to(he(e).toLowerCase())}function bc(e){return e=he(e),e&&e.replace(Qs,Sl).replace(ju,"")}function DA(e,t,n){e=he(e),t=ot(t);var s=e.length;n=n===r?s:zn(te(n),0,s);var _=n;return n-=t.length,n>=0&&e.slice(n,_)==t}function FA(e){return e=he(e),e&&Xr.test(e)?e.replace(Yr,Rl):e}function MA(e){return e=he(e),e&&$s.test(e)?e.replace(Mn,"\\$&"):e}var NA=vr(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),kA=vr(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),UA=F_("toLowerCase");function BA(e,t,n){e=he(e),t=te(t);var s=t?Er(e):0;if(!t||s>=t)return e;var _=(t-s)/2;return ls(Qi(_),n)+e+ls(Ji(_),n)}function GA(e,t,n){e=he(e),t=te(t);var s=t?Er(e):0;return t&&s<t?e+ls(t-s,n):e}function WA(e,t,n){e=he(e),t=te(t);var s=t?Er(e):0;return t&&s<t?ls(t-s,n)+e:e}function YA(e,t,n){return n||t==null?t=0:t&&(t=+t),Kl(he(e).replace(lr,""),t||0)}function XA(e,t,n){return(n?Je(e,t,n):t===r)?t=1:t=te(t),wa(he(e),t)}function zA(){var e=arguments,t=he(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var HA=vr(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function $A(e,t,n){return n&&typeof n!="number"&&Je(e,t,n)&&(t=n=r),n=n===r?ft:n>>>0,n?(e=he(e),e&&(typeof t=="string"||t!=null&&!Qa(t))&&(t=ot(t),!t&&gr(e))?Vn(Pt(e),0,n):e.split(t,n)):[]}var qA=vr(function(e,t,n){return e+(n?" ":"")+to(t)});function KA(e,t,n){return e=he(e),n=n==null?0:zn(te(n),0,e.length),t=ot(t),e.slice(n,n+t.length)==t}function ZA(e,t,n){var s=u.templateSettings;n&&Je(e,t,n)&&(t=r),e=he(e),t=Rs({},t,s,W_);var _=Rs({},t.imports,s.imports,W_),l=xe(_),m=fa(_,l),A,E,V=0,v=t.interpolate||fr,O="__p += '",x=da((t.escape||fr).source+"|"+v.source+"|"+(v===Fn?Te:fr).source+"|"+(t.evaluate||fr).source+"|$","g"),k="//# sourceURL="+(me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++il+"]")+` 7`;e.replace(x,function(J,se,_e,ct,Qe,ut){return _e||(_e=ct),O+=e.slice(V,ut).replace(js,Vl),se&&(A=!0,O+=`' + 8__e(`+se+`) + 9'`),Qe&&(E=!0,O+=`'; 10`+Qe+`; 11__p += '`),_e&&(O+=`' + 12((__t = (`+_e+`)) == null ? '' : __t) + 13'`),V=ut+J.length,J}),O+=`'; 14`;var Z=me.call(t,"variable")&&t.variable;if(!Z)O=`with (obj) {
15`+O+` 16} 17`;else if(Ks.test(Z))throw new j(g);O=(E?O.replace(_r,""):O).replace(fn,"$1").replace(ht,"$1;"),O="function("+(Z||"obj")+`) { 18`+(Z?"":`obj || (obj = {}); 19`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(E?`, __j = Array.prototype.join; 20function print() { __p += __j.call(arguments, '') } 21`:`; 22`)+O+`return __p 23}`;var ne=Dc(function(){return fe(l,k+"return "+O).apply(r,m)});if(ne.source=O,Ja(ne))throw ne;return ne}function JA(e){return he(e).toLowerCase()}function QA(e){return he(e).toUpperCase()}function jA(e,t,n){if(e=he(e),e&&(n||t===r))return Yo(e);if(!e||!(t=ot(t)))return e;var s=Pt(e),_=Pt(t),l=Xo(s,_),m=zo(s,_)+1;return Vn(s,l,m).join("")}function ep(e,t,n){if(e=he(e),e&&(n||t===r))return e.slice(0,$o(e)+1);if(!e||!(t=ot(t)))return e;var s=Pt(e),_=zo(s,Pt(t))+1;return Vn(s,0,_).join("")}function tp(e,t,n){if(e=he(e),e&&(n||t===r))return e.replace(lr,"");if(!e||!(t=ot(t)))return e;var s=Pt(e),_=Xo(s,Pt(t));return Vn(s,_).join("")}function np(e,t){var n=xt,s=Vt;if(ve(t)){var _="separator"in t?t.separator:_;n="length"in t?te(t.length):n,s="omission"in t?ot(t.omission):s}e=he(e);var l=e.length;if(gr(e)){var m=Pt(e);l=m.length}if(n>=l)return e;var A=n-Er(s);if(A<1)return s;var E=m?Vn(m,0,A).join(""):e.slice(0,A);if(_===r)return E+s;if(m&&(A+=E.length-A),Qa(_)){if(e.slice(A).search(_)){var V,v=E;for(_.global||(_=da(_.source,he(Xt.exec(_))+"g")),_.lastIndex=0;V=_.exec(v);)var O=V.index;E=E.slice(0,O===r?A:O)}}else if(e.indexOf(ot(_),A)!=A){var x=E.lastIndexOf(_);x>-1&&(E=E.slice(0,x))}return E+s}function rp(e){return e=he(e),e&&vi.test(e)?e.replace(cr,yl):e}var ip=vr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),to=F_("toUpperCase");function xc(e,t,n){return e=he(e),t=n?r:t,t===r?vl(e)?Dl(e):pl(e):e.match(t)||[]}var Dc=ie(function(e,t){try{return st(e,r,t)}catch(n){return Ja(n)?n:new j(n)}}),sp=Jt(function(e,t){return At(t,function(n){n=Bt(n),Kt(e,n,Ka(e[n],e))}),e});function ap(e){var t=e==null?0:e.length,n=q();return e=t?Ie(e,function(s){if(typeof s[1]!="function")throw new pt(h);return[n(s[0]),s[1]]}):[],ie(function(s){for(var _=-1;++_<t;){var l=e[_];if(st(l[0],this,s))return st(l[1],this,s)}})}function op(e){return bf(Et(e,b))}function no(e){return function(){return e}}function _p(e,t){return e==null||e!==e?t:e}var cp=N_(),up=N_(!0);function it(e){return e}function ro(e){return h_(typeof e=="function"?e:Et(e,b))}function lp(e){return m_(Et(e,b))}function fp(e,t){return A_(e,Et(t,b))}var hp=ie(function(e,t){return function(n){return _i(n,e,t)}}),dp=ie(function(e,t){return function(n){return _i(e,n,t)}});function io(e,t,n){var s=xe(t),_=is(t,s);n==null&&!(ve(t)&&(_.length||!s.length))&&(n=t,t=e,e=this,_=is(t,xe(t)));var l=!(ve(n)&&"chain"in n)||!!n.chain,m=jt(e);return At(_,function(A){var E=t[A];e[A]=E,m&&(e.prototype[A]=function(){var V=this.__chain__;if(l||V){var v=e(this.__wrapped__),O=v.__actions__=tt(this.__actions__);return O.push({func:E,args:arguments,thisArg:e}),v.__chain__=V,v}return E.apply(e,gn([this.value()],arguments))})}),e}function mp(){return ke._===this&&(ke._=Bl),this}function so(){}function Ap(e){return e=te(e),ie(function(t){return p_(t,e)})}var pp=Ma(Ie),gp=Ma(ko),Ep=Ma(oa);function Fc(e){return Ya(e)?_a(Bt(e)):Kf(e)}function Cp(e){return function(t){return e==null?r:Hn(e,t)}}var Tp=U_(),Sp=U_(!0);function ao(){return[]}function oo(){return!1}function Rp(){return{}}function Vp(){return""}function Ip(){return!0}function vp(e,t){if(e=te(e),e<1||e>vt)return[];var n=ft,s=Xe(e,ft);t=q(t),e-=ft;for(var _=la(s,t);++n<e;)t(n);return _}function Op(e){return ee(e)?Ie(e,Bt):_t(e)?[e]:tt(tc(he(e)))}function Pp(e){var t=++kl;return he(e)+t}var wp=us(function(e,t){return e+t},0),Lp=Na("ceil"),yp=us(function(e,t){return e/t},1),bp=Na("floor");function xp(e){return e&&e.length?rs(e,it,Sa):r}function Dp(e,t){return e&&e.length?rs(e,q(t,2),Sa):r}function Fp(e){return Go(e,it)}function Mp(e,t){return Go(e,q(t,2))}function Np(e){return e&&e.length?rs(e,it,va):r}function kp(e,t){return e&&e.length?rs(e,q(t,2),va):r}var Up=us(function(e,t){return e*t},1),Bp=Na("round"),Gp=us(function(e,t){return e-t},0);function Wp(e){return e&&e.length?ua(e,it):0}function Yp(e,t){return e&&e.length?ua(e,q(t,2)):0}return u.after=lm,u.ary=fc,u.assign=Qm,u.assignIn=vc,u.assignInWith=Rs,u.assignWith=jm,u.at=eA,u.before=hc,u.bind=Ka,u.bindAll=sp,u.bindKey=dc,u.castArray=Rm,u.chain=cc,u.chunk=bh,u.compact=xh,u.concat=Dh,u.cond=ap,u.conforms=op,u.constant=no,u.countBy=Wd,u.create=tA,u.curry=mc,u.curryRight=Ac,u.debounce=pc,u.defaults=nA,u.defaultsDeep=rA,u.defer=fm,u.delay=hm,u.difference=Fh,u.differenceBy=Mh,u.differenceWith=Nh,u.drop=kh,u.dropRight=Uh,u.dropRightWhile=Bh,u.dropWhile=Gh,u.fill=Wh,u.filter=Xd,u.flatMap=$d,u.flatMapDeep=qd,u.flatMapDepth=Kd,u.flatten=sc,u.flatten
23Deep=Yh,u.flattenDepth=Xh,u.flip=dm,u.flow=cp,u.flowRight=up,u.fromPairs=zh,u.functions=uA,u.functionsIn=lA,u.groupBy=Zd,u.initial=$h,u.intersection=qh,u.intersectionBy=Kh,u.intersectionWith=Zh,u.invert=hA,u.invertBy=dA,u.invokeMap=Qd,u.iteratee=ro,u.keyBy=jd,u.keys=xe,u.keysIn=rt,u.map=ps,u.mapKeys=AA,u.mapValues=pA,u.matches=lp,u.matchesProperty=fp,u.memoize=Es,u.merge=gA,u.mergeWith=Oc,u.method=hp,u.methodOf=dp,u.mixin=io,u.negate=Cs,u.nthArg=Ap,u.omit=EA,u.omitBy=CA,u.once=mm,u.orderBy=em,u.over=pp,u.overArgs=Am,u.overEvery=gp,u.overSome=Ep,u.partial=Za,u.partialRight=gc,u.partition=tm,u.pick=TA,u.pickBy=Pc,u.property=Fc,u.propertyOf=Cp,u.pull=ed,u.pullAll=oc,u.pullAllBy=td,u.pullAllWith=nd,u.pullAt=rd,u.range=Tp,u.rangeRight=Sp,u.rearg=pm,u.reject=im,u.remove=id,u.rest=gm,u.reverse=$a,u.sampleSize=am,u.set=RA,u.setWith=VA,u.shuffle=om,u.slice=sd,u.sortBy=um,u.sortedUniq=fd,u.sortedUniqBy=hd,u.split=$A,u.spread=Em,u.tail=dd,u.take=md,u.takeRight=Ad,u.takeRightWhile=pd,u.takeWhile=gd,u.tap=xd,u.throttle=Cm,u.thru=As,u.toArray=Rc,u.toPairs=wc,u.toPairsIn=Lc,u.toPath=Op,u.toPlainObject=Ic,u.transform=IA,u.unary=Tm,u.union=Ed,u.unionBy=Cd,u.unionWith=Td,u.uniq=Sd,u.uniqBy=Rd,u.uniqWith=Vd,u.unset=vA,u.unzip=qa,u.unzipWith=_c,u.update=OA,u.updateWith=PA,u.values=wr,u.valuesIn=wA,u.without=Id,u.words=xc,u.wrap=Sm,u.xor=vd,u.xorBy=Od,u.xorWith=Pd,u.zip=wd,u.zipObject=Ld,u.zipObjectDeep=yd,u.zipWith=bd,u.entries=wc,u.entriesIn=Lc,u.extend=vc,u.extendWith=Rs,io(u,u),u.add=wp,u.attempt=Dc,u.camelCase=xA,u.capitalize=yc,u.ceil=Lp,u.clamp=LA,u.clone=Vm,u.cloneDeep=vm,u.cloneDeepWith=Om,u.cloneWith=Im,u.conformsTo=Pm,u.deburr=bc,u.defaultTo=_p,u.divide=yp,u.endsWith=DA,u.eq=Lt,u.escape=FA,u.escapeRegExp=MA,u.every=Yd,u.find=zd,u.findIndex=rc,u.findKey=iA,u.findLast=Hd,u.findLastIndex=ic,u.findLastKey=sA,u.floor=bp,u.forEach=uc,u.forEachRight=lc,u.forIn=aA,u.forInRight=oA,u.forOwn=_A,u.forOwnRight=cA,u.get=ja,u.gt=wm,u.gte=Lm,u.has=fA,u.hasIn=eo,u.head=ac,u.identity=it,u.includes=Jd,u.indexOf=Hh,u.inRange=yA,u.invoke=mA,u.isArguments=Kn,u.
vendor: 4,758 bytes, line 23
23isArray=ee,u.isArrayBuffer=ym,u.isArrayLike=nt,u.isArrayLikeObject=Pe,u.isBoolean=bm,u.isBuffer=In,u.isDate=xm,u.isElement=Dm,u.isEmpty=Fm,u.isEqual=Mm,u.isEqualWith=Nm,u.isError=Ja,u.isFinite=km,u.isFunction=jt,u.isInteger=Ec,u.isLength=Ts,u.isMap=Cc,u.isMatch=Um,u.isMatchWith=Bm,u.isNaN=Gm,u.isNative=Wm,u.isNil=Xm,u.isNull=Ym,u.isNumber=Tc,u.isObject=ve,u.isObjectLike=Oe,u.isPlainObject=di,u.isRegExp=Qa,u.isSafeInteger=zm,u.isSet=Sc,u.isString=Ss,u.isSymbol=_t,u.isTypedArray=Pr,u.isUndefined=Hm,u.isWeakMap=$m,u.isWeakSet=qm,u.join=Jh,u.kebabCase=NA,u.last=Tt,u.lastIndexOf=Qh,u.lowerCase=kA,u.lowerFirst=UA,u.lt=Km,u.lte=Zm,u.max=xp,u.maxBy=Dp,u.mean=Fp,u.meanBy=Mp,u.min=Np,u.minBy=kp,u.stubArray=ao,u.stubFalse=oo,u.stubObject=Rp,u.stubString=Vp,u.stubTrue=Ip,u.multiply=Up,u.nth=jh,u.noConflict=mp,u.noop=so,u.now=gs,u.pad=BA,u.padEnd=GA,u.padStart=WA,u.parseInt=YA,u.random=bA,u.reduce=nm,u.reduceRight=rm,u.repeat=XA,u.replace=zA,u.result=SA,u.round=Bp,u.runInContext=p,u.sample=sm,u.size=_m,u.snakeCase=HA,u.some=cm,u.sortedIndex=ad,u.sortedIndexBy=od,u.sortedIndexOf=_d,u.sortedLastIndex=cd,u.sortedLastIndexBy=ud,u.sortedLastIndexOf=ld,u.startCase=qA,u.startsWith=KA,u.subtract=Gp,u.sum=Wp,u.sumBy=Yp,u.template=ZA,u.times=vp,u.toFinite=en,u.toInteger=te,u.toLength=Vc,u.toLower=JA,u.toNumber=St,u.toSafeInteger=Jm,u.toString=he,u.toUpper=QA,u.trim=jA,u.trimEnd=ep,u.trimStart=tp,u.truncate=np,u.unescape=rp,u.uniqueId=Pp,u.upperCase=ip,u.upperFirst=to,u.each=uc,u.eachRight=lc,u.first=ac,io(u,(function(){var e={};return kt(u,function(t,n){me.call(u.prototype,n)||(e[n]=t)}),e})(),{chain:!1}),u.VERSION=c,At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){u[e].placeholder=u}),At(["drop","take"],function(e,t){oe.prototype[e]=function(n){n=n===r?1:be(te(n),0);var s=this.__filtered__&&!t?new oe(this):this.clone();return s.__filtered__?s.__takeCount__=Xe(n,s.__takeCount__):s.__views__.push({size:Xe(n,ft),type:e+(s.__dir__<0?"Right":"")}),s},oe.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,s=n==Ii||n==tr;oe.prototype[e]=function(_){var l=this.clone();return l.__iteratees__.push({iteratee:q(_,3),type:n}),l.__filtered__=l.__filtered__||s,l}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");oe.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");oe.prototype[e]=function(){return this.__filtered__?new oe(this):this[n](1)}}),oe.prototype.compact=function(){return this.filter(it)},oe.prototype.find=function(e){return this.filter(e).head()},oe.prototype.findLast=function(e){return this.reverse().find(e)},oe.prototype.invokeMap=ie(function(e,t){return typeof e=="function"?new oe(this):this.map(function(n){return _i(n,e,t)})}),oe.prototype.reject=function(e){return this.filter(Cs(q(e)))},oe.prototype.slice=function(e,t){e=te(e);var n=this;return n.__filtered__&&(e>0||t<0)?new oe(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=te(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},oe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},oe.prototype.toArray=function(){return this.take(ft)},kt(oe.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),_=u[s?"take"+(t=="last"?"Right":""):t],l=s||/^find/.test(t);_&&(u.prototype[t]=function(){var m=this.__wrapped__,A=s?[1]:arguments,E=m instanceof oe,V=A[0],v=E||ee(m),O=function(se){var _e=_.apply(u,gn([se],A));return s&&x?_e[0]:_e};v&&n&&typeof V=="function"&&V.length!=1&&(E=v=!1);var x=this.__chain__,k=!!this.__actions__.length,Z=l&&!x,ne=E&&!k;if(!l&&v){m=ne?m:new oe(this);var J=e.apply(m,A);return J.__actions__.push({func:As,args:[O],thisArg:r}),new gt(J,x)}return Z&&ne?e.apply(this,A):(J=this.thru(O),Z?s?J.value()[0]:J.value():J)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Wi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",s=/^(?:pop|shift)$/.test(e);u.prototype[e]=function(){var _=arguments;if(s&&!this.__chain__){var l=this.value();return t.apply(ee(l)?l:[],_)}return this[n](function(m){return t.apply(ee(m)?m:[],_)})}}),kt(oe.prototype,function(e,t){var n=u[t];if(n){var s=n.name+"";me.call(Rr,s)||(Rr[s]=[]),Rr[s].push({name:t,func:n})}}),Rr[cs(r,U).name]=[{name:"wrapper",func:r}],oe.prototype.clone=nf,oe.prototype.reverse=rf,oe.prototype.value=sf,u.prototype.at=Dd,u.prototype.chain=Fd,u.prototype.commit=Md,u.prototype.next=Nd,u.prototype.plant=Ud,u.prototype.reverse=Bd,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Gd,u.prototype.first=u.prototype.head,ti&&(u.prototype[ti]=kd),u}),Cr=Fl();Gn?((Gn.exports=Cr)._=Cr,ra._=Cr):ke._=Cr}).call(Kg)}
23)(gi,gi.exports)),gi.exports}var tu=Zg();class Jg{_curve=[];_lastCurve=null;clear(){this._curve.splice(0,this._curve.length),this._curve.length=0,this._lastCurve=null}updateCurve(i){if(i.length===0||Qg(this._lastCurve,i))return;const r=this._curve.at(-1);(!r||r[0]<=i[0][0])&&(this._curve.push(...i),this._lastCurve=i.map(([c,o,d])=>[c,o,d]))}process(i){if(this._curve.length===0)return i;const r=i.data,c=r[0].length,o=i.sampleRate,d=i.timelineIndex,h=d+c;let g=-1;for(let R=0;R<this._curve.length;R++){const L=this._curve[R],y=this._curve[R+1],b=er(L[0],o);if(b>=h)break;const I=b-d,N=y!=null?er(y[0],o)-d:c,W=tu.clamp(I,0,c),$=tu.clamp(N,0,c);if(!(W>=$)){if(y&&y[2]==="linear"){const Y=N-I;if(Y<=0){const U=L[1];for(let F=0;F<r.length;F++)for(let B=W;B<$;B++)r[F][B]*=U}else for(let U=0;U<r.length;U++)for(let F=W;F<$;F++){const B=(F-I)/Y,z=L[1]+B*(y[1]-L[1]);r[U][F]*=z}}else{const Y=L[1];for(let U=0;U<r.length;U++)for(let F=W;F<$;F++)r[U][F]*=Y}g=R}}return g>0&&this._curve.splice(0,g),i}}const Qg=(a,i)=>a!==null&&a.length===i.length&&a.every((r,c)=>r[0]===i[c][0]&&r[1]===i[c][1]&&r[2]===i[c][2]);class jg{_targetSampleRate;_sourceSampleRate=0;_positionNumerator=0;_lastSamplePerChannel=new Float32Array(0);_currTimelineIdx=0;_sourceEndTimelineIdx=0;constructor(i){this._targetSampleRate=i.sampleRate}process(i){this._sourceSampleRate!==i.sampleRate&&(this.clear(),this._sourceSampleRate=i.sampleRate,this._lastSamplePerChannel=new Float32Array(i.data.length),this._currTimelineIdx=jc(i.timelineIndex,i.sampleRate,this._targetSampleRate),this._positionNumerator=this._currTimelineIdx*i.sampleRate-i.timelineIndex*this._targetSampleRate);const r=[];if(this._sourceSampleRate===this._targetSampleRate)r.push(i),this._currTimelineIdx=this._currTimelineIdx+i.data[0].length;else{const c=this._resample(i.data);c[0].length>0&&r.push({timelineIndex:this._currTimelineIdx,data:c,sampleRate:this._targetSampleRate}),this._currTimelineIdx=this._currTimelineIdx+c[0].length}return this._sourceEndTimelineIdx=i.timelineIndex+i.data[0].length,r}flush(){if(this._sourceSampleRate===0||this._sourceSampleRate===this._targetSampleRate)return this.clear(),[];const r=jc(this._sourceEndTimelineIdx,this._sourceSampleRate,this._targetSampleRate)-this._currTimelineIdx;if(r<=0)return this.clear(),[];const c=Array.from(this._lastSamplePerChannel,d=>new Float32Array(r).fill(d)),o={timelineIndex:this._currTimelineIdx,data:c,sampleRate:this._targetSampleRate};return this.clear(),[o]}clear(){this._positionNumerator=0,this._lastSamplePerChannel=new Float32Array(0),this._sourceSampleRate=0,this._currTimelineIdx=0,this._sourceEndTimelineIdx=0}_resample(i){const r=i.map(()=>[]),c=this._targetSampleRate;for(;Math.floor(this._positionNumerator/c)<i[0].length-1;){const o=Math.floor(this._positionNumerator/c),h=(this._positionNumerator-o*c)/c;for(let g=0;g<i.length;g++){const R=i[g];let L,y;o<0?(L=this._lastSamplePerChannel[g],y=R[0]):(L=R[o],y=R[o+1]),r[g].push(L+(y-L)*h)}this._positionNumerator+=this._sourceSampleRate}return this._positionNumerator-=i[0].length*c,this._updateLastSamplePerChannel(i),r.map(o=>new Float32Array(o))}_updateLastSamplePerChannel(i){i.length!==this._lastSamplePerChannel.length&&(this._lastSamplePerChannel=new Float32Array(i.length));const r=i[0].length-1;for(let c=0;c<i.length;c++)this._lastSamplePerChannel[c]=i[c][r]}}const Fu=Symbol("Comlink.proxy"),eE=Symbol("Comlink.endpoint"),tE=Symbol("Comlink.releaseProxy"),po=Symbol("Comlink.finalizer"),Ds=Symbol("Comlink.thrown"),Mu=a=>typeof a=="object"&&a!==null||typeof a=="function",nE={canHandle:a=>Mu(a)&&a[Fu],serialize(a){const{port1:i,port2:r}=new MessageChannel;return wo(a,i),[r,[r]]},deserialize(a){return a.start(),aE(a)}},rE={canHandle:a=>Mu(a)&&Ds in a,serialize({value:a}){let i;return a instanceof Error?i={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:i={isError:!1,value:a},[i,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},Nu=new Map([["proxy",nE],["throw",rE]]);function iE(a,i){for(const r of a)if(i===r||r==="*"||r instanceof RegExp&&r.test(i))return!0;return!1}function wo(a,i=globalThis,r=["*"]){i.addEventListener("message",function c(o){if(!o||!o.data)return;if(!iE(r,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:d,type:h,path:g}=Object.assign({path:[]},o.data),R=(o.data.argumentList||[]).map(Qn);let L;try{const y=g.slice(0,-1).reduce((I,N)=>I[N],a),b=g.reduce((I,N)=>I[N],a);switch(h){case"GET":L=b;break;case"SET":y[g.slice(-1)[0]]=Qn(o.data.value),L=!0;break;case"APPLY":L=b.apply(y,R);break;case"CONSTRUCT":{const I=new b(...R);L=uE(I)}break;case"ENDPOINT":{const{port1:I,port2:N}=new MessageChannel;wo(a,N),L=Gu(I,[I])}break;case"RELEASE":L=void 0;break;default:return}}catch(y){L={value:y,[Ds]:0}}Promise.resolve(L).catch(y=>({value:y,[Ds]:0})).then(y=>{const[b,I]=ks(y);i.postMessage(Object.assign(Object.assign({},b),{id:d}),I),h==="RELEASE"&&(i.removeEventListener("message",c),ku(i),po in a&&typeof a[po]=="function"&&a[po]())}).catch(y=>{const[b,I]=ks({value:new TypeError("Unserializable return value"),[Ds]:0});i.postMessage(Object.assign(Object.assign({},b),{id:d}),I)})}),i.start&&i.start()}function sE(a){return a.constructor.name==="MessagePort"}function ku(a){sE(a)&&a.close()}function aE(a,i){const r=new Map;return a.addEventListener("message",function(o){const{data:d}=o;if(!d||!d.id)return;const h=r.get(d.id);if(h)try{h(d)}finally{r.delete(d.id)}}),vo(a,r,[],i)}function Ps(a){if(a)throw new Error("Proxy has been released and is not useable")}function Uu(a){return Dr(a,new Map,{type:"RELEASE"}).then(()=>{ku(a)})}const Ms=new WeakMap,Ns="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const i=(Ms.get(a)||0)-1;Ms.set(a,i),i===0&&Uu(a)});function oE(a,i){const r=(Ms.get(i)||0)+1;Ms.set(i,r),Ns&&Ns.register(a,i,a)}function _E(a){Ns&&Ns.unregister(a)}function vo(a,i,r=[],c=function(){}){let o=!1;const d=new Proxy(c,{get(h,g){if(Ps(o),g===tE)return()=>{_E(d),Uu(a),i.clear(),o=!0};if(g==="then"){if(r.length===0)return{then:()=>d};const R=Dr(a,i,{type:"GET",path:r.map(L=>L.toString())}).then(Qn);return R.then.bind(R)}return vo(a,i,[...r,g])},set(h,g,R){Ps(o);const[L,y]=ks(R);return Dr(a,i,{type:"SET",path:[...r,g].map(b=>b.toString()),value:L},y).then(Qn)},apply(h,g,R){Ps(o);const L=r[r.length-1];if(L===eE)return Dr(a,i,{type:"ENDPOINT"}).then(Qn);if(L==="bind")return vo(a,i,r.slice(0,-1));const[y,b]=nu(R);
23return Dr(a,i,{type:"APPLY",path:r.map(I=>I.toString()),argumentList:y},b).then(Qn)},construct(h,g){Ps(o);const[R,L]=nu(g);return Dr(a,i,{type:"CONSTRUCT",path:r.map(y=>y.toString()),argumentList:R},L).then(Qn)}});return oE(d,a),d}function cE(a){return Array.prototype.concat.apply([],a)}function nu(a){const i=a.map(ks);return[i.map(r=>r[0]),cE(i.map(r=>r[1]))]}const Bu=new WeakMap;function Gu(a,i){return Bu.set(a,i),a}function uE(a){return Object.assign(a,{[Fu]:!0})}function ks(a){for(const[i,r]of Nu)if(r.canHandle(a)){const[c,o]=r.serialize(a);return[{type:"HANDLER",name:i,value:c},o]}return[{type:"RAW",value:a},Bu.get(a)||[]]}function Qn(a){switch(a.type){case"HANDLER":return Nu.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Dr(a,i,r,c){return new Promise(o=>{const d=lE();i.set(d,o),a.start&&a.start(),a.postMessage(Object.assign({id:d},r),c)})}function lE(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Wu=(a,i)=>Gu(a,i),fE=(a,i,r)=>({debug:r?(...c)=>a.debug(...c):()=>{},verbose:(...c)=>a.verbose(...c),info:(...c)=>a.info(...c),warn:(...c)=>a.warn(...c),error:(...c)=>a.error(...c)}),Bs=35,Yu=Bs/2.14,hE=Bs/4,dE=1,mE=1;class AE{_input=null;_processIdx=0;_overlapIdx=0;_skipRemainder=0;_isFirstWindow=!0;_tempo=1;_currTimelineIdx=0;_inputSamples=0;_outputSamples=0;_sampleRate=0;process(i,r){if((this._input===null||this._sampleRate!==i.sampleRate||i.data.length!==this._input?.numberOfChannels||this._tempo!==r)&&(this.clear(),this._input=new xu(i.data.length),this._processIdx=0,this._overlapIdx=0,this._skipRemainder=0,this._isFirstWindow=!0,this._tempo=r,this._currTimelineIdx=i.timelineIndex,this._inputSamples=0,this._outputSamples=0,this._sampleRate=i.sampleRate),r===1)return this._currTimelineIdx=i.timelineIndex+i.data[0].length,[i];{this._input.push(i.data),this._inputSamples+=i.data[0].length;const{output:c,overlapIdx:o,processIdx:d,skipRemainder:h}=ru(this._input.subarray(),i.sampleRate,r,{mode:"stream",isFirstWindow:this._isFirstWindow,overlapIdx:this._overlapIdx,processIdx:this._processIdx,skipRemainder:this._skipRemainder}),g=Math.min(d,o);this._input.shift(g),this._overlapIdx=o-g,this._processIdx=d-g,this._skipRemainder=h,c[0].length>0&&(this._isFirstWindow=!1);const R=[];return c[0].length>0&&R.push({timelineIndex:this._currTimelineIdx,data:c.map(L=>new Float32Array(L)),sampleRate:i.sampleRate}),this._currTimelineIdx+=c[0].length,this._outputSamples+=c[0].length,R}}flush=()=>
23{if(this._input===null||this._tempo===1||this._inputSamples===0)return this.clear(),[];const r=Math.round(this._inputSamples/this._tempo)-this._outputSamples;if(r<=0)return this.clear(),[];const c=this._sampleRate,o=this._currTimelineIdx,d=Math.round(c*Bs/1e3),h=Math.round(c*Yu/1e3),g=d+h,{output:R}=ru(CE(this._input.subarray(),this._input.length+g),c,this._tempo,{mode:"drain",isFirstWindow:this._isFirstWindow,overlapIdx:this._overlapIdx,processIdx:this._processIdx,skipRemainder:this._skipRemainder}),L=R.map(y=>{const b=new Float32Array(r);return b.set(y.slice(0,r)),b});return this.clear(),[{timelineIndex:o,data:L,sampleRate:c}]};clear=()=>{this._input?.destroy(),this._input=null,this._processIdx=0,this._overlapIdx=0,this._skipRemainder=0,this._isFirstWindow=!0,this._tempo=1,this._currTimelineIdx=0,this._inputSamples=0,this._outputSamples=0,this._sampleRate=0}}const ru=(a,i,r,c)=>{const o=Math.round(i*Bs/1e3),d=Math.round(i*Yu/1e3),h=Math.round(i*hE/1e3),g=Array.from({length:a.length},()=>[]),R=o-h,L=Math.ceil(r*R),y=c.mode==="drain"?h:Math.max(L+h,o)+d;let b=c.processIdx,I=c.overlapIdx,N=c.skipRemainder,W=c.isFirstWindow;for(;b<a[0].length-y&&I<a[0].length-h;){let $;if(W){$=Math.round(d/2);for(let U=0;U<a.length;U++)g[U].push(...a[U].subarray($,$+h))}else{const U=[b,Math.min(b+d,a[0].length-h)],F=[I,I+h];$=gE(a,U,F,dE,mE),EE(g,a,I,$,h)}for(let U=0;U<a.length;U++)g[U].push(...a[U].subarray($+h,$+o-h));I=$+o-h;const Y=pE(N,R,r);b+=Y.skipSize,N=Y.remainder,W=!1}return{output:g,overlapIdx:I,processIdx:b,skipRemainder:N}},pE=(a,i,r)=>{const c=a+r*i,o=Math.floor(c);return{skipSize:o,remainder:c-o}},gE=(a,i,r,c,o)=>{let d=0,h=Number.POSITIVE_INFINITY;const[g,R]=i,[L,y]=r;for(let b=g;b<R;b+=c){let I=0;for(let N=L;N<y;N+=o)for(let W=0;W<a.length;W++)I+=Math.pow(a[W][b+N-L]-a[W][N],2);I<h&&(h=I,d=b)}return d},EE=(a,i,r,c,o)=>{const d=1/o;for(let h=0;h<a.length;h++)for(let g=0;g<o;g++){const R=d*g,L=1-R,y=i[h][r+g]*L,b=i[h][c+g]*R;a[h].push(y+b)}},CE=(a,i)=>a.map(r=>{const c=Math.max(0,Math.floor(i));if(r.length>=c)return r.slice(0,c);if(c===0)return new Float32Array(0);const o=new Float32Array(c);if(o.set(r),r.length===0)return o;if(r.length===1)return o.fill(r[0],1),o;const d=2*(r.length-1);for(let h=r.length;h<c;h++){const g=Math.abs(r.length-1-(h-r.length+1)%d);o[h]=r[g]}return o});class TE{_tempo=new AE;_gain=new Jg;_declick=new Hg;_resampler;constructor(i){this._resampler=new jg(i)}process(i,r,c){return this._gain.updateCurve(c),this._tempo.process(i,r).map(R=>this._gain.process(R)).flat().map(R=>this._resampler.process(R)).flat().map(R=>this._declick.process(R)).flat()}flush(){const i=[],d=this._tempo.flush().map(h=>this._gain.process(h)).flat().map(h=>this._resampler.process(h)).flat().map(h=>this._declick.process(h)).flat();i.push(...d);for(const h of this._resampler.flush())i.push(...this._declick.process(h));return i.push(...this._declick.flush()),i}clear(){this._gain.clear(),this._tempo.clear(),this._resampler.clear(),this._declick.clear()}}class Xu{_results=[];_sampleRate=null;init(i){this._sampleRate=i}get length(){return this._results.length}get sampleRate(){if(!this._sampleRate)throw H(X.AUDIO_LOGIC_ERR,"AudioDecoderQueue is not initialized");return this._sampleRate}push(i){this._results.push(i)}get(i){const r=this.sampleRate;for(;this._results.length>0;){const c=this._results[0],o=c.timestamp+c.duration,d=er(i,r),h=er(o,r);if(d<h)return c.clone();this._results.shift().close()}return null}clear(){this._results.forEach(i=>i.close()),this._results.splice(0,this._results.length),this._results.length=0}}class Ci{_origin;_format;constructor(i){this._origin=i,i instanceof AudioData?this._format=i.format:this._format=SE(i.data)}get sampleRate(){return this._origin.sampleRate}get timestamp(){return this._origin.timestamp}get format(){return this._format}get numberOfChannels(){return this._origin instanceof AudioData?this._origin.numberOfChannels:this._origin.data.length}get numberOfFrames(){return this._origin instanceof AudioData?this._origin.numberOfFrames:this._origin.data[0].length}get duration(){return this._origin instanceof AudioData?this._origin.duration:Du(this.numberOfFrames,this.sampleRate)}
23clone(){return this._origin instanceof AudioData?new Ci(this._origin.clone()):new Ci({data:this._origin.data.map(i=>i.slice()),sampleRate:this.sampleRate,timestamp:this.timestamp})}close(){this._origin instanceof AudioData&&this._origin.close()}copyTo(i,r){if(this._origin instanceof AudioData)return this._origin.copyTo(i,{...r,format:"f32-planar"});const c=r.planeIndex,o=r.frameOffset||0,d=o+(r.frameCount||this.numberOfFrames),h=this._origin.data[c].subarray(o,d);RE(h,i)}}const SE=a=>a instanceof Uint8Array?"u8-planar":a instanceof Int16Array?"s16-planar":a instanceof Int32Array?"s32-planar":"f32-planar",RE=(a,i)=>{a instanceof Uint8Array?VE(a,i):a instanceof Int16Array?IE(a,i):a instanceof Int32Array?vE(a,i):a instanceof Float32Array&&i.set(a)},VE=(a,i)=>{for(let r=0;r<a.length;r++)i[r]=a[r]/255},IE=(a,i)=>{for(let r=0;r<a.length;r++)i[r]=a[r]/32767},vE=(a,i)=>{for(let r=0;r<a.length;r++)i[r]=a[r]/2147483647};class Ei{future=null;current=null;_isResolved=!1;promise(i=!1){return i&&this.reset(),this.current?this.current:this.current=new Promise((r,c)=>{this.future={resolve:r,reject:c}})}resolve(i,r=!0,c=!1){if(!this.future){if(c)return;throw new Error("No promise")}this._isResolved||(this.future.resolve(i),this._isResolved=!0,r&&this.reset())}reject(i,r=!0,c=!1){if(!this.future){if(c)return;throw new Error("No promise")}this._isResolved||(this.future.reject(i),this._isResolved=!0,r&&this.reset())}reset(){return this.current=null,this.future=null,this._isResolved=!1,this}}const OE=1024*2,PE=1152*3,wE=0,zu=(a,i)=>a.includes("aac")?uo(OE,i).as.us():a.includes("mp3")?uo(PE,i).as.us():a.includes("pcm")?uo(wE,i).as.us():a.includes("opus")?ue.fromMS(80).as.us():0;async function Hu(a,i){let r;i.codecpar?r=await a.ff_copyout_codecpar(i.codecpar):r=i;const c=await a.avcodec_get_name(r.codec_id),o={codec:"",sampleRate:r.sample_rate,numberOfChannels:r.channels},d=r.extradata;switch(c){case"flac":o.codec="flac",o.description=d;break;case"mp3":o.codec="mp3";break;case"aac":{switch(r.profile){case 1:default:o.codec="mp4a.40.2";break;case 4:o.codec="mp4a.40.5";break;case 28:o.codec="mp4a.40.29";break}d&&(o.description=d);break}case"opus":o.codec="opus";break;case"vorbis":o.codec="vorbis",o.description=d;break;case"pcm_f32le":o.codec="pcm-f32";break;case"pcm_f32be":o.codec="pcm-f32be";break;case"pcm_s32le":o.codec="pcm-s32";break;case"pcm_s32be":o.codec="pcm-s32be";break;case"pcm_s24le":o.codec="pcm-s24";break;case"pcm_s24be":o.codec="pcm-s24be";break;case"pcm_s16le":o.codec="pcm-s16";break;case"pcm_s16be":o.codec="pcm-s16be";break;case"pcm_u8":o.codec="pcm-u8";break}if(o.codec)return o;throw new Error(`Unsupported audio codec: ${c}`)}function LE(a,i,r){let c=(a.durationhi||0)*4294967296+(a.duration||0),o=(a.ptshi||0)*4294967296+(a.pts||0);r&&r.i64tof64&&(c=r.i64tof64(a.duration||0,a.durationhi||0),o=r.i64tof64(a.pts||0,a.ptshi||0));let d=a.time_base_num,h=a.time_base_den;if(!d)if(i.length){const L=i;d=L[0],h=L[1]}else{const L=i;d=L.time_base_num,h=L.time_base_den}const g=Math.round(c*d/(h||1)*1e6);
23return{timestamp:Math.round(o*d/(h||1)*1e6),duration:g}}function yE(a,i,r){const{timestamp:c,duration:o}=LE(a,i,r);return new EncodedAudioChunk({type:"key",timestamp:c,duration:o,data:a.data.buffer})}const re={};(function(){function a(h){if(h=h||[0,97,115,109,1,0,0,0],typeof WebAssembly!="object"||typeof WebAssembly.instantiate!="function")return!1;try{var h=new WebAssembly.Module(new Uint8Array(h));if(h instanceof WebAssembly.Module)return new WebAssembly.Instance(h)instanceof WebAssembly.Instance}catch{}return!1}function i(){try{var h=new WebAssembly.Memory({initial:1,maximum:1,shared:!0});return h.buffer instanceof SharedArrayBuffer}catch{}return!1}var r=typeof process<"u";re.base||(re.base=import.meta.url,re.base=re.base.replace(/\/[^\/]*$/,"")),re.isWebAssemblySupported=a,re.isThreadingSupported=i;function c(h){h=h||{};var g=!h.nowasm&&a(),R=h.yesthreads&&g&&!h.nothreads&&i();return g?R?"thr":"wasm":"asm"}re.target=c,re.VER="0.18.8.0",re.CONFIG="vrew",re.DBG="",re.factories={};var o={};o.NULL=0,o.i64tof64=function(h,g){return!g&&h>=0||g===-1&&h<0?h:g*4294967296+h+(h<0?4294967296:0)},o.f64toi64=function(h){return[~~h,Math.floor(h/4294967296)]},o.i64ToBigInt=function(h,g){var R=new DataView(new ArrayBuffer(8));return R.setInt32(0,h,!0),R.setInt32(4,g,!0),R.getBigInt64(0,!0)},o.bigIntToi64=function(h){var g=new DataView(new ArrayBuffer(8));return g.setBigInt64(0,h,!0),[g.getInt32(0,!0),g.getInt32(4,!0)]},o.ff_channel_layout=function(h){return h.channel_layout?h.channel_layout:h.channels&&h.channels!==1?(1<<h.channels)-1:4},o.ff_channels=function(h){if(h.channels)return h.channels;if(h.channel_layout){for(var g=0,R=h.channel_layout;R;)g+=R&1,R>>=1;return g}else return 1},o.AV_VERSION_INT=function(h,g,R){return h<<16|g<<8|R};function d(h,g){typeof g===void 0&&(g=0);var R=g;h.forEach(function(L){o[L]=R++})}o.AV_TIME_BASE=1e6,o.AV_NOPTS_VALUE_I64=[0,-2147483648],o.AV_NOPTS_VALUE_LO=0,o.AV_NOPTS_VALUE_HI=-2147483648,o.AV_NOPTS_VALUE=o.i64tof64(0,-2147483648),o.AV_OPT_SEARCH_CHILDREN=1,d(["AVMEDIA_TYPE_UNKNOWN","AVMEDIA_TYPE_VIDEO","AVMEDIA_TYPE_AUDIO","AVMEDIA_TYPE_DATA","AVMEDIA_TYPE_SUBTITLE","AVMEDIA_TYPE_ATTACHMENT"],-1),d(["AV_SAMPLE_FMT_NONE","AV_SAMPLE_FMT_U8","AV_SAMPLE_FMT_S16","AV_SAMPLE_FMT_S32","AV_SAMPLE_FMT_FLT","AV_SAMPLE_FMT_DBL","AV_SAMPLE_FMT_U8P","AV_SAMPLE_FMT_S16P","AV_SAMPLE_FMT_S32P","AV_SAMPLE_FMT_FLTP","AV_SAMPLE_FMT_DBLP","AV_SAMPLE_FMT_S64","AV_SAMPLE_FMT_S64P","AV_SAMPLE_FMT_NB"],-1),d(["AV_PIX_FMT_NONE","AV_PIX_FMT_YUV420P","AV_PIX_FMT_YUYV422","AV_PIX_FMT_RGB24","AV_PIX_FMT_BGR24","AV_PIX_FMT_YUV422P","AV_PIX_FMT_YUV444P","AV_PIX_FMT_YUV410P","AV_PIX_FMT_YUV411P","AV_PIX_FMT_GRAY8","AV_PIX_FMT_MONOWHITE","AV_PIX_FMT_MONOBLACK","AV_PIX_FMT_PAL8","AV_PIX_FMT_YUVJ420P","AV_PIX_FMT_YUVJ422P","AV_PIX_FMT_YUVJ444P","AV_PIX_FMT_UYVY422","AV_PIX_FMT_UYYVYY411","AV_PIX_FMT_BGR8","AV_PIX_FMT_BGR4","AV_PIX_FMT_BGR4_BYTE","AV_PIX_FMT_RGB8","AV_PIX_FMT_RGB4","AV_PIX_FMT_RGB4_BYTE","AV_PIX_FMT_NV12","AV_PIX_FMT_NV21","AV_PIX_FMT_ARGB","AV_PIX_FMT_RGBA","AV_PIX_FMT_ABGR","AV_PIX_FMT_BGRA","AV_PIX_FMT_GRAY16BE","AV_PIX_FMT_GRAY16LE","AV_PIX_FMT_YUV440P","AV_PIX_FMT_YUVJ440P","AV_PIX_FMT_YUVA420P","AV_PIX_FMT_RGB48BE","AV_PIX_FMT_RGB48LE","AV_PIX_FMT_RGB565BE","AV_PIX_FMT_RGB565LE","AV_PIX_FMT_RGB555BE","AV_PIX_FMT_RGB555LE","AV_PIX_FMT_BGR565BE","AV_PIX_FMT_BGR565LE","AV_PIX_FMT_BGR555BE","AV_PIX_FMT_BGR555LE"],-1),o.AVCOL_PRI_RESERVED0=0,o.AVCOL_PRI_BT709=1,o.AVCOL_PRI_UNSPECIFIED=2,o.AVCOL_PRI_RESERVED=3,o.AVCOL_PRI_BT470M=4,o.AVCOL_PRI_BT470BG=5,o.AVCOL_PRI_SMPTE170M=6,o.AVCOL_PRI_SMPTE240M=7,o.AVCOL_PRI_FILM=8,o.AVCOL_PRI_BT2020=9,o.AVCOL_PRI_SMPTE428=10,o.AVCOL_PRI_SMPTEST428_1=o.AVCOL_PRI_SMPTE428,o.AVCOL_PRI_SMPTE431=11,o.AVCOL_PRI_SMPTE432=12,o.AVCOL_PRI_EBU3213=22,o.AVCOL_PRI_JEDEC_P22=o.AVCOL_PRI_EBU3213,o.AVCOL_TRC_RESERVED0=0,o.AVCOL_TRC_BT709=1,o.AVCOL_TRC_UNSPECIFIED=2,o.AVCOL_TRC_RESERVED=3,o.AVCOL_TRC_GAMMA22=4,o.AVCOL_TRC_GAMMA28=5,o.AVCOL_TRC_SMPTE170M=6,o.AVCOL_TRC_SMPTE240M=7,o.AVCOL_TRC_LINEAR=8,o.AVCOL_TRC_LOG=9,o.AVCOL_TRC_LOG_SQRT=10,o.AVCOL_TRC_IEC61966_2_4=11,o.AVCOL_TRC_BT1361_ECG=12,o.AVCOL_TRC_IEC61966_2_1=13,o.AVCOL_TRC_BT2020_10=14,o.AVCOL_TRC_BT2020_12=15,o.AVCOL_TRC_SMPTE2084=16,o.AVCOL_TRC_SMPTEST2084=o.AVCOL_TRC_SMPTE2084,o.AVCOL_TRC_SMPTE428=17,o.AVCOL_TRC_SMPTEST428_1=o.AVCOL_TRC_SMPTE428,o.AVCOL_TRC_ARIB_STD_B67=18,o.AVCOL_SPC_RGB=0,o.AVCOL_SPC_BT709=1,o.AVCOL_SPC_UNSPECIFIED=2,o.AVCOL_SPC_RESERVED=3,o.AVCOL_SPC_FCC=4,o.AVCOL_SPC_BT470BG=5,o.AVCOL_SPC_SMPTE170M=6,o.AVCOL_SPC_SMPTE240M=7,o.AVCOL_SPC_YCGCO=8,o.AVCOL_SPC_YCOCG=o.AVCOL_SPC_YCGCO,o.AVCOL_SPC_BT2020_NCL=9,o.AVCOL_SPC_BT2020_CL=10,o.AVCOL_SPC_SMPTE2085=11,o.AVCOL_SPC_CHROMA_DERIVED_NCL=12,o.AVCOL_SPC_CHROMA_DERIVED_CL=13,o.AVCOL_SPC_ICTCP=14,o.AVCOL_RANGE_UNSPECIFIED=0,o.AVCOL_RANGE_MPEG=1,o.AVCOL_RANGE_JPEG=2,o.AVIO_FLAG_READ=1,o.AVIO_FLAG_WRITE=2,o.AVIO_FLAG_READ_WRITE=3,o.AVIO_FLAG_NONBLOCK=8,o.AVIO_FLAG_DIRECT=32768,o.AVFMT_FLAG_NOBUFFER=64,o.AVFMT_FLAG_FLUSH_PACKETS=512,o.AVSEEK_FLAG_BACKWARD=1,o.AVSEEK_FLAG_BYTE=2,o.AVSEEK_FLAG_ANY=4,o.AVSEEK_FLAG_FRAME=8,o.AVDISCARD_NONE=-16,o.AVDISCARD_DEFAULT=0,o.AVDISCARD_NONREF=8,o.AVDISCARD_BIDIR=16,o.AVDISCARD_NONINTRA=24,o.AVDISCARD_NONKEY=32,o.AVDISCARD_ALL=48,o.AV_LOG_QUIET=-8,o.AV_LOG_PANIC=0,o.AV_LOG_FATAL=8,o.AV_LOG_ERROR=16,o.AV_LOG_WARNING=24,o.AV_LOG_INFO=32,o.AV_LOG_VERBOSE=40,o.AV_LOG_DEBUG=48,o.AV_LOG_TRACE=56,o.AV_PKT_FLAG_KEY=1,o.AV_PKT_FLAG_CORRUPT=2,o.AV_PKT_FLAG_DISCARD=4,o.AV_PKT_FLAG_TRUSTED=8,o.AV_PKT_FLAG_DISPOSABLE=16,o.SWS_FAST_BILINEAR=1,o.SWS_BILINEAR=2,o.SWS_BICUBIC=4,o.SWS_X=8,o.SWS_POINT=16,o.SWS_AREA=32,o.SWS_BICUBLIN=64,o.SWS_GAUSS=128,o.SWS_SINC=256,o.SWS_LANCZOS=512,o.SWS_SPLINE=1024,d(["E2BIG","EPERM","EADDRINUSE","EADDRNOTAVAIL","EAFNOSUPPORT","EAGAIN","EALREADY","
23EBADF","EBADMSG","EBUSY","ECANCELED","ECHILD","ECONNABORTED","ECONNREFUSED","ECONNRESET","EDEADLOCK","EDESTADDRREQ","EDOM","EDQUOT","EEXIST","EFAULT","EFBIG","EHOSTUNREACH","EIDRM","EILSEQ","EINPROGRESS","EINTR","EINVAL","EIO","EISCONN","EISDIR","ELOOP","EMFILE","EMLINK","EMSGSIZE","EMULTIHOP","ENAMETOOLONG","ENETDOWN","ENETRESET","ENETUNREACH","ENFILE","ENOBUFS","ENODEV","ENOENT"],1),o.AVERROR_EOF=-541478725,Object.assign(re,o),re.LibAV=function(h){h=h||{};var g=h.base||re.base,R=c(h),L=h.variant||re.variant||"vrew",y=!0;y&&(h.noes6||re.noes6)&&(y=!1);var b=h.toImport||re.toImport||g+"/libav-0.18.8.0-"+L+"."+R+"."+(y?"mjs":"js"),I,N="direct";return R==="thr"?N="threads":!r&&!h.noworker&&typeof Worker<"u"&&(N="worker"),Promise.all([]).then(function(){if(h.factory||re.factory)return h.factory||re.factory;if(re.factories[b])return re.factories[b];if(N!=="worker")return y?import(b).then(function(W){return re.factories[b]=W.default,W.default}):r?re.factories[b]=require(b):typeof importScripts<"u"?(importScripts(b),re.factories[b]=LibAVFactory):new Promise(function(W,$){var Y=document.createElement("script");Y.src=b,Y.addEventListener("load",W),Y.addEventListener("error",$),Y.async=!0,document.body.appendChild(Y)}).then(function(){return re.factories[b]=LibAVFactory})}).then(function(W){return N==="worker"?(I={},I.worker=new Worker(b,{type:y?"module":"classic"}),new Promise(function($,Y){I.worker.onerror=F=>{console.error(F),Y(F.error||new Error(F.message))},I.worker.postMessage({config:{variant:h.variant||re.variant,wasmurl:h.wasmurl||re.wasmurl}}),I.on=1,I.handlers={error:[function(F){Y(F)},null],onready:[function(){$()},null],onwrite:[function(F){I.onwrite&&I.onwrite.apply(I,F)},null],onread:[function(F){try{var B=null;I.onread&&(B=I.onread.apply(I,F)),B&&B.then&&B.catch&&B.catch(function(z){I.ff_reader_dev_send(F[0],null,{error:z})})}catch(z){I.ff_reader_dev_send(F[0],null,{error:z})}},null],onblockread:[function(F){try{var B=null;I.onblockread&&(B=I.onblockread.apply(I,F)),B&&B.then&&B.catch&&B.catch(function(z){I.ff_block_reader_dev_send(F[0],F[1],null,{error:z})})}catch(z){I.ff_block_reader_dev_send(F[0],F[1],null,{error:z})}},null]},I.c=function(){for(var F=Array.prototype.slice.call(arguments),B=[],z=0;z<F.length;z++)F[z]&&F[z].libavjsTransfer&&B.push.apply(B,F[z].libavjsTransfer);return new Promise(function(ge,Me){var K=I.on++;F=[K].concat(F),I.handlers[K]=[ge,Me],I.worker.postMessage(F,B)})};function U(F){var B=F.data[0],z=I.handlers[B];z&&(F.data[2]?z[0](F.data[3]):z[1](F.data[3]),typeof B=="number"&&delete I.handlers[B])}I.worker.onmessage=U,I.terminate=function(){I.worker.terminate()}})):N==="threads"?Promise.all([]).then(function(){return W({wasmurl:h.wasmurl||re.wasmurl,variant:h.variant||re.variant})}).then(function($){I=$;var Y=I.libavjs_create_main_thread(),U=I.PThread.pthreads[Y],F=1,B={},z=null,ge=new Promise(function(K){z=K});I.c=function(){var K=Array.prototype.slice.call(arguments);return new Promise(function(Ae,$e){var xt=F++;K=[xt].concat(K),B[xt]=[Ae,$e],U.postMessage({c:"libavjs_run",a:K})})};var Me=U.onmessage;return U.onmessage=function(K){if(K.data&&K.data.c==="libavjs_ret"){var Ae=K.data.a,$e=B[Ae[0]];$e&&(Ae[2]?$e[0](Ae[3]):$e[1](Ae[3]),delete B[Ae[0]])}else if(K.data&&K.data.c==="libavjs_wait_reader")if(I.readerDevReady(K.data.fd))U.postMessage({c:"libavjs_wait_reader",fd:K.data.fd});else{var xt=I.fdName(K.data.fd),Vt=I.ff_reader_dev_waiters[xt];Vt||(Vt=I.ff_reader_dev_waiters[xt]=[]),Vt.push(function(){U.postMessage({c:"libavjs_wait_reader",fd:K.data.fd})})}else if(K.data&&K.data.c==="libavjs_ready")z();else return Me.apply(this,arguments)},I.terminate=function(){I.PThread.unusedWorkers.concat(I.PThread.runningWorkers).forEach(function(K){K.terminate()})},ge}):Promise.all([]).then(function(){return W({wasmurl:h.wasmurl||re.wasmurl,variant:h.variant||re.variant})}).then(function($){I=$,I.worker=!1,I.c=function(Y){var U=Array.prototype.slice.call(arguments,1);return new Promise(function(F,B){try{F(I[Y].apply(I,U))}catch(z){B(z)}})},I.terminate=function(){}})}).then(function(){function W(F){F.forEach(function(B){I[B]=function(){return I.c.apply(I,[B].concat(Array.prototype.slice.call(arguments)))}})}function $(F){F.forEach(function(B){var z=I[B+"_sync"]=I[B];I[B]=function(){var ge=arguments;return new Promise(function(Me,K){try{var Ae=z.apply(I,ge);typeof Ae=="object"&&Ae!==null&&Ae.then?Ae.then(Me).catch(K):Me(Ae)}catch($e){K($e)}})}})}var Y=["calloc","close","dup2","free","malloc","mallinfo_uordblks","open","strerror","libavjs_create_main_thread","libavjs_with_
23swscale","ff_malloc_int32_list","ff_malloc_int64_list","av_compare_ts_js","av_dict_copy_js","av_dict_free","av_dict_set_js","av_log_get_level","av_log_set_level","av_opt_set","av_opt_set_int_list_js","av_strdup","ff_error","ff_nothing","LIBAVUTIL_VERSION_INT","av_dict_free_js","sws_getContext","sws_freeContext","sws_scale_frame","av_find_best_stream","av_find_input_format","avformat_alloc_context","avformat_alloc_output_context2_js","avformat_close_input","avformat_find_stream_info","avformat_flush","avformat_free_context","avformat_new_stream","avformat_open_input","avformat_open_input_js","avformat_seek_file","avformat_seek_file_min","avformat_seek_file_max","avformat_seek_file_approx","avformat_write_header","avformat_get_rotation","av_interleaved_write_frame","avio_open2_js","avio_close","avio_flush","av_read_frame","av_seek_frame","av_write_frame","av_write_trailer","avstream_get_frame_rate","avstream_get_sample_aspect_ratio_num","avstream_get_sample_aspect_ratio_den","ff_get_media_duration","ff_get_timecode","ff_get_input_format_name","ff_get_major_brand","ff_slice_audio","ff_extract_audio","ff_convert_audio_to_mp3","convert_to_hls","LIBAVFORMAT_VERSION_INT","ff_init_muxer","ff_free_muxer","ff_init_demuxer_file","ff_write_multi","ff_read_frame_multi","ff_read_multi","AVFormatContext_duration","AVFormatContext_duration_s","AVFormatContext_durationhi","AVFormatContext_durationhi_s","AVFormatContext_flags","AVFormatContext_flags_s","AVFormatContext_nb_streams","AVFormatContext_nb_streams_s","AVFormatContext_oformat","AVFormatContext_oformat_s","AVFormatContext_pb","AVFormatContext_pb_s","AVFormatContext_start_time","AVFormatContext_start_time_s","AVFormatContext_start_timehi","AVFormatContext_start_timehi_s","AVFormatContext_streams_a","AVFormatContext_streams_a_s","AVStream_codecpar","AVStream_codecpar_s","AVStream_discard","AVStream_discard_s","AVStream_duration","AVStream_duration_s","AVStream_durationhi","AVStream_durationhi_s","AVStream_start_time","AVStream_start_time_s","AVStream_start_timehi","AVStream_start_timehi_s","AVStream_time_base_num","AVStream_time_base_den","AVStream_time_base_num_s","AVStream_time_base_den_s","AVStream_time_base_s","avformat_close_input_js","avcodec_descriptor_get","avcodec_descriptor_get_by_name","avcodec_descriptor_next","av_grow_packet","av_packet_alloc","av_packet_clone","av_packet_free","av_packet_make_writable","av_packet_new_side_data","av_packet_ref","av_packet_rescale_ts_js","AVPacketSideData_data","AVPacketSideData_size","AVPacketSideData_type","av_packet_unref","av_shrink_packet","ff_codecpar_new_side_data","av_channel_layout_default_mask","LIBAVCODEC_VERSION_INT","ff_set_packet","ff_copyout_packet","ff_copyout_packet_ptr","ff_copyin_packet","AVCodecDescriptor_id","AVCodecDescriptor_id_s","AVCodecDescriptor_long_name","AVCodecDescriptor_mime_types_a","AVCodecDescriptor_mime_types_a_s","AVCodecDescriptor_name","AVCodecDescriptor_props","AVCodecDescriptor_props_s","AVCodecDescriptor_type","AVCodecDescriptor_type_s","AVCodecParameters_bit_rate","AVCodecParameters_bit_rate_s","AVCodecParameters_channel_layoutmask","AVCodecParameters_channel_layoutmask_s","AVCodecParameters_channels","AVCodecParameters_channels_s","AVCodecParameters_ch_layout_nb_channels","AVCodecParameters_ch_layout_nb_channels_s","AVCodecParameters_chroma_location","AVCodecParameters_chroma_location_s","AVCodecParameters_codec_id","AVCodecParameters_codec_id_s","AVCodecParameters_codec_tag","AVCodecParameters_codec_tag_s","AVCodecParameters_codec_type","AVCodecParameters_codec_type_s","AVCodecParameters_coded_side_data","AVCodecParameters_coded_side_data_s","AVCodecParameters_color_primaries","AVCodecParameters_color_primaries_s","AVCodecParameters_color_range","AVCodecParameters_color_range_s","AVCodecParameters_color_space","AVCodecParameters_color_space_s","AVCodecParameters_color_trc","AVCodecParameters_color_trc_s","AVCodecParameters_extradata","AVCodecParameters_extradata_s","AVCodecParameters_extradata_size","AVCodecParameters_extradata_size_s","AVCodecParameters_format","AVCodecParameters_format_s","AVCodecParameters_framerate_num","AVCodecParameters_framerate_den","AVCodecParameters_framerate_num_s","AVCodecParameters_framerate_den_s","AVCodecParameters_framerate_s","AVCodecParameters_height","AVCodecParameters_height_s","AVCodecParameters_level","AVCodecParameters_level_s","AVCodecParameters_nb_coded_side_data","AVCodecParameters_nb_coded_side_data_s","AVCodecParameters_profile","AVCodecParameters_profile_s","AVCodecParameters_sample_rate","AVCodecParameters_sample_rate_s","AVCodecParameters_width","AVCodecParameters_width_s","AVCodecParameters_block_align","AVCodecParameters_block_align_s","AVCodecParameters_frame_size","AVCodecParameters_frame_size_s","AVCodecParameters_initial_padding","AVCodecParameters_initial_padding_s","AVCodecParameters_trailing_padding","AVCodecParameters_trailing_padding_s","AVCodecParameters_seek_preroll","AVCodecParameters_seek_preroll_s","AVPacket_data","AVPacket_data_s","AVPacket_dts","AVPacket_dts_s","AVPacket_dtshi","AVPacket_dtshi_s","AVPacket_duration","AVPacket_duration_s","AVPacket_durationhi","AVPacket_durationhi_s","AVPacket_flags","AVPacket_flags_s","AVPacket_pos","AVPacket_pos_s","AVPacket_poshi","AVPacket_poshi_s","AVPacket_pts","AVPacket_pts_s","AVPacket_ptshi","AVPacket_ptshi_s","AVPacket_side_data","AVPacket_side_data_s","AVPacket_side_data_elems","AVPacket_side_data_elems_s","AVPacket_size","AVPacket_size_s","AVPacket_stream_index","AVPacket_stream_index_s","AVPacket_time_base_num","AVPacket_time_base_den","AVPacket_time_base_num_s","AVPacket_time_base_den_s","AVPacket_time_base_s","av_packet_free_js","avcodec_parameters_free_js","avcodec_alloc_context3","avcodec_find_decoder","avcodec_find_decoder_by_name","avcodec_find_encoder","avcodec_find_encoder_by_name","avcodec_flush_buffers","avcodec_free_context","avcodec_get_name","avcodec_open2","avcodec_open2_js","avcodec_parameters_alloc","avcodec_parameters_copy","avcodec_parameters_free","avcodec_parameters_from_context","avcodec_parameters_to_context","avcodec_receive_frame","avcodec_receive_packet","avcodec_send_frame","avcodec_send_packet","ff_get_colorspace_name","ff_get_pix_fmt_name","ff_get_color_range_name","ff_init_encoder","ff_init_decoder","ff_free_encoder","ff_free_decoder","ff_encode_multi","ff_decode_multi","ff_copyout_codecpar","ff_copyin_codecpar","AVCodec_name","AVCodec_sample_fmts","AVCodec_sample_fmts_s","AVCodec_sample_fmts_a","AVCodec_sample_fmts_a_s","AVCodec_supported_samplerates","AVCodec_supported_samplerates_s","AVCodec_supported_samplerates_a","AVCodec_supported_samplerates_a_s","AVCodec_type","AVCodec_type_s","AVCodecContext_codec_id","AVCodecContext_codec_id_s","AVCodecContext_codec_type","AVCodecContext_codec_type_s","AVCodecContext_bit_rate","AVCodecContext_bit_rate_s","AVCodecContext_bit_ratehi","AVCodecContext_bit_ratehi_s","AVCodecContext_channel_layout","AVCodecContext_channel_layout_s","AVCodecContext_channel_layouthi","AVCodecContext_channel_layouthi_s","AVCodecContext_channels","AVCodecContext_channels_s","AVCodecContext_channel_layoutmask","AVCodecContext_channel_layoutmask_s","AVCodecContext_ch_layout_nb_channels","AVCodecContext_ch_layout_nb_channels_s","AVCodecContext_coded_side_data","AVCodecContext_coded_side_data_s","AVCodecContext_compression_level","AVCodecContext_compression_level_s","AVCodecContext_extradata","AVCodecContext_extradata_s","AVCodecContext_extradata_size","AVCodecContext_extradata_size_s","AVCodecContext_frame_size","AVCodecContext_frame_size_s","AVCodecContext_framerate_num","AVCodecContext_framerate_den","AVCodecContext_framerate_num_s","AVCodecContext_framerate_den_s","AVCodecContext_framerate_s","AVCodecContext_gop_size","AVCodecContext_gop_size_s","AVCodecContext_height","AVCodecContext_height_s","AVCodecContext_keyint_min","AVCodecContext_keyint_min_s","AVCodecContext_level","AVCodecContext_level_s","AVCodecContext_max_b_frames","AVCodecContext_max_b_frames_s","AVCodecContext_nb_coded_side_data","AVCodecContext_nb_coded_side_data_s","AVCodecContext_pix_fmt","AVCodecContext_pix_fmt_s","AVCodecContext_profile","AVCodecContext_profile_s","AVCodecContext_rc_max_rate","AVCodecContext_rc_max_rate_s","AVCodecContext_rc_max_ratehi","AVCodecContext_rc_max_ratehi_s","AVCodecContext_rc_min_rate","AVCodecContext_rc_min_rate_s","AVCodecContext_rc_min_ratehi","AVCodecContext_rc_min_ratehi_s","AVCodecContext_sample_aspect_ratio_num","AVCodecContext_sample_aspect_ratio_den","AVCodecContext_sample_aspect_ratio_num_s","AVCodecContext_sample_aspect_ratio_den_s","AVCodecContext_sample_aspect_ratio_s","AVCodecContext_sample_fmt","AVCodecContext_sample_fmt_s","AVCodecContext_sample_rate","AVCodecContext_sample_rate_s","AVCodecContext_str
23ict_std_compliance","AVCodecContext_strict_std_compliance_s","AVCodecContext_time_base_num","AVCodecContext_time_base_den","AVCodecContext_time_base_num_s","AVCodecContext_time_base_den_s","AVCodecContext_time_base_s","AVCodecContext_pkt_timebase_num","AVCodecContext_pkt_timebase_den","AVCodecContext_pkt_timebase_num_s","AVCodecContext_pkt_timebase_den_s","AVCodecContext_pkt_timebase_s","AVCodecContext_qmax","AVCodecContext_qmax_s","AVCodecContext_qmin","AVCodecContext_qmin_s","AVCodecContext_width","AVCodecContext_width_s","avcodec_free_context_js","av_frame_alloc","av_frame_clone","av_frame_free","av_frame_get_buffer","av_frame_make_writable","av_frame_ref","av_frame_unref","av_get_bytes_per_sample","av_get_sample_fmt_name","av_pix_fmt_desc_get","AVPixFmtDescriptor_comp_depth","ff_frame_rescale_ts_js","ff_copyout_frame","ff_copyout_frame_video","ff_frame_video_packed_size","ff_copyout_frame_video_packed","ff_copyout_frame_video_imagedata","ff_copyout_frame_ptr","ff_copyin_frame","AVFrame_channel_layout","AVFrame_channel_layout_s","AVFrame_channel_layouthi","AVFrame_channel_layouthi_s","AVFrame_channels","AVFrame_channels_s","AVFrame_channel_layoutmask","AVFrame_channel_layoutmask_s","AVFrame_ch_layout_nb_channels","AVFrame_ch_layout_nb_channels_s","AVFrame_crop_bottom","AVFrame_crop_bottom_s","AVFrame_crop_left","AVFrame_crop_left_s","AVFrame_crop_right","AVFrame_crop_right_s","AVFrame_crop_top","AVFrame_crop_top_s","AVFrame_data_a","AVFrame_data_a_s","AVFrame_flags","AVFrame_flags_s","AVFrame_format","AVFrame_format_s","AVFrame_height","AVFrame_height_s","AVFrame_key_frame","AVFrame_key_frame_s","AVFrame_linesize_a","AVFrame_linesize_a_s","AVFrame_nb_samples","AVFrame_nb_samples_s","AVFrame_pict_type","AVFrame_pict_type_s","AVFrame_pts","AVFrame_pts_s","AVFrame_ptshi","AVFrame_ptshi_s","AVFrame_duration","AVFrame_duration_s","AVFrame_durationhi","AVFrame_durationhi_s","AVFrame_sample_aspect_ratio_num","AVFrame_sample_aspect_ratio_den","AVFrame_sample_aspect_ratio_num_s","AVFrame_sample_aspect_ratio_den_s","AVFrame_sample_aspect_ratio_s","AVFrame_sample_rate","AVFrame_sample_rate_s","AVFrame_time_base_num","AVFrame_time_base_den","AVFrame_time_base_num_s","AVFrame_time_base_den_s","AVFrame_time_base_s","AVFrame_width","AVFrame_width_s","AVPixFmtDescriptor_flags","AVPixFmtDescriptor_flags_s","AVPixFmtDescriptor_log2_chroma_h","AVPixFmtDescriptor_log2_chroma_h_s","AVPixFmtDescriptor_log2_chroma_w","AVPixFmtDescriptor_log2_chroma_w_s","AVPixFmtDescriptor_nb_components","AVPixFmtDescriptor_nb_components_s","av_frame_free_js","avcodec_descriptor_get","avcodec_descriptor_get_by_name","avcodec_descriptor_next","av_grow_packet","av_packet_alloc","av_packet_clone","av_packet_free","av_packet_make_writable","av_packet_new_side_data","av_packet_ref","av_packet_rescale_ts_js","AVPacketSideData_data","AVPacketSideData_size","AVPacketSideData_type","av_packet_unref","av_shrink_packet","ff_codecpar_new_side_data","av_channel_layout_default_mask","LIBAVCODEC_VERSION_INT","ff_set_packet","ff_copyout_packet","ff_copyout_packet_ptr","ff_copyin_packet","AVCodecDescriptor_id","AVCodecDescriptor_id_s","AVCodecDescriptor_long_name","AVCodecDescriptor_mime_types_a","AVCodecDescriptor_mime_types_a_s","AVCodecDescriptor_name","AVCodecDescriptor_props","AVCodecDescriptor_props_s","AVCodecDescriptor_type","AVCodecDescriptor_type_s","AVCodecParameters_bit_rate","AVCodecParameters_bit_rate_s","AVCodecParameters_channel_layoutmask","AVCodecParameters_channel_layoutmask_s","AVCodecParameters_channels","AVCodecParameters_channels_s","AVCodecParameters_ch_layout_nb_channels","AVCodecParameters_ch_layout_nb_channels_s","AVCodecParameters_chroma_location","AVCodecParameters_chroma_location_s","AVCodecParameters_codec_id","AVCodecParameters_codec_id_s","AVCodecParameters_codec_tag","AVCodecParameters_codec_tag_s","AVCodecParameters_codec_type","AVCodecParameters_codec_type_s","AVCodecParameters_coded_side_data","AVCodecParameters_coded_side_data_s","AVCodecParameters_color_primaries","AVCodecParameters_color_primaries_s","AVCodecParameters_color_range","AVCodecParameters_color_range_s","AVCodecParameters_color_space","AVCodecParameters_color_space_s","AVCodecParameters_color_trc","AVCodecParameters_color_trc_s","AVCodecParameters_extradata","AVCodecParameters_extradata_s","AVCodecParameters_extradata_size","AVCodecParameters_extradata_size_s","AVCodecParameters_format","AVCodecParameters_format_s","AVCodecParameters_framerate_num","AVCodecParameters_framerate_den","AVCodecParameters_framerate_num_s","AVCodecParameters_framerate_den_s","AVCodecParameters_framerate_s","AVCodecParameters_height","AVCodecParameters_height_s","AVCodecParameters_level","AVCodecParameters_level_s","AVCodecParameters_nb_coded_side_data","AVCodecParameters_nb_coded_side_data_s","AVCodecParameters_profile","AVCodecParameters_profile_s","AVCodecParameters_sample_rate","AVCodecParameters_sample_rate_s","AVCodecParameters_width","AVCodecParameters_width_s","AVCodecParameters_block_align","AVCodecParameters_block_align_s","AVCodecParameters_frame_size","AVCodecParameters_frame_size_s","AVCodecParameters_initial_padding","AVCodecParameters_initial_padding_s","AVCodecParameters_trailing_padding","AVCodecParameters_trailing_padding_s","AVCodecParameters_seek_preroll","AVCodecParameters_seek_preroll_s","AVPacket_data","AVPacket_data_s","AVPacket_dts","AVPacket_dts_s","AVPacket_dtshi","AVPacket_dtshi_s","AVPacket_duration","AVPacket_duration_s","AVPacket_durationhi","AVPacket_durationhi_s","AVPacket_flags","AVPacket_flags_s","AVPacket_pos","AVPacket_pos_s","AVPacket_poshi","AVPacket_poshi_s","AVPacket_pts","AVPacket_pts_s","AVPacket_ptshi","AVPacket_ptshi_s","AVPacket_side_data","AVPacket_side_data_s","AVPacket_side_data_elems","AVPacket_side_data_elems_s","AVPacket_size","AVPacket_size_s","AVPacket_stream_index","AVPacket_stream_index_s","AVPacket_time_base_num","AVPacket_time_base_den","AVPacket_time_base_num_s","AVPacket_time_base_den_s","AVPacket_time_base_s","av_packet_free_js","avcodec_parameters_free_js","av_bsf_flush","av_bsf_free","av_bsf_init","av_bsf_list_parse_str","av_bsf_list_parse_str_js","av_bsf_receive_packet","av_bsf_send_packet","ff_bsf_multi","AVBSFContext_par_in","AVBSFContext_par_in_s","AVBSFContext_par_out","AVBSFContext_par_out_s","AVBSFContext_time_base_in_num","AVBSFContext_time_base_in_den","AVBSFContext_time_base_in_num_s","AVBSFContext_time_base_in_den_s","AVBSFContext_time_base_in_s","AVBSFContext_time_base_out_num","AVBSFContext_time_base_out_den","AVBSFContext_time_base_out_num_s","AVBSFContext_time_base_out_den_s","AVBSFContext_time_base_out_s","av_bsf_free_js","av_buffersink_get_frame","av_buffersink_get_time_base_num","av_buffersink_get_time_base_den","av_buffersink_set_frame_size","ff_buffersink_set_ch_layout","av_buffersrc_add_frame_flags","avfilter_free","avfilter_get_by_name","avfilter_graph_alloc","avfilter_graph_config","avfilter_graph_create_filter_js","avfilter_graph_free","avfilter_graph_parse","avfilter_inout_alloc","avfilter_inout_free","avfilter_link","LIBAVFILTER_VERSION_INT","ff_init_filter_graph","ff_filter_multi","ff_decode_filter_multi","AVFilterInOut_filter_ctx","AVFilterInOut_filter_ctx_s","AVFilterInOut_name","AVFilterInOut_name_s","AVFilterInOut_next","AVFilterInOut_next_s","AVFilterInOut_pad_idx","AVFilterInOut_pad_idx_s","avfilter_graph_free_js","avfilter_inout_free_js"],U=["copyin_u8","copyout_u8","copyin_s16","copyout_s16","copyin_s32","copyout_s32","copyin_f32","copyout_f32","createLazyFile","ff_block_reader_dev_send","ff_reader_dev_send","ff_reader_dev_waiting","mkblockreaderdev","mkdev","mkfsfhfile","mkreadaheadfile","mkreaderdev","mkstreamwriterdev","mkworkerfsfile","mkwriterdev","mountwriterfs","readFile","unlink","unlinkfsfhfile","unlinkreadaheadfile","unlinkworkerfsfile","unmount","writeFile"];return I.libavjsMode=N,N==="worker"?(W(Y),W(U)):N==="threads"?(W(Y),$(U)):($(Y),$(U)),Object.assign(I,o),I})}})();const{base:fC,isWebAssemblySupported:hC,isThreadingSupported:dC,target:mC,VER:AC,CONFIG:pC,DBG:gC,factories:EC,NULL:CC,i64tof64:TC,f64toi64:SC,i64ToBigInt:RC,bigIntToi64:VC,ff_channel_layout:IC,ff_channels:vC,AV_VERSION_INT:OC,AV_TIME_BASE:PC,AV_NOPTS_VALUE_I64:wC,AV_NOPTS_VALUE_LO:LC,AV_NOPTS_VALUE_HI:yC,AV_NOPTS_VALUE:bC,AV_OPT_SEARCH_CHILDREN:xC,AVMEDIA_TYPE_UNKNOWN:DC,AVMEDIA_TYPE_VIDEO:FC,AVMEDIA_TYPE_AUDIO:MC,AVMEDIA_TYPE_DATA:NC,AVMEDIA_TYPE_SUBTITLE:kC,AVMEDIA_TYPE_ATTACHMENT:UC,AV_SAMPLE_FMT_NONE:BC,AV_SAMPLE_FMT_U8:GC,AV_SAMPLE_FMT_S16:WC,AV_SAMPLE_FMT_S32:YC,AV_SAMPLE_FMT_FLT:XC,AV_SAMPLE_FMT_DBL:zC,AV_SAMPLE_FMT_U8P:HC,AV_SAMPLE_FMT_S16P:$C,AV_SAMPLE_FMT_S32P:qC,AV_SAMPLE_FMT_FLTP:KC,AV_SAMPLE_FMT_DBLP:ZC,AV_SAMPLE_FMT_S64:JC,AV_SAMPLE_FMT_S64P:QC,AV_SAMPLE_FMT_NB:jC,AV_PIX_FMT_NONE:eT,AV_PIX_FMT_YUV420P:tT,AV_PIX_FMT_YUYV422:nT,AV_PIX_FMT_RGB24:rT,AV_PIX_FMT_BGR24:iT,AV_PIX_FMT_YUV422P:sT,AV_PIX_FMT_YUV444P:aT,AV_PIX_FMT_YUV410P:oT,AV_PIX_FMT_YUV411P:_T,AV_PIX_FMT_GRAY8:cT,AV_PIX_FMT_MONOWHITE:uT,AV_PIX_FMT_MONOBLACK:lT,AV_PIX_FMT_PAL8:fT,AV_PIX_FMT_YUVJ420P:hT,A
23V_PIX_FMT_YUVJ422P:dT,AV_PIX_FMT_YUVJ444P:mT,AV_PIX_FMT_UYVY422:AT,AV_PIX_FMT_UYYVYY411:pT,AV_PIX_FMT_BGR8:gT,AV_PIX_FMT_BGR4:ET,AV_PIX_FMT_BGR4_BYTE:CT,AV_PIX_FMT_RGB8:TT,AV_PIX_FMT_RGB4:ST,AV_PIX_FMT_RGB4_BYTE:RT,AV_PIX_FMT_NV12:VT,AV_PIX_FMT_NV21:IT,AV_PIX_FMT_ARGB:vT,AV_PIX_FMT_RGBA:OT,AV_PIX_FMT_ABGR:PT,AV_PIX_FMT_BGRA:wT,AV_PIX_FMT_GRAY16BE:LT,AV_PIX_FMT_GRAY16LE:yT,AV_PIX_FMT_YUV440P:bT,AV_PIX_FMT_YUVJ440P:xT,AV_PIX_FMT_YUVA420P:DT,AV_PIX_FMT_RGB48BE:FT,AV_PIX_FMT_RGB48LE:MT,AV_PIX_FMT_RGB565BE:NT,AV_PIX_FMT_RGB565LE:kT,AV_PIX_FMT_RGB555BE:UT,AV_PIX_FMT_RGB555LE:BT,AV_PIX_FMT_BGR565BE:GT,AV_PIX_FMT_BGR565LE:WT,AV_PIX_FMT_BGR555BE:YT,AV_PIX_FMT_BGR555LE:XT,AVCOL_PRI_RESERVED0:zT,AVCOL_PRI_BT709:HT,AVCOL_PRI_UNSPECIFIED:$T,AVCOL_PRI_RESERVED:qT,AVCOL_PRI_BT470M:KT,AVCOL_PRI_BT470BG:ZT,AVCOL_PRI_SMPTE170M:JT,AVCOL_PRI_SMPTE240M:QT,AVCOL_PRI_FILM:jT,AVCOL_PRI_BT2020:e0,AVCOL_PRI_SMPTE428:t0,AVCOL_PRI_SMPTEST428_1:n0,AVCOL_PRI_SMPTE431:r0,AVCOL_PRI_SMPTE432:i0,AVCOL_PRI_EBU3213:s0,AVCOL_PRI_JEDEC_P22:a0,AVCOL_TRC_RESERVED0:o0,AVCOL_TRC_BT709:_0,AVCOL_TRC_UNSPECIFIED:c0,AVCOL_TRC_RESERVED:u0,AVCOL_TRC_GAMMA22:l0,AVCOL_TRC_GAMMA28:f0,AVCOL_TRC_SMPTE170M:h0,AVCOL_TRC_SMPTE240M:d0,AVCOL_TRC_LINEAR:m0,AVCOL_TRC_LOG:A0,AVCOL_TRC_LOG_SQRT:p0,AVCOL_TRC_IEC61966_2_4:g0,AVCOL_TRC_BT1361_ECG:E0,AVCOL_TRC_IEC61966_2_1:C0,AVCOL_TRC_BT2020_10:T0,AVCOL_TRC_BT2020_12:S0,AVCOL_TRC_SMPTE2084:R0,AVCOL_TRC_SMPTEST2084:V0,AVCOL_TRC_SMPTE428:I0,AVCOL_TRC_SMPTEST428_1:v0,AVCOL_TRC_ARIB_STD_B67:O0,AVCOL_SPC_RGB:P0,AVCOL_SPC_BT709:w0,AVCOL_SPC_UNSPECIFIED:L0,AVCOL_SPC_RESERVED:y0,AVCOL_SPC_FCC:b0,AVCOL_SPC_BT470BG:x0,AVCOL_SPC_SMPTE170M:D0,AVCOL_SPC_SMPTE240M:F0,AVCOL_SPC_YCGCO:M0,AVCOL_SPC_YCOCG:N0,AVCOL_SPC_BT2020_NCL:k0,AVCOL_SPC_BT2020_CL:U0,AVCOL_SPC_SMPTE2085:B0,AVCOL_SPC_CHROMA_DERIVED_NCL:G0,AVCOL_SPC_CHROMA_DERIVED_CL:W0,AVCOL_SPC_ICTCP:Y0,AVCOL_RANGE_UNSPECIFIED:X0,AVCOL_RANGE_MPEG:z0,AVCOL_RANGE_JPEG:H0,AVIO_FLAG_READ:$0,AVIO_FLAG_WRITE:q0,AVIO_FLAG_READ_WRITE:K0,AVIO_FLAG_NONBLOCK:Z0,AVIO_FLAG_DIRECT:J0,AVFMT_FLAG_NOBUFFER:Q0,AVFMT_FLAG_FLUSH_PACKETS:j0,AVSEEK_FLAG_BACKWARD:eS,AVSEEK_FLAG_BYTE:tS,AVSEEK_FLAG_ANY:nS,AVSEEK_FLAG_FRAME:rS,AVDISCARD_NONE:iS,AVDISCARD_DEFAULT:sS,AVDISCARD_NONREF:aS,AVDISCARD_BIDIR:oS,AVDISCARD_NONINTRA:_S,AVDISCARD_NONKEY:cS,AVDISCARD_ALL:uS,AV_LOG_QUIET:lS,AV_LOG_PANIC:fS,AV_LOG_FATAL:hS,AV_LOG_ERROR:dS,AV_LOG_WARNING:mS,AV_LOG_INFO:AS,AV_LOG_VERBOSE:pS,AV_LOG_DEBUG:gS,AV_LOG_TRACE:ES,AV_PKT_FLAG_KEY:CS,AV_PKT_FLAG_CORRUPT:TS,AV_PKT_FLAG_DISCARD:SS,AV_PKT_FLAG_TRUSTED:RS,AV_PKT_FLAG_DISPOSABLE:VS,SWS_FAST_BILINEAR:IS,SWS_BILINEAR:vS,SWS_BICUBIC:OS,SWS_X:PS,SWS_POINT:wS,SWS_AREA:LS,SWS_BICUBLIN:yS,SWS_GAUSS:bS,SWS_SINC:xS,SWS_LANCZOS:DS,SWS_SPLINE:FS,E2BIG:MS,EPERM:NS,EADDRINUSE:kS,EADDRNOTAVAIL:US,EAFNOSUPPORT:BS,EAGAIN:GS,EALREADY:WS,EBADF:YS,EBADMSG:XS,EBUSY:zS,ECANCELED:HS,ECHILD:$S,ECONNABORTED:qS,ECONNREFUSED:KS,ECONNRESET:ZS,EDEADLOCK:JS,EDESTADDRREQ:QS,EDOM:jS,EDQUOT:eR,EEXIST:tR,EFAULT:nR,EFBIG:rR,EHOSTUNREACH:iR,EIDRM:sR,EILSEQ:aR,EINPROGRESS:oR,EINTR:_R,EINVAL:cR,EIO:uR,EISCONN:lR,EISDIR:fR,ELOOP:hR,EMFILE:dR,EMLINK:mR,EMSGSIZE:AR,EMULTIHOP:pR,ENAMETOOLONG:gR,ENETDOWN:ER,ENETRESET:CR,ENETUNREACH:TR,ENFILE:SR,ENOBUFS:RR,ENODEV:VR,ENOENT:IR,AVERROR_EOF:vR,LibAV:bE}=re;class xE{constructor(i){this._libAVSession=i}_libAVSession;_packets=[];_eof=!1;_isFetching=null;_stream=null;get eof(){return this._eof}init=async()=>(this._stream=await this._libAVSession.getAudioStream(),this);reset=async()=>{await this.clear(),this._stream=await this._libAVSession.getAudioStream()};clear=async()=>{try{this._isFetching&&await this._isFetching}finally{this._eof=!1,this._packets.splice(0,this._packets.length)}};async seek(i){if(this._stream===null)throw H(X.AUDIO_LOGIC_ERR,"LibAVContext is null in LibAVAudioDemuxer.seek()");await this.clear(),await this._libAVSession.seekFrame(i,this._stream?.index)}next=async()=>{this._packets.length===0&&(this._isFetching===null?await this._read():await this._isFetching);const i=this._packets.shift();return this._packets.length<10&&this._isFetching===null&&this._read(),i?this._toEncodedAudioChunk(i):null};toAudioDecoderConfig=async()=>
23{if(this._stream===null)throw H(X.AUDIO_LOGIC_ERR,"Stream is null in LibAVAudioDemuxer.toAudioDecoderConfig()");return await Hu(this._libAVSession.libav,this._stream)};_read=async()=>{const i=new Ei;this._isFetching=i.promise();try{if(this._stream===null)throw H(X.AUDIO_LOGIC_ERR,"LibAVContext is null in LibAVAudioDemuxer._read()");const[r,c]=await this._libAVSession.readPackets(this._stream.index,64*1024);this._eof=r,c.length>0&&this._packets.push(...c)}finally{i.resolve(),this._isFetching=null}};_toEncodedAudioChunk=i=>{if(this._stream===null)throw H(X.AUDIO_LOGIC_ERR,"LibAVContext is null in LibAVAudioDemuxer._toEncodedAudioChunk()");return yE(i,this._stream,this._libAVSession.libav)}}const DE=8,iu=4,FE=1e6,su=5e3;class ME{_logger;_demuxer;_decoder;_queue;_config=null;_request=null;_lastRequestedTime=null;_isDecoding=null;_isSeeking=null;_wait=null;_lastDecodedTime=null;_lastError=null;_generation=0;_phase="idle";constructor(i,r){this._demuxer=new xE(i),this._queue=new Xu,this._decoder=new AudioDecoder({output:this._onOutput,error:this._onError}),this._logger=r}get name(){return"webcodecs"}get config(){if(this._config===null)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in WebCodecsAudioDecoder.config");return this._config}get lastDecodedTime(){return this._lastDecodedTime}init=async()=>(await this._demuxer.init(),await this._configure(),this);reset=async()=>{this._clearRequestStates(),this._decoder.reset(),await this._demuxer.reset(),await this._configure()};decode=async i=>{const r=this._decode(i);try{return await Us(r,su,()=>{this._logger.warn(i,`[webcodecs] phase=${this._phase} not finished after ${su}ms. decodeQueueSize: ${this._decoder.decodeQueueSize}, last decoded time: ${this._lastDecodedTime??"none"}`)})}finally{this._phase="idle"}};_decode=async i=>{if(this._request!==null)throw H(X.AUDIO_LOGIC_ERR,"Decoder is already processing in WebCodecsAudioDecoder.decode()");if(this._throwIfErrorAfterResolved(),this._needSeek(i)){this._clearRequestStates();const c=this._generation;return await this._seek(i),this._generation!==c?null:this._startDecodeLoop(i)}const r=this._queue.get(i);return r!==null?(this._lastRequestedTime=i,r):this._startDecodeLoop(i)};destroy=async()=>{const i=this._isSeeking,r=this._isDecoding;this._clearRequestStates();try{await i,await r,await this._demuxer.clear()}finally{this._close(),this._lastError=null}};_seek=async i=>{this._decoder.reset(),this._decoder.configure(this.config);const{codec:r,sampleRate:c}=this.config,o=zu(r,c),d=Math.max(i-o,0);this._phase="seek";const h=this._demuxer.seek(d);this._isSeeking=h;try{await h}finally{this._isSeeking===h&&(this._isSeeking=null)}};_needSeek=i=>{if(this._lastRequestedTime===null)return!0;const r=i<this._lastRequestedTime;return i>this._lastRequestedTime+FE||r};_startDecodeLoop=async i=>{const r=new Ei,c=r.promise();return this._request={timestamp:i,future:r},this._lastRequestedTime=i,this._decodeLoop(this._generation),c};_decodeLoop=async i=>{if(this._isDecoding)return;const r=new Ei;for(this._isDecoding=r.promise();this._generation===i&&this._request;){const c=this._request,o=this._queue.get(c.timestamp);if(o){c.future.resolve(o),this._request=null;break}let d=!1,h=!0;for(;this._request===c&&this._generation===i&&this._decoder.decodeQueueSize<DE;){this._phase="demux";const y=await this._demuxer.next();if(this._generation!==i)break;if(y===null){if(this._demuxer.eof){d=!0;break}if(this._decoder.decodeQueueSize>0)break;h=!1;break}this._decoder.decode(y)}if(this._generation!==i)break;if(this._request!==c)continue;if(d){if(this._phase="flush",await this._decoder.flush(),this._generation!==i)break;if(this._request!==c)continue;const y=this._queue.get(c.timestamp)??null;c.future.resolve(y),this._request=null;break}if(!h){await Ou(0);continue}const g=new Ei,R=g.promise();this._wait=g;const L=()=>{this._generation===i&&this._decoder.decodeQueueSize<iu&&g.resolve()};this._decoder.ondequeue=L,this._decoder.decodeQueueSize<iu&&g.resolve();try{this._phase="webcodecs-output",await R}finally{this._generation===i&&this._decoder.ondequeue===L&&(this._decoder.ondequeue=null),this._wait===g&&(this._wait=null)}}this._generation===i&&(this._decoder.ondequeue=null,this._isDecoding=null),r.resolve()};_onOutput=i=>{if(this._lastDecodedTime=i.timestamp+i.duration,this._isSeeking!==null||this._request&&this._request.timestamp>i.timestamp+i.duration)i.close();else if(this._queue.push(new Ci(i)),this._request){const r=this._queue.get(this._request.timestamp);r&&(this._request.future.resolve(r),this._request=null)}this._wait?.resolve(),this._wait=null};_onError=i=>
23{const r=H(X.AUDIO_DECODE_ERR,i,"Failed to decode audio in WebCodecsAudioDecoder");this._request?.future?(this._request.future.reject(r),this._request=null):this._lastError=r,this._clearRequestStates()};_configure=async()=>{try{const i=await this._demuxer.toAudioDecoderConfig();this._config=await NE(i),this._decoder.configure(this._config),this._queue.init(this._config.sampleRate)}catch(i){throw H(X.AUDIO_DECODER_CONFIG_ERR,i,"Failed to configure webcodecs decoder")}};_clearRequestStates=()=>{this._generation++,this._lastRequestedTime=null,this._isDecoding=null,this._decoder.ondequeue=null,this._wait?.resolve(),this._wait=null,this._request?.future.resolve(null),this._request=null,this._queue.clear()};_close=()=>{this._decoder.state==="configured"&&this._decoder.close()};_throwIfErrorAfterResolved=()=>{if(this._lastError){const i=`last error ${H(void 0,this._lastError).message}`;throw H(X.AUDIO_DECODE_ERR,i)}}}const NE=async a=>{if(a.codec==="pcm-s24")throw new Error("pcm-s24 is not supported properly by webcodecs");const i=Xg(a),r=[a.codec,...bu(i)];for await(const c of r){const o={codec:c,sampleRate:a.sampleRate,numberOfChannels:a.numberOfChannels,description:a.description},d=await AudioDecoder.isConfigSupported(o);if(d.supported&&d.config!==void 0)return d.config}throw new Error(`No supported decoder config: ${JSON.stringify({...a,description:void 0})}`)},kE=async(a,i)=>{for(const r of i)await a.av_packet_free_js(r)},jn=(a,i)=>a*4294967296+(i>>>0),Nr=(a,i,r)=>i===0||r===0?ue.fromSec(a):ue.fromSec(a*i/r),UE=a=>{const i=a<0?-1:1,r=Math.abs(a),c=r>>>0;return[(r/4294967296>>>0)*i,c]},BE=(a,i,r)=>a.mul(i/r).as.sec("round"),GE=async(a,i)=>{const r=performance.now(),c=$u(a);return Pu(async()=>{try{const d=await fetch(c,{signal:i});if(!d.ok)throw H(X.NETWORK_FAILED_ERR,"fetch response is not ok",`Details: 24 network: ${navigator.onLine} 25 response: ${d.status} ${d.statusText} 26 time: ${performance.now()-r}ms 27 url: ${a} 28 status: ${d.status} 29 statusText: ${d.statusText} 30 headers: ${JSON.stringify(Object.fromEntries(d.headers.entries()))} 31 disk: ${await Oo()} 32 `);return d}catch(d){throw d instanceof DOMException&&d.name==="AbortError"?d:H(X.NETWORK_FAILED_ERR,`fetch failed 33 Details: 34 time: ${performance.now()-r}ms 35 url: ${a} 36 err: ${kr(d)} 37 network: ${navigator.onLine} 38 disk: ${await Oo()} 39 `)}},1,()=>100+Math.random()*1e3)},Oo=async()=>{try{const a=await navigator.storage.estimate();return`storage estimation: ${a.usage} / ${a.quota}`}catch{return"storage estimation: failed to get storage estimation"}},au=async(a,i)=>Pu(async()=>{const c=await GE(a,i);try{return await c.blob()}catch(o){if(o instanceof Error&&o.name==="TypeError"){const d=await Oo();throw H(X.DISK_NO_SPACE,`blob() failed 40 Details: 41 url: ${a} 42 err: ${kr(o)} 43 disk: ${d} 44 `)}throw H(X.NETWORK_FAILED_ERR,o)}},1,()=>100+Math.random()*1e3),$u=a=>{if(!a)return a;const i=a.toLowerCase(),r=/^\/(assets|worklet|libav|locales|src|@fs)\//,c=r.test(a)||a.startsWith("/try/")&&r.test(`/${a.slice(5)}`);if(i.startsWith("http://")||i.startsWith("https://")||i.startsWith("blob:")||i.startsWith("data:")||i.startsWith("vrew-file:")||c)return a;throw H(X.LOGIC_ERR,`[assertLoadableUrl] Unconverted path reached core: ${a}`)};var ws={exports:{}},ou;function qu(){if(ou)return ws.exports;ou=1;var a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(a){var i=new Uint8Array(16);ws.exports=function(){return a(i),i}}else{var r=new Array(16);ws.exports=function(){for(var o=0,d;o<16;o++)(o&3)===0&&(d=Math.random()*4294967296),r[o]=d>>>((o&3)<<3)&255;return r}}return ws.exports}var go,_u;function Ku(){if(_u)return go;_u=1;for(var a=[],i=0;i<256;++i)a[i]=(i+256).toString(16).substr(1);function r(c,o){var d=o||0,h=a;return[h[c[d++]],h[c[d++]],h[c[d++]],h[c[d++]],"-",h[c[d++]],h[c[d++]],"-",h[c[d++]],h[c[d++]],"-",h[c[d++]],h[c[d++]],"-",h[c[d++]],h[c[d++]],h[c[d++]],h[c[d++]],h[c[d++]],h[c[d++]]].join("")}return go=r,go}var Eo,cu;function WE(){if(cu)return Eo;cu=1;var a=qu(),i=Ku(),r,c,o=0,d=0;function h(g,R,L){var y=R&&L||0,b=R||[];g=g||{};var I=g.node||r,N=g.clockseq!==void 0?g.clockseq:c;if(I==null||N==null){var W=a();I==null&&(I=r=[W[0]|1,W[1],W[2],W[3],W[4],W[5]]),N==null&&(N=c=(W[6]<<8|W[7])&16383)}var $=g.msecs!==void 0?g.msecs:new Date().getTime(),Y=g.nsecs!==void 0?g.nsecs:d+1,U=$-o+(Y-d)/1e4;if(U<0&&g.clockseq===void 0&&(N=N+1&16383),(U<0||$>o)&&g.nsecs===void 0&&(Y=0),Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=$,d=Y,c=N,$+=122192928e5;var F=(($&268435455)*1e4+Y)%4294967296;b[y++]=F>>>24&255,b[y++]=F>>>16&255,b[y++]=F>>>8&255,b[y++]=F&255;var B=$/4294967296*1e4&268435455;b[y++]=B>>>8&255,b[y++]=B&255,b[y++]=B>>>24&15|16,b[y++]=B>>>16&255,b[y++]=N>>>8|128,b[y++]=N&255;for(var z=0;z<6;++z)b[y+z]=I[z];return R||i(b)}return Eo=h,Eo}var Co,uu;function YE(){if(uu)return Co;uu=1;var a=qu(),i=Ku();function r(c,o,d){var h=o&&d||0;typeof c=="string"&&(o=c==="binary"?new Array(16):null,c=null),c=c||{};var g=c.random||(c.rng||a)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,o)for(var R=0;R<16;++R)o[h+R]=g[R];return o||i(g)}return Co=r,Co}var To,lu;function XE(){if(lu)return To;lu=1;var a=WE(),i=YE(),r=i;return r.v1=a,r.v4=i,To=r,To}var zE=XE(),HE=qg(zE);const fu="jsfetch:";class $E{constructor(i,r,c){this._mjsUrl=i,this._wasmUrl=r,this._logger=c}_mjsUrl;_wasmUrl;_logger;_libav=null;_libAVState=null;_lastError=null;get libav(){if(!this._libav)throw H(X.LOGIC_ERR,"LibAV is null");return this._libav}get lastError(){return this._lastError?H(void 0,this._lastError).message:""}
44async init(){return this._libav=await bE({toImport:this._mjsUrl,wasmurl:this._wasmUrl,noworker:!0}),this}get containerStart(){if(!this._libAVState)throw H(X.LOGIC_ERR,"LibAVState is null");return this._libAVState.containerStart}getContainerVideoColorSpace(i){return this._libAVState?.containerVideoColorSpaces.get(i)}async clear(){if(!this._libAVState)return;const i=this._libav;if(!i){this._libAVState=null;return}try{this._libAVState.pkt&&await i.av_packet_free_js(this._libAVState.pkt),this._libAVState.fmt_ctx&&await i.avformat_close_input_js(this._libAVState.fmt_ctx),this._libAVState.filename&&!this._libAVState.filename.startsWith(fu)&&await i.unlinkreadaheadfile(this._libAVState.filename),this._lastError=null}catch(r){this._logger.warn(null,"Error while clearing libAV resources:",H(void 0,r).message),this._lastError=r}finally{this._libAVState=null}}async destroy(){await this.clear(),this._libav?.terminate(),this._libav=null,this._lastError=null}async openFileWithUri(i){if(!this._libav)throw H(X.LOGIC_ERR,"LibAV is null while opening file with uri");const r=$u(i),c=fu+r;try{await this.openFile(c)}catch(o){throw H(navigator.onLine?X.FILE_READ_ERROR:X.NETWORK_FAILED_ERR,o,`openFileWithUri failed (navigator.onLine: ${navigator.onLine})`)}}async openFileWithBlob(i){if(!this._libav)throw H(X.LOGIC_ERR,"LibAV is null while opening file with blob");const r=HE.v4();await this._libav.mkreadaheadfile(r,i),await this.openFile(r)}async openFile(i){return this._handleErrorAsync("openFile",async()=>{if(!this._libav)throw H(X.LOGIC_ERR,"LibAV is null while opening file");const r=this._libav;let c=0;try{if(c=await r.avformat_open_input_js(i,0,0),c===0)throw new Error("Could not open source file");const o=await this.snapshotPreAnalysisContainerVideoColorSpaces(r,c);await r.avformat_find_stream_info(c,0);const d=await this.parseStreams(r,c),h=Nr(jn(await r.AVFormatContext_start_timehi(c),await r.AVFormatContext_start_time(c)),1,1e6);this._libAVState={filename:i,fmt_ctx:c,streams:d,pkt:await r.av_packet_alloc(),containerStart:h,containerVideoColorSpaces:o}}catch(o){if(c!==0)try{await r.avformat_close_input_js(c)}catch(d){this._logger.warn(null,"Error while closing failed libAV input:",H(void 0,d).message)}throw o}})}async snapshotPreAnalysisContainerVideoColorSpaces(i,r){const c=new Map,o=await i.AVFormatContext_nb_streams(r);for(let d=0;d<o;d++){const h=await i.AVFormatContext_streams_a(r,d),g=await i.AVStream_codecpar(h);if(await i.AVCodecParameters_codec_type(g)===i.AVMEDIA_TYPE_VIDEO){const[R,L,y,b]=await Promise.all([i.AVCodecParameters_color_range(g),i.AVCodecParameters_color_primaries(g),i.AVCodecParameters_color_trc(g),i.AVCodecParameters_color_space(g)]);c.set(d,{range:R,primaries:L,trc:y,matrix:b})}}return c}async parseStreams(i,r){const c=[],o=await i.AVFormatContext_nb_streams(r);for(let d=0;d<o;d++){const h=await i.AVFormatContext_streams_a(r,d),g=await i.AVStream_codecpar(h),[R,L,y,b,I,N,W,$,Y]=await Promise.all([i.AVCodecParameters_codec_type(g),i.AVCodecParameters_codec_id(g),i.AVStream_start_time(h),i.AVStream_start_timehi(h),i.AVStream_time_base_num(h),i.AVStream_time_base_den(h),i.AVStream_duration(h),i.AVStream_durationhi(h),i.avformat_get_rotation(h)]),U=jn($,W);c.push({ptr:h,index:d,codecpar:g,codec_type:R,codec_id:L,start_time:y,start_timehi:b,time_base_num:I,time_base_den:N,duration_time_base:U,duration:U*I/N,rotation:Y})}return c}getVideoStream(){return this._handleError("getVideoStream",()=>{if(!this._libav||!this._libAVState?.streams)throw H(X.LOGIC_ERR,"libav or stream is null while getting video stream");const i=this._libav,r=this._libAVState.streams.find(c=>c.codec_type===i.AVMEDIA_TYPE_VIDEO);if(!r)throw H(X.VIDEO_FORMAT_ERR,`no video stream found, streams length: ${this._libAVState.streams.length}`);return{...r,rotation:r.rotation===-2147483648?0:r.rotation}})}async getAudioStream(){return this._handleErrorAsync("getAudioStream",async()=>{if(!this._libav||!this._libAVState?.streams)throw H(X.LOGIC_ERR,"libav or stream is null while getting audio stream");const i=this._libav,r=this._libAVState.fmt_ctx,c=this._libAVState.streams.find(o=>o.codec_type===i.AVMEDIA_TYPE_AUDIO);if(!c)throw H(X.AUDIO_FORMAT_ERR,`no audio stream found, streams length: ${this._libAVState.streams.length}`);return c.duration<0&&(c.duration=await this._libav.ff_get_media_duration(r)),c})}async estimateDuration(){return this._handleErrorAsync("estimateDuration",async()=>
44{if(!this._libav||!this._libAVState)throw H(X.LOGIC_ERR,"LibAV or LibAVState is null");const i=this.getVideoStream(),r=await this._libav.av_seek_frame(this._libAVState.fmt_ctx,i.index,4294967295,2147483647,this._libav.AVSEEK_FLAG_BACKWARD);if(r<0)throw H(X.VIDEO_FORMAT_ERR,`error seeking in estimateDuration(): [${r}] 45 ff_error: ${await this._libav.ff_error(r)} 46 strerror: ${await this._libav.strerror(r)}`);const[,c]=await this.readPackets(i.index,2147483647);return await this._libav.av_seek_frame(this._libAVState.fmt_ctx,i.index,0,0,this._libav.AVSEEK_FLAG_BACKWARD),ue.max(...c.map(o=>Nr(jn(o.ptshi,o.pts),i.time_base_num,i.time_base_den).add(Nr(jn(o.durationhi,o.duration),i.time_base_num,i.time_base_den))))})}async seekFrame(i,r){return this._handleErrorAsync("seekFrame",async()=>{if(!this._libav||!this._libAVState)throw H(X.LOGIC_ERR,"LibAV or LibAVState is null");const[c,o]=UE(BE(ue.fromUS(i),this._libAVState.streams[r].time_base_den,this._libAVState.streams[r].time_base_num)),d=this._libAVState.streams[r].codec_type===this._libav.AVMEDIA_TYPE_VIDEO,h=this._libav.AVSEEK_FLAG_BACKWARD|(d?0:this._libav.AVSEEK_FLAG_ANY),g=await this._libav.av_seek_frame(this._libAVState.fmt_ctx,r,o,c,h);if(g<0)throw H(d?X.VIDEO_FORMAT_ERR:X.AUDIO_FORMAT_ERR,`error in av_seek_frame: [${g}] 47 ff_error: ${await this._libav.ff_error(g)} 48 strerror: ${await this._libav.strerror(g)}`)})}async readPackets(i,r){return this._handleErrorAsync("readPackets",async()=>{if(!this._libav||!this._libAVState)throw H(X.LOGIC_ERR,"LibAV or LibAVState is null");const[c,o]=await this._libav.ff_read_frame_multi(this._libAVState.fmt_ctx,this._libAVState.pkt,{index:i,limit:r});if(c<0&&c!==-this._libav.EAGAIN&&c!==this._libav.AVERROR_EOF){const g=this._libAVState.streams[i].codec_type===this._libav.AVMEDIA_TYPE_VIDEO;throw H(g?X.VIDEO_FORMAT_ERR:X.AUDIO_FORMAT_ERR,`error in ff_read_frame_multi: [${c}] 49 ff_error: ${await this._libav.ff_error(c)} 50 strerror: ${await this._libav.strerror(c)}`)}const d=o[i]??[];return[c===this._libav.AVERROR_EOF,d]})}async readPacketsPtr(i,r){return this._handleErrorAsync("readPacketsPtr",async()=>{if(!this._libav||!this._libAVState)throw H(X.LOGIC_ERR,"LibAV or LibAVState is null");const[c,o]=await this._libav.ff_read_frame_multi(this._libAVState.fmt_ctx,this._libAVState.pkt,{index:i,limit:r,copyoutPacket:"ptr"}),d=o[i]??[],h=c===this._libav.AVERROR_EOF;if(c<0&&c!==-this._libav.EAGAIN&&c!==this._libav.AVERROR_EOF){const g=this._libAVState.streams[i].codec_type===this._libav.AVMEDIA_TYPE_VIDEO;throw H(g?X.VIDEO_FORMAT_ERR:X.AUDIO_FORMAT_ERR,`error in ff_read_frame_multi: [${c}] 51 ff_error: ${await this._libav.ff_error(c)} 52 strerror: ${await this._libav.strerror(c)}`)}return[h,d]})}_handleError(i,r){try{return r()}catch(c){throw this._lastError=c,this._logger.error(null,`error while ${i}`,H(void 0,c).message),c}}async _handleErrorAsync(i,r){try{return await r()}catch(c){throw this._lastError=c,this._logger.error(null,`error while ${i}`,H(void 0,c).message),c}}}const qE="3c00a4f8";let Ls=null,ys=null,Pn=null;const hu=qE,KE=async()=>{if(Ls&&ys)return{mjsUrl:Ls,wasmUrl:ys};if(Pn)return Pn.promise();Pn=new Ei,Pn.promise();try{const a="/try/",i=new URL(`${a}libav/libav-vrew-${hu}.mjs`,import.meta.url).href,r=new URL(`${a}libav/libav-vrew-${hu}.wasm`,import.meta.url).href,[c,o]=await Promise.all([au(i),au(r)]);Ls=URL.createObjectURL(c),ys=URL.createObjectURL(o);const d={mjsUrl:Ls,wasmUrl:ys};return Pn.resolve(d),d}catch(a){throw Pn&&Pn.reject(a),a}finally{Pn=null}},ZE=8;class JE{_logger;_libavSession;_queue;_packets=[];_context=null;_config=null;_lastDecodedTime=null;_lastRequestedTime=null;_eof=!1;constructor(i,r){this._libavSession=i,this._queue=new Xu,this._logger=r}get name(){return"libav"}get config(){if(this._config===null)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in LibAVAudioDecoder.config");return this._config}get context(){if(!this._context)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in LibAVAudioDecoder.context");return this._context}get lastDecodedTime(){return this._lastDecodedTime}
52async init(){return await this._configure(),this}reset=async()=>{await this._clear(),await this._configure()};async decode(i){if(this._needSeek(i))return await this._seek(i),this._startDecodeLoop(i);const r=this._queue.get(i);return r!==null?(this._lastRequestedTime=i,r):await this._startDecodeLoop(i)}destroy=async()=>{await this._clear()};_seek=async i=>{const r=this.context.stream.index,{codec:c,sampleRate:o}=this.config,d=zu(c,o),h=Math.max(i-d,0);await Us(this._libavSession.seekFrame(h,r),3e3,()=>{this._logger.verbose(i,`seeking to ${h} not finished after 3 seconds`)}),await this._flushDecoder()};_needSeek=i=>{if(this._lastRequestedTime===null||this._lastDecodedTime===null)return!0;const r=i<this._lastRequestedTime;return i>this._lastDecodedTime||r};async _startDecodeLoop(i){this._lastRequestedTime=i;const r=this._libavSession.libav,{index:c}=this.context.stream;if(this._packets.length===0){const[h,g]=await this._libavSession.readPacketsPtr(c,65536);if(this._packets.push(...g),h&&(this._eof=!0),h&&g.length===0)return null}const o=this._packets.splice(0,ZE),d=await r.ff_decode_multi(this.context.codec_ctx,this.context.pkt,this.context.frame,o,{ignoreErrors:!0,copyoutFrame:"ptr",fin:this._eof&&this._packets.length===0});for(const h of d){const g=await this._toAudioFrame(h,i);g&&(this._lastDecodedTime=g.timestamp+g.duration,this._queue.push(g))}return this._queue.get(i)}async _resetState(){this._lastDecodedTime=null,this._lastRequestedTime=null,this._eof=!1;const i=this._packets.splice(0,this._packets.length);this._queue.clear(),i.length!==0&&await kE(this._libavSession.libav,i)}async _flushDecoder(){if(!this._context)return;await this._libavSession.libav.avcodec_flush_buffers(this._context.codec_ctx),await this._resetState()}_clear=async()=>{if(this._context)try{await this._libavSession.libav.ff_free_decoder(this._context.codec_ctx,this._context.pkt,this._context.frame)}finally{this._context=null,this._config=null,await this._resetState()}};async _getTimestampAndDuration(i){if(!this._context)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in LibAVAudioDecoder._getTimestampAndDuration()");const r=this._libavSession.libav,c=this._context.stream.time_base_num,o=this._context.stream.time_base_den,d=await r.AVFrame_pts(i),h=await r.AVFrame_ptshi(i),g=await r.AVFrame_duration(i),R=await r.AVFrame_durationhi(i),L=Nr(jn(h,d),c,o).as.us("floor"),y=Nr(jn(R,g),c,o).as.us("floor");return[L,y]}async _toAudioFrame(i,r){const c=this._libavSession.libav,[o,d]=await this._getTimestampAndDuration(i);if(o+d<r&&!this._eof)return await c.av_frame_free_js(i),null;const h=await c.ff_copyout_frame(i);await c.av_frame_free_js(i);const g=QE(h),R=Nr(jn(h.ptshi,h.pts),this.context.stream.time_base_num,this.context.stream.time_base_den).as.us("round");return new Ci({data:g,sampleRate:h.sample_rate,timestamp:R})}_configure=async()=>{try{const i=this._libavSession.libav,r=await this._libavSession.getAudioStream(),[,c,o,d]=await i.ff_init_decoder(r.codec_id,{codecpar:r.codecpar,time_base:[r.time_base_num,r.time_base_den]});this._context={stream:r,codec_ctx:c,pkt:o,frame:d},this._config=await Hu(i,r),this._queue.init(this._config.sampleRate)}catch(i){throw H(X.AUDIO_DECODER_CONFIG_ERR,i,"Failed to configure libav decoder")}}}const QE=a=>{const i=a.channels,r=a.nb_samples;switch(a.format){case re.AV_SAMPLE_FMT_FLT:return bs(a.data,i,r);case re.AV_SAMPLE_FMT_S32:return bs(a.data,i,r);case re.AV_SAMPLE_FMT_S16:return bs(a.data,i,r);case re.AV_SAMPLE_FMT_U8:return bs(a.data,i,r);case re.AV_SAMPLE_FMT_FLTP:return a.data;case re.AV_SAMPLE_FMT_S32P:return a.data;case re.AV_SAMPLE_FMT_S16P:return a.data;case re.AV_SAMPLE_FMT_U8P:return a.data;default:throw H(X.AUDIO_DECODE_ERR,`Invalid decoded frame format on getFrameData() ${a.format}`)}},bs=(a,i,r)=>{const c=[];for(let o=0;o<i;o++){let d;a instanceof Int32Array?d=new Int32Array(r):a instanceof Int16Array?d=new Int16Array(r):a instanceof Uint8Array?d=new Uint8Array(r):d=new Float32Array(r);for(let h=0,g=o;h<r;h++,g+=i)d[h]=a[g];c.push(d)}return c},jE=5e3;let eC=class{_session=null;_logger=null;_factories=[];_current=null;_state="idle";get decoderName(){return this._current?.name??"none"}get config(){if(!this._current)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in AudioDecoder.config");return this._current.config}get state(){return this._state}init=async(i,r)=>{if(this._logger=r,this._session)this._session.lastError?this._logger.warn(null,`trying to reuse error-occurred libAVSession : ${this._session.lastError}`):this._logger.verbose(null,"clear existing libav session"),await this._session.clear(),this._state="session_cleared",this._logger.verbose(null,"libav session cleared");else{const{mjsUrl:o,wasmUrl:d}=await KE();this._state="libav_initialized",this._logger.verbose(null,"create new libav session"),this._session=new $E(o,d,this._logger),await this._session.init(),this._state="session_initialized",this._logger.verbose(null,"libav session initialized")}i.kind==="uri"?(await this._session.openFileWithUri(i.uri),this._logger.verbose(null,"opened file with uri")):(await this._session.openFileWithBlob(i.blob),this._logger.verbose(null,"opened file with blob")),this._state="file_opened",this._factories.push(()=>new ME(this._session,r)),this._factories.push(()=>new JE(this._session,r));let c=null;for(;this._factories.length>0;)try{const d=this._factories.shift()();return this._current=d,await this._current.init(),this._state="decoder_initialized",this}catch(o){c=o,await this._current?.destroy(),this._current=null;const d=H(void 0,o);
52if(d.type===X.AUDIO_DECODER_CONFIG_ERR)continue;throw d}throw H(X.AUDIO_DECODER_CONFIG_ERR,c,"Failed to initialize AudioDecoder")};decode=async(i,r)=>{if(!this._current)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in AudioDecoder.decode()");return Us(this._decodeLoop(i,r),5e3,()=>this._logger?.warn(null,`[${this.decoderName}] _decodeLoop() is not finished after 5 seconds. last decoded time: ${this._current?.lastDecodedTime??"none"}`))};clear=async()=>{try{await this._current?.destroy(),await this._session?.clear()}finally{this._logger=null,this._current=null,this._factories.splice(0,this._factories.length),this._state="session_cleared"}};destroy=async()=>{try{await this._current?.destroy(),await this._session?.destroy()}finally{this._logger=null,this._current=null,this._factories.splice(0,this._factories.length),this._session=null,this._state="destroyed"}};_decodeLoop=async(i,r)=>{if(!this._current)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in AudioDecoder._decodeLoop");const{sampleRate:c,numberOfChannels:o}=this.config,d=er(r,c),h=Io(o,d);let g=i,R=0;for(;R<d;){const L=await this._decode(g);if(L===null)break;const y=er(g,c),b=er(L.timestamp,c),I=Math.min(Math.max(0,b-y),d-R);if(R+=I,R>=d){L.close();break}const N=Math.max(0,y-b),W=Math.min(L.numberOfFrames-N,d-R);for(let $=0;$<o;$++)L.copyTo(h[$].subarray(R,R+W),{planeIndex:$,frameOffset:N,frameCount:W});g=L.timestamp+L.duration,R+=W,L.close()}return h};_decode=async i=>{if(!this._current)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in AudioDecoder._decode");const r=this._current;try{return await r.decode(i)}catch(c){this._logger?.warn(null,`[${r.name}] Failed to decode at ${i}us. try next... last decoded time: ${r.lastDecodedTime??"none"}, ${kr(c)}`);const o=await this._destroyCurrent(),d=this._factories.shift();if(!o||!d)throw c;const h=d();return this._current=await h.init(),this._decode(i)}};_destroyCurrent=async()=>{const i=this._current;if(this._current=null,!i)return!0;try{return await lg(i.destroy(),jE),!0}catch(r){return this._logger?.warn(null,`error while destroying ${i.name} decoder: ${kr(r)}`),!1}}};class tC{_decoder;_config=null;_source=null;_sourceId=null;_logger=null;get config(){if(!this._config)throw H(X.AUDIO_LOGIC_ERR,"Decoder not initialized in WebCodecsAudioRenderer.config");return this._config}constructor(){this._decoder=new eC}get decoderState(){return this._decoder.state}init=async(i,r,c)=>(this._source=i,this._sourceId=r,this._logger=c,await Us(this._decoder.init(this._source,c),3e3,()=>{this._logger?.warn(null,`decoder is not initialized after 3 seconds. state: ${this._decoder.state}`)}),this._config=this._decoder.config,this);render=async(i,r)=>{try{return await this._decoder.decode(i.as.us(),r.as.us())}catch(c){throw H(X.AUDIO_DECODE_ERR,c,`error occurred while rendering audio frame. sourceId: ${this._sourceId}, at: ${i.as.us()} us`)}};clear=async()=>{await this._decoder.clear(),this._config=null,this._source=null,this._sourceId=null,this._logger=null};destroy=async()=>{await this._decoder.destroy(),this._source=null,this._sourceId=null,this._logger=null,this._config=null}}const nC=1;let nn=null;const Ri=a=>{if(!a)throw H(X.AUDIO_LOGIC_ERR,"AudioRendererWorker is not initialized");return a},rC=async(a,i,r,c=!1,o=!1)=>{if(!nn){const d=fE(r,c,o),h=Zu(i);nn=new uC(a,h,d)}await nn.init()},iC=async a=>{await Ri(nn).update(a)},sC=async(a,i)=>(await Ri(nn).render(a,i)).map(c=>Wu(c,c.data.map(o=>o.buffer))),aC=async()=>(await Ri(nn).flush()).map(i=>Wu(i,i.data.map(r=>r.buffer))),oC=async()=>{await Ri(nn).clear()},_C=async()=>{try{await Ri(nn).destroy()}finally{nn=null,globalThis.close()}},cC={init:rC,update:iC,render:sC,flush:aC,clear:oC,destroy:_C};let uC=class{_logger;_renderer;_pipeline;_params;constructor(i,r,c){this._logger=c,this._params=r,this._renderer=new lC(r,c),this._pipeline=new TE(i)}
52async init(){await this._renderer.init(),this._pipeline.clear(),this._logger.verbose(null,"initialized")}async update(i){const r=Zu(i);await this._renderer.update(r),this._params.sourceId!==r.sourceId&&this._pipeline.clear(),this._params=r}async render(i,r){const c=this._params,o=ue.fromUS(i),d=ue.fromUS(r),h=await this._renderer.render(o,d),g=c.gain,R=c.playbackRate,L=[];for(const y of h)switch(y.type){case"flush":{L.push(...this._pipeline.flush());break}case"segment":{L.push(...this._pipeline.process(y.segment,R,g));break}}return L}async flush(){const i=this._pipeline.flush();return this._renderer.clearContinuityState(),i}async clear(){this._pipeline.clear(),await this._renderer.clear()}async destroy(){try{await this._renderer.destroy()}finally{this._logger.verbose(null,"destroyed")}}};class lC{_logger;_renderer;_params;_expectedSourceTime=null;_baseTimelineIdx=null;_renderedSamples=0;constructor(i,r){this._logger=r,this._renderer=new tC,this._params=i}get sampleRate(){return this._renderer.config.sampleRate}async init(){const{source:i,sourceId:r}=this._params;return await this._renderer.init(i,r,this._logger),this}get config(){return this._renderer.config}async destroy(){await this._renderer.destroy()}async update(i){this._params?.sourceId!==i.sourceId&&(await this._renderer.clear(),await this._renderer.init(i.source,i.sourceId,this._logger),this.clearContinuityState()),this._params=i}async render(i,r){const c=this.sampleRate,o=this._params.playbackRate,d=this._getRenderTimelineRange(i,r),{seek:h,duration:g}=this._getSeekAndDuration(d),R=this._params.loop?this._params.loop.out:this._params.timelineDuration.mul(this._params.playbackRate).add(this._params.sourceIn),L=Du(nC,c);let y=h,b=ue.zero();const I=[];let N=this._expectedSourceTime,W=N===null||Math.abs(y.sub(N).as.us())>L;for(!W&&N!==null&&(y=N);Zn(b,c)<Zn(g,c);){if(Zn(y,c)>=Zn(R,c)){if(this._params.loop){y=this._params.loop.in,W=!0;continue}break}const $=ue.min(R.sub(y),g.sub(b));if(Zn($,c)<=0)break;const Y=await this._renderer.render(y,$);if(Y[0].length>0){W&&(I.push({type:"flush"}),this._baseTimelineIdx=Zn(d.start,c)+Math.round(Zn(b,c)/o),this._renderedSamples=0,W=!1);const F={timelineIndex:this._getNextTimelineIndex(),data:Y,sampleRate:c};I.push({type:"segment",segment:F}),this._renderedSamples+=Y[0].length}y=y.add($),b=b.add($),N=y}return this._expectedSourceTime=N,I}clearContinuityState(){this._expectedSourceTime=null,this._baseTimelineIdx=null,this._renderedSamples=0}async clear(){await this._renderer.clear(),this.clearContinuityState()}_getRenderTimelineRange(i,r){const c=ue.max(i,this._params.timelineStart),o=ue.min(r,this._params.timelineStart.add(this._params.timelineDuration));return{start:c,end:o}}_getSeekAndDuration(i){const r=this._params,{start:c,end:o}=i,d=c.sub(r.timelineStart).mul(r.playbackRate),h=r.sourceIn.add(d);let g;if(!r.loop||h.lt(r.loop.out))g=h;else{const L=r.loop.out.sub(r.loop.in);g=r.loop.in.add(h.sub(r.loop.in).mod(L))}const R=o.sub(c).mul(r.playbackRate);return{seek:g,duration:R}}_getNextTimelineIndex(){return(this._baseTimelineIdx??0)+Math.round(this._renderedSamples/this._params.playbackRate)}}const Zu=a=>({...a,timelineStart:ue.fromUS(a.timelineStart),timelineDuration:ue.fromUS(a.timelineDuration),sourceIn:ue.fromUS(a.sourceIn),loop:a.loop?{in:ue.fromUS(a.loop.in),out:ue.fromUS(a.loop.out)}:void 0});wo(cC); 53//# sourceMappingURL=renderer.audio.worker-BnoF42Qc.js.map
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.