@micromag/viewer-build 0.3.700 → 0.3.702

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 257.579076c2.js.LICENSE.txt */
2
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[257],{74:function(e,t,n){var r=n(313),i=n(310),s=n(3945),a=n(4535),o=s((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=o},124:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7891)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},133:function(e,t,n){"use strict";n.d(t,{SQ:function(){return c},ZD:function(){return p},oo:function(){return f}});var r=n(703);const i="pushState",s="replaceState",a=["popstate",i,s,"hashchange"],o=e=>{for(const t of a)addEventListener(t,e);return()=>{for(const t of a)removeEventListener(t,e)}},l=(e,t)=>(0,r.rz)(o,e,t),u=()=>location.search,c=({ssrSearch:e=""}={})=>l(u,(()=>e)),h=()=>location.pathname,d=({ssrPath:e}={})=>l(h,e?()=>e:h),f=(e,{replace:t=!1,state:n=null}={})=>history[t?s:i](n,"",e),p=(e={})=>[d(e),f],g=Symbol.for("wouter_v3");if("undefined"!=typeof history&&void 0===window[g]){for(const e of[i,s]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,g,{value:!0})}},195:function(e,t,n){var r=n(3766)(Object.keys,Object);e.exports=r},280:function(e,t,n){"use strict";n.d(t,{F3:function(){return d},GT:function(){return h},J9:function(){return o},JF:function(){return l},MT:function(){return u}});var r=n(5608),i=n(6502),s=n(4912),a=n(6679);function o(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,r){return r in e?t[r]=e[r]:r in n&&(t[r]=n[r]),t}),{})}var l={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){},onWarn:function(e){}};function u(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function c(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function h(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,a=Intl.DisplayNames,o=(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:c(e.dateTime),strategy:s.W.variadic}),l=(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:c(e.number),strategy:s.W.variadic}),u=(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:c(e.pluralRules),strategy:s.W.variadic});return{getDateTimeFormat:o,getNumberFormat:l,getMessageFormat:(0,s.B)((function(e,t,n,s){return new i.S(e,t,n,(0,r.Cl)({formatters:{getNumberFormat:l,getDateTimeFormat:o,getPluralRules:u}},s||{}))}),{cache:c(e.message),strategy:s.W.variadic}),getRelativeTimeFormat:(0,s.B)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:c(e.relativeTime),strategy:s.W.variadic}),getPluralRules:u,getListFormat:(0,s.B)((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,(0,r.fX)([void 0],e,!1)))}),{cache:c(e.list),strategy:s.W.variadic}),getDisplayNames:(0,s.B)((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(a.bind.apply(a,(0,r.fX)([void 0],e,!1)))}),{cache:c(e.displayNames),strategy:s.W.variadic})}}function d(e,t,n,r){var i,s=e&&e[t];if(s&&(i=s[n]),i)return i;r(new a.OC("No ".concat(t," format named: ").concat(n)))}},310:function(e,t,n){var r=n(5111),i=n(7923),s=n(3334),a=n(1393),o=n(642),l=n(9460),u=n(6775),c=n(2053),h=n(3142);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return h(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[c];var d=-1;t=r(t,l(s));var f=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++d,value:e}}));return o(f,(function(e,t){return u(e,t,n)}))}},313:function(e){e.exports=function(e){return e&&e.length?e[0]:void 0}},414:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(1369);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.A)(i.key),i)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},547:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},642:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},703:function(e,t,n){"use strict";var r;n.d(t,{FK:function(){return i.Fragment},NT:function(){return i.useContext},Ob:function(){return i.cloneElement},Rf:function(){return i.forwardRef},_q:function(){return u},li:function(){return i.useRef},n:function(){return i.createElement},q6:function(){return i.createContext},rz:function(){return s.useSyncExternalStore},zO:function(){return i.isValidElement}});var i=n(4041),s=n(8139);const a=(r||(r=n.t(i,2))).useInsertionEffect,o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect,l=a||o,u=e=>{const t=i.useRef([e,(...e)=>t[0](...e)]).current;return l((()=>{t[0]=e})),t[1]}},719:function(e,t,n){for(var r=n(8758),i="undefined"==typeof window?n.g:window,s=["moz","webkit"],a="AnimationFrame",o=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],u=0;!o&&u<s.length;u++)o=i[s[u]+"Request"+a],l=i[s[u]+"Cancel"+a]||i[s[u]+"CancelRequest"+a];if(!o||!l){var c=0,h=0,d=[],f=1e3/60;o=function(e){if(0===d.length){var t=r(),n=Math.max(0,f-(t-c));c=n+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return d.push({handle:++h,callback:e,cancelled:!1}),h},l=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}e.exports=function(e){return o.call(i,e)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=o,e.cancelAnimationFrame=l}},734:function(e,t,n){"use strict";n.d(t,{DZ:function(){return d},TB:function(){return h},hm:function(){return c}});var r=n(6654),i=n.n(r);class s extends Error{constructor(e,t,n){super(e),this.name="ResponseError",this.responseData=t,this.status=n}getResponseData(){return this.responseData}}class a extends s{constructor(e,t,n){super(e,t,n),this.name="ValidationError"}getErrors(){return this.responseData}}var o=e=>e.json().then((t=>({data:t,response:e})));const l=e=>{const{response:t,data:n}=e;if(t.status>=200&&t.status<300)return n;throw new s(t.statusText,n,t.status)},u=e=>{if("ResponseError"===e.name&&422===e.status)throw new a(e.message,e.responseData,e.status);throw e};var c=(e,t)=>{const{headers:n,...r}=t||{};return fetch(e,{method:"GET",headers:{Accept:"application/json",...n||null},...r||null}).then(o).then(l)},h=(e,t,n)=>{const{headers:r,...i}=n||{};return fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...r||null},body:JSON.stringify(t),...i||null}).then(o).then(l).catch(u)};const d=e=>{const t=i().get()["XSRF-TOKEN"]||null;if(null!==t)return{"X-XSRF-TOKEN":t};const n=(e=>{const t=e||"csrf-token";return"undefined"==typeof document?null:[].slice.call(document.getElementsByTagName("meta")).reduce(((e,n)=>n.getAttribute("name")===t?n.getAttribute("content"):e),null)})(e);return null!==n?{"X-CSRF-TOKEN":n}:null}},796:function(e){e.exports=function(e){return e}},887:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"video",icon:[576,512,["video-camera"],"f03d","M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"]},t.n2=t.mw},930:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="location-dot",r=["map-marker-alt"],i="f3c5",s="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z";t.definition={prefix:"fas",iconName:n,icon:[384,512,r,i,s]},t.faLocationDot=t.definition,t.prefix="fas",t.iconName=n,t.width=384,t.height=512,t.ligatures=r,t.unicode=i,t.svgPathData=s,t.aliases=r},986:function(e,t,n){var r=n(7379),i=n(547);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},1085:function(e,t,n){"use strict";e.exports=n(3335)},1087:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:function(){return r}})},1187:function(e){e.exports=function(){return!1}},1369:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(7545);function i(e){var t=function(e){if("object"!=(0,r.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},1383:function(e,t,n){"use strict";var r=n(7950);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.Bg=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},1393:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},1478:function(e,t,n){"use strict";n.d(t,{RK:function(){return a},TT:function(){return r},hN:function(){return o}});var r,i=n(6349),s=n(4179);function a(e){return"function"==typeof e}function o(e,t,n,l,u,c,h){if(1===e.length&&(0,i.eW)(e[0]))return[{type:r.literal,value:e[0].value}];for(var d=[],f=0,p=e;f<p.length;f++){var g=p[f];if((0,i.eW)(g))d.push({type:r.literal,value:g.value});else if((0,i.jA)(g))"number"==typeof c&&d.push({type:r.literal,value:n.getNumberFormat(t).format(c)});else{var m=g.value;if(!u||!(m in u))throw new s.Ei(m,h);var v=u[m];if((0,i.Im)(g))v&&"string"!=typeof v&&"number"!=typeof v||(v="string"==typeof v||"number"==typeof v?String(v):""),d.push({type:"string"==typeof v?r.literal:r.object,value:v});else if((0,i.tv)(g)){var y="string"==typeof g.style?l.date[g.style]:(0,i.Tu)(g.style)?g.style.parsedOptions:void 0;d.push({type:r.literal,value:n.getDateTimeFormat(t,y).format(v)})}else if((0,i.Qh)(g))y="string"==typeof g.style?l.time[g.style]:(0,i.Tu)(g.style)?g.style.parsedOptions:l.time.medium,d.push({type:r.literal,value:n.getDateTimeFormat(t,y).format(v)});else if((0,i.oF)(g))(y="string"==typeof g.style?l.number[g.style]:(0,i.N1)(g.style)?g.style.parsedOptions:void 0)&&y.scale&&(v*=y.scale||1),d.push({type:r.literal,value:n.getNumberFormat(t,y).format(v)});else{if((0,i.xm)(g)){var b=g.children,E=g.value,T=u[E];if(!a(T))throw new s.Zo(E,"function",h);var S=T(o(b,t,n,l,u,c).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),d.push.apply(d,S.map((function(e){return{type:"string"==typeof e?r.literal:r.object,value:e}})))}if((0,i.Jp)(g)){if(!(w=g.options[v]||g.options.other))throw new s.$x(g.value,v,Object.keys(g.options),h);d.push.apply(d,o(w.value,t,n,l,u))}else if((0,i.N6)(g)){var w;if(!(w=g.options["=".concat(v)])){if(!Intl.PluralRules)throw new s.IF('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',s.O4.MISSING_INTL_API,h);var _=n.getPluralRules(t,{type:g.pluralType}).select(v-(g.offset||0));w=g.options[_]||g.options.other}if(!w)throw new s.$x(g.value,v,Object.keys(g.options),h);d.push.apply(d,o(w.value,t,n,l,u,v-(g.offset||0)))}}}}return(A=d).length<2?A:A.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===r.literal&&t.type===r.literal?n.value+=t.value:e.push(t),e}),[]);var A}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(r||(r={}))},1485:function(e,t,n){"use strict";var r=n(930);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.Pc=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},1513:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var s,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))n.call(s,u)&&(o[u]=s[u]);if(t){a=t(s);for(var c=0;c<a.length;c++)r.call(s,a[c])&&(o[a[c]]=s[a[c]])}}return o}},1580:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1601:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"percent",icon:[384,512,[62101,62785,"percentage"],"25","M374.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-320 320c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l320-320zM128 128A64 64 0 1 0 0 128a64 64 0 1 0 128 0zM384 384a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"]},t.Bi=t.mw},1675:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});var r=n(7502),i=n(9575),s=n(2474),a=n(9140),o=n(4041),l=n(9548);function u(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t,n){return null!=n[t]?n[t]:e.props[t]}function h(e,t,n){var r=u(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),s=[];for(var a in e)a in t?s.length&&(i[a]=s,s=[]):s.push(a);var o={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];o[i[l][r]]=n(u)}o[l]=n(l)}for(r=0;r<s.length;r++)o[s[r]]=n(s[r]);return o}(t,r);return Object.keys(i).forEach((function(s){var a=i[s];if((0,o.isValidElement)(a)){var l=s in t,u=s in r,h=t[s],d=(0,o.isValidElement)(h)&&!h.props.in;!u||l&&!d?u||!l||d?u&&l&&(0,o.isValidElement)(h)&&(i[s]=(0,o.cloneElement)(a,{onExited:n.bind(null,a),in:h.props.in,exit:c(a,"exit",e),enter:c(a,"enter",e)})):i[s]=(0,o.cloneElement)(a,{in:!1}):i[s]=(0,o.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:c(a,"exit",e),enter:c(a,"enter",e)})}})),i}var d=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},f=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind((0,s.A)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,a.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,s=t.handleExited;return{children:t.firstRender?(n=e,r=s,u(n.children,(function(e){return(0,o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:c(e,"appear",n),enter:c(e,"enter",n),exit:c(e,"exit",n)})}))):h(e,i,s),firstRender:!1}},n.handleExited=function(e,t){var n=u(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,i.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=(0,r.A)(e,["component","childFactory"]),s=this.state.contextValue,a=d(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?o.createElement(l.A.Provider,{value:s},a):o.createElement(l.A.Provider,{value:s},o.createElement(t,i,a))},t}(o.Component);f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=f},1685:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},t.z1=t.mw},1847:function(e,t,n){"use strict";var r=n(7269),i=n(1513),s=n(5158);function a(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function o(e){return Array.isArray(e)?e.sort():"object"==typeof e?o(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function l(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:s(a),n(s(i),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=o(n):e[t]=n,e}),Object.create(null))):r}t.extract=l,t.parse=u,t.stringify=function(e,t){!1===(t=i({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[a(t,e),"[",r,"]"].join(""):[a(t,e),"[",a(r,e),"]=",a(n,e)].join("")};case"bracket":return function(t,n){return null===n?a(t,e):[a(t,e),"[]=",a(n,e)].join("")};default:return function(t,n){return null===n?a(t,e):[a(t,e),"=",a(n,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return a(r,t);if(Array.isArray(i)){var s=[];return i.slice().forEach((function(e){void 0!==e&&s.push(n(r,e,s.length))})),s.join("&")}return a(r,t)+"="+a(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(l(e),t)}}},1873:function(e,t,n){var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,s=i-(r||i);e.diff=s,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var l=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;l++;var i=t.formatters[r];if("function"==typeof i){var s=a[l];n=i.call(e,s),a.splice(l,1),l--}return n})),t.formatArgs.call(e,a),(n.log||t.log||console.log.bind(console)).apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(7536),t.names=[],t.skips=[],t.formatters={}},1919:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:function(){return a}});var i=/^\s+/,s=/\s+$/;function a(e,t){if(t=t||{},(e=e||"")instanceof a)return e;if(!(this instanceof a))return new a(e,t);var n=function(e){var t,n,a,o={r:0,g:0,b:0},l=1,u=null,c=null,h=null,d=!1,f=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(s,"").toLowerCase();var t,n=!1;if(w[e])e=w[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=N.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=N.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=N.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=N.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=N.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=N.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=N.hex8.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),a:P(t[4]),format:n?"name":"hex8"}:(t=N.hex6.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),format:n?"name":"hex"}:(t=N.hex4.exec(e))?{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),a:P(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=N.hex3.exec(e))&&{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==r(e)&&(F(e.r)&&F(e.g)&&F(e.b)?(t=e.r,n=e.g,a=e.b,o={r:255*k(t,255),g:255*k(n,255),b:255*k(a,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):F(e.h)&&F(e.s)&&F(e.v)?(u=I(e.s),c=I(e.v),o=function(e,t,n){e=6*k(e,360),t=k(t,100),n=k(n,100);var r=Math.floor(e),i=e-r,s=n*(1-t),a=n*(1-i*t),o=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,s,s,o,n][l],g:255*[o,n,n,a,s,s][l],b:255*[s,s,o,n,n,a][l]}}(e.h,u,c),d=!0,f="hsv"):F(e.h)&&F(e.s)&&F(e.l)&&(u=I(e.s),h=I(e.l),o=function(e,t,n){var r,i,s;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=k(e,360),t=k(t,100),n=k(n,100),0===t)r=i=s=n;else{var o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;r=a(l,o,e+1/3),i=a(l,o,e),s=a(l,o,e-1/3)}return{r:255*r,g:255*i,b:255*s}}(e.h,u,h),d=!0,f="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=A(l),{ok:d,format:e.format||f,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function o(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,s=Math.max(e,t,n),a=Math.min(e,t,n),o=(s+a)/2;if(s==a)r=i=0;else{var l=s-a;switch(i=o>.5?l/(2-s-a):l/(s+a),s){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:o}}function l(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,s=Math.max(e,t,n),a=Math.min(e,t,n),o=s,l=s-a;if(i=0===s?0:l/s,s==a)r=0;else{switch(s){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:o}}function u(e,t,n,r){var i=[R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c(e,t,n,r){return[R(x(r)),R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(n).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s-=t/100,n.s=L(n.s),a(n)}function d(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s+=t/100,n.s=L(n.s),a(n)}function f(e){return a(e).desaturate(100)}function p(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l+=t/100,n.l=L(n.l),a(n)}function g(e,t){t=0===t?0:t||10;var n=a(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),a(n)}function m(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l-=t/100,n.l=L(n.l),a(n)}function v(e,t){var n=a(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,a(n)}function y(e){var t=a(e).toHsl();return t.h=(t.h+180)%360,a(t)}function b(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=a(e).toHsl(),r=[a(e)],i=360/t,s=1;s<t;s++)r.push(a({h:(n.h+s*i)%360,s:n.s,l:n.l}));return r}function E(e){var t=a(e).toHsl(),n=t.h;return[a(e),a({h:(n+72)%360,s:t.s,l:t.l}),a({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=a(e).toHsl(),i=360/n,s=[a(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,s.push(a(r));return s}function S(e,t){t=t||6;for(var n=a(e).toHsv(),r=n.h,i=n.s,s=n.v,o=[],l=1/t;t--;)o.push(a({h:r,s:i,v:s})),s=(s+l)%1;return o}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=l(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=o(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var s=[R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(n).toString(16)),R(x(r))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(_[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+c(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=a(e);n="#"+c(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(d,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},a.fromRatio=function(e,t){if("object"==r(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:I(e[i]));e=n}return a(e,t)},a.equals=function(e,t){return!(!e||!t)&&a(e).toRgbString()==a(t).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(e,t,n){n=0===n?0:n||50;var r=a(e).toRgb(),i=a(t).toRgb(),s=n/100;return a({r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a})},a.readability=function(e,t){var n=a(e),r=a(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},a.isReadable=function(e,t,n){var r,i,s,o,l,u=a.readability(e,t);switch(i=!1,(s=n,"AA"!==(o=((s=s||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(l=(s.size||"small").toLowerCase())&&"large"!==l&&(l="small"),r={level:o,size:l}).level+r.size){case"AAsmall":case"AAAlarge":i=u>=4.5;break;case"AAlarge":i=u>=3;break;case"AAAsmall":i=u>=7}return i},a.mostReadable=function(e,t,n){var r,i,s,o,l=null,u=0;i=(n=n||{}).includeFallbackColors,s=n.level,o=n.size;for(var c=0;c<t.length;c++)(r=a.readability(e,t[c]))>u&&(u=r,l=a(t[c]));return a.isReadable(e,l,{level:s,size:o})||!i?l:(n.includeFallbackColors=!1,a.mostReadable(e,["#fff","#000"],n))};var w=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_=a.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(w);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function k(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return Math.min(1,Math.max(0,e))}function C(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function x(e){return Math.round(255*parseFloat(e)).toString(16)}function P(e){return C(e)/255}var D,O,M,N=(O="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",M="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+O),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+O),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+O),hsva:new RegExp("hsva"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function F(e){return!!N.CSS_UNIT.exec(e)}},2053:function(e){e.exports=function(e){return e}},2061:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(7985);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}(e,t)||(0,r.A)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="xmark",r=[128473,10005,10006,10060,215,"close","multiply","remove","times"],i="f00d",s="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";t.definition={prefix:"fas",iconName:n,icon:[384,512,r,i,s]},t.faXmark=t.definition,t.prefix="fas",t.iconName=n,t.width=384,t.height=512,t.ligatures=r,t.unicode=i,t.svgPathData=s,t.aliases=r},2438:function(e,t,n){var r=n(5630);e.exports=function(e){return e&&e.length?r(e):[]}},2474:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:function(){return r}})},2478:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},2568:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<s(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var o=2*(r+1)-1,l=e[o],u=o+1,c=e[u];if(0>s(l,n))u<i&&0>s(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else{if(!(u<i&&0>s(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,g=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function E(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function T(e){if(m=!1,E(e),!g)if(null!==r(u))g=!0,D(S);else{var t=r(c);null!==t&&O(T,t.startTime-e)}}function S(e,n){g=!1,m&&(m=!1,y(k),k=-1),p=!0;var s=f;try{for(E(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!R());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var o=a(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(u)&&i(u),E(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&O(T,h.startTime-n),l=!1}return l}finally{d=null,f=s,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,_=!1,A=null,k=-1,L=5,C=-1;function R(){return!(t.unstable_now()-C<L)}function I(){if(null!==A){var e=t.unstable_now();C=e;var n=!0;try{n=A(!0,e)}finally{n?w():(_=!1,A=null)}}else _=!1}if("function"==typeof b)w=function(){b(I)};else if("undefined"!=typeof MessageChannel){var x=new MessageChannel,P=x.port2;x.port1.onmessage=I,w=function(){P.postMessage(null)}}else w=function(){v(I,0)};function D(e){A=e,_||(_=!0,w())}function O(e,n){k=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,D(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,s){var a=t.unstable_now();switch(s="object"==typeof s&&null!==s&&"number"==typeof(s=s.delay)&&0<s?a+s:a,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>a?(e.sortIndex=s,n(c,e),null===r(u)&&e===r(c)&&(m?(y(k),k=-1):m=!0,O(T,s-a))):(e.sortIndex=o,n(u,e),g||p||(g=!0,D(S))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},2784:function(e,t,n){var r=n(1580),i=n(4495),s=n(6131),a=Math.max,o=Math.min;e.exports=function(e,t,n){var l,u,c,h,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,p=t,h=e.apply(r,n)}function b(e){var n=e-f;return void 0===f||n>=t||n<0||m&&e-p>=c}function E(){var e=i();if(b(e))return T(e);d=setTimeout(E,function(e){var n=t-(e-f);return m?o(n,c-(e-p)):n}(e))}function T(e){return d=void 0,v&&l?y(e):(l=u=void 0,h)}function S(){var e=i(),n=b(e);if(l=arguments,u=this,f=e,n){if(void 0===d)return function(e){return p=e,d=setTimeout(E,t),g?y(e):h}(f);if(m)return clearTimeout(d),d=setTimeout(E,t),y(f)}return void 0===d&&(d=setTimeout(E,t)),h}return t=s(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(s(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=u=d=void 0},S.flush=function(){return void 0===d?h:T(i())},S}},2865:function(e,t,n){"use strict";n.d(t,{A:function(){return T}});var r=n(9575),i=n(7502),s=n(9140);function a(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var o=n(4041),l=n(3144),u=n(9548),c=function(e){return e.scrollTop},h="unmounted",d="exited",f="entering",p="entered",g="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,s=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?s?(i=d,r.appearStatus=f):i=p:i=t.unmountOnExit||t.mountOnEnter?h:d,r.state={status:i},r.nextCallback=null,r}(0,s.A)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===h?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==p&&(t=f):n!==f&&n!==p||(t=g)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===f){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this);n&&c(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:h})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.findDOMNode(this),r],s=i[0],a=i[1],o=this.getTimeouts(),u=r?o.appear:o.enter;e||n?(this.props.onEnter(s,a),this.safeSetState({status:f},(function(){t.props.onEntering(s,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(s,a)}))}))}))):this.safeSetState({status:p},(function(){t.props.onEntered(s)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:g},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],a=i[1];this.props.addEndListener(s,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===h)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,i.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(u.A.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},t}(o.Component);function v(){}m.contextType=u.A,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},m.UNMOUNTED=h,m.EXITED=d,m.ENTERING=f,m.ENTERED=p,m.EXITING=g;var y=m,b=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=a(n.className,r):n.setAttribute("class",a(n.className&&n.className.baseVal||"",r)));var n,r}))},E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s=r[1];t.removeClasses(i,"exit"),t.addClass(i,s?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s=r[1]?"appear":"enter";t.addClass(i,s,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s=r[1]?"appear":"enter";t.removeClasses(i,s),t.addClass(i,s,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}(0,s.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&c(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,s=n.done;this.appliedClasses[t]={},r&&b(e,r),i&&b(e,i),s&&b(e,s)},n.render=function(){var e=this.props,t=(e.classNames,(0,i.A)(e,["classNames"]));return o.createElement(y,(0,r.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(o.Component);E.defaultProps={classNames:""},E.propTypes={};var T=E},2888:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},t.e6=t.mw},2992:function(e,t){"use strict";t.Y=function(e,t){return function(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(n),s=t[1],a=t[2],o=t[3]||"",l={};return l.inverse=!!s&&"not"===s.toLowerCase(),l.type=a?a.toLowerCase():"all",o=o.match(/\([^\)]+\)/g)||[],l.expressions=o.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(i);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var i=e.expressions.every((function(e){var n=e.feature,r=e.modifier,i=e.value,s=t[n];if(!s)return!1;switch(n){case"orientation":case"scan":return s.toLowerCase()===i.toLowerCase();case"width":case"height":case"device-width":case"device-height":i=u(i),s=u(s);break;case"resolution":i=l(i),s=l(s);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":i=o(i),s=o(s);break;case"grid":case"color":case"color-index":case"monochrome":i=parseInt(i,10)||1,s=parseInt(s,10)||0}switch(r){case"min":return s>=i;case"max":return s<=i;default:return s===i}}));return i&&!n||!i&&n}))};var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,i=/^(?:(min|max)-)?(.+)/,s=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function o(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function l(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function u(e){var t=parseFloat(e);switch(String(e).match(s)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},3022:function(e,t,n){"use strict";n.d(t,{useDrag:function(){return ce},useGesture:function(){return de},useScroll:function(){return he}});const r={toVector(e,t){return void 0===e&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function i(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function s(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-i(t-e,n-t,r)+t:e>n?+i(e-n,n-t,r)+n:e}function a(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const u={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function c(e){return e?e[0].toUpperCase()+e.slice(1):""}const h=["enter","leave"];const d=["gotpointercapture","lostpointercapture"];function f(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=d.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function p(e){return"touches"in e}function g(e){return p(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function m(e){return p(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function v(e,t){try{const n=t.clientX-e.clientX,r=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,s=(t.clientY+e.clientY)/2,a=Math.hypot(n,r);return{angle:-180*Math.atan2(n,r)/Math.PI,distance:a,origin:[i,s]}}catch(e){}return null}function y(e,t){const[n,r]=Array.from(e.touches).filter((e=>t.includes(e.identifier)));return v(n,r)}function b(e){const t=m(e);return p(e)?t.identifier:t.pointerId}function E(e){const t=m(e);return[t.clientX,t.clientY]}function T(e){let{deltaX:t,deltaY:n,deltaMode:r}=e;return 1===r?(t*=40,n*=40):2===r&&(t*=800,n*=800),[t,n]}function S(e,...t){return"function"==typeof e?e(...t):e}function w(){}function _(...e){return 0===e.length?w:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function A(e,t){return Object.assign({},t,e||{})}class k{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?S(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let a=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s})}return t}(e)),i.down=i.pressed=i.buttons%2==1||i.touches>0,a=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);r.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[o,l]=t._movement,[u,c]=n.threshold,{_step:h,values:d}=t;if(n.hasCustomTransform?(!1===h[0]&&(h[0]=Math.abs(o)>=u&&d[0]),!1===h[1]&&(h[1]=Math.abs(l)>=c&&d[1])):(!1===h[0]&&(h[0]=Math.abs(o)>=u&&Math.sign(o)*u),!1===h[1]&&(h[1]=Math.abs(l)>=c&&Math.sign(l)*c)),t.intentional=!1!==h[0]||!1!==h[1],!t.intentional)return;const f=[0,0];if(n.hasCustomTransform){const[e,t]=d;f[0]=!1!==h[0]?e-h[0]:0,f[1]=!1!==h[1]?t-h[1]:0}else f[0]=!1!==h[0]?o-h[0]:0,f[1]=!1!==h[1]?l-h[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(f);const p=t.offset,g=t._active&&!t._blocked||t.active;g&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=S(n.bounds,t)),this.setup&&this.setup()),t.movement=f,this.computeOffset()));const[m,v]=t.offset,[[y,b],[E,T]]=t._bounds;t.overflow=[m<y?-1:m>b?1:0,v<E?-1:v>T?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,i]){const[[a,o],[l,u]]=e;return[s(t,a,o,r),s(n,l,u,i)]}(t._bounds,t.offset,w),t.delta=r.sub(t.offset,p),this.computeMovement(),g&&(!t.last||a>32)){t.delta=r.sub(t.offset,p);const e=t.delta.map(Math.abs);r.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&a>0&&(t.velocity=[e[0]/a,e[1]/a],t.timeDelta=a)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(l(l(l({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class L extends k{constructor(...e){super(...e),a(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=r.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=r.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[g(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),i=Math.abs(t);return r>i&&r>n?"x":i>r&&i>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const C=e=>e,R={enabled(e=!0){return e},eventOptions(e,t,n){return l(l({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return r.toVector(e)}},from(e){return"function"==typeof e?e:null!=e?r.toVector(e):void 0},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||C},threshold(e){return r.toVector(e,0)}},I=l(l({},R),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold(e=0){return e},bounds(e={}){if("function"==typeof e)return t=>I.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),x={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]},P="undefined"!=typeof window&&window.document&&window.document.createElement;function D(){return P&&"ontouchstart"in window}const O={isBrowser:P,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:D(),touchscreen:D()||P&&window.navigator.maxTouchPoints>1,pointer:P&&"onpointerdown"in window,pointerLock:P&&"exitPointerLock"in window.document},M={mouse:0,touch:0,pen:8},N=l(l({},I),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&O.pointerLock,O.touch&&n?"touch":this.pointerLock?"mouse":O.pointer&&!i?"pointer":O.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,O.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:i=3,axis:s}){const a=r.toVector(e,n?i:s?1:0);return this.filterTaps=n,this.tapsThreshold=i,a},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(r.toVector(e)),distance:this.transform(r.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold(e){return e?l(l({},M),e):M},keyboardDisplacement(e=10){return e}});function F(e){const[t,n]=e.overflow,[r,i]=e._delta,[s,a]=e._direction;(t<0&&r>0&&s<0||t>0&&r<0&&s>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const B=l(l({},R),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!O.touch&&O.gesture)return"gesture";if(O.touch&&r)return"touch";if(O.touchscreen){if(O.pointer)return"pointer";if(O.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=e=>{const t=A(S(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},s=e=>{const t=A(S(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[i(),s()]:e=>[i(e),s(e)]},threshold(e,t,n){return this.lockDirection="lock"===n.axis,r.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return void 0===e?"ctrlKey":e},pinchOnWheel(e=!0){return e}}),U=l(l({},I),{},{mouseOnly:(e=!0)=>e}),$=I,H=I,G=l(l({},I),{},{mouseOnly:(e=!0)=>e}),j=new Map,V=new Map;function z(e){j.set(e.key,e.engine),V.set(e.key,e.resolver)}const K={key:"drag",engine:class extends L{constructor(...e){super(...e),a(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=I.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=b(e),n._pointerActive=!0,this.computeValues(E(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==g(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const i=b(e);if(void 0!==t._pointerId&&i!==t._pointerId)return;const s=E(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=r.sub(s,t._values),this.computeValues(s)),r.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=b(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[i,s]=t._distance;if(t.tap=i<=n.tapsThreshold&&s<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[i,s]=t._movement,[a,o]=n.swipe.velocity,[l,u]=n.swipe.distance,c=n.swipe.duration;if(t.elapsedTime<c){const n=Math.abs(e/t.timeDelta),c=Math.abs(r/t.timeDelta);n>a&&Math.abs(i)>l&&(t.swipe[0]=Math.sign(e)),c>o&&Math.abs(s)>u&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=x[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,i),n._keyboardActive=!0,r.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in x&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:N},W={key:"hover",engine:class extends L{constructor(...e){super(...e),a(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(E(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=E(e);t._movement=t._delta=r.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:G},Y={key:"move",engine:class extends L{constructor(...e){super(...e),a(this,"ingKey","moving")}move(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.state._active?this.moveChange(e):this.moveStart(e),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(e){this.start(e),this.computeValues(E(e)),this.compute(e),this.computeInitial(),this.emit()}moveChange(e){if(!this.state._active)return;const t=E(e),n=this.state;n._delta=r.sub(t,n._values),r.addTo(n._movement,n._delta),this.computeValues(t),this.compute(e),this.emit()}moveEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}bind(e){e("pointer","change",this.move.bind(this)),e("pointer","leave",this.moveEnd.bind(this))}},resolver:U},q={key:"pinch",engine:class extends k{constructor(...e){super(...e),a(this,"ingKey","pinching"),a(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const e=this.state;e._touchIds=[],e.canceled=!1,e.cancel=this.cancel.bind(this),e.turns=0}computeOffset(){const{type:e,movement:t,lastOffset:n}=this.state;this.state.offset="wheel"===e?r.add(t,n):[(1+t[0])*n[0],t[1]+n[1]]}computeMovement(){const{offset:e,lastOffset:t}=this.state;this.state.movement=[e[0]/t[0],e[1]-t[1]]}axisIntent(){const e=this.state,[t,n]=e._movement;if(!e.axis){const r=30*Math.abs(t)-Math.abs(n);r<0?e.axis="angle":r>0&&(e.axis="scale")}}restrictToAxis(e){this.config.lockDirection&&("scale"===this.state.axis?e[1]=0:"angle"===this.state.axis&&(e[0]=0))}cancel(){const e=this.state;e.canceled||setTimeout((()=>{e.canceled=!0,e._active=!1,this.compute(),this.emit()}),0)}touchStart(e){this.ctrl.setEventIds(e);const t=this.state,n=this.ctrl.touchIds;if(t._active&&t._touchIds.every((e=>n.has(e))))return;if(n.size<2)return;this.start(e),t._touchIds=Array.from(n).slice(0,2);const r=y(e,t._touchIds);r&&this.pinchStart(e,r)}pointerStart(e){if(null!=e.buttons&&e.buttons%2!=1)return;this.ctrl.setEventIds(e),e.target.setPointerCapture(e.pointerId);const t=this.state,n=t._pointerEvents,r=this.ctrl.pointerIds;if(t._active&&Array.from(n.keys()).every((e=>r.has(e))))return;if(n.size<2&&n.set(e.pointerId,e),t._pointerEvents.size<2)return;this.start(e);const i=v(...Array.from(n.values()));i&&this.pinchStart(e,i)}pinchStart(e,t){this.state.origin=t.origin,this.computeValues([t.distance,t.angle]),this.computeInitial(),this.compute(e),this.emit()}touchMove(e){if(!this.state._active)return;const t=y(e,this.state._touchIds);t&&this.pinchMove(e,t)}pointerMove(e){const t=this.state._pointerEvents;if(t.has(e.pointerId)&&t.set(e.pointerId,e),!this.state._active)return;const n=v(...Array.from(t.values()));n&&this.pinchMove(e,n)}pinchMove(e,t){const n=this.state,r=n._values[1],i=t.angle-r;let s=0;Math.abs(i)>270&&(s+=Math.sign(i)),this.computeValues([t.distance,t.angle-360*s]),n.origin=t.origin,n.turns=s,n._movement=[n._values[0]/n._initial[0]-1,n._values[1]-n._initial[1]],this.compute(e),this.emit()}touchEnd(e){this.ctrl.setEventIds(e),this.state._active&&this.state._touchIds.some((e=>!this.ctrl.touchIds.has(e)))&&(this.state._active=!1,this.compute(e),this.emit())}pointerEnd(e){const t=this.state;this.ctrl.setEventIds(e);try{e.target.releasePointerCapture(e.pointerId)}catch(e){}t._pointerEvents.has(e.pointerId)&&t._pointerEvents.delete(e.pointerId),t._active&&t._pointerEvents.size<2&&(t._active=!1,this.compute(e),this.emit())}gestureStart(e){e.cancelable&&e.preventDefault();const t=this.state;t._active||(this.start(e),this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY],this.compute(e),this.emit())}gestureMove(e){if(e.cancelable&&e.preventDefault(),!this.state._active)return;const t=this.state;this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY];const n=t._movement;t._movement=[e.scale-1,e.rotation],t._delta=r.sub(t._movement,n),this.compute(e),this.emit()}gestureEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}wheel(e){const t=this.config.modifierKey;t&&!(Array.isArray(t)?t.find((t=>e[t])):e[t])||(this.state._active?this.wheelChange(e):this.wheelStart(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(e){this.start(e),this.wheelChange(e)}wheelChange(e){"uv"in e||e.cancelable&&e.preventDefault();const t=this.state;t._delta=[-T(e)[1]/100*t.offset[0],0],r.addTo(t._movement,t._delta),F(t),this.state.origin=[e.clientX,e.clientY],this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){const t=this.config.device;t&&(e(t,"start",this[t+"Start"].bind(this)),e(t,"change",this[t+"Move"].bind(this)),e(t,"end",this[t+"End"].bind(this)),e(t,"cancel",this[t+"End"].bind(this)),e("lostPointerCapture","",this[t+"End"].bind(this))),this.config.pinchOnWheel&&e("wheel","",this.wheel.bind(this),{passive:!1})}},resolver:B},X={key:"scroll",engine:class extends L{constructor(...e){super(...e),a(this,"ingKey","scrolling")}scroll(e){this.state._active||this.start(e),this.scrollChange(e),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(e){e.cancelable&&e.preventDefault();const t=this.state,n=function(e){var t,n;const{scrollX:r,scrollY:i,scrollLeft:s,scrollTop:a}=e.currentTarget;return[null!==(t=null!=r?r:s)&&void 0!==t?t:0,null!==(n=null!=i?i:a)&&void 0!==n?n:0]}(e);t._delta=r.sub(n,t._values),r.addTo(t._movement,t._delta),this.computeValues(n),this.compute(e),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("scroll","",this.scroll.bind(this))}},resolver:$},Q={key:"wheel",engine:class extends L{constructor(...e){super(...e),a(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=T(e),r.addTo(t._movement,t._delta),F(t),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}},resolver:H};var Z=n(4041);const J={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=(O.isBrowser?window:void 0)){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},ee=["target","eventOptions","window","enabled","transform"];function te(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=te(e[r],i);break;case"boolean":i&&(n[r]=e[r])}return n}class ne{constructor(e,t){a(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,i){const s=this._listeners,a=function(e,t=""){const n=u[e];return e+(n&&n[t]||t)}(t,n),o=l(l({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);e.addEventListener(a,r,o);const c=()=>{e.removeEventListener(a,r,o),s.delete(c)};return s.add(c),c}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class re{constructor(){a(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class ie{constructor(e){var t,n;a(this,"gestures",new Set),a(this,"_targetEventStore",new ne(this)),a(this,"gestureEventStores",{}),a(this,"gestureTimeoutStores",{}),a(this,"handlers",{}),a(this,"config",{}),a(this,"pointerIds",new Set),a(this,"touchIds",new Set),a(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),t=this,(n=e).drag&&se(t,"drag"),n.wheel&&se(t,"wheel"),n.scroll&&se(t,"scroll"),n.move&&se(t,"move"),n.pinch&&se(t,"pinch"),n.hover&&se(t,"hover")}setEventIds(e){return p(e)?(this.touchIds=new Set(function(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:i,eventOptions:s,window:a,enabled:o,transform:u}=r,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,ee);if(n.shared=te({target:i,eventOptions:s,window:a,enabled:o,transform:u},J),t){const e=V.get(t);n[t]=te(l({shared:n.shared},c),e)}else for(const e in c){const t=V.get(e);t&&(n[e]=te(l({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const i=this.config[t],s=ae(n,i.eventOptions,!!r);i.enabled&&new(j.get(t))(this,e,t).bind(s)}const i=ae(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)i(t,"",(n=>this.nativeHandlers[t](l(l({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=_(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:i,passive:s}=f(e);this._targetEventStore.add(r,t,"",n[e],{capture:i,passive:s})}}}}function se(e,t){e.gestures.add(t),e.gestureEventStores[t]=new ne(e,t),e.gestureTimeoutStores[t]=new re}const ae=(e,t,n)=>(r,i,s,a={},o=!1)=>{var l,d;const f=null!==(l=a.capture)&&void 0!==l?l:t.capture,p=null!==(d=a.passive)&&void 0!==d?d:t.passive;let g=o?r:function(e,t="",n=!1){const r=u[e],i=r&&r[t]||t;return"on"+c(e)+c(i)+(function(e=!1,t){return e&&!h.includes(t)}(n,i)?"Capture":"")}(r,i,f);n&&p&&(g+="Passive"),e[g]=e[g]||[],e[g].push(s)},oe=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function le(e,t,n,r,i,s){if(!e.has(n))return;if(!j.has(r))return;const a=n+"Start",o=n+"End";i[r]=e=>{let r;return e.first&&a in t&&t[a](e),n in t&&(r=t[n](e)),e.last&&o in t&&t[o](e),r},s[r]=s[r]||{}}function ue(e,t={},n,r){const i=Z.useMemo((()=>new ie(e)),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),Z.useEffect(i.effect.bind(i)),Z.useEffect((()=>i.clean.bind(i)),[]),void 0===t.target)return i.bind.bind(i)}function ce(e,t){return z(K),ue({drag:e},t||{},"drag")}function he(e,t){return z(X),ue({scroll:e},t||{},"scroll")}function de(e,t){const n=([K,q,X,Q,Y,W].forEach(z),function(e,t){const{handlers:n,nativeHandlers:r,config:i}=function(e,t){const[n,r,i]=function(e){const t={},n={},r=new Set;for(let i in e)oe.test(i)?(r.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,r]}(e),s={};return le(i,n,"onDrag","drag",s,t),le(i,n,"onWheel","wheel",s,t),le(i,n,"onScroll","scroll",s,t),le(i,n,"onPinch","pinch",s,t),le(i,n,"onMove","move",s,t),le(i,n,"onHover","hover",s,t),{handlers:s,config:t,nativeHandlers:r}}(e,t||{});return ue(n,i,void 0,r)});return n(e,t||{})}},3142:function(e){var t=Array.isArray;e.exports=t},3144:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(7400)},3212:function(e,t,n){var r=n(3142);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return r(e)?e:[e]}},3283:function(e){e.exports=function(){return!1}},3285:function(e,t,n){"use strict";n.d(t,{m:function(){return ne}});var r,i,s,a,o=n(9067),l=n.n(o),u=n(6399),c=n.n(u),h=n(9772),d=n.n(h),f=n(4041),p=n(1513),g=n.n(p),m="bodyAttributes",v="htmlAttributes",y={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},b=(Object.keys(y).map((function(e){return y[e]})),"charset"),E="cssText",T="href",S="innerHTML",w="itemprop",_="rel",A={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},k=Object.keys(A).reduce((function(e,t){return e[A[t]]=t,e}),{}),L=[y.NOSCRIPT,y.SCRIPT,y.STYLE],C="data-react-helmet",R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},D=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},O=function(e){var t=U(e,y.TITLE),n=U(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=U(e,"defaultTitle");return t||r||void 0},M=function(e){return U(e,"onChangeClientState")||function(){}},N=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return x({},e,t)}),{})},F=function(e,t){return t.filter((function(e){return void 0!==e[y.BASE]})).map((function(e){return e[y.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var s=r[i].toLowerCase();if(-1!==e.indexOf(s)&&n[s])return t.concat(n)}return t}),[])},B=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&V("Helmet: "+e+' should be of type "Array". Instead found type "'+R(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var i={};n.filter((function(e){for(var n=void 0,s=Object.keys(e),a=0;a<s.length;a++){var o=s[a],l=o.toLowerCase();-1===t.indexOf(l)||n===_&&"canonical"===e[n].toLowerCase()||l===_&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(o)||o!==S&&o!==E&&o!==w||(n=o)}if(!n||!e[n])return!1;var u=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][u]&&(i[n][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var s=Object.keys(i),a=0;a<s.length;a++){var o=s[a],l=g()({},r[o],i[o]);r[o]=l}return e}),[]).reverse()},U=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},$=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){$(e)}),0)}),H=function(e){return clearTimeout(e)},G="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||$:n.g.requestAnimationFrame||$,j="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||H:n.g.cancelAnimationFrame||H,V=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},z=null,K=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,s=e.linkTags,a=e.metaTags,o=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,h=e.title,d=e.titleAttributes;q(y.BODY,r),q(y.HTML,i),Y(h,d);var f={baseTag:X(y.BASE,n),linkTags:X(y.LINK,s),metaTags:X(y.META,a),noscriptTags:X(y.NOSCRIPT,o),scriptTags:X(y.SCRIPT,u),styleTags:X(y.STYLE,c)},p={},g={};Object.keys(f).forEach((function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(g[e]=f[e].oldTags)})),t&&t(),l(e,p,g)},W=function(e){return Array.isArray(e)?e.join(""):e},Y=function(e,t){void 0!==e&&document.title!==e&&(document.title=W(e)),q(y.TITLE,t)},q=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(C),i=r?r.split(","):[],s=[].concat(i),a=Object.keys(t),o=0;o<a.length;o++){var l=a[o],u=t[l]||"";n.getAttribute(l)!==u&&n.setAttribute(l,u),-1===i.indexOf(l)&&i.push(l);var c=s.indexOf(l);-1!==c&&s.splice(c,1)}for(var h=s.length-1;h>=0;h--)n.removeAttribute(s[h]);i.length===s.length?n.removeAttribute(C):n.getAttribute(C)!==a.join(",")&&n.setAttribute(C,a.join(","))}},X=function(e,t){var n=document.head||document.querySelector(y.HEAD),r=n.querySelectorAll(e+"["+C+"]"),i=Array.prototype.slice.call(r),s=[],a=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===S)n.innerHTML=t.innerHTML;else if(r===E)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var o=void 0===t[r]?"":t[r];n.setAttribute(r,o)}n.setAttribute(C,"true"),i.some((function(e,t){return a=t,n.isEqualNode(e)}))?i.splice(a,1):s.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),s.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:s}},Q=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[A[n]||n]=e[n],t}),t)},J=function(e,t,n){switch(e){case y.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[C]=!0,i=Z(n,r),[f.createElement(y.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=Q(n),s=W(t);return i?"<"+e+" "+C+'="true" '+i+">"+D(s,r)+"</"+e+">":"<"+e+" "+C+'="true">'+D(s,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case m:case v:return{toComponent:function(){return Z(t)},toString:function(){return Q(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[C]=!0,r);return Object.keys(t).forEach((function(e){var n=A[e]||e;if(n===S||n===E){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),f.createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===S||e===E)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+D(r[t],n)+'"';return e?e+" "+i:i}),""),s=r.innerHTML||r.cssText||"",a=-1===L.indexOf(e);return t+"<"+e+" "+C+'="true" '+i+(a?"/>":">"+s+"</"+e+">")}),"")}(e,t,n)}}}},ee=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,s=e.linkTags,a=e.metaTags,o=e.noscriptTags,l=e.scriptTags,u=e.styleTags,c=e.title,h=void 0===c?"":c,d=e.titleAttributes;return{base:J(y.BASE,t,r),bodyAttributes:J(m,n,r),htmlAttributes:J(v,i,r),link:J(y.LINK,s,r),meta:J(y.META,a,r),noscript:J(y.NOSCRIPT,o,r),script:J(y.SCRIPT,l,r),style:J(y.STYLE,u,r),title:J(y.TITLE,{title:h,titleAttributes:d},r)}},te=c()((function(e){return{baseTag:F([T,"target"],e),bodyAttributes:N(m,e),defer:U(e,"defer"),encode:U(e,"encodeSpecialCharacters"),htmlAttributes:N(v,e),linkTags:B(y.LINK,[_,T],e),metaTags:B(y.META,["name",b,"http-equiv","property",w],e),noscriptTags:B(y.NOSCRIPT,[S],e),onChangeClientState:M(e),scriptTags:B(y.SCRIPT,["src",S],e),styleTags:B(y.STYLE,[E],e),title:O(e),titleAttributes:N("titleAttributes",e)}}),(function(e){z&&j(z),e.defer?z=G((function(){K(e,(function(){z=null}))})):(K(e),z=null)}),ee)((function(){return null})),ne=(i=te,a=s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case y.SCRIPT:case y.NOSCRIPT:return{innerHTML:t};case y.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,s=e.nestedChildren;return x({},r,((t={})[n.type]=[].concat(r[n.type]||[],[x({},i,this.mapNestedChildrenToProps(n,s))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,s=e.newChildProps,a=e.nestedChildren;switch(r.type){case y.TITLE:return x({},i,((t={})[r.type]=a,t.titleAttributes=x({},s),t));case y.BODY:return x({},i,{bodyAttributes:x({},s)});case y.HTML:return x({},i,{htmlAttributes:x({},s)})}return x({},i,((n={})[r.type]=x({},s),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=x({},t);return Object.keys(e).forEach((function(t){var r;n=x({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return f.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,s=i.children,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)}(P(i,["children"]));switch(n.warnOnInvalidChildren(e,s),e.type){case y.LINK:case y.META:case y.NOSCRIPT:case y.SCRIPT:case y.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:s});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:s})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=P(e,["children"]),r=x({},n);return t&&(r=this.mapChildrenToProps(t,r)),f.createElement(i,r)},I(t,null,[{key:"canUseDOM",set:function(e){i.canUseDOM=e}}]),t}(f.Component),s.propTypes={base:l().object,bodyAttributes:l().object,children:l().oneOfType([l().arrayOf(l().node),l().node]),defaultTitle:l().string,defer:l().bool,encodeSpecialCharacters:l().bool,htmlAttributes:l().object,link:l().arrayOf(l().object),meta:l().arrayOf(l().object),noscript:l().arrayOf(l().object),onChangeClientState:l().func,script:l().arrayOf(l().object),style:l().arrayOf(l().object),title:l().string,titleAttributes:l().object,titleTemplate:l().string},s.defaultProps={defer:!0,encodeSpecialCharacters:!0},s.peek=i.peek,s.rewind=function(){var e=i.rewind();return e||(e=ee({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);ne.renderStatic=ne.rewind},3296:function(e,t,n){"use strict";var r=n(4041),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,a=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return o((function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})}),[e,n,t]),a((function(){return u(i)&&c({inst:i}),e((function(){u(i)&&c({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},3315:function(e,t,n){var r;!function(t){"use strict";function i(){}var s=i.prototype,a=t.EventEmitter;function o(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function l(e){return function(){return this[e].apply(this,arguments)}}function u(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&u(e.listener)}s.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp)for(n in t={},r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n]);else t=r[e]||(r[e]=[]);return t},s.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},s.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},s.addListener=function(e,t){if(!u(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),i="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===o(r[n],t)&&r[n].push(i?t:{listener:t,once:!1});return this},s.on=l("addListener"),s.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},s.once=l("addOnceListener"),s.defineEvent=function(e){return this.getListeners(e),this},s.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},s.removeListener=function(e,t){var n,r,i=this.getListenersAsObject(e);for(r in i)i.hasOwnProperty(r)&&-1!==(n=o(i[r],t))&&i[r].splice(n,1);return this},s.off=l("removeListener"),s.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},s.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},s.manipulateListeners=function(e,t,n){var r,i,s=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)s.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?s.call(this,r,i):a.call(this,r,i));return this},s.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},s.removeAllListeners=l("removeEvent"),s.emitEvent=function(e,t){var n,r,i,s,a=this.getListenersAsObject(e);for(s in a)if(a.hasOwnProperty(s))for(n=a[s].slice(0),i=0;i<n.length;i++)!0===(r=n[i]).once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},s.trigger=l("emitEvent"),s.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},s.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},s._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},s._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return t.EventEmitter=a,i},void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof window?window:this||{})},3316:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},3334:function(e){e.exports=function(e){return e}},3335:function(e,t,n){"use strict";var r=n(4041),i=Symbol.for("react.element"),s=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!o.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:l,_owner:a.current}}t.jsx=l,t.jsxs=l},3373:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},3464:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",i="minute",s="hour",a="day",o="week",l="month",u="quarter",c="year",h="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),s=n-i<0,a=t.clone().add(r+(s?-1:1),l);return+(-(r+(n-i)/(s?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:o,d:a,D:h,h:s,m:i,s:r,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",b={};b[y]=g;var E="$isDayjsObject",T=function(e){return e instanceof A||!(!e||!e[E])},S=function e(t,n,r){var i;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();b[s]&&(i=s),n&&(b[s]=n,i=s);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var o=t.name;b[o]=t,i=o}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(T(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},_=v;_.l=S,_.i=T,_.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[E]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return _},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return w(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<w(e)},m.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var n=this,u=!!_.u(t)||t,d=_.p(e),f=function(e,t){var r=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return u?r:r.endOf(a)},p=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case c:return u?f(1,0):f(31,11);case l:return u?f(1,m):f(0,m+1);case o:var b=this.$locale().weekStart||0,E=(g<b?g+7:g)-b;return f(u?v-E:v+(6-E),m);case a:case h:return p(y+"Hours",0);case s:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var o,u=_.p(e),d="set"+(this.$u?"UTC":""),f=(o={},o[a]=d+"Date",o[h]=d+"Date",o[l]=d+"Month",o[c]=d+"FullYear",o[s]=d+"Hours",o[i]=d+"Minutes",o[r]=d+"Seconds",o[n]=d+"Milliseconds",o)[u],p=u===a?this.$D+(t-this.$W):t;if(u===l||u===c){var g=this.clone().set(h,1);g.$d[f](p),g.init(),this.$d=g.set(h,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[_.p(e)]()},m.add=function(n,u){var h,d=this;n=Number(n);var f=_.p(u),p=function(e){var t=w(d);return _.w(t.date(t.date()+Math.round(e*n)),d)};if(f===l)return this.set(l,this.$M+n);if(f===c)return this.set(c,this.$y+n);if(f===a)return p(1);if(f===o)return p(7);var g=(h={},h[i]=e,h[s]=t,h[r]=1e3,h)[f]||1,m=this.$d.getTime()+n*g;return _.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=_.z(this),s=this.$H,a=this.$m,o=this.$M,l=n.weekdays,u=n.months,c=n.meridiem,h=function(e,n,i,s){return e&&(e[n]||e(t,r))||i[n].slice(0,s)},f=function(e){return _.s(s%12||12,e,"0")},g=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return o+1;case"MM":return _.s(o+1,2,"0");case"MMM":return h(n.monthsShort,o,u,3);case"MMMM":return h(u,o);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(n.weekdaysMin,t.$W,l,2);case"ddd":return h(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return _.s(s,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return g(s,a,!0);case"A":return g(s,a,!1);case"m":return String(a);case"mm":return _.s(a,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,h,d){var f,p=this,g=_.p(h),m=w(n),v=(m.utcOffset()-this.utcOffset())*e,y=this-m,b=function(){return _.m(p,m)};switch(g){case c:f=b()/12;break;case l:f=b();break;case u:f=b()/3;break;case o:f=(y-v)/6048e5;break;case a:f=(y-v)/864e5;break;case s:f=y/t;break;case i:f=y/e;break;case r:f=y/1e3;break;default:f=y}return d?f:_.a(f)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return b[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},m.clone=function(){return _.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),k=A.prototype;return w.prototype=k,[["$ms",n],["$s",r],["$m",i],["$H",s],["$W",a],["$M",l],["$y",c],["$D",h]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,A,w),e.$i=!0),w},w.locale=S,w.isDayjs=T,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}()},3514:function(e,t,n){var r=n(195),i=n(8486),s=n(3283),a=n(3142),o=n(6529),l=n(5853),u=n(4882),c=n(8666),h=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(o(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||s(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(h.call(e,n))return!1;return!0}},3521:function(e,t,n){var r=n(1187);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,s=e==e,a=r(e),o=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&o&&u&&!l&&!c||i&&o&&u||!n&&u||!s)return 1;if(!i&&!a&&!c&&e<t||c&&n&&s&&!i&&!a||l&&n&&s||!o&&s||!u)return-1}return 0}},3655:function(e,t,n){var r=n(7379),i=n(1580);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3670:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},t.GE=t.mw},3766:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},3852:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},t.ij=t.mw},3945:function(e,t,n){var r=n(2053),i=n(5234),s=n(796);e.exports=function(e,t){return s(i(e,t,r),e+"")}},4e3:function(e,t,n){var r=n(6377)("jsonp");e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),t||(t={});var a,o,l=t.prefix||"__jp",u=t.name||l+i++,c=t.param||"callback",h=null!=t.timeout?t.timeout:6e4,d=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head;function p(){a.parentNode&&a.parentNode.removeChild(a),window[u]=s,o&&clearTimeout(o)}return h&&(o=setTimeout((function(){p(),n&&n(new Error("Timeout"))}),h)),window[u]=function(e){r("jsonp got",e),p(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+c+"="+d(u)).replace("?&","?"),r('jsonp req "%s"',e),(a=document.createElement("script")).src=e,f.parentNode.insertBefore(a,f),function(){window[u]&&p()}};var i=0;function s(){}},4041:function(e,t,n){"use strict";e.exports=n(4304)},4104:function(e,t,n){"use strict";var r=n(5608),i=n(4041),s=n(5012),a=n(8867);function o(e){var t=(0,a.A)(),n=t.formatMessage,r=t.textComponent,s=void 0===r?i.Fragment:r,o=e.id,l=e.description,u=e.defaultMessage,c=e.values,h=e.children,d=e.tagName,f=void 0===d?s:d,p=n({id:o,description:l,defaultMessage:u},c,{ignoreTag:e.ignoreTag});return"function"==typeof h?h(Array.isArray(p)?p:[p]):f?i.createElement(f,null,i.Children.toArray(p)):i.createElement(i.Fragment,null,p)}o.displayName="FormattedMessage";var l=i.memo(o,(function(e,t){var n=e.values,i=(0,r.Tt)(e,["values"]),a=t.values,o=(0,r.Tt)(t,["values"]);return(0,s.bN)(a,n)&&(0,s.bN)(i,o)}));l.displayName="MemoizedFormattedMessage",t.A=l},4120:function(e,t,n){"use strict";n.d(t,{$s:function(){return f},Ao:function(){return a},De:function(){return E},SJ:function(){return m},nm:function(){return l},pS:function(){return h},rf:function(){return c},uX:function(){return o}});var r=n(5466),i=n(4041),s=Symbol.for("Animated:node"),a=e=>e&&e[s],o=(e,t)=>(0,r.OX)(e,s,t),l=e=>e&&e[s]&&e[s].getPayload(),u=class{constructor(){o(this,this)}getPayload(){return this.payload||[]}},c=class extends u{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,r.is.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new c(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return r.is.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,r.is.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},h=class extends c{constructor(e){super(0),this._string=null,this._toString=(0,r.kx)({output:[e,e]})}static create(e){return new h(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(r.is.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=(0,r.kx)({output:[this.getValue(),e]})),this._value=0,super.reset()}},d={dependencies:null},f=class extends u{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return(0,r.FI)(this.source,((n,i)=>{var a;(a=n)&&a[s]===a?t[i]=n.getValue(e):(0,r.at)(n)?t[i]=(0,r.oq)(n):e||(t[i]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&(0,r.__)(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return(0,r.FI)(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){d.dependencies&&(0,r.at)(e)&&d.dependencies.add(e);const t=l(e);t&&(0,r.__)(t,(e=>this.add(e)))}},p=class extends f{constructor(e){super(e)}static create(e){return new p(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(g)),!0)}};function g(e){return((0,r.$7)(e)?h:c).create(e)}function m(e){const t=a(e);return t?t.constructor:r.is.arr(e)?p:(0,r.$7)(e)?h:c}var v=(e,t)=>{const n=!r.is.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,i.forwardRef)(((s,a)=>{const o=(0,i.useRef)(null),l=n&&(0,i.useCallback)((e=>{o.current=function(e,t){return e&&(r.is.fun(e)?e(t):e.current=t),t}(a,e)}),[a]),[u,c]=function(e,t){const n=new Set;return d.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new f(e),d.dependencies=null,[e,n]}(s,t),h=(0,r.CH)(),p=()=>{const e=o.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,u.getValue(!0)))&&h()},g=new y(p,c),m=(0,i.useRef)();(0,r.Es)((()=>(m.current=g,(0,r.__)(c,(e=>(0,r.Ec)(e,g))),()=>{m.current&&((0,r.__)(m.current.deps,(e=>(0,r.DV)(e,m.current))),r.er.cancel(m.current.update))}))),(0,i.useEffect)(p,[]),(0,r.H5)((()=>()=>{const e=m.current;(0,r.__)(e.deps,(t=>(0,r.DV)(t,e)))}));const v=t.getComponentProps(u.getValue());return i.createElement(e,{...v,ref:l})}))},y=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&r.er.write(this.update)}},b=Symbol.for("AnimatedComponent"),E=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new f(e),getComponentProps:i=e=>e}={})=>{const s={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:i},a=e=>{const t=T(e)||"Anonymous";return(e=r.is.str(e)?a[e]||(a[e]=v(e,s)):e[b]||(e[b]=v(e,s))).displayName=`Animated(${t})`,e};return(0,r.FI)(e,((t,n)=>{r.is.arr(e)&&(n=T(t)),a[n]=a(t)})),{animated:a}},T=e=>r.is.str(e)?e:e&&r.is.str(e.displayName)?e.displayName:r.is.fun(e)&&e.name||null},4179:function(e,t,n){"use strict";n.d(t,{$x:function(){return a},Ei:function(){return l},IF:function(){return s},O4:function(){return r},Zo:function(){return o}});var r,i=n(5608);!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(r||(r={}));var s=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return(0,i.C6)(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),a=function(e){function t(t,n,i,s){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),r.INVALID_VALUE,s)||this}return(0,i.C6)(t,e),t}(s),o=function(e){function t(t,n,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),r.INVALID_VALUE,i)||this}return(0,i.C6)(t,e),t}(s),l=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),r.MISSING_VALUE,n)||this}return(0,i.C6)(t,e),t}(s)},4240:function(e,t,n){"use strict";n.d(t,{LW:function(){return g},fL:function(){return f},kW:function(){return p},xQ:function(){return d}});const r=/([\p{Ll}\d])(\p{Lu})/gu,i=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,s=/(\d)\p{Ll}|(\p{L})\d/u,a=/[^\p{L}\d]+/giu,o="$1\0$2",l="";function u(e){let t=e.trim();t=t.replace(r,o).replace(i,o),t=t.replace(a,"\0");let n=0,s=t.length;for(;"\0"===t.charAt(n);)n++;if(n===s)return[];for(;"\0"===t.charAt(s-1);)s--;return t.slice(n,s).split(/\0/g)}function c(e){const t=u(e);for(let e=0;e<t.length;e++){const n=t[e],r=s.exec(n);if(r){const i=r.index+(r[1]??r[2]).length;t.splice(e,1,n.slice(0,i),n.slice(i))}}return t}function h(e,t){const[n,r,i]=E(e,t);return n+r.map(m(t?.locale)).join(t?.delimiter??" ")+i}function d(e,t){const[n,r,i]=E(e,t),s=m(t?.locale),a=v(t?.locale),o=t?.mergeAmbiguousCharacters?y(s,a):b(s,a);return n+r.map(((e,t)=>0===t?s(e):o(e,t))).join(t?.delimiter??"")+i}function f(e,t){const[n,r,i]=E(e,t),s=m(t?.locale),a=v(t?.locale),o=t?.mergeAmbiguousCharacters?y(s,a):b(s,a);return n+r.map(o).join(t?.delimiter??"")+i}function p(e,t){return h(e,{delimiter:"-",...t})}function g(e,t){return h(e,{delimiter:"_",...t})}function m(e){return!1===e?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function v(e){return!1===e?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function y(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function b(e,t){return(n,r)=>{const i=n[0];return(r>0&&i>="0"&&i<="9"?"_"+i:t(i))+e(n.slice(1))}}function E(e,t={}){const n=t.split??(t.separateNumbers?c:u),r=t.prefixCharacters??l,i=t.suffixCharacters??l;let s=0,a=e.length;for(;s<e.length;){const t=e.charAt(s);if(!r.includes(t))break;s++}for(;a>s;){const t=a-1,n=e.charAt(t);if(!i.includes(n))break;a=t}return[e.slice(0,s),n(e.slice(s,a)),e.slice(a)]}},4304:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var E=b.prototype=new y;E.constructor=b,g(E,v.prototype),E.isPureReactComponent=!0;var T=Array.isArray,S=Object.prototype.hasOwnProperty,w={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,r){var i,s={},a=null,o=null;if(null!=t)for(i in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,i)&&!_.hasOwnProperty(i)&&(s[i]=t[i]);var l=arguments.length-2;if(1===l)s.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===s[i]&&(s[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:o,props:s,_owner:w.current}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var L=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===s?"."+C(l,0):s,T(a)?(i="",null!=e&&(i=e.replace(L,"$&/")+"/"),R(a,t,i,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(L,"$&/")+"/")+e)),t.push(a)),1;if(l=0,s=""===s?".":s+":",T(e))for(var u=0;u<e.length;u++){var c=s+C(o=e[u],u);l+=R(o,t,i,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(o=e.next()).done;)l+=R(o=o.value,t,i,c=s+C(o,u++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function I(e,t,n){if(null==e)return e;var r=[],i=0;return R(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function x(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},D={transition:null},O={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:D,ReactCurrentOwner:w};function M(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=b,t.StrictMode=s,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.act=M,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),s=e.key,a=e.ref,o=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,o=w.current),void 0!==t.key&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)S.call(t,u)&&!_.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:s,ref:a,props:i,_owner:o}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:x}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=M,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},4436:function(e){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},4453:function(e,t,n){"use strict";function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,{g:function(){return Rn}});const a=()=>{};let o={},l={},u=null,c={mark:a,measure:a};try{"undefined"!=typeof window&&(o=window),"undefined"!=typeof document&&(l=document),"undefined"!=typeof MutationObserver&&(u=MutationObserver),"undefined"!=typeof performance&&(c=performance)}catch(e){}const{userAgent:h=""}=o.navigator||{},d=o,f=l,p=u,g=c,m=(d.document,!!f.documentElement&&!!f.head&&"function"==typeof f.addEventListener&&"function"==typeof f.createElement),v=~h.indexOf("MSIE")||~h.indexOf("Trident/");var y={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},b=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],E="classic",T="duotone",S=[E,T,"sharp","sharp-duotone"],w=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),_=["fak","fa-kit","fakd","fa-kit-duotone"],A=["fak","fakd"],k={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},L=["fak","fa-kit","fakd","fa-kit-duotone"],C={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},R=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],I=[1,2,3,4,5,6,7,8,9,10],x=I.concat([11,12,13,14,15,16,17,18,19,20]),P=[...Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",k.GROUP,k.SWAP_OPACITY,k.PRIMARY,k.SECONDARY].concat(I.map((e=>"".concat(e,"x")))).concat(x.map((e=>"w-".concat(e))));const D="___FONT_AWESOME___",O=16,M="svg-inline--fa",N="data-fa-i2svg",F="data-fa-pseudo-element",B="data-prefix",U="data-icon",$="fontawesome-i2svg",H=["HTML","HEAD","STYLE","SCRIPT"],G=(()=>{try{return!0}catch(e){return!1}})();function j(e){return new Proxy(e,{get(e,t){return t in e?e[t]:e[E]}})}const V=s({},y);V[E]=s(s(s(s({},{"fa-duotone":"duotone"}),y[E]),{fak:"kit","fa-kit":"kit"}),{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"});const z=j(V),K=s({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}});K[E]=s(s(s(s({},{duotone:"fad"}),K[E]),{kit:"fak"}),{"kit-duotone":"fakd"});const W=j(K),Y=s({},C);Y[E]=s(s({},Y[E]),{fak:"fa-kit"});const q=j(Y),X=s({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}});X[E]=s(s({},X[E]),{"fa-kit":"fak"}),j(X);const Q=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,Z="fa-layers-text",J=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,ee=(j(s({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"]),te="duotone-group",ne="primary",re="secondary",ie=["kit",...P],se=d.FontAwesomeConfig||{};f&&"function"==typeof f.querySelector&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((e=>{let[t,n]=e;const r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=f.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t));null!=r&&(se[n]=r)}));const ae={styleDefault:"solid",familyDefault:E,cssPrefix:"fa",replacementClass:M,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};se.familyPrefix&&(se.cssPrefix=se.familyPrefix);const oe=s(s({},ae),se);oe.autoReplaceSvg||(oe.observeMutations=!1);const le={};Object.keys(ae).forEach((e=>{Object.defineProperty(le,e,{enumerable:!0,set:function(t){oe[e]=t,ue.forEach((e=>e(le)))},get:function(){return oe[e]}})})),Object.defineProperty(le,"familyPrefix",{enumerable:!0,set:function(e){oe.cssPrefix=e,ue.forEach((e=>e(le)))},get:function(){return oe.cssPrefix}}),d.FontAwesomeConfig=le;const ue=[],ce=O,he={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function de(){let e=12,t="";for(;e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function fe(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function pe(e){return e.classList?fe(e.classList):(e.getAttribute("class")||"").split(" ").filter((e=>e))}function ge(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function me(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";")),"")}function ve(e){return e.size!==he.size||e.x!==he.x||e.y!==he.y||e.rotate!==he.rotate||e.flipX||e.flipY}function ye(){const e="fa",t=M,n=le.cssPrefix,r=le.replacementClass;let i=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}';if(n!==e||r!==t){const s=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),o=new RegExp("\\.".concat(t),"g");i=i.replace(s,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(o,".".concat(r))}return i}let be=!1;function Ee(){le.autoAddCss&&!be&&(function(e){if(!e||!m)return;const t=f.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=f.head.childNodes;let r=null;for(let e=n.length-1;e>-1;e--){const t=n[e],i=(t.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=t)}f.head.insertBefore(t,r)}(ye()),be=!0)}var Te={mixout(){return{dom:{css:ye,insertCss:Ee}}},hooks(){return{beforeDOMElementCreation(){Ee()},beforeI2svg(){Ee()}}}};const Se=d||{};Se[D]||(Se[D]={}),Se[D].styles||(Se[D].styles={}),Se[D].hooks||(Se[D].hooks={}),Se[D].shims||(Se[D].shims=[]);var we=Se[D];const _e=[],Ae=function(){f.removeEventListener("DOMContentLoaded",Ae),ke=1,_e.map((e=>e()))};let ke=!1;function Le(e){const{tag:t,attributes:n={},children:r=[]}=e;return"string"==typeof e?ge(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,'="').concat(ge(e[n]),'" ')),"").trim()}(n),">").concat(r.map(Le).join(""),"</").concat(t,">")}function Ce(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}m&&(ke=(f.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(f.readyState),ke||f.addEventListener("DOMContentLoaded",Ae));var Re=function(e,t,n,r){var i,s,a,o=Object.keys(e),l=o.length,u=void 0!==r?function(e,t){return function(n,r,i,s){return e.call(t,n,r,i,s)}}(t,r):t;for(void 0===n?(i=1,a=e[o[0]]):(i=0,a=n);i<l;i++)a=u(a,e[s=o[i]],s,e);return a};function Ie(e){const t=function(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}(e);return 1===t.length?t[0].toString(16):null}function xe(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return r.icon?t[r.iconName]=r.icon:t[n]=r,t}),{})}function Pe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipHooks:r=!1}=n,i=xe(t);"function"!=typeof we.hooks.addPack||r?we.styles[e]=s(s({},we.styles[e]||{}),i):we.hooks.addPack(e,xe(t)),"fas"===e&&Pe("fa",t)}const{styles:De,shims:Oe}=we,Me=Object.keys(q),Ne=Me.reduce(((e,t)=>(e[t]=Object.keys(q[t]),e)),{});let Fe=null,Be={},Ue={},$e={},He={},Ge={};const je=()=>{const e=e=>Re(De,((t,n,r)=>(t[r]=Re(n,e,{}),t)),{});Be=e(((e,t,n)=>(t[3]&&(e[t[3]]=n),t[2]&&t[2].filter((e=>"number"==typeof e)).forEach((t=>{e[t.toString(16)]=n})),e))),Ue=e(((e,t,n)=>(e[n]=n,t[2]&&t[2].filter((e=>"string"==typeof e)).forEach((t=>{e[t]=n})),e))),Ge=e(((e,t,n)=>{const r=t[2];return e[n]=n,r.forEach((t=>{e[t]=n})),e}));const t="far"in De||le.autoFetchSvg,n=Re(Oe,((e,n)=>{const r=n[0];let i=n[1];const s=n[2];return"far"!==i||t||(i="fas"),"string"==typeof r&&(e.names[r]={prefix:i,iconName:s}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:i,iconName:s}),e}),{names:{},unicodes:{}});$e=n.names,He=n.unicodes,Fe=qe(le.styleDefault,{family:le.familyDefault})};var Ve;function ze(e,t){return(Be[e]||{})[t]}function Ke(e,t){return(Ge[e]||{})[t]}function We(e){return $e[e]||{prefix:null,iconName:null}}function Ye(){return Fe}function qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{family:n=E}=t,r=z[n][e];if(n===T&&!e)return"fad";const i=W[n][e]||W[n][r],s=e in we.styles?e:null;return i||s||null}function Xe(e){return e.sort().filter(((e,t,n)=>n.indexOf(e)===t))}function Qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const i=R.concat(L),a=Xe(e.filter((e=>i.includes(e)))),o=Xe(e.filter((e=>!R.includes(e)))),l=a.filter((e=>(r=e,!b.includes(e)))),[u=null]=l,c=function(e){let t=E;const n=Me.reduce(((e,t)=>(e[t]="".concat(le.cssPrefix,"-").concat(t),e)),{});return S.forEach((r=>{(e.includes(n[r])||e.some((e=>Ne[r].includes(e))))&&(t=r)})),t}(a),h=s(s({},function(e){let t=[],n=null;return e.forEach((e=>{const r=function(e,t){const n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r!==e||""===i||(s=i,~ie.indexOf(s))?null:i;var s}(le.cssPrefix,e);r?n=r:e&&t.push(e)})),{iconName:n,rest:t}}(o)),{},{prefix:qe(u,{family:c})});return s(s(s({},h),function(e){const{values:t,family:n,canonical:r,givenPrefix:i="",styles:s={},config:a={}}=e,o=n===T,l=t.includes("fa-duotone")||t.includes("fad"),u="duotone"===a.familyDefault,c="fad"===r.prefix||"fa-duotone"===r.prefix;if(!o&&(l||u||c)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&Ze.includes(n)&&(Object.keys(s).find((e=>Je.includes(e)))||a.autoFetchSvg)){const e=w.get(n).defaultShortPrefixId;r.prefix=e,r.iconName=Ke(r.prefix,r.iconName)||r.iconName}return"fa"!==r.prefix&&"fa"!==i||(r.prefix=Ye()||"fas"),r}({values:e,family:c,styles:De,config:le,canonical:h,givenPrefix:r})),function(e,t,n){let{prefix:r,iconName:i}=n;if(e||!r||!i)return{prefix:r,iconName:i};const s="fa"===t?We(i):{},a=Ke(r,i);return i=s.iconName||a||i,r=s.prefix||r,"far"!==r||De.far||!De.fas||le.autoFetchSvg||(r="fas"),{prefix:r,iconName:i}}(n,r,h))}Ve=e=>{Fe=qe(e.styleDefault,{family:le.familyDefault})},ue.push(Ve),je();const Ze=S.filter((e=>e!==E||e!==T)),Je=Object.keys(C).filter((e=>e!==E)).map((e=>Object.keys(C[e]))).flat();let et=[],tt={};const nt={},rt=Object.keys(nt);function it(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return(tt[e]||[]).forEach((e=>{t=e.apply(null,[t,...r])})),t}function st(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(tt[e]||[]).forEach((e=>{e.apply(null,n)}))}function at(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return nt[e]?nt[e].apply(null,t):void 0}function ot(e){"fa"===e.prefix&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Ye();if(t)return t=Ke(n,t)||t,Ce(lt.definitions,n,t)||Ce(we.styles,n,t)}const lt=new class{constructor(){this.definitions={}}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(this._pullDefinitions,{});Object.keys(r).forEach((e=>{this.definitions[e]=s(s({},this.definitions[e]||{}),r[e]),Pe(e,r[e]);const t=q[E][e];t&&Pe(t,r[e]),je()}))}reset(){this.definitions={}}_pullDefinitions(e,t){const n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map((t=>{const{prefix:r,iconName:i,icon:s}=n[t],a=s[2];e[r]||(e[r]={}),a.length>0&&a.forEach((t=>{"string"==typeof t&&(e[r][t]=s)})),e[r][i]=s})),e}},ut={i2svg:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m?(st("beforeI2svg",e),at("pseudoElements2svg",e),at("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;var n;!1===le.autoReplaceSvg&&(le.autoReplaceSvg=!0),le.observeMutations=!0,n=()=>{dt({autoReplaceSvgRoot:t}),st("watch",e)},m&&(ke?setTimeout(n,0):_e.push(n))}},ct={icon:e=>{if(null===e)return null;if("object"==typeof e&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ke(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){const t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=qe(e[0]);return{prefix:n,iconName:Ke(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(le.cssPrefix,"-"))>-1||e.match(Q))){const t=Qe(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Ye(),iconName:Ke(t.prefix,t.iconName)||t.iconName}}if("string"==typeof e){const t=Ye();return{prefix:t,iconName:Ke(t,e)||e}}}},ht={noAuto:()=>{le.autoReplaceSvg=!1,le.observeMutations=!1,st("noAuto")},config:le,dom:ut,parse:ct,library:lt,findIconDefinition:ot,toHtml:Le},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t=f}=e;(Object.keys(we.styles).length>0||le.autoFetchSvg)&&m&&le.autoReplaceSvg&&ht.dom.i2svg({node:t})};function ft(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((e=>Le(e)))}}),Object.defineProperty(e,"node",{get:function(){if(!m)return;const t=f.createElement("div");return t.innerHTML=e.html,t.children}}),e}function pt(e){const{icons:{main:t,mask:n},prefix:r,iconName:i,transform:a,symbol:o,title:l,maskId:u,titleId:c,extra:h,watchable:d=!1}=e,{width:f,height:p}=n.found?n:t,g=A.includes(r),m=[le.replacementClass,i?"".concat(le.cssPrefix,"-").concat(i):""].filter((e=>-1===h.classes.indexOf(e))).filter((e=>""!==e||!!e)).concat(h.classes).join(" ");let v={children:[],attributes:s(s({},h.attributes),{},{"data-prefix":r,"data-icon":i,class:m,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(f," ").concat(p)})};const y=g&&!~h.classes.indexOf("fa-fw")?{width:"".concat(f/p*16*.0625,"em")}:{};d&&(v.attributes[N]=""),l&&(v.children.push({tag:"title",attributes:{id:v.attributes["aria-labelledby"]||"title-".concat(c||de())},children:[l]}),delete v.attributes.title);const b=s(s({},v),{},{prefix:r,iconName:i,main:t,mask:n,maskId:u,transform:a,symbol:o,styles:s(s({},y),h.styles)}),{children:E,attributes:T}=n.found&&t.found?at("generateAbstractMask",b)||{children:[],attributes:{}}:at("generateAbstractIcon",b)||{children:[],attributes:{}};return b.children=E,b.attributes=T,o?function(e){let{prefix:t,iconName:n,children:r,attributes:i,symbol:a}=e;const o=!0===a?"".concat(t,"-").concat(le.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s(s({},i),{},{id:o}),children:r}]}]}(b):function(e){let{children:t,main:n,mask:r,attributes:i,styles:a,transform:o}=e;if(ve(o)&&n.found&&!r.found){const{width:e,height:t}=n,r={x:e/t/2,y:.5};i.style=me(s(s({},a),{},{"transform-origin":"".concat(r.x+o.x/16,"em ").concat(r.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(b)}function gt(e){const{content:t,width:n,height:r,transform:i,title:a,extra:o,watchable:l=!1}=e,u=s(s(s({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});l&&(u[N]="");const c=s({},o.styles);ve(i)&&(c.transform=function(e){let{transform:t,width:n=O,height:r=O,startCentered:i=!1}=e,s="";return s+=i&&v?"translate(".concat(t.x/ce-n/2,"em, ").concat(t.y/ce-r/2,"em) "):i?"translate(calc(-50% + ".concat(t.x/ce,"em), calc(-50% + ").concat(t.y/ce,"em)) "):"translate(".concat(t.x/ce,"em, ").concat(t.y/ce,"em) "),s+="scale(".concat(t.size/ce*(t.flipX?-1:1),", ").concat(t.size/ce*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}({transform:i,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const h=me(c);h.length>0&&(u.style=h);const d=[];return d.push({tag:"span",attributes:u,children:[t]}),a&&d.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),d}const{styles:mt}=we;function vt(e){const t=e[0],n=e[1],[r]=e.slice(4);let i=null;return i=Array.isArray(r)?{tag:"g",attributes:{class:"".concat(le.cssPrefix,"-").concat(te)},children:[{tag:"path",attributes:{class:"".concat(le.cssPrefix,"-").concat(re),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(le.cssPrefix,"-").concat(ne),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:i}}const yt={found:!1,width:512,height:512};function bt(e,t){let n=t;return"fa"===t&&null!==le.styleDefault&&(t=Ye()),new Promise(((r,i)=>{if("fa"===n){const n=We(e)||{};e=n.iconName||e,t=n.prefix||t}if(e&&t&&mt[t]&&mt[t][e])return r(vt(mt[t][e]));!function(e,t){G||le.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(s(s({},yt),{},{icon:le.showMissingIcons&&e&&at("missingIconAbstract")||{}}))}))}const Et=()=>{},Tt=le.measurePerformance&&g&&g.mark&&g.measure?g:{mark:Et,measure:Et},St='FA "6.7.2"';var wt=e=>(Tt.mark("".concat(St," ").concat(e," begins")),()=>(e=>{Tt.mark("".concat(St," ").concat(e," ends")),Tt.measure("".concat(St," ").concat(e),"".concat(St," ").concat(e," begins"),"".concat(St," ").concat(e," ends"))})(e));const _t=()=>{};function At(e){return"string"==typeof(e.getAttribute?e.getAttribute(N):null)}function kt(e){return f.createElementNS("http://www.w3.org/2000/svg",e)}function Lt(e){return f.createElement(e)}function Ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{ceFn:n=("svg"===e.tag?kt:Lt)}=t;if("string"==typeof e)return f.createTextNode(e);const r=n(e.tag);return Object.keys(e.attributes||[]).forEach((function(t){r.setAttribute(t,e.attributes[t])})),(e.children||[]).forEach((function(e){r.appendChild(Ct(e,{ceFn:n}))})),r}const Rt={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach((e=>{t.parentNode.insertBefore(Ct(e),t)})),null===t.getAttribute(N)&&le.keepOriginalSource){let e=f.createComment(function(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}(t));t.parentNode.replaceChild(e,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~pe(t).indexOf(le.replacementClass))return Rt.replace(e);const r=new RegExp("".concat(le.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const e=n[0].attributes.class.split(" ").reduce(((e,t)=>(t===le.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e)),{toNode:[],toSvg:[]});n[0].attributes.class=e.toSvg.join(" "),0===e.toNode.length?t.removeAttribute("class"):t.setAttribute("class",e.toNode.join(" "))}const i=n.map((e=>Le(e))).join("\n");t.setAttribute(N,""),t.innerHTML=i}};function It(e){e()}function xt(e,t){const n="function"==typeof t?t:_t;if(0===e.length)n();else{let t=It;"async"===le.mutateApproach&&(t=d.requestAnimationFrame||It),t((()=>{const t=!0===le.autoReplaceSvg?Rt.replace:Rt[le.autoReplaceSvg]||Rt.replace,r=wt("mutate");e.map(t),r(),n()}))}}let Pt=!1;function Dt(){Pt=!0}function Ot(){Pt=!1}let Mt=null;function Nt(e){if(!p)return;if(!le.observeMutations)return;const{treeCallback:t=_t,nodeCallback:n=_t,pseudoElementsCallback:r=_t,observeMutationsRoot:i=f}=e;Mt=new p((e=>{if(Pt)return;const i=Ye();fe(e).forEach((e=>{if("childList"===e.type&&e.addedNodes.length>0&&!At(e.addedNodes[0])&&(le.searchPseudoElements&&r(e.target),t(e.target)),"attributes"===e.type&&e.target.parentNode&&le.searchPseudoElements&&r(e.target.parentNode),"attributes"===e.type&&At(e.target)&&~ee.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){const t=e.getAttribute?e.getAttribute(B):null,n=e.getAttribute?e.getAttribute(U):null;return t&&n}(e.target)){const{prefix:t,iconName:n}=Qe(pe(e.target));e.target.setAttribute(B,t||i),n&&e.target.setAttribute(U,n)}else(s=e.target)&&s.classList&&s.classList.contains&&s.classList.contains(le.replacementClass)&&n(e.target);var s}))})),m&&Mt.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Ft(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:i}=function(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"";let i=Qe(pe(e));return i.prefix||(i.prefix=Ye()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=(s=i.prefix,a=e.innerText,(Ue[s]||{})[a]||ze(i.prefix,Ie(e.innerText)))),!i.iconName&&le.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i;var s,a}(e),a=function(e){const t=fe(e.attributes).reduce(((e,t)=>("class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e)),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return le.autoA11y&&(n?t["aria-labelledby"]="".concat(le.replacementClass,"-title-").concat(r||de()):(t["aria-hidden"]="true",t.focusable="false")),t}(e),o=it("parseNodeAttributes",{},e);let l=t.styleParser?function(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce(((e,t)=>{const n=t.split(":"),r=n[0],i=n.slice(1);return r&&i.length>0&&(e[r]=i.join(":").trim()),e}),{})),n}(e):[];return s({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:he,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:i,styles:l,attributes:a}},o)}const{styles:Bt}=we;function Ut(e){const t="nest"===le.autoReplaceSvg?Ft(e,{styleParser:!1}):Ft(e);return~t.extra.classes.indexOf(Z)?at("generateLayersText",e,t):at("generateSvgReplacementMutation",e,t)}function $t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!m)return Promise.resolve();const n=f.documentElement.classList,r=e=>n.add("".concat($,"-").concat(e)),i=e=>n.remove("".concat($,"-").concat(e)),s=le.autoFetchSvg?[..._,...R]:b.concat(Object.keys(Bt));s.includes("fa")||s.push("fa");const a=[".".concat(Z,":not([").concat(N,"])")].concat(s.map((e=>".".concat(e,":not([").concat(N,"])")))).join(", ");if(0===a.length)return Promise.resolve();let o=[];try{o=fe(e.querySelectorAll(a))}catch(e){}if(!(o.length>0))return Promise.resolve();r("pending"),i("complete");const l=wt("onTree"),u=o.reduce(((e,t)=>{try{const n=Ut(t);n&&e.push(n)}catch(e){G||"MissingIcon"===e.name&&console.error(e)}return e}),[]);return new Promise(((e,n)=>{Promise.all(u).then((n=>{xt(n,(()=>{r("active"),r("complete"),i("pending"),"function"==typeof t&&t(),l(),e()}))})).catch((e=>{l(),n(e)}))}))}function Ht(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ut(e).then((e=>{e&&xt([e],t)}))}const Gt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=he,symbol:r=!1,mask:i=null,maskId:a=null,title:o=null,titleId:l=null,classes:u=[],attributes:c={},styles:h={}}=t;if(!e)return;const{prefix:d,iconName:f,icon:p}=e;return ft(s({type:"icon"},e),(()=>(st("beforeDOMElementCreation",{iconDefinition:e,params:t}),le.autoA11y&&(o?c["aria-labelledby"]="".concat(le.replacementClass,"-title-").concat(l||de()):(c["aria-hidden"]="true",c.focusable="false")),pt({icons:{main:vt(p),mask:i?vt(i.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:s(s({},he),n),symbol:r,title:o,maskId:a,titleId:l,extra:{attributes:c,styles:h,classes:u}}))))};var jt={mixout(){return{icon:(e=Gt,function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(t||{}).icon?t:ot(t||{});let{mask:i}=n;return i&&(i=(i||{}).icon?i:ot(i||{})),e(r,s(s({},n),{},{mask:i}))})};var e},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=$t,e.nodeCallback=Ht,e}}},provides(e){e.i2svg=function(e){const{node:t=f,callback:n=()=>{}}=e;return $t(t,n)},e.generateSvgReplacementMutation=function(e,t){const{iconName:n,title:r,titleId:i,prefix:s,transform:a,symbol:o,mask:l,maskId:u,extra:c}=t;return new Promise(((t,h)=>{Promise.all([bt(n,s),l.iconName?bt(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((l=>{let[h,d]=l;t([e,pt({icons:{main:h,mask:d},prefix:s,iconName:n,transform:a,symbol:o,maskId:u,title:r,titleId:i,extra:c,watchable:!0})])})).catch(h)}))},e.generateAbstractIcon=function(e){let{children:t,attributes:n,main:r,transform:i,styles:s}=e;const a=me(s);let o;return a.length>0&&(n.style=a),ve(i)&&(o=at("generateAbstractTransformGrouping",{main:r,transform:i,containerWidth:r.width,iconWidth:r.width})),t.push(o||r.icon),{children:t,attributes:n}}}},Vt={mixout(){return{layer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{classes:n=[]}=t;return ft({type:"layer"},(()=>{st("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e((e=>{Array.isArray(e)?e.map((e=>{r=r.concat(e.abstract)})):r=r.concat(e.abstract)})),[{tag:"span",attributes:{class:["".concat(le.cssPrefix,"-layers"),...n].join(" ")},children:r}]}))}}}},zt={mixout(){return{counter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{title:n=null,classes:r=[],attributes:i={},styles:a={}}=t;return ft({type:"counter",content:e},(()=>(st("beforeDOMElementCreation",{content:e,params:t}),function(e){const{content:t,title:n,extra:r}=e,i=s(s(s({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),a=me(r.styles);a.length>0&&(i.style=a);const o=[];return o.push({tag:"span",attributes:i,children:[t]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}({content:e.toString(),title:n,extra:{attributes:i,styles:a,classes:["".concat(le.cssPrefix,"-layers-counter"),...r]}}))))}}}},Kt={mixout(){return{text(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=he,title:r=null,classes:i=[],attributes:a={},styles:o={}}=t;return ft({type:"text",content:e},(()=>(st("beforeDOMElementCreation",{content:e,params:t}),gt({content:e,transform:s(s({},he),n),title:r,extra:{attributes:a,styles:o,classes:["".concat(le.cssPrefix,"-layers-text"),...i]}}))))}}},provides(e){e.generateLayersText=function(e,t){const{title:n,transform:r,extra:i}=t;let s=null,a=null;if(v){const t=parseInt(getComputedStyle(e).fontSize,10),n=e.getBoundingClientRect();s=n.width/t,a=n.height/t}return le.autoA11y&&!n&&(i.attributes["aria-hidden"]="true"),Promise.resolve([e,gt({content:e.innerHTML,width:s,height:a,transform:r,title:n,extra:i,watchable:!0})])}}};const Wt=new RegExp('"',"ug"),Yt=[1105920,1112319],qt=s(s(s(s({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),Xt=Object.keys(qt).reduce(((e,t)=>(e[t.toLowerCase()]=qt[t],e)),{}),Qt=Object.keys(Xt).reduce(((e,t)=>{const n=Xt[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e}),{});function Zt(e,t){const n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(((r,i)=>{if(null!==e.getAttribute(n))return r();const a=fe(e.children).filter((e=>e.getAttribute(F)===t))[0],o=d.getComputedStyle(e,t),l=o.getPropertyValue("font-family"),u=l.match(J),c=o.getPropertyValue("font-weight"),h=o.getPropertyValue("content");if(a&&!u)return e.removeChild(a),r();if(u&&"none"!==h&&""!==h){const h=o.getPropertyValue("content");let d=function(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(Xt[n]||{})[i]||Qt[n]}(l,c);const{value:p,isSecondary:g}=function(e){const t=e.replace(Wt,""),n=function(e){const t=e.length;let n,r=e.charCodeAt(0);return r>=55296&&r<=56319&&t>1&&(n=e.charCodeAt(1),n>=56320&&n<=57343)?1024*(r-55296)+n-56320+65536:r}(t),r=n>=Yt[0]&&n<=Yt[1],i=2===t.length&&t[0]===t[1];return{value:Ie(i?t[0]:t),isSecondary:r||i}}(h),m=u[0].startsWith("FontAwesome");let v=ze(d,p),y=v;if(m){const e=function(e){const t=He[e],n=ze("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}(p);e.iconName&&e.prefix&&(v=e.iconName,d=e.prefix)}if(!v||g||a&&a.getAttribute(B)===d&&a.getAttribute(U)===y)r();else{e.setAttribute(n,y),a&&e.removeChild(a);const o={iconName:null,title:null,titleId:null,prefix:null,transform:he,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},{extra:l}=o;l.attributes[F]=t,bt(v,d).then((i=>{const a=pt(s(s({},o),{},{icons:{main:i,mask:{prefix:null,iconName:null,rest:[]}},prefix:d,iconName:y,extra:l,watchable:!0})),u=f.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(u,e.firstChild):e.appendChild(u),u.outerHTML=a.map((e=>Le(e))).join("\n"),e.removeAttribute(n),r()})).catch(i)}}else r()}))}function Jt(e){return Promise.all([Zt(e,"::before"),Zt(e,"::after")])}function en(e){return!(e.parentNode===document.head||~H.indexOf(e.tagName.toUpperCase())||e.getAttribute(F)||e.parentNode&&"svg"===e.parentNode.tagName)}function tn(e){if(m)return new Promise(((t,n)=>{const r=fe(e.querySelectorAll("*")).filter(en).map(Jt),i=wt("searchPseudoElements");Dt(),Promise.all(r).then((()=>{i(),Ot(),t()})).catch((()=>{i(),Ot(),n()}))}))}var nn={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=tn,e}}},provides(e){e.pseudoElements2svg=function(e){const{node:t=f}=e;le.searchPseudoElements&&tn(t)}}};let rn=!1;var sn={mixout(){return{dom:{unwatch(){Dt(),rn=!0}}}},hooks(){return{bootstrap(){Nt(it("mutationObserverCallbacks",{}))},noAuto(){Mt&&Mt.disconnect()},watch(e){const{observeMutationsRoot:t}=e;rn?Ot():Nt(it("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const an=e=>e.toLowerCase().split(" ").reduce(((e,t)=>{const n=t.toLowerCase().split("-"),r=n[0];let i=n.slice(1).join("-");if(r&&"h"===i)return e.flipX=!0,e;if(r&&"v"===i)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(r){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0});var on={mixout(){return{parse:{transform:e=>an(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=an(n)),e}}},provides(e){e.generateAbstractTransformGrouping=function(e){let{main:t,transform:n,containerWidth:r,iconWidth:i}=e;const a={transform:"translate(".concat(r/2," 256)")},o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),l="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),u="rotate(".concat(n.rotate," 0 0)"),c={outer:a,inner:{transform:"".concat(o," ").concat(l," ").concat(u)},path:{transform:"translate(".concat(i/2*-1," -256)")}};return{tag:"g",attributes:s({},c.outer),children:[{tag:"g",attributes:s({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:s(s({},t.icon.attributes),c.path)}]}]}}}};const ln={x:0,y:0,width:"100%",height:"100%"};function un(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var cn={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?Qe(n.split(" ").map((e=>e.trim()))):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Ye()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides(e){e.generateAbstractMask=function(e){let{children:t,attributes:n,main:r,mask:i,maskId:a,transform:o}=e;const{width:l,icon:u}=r,{width:c,icon:h}=i,d=function(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const i={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),o="rotate(".concat(t.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(s," ").concat(a," ").concat(o)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:o,containerWidth:c,iconWidth:l}),f={tag:"rect",attributes:s(s({},ln),{},{fill:"white"})},p=u.children?{children:u.children.map(un)}:{},g={tag:"g",attributes:s({},d.inner),children:[un(s({tag:u.tag,attributes:s(s({},u.attributes),d.path)},p))]},m={tag:"g",attributes:s({},d.outer),children:[g]},v="mask-".concat(a||de()),y="clip-".concat(a||de()),b={tag:"mask",attributes:s(s({},ln),{},{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,m]},E={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(T=h,"g"===T.tag?T.children:[T])},b]};var T;return t.push(E,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(v,")")},ln)}),{children:t,attributes:n}}}},hn={provides(e){let t=!1;d.matchMedia&&(t=d.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:s(s({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const i=s(s({},r),{},{attributeName:"opacity"}),a={tag:"circle",attributes:s(s({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||a.children.push({tag:"animate",attributes:s(s({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:s(s({},i),{},{values:"1;0;1;1;0;1;"})}),e.push(a),e.push({tag:"path",attributes:s(s({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:s(s({},i),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:s(s({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:s(s({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){let{mixoutsTo:n}=t;et=e,tt={},Object.keys(nt).forEach((e=>{-1===rt.indexOf(e)&&delete nt[e]})),et.forEach((e=>{const t=e.mixout?e.mixout():{};if(Object.keys(t).forEach((e=>{"function"==typeof t[e]&&(n[e]=t[e]),"object"==typeof t[e]&&Object.keys(t[e]).forEach((r=>{n[e]||(n[e]={}),n[e][r]=t[e][r]}))})),e.hooks){const t=e.hooks();Object.keys(t).forEach((e=>{tt[e]||(tt[e]=[]),tt[e].push(t[e])}))}e.provides&&e.provides(nt)}))}([Te,jt,Vt,zt,Kt,nn,sn,on,cn,hn,{hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}}}}],{mixoutsTo:ht});const dn=ht.parse,fn=ht.icon;var pn=n(9067),gn=n.n(pn),mn=n(4041);function vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(n),!0).forEach((function(t){En(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(e){return function(e){if(Array.isArray(e))return Sn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wn(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1);var t}var _n=["style"],An=!1;try{An=!0}catch(e){}function kn(e){return e&&"object"===bn(e)&&e.prefix&&e.iconName&&e.icon?e:dn.icon?dn.icon(e):null===e?null:e&&"object"===bn(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function Ln(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?En({},e,t):{}}var Cn={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},Rn=mn.forwardRef((function(e,t){var n=yn(yn({},Cn),e),r=n.icon,i=n.mask,s=n.symbol,a=n.className,o=n.title,l=n.titleId,u=n.maskId,c=kn(r),h=Ln("classes",[].concat(Tn(function(e){var t,n=e.beat,r=e.fade,i=e.beatFade,s=e.bounce,a=e.shake,o=e.flash,l=e.spin,u=e.spinPulse,c=e.spinReverse,h=e.pulse,d=e.fixedWidth,f=e.inverse,p=e.border,g=e.listItem,m=e.flip,v=e.size,y=e.rotation,b=e.pull,E=(En(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":s,"fa-shake":a,"fa-flash":o,"fa-spin":l,"fa-spin-reverse":c,"fa-spin-pulse":u,"fa-pulse":h,"fa-fw":d,"fa-inverse":f,"fa-border":p,"fa-li":g,"fa-flip":!0===m,"fa-flip-horizontal":"horizontal"===m||"both"===m,"fa-flip-vertical":"vertical"===m||"both"===m},"fa-".concat(v),null!=v),En(t,"fa-rotate-".concat(y),null!=y&&0!==y),En(t,"fa-pull-".concat(b),null!=b),En(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(E).map((function(e){return E[e]?e:null})).filter((function(e){return e}))}(n)),Tn((a||"").split(" ")))),d=Ln("transform","string"==typeof n.transform?dn.transform(n.transform):n.transform),f=Ln("mask",kn(i)),p=fn(c,yn(yn(yn(yn({},h),d),f),{},{symbol:s,title:o,titleId:l,maskId:u}));if(!p)return function(){var e;!An&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",c),null;var g=p.abstract,m={ref:t};return Object.keys(n).forEach((function(e){Cn.hasOwnProperty(e)||(m[e]=n[e])})),In(g[0],m)}));Rn.displayName="FontAwesomeIcon",Rn.propTypes={beat:gn().bool,border:gn().bool,beatFade:gn().bool,bounce:gn().bool,className:gn().string,fade:gn().bool,flash:gn().bool,mask:gn().oneOfType([gn().object,gn().array,gn().string]),maskId:gn().string,fixedWidth:gn().bool,inverse:gn().bool,flip:gn().oneOf([!0,!1,"horizontal","vertical","both"]),icon:gn().oneOfType([gn().object,gn().array,gn().string]),listItem:gn().bool,pull:gn().oneOf(["right","left"]),pulse:gn().bool,rotation:gn().oneOf([0,90,180,270]),shake:gn().bool,size:gn().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:gn().bool,spinPulse:gn().bool,spinReverse:gn().bool,symbol:gn().oneOfType([gn().bool,gn().string]),title:gn().string,titleId:gn().string,transform:gn().oneOfType([gn().string,gn().object]),swapOpacity:gn().bool};var In=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return e(t,n)})),s=Object.keys(n.attributes||{}).reduce((function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=r.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n,r=t.indexOf(":"),i=wn(t.slice(0,r)),s=t.slice(r+1).trim();return i.startsWith("webkit")?e[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=s:e[i]=s,e}),{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[wn(t)]=r}return e}),{attrs:{}}),a=r.style,o=void 0===a?{}:a,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,_n);return s.attrs.style=yn(yn({},s.attrs.style),o),t.apply(void 0,[n.tag,yn(yn({},s.attrs),l)].concat(Tn(i)))}.bind(null,mn.createElement)},4495:function(e,t,n){var r=n(8942);e.exports=function(){return r.Date.now()}},4535:function(e){e.exports=function(){return!1}},4558:function(e,t,n){"use strict";n.d(t,{XU:function(){return f},ib:function(){return p},zR:function(){return d},YK:function(){return h}});var r,i,s=n(5608),a=n(4041),o=n(8867);!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(r||(r={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(i||(i={}));var l=function(e){var t=(0,o.A)(),n=e.value,r=e.children,i=(0,s.Tt)(e,["value","children"]);return r(t.formatNumberToParts(n,i))};function u(e){var t=function(t){var n=(0,o.A)(),r=t.value,i=t.children,a=(0,s.Tt)(t,["value","children"]),l="string"==typeof r?new Date(r||0):r;return i("formatDate"===e?n.formatDateToParts(l,a):n.formatTimeToParts(l,a))};return t.displayName=i[e],t}function c(e){var t=function(t){var n=(0,o.A)(),r=t.value,i=t.children,l=(0,s.Tt)(t,["value","children"]),u=n[e](r,l);if("function"==typeof i)return i(u);var c=n.textComponent||a.Fragment;return a.createElement(c,null,u)};return t.displayName=r[e],t}function h(e){return e}function d(e){return e}l.displayName="FormattedNumberParts",l.displayName="FormattedNumberParts";var f=c("formatDate"),p=c("formatTime");c("formatNumber"),c("formatList"),c("formatDisplayName"),u("formatDate"),u("formatTime")},4586:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1369);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4609:function(e,t,n){"use strict";n.d(t,{kL:function(){return r}}),n(986),n(8138);const r=(e,t,n,r,i)=>{const s={cover:!1,...i};if(!e||e<=0||!t||t<=0)return{width:0,height:0,ratio:1};const a=Math.round(n||e)/e,o=Math.round(r||t)/t,l=s.cover?Math.max(a,o):Math.min(a,o);return{width:Math.round(e*l),height:Math.round(t*l),scale:l}},{attachEvent:i=null}="undefined"!=typeof document&&document||{};"undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame),("undefined"!=typeof window?window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame:null)||clearTimeout;let s=!1,a="",o="animationstart";const l="Webkit Moz O ms".split(" "),u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");let c="";const h="undefined"!=typeof document?document.createElement("fakeelement"):null;if(null!==h&&void 0!==h.style.animationName&&(s=!0),!1===s)for(let e=0;e<l.length;e+=1)if(null!==h&&void 0!==h.style[`${l[e]}AnimationName`]){c=l[e],a=`-${c.toLowerCase()}-`,o=u[e],s=!0;break}},4619:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(6284),i=n(7985);function s(e){return function(e){if(Array.isArray(e))return(0,r.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},4625:function(e,t,n){"use strict";n.d(t,{Fi:function(){return I},Kz:function(){return D},Ot:function(){return w},Y4:function(){return P},_z:function(){return C},ik:function(){return _},r6:function(){return x},uI:function(){return A},wk:function(){return R}});var r=n(1085),i=n(4041),s=n(3373),a=n(4e3),o=Object.defineProperty,l=Object.defineProperties,u=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&f(e,n,t[n]);if(c)for(var n of c(t))d.call(t,n)&&f(e,n,t[n]);return e},g=(e,t)=>l(e,u(t)),m=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&c)for(var r of c(e))t.indexOf(r)<0&&d.call(e,r)&&(n[r]=e[r]);return n};function v(e){return t=>{var n=t,{bgStyle:i={},borderRadius:s=0,iconFillColor:a="white",round:o=!1,size:l=64}=n,u=m(n,["bgStyle","borderRadius","iconFillColor","round","size"]);return(0,r.jsxs)("svg",g(p({viewBox:"0 0 64 64",width:l,height:l},u),{children:[o?(0,r.jsx)("circle",{cx:"32",cy:"32",r:"32",fill:e.color,style:i}):(0,r.jsx)("rect",{width:"64",height:"64",rx:s,ry:s,fill:e.color,style:i}),(0,r.jsx)("path",{d:e.path,fill:a})]}))}}v({color:"#1185FE",path:"M21.945 18.886C26.015 21.941 30.393 28.137 32 31.461 33.607 28.137 37.985 21.941 42.055 18.886 44.992 16.681 49.75 14.975 49.75 20.403 49.75 21.487 49.128 29.51 48.764 30.813 47.497 35.341 42.879 36.496 38.772 35.797 45.951 37.019 47.778 41.067 43.833 45.114 36.342 52.801 33.066 43.186 32.227 40.722 32.073 40.27 32.001 40.059 32 40.238 31.999 40.059 31.927 40.27 31.773 40.722 30.934 43.186 27.658 52.801 20.167 45.114 16.222 41.067 18.049 37.019 25.228 35.797 21.121 36.496 16.503 35.341 15.236 30.813 14.872 29.51 14.25 21.487 14.25 20.403 14.25 14.975 19.008 16.681 21.945 18.886Z"});class y extends Error{constructor(e){super(e),this.name="AssertionError"}}function b(e,t){if(!e)throw new y(t)}function E(e){const t=Object.entries(e).filter((([,e])=>null!=e)).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`));return t.length>0?`?${t.join("&")}`:""}function T(e){var t=e,{beforeOnClick:n,children:i,className:a,disabled:o,disabledStyle:l={opacity:.6},forwardedRef:u,htmlTitle:c,networkLink:h,networkName:d,onClick:f,onShareWindowClose:v,openShareDialogOnClick:y=!0,opts:b,resetButtonStyle:E=!0,style:T,title:S,url:w,windowHeight:_=400,windowPosition:A="windowCenter",windowWidth:k=550}=t,L=m(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","htmlTitle","networkLink","networkName","onClick","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","title","url","windowHeight","windowPosition","windowWidth"]);const C=s("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},a),R=p(p(E?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},T),o&&l);return(0,r.jsx)("button",g(p({},L),{className:C,onClick:async e=>{const t=h(w,b);if(!o){if(e.preventDefault(),n){const e=n();(r=e)&&("object"==typeof r||"function"==typeof r)&&"then"in r&&"function"==typeof r.then&&await e}var r,i,s;y&&function(e,t,n){var r=t,{height:i,width:s}=r,a=m(r,["height","width"]);const o=p({height:i,width:s,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},a),l=window.open(e,"",Object.keys(o).map((e=>`${e}=${o[e]}`)).join(", "));if(n){const e=window.setInterval((()=>{try{(null===l||l.closed)&&(window.clearInterval(e),n(l))}catch(e){console.error(e)}}),1e3)}}(t,p({height:_,width:k},"windowCenter"===A?(i=k,s=_,{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-i/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-s/2}):((e,t)=>({top:(window.screen.height-t)/2,left:(window.screen.width-e)/2}))(k,_)),v),f&&f(e,t)}},ref:u,style:R,title:c,children:i}))}function S(e,t,n,s){const a=(i,a)=>{const o=n(i),l=p({},i);return Object.keys(o).forEach((e=>{delete l[e]})),(0,r.jsx)(T,g(p(p({},s),l),{forwardedRef:a,networkName:e,networkLink:t,opts:o}))};return a.displayName=`ShareButton-${e}`,(0,i.forwardRef)(a)}S("bluesky",(function(e,{title:t,separator:n}){return b(e,"bluesky.url"),"https://bsky.app/intent/compose"+E({text:t?t+n+e:e})}),(e=>({title:e.title,separator:e.separator||" "})),{windowWidth:660,windowHeight:460,windowPosition:"windowCenter"}),v({color:"#7f7f7f",path:"M17,22v20h30V22H17z M41.1,25L32,32.1L22.9,25H41.1z M20,39V26.6l12,9.3l12-9.3V39H20z"});const w=S("email",(function(e,{subject:t,body:n,separator:r}){return"mailto:"+E({subject:t,body:n?n+r+e:e})}),(e=>({subject:e.subject,body:e.body,separator:e.separator||" "})),{openShareDialogOnClick:!1,onClick:(e,t)=>{window.location.href=t}}),_=v({color:"#0965FE",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"});v({color:"#0A7CFF",path:"M 53.066406 21.871094 C 52.667969 21.339844 51.941406 21.179688 51.359375 21.496094 L 37.492188 29.058594 L 28.867188 21.660156 C 28.339844 21.207031 27.550781 21.238281 27.054688 21.730469 L 11.058594 37.726562 C 10.539062 38.25 10.542969 39.09375 11.0625 39.613281 C 11.480469 40.027344 12.121094 40.121094 12.640625 39.839844 L 26.503906 32.28125 L 35.136719 39.679688 C 35.667969 40.132812 36.457031 40.101562 36.949219 39.609375 L 52.949219 23.613281 C 53.414062 23.140625 53.464844 22.398438 53.066406 21.871094 Z M 53.066406 21.871094"}),S("facebookmessenger",(function(e,{appId:t,redirectUri:n,to:r}){return"https://www.facebook.com/dialog/send"+E({link:e,redirect_uri:n||e,app_id:t,to:r})}),(e=>({appId:e.appId,redirectUri:e.redirectUri,to:e.to})),{windowWidth:1e3,windowHeight:820});const A=S("facebook",(function(e,{hashtag:t}){return b(e,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+E({u:e,hashtag:t})}),(e=>({hashtag:e.hashtag})),{windowWidth:550,windowHeight:400});function k(e){var t=e,{children:n=e=>e,className:a,getCount:o,url:l}=t,u=m(t,["children","className","getCount","url"]);const c=function(){const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,i.useCallback)((()=>e.current),[])}(),[h,d]=(0,i.useState)(void 0),[f,v]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{v(!0),o(l,(e=>{c()&&(d(e),v(!1))}))}),[l]),(0,r.jsx)("span",g(p({className:s("react-share__ShareCount",a)},u),{children:!f&&void 0!==h&&n(h)}))}function L(e){const t=t=>(0,r.jsx)(k,p({getCount:e},t));return t.displayName=`ShareCount(${e.name})`,t}L((function(e,t){a(`https://graph.facebook.com/?id=${e}&fields=og_object{engagement}`,((e,n)=>{t(!e&&n&&n.og_object&&n.og_object.engagement?n.og_object.engagement.count:void 0)}))})),v({color:"#009ad9",path:"M 36.164062 33.554688 C 34.988281 32.234375 33.347656 31.5 31.253906 31.34375 C 33.125 30.835938 34.476562 30.09375 35.335938 29.09375 C 36.191406 28.09375 36.609375 26.78125 36.609375 25.101562 C 36.628906 23.875 36.332031 22.660156 35.75 21.578125 C 35.160156 20.558594 34.292969 19.71875 33.253906 19.160156 C 32.304688 18.640625 31.175781 18.265625 29.847656 18.042969 C 28.523438 17.824219 26.195312 17.730469 22.867188 17.730469 L 14.769531 17.730469 L 14.769531 47.269531 L 23.113281 47.269531 C 26.46875 47.269531 28.886719 47.15625 30.367188 46.929688 C 31.851562 46.695312 33.085938 46.304688 34.085938 45.773438 C 35.289062 45.148438 36.28125 44.179688 36.933594 42.992188 C 37.597656 41.796875 37.933594 40.402344 37.933594 38.816406 C 37.933594 36.621094 37.347656 34.867188 36.164062 33.554688 Z M 22.257812 24.269531 L 23.984375 24.269531 C 25.988281 24.269531 27.332031 24.496094 28.015625 24.945312 C 28.703125 25.402344 29.042969 26.183594 29.042969 27.285156 C 29.042969 28.390625 28.664062 29.105469 27.9375 29.550781 C 27.210938 29.992188 25.84375 30.199219 23.855469 30.199219 L 22.257812 30.199219 Z M 29.121094 41.210938 C 28.328125 41.691406 26.976562 41.925781 25.078125 41.925781 L 22.257812 41.925781 L 22.257812 35.488281 L 25.195312 35.488281 C 27.144531 35.488281 28.496094 35.738281 29.210938 36.230469 C 29.925781 36.726562 30.304688 37.582031 30.304688 38.832031 C 30.304688 40.078125 29.914062 40.742188 29.105469 41.222656 Z M 29.121094 41.210938 M 46.488281 39.792969 C 44.421875 39.792969 42.742188 41.46875 42.742188 43.535156 C 42.742188 45.605469 44.421875 47.28125 46.488281 47.28125 C 48.554688 47.28125 50.230469 45.605469 50.230469 43.535156 C 50.230469 41.46875 48.554688 39.792969 46.488281 39.792969 Z M 46.488281 39.792969 M 43.238281 17.730469 L 49.738281 17.730469 L 49.738281 37.429688 L 43.238281 37.429688 Z M 43.238281 17.730469 "}),S("hatena",(function(e,{title:t}){return b(e,"hatena.url"),`http://b.hatena.ne.jp/add?mode=confirm&url=${e}&title=${t}`}),(e=>({title:e.title})),{windowWidth:660,windowHeight:460,windowPosition:"windowCenter"}),L((function(e,t){a("https://bookmark.hatenaapis.com/count/entry"+E({url:e}),((e,n)=>{t(null!=n?n:void 0)}))})),v({color:"#1F1F1F",path:"M35.688 43.012c0 2.425.361 2.785 3.912 3.056V48H24.401v-1.932c3.555-.27 3.912-.63 3.912-3.056V20.944c0-2.379-.36-2.785-3.912-3.056V16H39.6v1.888c-3.55.27-3.912.675-3.912 3.056v22.068h.001z"}),S("instapaper",(function(e,{title:t,description:n}){return b(e,"instapaper.url"),"http://www.instapaper.com/hello2"+E({url:e,title:t,description:n})}),(e=>({title:e.title,description:e.description})),{windowWidth:500,windowHeight:500,windowPosition:"windowCenter"}),v({color:"#00b800",path:"M52.62 30.138c0 3.693-1.432 7.019-4.42 10.296h.001c-4.326 4.979-14 11.044-16.201 11.972-2.2.927-1.876-.591-1.786-1.112l.294-1.765c.069-.527.142-1.343-.066-1.865-.232-.574-1.146-.872-1.817-1.016-9.909-1.31-17.245-8.238-17.245-16.51 0-9.226 9.251-16.733 20.62-16.733 11.37 0 20.62 7.507 20.62 16.733zM27.81 25.68h-1.446a.402.402 0 0 0-.402.401v8.985c0 .221.18.4.402.4h1.446a.401.401 0 0 0 .402-.4v-8.985a.402.402 0 0 0-.402-.401zm9.956 0H36.32a.402.402 0 0 0-.402.401v5.338L31.8 25.858a.39.39 0 0 0-.031-.04l-.002-.003-.024-.025-.008-.007a.313.313 0 0 0-.032-.026.255.255 0 0 1-.021-.014l-.012-.007-.021-.012-.013-.006-.023-.01-.013-.005-.024-.008-.014-.003-.023-.005-.017-.002-.021-.003-.021-.002h-1.46a.402.402 0 0 0-.402.401v8.985c0 .221.18.4.402.4h1.446a.401.401 0 0 0 .402-.4v-5.337l4.123 5.568c.028.04.063.072.101.099l.004.003a.236.236 0 0 0 .025.015l.012.006.019.01a.154.154 0 0 1 .019.008l.012.004.028.01.005.001a.442.442 0 0 0 .104.013h1.446a.4.4 0 0 0 .401-.4v-8.985a.402.402 0 0 0-.401-.401zm-13.442 7.537h-3.93v-7.136a.401.401 0 0 0-.401-.401h-1.447a.4.4 0 0 0-.401.401v8.984a.392.392 0 0 0 .123.29c.072.068.17.111.278.111h5.778a.4.4 0 0 0 .401-.401v-1.447a.401.401 0 0 0-.401-.401zm21.429-5.287c.222 0 .401-.18.401-.402v-1.446a.401.401 0 0 0-.401-.402h-5.778a.398.398 0 0 0-.279.113l-.005.004-.006.008a.397.397 0 0 0-.111.276v8.984c0 .108.043.206.112.278l.005.006a.401.401 0 0 0 .284.117h5.778a.4.4 0 0 0 .401-.401v-1.447a.401.401 0 0 0-.401-.401h-3.93v-1.519h3.93c.222 0 .401-.18.401-.402V29.85a.401.401 0 0 0-.401-.402h-3.93V27.93h3.93z"}),S("line",(function(e,{title:t}){return b(e,"line.url"),"https://social-plugins.line.me/lineit/share"+E({url:e,text:t})}),(e=>({title:e.title})),{windowWidth:500,windowHeight:500});const C=v({color:"#0077B5",path:"M20.4,44h5.4V26.6h-5.4V44z M23.1,18c-1.7,0-3.1,1.4-3.1,3.1c0,1.7,1.4,3.1,3.1,3.1 c1.7,0,3.1-1.4,3.1-3.1C26.2,19.4,24.8,18,23.1,18z M39.5,26.2c-2.6,0-4.4,1.4-5.1,2.8h-0.1v-2.4h-5.2V44h5.4v-8.6 c0-2.3,0.4-4.5,3.2-4.5c2.8,0,2.8,2.6,2.8,4.6V44H46v-9.5C46,29.8,45,26.2,39.5,26.2z"}),R=S("linkedin",(function(e,{title:t,summary:n,source:r}){return b(e,"linkedin.url"),"https://linkedin.com/shareArticle"+E({url:e,mini:"true",title:t,summary:n,source:r})}),(({title:e,summary:t,source:n})=>({title:e,summary:t,source:n})),{windowWidth:750,windowHeight:600});v({color:"#21A5D8",path:"M18.3407821,28.1764706 L21.9441341,31.789916 L33.0055865,42.882353 C33.0055865,42.882353 33.0893855,42.9663866 33.0893855,42.9663866 L46.6648046,47 C46.6648046,47 46.6648046,47 46.7486034,47 C46.8324022,47 46.8324022,47 46.9162012,46.9159664 C47,46.8319327 47,46.8319327 47,46.7478991 L42.9776536,33.1344537 C42.9776536,33.1344537 42.9776536,33.1344537 42.8938548,33.0504202 L31.1620111,21.3697479 L31.1620111,21.3697479 L28.1452514,18.2605042 C27.3072626,17.4201681 26.5530726,17 25.7150838,17 C24.2905028,17 23.0335195,18.3445378 21.5251397,19.8571429 C21.273743,20.1092437 20.9385475,20.4453781 20.6871508,20.697479 C20.3519553,21.0336134 20.1005586,21.2857143 19.849162,21.5378151 C18.3407821,22.9663866 17.0837989,24.2268908 17,25.7394958 C17.0837989,26.4957983 17.5027933,27.3361345 18.3407821,28.1764706 Z M39.9012319,39.6134454 C39.7336341,39.4453781 39.4822374,37.6806724 40.2364275,36.8403362 C40.9906174,36.0840337 41.6610084,36 42.1638017,36 C42.3313995,36 42.4989973,36 42.5827961,36 L44.8453659,43.5630253 L43.5883828,44.8235295 L36.0464833,42.5546218 C35.9626843,42.2184874 35.8788855,41.2100841 36.8844722,40.2016807 C37.2196676,39.8655463 37.8900587,39.6134454 38.5604498,39.6134454 C39.147042,39.6134454 39.5660364,39.7815126 39.5660364,39.7815126 C39.6498353,39.8655463 39.8174331,39.8655463 39.8174331,39.7815126 C39.9850307,39.7815126 39.9850307,39.697479 39.9012319,39.6134454 Z"}),S("livejournal",(function(e,{title:t,description:n}){return b(e,"livejournal.url"),"https://www.livejournal.com/update.bml"+E({subject:t,event:n})}),(e=>({title:e.title,description:e.description})),{windowWidth:660,windowHeight:460}),v({color:"#168DE2",path:"M39.7107745,17 C41.6619755,17 43.3204965,18.732852 43.3204965,21.0072202 C43.3204965,23.2815885 41.7595357,25.0144404 39.7107745,25.0144404 C37.7595732,25.0144404 36.1010522,23.2815885 36.1010522,21.0072202 C36.1010522,18.732852 37.7595732,17 39.7107745,17 Z M24.3938451,17 C26.3450463,17 28.0035672,18.732852 28.0035672,21.0072202 C28.0035672,23.2815885 26.4426063,25.0144404 24.3938451,25.0144404 C22.4426439,25.0144404 20.7841229,23.2815885 20.7841229,21.0072202 C20.7841229,18.732852 22.4426439,17 24.3938451,17 Z M51.9057817,43.4259928 C51.7106617,44.0758123 51.4179815,44.6173285 50.9301812,44.9422383 C50.637501,45.1588448 50.2472607,45.267148 49.8570205,45.267148 C49.07654,45.267148 48.3936197,44.833935 48.0033795,44.0758123 L46.2472985,40.7184115 L45.759498,41.2599278 C42.5400162,44.9422383 37.466893,47 32.0035297,47 C26.5401664,47 21.5646034,44.9422383 18.2475614,41.2599278 L17.7597611,40.7184115 L16.00368,44.0758123 C15.6134398,44.833935 14.9305194,45.267148 14.1500389,45.267148 C13.7597986,45.267148 13.3695584,45.1588448 13.0768782,44.9422383 C12.0037176,44.2924187 11.7110374,42.7761733 12.2963978,41.5848375 L16.7841605,33.0288807 C17.1744007,32.270758 17.8573211,31.8375453 18.6378016,31.8375453 C19.0280418,31.8375453 19.4182821,31.9458485 19.7109623,32.1624548 C20.7841229,32.8122743 21.0768031,34.3285197 20.4914427,35.5198555 L20.1012025,36.2779783 L20.2963226,36.602888 C22.4426439,39.9602888 27.0279667,42.234657 31.9059697,42.234657 C36.7839727,42.234657 41.3692955,40.068592 43.5156167,36.602888 L43.7107367,36.2779783 L43.3204965,35.6281587 C43.0278165,35.0866425 42.9302562,34.436823 43.1253765,33.7870035 C43.3204965,33.137184 43.6131767,32.5956678 44.100977,32.270758 C44.3936572,32.0541515 44.7838975,31.9458485 45.1741377,31.9458485 C45.9546182,31.9458485 46.6375385,32.3790613 47.0277787,33.137184 L51.5155415,41.6931408 C52.003342,42.234657 52.100902,42.8844765 51.9057817,43.4259928 Z"}),S("mailru",(function(e,{title:t,description:n,imageUrl:r}){return b(e,"mailru.url"),"https://connect.mail.ru/share"+E({url:e,title:t,description:n,image_url:r})}),(e=>({title:e.title,description:e.description,imageUrl:e.imageUrl})),{windowWidth:660,windowHeight:460}),v({color:"#F97400",path:"M39,30c-1,0-3,2-7,2s-6-2-7-2c-1.1,0-2,0.9-2,2c0,1,0.6,1.5,1,1.7c1.2,0.7,5,2.3,5,2.3l-4.3,5.4 c0,0-0.8,0.9-0.8,1.6c0,1.1,0.9,2,2,2c1,0,1.5-0.7,1.5-0.7S32,39,32,39c0,0,4.5,5.3,4.5,5.3S37,45,38,45c1.1,0,2-0.9,2-2 c0-0.6-0.8-1.6-0.8-1.6L35,36c0,0,3.8-1.6,5-2.3c0.4-0.3,1-0.7,1-1.7C41,30.9,40.1,30,39,30z M32,15c-3.9,0-7,3.1-7,7s3.1,7,7,7c3.9,0,7-3.1,7-7S35.9,15,32,15z M32,25.5 c-1.9,0-3.5-1.6-3.5-3.5c0-1.9,1.6-3.5,3.5-3.5c1.9,0,3.5,1.6,3.5,3.5C35.5,23.9,33.9,22.5,35,22.5z "}),S("ok",(function(e,{title:t,description:n,image:r}){return b(e,"ok.url"),"https://connect.ok.ru/offer"+E({url:e,title:t,description:n,imageUrl:r})}),(e=>({title:e.title,description:e.description,image:e.image})),{windowWidth:588,windowHeight:480,windowPosition:"screenCenter"}),L((function(e,t){window.OK||(window.OK={Share:{count:function(e,t){var n,r;null==(r=(n=window.OK.callbacks)[e])||r.call(n,t)}},callbacks:[]});const n=window.OK.callbacks.length;return window.ODKL={updateCount(e,t){var n,r;const i=""===e?0:parseInt(e.replace("react-share-",""),10);null==(r=(n=window.OK.callbacks)[i])||r.call(n,""===t?void 0:parseInt(t,10))}},window.OK.callbacks.push(t),a("https://connect.ok.ru/dk"+E({"st.cmd":"extLike",uid:`react-share-${n}`,ref:e}))})),v({color:"#E60023",path:"M32,16c-8.8,0-16,7.2-16,16c0,6.6,3.9,12.2,9.6,14.7c0-1.1,0-2.5,0.3-3.7 c0.3-1.3,2.1-8.7,2.1-8.7s-0.5-1-0.5-2.5c0-2.4,1.4-4.1,3.1-4.1c1.5,0,2.2,1.1,2.2,2.4c0,1.5-0.9,3.7-1.4,5.7 c-0.4,1.7,0.9,3.1,2.5,3.1c3,0,5.1-3.9,5.1-8.5c0-3.5-2.4-6.1-6.7-6.1c-4.9,0-7.9,3.6-7.9,7.7c0,1.4,0.4,2.4,1.1,3.1 c0.3,0.3,0.3,0.5,0.2,0.9c-0.1,0.3-0.3,1-0.3,1.3c-0.1,0.4-0.4,0.6-0.8,0.4c-2.2-0.9-3.3-3.4-3.3-6.1c0-4.5,3.8-10,11.4-10 c6.1,0,10.1,4.4,10.1,9.2c0,6.3-3.5,11-8.6,11c-1.7,0-3.4-0.9-3.9-2c0,0-0.9,3.7-1.1,4.4c-0.3,1.2-1,2.5-1.6,3.4 c1.4,0.4,3,0.7,4.5,0.7c8.8,0,16-7.2,16-16C48,23.2,40.8,16,32,16z"}),S("pinterest",(function(e,{media:t,description:n,pinId:r}){return r?`https://pinterest.com/pin/${r}/repin/x/`:(b(e,"pinterest.url"),b(t,"pinterest.media"),"https://pinterest.com/pin/create/button/"+E({url:e,media:t,description:n}))}),(e=>({media:e.media,description:e.description,pinId:e.pinId})),{windowWidth:1e3,windowHeight:730}),L((function(e,t){a("https://api.pinterest.com/v1/urls/count.json"+E({url:e}),((e,n)=>{t(n?n.count:void 0)}))})),v({color:"#EF3F56",path:"M41.084 29.065l-7.528 7.882a2.104 2.104 0 0 1-1.521.666 2.106 2.106 0 0 1-1.522-.666l-7.528-7.882c-.876-.914-.902-2.43-.065-3.384.84-.955 2.228-.987 3.1-.072l6.015 6.286 6.022-6.286c.88-.918 2.263-.883 3.102.071.841.938.82 2.465-.06 3.383l-.015.002zm6.777-10.976C47.463 16.84 46.361 16 45.14 16H18.905c-1.2 0-2.289.82-2.716 2.044-.125.363-.189.743-.189 1.125v10.539l.112 2.096c.464 4.766 2.73 8.933 6.243 11.838.06.053.125.102.19.153l.04.033c1.882 1.499 3.986 2.514 6.259 3.014a14.662 14.662 0 0 0 6.13.052c.118-.042.235-.065.353-.087.03 0 .065-.022.098-.042a15.395 15.395 0 0 0 6.011-2.945l.039-.045.18-.153c3.502-2.902 5.765-7.072 6.248-11.852L48 29.674v-10.52c0-.366-.041-.728-.161-1.08l.022.015z"}),S("pocket",(function(e,{title:t}){return b(e,"pocket.url"),"https://getpocket.com/save"+E({url:e,title:t})}),(e=>({title:e.title})),{windowWidth:500,windowHeight:500}),v({color:"#FF5700",path:"M 53.34375 32 C 53.277344 30.160156 52.136719 28.53125 50.429688 27.839844 C 48.722656 27.148438 46.769531 27.523438 45.441406 28.800781 C 41.800781 26.324219 37.519531 24.957031 33.121094 24.863281 L 35.199219 14.878906 L 42.046875 16.320312 C 42.214844 17.882812 43.496094 19.09375 45.066406 19.171875 C 46.636719 19.253906 48.03125 18.183594 48.359375 16.644531 C 48.6875 15.105469 47.847656 13.558594 46.382812 12.992188 C 44.914062 12.425781 43.253906 13.007812 42.464844 14.367188 L 34.625 12.800781 C 34.363281 12.742188 34.09375 12.792969 33.871094 12.9375 C 33.648438 13.082031 33.492188 13.308594 33.441406 13.566406 L 31.070312 24.671875 C 26.617188 24.738281 22.277344 26.105469 18.59375 28.609375 C 17.242188 27.339844 15.273438 26.988281 13.570312 27.707031 C 11.863281 28.429688 10.746094 30.089844 10.71875 31.941406 C 10.691406 33.789062 11.757812 35.484375 13.441406 36.257812 C 13.402344 36.726562 13.402344 37.195312 13.441406 37.664062 C 13.441406 44.832031 21.792969 50.65625 32.097656 50.65625 C 42.398438 50.65625 50.753906 44.832031 50.753906 37.664062 C 50.789062 37.195312 50.789062 36.726562 50.753906 36.257812 C 52.363281 35.453125 53.371094 33.800781 53.34375 32 Z M 21.34375 35.199219 C 21.34375 33.433594 22.777344 32 24.542969 32 C 26.3125 32 27.742188 33.433594 27.742188 35.199219 C 27.742188 36.96875 26.3125 38.398438 24.542969 38.398438 C 22.777344 38.398438 21.34375 36.96875 21.34375 35.199219 Z M 39.9375 44 C 37.664062 45.710938 34.871094 46.582031 32.03125 46.464844 C 29.191406 46.582031 26.398438 45.710938 24.128906 44 C 23.847656 43.65625 23.871094 43.15625 24.183594 42.839844 C 24.5 42.527344 25 42.503906 25.34375 42.785156 C 27.269531 44.195312 29.617188 44.90625 32 44.800781 C 34.386719 44.929688 36.746094 44.242188 38.6875 42.847656 C 39.042969 42.503906 39.605469 42.511719 39.953125 42.863281 C 40.296875 43.21875 40.289062 43.785156 39.9375 44.128906 Z M 39.359375 38.527344 C 37.59375 38.527344 36.160156 37.09375 36.160156 35.328125 C 36.160156 33.5625 37.59375 32.128906 39.359375 32.128906 C 41.128906 32.128906 42.558594 33.5625 42.558594 35.328125 C 42.59375 36.203125 42.269531 37.054688 41.65625 37.6875 C 41.046875 38.316406 40.203125 38.664062 39.328125 38.65625 Z M 39.359375 38.527344"}),S("reddit",(function(e,{title:t}){return b(e,"reddit.url"),"https://www.reddit.com/web/submit"+E({url:e,title:t})}),(e=>({title:e.title})),{windowWidth:660,windowHeight:460,windowPosition:"windowCenter"}),S("gab",(function(e,{title:t}){return b(e,"gab.url"),"https://gab.com/compose"+E({url:e,text:t})}),(e=>({title:e.title})),{windowWidth:660,windowHeight:640,windowPosition:"windowCenter"}),v({color:"#00d178",path:"m17.0506,23.97457l5.18518,0l0,14.23933c0,6.82699 -3.72695,10.09328 -9.33471,10.09328c-2.55969,0 -4.82842,-0.87286 -6.22084,-2.0713l2.07477,-3.88283c1.19844,0.81051 2.33108,1.29543 3.85511,1.29543c2.75366,0 4.44049,-1.97432 4.44049,-4.82149l0,-0.87286c-1.16728,1.39242 -2.81947,2.0713 -4.63446,2.0713c-4.44048,0 -7.81068,-3.68885 -7.81068,-8.28521c0,-4.59289 3.37019,-8.28174 7.81068,-8.28174c1.81499,0 3.46718,0.67888 4.63446,2.0713l0,-1.55521zm-3.62997,11.39217c1.97777,0 3.62997,-1.6522 3.62997,-3.62652c0,-1.97432 -1.6522,-3.62305 -3.62997,-3.62305c-1.97778,0 -3.62997,1.64873 -3.62997,3.62305c0,1.97432 1.65219,3.62652 3.62997,3.62652zm25.7077,4.13913l-5.18518,0l0,-1.29197c-1.00448,1.13264 -2.3969,1.81152 -4.21188,1.81152c-3.62997,0 -5.63893,-2.52504 -5.63893,-5.4034c0,-4.27076 5.251,-5.85715 9.78846,-4.49937c-0.09698,-1.39241 -0.9733,-2.39343 -2.78829,-2.39343c-1.26426,0 -2.72248,0.48492 -3.62997,1.00102l-1.5552,-3.72003c1.19844,-0.77587 3.40136,-1.55174 5.96452,-1.55174c3.78931,0 7.25648,2.13365 7.25648,7.95962l0,8.08777zm-5.18518,-6.14809c-2.42806,-0.77587 -4.66563,-0.3533 -4.66563,1.36124c0,1.00101 0.84168,1.6799 1.84616,1.6799c1.20191,0 2.56315,-0.96984 2.81947,-3.04115zm13.00626,-17.66495l0,9.83695c1.16727,-1.39242 2.81946,-2.0713 4.63445,-2.0713c4.44048,0 7.81068,3.68885 7.81068,8.28174c0,4.59636 -3.37019,8.28521 -7.81068,8.28521c-1.81499,0 -3.46718,-0.67888 -4.63445,-2.0713l0,1.55174l-5.18519,0l0,-23.81304l5.18519,0zm3.62997,19.67391c1.97777,0 3.62997,-1.6522 3.62997,-3.62652c0,-1.97432 -1.6522,-3.62305 -3.62997,-3.62305c-1.97778,0 -3.62997,1.64873 -3.62997,3.62305c0,1.97432 1.65219,3.62652 3.62997,3.62652zm0,0"}),L((function(e,t){a(`https://www.reddit.com/api/info.json?limit=1&url=${e}`,{param:"jsonp"},((e,n)=>{t(!e&&n&&n.data&&n.data.children.length>0&&n.data.children[0].data.score?n.data.children[0].data.score:void 0)}))})),v({color:"#25A3E3",path:"m45.90873,15.44335c-0.6901,-0.0281 -1.37668,0.14048 -1.96142,0.41265c-0.84989,0.32661 -8.63939,3.33986 -16.5237,6.39174c-3.9685,1.53296 -7.93349,3.06593 -10.98537,4.24067c-3.05012,1.1765 -5.34694,2.05098 -5.4681,2.09312c-0.80775,0.28096 -1.89996,0.63566 -2.82712,1.72788c-0.23354,0.27218 -0.46884,0.62161 -0.58825,1.10275c-0.11941,0.48114 -0.06673,1.09222 0.16682,1.5716c0.46533,0.96052 1.25376,1.35737 2.18443,1.71383c3.09051,0.99037 6.28638,1.93508 8.93263,2.8236c0.97632,3.44171 1.91401,6.89571 2.84116,10.34268c0.30554,0.69185 0.97105,0.94823 1.65764,0.95525l-0.00351,0.03512c0,0 0.53908,0.05268 1.06412,-0.07375c0.52679,-0.12292 1.18879,-0.42846 1.79109,-0.99212c0.662,-0.62161 2.45836,-2.38812 3.47683,-3.38552l7.6736,5.66477l0.06146,0.03512c0,0 0.84989,0.59703 2.09312,0.68132c0.62161,0.04214 1.4399,-0.07726 2.14229,-0.59176c0.70766,-0.51626 1.1765,-1.34683 1.396,-2.29506c0.65673,-2.86224 5.00979,-23.57745 5.75257,-27.00686l-0.02107,0.08077c0.51977,-1.93157 0.32837,-3.70159 -0.87096,-4.74991c-0.60054,-0.52152 -1.2924,-0.7498 -1.98425,-0.77965l0,0.00176zm-0.2072,3.29069c0.04741,0.0439 0.0439,0.0439 0.00351,0.04741c-0.01229,-0.00351 0.14048,0.2072 -0.15804,1.32576l-0.01229,0.04214l-0.00878,0.03863c-0.75858,3.50668 -5.15554,24.40802 -5.74203,26.96472c-0.08077,0.34417 -0.11414,0.31959 -0.09482,0.29852c-0.1756,-0.02634 -0.50045,-0.16506 -0.52679,-0.1756l-13.13468,-9.70175c4.4988,-4.33199 9.09945,-8.25307 13.744,-12.43229c0.8218,-0.41265 0.68483,-1.68573 -0.29852,-1.70681c-1.04305,0.24584 -1.92279,0.99564 -2.8798,1.47502c-5.49971,3.2626 -11.11882,6.13186 -16.55882,9.49279c-2.792,-0.97105 -5.57873,-1.77704 -8.15298,-2.57601c2.2336,-0.89555 4.00889,-1.55579 5.75608,-2.23009c3.05188,-1.1765 7.01687,-2.7042 10.98537,-4.24067c7.94051,-3.06944 15.92667,-6.16346 16.62028,-6.43037l0.05619,-0.02283l0.05268,-0.02283c0.19316,-0.0878 0.30378,-0.09658 0.35471,-0.10009c0,0 -0.01756,-0.05795 -0.00351,-0.04566l-0.00176,0zm-20.91715,22.0638l2.16687,1.60145c-0.93418,0.91311 -1.81743,1.77353 -2.45485,2.38812l0.28798,-3.98957"}),S("telegram",(function(e,{title:t}){return b(e,"telegram.url"),"https://telegram.me/share/url"+E({url:e,text:t})}),(e=>({title:e.title})),{windowWidth:550,windowHeight:400}),v({color:"#000000",path:"M41.4569 31.0027C41.2867 30.9181 41.1138 30.8366 40.9386 30.7586C40.6336 24.9274 37.5624 21.5891 32.4055 21.5549C32.3821 21.5548 32.3589 21.5548 32.3355 21.5548C29.251 21.5548 26.6857 22.9207 25.1067 25.4063L27.9429 27.4247C29.1224 25.5681 30.9736 25.1723 32.3369 25.1723C32.3526 25.1723 32.3684 25.1723 32.384 25.1724C34.082 25.1837 35.3633 25.6958 36.1926 26.6947C36.7961 27.4218 37.1997 28.4267 37.3996 29.6949C35.8941 29.4294 34.266 29.3478 32.5255 29.4513C27.6225 29.7443 24.4705 32.711 24.6822 36.8332C24.7896 38.9242 25.7937 40.7231 27.5094 41.8982C28.96 42.8916 30.8282 43.3774 32.7699 43.2674C35.3341 43.1216 37.3456 42.1066 38.749 40.2507C39.8148 38.8413 40.4889 37.0149 40.7865 34.7136C42.0085 35.4787 42.9142 36.4855 43.4144 37.6959C44.2649 39.7534 44.3145 43.1344 41.6553 45.8908C39.3255 48.3055 36.525 49.3501 32.2926 49.3824C27.5977 49.3463 24.0471 47.7842 21.7385 44.7396C19.5768 41.8886 18.4595 37.7706 18.4179 32.5C18.4595 27.2293 19.5768 23.1113 21.7385 20.2604C24.0471 17.2157 27.5977 15.6537 32.2925 15.6175C37.0215 15.654 40.634 17.2235 43.0309 20.2829C44.2062 21.7831 45.0923 23.6698 45.6764 25.8696L49 24.9496C48.2919 22.2419 47.1778 19.9087 45.6616 17.9736C42.5888 14.0514 38.0947 12.0417 32.3041 12H32.2809C26.5022 12.0415 22.0584 14.0589 19.073 17.9961C16.4165 21.4997 15.0462 26.3747 15.0001 32.4856L15 32.5L15.0001 32.5144C15.0462 38.6252 16.4165 43.5004 19.073 47.004C22.0584 50.941 26.5022 52.9586 32.2809 53H32.3041C37.4418 52.9631 41.0632 51.5676 44.0465 48.4753C47.9496 44.4297 47.8321 39.3587 46.5457 36.2457C45.6227 34.0134 43.8631 32.2002 41.4569 31.0027ZM32.5863 39.6551C30.4374 39.7807 28.205 38.78 28.0949 36.6367C28.0133 35.0476 29.185 33.2743 32.7182 33.0631C33.1228 33.0389 33.5199 33.027 33.9099 33.027C35.1933 33.027 36.3939 33.1564 37.4854 33.4039C37.0783 38.6788 34.6902 39.5353 32.5863 39.6551Z"}),S("threads",(function(e,{title:t}){return b(e,"threads.url"),"https://threads.net/intent/post"+E({url:e,text:t})}),(e=>({title:e.title})),{windowWidth:550,windowHeight:600}),v({color:"#34526f",path:"M39.2,41c-0.6,0.3-1.6,0.5-2.4,0.5c-2.4,0.1-2.9-1.7-2.9-3v-9.3h6v-4.5h-6V17c0,0-4.3,0-4.4,0 c-0.1,0-0.2,0.1-0.2,0.2c-0.3,2.3-1.4,6.4-5.9,8.1v3.9h3V39c0,3.4,2.5,8.1,9,8c2.2,0,4.7-1,5.2-1.8L39.2,41z"}),S("tumblr",(function(e,{title:t,caption:n,tags:r,posttype:i}){return b(e,"tumblr.url"),"https://www.tumblr.com/widgets/share/tool"+E({canonicalUrl:e,title:t,caption:n,tags:r,posttype:i})}),(e=>({title:e.title,tags:(e.tags||[]).join(","),caption:e.caption,posttype:e.posttype||"link"})),{windowWidth:660,windowHeight:460}),L((function(e,t){return a("https://api.tumblr.com/v2/share/stats"+E({url:e}),((e,n)=>{t(!e&&n&&n.response?n.response.note_count:void 0)}))}));const I=v({color:"#00aced",path:"M48,22.1c-1.2,0.5-2.4,0.9-3.8,1c1.4-0.8,2.4-2.1,2.9-3.6c-1.3,0.8-2.7,1.3-4.2,1.6 C41.7,19.8,40,19,38.2,19c-3.6,0-6.6,2.9-6.6,6.6c0,0.5,0.1,1,0.2,1.5c-5.5-0.3-10.3-2.9-13.5-6.9c-0.6,1-0.9,2.1-0.9,3.3 c0,2.3,1.2,4.3,2.9,5.5c-1.1,0-2.1-0.3-3-0.8c0,0,0,0.1,0,0.1c0,3.2,2.3,5.8,5.3,6.4c-0.6,0.1-1.1,0.2-1.7,0.2c-0.4,0-0.8,0-1.2-0.1 c0.8,2.6,3.3,4.5,6.1,4.6c-2.2,1.8-5.1,2.8-8.2,2.8c-0.5,0-1.1,0-1.6-0.1c2.9,1.9,6.4,2.9,10.1,2.9c12.1,0,18.7-10,18.7-18.7 c0-0.3,0-0.6,0-0.8C46,24.5,47.1,23.4,48,22.1z"}),x=S("twitter",(function(e,{title:t,via:n,hashtags:r=[],related:i=[]}){return b(e,"twitter.url"),b(Array.isArray(r),"twitter.hashtags is not an array"),b(Array.isArray(i),"twitter.related is not an array"),"https://twitter.com/intent/tweet"+E({url:e,text:t,via:n,hashtags:r.length>0?r.join(","):void 0,related:i.length>0?i.join(","):void 0})}),(e=>({hashtags:e.hashtags,title:e.title,via:e.via,related:e.related})),{windowWidth:550,windowHeight:400});v({color:"#7360f2",path:"m31.0,12.3c9.0,0.2 16.4,6.2 18.0,15.2c0.2,1.5 0.3,3.0 0.4,4.6a1.0,1.0 0 0 1 -0.8,1.2l-0.1,0a1.1,1.1 0 0 1 -1.0,-1.2l0,0c-0.0,-1.2 -0.1,-2.5 -0.3,-3.8a16.1,16.1 0 0 0 -13.0,-13.5c-1.0,-0.1 -2.0,-0.2 -3.0,-0.3c-0.6,-0.0 -1.4,-0.1 -1.6,-0.8a1.1,1.1 0 0 1 0.9,-1.2l0.6,0l0.0,-0.0zm10.6,39.2a19.9,19.9 0 0 1 -2.1,-0.6c-6.9,-2.9 -13.2,-6.6 -18.3,-12.2a47.5,47.5 0 0 1 -7.0,-10.7c-0.8,-1.8 -1.6,-3.7 -2.4,-5.6c-0.6,-1.7 0.3,-3.4 1.4,-4.7a11.3,11.3 0 0 1 3.7,-2.8a2.4,2.4 0 0 1 3.0,0.7a39.0,39.0 0 0 1 4.7,6.5a3.1,3.1 0 0 1 -0.8,4.2c-0.3,0.2 -0.6,0.5 -1.0,0.8a3.3,3.3 0 0 0 -0.7,0.7a2.1,2.1 0 0 0 -0.1,1.9c1.7,4.9 4.7,8.7 9.7,10.8a5.0,5.0 0 0 0 2.5,0.6c1.5,-0.1 2.0,-1.8 3.1,-2.7a2.9,2.9 0 0 1 3.5,-0.1c1.1,0.7 2.2,1.4 3.3,2.2a37.8,37.8 0 0 1 3.1,2.4a2.4,2.4 0 0 1 0.7,3.0a10.4,10.4 0 0 1 -4.4,4.8a10.8,10.8 0 0 1 -1.9,0.6c-0.7,-0.2 0.6,-0.2 0,0l0.0,0l0,-0.0zm3.1,-21.4a4.2,4.2 0 0 1 -0.0,0.6a1.0,1.0 0 0 1 -1.9,0.1a2.7,2.7 0 0 1 -0.1,-0.8a10.9,10.9 0 0 0 -1.4,-5.5a10.2,10.2 0 0 0 -4.2,-4.0a12.3,12.3 0 0 0 -3.4,-1.0c-0.5,-0.0 -1.0,-0.1 -1.5,-0.2a0.9,0.9 0 0 1 -0.9,-1.0l0,-0.1a0.9,0.9 0 0 1 0.9,-0.9l0.1,0a14.1,14.1 0 0 1 5.9,1.5a11.9,11.9 0 0 1 6.5,9.3c0,0.1 0.0,0.3 0.0,0.5c0,0.4 0.0,0.9 0.0,1.5l0,0l0.0,0.0zm-5.6,-0.2a1.1,1.1 0 0 1 -1.2,-0.9l0,-0.1a11.3,11.3 0 0 0 -0.2,-1.4a4.0,4.0 0 0 0 -1.5,-2.3a3.9,3.9 0 0 0 -1.2,-0.5c-0.5,-0.1 -1.1,-0.1 -1.6,-0.2a1.0,1.0 0 0 1 -0.8,-1.1l0,0l0,0a1.0,1.0 0 0 1 1.1,-0.8c3.4,0.2 6.0,2.0 6.3,6.2a2.8,2.8 0 0 1 0,0.8a0.8,0.8 0 0 1 -0.8,0.7l0,0l0.0,-0.0z"}),S("viber",(function(e,{title:t,separator:n}){return b(e,"viber.url"),"viber://forward"+E({text:t?t+n+e:e})}),(e=>({title:e.title,separator:e.separator||" "})),{windowWidth:660,windowHeight:460}),v({color:"#4C75A3",path:"M44.94,44.84h-0.2c-2.17-.36-3.66-1.92-4.92-3.37C39.1,40.66,38,38.81,36.7,39c-1.85.3-.93,3.52-1.71,4.9-0.62,1.11-3.29.91-5.12,0.71-5.79-.62-8.75-3.77-11.35-7.14A64.13,64.13,0,0,1,11.6,26a10.59,10.59,0,0,1-1.51-4.49C11,20.7,12.56,21,14.11,21c1.31,0,3.36-.29,4.32.2C19,21.46,19.57,23,20,24a37.18,37.18,0,0,0,3.31,5.82c0.56,0.81,1.41,2.35,2.41,2.14s1.06-2.63,1.1-4.18c0-1.77,0-4-.5-4.9S25,22,24.15,21.47c0.73-1.49,2.72-1.63,5.12-1.63,2,0,4.84-.23,5.62,1.12s0.25,3.85.2,5.71c-0.06,2.09-.41,4.25,1,5.21,1.09-.12,1.68-1.2,2.31-2A28,28,0,0,0,41.72,24c0.44-1,.91-2.65,1.71-3,1.21-.47,3.15-0.1,4.92-0.1,1.46,0,4.05-.41,4.52.61,0.39,0.85-.75,3-1.1,3.57a61.88,61.88,0,0,1-4.12,5.61c-0.58.78-1.78,2-1.71,3.27,0.05,0.94,1,1.67,1.71,2.35a33.12,33.12,0,0,1,3.92,4.18c0.47,0.62,1.5,2,1.4,2.76C52.66,45.81,46.88,44.24,44.94,44.84Z"}),S("vk",(function(e,{title:t,image:n,noParse:r,noVkLinks:i}){return b(e,"vk.url"),"https://vk.com/share.php"+E({url:e,title:t,image:n,noparse:r?1:0,no_vk_links:i?1:0})}),(e=>({title:e.title,image:e.image,noParse:e.noParse,noVkLinks:e.noVkLinks})),{windowWidth:660,windowHeight:460}),L((function(e,t){window.VK||(window.VK={}),window.VK.Share={count:(e,t)=>{var n,r;return null==(r=null==(n=window.VK.callbacks)?void 0:n[e])?void 0:r.call(n,t)}},window.VK.callbacks=[];const n=window.VK.callbacks.length;return window.VK.callbacks.push(t),a("https://vk.com/share.php"+E({act:"count",index:n,url:e}))})),v({color:"#DF2029",path:"M40.9756152,15.0217119 C40.5000732,15.0546301 39.9999314,15.1204666 39.5325878,15.2192213 C38.6634928,15.4085016 38.0977589,16.2643757 38.2863368,17.1284787 C38.4667163,18.0008129 39.3194143,18.5686519 40.1885094,18.3793715 C42.8613908,17.8115326 45.7720411,18.6427174 47.7316073,20.8153207 C49.6911735,22.996153 50.2077122,25.975254 49.3714112,28.5840234 C49.1008441,29.4316684 49.5763861,30.3533789 50.4208857,30.6249537 C51.2653852,30.8965286 52.1754769,30.4192153 52.4542425,29.5715703 C53.6349013,25.9011885 52.9133876,21.7699494 50.1585171,18.7085538 C48.0923641,16.4042776 45.2063093,15.1533848 42.3530505,15.0217119 C41.8775084,14.9970227 41.4511594,14.9887937 40.9756152,15.0217119 Z M27.9227762,19.8277737 C24.9957268,20.140498 20.863421,22.4365431 17.2312548,26.0822378 C13.2711279,30.0571148 11,34.2871065 11,37.9328012 C11,44.9032373 19.8713401,49.125 28.5786978,49.125 C39.9917329,49.125 47.600423,42.4261409 47.600423,37.1427636 C47.600423,33.9496952 44.9603397,32.1638816 42.549827,31.4149913 C41.9594976,31.2339421 41.5167516,31.1434164 41.8283133,30.3616079 C42.5006339,28.66632 42.6236176,27.1932286 41.8939054,26.1480742 C40.5328692,24.1894405 36.7203236,24.2881952 32.448635,26.0822378 C32.448635,26.0822378 31.1203949,26.6912261 31.4647526,25.6213825 C32.1206742,23.4981576 32.0304845,21.712342 31.0056075,20.6836478 C30.2840938,19.9512176 29.2510184,19.6878718 27.9227762,19.8277737 Z M42.0906819,20.6836478 C41.6233383,20.6589586 41.1723917,20.716566 40.7132466,20.8153207 C39.9671353,20.9716828 39.4997917,21.7781784 39.6637721,22.5270687 C39.8277525,23.275959 40.5574647,23.7450433 41.303576,23.5804521 C42.1972686,23.3911718 43.2057485,23.6380596 43.8616701,24.3704897 C44.5175916,25.1029198 44.6733735,26.0657797 44.3864073,26.9381118 C44.1486363,27.6705419 44.5093932,28.4770397 45.2391054,28.7156963 C45.9688176,28.9461239 46.780521,28.5922524 47.0100936,27.8598223 C47.584026,26.0740087 47.2396661,24.0248493 45.8950269,22.5270687 C44.886547,21.4078489 43.4845162,20.7494842 42.0906819,20.6836478 Z M29.496988,29.9665891 C35.3100922,30.1723275 39.9917329,33.0691319 40.3852858,37.0769272 C40.8362324,41.6607904 35.5970585,45.9319315 28.6442899,46.6232144 C21.6915214,47.3144973 15.6488446,44.154347 15.197898,39.5787128 C14.7469514,34.9948495 20.059916,30.7237084 27.004486,30.0324256 C27.8735831,29.950131 28.6688875,29.9336709 29.496988,29.9665891 Z M25.5614586,34.3776322 C23.183744,34.5916017 20.9372116,35.9577073 19.9205332,37.9328012 C18.5348994,40.6238672 19.9041362,43.6029661 23.0689567,44.582284 C26.340366,45.5945202 30.1857056,44.0638213 31.5303448,41.1587879 C32.8503864,38.3195909 31.1613894,35.3734082 27.9227762,34.5751416 C27.1438688,34.3776322 26.356763,34.3035667 25.5614586,34.3776322 Z M24.052839,38.7228388 C24.3316067,38.7310678 24.5857748,38.8215935 24.8399449,38.9203482 C25.8648218,39.3400561 26.1845841,40.4428158 25.5614586,41.4221338 C24.9219361,42.3932227 23.5690963,42.8623069 22.5442194,42.4096807 C21.5357395,41.9652856 21.2487754,40.8542948 21.8882979,39.9078951 C22.3638421,39.2001542 23.2247386,38.7146097 24.052839,38.7228388 Z"}),S("weibo",(function(e,{title:t,image:n}){return b(e,"weibo.url"),"http://service.weibo.com/share/share.php"+E({url:e,title:t,pic:n})}),(e=>({title:e.title,image:e.image})),{windowWidth:660,windowHeight:550,windowPosition:"screenCenter"});const P=v({color:"#25D366",path:"m42.32286,33.93287c-0.5178,-0.2589 -3.04726,-1.49644 -3.52105,-1.66732c-0.4712,-0.17346 -0.81554,-0.2589 -1.15987,0.2589c-0.34175,0.51004 -1.33075,1.66474 -1.63108,2.00648c-0.30032,0.33658 -0.60064,0.36247 -1.11327,0.12945c-0.5178,-0.2589 -2.17994,-0.80259 -4.14759,-2.56312c-1.53269,-1.37217 -2.56312,-3.05503 -2.86603,-3.57283c-0.30033,-0.5178 -0.03366,-0.80259 0.22524,-1.06149c0.23301,-0.23301 0.5178,-0.59547 0.7767,-0.90616c0.25372,-0.31068 0.33657,-0.5178 0.51262,-0.85437c0.17088,-0.36246 0.08544,-0.64725 -0.04402,-0.90615c-0.12945,-0.2589 -1.15987,-2.79613 -1.58964,-3.80584c-0.41424,-1.00971 -0.84142,-0.88027 -1.15987,-0.88027c-0.29773,-0.02588 -0.64208,-0.02588 -0.98382,-0.02588c-0.34693,0 -0.90616,0.12945 -1.37736,0.62136c-0.4712,0.5178 -1.80194,1.76053 -1.80194,4.27186c0,2.51134 1.84596,4.945 2.10227,5.30747c0.2589,0.33657 3.63497,5.51458 8.80262,7.74113c1.23237,0.5178 2.1903,0.82848 2.94111,1.08738c1.23237,0.38836 2.35599,0.33657 3.24402,0.20712c0.99159,-0.15534 3.04985,-1.24272 3.47963,-2.45956c0.44013,-1.21683 0.44013,-2.22654 0.31068,-2.45955c-0.12945,-0.23301 -0.46601,-0.36247 -0.98382,-0.59548m-9.40068,12.84407l-0.02589,0c-3.05503,0 -6.08417,-0.82849 -8.72495,-2.38189l-0.62136,-0.37023l-6.47252,1.68286l1.73463,-6.29129l-0.41424,-0.64725c-1.70875,-2.71846 -2.6149,-5.85116 -2.6149,-9.07706c0,-9.39809 7.68934,-17.06155 17.15993,-17.06155c4.58253,0 8.88029,1.78642 12.11655,5.02268c3.23625,3.21036 5.02267,7.50812 5.02267,12.06476c-0.0078,9.3981 -7.69712,17.06155 -17.14699,17.06155m14.58906,-31.58846c-3.93529,-3.80584 -9.1133,-5.95471 -14.62789,-5.95471c-11.36055,0 -20.60848,9.2065 -20.61625,20.52564c0,3.61684 0.94757,7.14565 2.75211,10.26282l-2.92557,10.63564l10.93337,-2.85309c3.0136,1.63108 6.4052,2.4958 9.85634,2.49839l0.01037,0c11.36574,0 20.61884,-9.2091 20.62403,-20.53082c0,-5.48093 -2.14111,-10.64081 -6.03239,-14.51915"}),D=S("whatsapp",(function(e,{title:t,separator:n}){return b(e,"whatsapp.url"),"https://"+(/(android|iphone|ipad|mobile)/i.test(navigator.userAgent)?"api":"web")+".whatsapp.com/send"+E({text:t?t+n+e:e})}),(e=>({title:e.title,separator:e.separator||" "})),{windowWidth:550,windowHeight:400});v({color:"#4326c4",path:"M34.019,10.292c0.21,0.017,0.423,0.034,0.636,0.049 c3.657,0.262,6.976,1.464,9.929,3.635c3.331,2.448,5.635,5.65,6.914,9.584c0.699,2.152,0.983,4.365,0.885,6.623 c-0.136,3.171-1.008,6.13-2.619,8.867c-0.442,0.75-0.908,1.492-1.495,2.141c-0.588,0.651-1.29,1.141-2.146,1.383 c-1.496,0.426-3.247-0.283-3.961-1.642c-0.26-0.494-0.442-1.028-0.654-1.548c-1.156-2.838-2.311-5.679-3.465-8.519 c-0.017-0.042-0.037-0.082-0.065-0.145c-0.101,0.245-0.192,0.472-0.284,0.698c-1.237,3.051-2.475,6.103-3.711,9.155 c-0.466,1.153-1.351,1.815-2.538,2.045c-1.391,0.267-2.577-0.154-3.496-1.247c-0.174-0.209-0.31-0.464-0.415-0.717 c-2.128-5.22-4.248-10.442-6.37-15.665c-0.012-0.029-0.021-0.059-0.036-0.104c0.054-0.003,0.103-0.006,0.15-0.006 c1.498-0.001,2.997,0,4.495-0.004c0.12-0.001,0.176,0.03,0.222,0.146c1.557,3.846,3.117,7.691,4.679,11.536 c0.018,0.046,0.039,0.091,0.067,0.159c0.273-0.673,0.536-1.32,0.797-1.968c1.064-2.627,2.137-5.25,3.19-7.883 c0.482-1.208,1.376-1.917,2.621-2.135c1.454-0.255,2.644,0.257,3.522,1.449c0.133,0.18,0.229,0.393,0.313,0.603 c1.425,3.495,2.848,6.991,4.269,10.488c0.02,0.047,0.04,0.093,0.073,0.172c0.196-0.327,0.385-0.625,0.559-0.935 c0.783-1.397,1.323-2.886,1.614-4.461c0.242-1.312,0.304-2.634,0.187-3.962c-0.242-2.721-1.16-5.192-2.792-7.38 c-2.193-2.939-5.086-4.824-8.673-5.625c-1.553-0.346-3.124-0.405-4.705-0.257c-3.162,0.298-6.036,1.366-8.585,3.258 c-3.414,2.534-5.638,5.871-6.623,10.016c-0.417,1.76-0.546,3.547-0.384,5.348c0.417,4.601,2.359,8.444,5.804,11.517 c2.325,2.073,5.037,3.393,8.094,3.989c1.617,0.317,3.247,0.395,4.889,0.242c1-0.094,1.982-0.268,2.952-0.529 c0.04-0.01,0.081-0.018,0.128-0.028c0,1.526,0,3.047,0,4.586c-0.402,0.074-0.805,0.154-1.21,0.221 c-0.861,0.14-1.728,0.231-2.601,0.258c-0.035,0.002-0.071,0.013-0.108,0.021c-0.493,0-0.983,0-1.476,0 c-0.049-0.007-0.1-0.018-0.149-0.022c-0.315-0.019-0.629-0.033-0.945-0.058c-1.362-0.105-2.702-0.346-4.017-0.716 c-3.254-0.914-6.145-2.495-8.66-4.752c-2.195-1.971-3.926-4.29-5.176-6.963c-1.152-2.466-1.822-5.057-1.993-7.774 c-0.014-0.226-0.033-0.451-0.05-0.676c0-0.502,0-1.003,0-1.504c0.008-0.049,0.02-0.099,0.022-0.148 c0.036-1.025,0.152-2.043,0.338-3.052c0.481-2.616,1.409-5.066,2.8-7.331c2.226-3.625,5.25-6.386,9.074-8.254 c2.536-1.24,5.217-1.947,8.037-2.126c0.23-0.015,0.461-0.034,0.691-0.051C33.052,10.292,33.535,10.292,34.019,10.292z"}),S("workplace",(function(e,{quote:t,hashtag:n}){return b(e,"workplace.url"),"https://work.facebook.com/sharer.php"+E({u:e,quote:t,hashtag:n})}),(e=>({quote:e.quote,hashtag:e.hashtag})),{windowWidth:550,windowHeight:400}),v({color:"#000000",path:"M 41.116 18.375 h 4.962 l -10.8405 12.39 l 12.753 16.86 H 38.005 l -7.821 -10.2255 L 21.235 47.625 H 16.27 l 11.595 -13.2525 L 15.631 18.375 H 25.87 l 7.0695 9.3465 z m -1.7415 26.28 h 2.7495 L 24.376 21.189 H 21.4255 z"})},4739:function(e){!function(){"use strict";var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,r=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,s={};r<i;r++)if((e=n[r])&&e[1]in t){for(r=0;r<e.length;r++)s[n[0][r]]=e[r];return s}return!1}(),i={change:r.fullscreenchange,error:r.fullscreenerror},s={request:function(e,n){return new Promise(function(i,s){var a=function(){this.off("change",a),i()}.bind(this);this.on("change",a);var o=(e=e||t.documentElement)[r.requestFullscreen](n);o instanceof Promise&&o.then(a).catch(s)}.bind(this))},exit:function(){return new Promise(function(e,n){if(this.isFullscreen){var i=function(){this.off("change",i),e()}.bind(this);this.on("change",i);var s=t[r.exitFullscreen]();s instanceof Promise&&s.then(i).catch(n)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var r=i[e];r&&t.addEventListener(r,n,!1)},off:function(e,n){var r=i[e];r&&t.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(s,{isFullscreen:{get:function(){return Boolean(t[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[r.fullscreenEnabled])}}}),n?e.exports=s:window.screenfull=s):n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()},4784:function(e,t,n){var r=n(3766)(Object.getPrototypeOf,Object);e.exports=r},4882:function(e){e.exports=function(){return!1}},4895:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"music",icon:[512,512,[127925],"f001","M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7l0 72 0 264c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L448 147 192 223.8 192 432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L128 200l0-72c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z"]},t.X=t.mw},4912:function(e,t,n){"use strict";function r(e,t){var n=t&&t.cache?t.cache:c,r=t&&t.serializer?t.serializer:l;return(t&&t.strategy?t.strategy:o)(e,{cache:n,serializer:r})}function i(e,t,n,r){var i,s=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(s);return void 0===a&&(a=e.call(this,r),t.set(s,a)),a}function s(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),s=t.get(i);return void 0===s&&(s=e.apply(this,r),t.set(i,s)),s}function a(e,t,n,r,i){return n.bind(t,e,r,i)}function o(e,t){return a(e,this,1===e.length?i:s,t.cache.create(),t.serializer)}n.d(t,{B:function(){return r},W:function(){return h}});var l=function(){return JSON.stringify(arguments)};function u(){this.cache=Object.create(null)}u.prototype.get=function(e){return this.cache[e]},u.prototype.set=function(e,t){this.cache[e]=t};var c={create:function(){return new u}},h={variadic:function(e,t){return a(e,this,s,t.cache.create(),t.serializer)},monadic:function(e,t){return a(e,this,i,t.cache.create(),t.serializer)}}},4954:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"angle-up",icon:[448,512,[8963],"f106","M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},t.GF=t.mw},4967:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},5012:function(e,t,n){"use strict";n.d(t,{JF:function(){return l},yU:function(){return u},HM:function(){return o},bN:function(){return c}});var r=n(5608),i=n(4041),s=n(4912);(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:s.W.variadic}),(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:s.W.variadic}),(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:s.W.variadic}),(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.Locale).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:s.W.variadic}),(0,s.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.ListFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:s.W.variadic});var a=n(280);function o(e){!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n("[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}(e)}var l=(0,r.Cl)((0,r.Cl)({},a.JF),{textComponent:i.Fragment});function u(e){return function(t){return e(i.Children.toArray(t))}}function c(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var s=0;s<i;s++){var a=n[s];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0}},5111:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},5152:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:function(){return r}})},5158:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function s(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=i(t,r).join("")).match(n)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var i=s(n[0]);i!==n[0]&&(t[n[0]]=i)}n=r.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var l=a[o];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},5234:function(e,t,n){var r=n(6912),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=i(s.length-t,0),l=Array(o);++a<o;)l[a]=s[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=s[a];return u[t]=n(l),r(e,this,u)}}},5250:function(e,t,n){var r;e=n.nmd(e),function(){var i,s="Expected a function",a="__lodash_hash_undefined__",o="__lodash_placeholder__",l=32,u=128,c=1/0,h=9007199254740991,d=NaN,f=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",T="[object GeneratorFunction]",S="[object Map]",w="[object Number]",_="[object Object]",A="[object Promise]",k="[object RegExp]",L="[object Set]",C="[object String]",R="[object Symbol]",I="[object WeakMap]",x="[object ArrayBuffer]",P="[object DataView]",D="[object Float32Array]",O="[object Float64Array]",M="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",U="[object Uint8ClampedArray]",$="[object Uint16Array]",H="[object Uint32Array]",G=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,W=RegExp(z.source),Y=RegExp(K.source),q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Te="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ce="["+Te+"]",Re="["+Le+"]",Ie="["+Se+"]",xe="\\d+",Pe="["+we+"]",De="["+_e+"]",Oe="[^"+Te+Le+xe+we+_e+Ae+"]",Me="\\ud83c[\\udffb-\\udfff]",Ne="[^"+Te+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ae+"]",$e="\\u200d",He="(?:"+De+"|"+Oe+")",Ge="(?:"+Ue+"|"+Oe+")",je="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Ie+"|"+Me+")?",Ke="["+ke+"]?",We=Ke+ze+"(?:"+$e+"(?:"+[Ne,Fe,Be].join("|")+")"+Ke+ze+")*",Ye="(?:"+[Pe,Fe,Be].join("|")+")"+We,qe="(?:"+[Ne+Ie+"?",Ie,Fe,Be,Ce].join("|")+")",Xe=RegExp("['’]","g"),Qe=RegExp(Ie,"g"),Ze=RegExp(Me+"(?="+Me+")|"+qe+We,"g"),Je=RegExp([Ue+"?"+De+"+"+je+"(?="+[Re,Ue,"$"].join("|")+")",Ge+"+"+Ve+"(?="+[Re,Ue+He,"$"].join("|")+")",Ue+"?"+He+"+"+je,Ue+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xe,Ye].join("|"),"g"),et=RegExp("["+$e+Te+Se+ke+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],rt=-1,it={};it[D]=it[O]=it[M]=it[N]=it[F]=it[B]=it[U]=it[$]=it[H]=!0,it[g]=it[m]=it[x]=it[v]=it[P]=it[y]=it[b]=it[E]=it[S]=it[w]=it[_]=it[k]=it[L]=it[C]=it[I]=!1;var st={};st[g]=st[m]=st[x]=st[P]=st[v]=st[y]=st[D]=st[O]=st[M]=st[N]=st[F]=st[S]=st[w]=st[_]=st[k]=st[L]=st[C]=st[R]=st[B]=st[U]=st[$]=st[H]=!0,st[b]=st[E]=st[I]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ht=ut||ct||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,gt=pt&&ut.process,mt=function(){try{return ft&&ft.require&&ft.require("util").types||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,yt=mt&&mt.isDate,bt=mt&&mt.isMap,Et=mt&&mt.isRegExp,Tt=mt&&mt.isSet,St=mt&&mt.isTypedArray;function wt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function Rt(e,t){return!(null==e||!e.length)&&Ut(e,t,0)>-1}function It(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function xt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Dt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function Ot(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Nt=jt("length");function Ft(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Bt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ut(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Ht,n)}function $t(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function Ht(e){return e!=e}function Gt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:d}function jt(e){return function(t){return null==t?i:t[e]}}function Vt(e){return function(t){return null==e?i:e[t]}}function zt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Kt(e,t){for(var n,r=-1,s=e.length;++r<s;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Wt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,dn(e)+1).replace(re,""):e}function qt(e){return function(t){return e(t)}}function Xt(e,t){return xt(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var en=Vt({"À":"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":"'n","ſ":"s"}),tn=Vt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function an(e,t){return function(n){return e(t(n))}}function on(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var a=e[n];a!==t&&a!==o||(e[n]=o,s[i++]=n)}return s}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function cn(e){return rn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Nt(e)}function hn(e){return rn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var fn=Vt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function e(t){var n,r=(t=null==t?ht:pn.defaults(ht.Object(),t,pn.pick(ht,nt))).Array,ie=t.Date,Te=t.Error,Se=t.Function,we=t.Math,_e=t.Object,Ae=t.RegExp,ke=t.String,Le=t.TypeError,Ce=r.prototype,Re=Se.prototype,Ie=_e.prototype,xe=t["__core-js_shared__"],Pe=Re.toString,De=Ie.hasOwnProperty,Oe=0,Me=(n=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ne=Ie.toString,Fe=Pe.call(_e),Be=ht._,Ue=Ae("^"+Pe.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=pt?t.Buffer:i,He=t.Symbol,Ge=t.Uint8Array,je=$e?$e.allocUnsafe:i,Ve=an(_e.getPrototypeOf,_e),ze=_e.create,Ke=Ie.propertyIsEnumerable,We=Ce.splice,Ye=He?He.isConcatSpreadable:i,qe=He?He.iterator:i,Ze=He?He.toStringTag:i,et=function(){try{var e=ls(_e,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=ie&&ie.now!==ht.Date.now&&ie.now,ct=t.setTimeout!==ht.setTimeout&&t.setTimeout,dt=we.ceil,ft=we.floor,gt=_e.getOwnPropertySymbols,mt=$e?$e.isBuffer:i,Nt=t.isFinite,Vt=Ce.join,gn=an(_e.keys,_e),mn=we.max,vn=we.min,yn=ie.now,bn=t.parseInt,En=we.random,Tn=Ce.reverse,Sn=ls(t,"DataView"),wn=ls(t,"Map"),_n=ls(t,"Promise"),An=ls(t,"Set"),kn=ls(t,"WeakMap"),Ln=ls(_e,"create"),Cn=kn&&new kn,Rn={},In=Ns(Sn),xn=Ns(wn),Pn=Ns(_n),Dn=Ns(An),On=Ns(kn),Mn=He?He.prototype:i,Nn=Mn?Mn.valueOf:i,Fn=Mn?Mn.toString:i;function Bn(e){if(Ja(e)&&!Ga(e)&&!(e instanceof Gn)){if(e instanceof Hn)return e;if(De.call(e,"__wrapped__"))return Fs(e)}return new Hn(e)}var Un=function(){function e(){}return function(t){if(!Za(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Wn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Yn(e,t){var n=Ga(e),r=!n&&Ha(e),i=!n&&!r&&Ka(e),s=!n&&!r&&!i&&oo(e),a=n||r||i||s,o=a?Wt(e.length,ke):[],l=o.length;for(var u in e)!t&&!De.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||gs(u,l))||o.push(u);return o}function qn(e){var t=e.length;return t?e[zr(0,t-1)]:i}function Xn(e,t){return xs(ki(e),sr(t,0,e.length))}function Qn(e){return xs(ki(e))}function Zn(e,t,n){(n!==i&&!Ba(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Jn(e,t,n){var r=e[t];De.call(e,t)&&Ba(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function tr(e,t,n,r){return cr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function nr(e,t){return e&&Li(t,Io(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,s=t.length,a=r(s),o=null==e;++n<s;)a[n]=o?i:Ao(e,t[n]);return a}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,s,a){var o,l=1&t,u=2&t,c=4&t;if(n&&(o=s?n(e,r,s,a):n(e)),o!==i)return o;if(!Za(e))return e;var h=Ga(e);if(h){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return ki(e,o)}else{var d=hs(e),f=d==E||d==T;if(Ka(e))return Ei(e,l);if(d==_||d==g||f&&!s){if(o=u||f?{}:fs(e),!l)return u?function(e,t){return Li(e,cs(e),t)}(e,function(e,t){return e&&Li(t,xo(t),e)}(o,e)):function(e,t){return Li(e,us(e),t)}(e,nr(o,e))}else{if(!st[d])return s?e:{};o=function(e,t,n){var r,i=e.constructor;switch(t){case x:return Ti(e);case v:case y:return new i(+e);case P:return function(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case O:case M:case N:case F:case B:case U:case $:case H:return Si(e,n);case S:return new i;case w:case C:return new i(e);case k:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case L:return new i;case R:return r=e,Nn?_e(Nn.call(r)):{}}}(e,d,l)}}a||(a=new Wn);var p=a.get(e);if(p)return p;a.set(e,o),io(e)?e.forEach((function(r){o.add(ar(r,t,n,r,e,a))})):eo(e)&&e.forEach((function(r,i){o.set(i,ar(r,t,n,i,e,a))}));var m=h?i:(c?u?ts:es:u?xo:Io)(e);return At(m||e,(function(r,i){m&&(r=e[i=r]),Jn(o,i,ar(r,t,n,i,e,a))})),o}function or(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var s=n[r],a=t[s],o=e[s];if(o===i&&!(s in e)||!a(o))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Le(s);return Ls((function(){e.apply(i,n)}),t)}function ur(e,t,n,r){var i=-1,s=Rt,a=!0,o=e.length,l=[],u=t.length;if(!o)return l;n&&(t=xt(t,qt(n))),r?(s=It,a=!1):t.length>=200&&(s=Qt,a=!1,t=new Kn(t));e:for(;++i<o;){var c=e[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,a&&h==h){for(var d=u;d--;)if(t[d]===h)continue e;l.push(c)}else s(t,h,r)||l.push(c)}return l}Bn.templateSettings={escape:q,evaluate:X,interpolate:Q,variable:"",imports:{_:Bn}},Bn.prototype=$n.prototype,Bn.prototype.constructor=Bn,Hn.prototype=Un($n.prototype),Hn.prototype.constructor=Hn,Gn.prototype=Un($n.prototype),Gn.prototype.constructor=Gn,jn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},jn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jn.prototype.get=function(e){var t=this.__data__;if(Ln){var n=t[e];return n===a?i:n}return De.call(t,e)?t[e]:i},jn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==i:De.call(t,e)},jn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===i?a:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():We.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Vn.prototype.has=function(e){return er(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new jn,map:new(wn||Vn),string:new jn}},zn.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return as(this,e).get(e)},zn.prototype.has=function(e){return as(this,e).has(e)},zn.prototype.set=function(e,t){var n=as(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Wn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Wn.prototype.get=function(e){return this.__data__.get(e)},Wn.prototype.has=function(e){return this.__data__.has(e)},Wn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!wn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var cr=Ii(yr),hr=Ii(br,!0);function dr(e,t){var n=!0;return cr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function fr(e,t,n){for(var r=-1,s=e.length;++r<s;){var a=e[r],o=t(a);if(null!=o&&(l===i?o==o&&!ao(o):n(o,l)))var l=o,u=a}return u}function pr(e,t){var n=[];return cr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=ps),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?gr(o,t-1,n,r,i):Pt(i,o):r||(i[i.length]=o)}return i}var mr=xi(),vr=xi(!0);function yr(e,t){return e&&mr(e,t,Io)}function br(e,t){return e&&vr(e,t,Io)}function Er(e,t){return Ct(t,(function(t){return qa(e[t])}))}function Tr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[Ms(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return Ga(e)?r:Pt(r,n(e))}function wr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in _e(e)?function(e){var t=De.call(e,Ze),n=e[Ze];try{e[Ze]=i;var r=!0}catch(e){}var s=Ne.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),s}(e):function(e){return Ne.call(e)}(e)}function _r(e,t){return e>t}function Ar(e,t){return null!=e&&De.call(e,t)}function kr(e,t){return null!=e&&t in _e(e)}function Lr(e,t,n){for(var s=n?It:Rt,a=e[0].length,o=e.length,l=o,u=r(o),c=1/0,h=[];l--;){var d=e[l];l&&t&&(d=xt(d,qt(t))),c=vn(d.length,c),u[l]=!n&&(t||a>=120&&d.length>=120)?new Kn(l&&d):i}d=e[0];var f=-1,p=u[0];e:for(;++f<a&&h.length<c;){var g=d[f],m=t?t(g):g;if(g=n||0!==g?g:0,!(p?Qt(p,m):s(h,m,n))){for(l=o;--l;){var v=u[l];if(!(v?Qt(v,m):s(e[l],m,n)))continue e}p&&p.push(m),h.push(g)}}return h}function Cr(e,t,n){var r=null==(e=_s(e,t=mi(t,e)))?e:e[Ms(Ys(t))];return null==r?i:wt(r,e,n)}function Rr(e){return Ja(e)&&wr(e)==g}function Ir(e,t,n,r,s){return e===t||(null==e||null==t||!Ja(e)&&!Ja(t)?e!=e&&t!=t:function(e,t,n,r,s,a){var o=Ga(e),l=Ga(t),u=o?m:hs(e),c=l?m:hs(t),h=(u=u==g?_:u)==_,d=(c=c==g?_:c)==_,f=u==c;if(f&&Ka(e)){if(!Ka(t))return!1;o=!0,h=!1}if(f&&!h)return a||(a=new Wn),o||oo(e)?Zi(e,t,n,r,s,a):function(e,t,n,r,i,s,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case v:case y:case w:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case k:case C:return e==t+"";case S:var o=sn;case L:var l=1&r;if(o||(o=ln),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Zi(o(e),o(t),r,i,s,a);return a.delete(e),c;case R:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,u,n,r,s,a);if(!(1&n)){var p=h&&De.call(e,"__wrapped__"),E=d&&De.call(t,"__wrapped__");if(p||E){var T=p?e.value():e,A=E?t.value():t;return a||(a=new Wn),s(T,A,n,r,a)}}return!!f&&(a||(a=new Wn),function(e,t,n,r,s,a){var o=1&n,l=es(e),u=l.length;if(u!=es(t).length&&!o)return!1;for(var c=u;c--;){var h=l[c];if(!(o?h in t:De.call(t,h)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=o;++c<u;){var m=e[h=l[c]],v=t[h];if(r)var y=o?r(v,m,h,t,e,a):r(m,v,h,e,t,a);if(!(y===i?m===v||s(m,v,n,r,a):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var b=e.constructor,E=t.constructor;b==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,s,a))}(e,t,n,r,Ir,s))}function xr(e,t,n,r){var s=n.length,a=s,o=!r;if(null==e)return!a;for(e=_e(e);s--;){var l=n[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var u=(l=n[s])[0],c=e[u],h=l[1];if(o&&l[2]){if(c===i&&!(u in e))return!1}else{var d=new Wn;if(r)var f=r(c,h,u,e,t,d);if(!(f===i?Ir(h,c,3,r,d):f))return!1}}return!0}function Pr(e){return!(!Za(e)||(t=e,Me&&Me in t))&&(qa(e)?Ue:ge).test(Ns(e));var t}function Dr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Ga(e)?Br(e[0],e[1]):Fr(e):hl(e)}function Or(e){if(!Es(e))return gn(e);var t=[];for(var n in _e(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Mr(e,t){return e<t}function Nr(e,t){var n=-1,i=Va(e)?r(e.length):[];return cr(e,(function(e,r,s){i[++n]=t(e,r,s)})),i}function Fr(e){var t=os(e);return 1==t.length&&t[0][2]?Ss(t[0][0],t[0][1]):function(n){return n===e||xr(n,e,t)}}function Br(e,t){return vs(e)&&Ts(t)?Ss(Ms(e),t):function(n){var r=Ao(n,e);return r===i&&r===t?ko(n,e):Ir(t,r,3)}}function Ur(e,t,n,r,s){e!==t&&mr(t,(function(a,o){if(s||(s=new Wn),Za(a))!function(e,t,n,r,s,a,o){var l=As(e,n),u=As(t,n),c=o.get(u);if(c)Zn(e,n,c);else{var h=a?a(l,u,n+"",e,t,o):i,d=h===i;if(d){var f=Ga(u),p=!f&&Ka(u),g=!f&&!p&&oo(u);h=u,f||p||g?Ga(l)?h=l:za(l)?h=ki(l):p?(d=!1,h=Ei(u,!0)):g?(d=!1,h=Si(u,!0)):h=[]:no(u)||Ha(u)?(h=l,Ha(l)?h=mo(l):Za(l)&&!qa(l)||(h=fs(u))):d=!1}d&&(o.set(u,h),s(h,u,r,a,o),o.delete(u)),Zn(e,n,h)}}(e,t,o,n,Ur,r,s);else{var l=r?r(As(e,o),a,o+"",e,t,s):i;l===i&&(l=a),Zn(e,o,l)}}),xo)}function $r(e,t){var n=e.length;if(n)return gs(t+=t<0?n:0,n)?e[t]:i}function Hr(e,t,n){t=t.length?xt(t,(function(e){return Ga(e)?function(t){return Tr(t,1===e.length?e[0]:e)}:e})):[nl];var r=-1;t=xt(t,qt(ss()));var i=Nr(e,(function(e,n,i){var s=xt(t,(function(t){return t(e)}));return{criteria:s,index:++r,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,a=i.length,o=n.length;++r<a;){var l=wi(i[r],s[r]);if(l)return r>=o?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(i)}function Gr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var a=t[r],o=Tr(e,a);n(o,a)&&Xr(s,mi(a,e),o)}return s}function jr(e,t,n,r){var i=r?$t:Ut,s=-1,a=t.length,o=e;for(e===t&&(t=ki(t)),n&&(o=xt(e,qt(n)));++s<a;)for(var l=0,u=t[s],c=n?n(u):u;(l=i(o,c,l,r))>-1;)o!==e&&We.call(o,l,1),We.call(e,l,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;gs(i)?We.call(e,i,1):li(e,i)}}return e}function zr(e,t){return e+ft(En()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Wr(e,t){return Cs(ws(e,t,nl),e+"")}function Yr(e){return qn(Uo(e))}function qr(e,t){var n=Uo(e);return xs(n,sr(t,0,n.length))}function Xr(e,t,n,r){if(!Za(e))return e;for(var s=-1,a=(t=mi(t,e)).length,o=a-1,l=e;null!=l&&++s<a;){var u=Ms(t[s]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(s!=o){var h=l[u];(c=r?r(h,u,l):i)===i&&(c=Za(h)?h:gs(t[s+1])?[]:{})}Jn(l,u,c),l=l[u]}return e}var Qr=Cn?function(e,t){return Cn.set(e,t),e}:nl,Zr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:nl;function Jr(e){return xs(Uo(e))}function ei(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=r(s);++i<s;)a[i]=e[i+t];return a}function ti(e,t){var n;return cr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,a=e[s];null!==a&&!ao(a)&&(n?a<=t:a<t)?r=s+1:i=s}return i}return ri(e,t,nl,n)}function ri(e,t,n,r){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,l=null===t,u=ao(t),c=t===i;s<a;){var h=ft((s+a)/2),d=n(e[h]),f=d!==i,p=null===d,g=d==d,m=ao(d);if(o)var v=r||g;else v=c?g&&(r||f):l?g&&f&&(r||!p):u?g&&f&&!p&&(r||!m):!p&&!m&&(r?d<=t:d<t);v?s=h+1:a=h}return vn(a,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var a=e[n],o=t?t(a):a;if(!n||!Ba(o,l)){var l=o;s[i++]=0===a?0:a}}return s}function si(e){return"number"==typeof e?e:ao(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Ga(e))return xt(e,ai)+"";if(ao(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function oi(e,t,n){var r=-1,i=Rt,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=It;else if(s>=200){var u=t?null:Ki(e);if(u)return ln(u);a=!1,i=Qt,l=new Kn}else l=t?[]:o;e:for(;++r<s;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),o.push(c)}else i(l,h,n)||(l!==o&&l.push(h),o.push(c))}return o}function li(e,t){return null==(e=_s(e,t=mi(t,e)))||delete e[Ms(Ys(t))]}function ui(e,t,n,r){return Xr(e,t,n(Tr(e,t)),r)}function ci(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?ei(e,r?0:s,r?s+1:i):ei(e,r?s+1:0,r?i:s)}function hi(e,t){var n=e;return n instanceof Gn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),n)}function di(e,t,n){var i=e.length;if(i<2)return i?oi(e[0]):[];for(var s=-1,a=r(i);++s<i;)for(var o=e[s],l=-1;++l<i;)l!=s&&(a[s]=ur(a[s]||o,e[l],t,n));return oi(gr(a,1),t,n)}function fi(e,t,n){for(var r=-1,s=e.length,a=t.length,o={};++r<s;){var l=r<a?t[r]:i;n(o,e[r],l)}return o}function pi(e){return za(e)?e:[]}function gi(e){return"function"==typeof e?e:nl}function mi(e,t){return Ga(e)?e:vs(e,t)?[e]:Os(vo(e))}var vi=Wr;function yi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var bi=at||function(e){return ht.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=je?je(n):new e.constructor(n);return e.copy(r),r}function Ti(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Si(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function wi(e,t){if(e!==t){var n=e!==i,r=null===e,s=e==e,a=ao(e),o=t!==i,l=null===t,u=t==t,c=ao(t);if(!l&&!c&&!a&&e>t||a&&o&&u&&!l&&!c||r&&o&&u||!n&&u||!s)return 1;if(!r&&!a&&!c&&e<t||c&&n&&s&&!r&&!a||l&&n&&s||!o&&s||!u)return-1}return 0}function _i(e,t,n,i){for(var s=-1,a=e.length,o=n.length,l=-1,u=t.length,c=mn(a-o,0),h=r(u+c),d=!i;++l<u;)h[l]=t[l];for(;++s<o;)(d||s<a)&&(h[n[s]]=e[s]);for(;c--;)h[l++]=e[s++];return h}function Ai(e,t,n,i){for(var s=-1,a=e.length,o=-1,l=n.length,u=-1,c=t.length,h=mn(a-l,0),d=r(h+c),f=!i;++s<h;)d[s]=e[s];for(var p=s;++u<c;)d[p+u]=t[u];for(;++o<l;)(f||s<a)&&(d[p+n[o]]=e[s++]);return d}function ki(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Li(e,t,n,r){var s=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],u=r?r(n[l],e[l],l,n,e):i;u===i&&(u=e[l]),s?rr(n,l,u):Jn(n,l,u)}return n}function Ci(e,t){return function(n,r){var i=Ga(n)?_t:tr,s=t?t():{};return i(n,e,ss(r,2),s)}}function Ri(e){return Wr((function(t,n){var r=-1,s=n.length,a=s>1?n[s-1]:i,o=s>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(s--,a):i,o&&ms(n[0],n[1],o)&&(a=s<3?i:a,s=1),t=_e(t);++r<s;){var l=n[r];l&&e(t,l,r,a)}return t}))}function Ii(e,t){return function(n,r){if(null==n)return n;if(!Va(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=_e(n);(t?s--:++s<i)&&!1!==r(a[s],s,a););return n}}function xi(e){return function(t,n,r){for(var i=-1,s=_e(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(!1===n(s[l],l,s))break}return t}}function Pi(e){return function(t){var n=rn(t=vo(t))?hn(t):i,r=n?n[0]:t.charAt(0),s=n?yi(n,1).join(""):t.slice(1);return r[e]()+s}}function Di(e){return function(t){return Dt(Xo(Go(t).replace(Xe,"")),e,"")}}function Oi(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=Un(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Mi(e){return function(t,n,r){var s=_e(t);if(!Va(t)){var a=ss(n,3);t=Io(t),n=function(e){return a(s[e],e,s)}}var o=e(t,n,r);return o>-1?s[a?t[o]:o]:i}}function Ni(e){return Ji((function(t){var n=t.length,r=n,a=Hn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Le(s);if(a&&!l&&"wrapper"==rs(o))var l=new Hn([],!0)}for(r=l?r:n;++r<n;){var u=rs(o=t[r]),c="wrapper"==u?ns(o):i;l=c&&ys(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[rs(c[0])].apply(l,c[3]):1==o.length&&ys(o)?l[u]():l.thru(o)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Ga(r))return l.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Fi(e,t,n,s,a,o,l,c,h,d){var f=t&u,p=1&t,g=2&t,m=24&t,v=512&t,y=g?i:Oi(e);return function u(){for(var b=arguments.length,E=r(b),T=b;T--;)E[T]=arguments[T];if(m)var S=is(u),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(E,S);if(s&&(E=_i(E,s,a,m)),o&&(E=Ai(E,o,l,m)),b-=w,m&&b<d){var _=on(E,S);return Vi(e,t,Fi,u.placeholder,n,E,_,c,h,d-b)}var A=p?n:this,k=g?A[e]:e;return b=E.length,c?E=function(e,t){for(var n=e.length,r=vn(t.length,n),s=ki(e);r--;){var a=t[r];e[r]=gs(a,n)?s[a]:i}return e}(E,c):v&&b>1&&E.reverse(),f&&h<b&&(E.length=h),this&&this!==ht&&this instanceof u&&(k=y||Oi(k)),k.apply(A,E)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Ui(e,t){return function(n,r){var s;if(n===i&&r===i)return t;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=si(n),r=si(r)),s=e(n,r)}return s}}function $i(e){return Ji((function(t){return t=xt(t,qt(ss())),Wr((function(n){var r=this;return e(t,(function(e){return wt(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Kr(t,e):t;var r=Kr(t,dt(e/cn(t)));return rn(t)?yi(hn(r),0,e).join(""):r.slice(0,e)}function Gi(e){return function(t,n,s){return s&&"number"!=typeof s&&ms(t,n,s)&&(n=s=i),t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,n,i){for(var s=-1,a=mn(dt((t-e)/(n||1)),0),o=r(a);a--;)o[i?a:++s]=e,e+=n;return o}(t,n,s=s===i?t<n?1:-1:ho(s),e)}}function ji(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=go(t),n=go(n)),e(t,n)}}function Vi(e,t,n,r,s,a,o,u,c,h){var d=8&t;t|=d?l:64,4&(t&=~(d?64:l))||(t&=-4);var f=[e,t,s,d?a:i,d?o:i,d?i:a,d?i:o,u,c,h],p=n.apply(i,f);return ys(e)&&ks(p,f),p.placeholder=r,Rs(p,e,t)}function zi(e){var t=we[e];return function(e,n){if(e=go(e),(n=null==n?0:vn(fo(n),292))&&Nt(e)){var r=(vo(e)+"e").split("e");return+((r=(vo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ki=An&&1/ln(new An([,-0]))[1]==c?function(e){return new An(e)}:ol;function Wi(e){return function(t){var n=hs(t);return n==S?sn(t):n==L?un(t):function(e,t){return xt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,a,c,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Le(s);var g=a?a.length:0;if(g||(t&=-97,a=c=i),d=d===i?d:mn(fo(d),0),f=f===i?f:fo(f),g-=c?c.length:0,64&t){var m=a,v=c;a=c=i}var y=p?i:ns(e),b=[e,t,n,a,c,m,v,h,d,f];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,a=r==u&&8==n||r==u&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?_i(c,l,t[4]):l,e[4]=c?on(e[3],o):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Ai(c,l,t[6]):l,e[6]=c?on(e[5],o):t[6]),(l=t[7])&&(e[7]=l),r&u&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,y),e=b[0],t=b[1],n=b[2],a=b[3],c=b[4],!(f=b[9]=b[9]===i?p?0:e.length:mn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?function(e,t,n){var s=Oi(e);return function a(){for(var o=arguments.length,l=r(o),u=o,c=is(a);u--;)l[u]=arguments[u];var h=o<3&&l[0]!==c&&l[o-1]!==c?[]:on(l,c);return(o-=h.length)<n?Vi(e,t,Fi,a.placeholder,i,l,h,i,i,n-o):wt(this&&this!==ht&&this instanceof a?s:e,this,l)}}(e,t,f):t!=l&&33!=t||c.length?Fi.apply(i,b):function(e,t,n,i){var s=1&t,a=Oi(e);return function t(){for(var o=-1,l=arguments.length,u=-1,c=i.length,h=r(c+l),d=this&&this!==ht&&this instanceof t?a:e;++u<c;)h[u]=i[u];for(;l--;)h[u++]=arguments[++o];return wt(d,s?n:this,h)}}(e,t,n,a);else var E=function(e,t,n){var r=1&t,i=Oi(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Rs((y?Qr:ks)(E,b),e,t)}function qi(e,t,n,r){return e===i||Ba(e,Ie[n])&&!De.call(r,n)?t:e}function Xi(e,t,n,r,s,a){return Za(e)&&Za(t)&&(a.set(t,e),Ur(e,t,i,Xi,a),a.delete(t)),e}function Qi(e){return no(e)?i:e}function Zi(e,t,n,r,s,a){var o=1&n,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,f=!0,p=2&n?new Kn:i;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(r)var v=o?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(v!==i){if(v)continue;f=!1;break}if(p){if(!Mt(t,(function(e,t){if(!Qt(p,t)&&(g===e||s(g,e,n,r,a)))return p.push(t)}))){f=!1;break}}else if(g!==m&&!s(g,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function Ji(e){return Cs(ws(e,i,js),e+"")}function es(e){return Sr(e,Io,us)}function ts(e){return Sr(e,xo,cs)}var ns=Cn?function(e){return Cn.get(e)}:ol;function rs(e){for(var t=e.name+"",n=Rn[t],r=De.call(Rn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function is(e){return(De.call(Bn,"placeholder")?Bn:e).placeholder}function ss(){var e=Bn.iteratee||rl;return e=e===rl?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function os(e){for(var t=Io(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ts(i)]}return t}function ls(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Pr(n)?n:i}var us=gt?function(e){return null==e?[]:(e=_e(e),Ct(gt(e),(function(t){return Ke.call(e,t)})))}:pl,cs=gt?function(e){for(var t=[];e;)Pt(t,us(e)),e=Ve(e);return t}:pl,hs=wr;function ds(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,s=!1;++r<i;){var a=Ms(t[r]);if(!(s=null!=e&&n(e,a)))break;e=e[a]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Qa(i)&&gs(a,i)&&(Ga(e)||Ha(e))}function fs(e){return"function"!=typeof e.constructor||Es(e)?{}:Un(Ve(e))}function ps(e){return Ga(e)||Ha(e)||!!(Ye&&e&&e[Ye])}function gs(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function ms(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?Va(n)&&gs(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function vs(e,t){if(Ga(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in _e(t)}function ys(e){var t=rs(e),n=Bn[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=ns(n);return!!r&&e===r[0]}(Sn&&hs(new Sn(new ArrayBuffer(1)))!=P||wn&&hs(new wn)!=S||_n&&hs(_n.resolve())!=A||An&&hs(new An)!=L||kn&&hs(new kn)!=I)&&(hs=function(e){var t=wr(e),n=t==_?e.constructor:i,r=n?Ns(n):"";if(r)switch(r){case In:return P;case xn:return S;case Pn:return A;case Dn:return L;case On:return I}return t});var bs=xe?qa:gl;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function Ts(e){return e==e&&!Za(e)}function Ss(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in _e(n))}}function ws(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=mn(i.length-t,0),o=r(a);++s<a;)o[s]=i[t+s];s=-1;for(var l=r(t+1);++s<t;)l[s]=i[s];return l[t]=n(o),wt(e,this,l)}}function _s(e,t){return t.length<2?e:Tr(e,ei(t,0,-1))}function As(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ks=Is(Qr),Ls=ct||function(e,t){return ht.setTimeout(e,t)},Cs=Is(Zr);function Rs(e,t,n){var r=t+"";return Cs(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(p,(function(n){var r="_."+n[0];t&n[1]&&!Rt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(oe):[]}(r),n)))}function Is(e){var t=0,n=0;return function(){var r=yn(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function xs(e,t){var n=-1,r=e.length,s=r-1;for(t=t===i?r:t;++n<t;){var a=zr(n,s),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Ps,Ds,Os=(Ps=Pa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Ds.size&&Ds.clear(),e})),Ds=Ps.cache,Ps);function Ms(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ns(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fs(e){if(e instanceof Gn)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=ki(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bs=Wr((function(e,t){return za(e)?ur(e,gr(t,1,za,!0)):[]})),Us=Wr((function(e,t){var n=Ys(t);return za(n)&&(n=i),za(e)?ur(e,gr(t,1,za,!0),ss(n,2)):[]})),$s=Wr((function(e,t){var n=Ys(t);return za(n)&&(n=i),za(e)?ur(e,gr(t,1,za,!0),i,n):[]}));function Hs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fo(n);return i<0&&(i=mn(r+i,0)),Bt(e,ss(t,3),i)}function Gs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r-1;return n!==i&&(s=fo(n),s=n<0?mn(r+s,0):vn(s,r-1)),Bt(e,ss(t,3),s,!0)}function js(e){return null!=e&&e.length?gr(e,1):[]}function Vs(e){return e&&e.length?e[0]:i}var zs=Wr((function(e){var t=xt(e,pi);return t.length&&t[0]===e[0]?Lr(t):[]})),Ks=Wr((function(e){var t=Ys(e),n=xt(e,pi);return t===Ys(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Lr(n,ss(t,2)):[]})),Ws=Wr((function(e){var t=Ys(e),n=xt(e,pi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Lr(n,i,t):[]}));function Ys(e){var t=null==e?0:e.length;return t?e[t-1]:i}var qs=Wr(Xs);function Xs(e,t){return e&&e.length&&t&&t.length?jr(e,t):e}var Qs=Ji((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Vr(e,xt(t,(function(e){return gs(e,n)?+e:e})).sort(wi)),r}));function Zs(e){return null==e?e:Tn.call(e)}var Js=Wr((function(e){return oi(gr(e,1,za,!0))})),ea=Wr((function(e){var t=Ys(e);return za(t)&&(t=i),oi(gr(e,1,za,!0),ss(t,2))})),ta=Wr((function(e){var t=Ys(e);return t="function"==typeof t?t:i,oi(gr(e,1,za,!0),i,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(za(e))return t=mn(e.length,t),!0})),Wt(t,(function(t){return xt(e,jt(t))}))}function ra(e,t){if(!e||!e.length)return[];var n=na(e);return null==t?n:xt(n,(function(e){return wt(t,i,e)}))}var ia=Wr((function(e,t){return za(e)?ur(e,t):[]})),sa=Wr((function(e){return di(Ct(e,za))})),aa=Wr((function(e){var t=Ys(e);return za(t)&&(t=i),di(Ct(e,za),ss(t,2))})),oa=Wr((function(e){var t=Ys(e);return t="function"==typeof t?t:i,di(Ct(e,za),i,t)})),la=Wr(na),ua=Wr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ra(e,n)}));function ca(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=Ji((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,s=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&gs(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[s],thisArg:i}),new Hn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)})),fa=Ci((function(e,t,n){De.call(e,n)?++e[n]:rr(e,n,1)})),pa=Mi(Hs),ga=Mi(Gs);function ma(e,t){return(Ga(e)?At:cr)(e,ss(t,3))}function va(e,t){return(Ga(e)?kt:hr)(e,ss(t,3))}var ya=Ci((function(e,t,n){De.call(e,n)?e[n].push(t):rr(e,n,[t])})),ba=Wr((function(e,t,n){var i=-1,s="function"==typeof t,a=Va(e)?r(e.length):[];return cr(e,(function(e){a[++i]=s?wt(t,e,n):Cr(e,t,n)})),a})),Ea=Ci((function(e,t,n){rr(e,n,t)}));function Ta(e,t){return(Ga(e)?xt:Nr)(e,ss(t,3))}var Sa=Ci((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),wa=Wr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ms(e,t[0],t[1])?t=[]:n>2&&ms(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,gr(t,1),[])})),_a=ut||function(){return ht.Date.now()};function Aa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,u,i,i,i,i,t)}function ka(e,t){var n;if("function"!=typeof t)throw new Le(s);return e=fo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var La=Wr((function(e,t,n){var r=1;if(n.length){var i=on(n,is(La));r|=l}return Yi(e,r,t,n,i)})),Ca=Wr((function(e,t,n){var r=3;if(n.length){var i=on(n,is(Ca));r|=l}return Yi(t,r,e,n,i)}));function Ra(e,t,n){var r,a,o,l,u,c,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Le(s);function g(t){var n=r,s=a;return r=a=i,h=t,l=e.apply(s,n)}function m(e){var n=e-c;return c===i||n>=t||n<0||f&&e-h>=o}function v(){var e=_a();if(m(e))return y(e);u=Ls(v,function(e){var n=t-(e-c);return f?vn(n,o-(e-h)):n}(e))}function y(e){return u=i,p&&r?g(e):(r=a=i,l)}function b(){var e=_a(),n=m(e);if(r=arguments,a=this,c=e,n){if(u===i)return function(e){return h=e,u=Ls(v,t),d?g(e):l}(c);if(f)return bi(u),u=Ls(v,t),g(c)}return u===i&&(u=Ls(v,t)),l}return t=go(t)||0,Za(n)&&(d=!!n.leading,o=(f="maxWait"in n)?mn(go(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==i&&bi(u),h=0,r=c=a=u=i},b.flush=function(){return u===i?l:y(_a())},b}var Ia=Wr((function(e,t){return lr(e,1,t)})),xa=Wr((function(e,t,n){return lr(e,go(t)||0,n)}));function Pa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Pa.Cache||zn),n}function Da(e){if("function"!=typeof e)throw new Le(s);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)}}Pa.Cache=zn;var Oa=vi((function(e,t){var n=(t=1==t.length&&Ga(t[0])?xt(t[0],qt(ss())):xt(gr(t,1),qt(ss()))).length;return Wr((function(r){for(var i=-1,s=vn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return wt(e,this,r)}))})),Ma=Wr((function(e,t){var n=on(t,is(Ma));return Yi(e,l,i,t,n)})),Na=Wr((function(e,t){var n=on(t,is(Na));return Yi(e,64,i,t,n)})),Fa=Ji((function(e,t){return Yi(e,256,i,i,i,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var Ua=ji(_r),$a=ji((function(e,t){return e>=t})),Ha=Rr(function(){return arguments}())?Rr:function(e){return Ja(e)&&De.call(e,"callee")&&!Ke.call(e,"callee")},Ga=r.isArray,ja=vt?qt(vt):function(e){return Ja(e)&&wr(e)==x};function Va(e){return null!=e&&Qa(e.length)&&!qa(e)}function za(e){return Ja(e)&&Va(e)}var Ka=mt||gl,Wa=yt?qt(yt):function(e){return Ja(e)&&wr(e)==y};function Ya(e){if(!Ja(e))return!1;var t=wr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!no(e)}function qa(e){if(!Za(e))return!1;var t=wr(e);return t==E||t==T||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==fo(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var eo=bt?qt(bt):function(e){return Ja(e)&&hs(e)==S};function to(e){return"number"==typeof e||Ja(e)&&wr(e)==w}function no(e){if(!Ja(e)||wr(e)!=_)return!1;var t=Ve(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==Fe}var ro=Et?qt(Et):function(e){return Ja(e)&&wr(e)==k},io=Tt?qt(Tt):function(e){return Ja(e)&&hs(e)==L};function so(e){return"string"==typeof e||!Ga(e)&&Ja(e)&&wr(e)==C}function ao(e){return"symbol"==typeof e||Ja(e)&&wr(e)==R}var oo=St?qt(St):function(e){return Ja(e)&&Qa(e.length)&&!!it[wr(e)]},lo=ji(Mr),uo=ji((function(e,t){return e<=t}));function co(e){if(!e)return[];if(Va(e))return so(e)?hn(e):ki(e);if(qe&&e[qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[qe]());var t=hs(e);return(t==S?sn:t==L?ln:Uo)(e)}function ho(e){return e?(e=go(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fo(e){var t=ho(e),n=t%1;return t==t?n?t-n:t:0}function po(e){return e?sr(fo(e),0,f):0}function go(e){if("number"==typeof e)return e;if(ao(e))return d;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=pe.test(e);return n||me.test(e)?lt(e.slice(2),n?2:8):fe.test(e)?d:+e}function mo(e){return Li(e,xo(e))}function vo(e){return null==e?"":ai(e)}var yo=Ri((function(e,t){if(Es(t)||Va(t))Li(t,Io(t),e);else for(var n in t)De.call(t,n)&&Jn(e,n,t[n])})),bo=Ri((function(e,t){Li(t,xo(t),e)})),Eo=Ri((function(e,t,n,r){Li(t,xo(t),e,r)})),To=Ri((function(e,t,n,r){Li(t,Io(t),e,r)})),So=Ji(ir),wo=Wr((function(e,t){e=_e(e);var n=-1,r=t.length,s=r>2?t[2]:i;for(s&&ms(t[0],t[1],s)&&(r=1);++n<r;)for(var a=t[n],o=xo(a),l=-1,u=o.length;++l<u;){var c=o[l],h=e[c];(h===i||Ba(h,Ie[c])&&!De.call(e,c))&&(e[c]=a[c])}return e})),_o=Wr((function(e){return e.push(i,Xi),wt(Do,i,e)}));function Ao(e,t,n){var r=null==e?i:Tr(e,t);return r===i?n:r}function ko(e,t){return null!=e&&ds(e,t,kr)}var Lo=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),Jo(nl)),Co=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),ss),Ro=Wr(Cr);function Io(e){return Va(e)?Yn(e):Or(e)}function xo(e){return Va(e)?Yn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in _e(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var Po=Ri((function(e,t,n){Ur(e,t,n)})),Do=Ri((function(e,t,n,r){Ur(e,t,n,r)})),Oo=Ji((function(e,t){var n={};if(null==e)return n;var r=!1;t=xt(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Li(e,ts(e),n),r&&(n=ar(n,7,Qi));for(var i=t.length;i--;)li(n,t[i]);return n})),Mo=Ji((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return ko(e,n)}))}(e,t)}));function No(e,t){if(null==e)return{};var n=xt(ts(e),(function(e){return[e]}));return t=ss(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Fo=Wi(Io),Bo=Wi(xo);function Uo(e){return null==e?[]:Xt(e,Io(e))}var $o=Di((function(e,t,n){return t=t.toLowerCase(),e+(n?Ho(t):t)}));function Ho(e){return qo(vo(e).toLowerCase())}function Go(e){return(e=vo(e))&&e.replace(ye,en).replace(Qe,"")}var jo=Di((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vo=Di((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zo=Pi("toLowerCase"),Ko=Di((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Wo=Di((function(e,t,n){return e+(n?" ":"")+qo(t)})),Yo=Di((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),qo=Pi("toUpperCase");function Xo(e,t,n){return e=vo(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Qo=Wr((function(e,t){try{return wt(e,i,t)}catch(e){return Ya(e)?e:new Te(e)}})),Zo=Ji((function(e,t){return At(t,(function(t){t=Ms(t),rr(e,t,La(e[t],e))})),e}));function Jo(e){return function(){return e}}var el=Ni(),tl=Ni(!0);function nl(e){return e}function rl(e){return Dr("function"==typeof e?e:ar(e,1))}var il=Wr((function(e,t){return function(n){return Cr(n,e,t)}})),sl=Wr((function(e,t){return function(n){return Cr(e,n,t)}}));function al(e,t,n){var r=Io(t),i=Er(t,r);null!=n||Za(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Io(t)));var s=!(Za(n)&&"chain"in n&&!n.chain),a=qa(e);return At(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=ki(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Pt([this.value()],arguments))})})),e}function ol(){}var ll=$i(xt),ul=$i(Lt),cl=$i(Mt);function hl(e){return vs(e)?jt(Ms(e)):function(e){return function(t){return Tr(t,e)}}(e)}var dl=Gi(),fl=Gi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Ui((function(e,t){return e+t}),0),yl=zi("ceil"),bl=Ui((function(e,t){return e/t}),1),El=zi("floor"),Tl=Ui((function(e,t){return e*t}),1),Sl=zi("round"),wl=Ui((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Le(s);return e=fo(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Aa,Bn.assign=yo,Bn.assignIn=bo,Bn.assignInWith=Eo,Bn.assignWith=To,Bn.at=So,Bn.before=ka,Bn.bind=La,Bn.bindAll=Zo,Bn.bindKey=Ca,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Bn.chain=ca,Bn.chunk=function(e,t,n){t=(n?ms(e,t,n):t===i)?1:mn(fo(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var a=0,o=0,l=r(dt(s/t));a<s;)l[o++]=ei(e,a,a+=t);return l},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Pt(Ga(n)?ki(n):[n],gr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=ss();return e=t?xt(e,(function(e){if("function"!=typeof e[1])throw new Le(s);return[n(e[0]),e[1]]})):[],Wr((function(n){for(var r=-1;++r<t;){var i=e[r];if(wt(i[0],this,n))return wt(i[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=Io(e);return function(n){return or(n,e,t)}}(ar(e,1))},Bn.constant=Jo,Bn.countBy=fa,Bn.create=function(e,t){var n=Un(e);return null==t?n:nr(n,t)},Bn.curry=function e(t,n,r){var s=Yi(t,8,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},Bn.curryRight=function e(t,n,r){var s=Yi(t,16,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},Bn.debounce=Ra,Bn.defaults=wo,Bn.defaultsDeep=_o,Bn.defer=Ia,Bn.delay=xa,Bn.difference=Bs,Bn.differenceBy=Us,Bn.differenceWith=$s,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:fo(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:fo(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?ci(e,ss(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?ci(e,ss(t,3),!0):[]},Bn.fill=function(e,t,n,r){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&ms(e,t,n)&&(n=0,r=s),function(e,t,n,r){var s=e.length;for((n=fo(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:fo(r))<0&&(r+=s),r=n>r?0:po(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Ga(e)?Ct:pr)(e,ss(t,3))},Bn.flatMap=function(e,t){return gr(Ta(e,t),1)},Bn.flatMapDeep=function(e,t){return gr(Ta(e,t),c)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:fo(n),gr(Ta(e,t),n)},Bn.flatten=js,Bn.flattenDeep=function(e){return null!=e&&e.length?gr(e,c):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===i?1:fo(t)):[]},Bn.flip=function(e){return Yi(e,512)},Bn.flow=el,Bn.flowRight=tl,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:Er(e,Io(e))},Bn.functionsIn=function(e){return null==e?[]:Er(e,xo(e))},Bn.groupBy=ya,Bn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Bn.intersection=zs,Bn.intersectionBy=Ks,Bn.intersectionWith=Ws,Bn.invert=Lo,Bn.invertBy=Co,Bn.invokeMap=ba,Bn.iteratee=rl,Bn.keyBy=Ea,Bn.keys=Io,Bn.keysIn=xo,Bn.map=Ta,Bn.mapKeys=function(e,t){var n={};return t=ss(t,3),yr(e,(function(e,r,i){rr(n,t(e,r,i),e)})),n},Bn.mapValues=function(e,t){var n={};return t=ss(t,3),yr(e,(function(e,r,i){rr(n,r,t(e,r,i))})),n},Bn.matches=function(e){return Fr(ar(e,1))},Bn.matchesProperty=function(e,t){return Br(e,ar(t,1))},Bn.memoize=Pa,Bn.merge=Po,Bn.mergeWith=Do,Bn.method=il,Bn.methodOf=sl,Bn.mixin=al,Bn.negate=Da,Bn.nthArg=function(e){return e=fo(e),Wr((function(t){return $r(t,e)}))},Bn.omit=Oo,Bn.omitBy=function(e,t){return No(e,Da(ss(t)))},Bn.once=function(e){return ka(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Ga(t)||(t=null==t?[]:[t]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Hr(e,t,n))},Bn.over=ll,Bn.overArgs=Oa,Bn.overEvery=ul,Bn.overSome=cl,Bn.partial=Ma,Bn.partialRight=Na,Bn.partition=Sa,Bn.pick=Mo,Bn.pickBy=No,Bn.property=hl,Bn.propertyOf=function(e){return function(t){return null==e?i:Tr(e,t)}},Bn.pull=qs,Bn.pullAll=Xs,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?jr(e,t,ss(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?jr(e,t,i,n):e},Bn.pullAt=Qs,Bn.range=dl,Bn.rangeRight=fl,Bn.rearg=Fa,Bn.reject=function(e,t){return(Ga(e)?Ct:pr)(e,Da(ss(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=ss(t,3);++r<s;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Vr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Le(s);return Wr(e,t=t===i?t:fo(t))},Bn.reverse=Zs,Bn.sampleSize=function(e,t,n){return t=(n?ms(e,t,n):t===i)?1:fo(t),(Ga(e)?Xn:qr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Xr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Xr(e,t,n,r)},Bn.shuffle=function(e){return(Ga(e)?Qn:Jr)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ms(e,t,n)?(t=0,n=r):(t=null==t?0:fo(t),n=n===i?r:fo(n)),ei(e,t,n)):[]},Bn.sortBy=wa,Bn.sortedUniq=function(e){return e&&e.length?ii(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,ss(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&ms(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=vo(e))&&("string"==typeof t||null!=t&&!ro(t))&&!(t=ai(t))&&rn(e)?yi(hn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Le(s);return t=null==t?0:mn(fo(t),0),Wr((function(n){var r=n[t],i=yi(n,0,t);return r&&Pt(i,r),wt(e,this,i)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:fo(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:fo(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?ci(e,ss(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?ci(e,ss(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Le(s);return Za(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ra(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ha,Bn.toArray=co,Bn.toPairs=Fo,Bn.toPairsIn=Bo,Bn.toPath=function(e){return Ga(e)?xt(e,Ms):ao(e)?[e]:ki(Os(vo(e)))},Bn.toPlainObject=mo,Bn.transform=function(e,t,n){var r=Ga(e),i=r||Ka(e)||oo(e);if(t=ss(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:Za(e)&&qa(s)?Un(Ve(e)):{}}return(i?At:yr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Bn.unary=function(e){return Aa(e,1)},Bn.union=Js,Bn.unionBy=ea,Bn.unionWith=ta,Bn.uniq=function(e){return e&&e.length?oi(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?oi(e,ss(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?oi(e,i,t):[]},Bn.unset=function(e,t){return null==e||li(e,t)},Bn.unzip=na,Bn.unzipWith=ra,Bn.update=function(e,t,n){return null==e?e:ui(e,t,gi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ui(e,t,gi(n),r)},Bn.values=Uo,Bn.valuesIn=function(e){return null==e?[]:Xt(e,xo(e))},Bn.without=ia,Bn.words=Xo,Bn.wrap=function(e,t){return Ma(gi(t),e)},Bn.xor=sa,Bn.xorBy=aa,Bn.xorWith=oa,Bn.zip=la,Bn.zipObject=function(e,t){return fi(e||[],t||[],Jn)},Bn.zipObjectDeep=function(e,t){return fi(e||[],t||[],Xr)},Bn.zipWith=ua,Bn.entries=Fo,Bn.entriesIn=Bo,Bn.extend=bo,Bn.extendWith=Eo,al(Bn,Bn),Bn.add=vl,Bn.attempt=Qo,Bn.camelCase=$o,Bn.capitalize=Ho,Bn.ceil=yl,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=go(n))==n?n:0),t!==i&&(t=(t=go(t))==t?t:0),sr(go(e),t,n)},Bn.clone=function(e){return ar(e,4)},Bn.cloneDeep=function(e){return ar(e,5)},Bn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||or(e,t,Io(t))},Bn.deburr=Go,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=bl,Bn.endsWith=function(e,t,n){e=vo(e),t=ai(t);var r=e.length,s=n=n===i?r:sr(fo(n),0,r);return(n-=t.length)>=0&&e.slice(n,s)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=vo(e))&&Y.test(e)?e.replace(K,tn):e},Bn.escapeRegExp=function(e){return(e=vo(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Bn.every=function(e,t,n){var r=Ga(e)?Lt:dr;return n&&ms(e,t,n)&&(t=i),r(e,ss(t,3))},Bn.find=pa,Bn.findIndex=Hs,Bn.findKey=function(e,t){return Ft(e,ss(t,3),yr)},Bn.findLast=ga,Bn.findLastIndex=Gs,Bn.findLastKey=function(e,t){return Ft(e,ss(t,3),br)},Bn.floor=El,Bn.forEach=ma,Bn.forEachRight=va,Bn.forIn=function(e,t){return null==e?e:mr(e,ss(t,3),xo)},Bn.forInRight=function(e,t){return null==e?e:vr(e,ss(t,3),xo)},Bn.forOwn=function(e,t){return e&&yr(e,ss(t,3))},Bn.forOwnRight=function(e,t){return e&&br(e,ss(t,3))},Bn.get=Ao,Bn.gt=Ua,Bn.gte=$a,Bn.has=function(e,t){return null!=e&&ds(e,t,Ar)},Bn.hasIn=ko,Bn.head=Vs,Bn.identity=nl,Bn.includes=function(e,t,n,r){e=Va(e)?e:Uo(e),n=n&&!r?fo(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),so(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fo(n);return i<0&&(i=mn(r+i,0)),Ut(e,t,i)},Bn.inRange=function(e,t,n){return t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,n){return e>=vn(t,n)&&e<mn(t,n)}(e=go(e),t,n)},Bn.invoke=Ro,Bn.isArguments=Ha,Bn.isArray=Ga,Bn.isArrayBuffer=ja,Bn.isArrayLike=Va,Bn.isArrayLikeObject=za,Bn.isBoolean=function(e){return!0===e||!1===e||Ja(e)&&wr(e)==v},Bn.isBuffer=Ka,Bn.isDate=Wa,Bn.isElement=function(e){return Ja(e)&&1===e.nodeType&&!no(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Va(e)&&(Ga(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||oo(e)||Ha(e)))return!e.length;var t=hs(e);if(t==S||t==L)return!e.size;if(Es(e))return!Or(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Ir(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Ir(e,t,i,n):!!r},Bn.isError=Ya,Bn.isFinite=function(e){return"number"==typeof e&&Nt(e)},Bn.isFunction=qa,Bn.isInteger=Xa,Bn.isLength=Qa,Bn.isMap=eo,Bn.isMatch=function(e,t){return e===t||xr(e,t,os(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,xr(e,t,os(t),n)},Bn.isNaN=function(e){return to(e)&&e!=+e},Bn.isNative=function(e){if(bs(e))throw new Te("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=to,Bn.isObject=Za,Bn.isObjectLike=Ja,Bn.isPlainObject=no,Bn.isRegExp=ro,Bn.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=h},Bn.isSet=io,Bn.isString=so,Bn.isSymbol=ao,Bn.isTypedArray=oo,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return Ja(e)&&hs(e)==I},Bn.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==wr(e)},Bn.join=function(e,t){return null==e?"":Vt.call(e,t)},Bn.kebabCase=jo,Bn.last=Ys,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=fo(n))<0?mn(r+s,0):vn(s,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,s):Bt(e,Ht,s,!0)},Bn.lowerCase=Vo,Bn.lowerFirst=zo,Bn.lt=lo,Bn.lte=uo,Bn.max=function(e){return e&&e.length?fr(e,nl,_r):i},Bn.maxBy=function(e,t){return e&&e.length?fr(e,ss(t,2),_r):i},Bn.mean=function(e){return Gt(e,nl)},Bn.meanBy=function(e,t){return Gt(e,ss(t,2))},Bn.min=function(e){return e&&e.length?fr(e,nl,Mr):i},Bn.minBy=function(e,t){return e&&e.length?fr(e,ss(t,2),Mr):i},Bn.stubArray=pl,Bn.stubFalse=gl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Tl,Bn.nth=function(e,t){return e&&e.length?$r(e,fo(t)):i},Bn.noConflict=function(){return ht._===this&&(ht._=Be),this},Bn.noop=ol,Bn.now=_a,Bn.pad=function(e,t,n){e=vo(e);var r=(t=fo(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(ft(i),n)+e+Hi(dt(i),n)},Bn.padEnd=function(e,t,n){e=vo(e);var r=(t=fo(t))?cn(e):0;return t&&r<t?e+Hi(t-r,n):e},Bn.padStart=function(e,t,n){e=vo(e);var r=(t=fo(t))?cn(e):0;return t&&r<t?Hi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(vo(e).replace(re,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ms(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var s=En();return vn(e+s*(t-e+ot("1e-"+((s+"").length-1))),t)}return zr(e,t)},Bn.reduce=function(e,t,n){var r=Ga(e)?Dt:zt,i=arguments.length<3;return r(e,ss(t,4),n,i,cr)},Bn.reduceRight=function(e,t,n){var r=Ga(e)?Ot:zt,i=arguments.length<3;return r(e,ss(t,4),n,i,hr)},Bn.repeat=function(e,t,n){return t=(n?ms(e,t,n):t===i)?1:fo(t),Kr(vo(e),t)},Bn.replace=function(){var e=arguments,t=vo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,s=(t=mi(t,e)).length;for(s||(s=1,e=i);++r<s;){var a=null==e?i:e[Ms(t[r])];a===i&&(r=s,a=n),e=qa(a)?a.call(e):a}return e},Bn.round=Sl,Bn.runInContext=e,Bn.sample=function(e){return(Ga(e)?qn:Yr)(e)},Bn.size=function(e){if(null==e)return 0;if(Va(e))return so(e)?cn(e):e.length;var t=hs(e);return t==S||t==L?e.size:Or(e).length},Bn.snakeCase=Ko,Bn.some=function(e,t,n){var r=Ga(e)?Mt:ti;return n&&ms(e,t,n)&&(t=i),r(e,ss(t,3))},Bn.sortedIndex=function(e,t){return ni(e,t)},Bn.sortedIndexBy=function(e,t,n){return ri(e,t,ss(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return ni(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ri(e,t,ss(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Bn.startCase=Wo,Bn.startsWith=function(e,t,n){return e=vo(e),n=null==n?0:sr(fo(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Bn.subtract=wl,Bn.sum=function(e){return e&&e.length?Kt(e,nl):0},Bn.sumBy=function(e,t){return e&&e.length?Kt(e,ss(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&ms(e,t,n)&&(t=i),e=vo(e),t=Eo({},t,r,qi);var s,a,o=Eo({},t.imports,r.imports,qi),l=Io(o),u=Xt(o,l),c=0,h=t.interpolate||be,d="__p += '",f=Ae((t.escape||be).source+"|"+h.source+"|"+(h===Q?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,i,o,l){return r||(r=i),d+=e.slice(c,l).replace(Ee,nn),n&&(s=!0,d+="' +\n__e("+n+") +\n'"),o&&(a=!0,d+="';\n"+o+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),d+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Te("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(G,""):d).replace(j,"$1").replace(V,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Qo((function(){return Se(l,p+"return "+d).apply(i,u)}));if(m.source=d,Ya(m))throw m;return m},Bn.times=function(e,t){if((e=fo(e))<1||e>h)return[];var n=f,r=vn(e,f);t=ss(t),e-=f;for(var i=Wt(r,t);++n<e;)t(n);return i},Bn.toFinite=ho,Bn.toInteger=fo,Bn.toLength=po,Bn.toLower=function(e){return vo(e).toLowerCase()},Bn.toNumber=go,Bn.toSafeInteger=function(e){return e?sr(fo(e),-9007199254740991,h):0===e?e:0},Bn.toString=vo,Bn.toUpper=function(e){return vo(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=vo(e))&&(n||t===i))return Yt(e);if(!e||!(t=ai(t)))return e;var r=hn(e),s=hn(t);return yi(r,Zt(r,s),Jt(r,s)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=vo(e))&&(n||t===i))return e.slice(0,dn(e)+1);if(!e||!(t=ai(t)))return e;var r=hn(e);return yi(r,0,Jt(r,hn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=vo(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=hn(e);return yi(r,Zt(r,hn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(Za(t)){var s="separator"in t?t.separator:s;n="length"in t?fo(t.length):n,r="omission"in t?ai(t.omission):r}var a=(e=vo(e)).length;if(rn(e)){var o=hn(e);a=o.length}if(n>=a)return e;var l=n-cn(r);if(l<1)return r;var u=o?yi(o,0,l).join(""):e.slice(0,l);if(s===i)return u+r;if(o&&(l+=u.length-l),ro(s)){if(e.slice(l).search(s)){var c,h=u;for(s.global||(s=Ae(s.source,vo(de.exec(s))+"g")),s.lastIndex=0;c=s.exec(h);)var d=c.index;u=u.slice(0,d===i?l:d)}}else if(e.indexOf(ai(s),l)!=l){var f=u.lastIndexOf(s);f>-1&&(u=u.slice(0,f))}return u+r},Bn.unescape=function(e){return(e=vo(e))&&W.test(e)?e.replace(z,fn):e},Bn.uniqueId=function(e){var t=++Oe;return vo(e)+t},Bn.upperCase=Yo,Bn.upperFirst=qo,Bn.each=ma,Bn.eachRight=va,Bn.first=Vs,al(Bn,(ml={},yr(Bn,(function(e,t){De.call(Bn.prototype,t)||(ml[t]=e)})),ml),{chain:!1}),Bn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),At(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===i?1:mn(fo(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),At(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),At(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(nl)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Wr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Cr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Da(ss(e)))},Gn.prototype.slice=function(e,t){e=fo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=fo(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(f)},yr(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);s&&(Bn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,l=t instanceof Gn,u=o[0],c=l||Ga(t),h=function(e){var t=s.apply(Bn,Pt([e],o));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&c){t=g?t:new Gn(this);var m=e.apply(t,o);return m.__actions__.push({func:ha,args:[h],thisArg:i}),new Hn(m,d)}return p&&g?e.apply(this,o):(m=this.thru(h),p?r?m.value()[0]:m.value():m)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ga(i)?i:[],e)}return this[n]((function(n){return t.apply(Ga(n)?n:[],e)}))}})),yr(Gn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";De.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[Fi(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=ki(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ki(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ki(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ga(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=s.start,o=s.end,l=o-a,u=r?o:a-1,c=this.__iteratees__,h=c.length,d=0,f=vn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return hi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[u+=t];++g<h;){var v=c[g],y=v.iteratee,b=v.type,E=y(m);if(2==b)m=E;else if(!E){if(1==b)continue e;break e}}p[d++]=m}return p},Bn.prototype.at=da,Bn.prototype.chain=function(){return ca(this)},Bn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var r=Fs(n);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;n=n.__wrapped__}return s.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Zs],thisArg:i}),new Hn(t,this.__chain__)}return this.thru(Zs)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,qe&&(Bn.prototype[qe]=function(){return this}),Bn}();ht._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},5387:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5466:function(e,t,n){"use strict";n.d(t,{aq:function(){return Ce},RV:function(){return w},Ec:function(){return Ie},MI:function(){return Le},Tj:function(){return q},kx:function(){return pe},Rs:function(){return Ge},OX:function(){return A},HX:function(){return Ye},ZJ:function(){return Ke},__:function(){return C},FI:function(){return R},le:function(){return Te},bX:function(){return x},Wd:function(){return O},WU:function(){return V},Wg:function(){return ke},oq:function(){return Ae},at:function(){return _e},is:function(){return k},$7:function(){return qe},n4:function(){return L},lQ:function(){return _},er:function(){return i},DV:function(){return xe},$r:function(){return I},CH:function(){return Ze},Es:function(){return Xe},MA:function(){return Je},H5:function(){return et},NQ:function(){return nt}});var r=b(),i=e=>g(e,r),s=b();i.write=e=>g(e,s);var a=b();i.onStart=e=>g(e,a);var o=b();i.onFrame=e=>g(e,o);var l=b();i.onFinish=e=>g(e,l);var u=[];i.setTimeout=(e,t)=>{const n=i.now()+t,r=()=>{const e=u.findIndex((e=>e.cancel==r));~e&&u.splice(e,1),f-=~e?1:0},s={time:n,handler:e,cancel:r};return u.splice(c(n),0,s),f+=1,m(),s};var c=e=>~(~u.findIndex((t=>t.time>e))||~u.length);i.cancel=e=>{a.delete(e),o.delete(e),l.delete(e),r.delete(e),s.delete(e)},i.sync=e=>{p=!0,i.batchedUpdates(e),p=!1},i.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,i.onStart(n)}return r.handler=e,r.cancel=()=>{a.delete(n),t=null},r};var h="undefined"!=typeof window?window.requestAnimationFrame:()=>{};i.use=e=>h=e,i.now="undefined"!=typeof performance?()=>performance.now():Date.now,i.batchedUpdates=e=>e(),i.catch=console.error,i.frameLoop="always",i.advance=()=>{"demand"!==i.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):y()};var d=-1,f=0,p=!1;function g(e,t){p?(t.delete(e),e(0)):(t.add(e),m())}function m(){d<0&&(d=0,"demand"!==i.frameLoop&&h(v))}function v(){~d&&(h(v),i.batchedUpdates(y))}function y(){const e=d;d=i.now();const t=c(d);t&&(E(u.splice(0,t),(e=>e.handler())),f-=t),f?(a.flush(),r.flush(e?Math.min(64,d-e):16.667),o.flush(),s.flush(),l.flush()):d=-1}function b(){let e=new Set,t=e;return{add(n){f+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return f-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,f-=t.size,E(t,(t=>t(n)&&e.add(t))),f+=e.size,t=e)}}}function E(e,t){e.forEach((e=>{try{t(e)}catch(e){i.catch(e)}}))}var T=n(4041),S=Object.defineProperty,w={};function _(){}((e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})})(w,{assign:()=>U,colors:()=>N,createStringInterpolator:()=>P,skipAnimation:()=>F,to:()=>D,willAdvance:()=>B});var A=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),k={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function L(e,t){if(k.arr(e)){if(!k.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var C=(e,t)=>e.forEach(t);function R(e,t,n){if(k.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var I=e=>k.und(e)?[]:k.arr(e)?e:[e];function x(e,t){if(e.size){const n=Array.from(e);e.clear(),C(n,t)}}var P,D,O=(e,...t)=>x(e,(e=>e(...t))),M=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),N=null,F=!1,B=_,U=e=>{e.to&&(D=e.to),e.now&&(i.now=e.now),void 0!==e.colors&&(N=e.colors),null!=e.skipAnimation&&(F=e.skipAnimation),e.createStringInterpolator&&(P=e.createStringInterpolator),e.requestAnimationFrame&&i.use(e.requestAnimationFrame),e.batchedUpdates&&(i.batchedUpdates=e.batchedUpdates),e.willAdvance&&(B=e.willAdvance),e.frameLoop&&(i.frameLoop=e.frameLoop)},$=new Set,H=[],G=[],j=0,V={get idle(){return!$.size&&!H.length},start(e){j>e.priority?($.add(e),i.onStart(z)):(K(e),i(Y))},advance:Y,sort(e){if(j)i.onFrame((()=>V.sort(e)));else{const t=H.indexOf(e);~t&&(H.splice(t,1),W(e))}},clear(){H=[],$.clear()}};function z(){$.forEach(K),$.clear(),i(Y)}function K(e){H.includes(e)||W(e)}function W(e){H.splice(function(t){const n=t.findIndex((t=>t.priority>e.priority));return n<0?t.length:n}(H),0,e)}function Y(e){const t=G;for(let n=0;n<H.length;n++){const r=H[n];j=r.priority,r.idle||(B(r),r.advance(e),r.idle||t.push(r))}return j=0,(G=H).length=0,(H=t).length>0}var q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},X="[-+]?\\d*\\.?\\d+",Q=X+"%";function Z(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var J=new RegExp("rgb"+Z(X,X,X)),ee=new RegExp("rgba"+Z(X,X,X,X)),te=new RegExp("hsl"+Z(X,Q,Q)),ne=new RegExp("hsla"+Z(X,Q,Q,X)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,se=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function oe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function le(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=oe(i,r,e+1/3),a=oe(i,r,e),o=oe(i,r,e-1/3);return Math.round(255*s)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function ue(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ce(e){return(parseFloat(e)%360+360)%360/360}function he(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=se.exec(e))?parseInt(t[1]+"ff",16)>>>0:N&&void 0!==N[e]?N[e]:(t=J.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|255)>>>0:(t=ee.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|he(t[4]))>>>0:(t=re.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ae.exec(e))?parseInt(t[1],16)>>>0:(t=ie.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=te.exec(e))?(255|le(ce(t[1]),de(t[2]),de(t[3])))>>>0:(t=ne.exec(e))?(le(ce(t[1]),de(t[2]),de(t[3]))|he(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var pe=(e,t,n)=>{if(k.fun(e))return e;if(k.arr(e))return pe({range:e,output:t,extrapolate:n});if(k.str(e.output[0]))return P(e);const r=e,i=r.output,s=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,s);return function(e,t,n,r,i,s,a,o,l){let u=l?l(e):e;if(u<t){if("identity"===a)return u;"clamp"===a&&(u=t)}if(u>n){if("identity"===o)return u;"clamp"===o&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=s(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r,u)}(e,s[t],s[t+1],i[t],i[t+1],l,a,o,r.map)}},ge=1.70158,me=1.525*ge,ve=ge+1,ye=2*Math.PI/3,be=2*Math.PI/4.5,Ee=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Te={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ve*e*e*e-ge*e*e,easeOutBack:e=>1+ve*Math.pow(e-1,3)+ge*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-me)/2:(Math.pow(2*e-2,2)*((me+1)*(2*e-2)+me)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ye),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ye)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*be)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*be)/2+1,easeInBounce:e=>1-Ee(1-e),easeOutBounce:Ee,easeInOutBounce:e=>e<.5?(1-Ee(1-2*e))/2:(1+Ee(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return i=("end"===t?Math.floor(r):Math.ceil(r))/e,Math.min(Math.max(i,0),1);var i}},Se=Symbol.for("FluidValue.get"),we=Symbol.for("FluidValue.observers"),_e=e=>Boolean(e&&e[Se]),Ae=e=>e&&e[Se]?e[Se]():e,ke=e=>e[we]||null;function Le(e,t){const n=e[we];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ce=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Re(this,e)}},Re=(e,t)=>De(e,Se,t);function Ie(e,t){if(e[Se]){let n=e[we];n||De(e,we,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function xe(e,t){const n=e[we];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[we]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Pe,De=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Oe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Me=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ne=new RegExp(`(${Oe.source})(%|[a-z]+)`,"i"),Fe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Be=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ue=e=>{const[t,n]=$e(e);if(!t||M())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Be.test(n)?Ue(n):n||e},$e=e=>{const t=Be.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},He=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Ge=e=>{Pe||(Pe=N?new RegExp(`(${Object.keys(N).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ae(e).replace(Be,Ue).replace(Me,fe).replace(Pe,fe))),n=t.map((e=>e.match(Oe).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>pe({...e,output:t})));return e=>{const n=!Ne.test(t[0])&&t.find((e=>Ne.test(e)))?.replace(Oe,"");let i=0;return t[0].replace(Oe,(()=>`${r[i++](e)}${n||""}`)).replace(Fe,He)}},je="react-spring: ",Ve=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${je}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},ze=Ve(console.warn);function Ke(){ze(`${je}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var We=Ve(console.warn);function Ye(){We(`${je}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function qe(e){return k.str(e)&&("#"==e[0]||/\d/.test(e)||!M()&&Be.test(e)||e in(N||{}))}var Xe=M()?T.useEffect:T.useLayoutEffect,Qe=()=>{const e=(0,T.useRef)(!1);return Xe((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function Ze(){const e=(0,T.useState)()[1],t=Qe();return()=>{t.current&&e(Math.random())}}function Je(e,t){const[n]=(0,T.useState)((()=>({inputs:t,result:e()}))),r=(0,T.useRef)(),i=r.current;let s=i;return s?Boolean(t&&s.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,s.inputs))||(s={inputs:t,result:e()}):s=n,(0,T.useEffect)((()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)}),[s]),s.result}var et=e=>(0,T.useEffect)(e,tt),tt=[];function nt(e){const t=(0,T.useRef)();return(0,T.useEffect)((()=>{t.current=e})),t.current}},5502:function(e,t,n){"use strict";function r(e,t){this.v=e,this.k=t}function i(e,t,n,r){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}i=function(e,t,n,r){if(t)s?s(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){i(e,t,(function(e){return this._invoke(t,n,e)}))};a("next",0),a("throw",1),a("return",2)}},i(e,t,n,r)}function s(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,s,a){var o=r&&r.prototype instanceof u?r:u,c=Object.create(o.prototype);return i(c,"_invoke",function(n,r,i){var s,a,o,u=0,c=i||[],h=!1,d={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return s=t,a=0,o=e,d.n=n,l}};function f(n,r){for(a=n,o=r,t=0;!h&&u&&!i&&t<c.length;t++){var i,s=c[t],f=d.p,p=s[2];n>3?(i=p===r)&&(o=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=e):s[0]<=f&&((i=n<2&&f<s[1])?(a=0,d.v=r,d.n=s[1]):f<p&&(i=n<3||s[0]>r||r>p)&&(s[4]=n,s[5]=r,d.n=p,a=0))}if(i||n>1)return l;throw h=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&f(c,p),a=c,o=p;(t=a<2?e:o)||!h;){s||(a?a<3?(a>1&&(d.n=-1),f(a,o)):d.n=o:d.v=o);try{if(u=2,s){if(a||(i="next"),t=s[i]){if(!(t=t.call(s,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,a<2&&(a=0)}else 1===a&&(t=s.return)&&t.call(s),a<2&&(o=TypeError("The iterator does not provide a '"+i+"' method"),a=1);s=e}else if((t=(h=d.n<0)?o:n.call(r,d))!==l)break}catch(t){s=e,a=1,o=t}finally{u=1}}return{value:t,done:h}}}(n,s,a),!0),c}var l={};function u(){}function c(){}function h(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(i(t={},r,(function(){return this})),t),f=h.prototype=u.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,i(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=h,i(f,"constructor",h),i(h,"constructor",c),c.displayName="GeneratorFunction",i(h,a,"GeneratorFunction"),i(f),i(f,a,"Generator"),i(f,r,(function(){return this})),i(f,"toString",(function(){return"[object Generator]"})),(s=function(){return{w:o,m:p}})()}function a(e,t){function n(i,s,a,o){try{var l=e[i](s),u=l.value;return u instanceof r?t.resolve(u.v).then((function(e){n("next",e,a,o)}),(function(e){n("throw",e,a,o)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,o)}))}catch(e){o(e)}}var s;this.next||(i(a.prototype),i(a.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),i(this,"_invoke",(function(e,r,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return s=s?s.then(a,a):a()}),!0)}function o(e,t,n,r,i){return new a(s().w(e,t,n,r),i||Promise)}function l(e,t,n,r,i){var s=o(e,t,n,r,i);return s.next().then((function(e){return e.done?e.value:s.next()}))}function u(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}n.d(t,{A:function(){return d}});var c=n(7545);function h(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError((0,c.A)(e)+" is not iterable")}function d(){var e=s(),t=e.m(d),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function i(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var c={throw:1,return:2,break:3,continue:3};function f(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,c[e],t)},delegateYield:function(e,i,s){return t.resultName=i,n(r.d,h(e),s)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(d=function(){return{wrap:function(t,n,r,i){return e.w(f(t),n,r,i&&i.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:a,async:function(e,t,n,r,s){return(i(t)?o:l)(f(e),t,n,r,s)},keys:u,values:h}})()}},5521:function(e,t,n){"use strict";e.exports=n(6685)},5568:function(e,t,n){var r=n(2478);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5608:function(e,t,n){"use strict";n.d(t,{C6:function(){return i},Cl:function(){return s},Tt:function(){return a},fX:function(){return o}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},5630:function(e,t,n){var r=n(3212),i=n(9756),s=n(3316),a=n(5568),o=n(6208),l=n(9828);e.exports=function(e,t,n){var u=-1,c=i,h=e.length,d=!0,f=[],p=f;if(n)d=!1,c=s;else if(h>=200){var g=t?null:o(e);if(g)return l(g);d=!1,c=a,p=new r}else p=t?[]:f;e:for(;++u<h;){var m=e[u],v=t?t(m):m;if(m=n||0!==m?m:0,d&&v==v){for(var y=p.length;y--;)if(p[y]===v)continue e;t&&p.push(v),f.push(m)}else c(p,v,n)||(p!==f&&p.push(v),f.push(m))}return f}},5769:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},t.Be=t.mw},5853:function(e){e.exports=function(){return!1}},5962:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}n.d(t,{A:function(){return o}});var s=n(7545),a=n(2474);function o(e,t,n){return t=r(t),function(e,t){if(t&&("object"==(0,s.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.A)(e)}(e,i()?Reflect.construct(t,n||[],r(e).constructor):t.apply(e,n))}},5985:function(e,t,n){"use strict";var r=n(5521),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(e){return r.isMemo(e)?a:o[e.$$typeof]||i}o[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=c(n);h&&(a=a.concat(h(n)));for(var o=l(t),g=l(n),m=0;m<a.length;++m){var v=a[m];if(!(s[v]||r&&r[v]||g&&g[v]||o&&o[v])){var y=d(n,v);try{u(t,v,y)}catch(e){}}}}return t}},6015:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},t.td=t.mw},6123:function(e,t,n){var r=n(7923);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},6131:function(e){e.exports=function(e){return e}},6207:function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Cannot destructure "+e)}n.d(t,{A:function(){return r}})},6208:function(e){e.exports=function(){}},6284:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:function(){return r}})},6330:function(e,t,n){"use strict";function r(e,t,n,r,i,s,a){try{var o=e[s](a),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,s){var a=e.apply(t,n);function o(e){r(a,i,s,o,l,"next",e)}function l(e){r(a,i,s,o,l,"throw",e)}o(void 0)}))}}n.d(t,{A:function(){return i}})},6349:function(e,t,n){"use strict";n.d(t,{Im:function(){return l},tv:function(){return c},Tu:function(){return v},eW:function(){return o},oF:function(){return u},N1:function(){return m},N6:function(){return f},jA:function(){return p},Jp:function(){return d},xm:function(){return g},Qh:function(){return h},qg:function(){return se}});var r,i,s,a=n(5608);function o(e){return e.type===i.literal}function l(e){return e.type===i.argument}function u(e){return e.type===i.number}function c(e){return e.type===i.date}function h(e){return e.type===i.time}function d(e){return e.type===i.select}function f(e){return e.type===i.plural}function p(e){return e.type===i.pound}function g(e){return e.type===i.tag}function m(e){return!(!e||"object"!=typeof e||e.type!==s.number)}function v(e){return!(!e||"object"!=typeof e||e.type!==s.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(i||(i={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(s||(s={}));var y=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,b=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function E(e){var t={};return e.replace(b,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var T=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,S=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,w=/^(@+)?(\+|#+)?[rs]?$/g,_=/(\*)(0+)|(#+)(0+)|(0+)/g,A=/^(0+)$/;function k(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(w,(function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function L(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function C(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!A.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function R(e){return L(e)||{}}function I(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=(0,a.Cl)((0,a.Cl)((0,a.Cl)({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return(0,a.Cl)((0,a.Cl)({},e),R(t))}),{}));continue;case"engineering":t=(0,a.Cl)((0,a.Cl)((0,a.Cl)({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return(0,a.Cl)((0,a.Cl)({},e),R(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(_,(function(e,n,r,i,s,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&s)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(A.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(S.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(S,(function(e,n,r,i,s,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:s&&a?(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var s=i.options[0];"w"===s?t=(0,a.Cl)((0,a.Cl)({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=(0,a.Cl)((0,a.Cl)({},t),k(s)))}else if(w.test(i.stem))t=(0,a.Cl)((0,a.Cl)({},t),k(i.stem));else{var o=L(i.stem);o&&(t=(0,a.Cl)((0,a.Cl)({},t),o));var l=C(i.stem);l&&(t=(0,a.Cl)((0,a.Cl)({},t),l))}}return t}var x,P={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function D(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(P[n||""]||P[r||""]||P["".concat(r,"-001")]||P["001"])[0]}var O=new RegExp("^".concat(y.source,"*")),M=new RegExp("".concat(y.source,"*$"));function N(e,t){return{start:e,end:t}}var F=!!String.prototype.startsWith&&"_a".startsWith("a",1),B=!!String.fromCodePoint,U=!!Object.fromEntries,$=!!String.prototype.codePointAt,H=!!String.prototype.trimStart,G=!!String.prototype.trimEnd,j=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},V=!0;try{V="a"===(null===(x=Z("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===x?void 0:x[0])}catch(e){V=!1}var z,K=F?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},W=B?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,s=0;i>s;){if((n=e[s++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Y=U?Object.fromEntries:function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],s=i[0],a=i[1];t[s]=a}return t},q=$?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},X=H?function(e){return e.trimStart()}:function(e){return e.replace(O,"")},Q=G?function(e){return e.trimEnd()}:function(e){return e.replace(M,"")};function Z(e,t){return new RegExp(e,t)}if(V){var J=Z("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");z=function(e,t){var n;return J.lastIndex=t,null!==(n=J.exec(e)[1])&&void 0!==n?n:""}}else z=function(e,t){for(var n=[];;){var r=q(e,t);if(void 0===r||ne(r)||re(r))break;n.push(r),t+=r>=65536?2:1}return W.apply(void 0,n)};var ee=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var s=[];!this.isEOF();){var a=this.char();if(123===a){if((o=this.parseArgument(e,n)).err)return o;s.push(o.val)}else{if(125===a&&e>0)break;if(35!==a||"plural"!==t&&"selectordinal"!==t){if(60===a&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(r.UNMATCHED_CLOSING_TAG,N(this.clonePosition(),this.clonePosition()))}if(60===a&&!this.ignoreTag&&te(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;s.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;s.push(o.val)}}else{var l=this.clonePosition();this.bump(),s.push({type:i.pound,location:N(l,this.clonePosition())})}}}return{val:s,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:i.literal,value:"<".concat(s,"/>"),location:N(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(e+1,t,!0);if(a.err)return a;var o=a.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!te(this.char()))return this.error(r.INVALID_TAG,N(l,this.clonePosition()));var u=this.clonePosition();return s!==this.parseTagName()?this.error(r.UNMATCHED_CLOSING_TAG,N(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:i.tag,value:s,children:o,location:N(n,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,N(l,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,N(n,this.clonePosition()))}return this.error(r.INVALID_TAG,N(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var s=this.tryParseQuote(t);if(s)r+=s;else{var a=this.tryParseUnquoted(e,t);if(a)r+=a;else{var o=this.tryParseLeftAngleBracket();if(!o)break;r+=o}}}var l=N(n,this.clonePosition());return{val:{type:i.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(te(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return W.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),W(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,N(n,this.clonePosition()));var s=this.parseIdentifierIfPossible().value;if(!s)return this.error(r.MALFORMED_ARGUMENT,N(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:i.argument,value:s,location:N(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(r.MALFORMED_ARGUMENT,N(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=z(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:N(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,o){var l,u=this.clonePosition(),c=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(c){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,N(u,h));case"number":case"date":case"time":this.bumpSpace();var d=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((S=this.parseSimpleArgStyleIfPossible()).err)return S;if(0===(v=Q(S.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,N(this.clonePosition(),this.clonePosition()));d={style:v,styleLocation:N(f,this.clonePosition())}}if((w=this.tryParseArgumentClose(o)).err)return w;var p=N(o,this.clonePosition());if(d&&K(null==d?void 0:d.style,"::",0)){var g=X(d.style.slice(2));if("number"===c)return(S=this.parseNumberSkeletonFromString(g,d.styleLocation)).err?S:{val:{type:i.number,value:n,location:p,style:S.val},err:null};if(0===g.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,p);var m=g;this.locale&&(m=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var s=0;r+1<e.length&&e.charAt(r+1)===i;)s++,r++;var a=1+(1&s),o=s<2?1:3+(s>>1),l=D(t);for("H"!=l&&"k"!=l||(o=0);o-- >0;)n+="a";for(;a-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(g,this.locale));var v={type:s.dateTime,pattern:m,location:d.styleLocation,parsedOptions:this.shouldParseSkeletons?E(m):{}};return{val:{type:"date"===c?i.date:i.time,value:n,location:p,style:v},err:null}}return{val:{type:"number"===c?i.number:"date"===c?i.date:i.time,value:n,location:p,style:null!==(l=null==d?void 0:d.style)&&void 0!==l?l:null},err:null};case"plural":case"selectordinal":case"select":var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,N(y,(0,a.Cl)({},y)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),T=0;if("select"!==c&&"offset"===b.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,N(this.clonePosition(),this.clonePosition()));var S;if(this.bumpSpace(),(S=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return S;this.bumpSpace(),b=this.parseIdentifierIfPossible(),T=S.val}var w,_=this.tryParsePluralOrSelectOptions(e,c,t,b);if(_.err)return _;if((w=this.tryParseArgumentClose(o)).err)return w;var A=N(o,this.clonePosition());return"select"===c?{val:{type:i.select,value:n,options:Y(_.val),location:A},err:null}:{val:{type:i.plural,value:n,options:Y(_.val),offset:T,pluralType:"plural"===c?"cardinal":"ordinal",location:A},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,N(u,h))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,N(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(T).filter((function(e){return e.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),o=0,l=a;o<l.length;o++)if(0===l[o].length)throw new Error("Invalid number skeleton");t.push({stem:s,options:a})}return t}(e)}catch(e){return this.error(r.INVALID_NUMBER_SKELETON,t)}return{val:{type:s.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?I(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var s,a=!1,o=[],l=new Set,u=i.value,c=i.location;;){if(0===u.length){var h=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_SELECTOR,r.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=N(h,this.clonePosition()),u=this.message.slice(h.offset,this.offset())}if(l.has(u))return this.error("select"===t?r.DUPLICATE_SELECT_ARGUMENT_SELECTOR:r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===u&&(a=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,N(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var g=this.tryParseArgumentClose(f);if(g.err)return g;o.push([u,{value:p.val,location:N(f,this.clonePosition())}]),l.add(u),this.bumpSpace(),u=(s=this.parseIdentifierIfPossible()).value,c=s.location}return 0===o.length?this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR:r.EXPECT_PLURAL_ARGUMENT_SELECTOR,N(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(r.MISSING_OTHER_CLAUSE,N(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;i=!0,s=10*s+(a-48),this.bump()}var o=N(r,this.clonePosition());return i?j(s*=n)?{val:s,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=q(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(K(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ne(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function te(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function re(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ie(e){e.forEach((function(e){if(delete e.location,d(e)||f(e))for(var t in e.options)delete e.options[t].location,ie(e.options[t].value);else u(e)&&m(e.style)||(c(e)||h(e))&&v(e.style)?delete e.style.location:g(e)&&ie(e.children)}))}function se(e,t){void 0===t&&(t={}),t=(0,a.Cl)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ee(e,t).parse();if(n.err){var i=SyntaxError(r[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||ie(n.val),n.val}},6377:function(e,t,n){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e={NODE_ENV:"production"}.DEBUG),e}(t=e.exports=n(1873)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))})),e.splice(s,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},6399:function(e,t,n){"use strict";var r,i=n(4041),s=(r=i)&&"object"==typeof r&&"default"in r?r.default:r;function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var l,u=[];function c(){l=e(u.map((function(e){return e.props}))),h.canUseDOM?t(l):n&&(l=n(l))}var h=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return l},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,u=[],e};var a=i.prototype;return a.UNSAFE_componentWillMount=function(){u.push(this),c()},a.componentDidUpdate=function(){c()},a.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),c()},a.render=function(){return s.createElement(r,this.props)},i}(i.PureComponent);return a(h,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),a(h,"canUseDOM",o),h}}},6411:function(e,t,n){"use strict";var r=n(9572);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.HX=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},6451:function(e,t,n){"use strict";n.d(t,{A:function(){return L}});var r={};n.r(r),n.d(r,{exclude:function(){return k},extract:function(){return E},parse:function(){return T},parseUrl:function(){return w},pick:function(){return A},stringify:function(){return S},stringifyUrl:function(){return _}});const i="%[a-f0-9]{2}",s=new RegExp("("+i+")|([^%]+?)","gi"),a=new RegExp("("+i+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function l(e){try{return decodeURIComponent(e)}catch{let t=e.match(s)||[];for(let n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(s)||[];return e}}function u(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);t?.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);i.enumerable&&t(r,e[r],e)&&Object.defineProperty(n,r,i)}return n}function c(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}const h=e=>null==e,d=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),f=Symbol("encodeFragmentIdentifier");function p(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function g(e,t){return t.encode?t.strict?d(e):encodeURIComponent(e):e}function m(e,t){return t.decode?function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=a.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const e=l(n[0]);e!==n[0]&&(t[n[0]]=e)}n=a.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}(e):e}function v(e){return Array.isArray(e)?e.sort():"object"==typeof e?v(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function y(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function b(e,t,n){return"string"===n&&"string"==typeof e?e:"function"==typeof n&&"string"==typeof e?n(e):"boolean"!==n||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()?"boolean"!==n||null===e||"1"!==e.toLowerCase()&&"0"!==e.toLowerCase()?"string[]"===n&&"none"!==t.arrayFormat&&"string"==typeof e?[e]:"number[]"!==n||"none"===t.arrayFormat||Number.isNaN(Number(e))||"string"!=typeof e||""===e.trim()?"number"!==n||Number.isNaN(Number(e))||"string"!=typeof e||""===e.trim()?!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()?t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?Number(e):e:"true"===e.toLowerCase():Number(e):[Number(e)]:"1"===e.toLowerCase():"true"===e.toLowerCase()}function E(e){const t=(e=y(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function T(e,t){p((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t}).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),s="string"==typeof n&&!i&&m(n,e).includes(e.arrayFormatSeparator);n=s?m(n,e):n;const a=i||s?n.split(e.arrayFormatSeparator).map((t=>m(t,e))):null===n?n:m(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?m(n,e):n);const s=null===n?[]:m(n,e).split(e.arrayFormatSeparator);void 0!==r[t]?r[t]=[...r[t],...s]:r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replaceAll("+"," "):i;let[s,a]=c(e,"=");void 0===s&&(s=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:m(a,t),n(m(s,t),a,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n&&"string"!==t.types[e])for(const[r,i]of Object.entries(n)){const s=t.types[e]?t.types[e].replace("[]",""):void 0;n[r]=b(i,t,s)}else"object"==typeof n&&null!==n&&"string"===t.types[e]?r[e]=Object.values(n).join(t.arrayFormatSeparator):r[e]=b(n,t,t.types[e]);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?v(n):n,e}),Object.create(null))}function S(e,t){if(!e)return"";p((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&h(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[g(t,e),"[",i,"]"].join("")]:[...n,[g(t,e),"[",g(i,e),"]=",g(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[g(t,e),"[]"].join("")]:[...n,[g(t,e),"[]=",g(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[g(t,e),":list="].join("")]:[...n,[g(t,e),":list=",g(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[g(n,e),t,g(i,e)].join("")]:[[r,g(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,g(t,e)]:[...n,[g(t,e),"=",g(r,e)].join("")]}}(t),i={};for(const[t,r]of Object.entries(e))n(t)||(i[t]=r);const s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((n=>{const i=e[n];return void 0===i?"":null===i?g(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?g(n,t)+"[]":i.reduce(r(n),[]).join("&"):g(n,t)+"="+g(i,t)})).filter((e=>e.length>0)).join("&")}function w(e,t){t={decode:!0,...t};let[n,r]=c(e,"#");return void 0===n&&(n=e),{url:n?.split("?")?.[0]??"",query:T(E(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:m(r,t)}:{}}}function _(e,t){t={encode:!0,strict:!0,[f]:!0,...t};const n=y(e.url).split("?")[0]||"";let r=S({...T(E(e.url),{sort:!1,...t}),...e.query},t);r&&=`?${r}`;let i=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if("string"==typeof e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[f]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${r}${i}`}function A(e,t,n){n={parseFragmentIdentifier:!0,[f]:!1,...n};const{url:r,query:i,fragmentIdentifier:s}=w(e,n);return _({url:r,query:u(i,t),fragmentIdentifier:s},n)}function k(e,t,n){return A(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}var L=r},6502:function(e,t,n){"use strict";n.d(t,{S:function(){return l}});var r=n(5608),i=n(4912),s=n(6349),a=n(1478);function o(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}var l=function(){function e(t,n,s,l){void 0===n&&(n=e.defaultLocale);var u,c,h,d=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=d.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===a.TT.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return(0,a.hN)(d.ast,d.locales,d.formatters,d.formats,e,void 0,d.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=d.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(d.locales)[0]}},this.getAst=function(){return d.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var f=l||{},p=(f.formatters,(0,r.Tt)(f,["formatters"]));this.ast=e.__parse(t,(0,r.Cl)((0,r.Cl)({},p),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(c=e.formats,(h=s)?Object.keys(c).reduce((function(e,t){var n,i;return e[t]=(n=c[t],(i=h[t])?(0,r.Cl)((0,r.Cl)((0,r.Cl)({},n||{}),i||{}),Object.keys(n).reduce((function(e,t){return e[t]=(0,r.Cl)((0,r.Cl)({},n[t]),i[t]||{}),e}),{})):n),e}),(0,r.Cl)({},c)):c),this.formatters=l&&l.formatters||(void 0===(u=this.formatterCache)&&(u={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,i.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:o(u.number),strategy:i.W.variadic}),getDateTimeFormat:(0,i.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:o(u.dateTime),strategy:i.W.variadic}),getPluralRules:(0,i.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:o(u.pluralRules),strategy:i.W.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=s.qg,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}()},6529:function(e,t,n){var r=n(3655),i=n(5387);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},6616:function(e,t,n){"use strict";n.d(t,{yF:function(){return d},tW:function(){return p},yr:function(){return y},Ye:function(){return m},yP:function(){return g}});var r=n(4041),i=n(9067),s=n.n(i),a=n(1085);function o(e,t){return function(e,t){void 0===t&&(t={});var n=function(e){return e&&e.sensitive?"":"i"}(t),r=t.encode,i=void 0===r?function(e){return e}:r,s=t.validate,a=void 0===s||s,o=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),n)}));return function(t){for(var n="",r=0;r<e.length;r++){var s=e[r];if("string"!=typeof s){var l=t?t[s.name]:void 0,u="?"===s.modifier||"*"===s.modifier,c="*"===s.modifier||"+"===s.modifier;if(Array.isArray(l)){if(!c)throw new TypeError('Expected "'.concat(s.name,'" to not repeat, but got an array'));if(0===l.length){if(u)continue;throw new TypeError('Expected "'.concat(s.name,'" to not be empty'))}for(var h=0;h<l.length;h++){var d=i(l[h],s);if(a&&!o[r].test(d))throw new TypeError('Expected all "'.concat(s.name,'" to match "').concat(s.pattern,'", but got "').concat(d,'"'));n+=s.prefix+d+s.suffix}}else if("string"!=typeof l&&"number"!=typeof l){if(!u){var f=c?"an array":"a string";throw new TypeError('Expected "'.concat(s.name,'" to be ').concat(f))}}else{if(d=i(String(l),s),a&&!o[r].test(d))throw new TypeError('Expected "'.concat(s.name,'" to match "').concat(s.pattern,'", but got "').concat(d,'"'));n+=s.prefix+d+s.suffix}}else n+=s}return n}}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var i=1,s="";if("?"===e[o=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;)if("\\"!==e[o]){if(")"===e[o]){if(0===--i){o++;break}}else if("("===e[o]&&(i++,"?"!==e[o+1]))throw new TypeError("Capturing groups are not allowed at ".concat(o));s+=e[o++]}else s+=e[o++]+e[o++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!s)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:s}),n=o}else{for(var a="",o=n+1;o<e.length;){var l=e.charCodeAt(o);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[o++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=o}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,i=void 0===r?"./":r,s=t.delimiter,a=void 0===s?"/#?":s,o=[],u=0,c=0,h="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},f=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],i=r.type,s=r.index;throw new TypeError("Unexpected ".concat(i," at ").concat(s,", expected ").concat(e))},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},g=function(e){var t=o[o.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=a;t<n.length;t++){var r=n[t];if(e.indexOf(r)>-1)return!0}return!1}(n)?"[^".concat(l(a),"]+?"):"(?:(?!".concat(l(n),")[^").concat(l(a),"])+?")};c<n.length;){var m=d("CHAR"),v=d("NAME"),y=d("PATTERN");if(v||y){var b=m||"";-1===i.indexOf(b)&&(h+=b,b=""),h&&(o.push(h),h=""),o.push({name:v||u++,prefix:b,suffix:"",pattern:y||g(b),modifier:d("MODIFIER")||""})}else{var E=m||d("ESCAPED_CHAR");if(E)h+=E;else if(h&&(o.push(h),h=""),d("OPEN")){b=p();var T=d("NAME")||"",S=d("PATTERN")||"",w=p();f("CLOSE"),o.push({name:T||(S?u++:""),pattern:T&&!S?g(b):S,prefix:b,suffix:w,modifier:d("MODIFIER")||""})}else f("END")}}return o}(e,t),t)}function l(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}n(7114),n(133);const u=r.createContext(null),c=()=>(0,r.useContext)(u),h={children:s().node.isRequired,routes:s().objectOf(s().string).isRequired,basePath:s().string};function d(e){let{routes:t,basePath:n,children:i}=e;const s=(0,r.useMemo)((()=>({routes:t,basePath:n})),[t,n]);return(0,a.jsx)(u.Provider,{value:s,children:i})}d.propTypes=h,d.defaultProps={basePath:null};const f={};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.match(/^(https?:\/\/)/);void 0===f[e]&&(f[e]=o(e.replace(/^(https?:\/\/)/,""),n));const i=f[e];return null!==r?`${r[1]}${i(t)}`:i(t)}const g=()=>{const{routes:e=null,basePath:t=null}=c()||{};return(0,r.useCallback)(((n,r,i)=>{const s=null!==e&&e[n]||null;if(null===s)return null;const a=p(s,r,i);return null!==t?`${t.replace(/\/$/,"")}/${a.replace(/^\//,"")}`:a}),[e,t])},m=()=>{const{routes:e}=c();return e};function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const[r,i=null]=(e||"").split("?",2),[s,a=null]=(i||"").split("#",2);return{pathname:""!==r?r:"/",search:t||s||null,hash:n||a||null}}function y(){let{path:e="/",static:t=!1,record:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=v(e);l=l||new Map;const s=function(e,t){var n=l.get(e);n?n.push(t):l.set(e,[t])},a=function(e,t){var n=l.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):l.set(e,[]))},o=function(e,t){var n=l.get(e);n&&n.slice().map((function(e){e(t)})),(n=l.get("*"))&&n.slice().map((function(n){n(e,t)}))};var l;const u=function(t){let{replace:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=v(t);i=r,o("navigate",e)},c=t?()=>null:u,h=e=>(s("navigate",e),()=>a("navigate",e));return{hook:()=>[(0,r.useSyncExternalStore)(h,(()=>i.pathname)),c],searchHook:()=>(0,r.useSyncExternalStore)(h,(()=>i.search||"")),reset:function(){u(e)},navigate:c}}s().string.isRequired,s().string,s().node.isRequired},6654:function(e,t,n){var r,i,s;s=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function s(t,n,s){if("undefined"!=typeof document){"number"==typeof(s=e({path:"/"},i.defaults,s)).expires&&(s.expires=new Date(1*new Date+864e5*s.expires)),s.expires=s.expires?s.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var o="";for(var l in s)s[l]&&(o+="; "+l,!0!==s[l]&&(o+="="+s[l].split(";")[0]));return document.cookie=t+"="+n+o}}function a(e,n){if("undefined"!=typeof document){for(var i={},s=document.cookie?document.cookie.split("; "):[],a=0;a<s.length;a++){var o=s[a].split("="),l=o.slice(1).join("=");n||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var u=t(o[0]);if(l=(r.read||r)(l,u)||t(l),n)try{l=JSON.parse(l)}catch(e){}if(i[u]=l,e===u)break}catch(e){}}return e?i[e]:i}}return i.set=s,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){s(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i),e.exports=s()},6679:function(e,t,n){"use strict";n.d(t,{Ho:function(){return c},OC:function(){return a},hr:function(){return l},pg:function(){return u},sb:function(){return h},uo:function(){return o}});var r,i=n(5608);!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(r||(r={}));var s=function(e){function t(n,r,i){var s=this,a=i?i instanceof Error?i:new Error(String(i)):void 0;return(s=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,"\n").concat(a?"\n".concat(a.message,"\n").concat(a.stack):""))||this).code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s,t),s}return(0,i.C6)(t,e),t}(Error),a=function(e){function t(t,n){return e.call(this,r.UNSUPPORTED_FORMATTER,t,n)||this}return(0,i.C6)(t,e),t}(s),o=function(e){function t(t,n){return e.call(this,r.INVALID_CONFIG,t,n)||this}return(0,i.C6)(t,e),t}(s),l=function(e){function t(t,n){return e.call(this,r.MISSING_DATA,t,n)||this}return(0,i.C6)(t,e),t}(s),u=function(e){function t(t,n,i){var s=e.call(this,r.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),i)||this;return s.locale=n,s}return(0,i.C6)(t,e),t}(s),c=function(e){function t(t,n,r,i){var s=e.call(this,"".concat(t,"\nMessageID: ").concat(null==r?void 0:r.id,"\nDefault Message: ").concat(null==r?void 0:r.defaultMessage,"\nDescription: ").concat(null==r?void 0:r.description,"\n"),n,i)||this;return s.descriptor=r,s.locale=n,s}return(0,i.C6)(t,e),t}(u),h=function(e){function t(t,n){var i=e.call(this,r.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(n,'", using ').concat(t.defaultMessage?"default message (".concat("string"==typeof t.defaultMessage?t.defaultMessage:t.defaultMessage.map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:JSON.stringify(e)})).join(),")"):"id"," as fallback."))||this;return i.descriptor=t,i}return(0,i.C6)(t,e),t}(s)},6685:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function T(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case h:case s:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case g:case l:return e;default:return t}}case i:return t}}}function S(e){return T(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=s,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=o,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||T(e)===c},t.isConcurrentMode=S,t.isContextConsumer=function(e){return T(e)===u},t.isContextProvider=function(e){return T(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return T(e)===d},t.isFragment=function(e){return T(e)===s},t.isLazy=function(e){return T(e)===m},t.isMemo=function(e){return T(e)===g},t.isPortal=function(e){return T(e)===i},t.isProfiler=function(e){return T(e)===o},t.isStrictMode=function(e){return T(e)===a},t.isSuspense=function(e){return T(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===E||e.$$typeof===v)},t.typeOf=T},6705:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},t.jb=t.mw},6775:function(e,t,n){var r=n(3521);e.exports=function(e,t,n){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,l=n.length;++i<o;){var u=r(s[i],a[i]);if(u)return i>=l?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},6848:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6912:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},6922:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="arrow-rotate-right",r=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],i="f01e",s="M386.3 160L336 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z";t.definition={prefix:"fas",iconName:n,icon:[512,512,r,i,s]},t.faArrowRotateRight=t.definition,t.prefix="fas",t.iconName=n,t.width=512,t.height=512,t.ligatures=r,t.unicode=i,t.svgPathData=s,t.aliases=r},6999:function(e,t,n){"use strict";var r=n(6848);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},7110:function(e,t,n){"use strict";var r=n(6922);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.ye=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},7114:function(e,t,n){"use strict";n.d(t,{N_:function(){return b},qh:function(){return y},Ix:function(){return m},dO:function(){return T},zy:function(){return p},KA:function(){return c}});var r=n(133),i=n(703);const s=(e="")=>"/"===e?"":e,a=(e="",t)=>((e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/")(o(s(e)),o(t)),o=e=>{try{return decodeURI(e)}catch(t){return e}},l={hook:r.ZD,searchHook:r.SQ,parser:function(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,s,a=[],o="",l=e.split("/");for(l[0]||l.shift();i=l.shift();)"*"===(n=i[0])?(a.push(n),o+="?"===i[1]?"(?:/(.*))?":"/(.*)"):":"===n?(r=i.indexOf("?",1),s=i.indexOf(".",1),a.push(i.substring(1,~r?r:~s?s:i.length)),o+=~r&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(o+=(~r?"?":"")+"\\"+i.substring(s))):o+="/"+i;return{keys:a,pattern:new RegExp("^"+o+(t?"(?=$|/)":"/?$"),"i")}},base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},u=(0,i.q6)(l),c=()=>(0,i.NT)(u),h={},d=(0,i.q6)(h),f=e=>{const[t,n]=e.hook(e);return[a(e.base,t),(0,i._q)(((t,r)=>n(((e,t)=>"~"===e[0]?e.slice(1):s(t)+e)(t,e.base),r)))]},p=()=>f(c()),g=(e,t,n,r)=>{const{pattern:i,keys:s}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",r),a=i.exec(n)||[],[o,...l]=a;return void 0!==o?[!0,(()=>{const e=!1!==s?Object.fromEntries(s.map(((e,t)=>[e,l[t]]))):a.groups;let t={...l};return e&&Object.assign(t,e),t})(),...r?[o]:[]]:[!1,null]},m=({children:e,...t})=>{const n=c(),r=t.hook?l:n;let s=r;const[a,o]=t.ssrPath?.split("?")??[];o&&(t.ssrSearch=o,t.ssrPath=a),t.hrefs=t.hrefs??t.hook?.hrefs;let h=(0,i.li)({}),d=h.current,f=d;for(let e in r){const n="base"===e?r[e]+(t[e]||""):t[e]||r[e];d===f&&n!==f[e]&&(h.current=f={...f}),f[e]=n,n===r[e]&&n===s[e]||(s=f)}return(0,i.n)(u.Provider,{value:s,children:e})},v=({children:e,component:t},n)=>t?(0,i.n)(t,{params:n}):"function"==typeof e?e(n):e,y=({path:e,nest:t,match:n,...r})=>{const s=c(),[a]=f(s),[o,l,u]=n??g(s.parser,e,a,t),p=(e=>{let t=(0,i.li)(h);const n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some((([e,t])=>t!==n[e]))?e:n})({...(0,i.NT)(d),...l});if(!o)return null;const y=u?(0,i.n)(m,{base:u},v(r,p)):v(r,p);return(0,i.n)(d.Provider,{value:p,children:y})},b=(0,i.Rf)(((e,t)=>{const n=c(),[r,s]=f(n),{to:a="",href:o=a,onClick:l,asChild:u,children:h,className:d,replace:p,state:g,...m}=e,v=(0,i._q)((t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||0!==t.button||(l?.(t),t.defaultPrevented||(t.preventDefault(),s(o,e)))})),y=n.hrefs("~"===o[0]?o.slice(1):n.base+o,n);return u&&(0,i.zO)(h)?(0,i.Ob)(h,{onClick:v,href:y}):(0,i.n)("a",{...m,onClick:v,href:y,className:d?.call?d(r===o):d,children:h,ref:t})})),E=e=>Array.isArray(e)?e.flatMap((e=>E(e&&e.type===i.FK?e.props.children:e))):[e],T=({children:e,location:t})=>{const n=c(),[r]=f(n);for(const s of E(e)){let e=0;if((0,i.zO)(s)&&(e=g(n.parser,s.props.path,t||r,s.props.nest))[0])return(0,i.Ob)(s,{match:e})}return null}},7228:function(e,t,n){var r=n(4436),i=n(6131);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=i(n))==n?n:0),void 0!==t&&(t=(t=i(t))==t?t:0),r(i(e),t,n)}},7244:function(e,t,n){"use strict";var r=n(2265);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.yY=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},7250:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,s=7*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,o){o=o||{};var l,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return o*s;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===c&&isFinite(e))return o.long?(l=e,(u=Math.abs(l))>=i?a(l,u,i,"day"):u>=r?a(l,u,r,"hour"):u>=n?a(l,u,n,"minute"):u>=t?a(l,u,t,"second"):l+" ms"):function(e){var s=Math.abs(e);return s>=i?Math.round(e/i)+"d":s>=r?Math.round(e/r)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7252:function(e,t,n){"use strict";n.d(t,{pO:function(){return c},uX:function(){return u}});var r=n(3315),i=n.n(r),s=n(1847);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=!1,r=!1,s=null;const a=new(i());return function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return new Promise((i=>{null===s&&null!==t&&(s=t(...o)),r||null!==s?i(s):n?a.once("loaded",(()=>i(s))):(n=!0,e(...o).then((function(){s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,null===s&&null!==t&&(s=t(...o)),r=!0,i(s),a.emit("loaded",s)})))}))}},o=e=>new Promise((t=>{const n=document.createElement("script");n.src=e,n.onload=()=>t(),document.getElementsByTagName("head")[0].appendChild(n)})),l=(e,t)=>new Promise((n=>{window[t]=()=>n();const r=document.createElement("script");r.src=e,document.getElementsByTagName("head")[0].appendChild(r)})),u=(a((function(){let{url:e="https://api.dmcdn.net/all.js",callback:t="dmAsyncInit"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return null!==t?l(e,t):o(e)}),(()=>"undefined"!=typeof window&&(window.DM||window.dailymotion)||null)),a((e=>new Promise((t=>{const n={appId:null,locale:"EN_US",autoLogAppEvents:!0,cookie:!0,state:!0,version:"v12.0",debug:!1,...e};window.fbAsyncInit=()=>{window.FB.init({...n}),window.FB.AppEvents.logPageView(),t(window.FB)},function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;const a=e.createElement(t);a.id=n,a.src=`//connect.facebook.net/${r}/sdk${i?"/debug":""}.js`,s.parentNode.insertBefore(a,s)}(document,"script","facebook-jssdk",n.locale,n.debug)}))),(()=>void 0!==window.FB?window.FB:null)),a((function(){let{url:e="https://apis.google.com/js/api.js",callback:t=`onGoogleApiLoaded_${(new Date).getTime()}`,withClient:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(`${e}?${s.stringify({onload:t})}`,t).then((()=>n?new Promise((e=>{window.gapi.load("client",e)})):null))}),(function(){let{withClient:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===window.gapi||e&&void 0===window.gapi.client?null:window.gapi}))),c=(a((function(){let{url:e="https://accounts.google.com/gsi/client"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)}),(()=>void 0!==window.google&&void 0!==window.google.accounts?window.google.accounts:null)),a((function(){let{url:e="https://imasdk.googleapis.com/js/sdkloader/ima3.js"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)}),(()=>void 0!==window.google&&void 0!==window.google.ima?window.google.ima:null)),a((function(){let{url:e="https://maps.googleapis.com/maps/api/js",locale:t="en",key:n=null,apiKey:r=null,libraries:i=null,callback:a=`onGoogleMapsLoaded_${(new Date).getTime()}`}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(`${e}?${s.stringify({key:r||n,callback:a,libraries:null!==i?i.join(","):null,language:t})}`,a)}),(()=>void 0!==window.google&&void 0!==window.google.maps?window.google:null)));a((function(){let{url:e="https://www.instagram.com/embed.js"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)}),(()=>void 0!==window.instgrm?window.instgrm:null)),a((function(){let{clientId:e="radiocanadaca_tele",url:t="//services.radio-canada.ca/media/player/client/{clientId}"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t.replace(/\{\s*clientId\s*\}/gi,e))}),(()=>void 0!==window.RadioCanada&&void 0!==window.RadioCanada.player?window.RadioCanada.player:null)),a((function(){let{url:e="https://checkout.stripe.com/checkout.js"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)}),(()=>void 0!==window.StripeCheckout?window.StripeCheckout:null)),a((function(){let{url:e="https://www.tiktok.com/embed.js"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)}),(()=>void 0!==window.tiktok?window.tiktok:null)),a((function(){let{url:e="https://platform.twitter.com/widgets.js"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((t=>{const n=((n,r,i)=>{const s=n.getElementsByTagName(r)[0],a=window.twttr||{};if(n.getElementById(i))return t(a),a;const o=n.createElement(r);return o.id=i,o.src=e,s.parentNode.insertBefore(o,s),a._e=[],a.ready=e=>{a._e.push(e)},a})(document,"script","twitter-wjs");n.ready(t),window.twttr=n}))}),(()=>void 0!==window.twttr&&void 0!==window.twttr.widgets?window.twttr:null)),a((()=>n.e(66).then(n.bind(n,8066)).then((e=>{let{default:t}=e;return t}))),(()=>void 0!==window.Vimeo&&void 0!==window.Vimeo.Player?window.Vimeo.Player:null)),a((function(){let{url:e="https://www.youtube.com/iframe_api",callbackName:t="onYouTubeIframeAPIReady"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(e,t)}),(()=>void 0!==window.YT?window.YT:null))},7269:function(e){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},7331:function(e,t,n){var r=n(2784),i=n(1580);e.exports=function(e,t,n){var s=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(s="leading"in n?!!n.leading:s,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:s,maxWait:t,trailing:a})}},7379:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7400:function(e,t,n){"use strict";var r=n(4041),i=n(7967);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,o={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function g(e,t,n,r,i,s,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=Symbol.for("react.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),L=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function M(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var N,F=Object.assign;function B(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var U=!1;function $(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),s=r.stack.split("\n"),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(1!==a||1!==o)do{if(a--,0>--o||i[a]!==s[o]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=o);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function H(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return $(e.type,!1);case 11:return $(e.type.render,!1);case 1:return $(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case S:return"Portal";case A:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case I:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case x:return null!==(t=e.displayName||null)?t:G(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return G(e(t))}catch(e){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(t);case 8:return t===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function q(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){Q(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(te(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function se(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,he=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(s(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ee=null;function Te(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,we=null,_e=null;function Ae(e){if(e=bi(e)){if("function"!=typeof Se)throw Error(s(280));var t=e.stateNode;t&&(t=Ti(t),Se(e.stateNode,e.type,t))}}function ke(e){we?_e?_e.push(e):_e=[e]:we=e}function Le(){if(we){var e=we,t=_e;if(_e=we=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Ce(e,t){return e(t)}function Re(){}var Ie=!1;function xe(e,t,n){if(Ie)return e(t,n);Ie=!0;try{return Ce(e,t,n)}finally{Ie=!1,(null!==we||null!==_e)&&(Re(),Le())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=Ti(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(s(231,t,typeof n));return n}var De=!1;if(c)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){De=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ce){De=!1}function Me(e,t,n,r,i,s,a,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Ne=!1,Fe=null,Be=!1,Ue=null,$e={onError:function(e){Ne=!0,Fe=e}};function He(e,t,n,r,i,s,a,o,l){Ne=!1,Fe=null,Me.apply($e,arguments)}function Ge(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function je(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(Ge(e)!==e)throw Error(s(188))}function ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ge(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ve(i),e;if(a===r)return Ve(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var We=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,qe=i.unstable_shouldYield,Xe=i.unstable_requestPaint,Qe=i.unstable_now,Ze=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,st=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ot(e)/lt|0)|0},ot=Math.log,lt=Math.LN2,ut=64,ct=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=268435455&n;if(0!==a){var o=a&~i;0!==o?r=ht(o):0!==(s&=a)&&(r=ht(s))}else 0!==(a=n&~i)?r=ht(a):0!==s&&(r=ht(s));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(s=t&-t)||16===i&&4194240&s))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function Et(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Tt,St,wt,_t,At,kt=!1,Lt=[],Ct=null,Rt=null,It=null,xt=new Map,Pt=new Map,Dt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Mt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":xt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Nt(e,t,n,r,i,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ft(e){var t=yi(e.target);if(null!==t){var n=Ge(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=je(n)))return e.blockedOn=t,void At(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ee=r,n.target.dispatchEvent(r),Ee=null,t.shift()}return!0}function Ut(e,t,n){Bt(e)&&n.delete(t)}function $t(){kt=!1,null!==Ct&&Bt(Ct)&&(Ct=null),null!==Rt&&Bt(Rt)&&(Rt=null),null!==It&&Bt(It)&&(It=null),xt.forEach(Ut),Pt.forEach(Ut)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$t)))}function Gt(e){function t(t){return Ht(t,e)}if(0<Lt.length){Ht(Lt[0],e);for(var n=1;n<Lt.length;n++){var r=Lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Ht(Ct,e),null!==Rt&&Ht(Rt,e),null!==It&&Ht(It,e),xt.forEach(t),Pt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Ft(n),null===n.blockedOn&&Dt.shift()}var jt=E.ReactCurrentBatchConfig,Vt=!0;function zt(e,t,n,r){var i=bt,s=jt.transition;jt.transition=null;try{bt=1,Wt(e,t,n,r)}finally{bt=i,jt.transition=s}}function Kt(e,t,n,r){var i=bt,s=jt.transition;jt.transition=null;try{bt=4,Wt(e,t,n,r)}finally{bt=i,jt.transition=s}}function Wt(e,t,n,r){if(Vt){var i=qt(e,t,n,r);if(null===i)Vr(e,t,r,Yt,n),Mt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=Nt(Ct,e,t,n,r,i),!0;case"dragenter":return Rt=Nt(Rt,e,t,n,r,i),!0;case"mouseover":return It=Nt(It,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return xt.set(s,Nt(xt.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Pt.set(s,Nt(Pt.get(s)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Mt(e,r),4&t&&-1<Ot.indexOf(e)){for(;null!==i;){var s=bi(i);if(null!==s&&Tt(s),null===(s=qt(e,t,n,r))&&Vr(e,t,r,Yt,n),s===i)break;i=s}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var Yt=null;function qt(e,t,n,r){if(Yt=null,null!==(e=yi(e=Te(r))))if(null===(t=Ge(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=je(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Xt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Zt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Zt,r=n.length,i="value"in Qt?Qt.value:Qt.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[s-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function sn(e){function t(t,n,r,i,s){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,on,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=sn(un),hn=F({},un,{view:0,detail:0}),dn=sn(hn),fn=F({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,on=e.screenY-ln.screenY):on=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:on}}),pn=sn(fn),gn=sn(F({},fn,{dataTransfer:0})),mn=sn(F({},hn,{relatedTarget:0})),vn=sn(F({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=F({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=sn(yn),En=sn(F({},un,{data:0})),Tn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function An(){return _n}var kn=F({},hn,{key:function(e){if(e.key){var t=Tn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ln=sn(kn),Cn=sn(F({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=sn(F({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),In=sn(F({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),xn=F({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=sn(xn),Dn=[9,13,27,32],On=c&&"CompositionEvent"in window,Mn=null;c&&"documentMode"in document&&(Mn=document.documentMode);var Nn=c&&"TextEvent"in window&&!Mn,Fn=c&&(!On||Mn&&8<Mn&&11>=Mn),Bn=String.fromCharCode(32),Un=!1;function $n(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1,jn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!jn[e.type]:"textarea"===t}function zn(e,t,n,r){ke(r),0<(t=Kr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Wn=null;function Yn(e){Br(e,0)}function qn(e){if(W(Ei(e)))return e}function Xn(e,t){if("change"===e)return t}var Qn=!1;if(c){var Zn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Zn=Jn}else Zn=!1;Qn=Zn&&(!document.documentMode||9<document.documentMode)}function tr(){Kn&&(Kn.detachEvent("onpropertychange",nr),Wn=Kn=null)}function nr(e){if("value"===e.propertyName&&qn(Wn)){var t=[];zn(t,Wn,e,Te(e)),xe(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Wn=n,(Kn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(Wn)}function sr(e,t){if("click"===e)return qn(t)}function ar(e,t){if("input"===e||"change"===e)return qn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!h.call(t,i)||!or(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=void 0===r.end?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=cr(n,s);var a=cr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=c&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,yr=null,br=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==Y(r)||(r="selectionStart"in(r=mr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Kr(vr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function Tr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionend:Tr("Transition","TransitionEnd")},wr={},_r={};function Ar(e){if(wr[e])return wr[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return wr[e]=n[t];return e}c&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var kr=Ar("animationend"),Lr=Ar("animationiteration"),Cr=Ar("animationstart"),Rr=Ar("transitionend"),Ir=new Map,xr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Ir.set(e,t),l(t,[e])}for(var Dr=0;Dr<xr.length;Dr++){var Or=xr[Dr];Pr(Or.toLowerCase(),"on"+(Or[0].toUpperCase()+Or.slice(1)))}Pr(kr,"onAnimationEnd"),Pr(Lr,"onAnimationIteration"),Pr(Cr,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Rr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mr));function Fr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,o,l,u){if(He.apply(this,arguments),Ne){if(!Ne)throw Error(s(198));var c=Fe;Ne=!1,Fe=null,Be||(Be=!0,Ue=c)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;Fr(i,o,u),s=l}else for(a=0;a<r.length;a++){if(l=(o=r[a]).instance,u=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;Fr(i,o,u),s=l}}}if(Be)throw e=Ue,Be=!1,Ue=null,e}function Ur(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(jr(t,e,2,!1),n.add(r))}function $r(e,t,n){var r=0;t&&(r|=4),jr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Gr(e){if(!e[Hr]){e[Hr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Nr.has(t)||$r(t,!1,e),$r(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,$r("selectionchange",!1,t))}}function jr(e,t,n,r){switch(Xt(t)){case 1:var i=zt;break;case 4:i=Kt;break;default:i=Wt}n=i.bind(null,t,n,e),i=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,i){var s=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var o=r.stateNode.containerInfo;if(o===i||8===o.nodeType&&o.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==o;){if(null===(a=yi(o)))return;if(5===(l=a.tag)||6===l){r=s=a;continue e}o=o.parentNode}}r=r.return}xe((function(){var r=s,i=Te(n),a=[];e:{var o=Ir.get(e);if(void 0!==o){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Ln;break;case"focusin":u="focus",l=mn;break;case"focusout":u="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case kr:case Lr:case Cr:l=vn;break;case Rr:l=In;break;case"scroll":l=dn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var c=!!(4&t),h=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var f,p=r;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==d&&null!=(g=Pe(p,d))&&c.push(zr(p,g,f))),h)break;p=p.return}0<c.length&&(o=new l(o,u,null,n,i),a.push({event:o,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===Ee||!(u=n.relatedTarget||n.fromElement)||!yi(u)&&!u[pi])&&(l||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?yi(u):null)&&(u!==(h=Ge(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=pn,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Cn,g="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?o:Ei(l),f=null==u?o:Ei(u),(o=new c(g,p+"leave",l,n,i)).target=h,o.relatedTarget=f,g=null,yi(i)===r&&((c=new c(d,p+"enter",u,n,i)).target=f,c.relatedTarget=h,g=c),h=g,l&&u)e:{for(d=u,p=0,f=c=l;f;f=Wr(f))p++;for(f=0,g=d;g;g=Wr(g))f++;for(;0<p-f;)c=Wr(c),p--;for(;0<f-p;)d=Wr(d),f--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Wr(c),d=Wr(d)}c=null}else c=null;null!==l&&Yr(a,o,l,c,!1),null!==u&&null!==h&&Yr(a,h,u,c,!0)}if("select"===(l=(o=r?Ei(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var m=Xn;else if(Vn(o))if(Qn)m=ar;else{m=ir;var v=rr}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(m=sr);switch(m&&(m=m(e,r))?zn(a,m,n,i):(v&&v(e,o,r),"focusout"===e&&(v=o._wrapperState)&&v.controlled&&"number"===o.type&&ee(o,"number",o.value)),v=r?Ei(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(mr=v,vr=r,yr=null);break;case"focusout":yr=vr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,Er(a,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Er(a,n,i)}var y;if(On)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Gn&&(y=en()):(Zt="value"in(Qt=i)?Qt.value:Qt.textContent,Gn=!0)),0<(v=Kr(r,b)).length&&(b=new En(b,e,null,n,i),a.push({event:b,listeners:v}),(y||null!==(y=Hn(n)))&&(b.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Un=!0,Bn);case"textInput":return(e=t.data)===Bn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!On&&$n(e,t)?(e=en(),Jt=Zt=Qt=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Kr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}Br(a,t)}))}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,s=i.stateNode;5===i.tag&&null!==s&&(i=s,null!=(s=Pe(e,n))&&r.unshift(zr(e,s,i)),null!=(s=Pe(e,t))&&r.push(zr(e,s,i))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var s=t._reactName,a=[];null!==n&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(null!==l&&l===r)break;5===o.tag&&null!==u&&(o=u,i?null!=(l=Pe(n,s))&&a.unshift(zr(n,l,o)):i||null!=(l=Pe(n,s))&&a.push(zr(n,l,o))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var qr=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Qr(e){return("string"==typeof e?e:""+e).replace(qr,"\n").replace(Xr,"")}function Zr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(s(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,si="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==si?function(e){return si.resolve(null).then(e).catch(oi)}:ri;function oi(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Gt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Gt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hi=Math.random().toString(36).slice(2),di="__reactFiber$"+hi,fi="__reactProps$"+hi,pi="__reactContainer$"+hi,gi="__reactEvents$"+hi,mi="__reactListeners$"+hi,vi="__reactHandles$"+hi;function yi(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[di])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[di]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function Ti(e){return e[fi]||null}var Si=[],wi=-1;function _i(e){return{current:e}}function Ai(e){0>wi||(e.current=Si[wi],Si[wi]=null,wi--)}function ki(e,t){wi++,Si[wi]=e.current,e.current=t}var Li={},Ci=_i(Li),Ri=_i(!1),Ii=Li;function xi(e,t){var n=e.type.contextTypes;if(!n)return Li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,s={};for(i in n)s[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pi(e){return null!=e.childContextTypes}function Di(){Ai(Ri),Ai(Ci)}function Oi(e,t,n){if(Ci.current!==Li)throw Error(s(168));ki(Ci,t),ki(Ri,n)}function Mi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,j(e)||"Unknown",i));return F({},n,r)}function Ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Li,Ii=Ci.current,ki(Ci,e),ki(Ri,Ri.current),!0}function Fi(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=Mi(e,t,Ii),r.__reactInternalMemoizedMergedChildContext=e,Ai(Ri),Ai(Ci),ki(Ci,e)):Ai(Ri),ki(Ri,n)}var Bi=null,Ui=!1,$i=!1;function Hi(e){null===Bi?Bi=[e]:Bi.push(e)}function Gi(){if(!$i&&null!==Bi){$i=!0;var e=0,t=bt;try{var n=Bi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,Ui=!1}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),We(Je,Gi),t}finally{bt=t,$i=!1}}return null}var ji=[],Vi=0,zi=null,Ki=0,Wi=[],Yi=0,qi=null,Xi=1,Qi="";function Zi(e,t){ji[Vi++]=Ki,ji[Vi++]=zi,zi=e,Ki=t}function Ji(e,t,n){Wi[Yi++]=Xi,Wi[Yi++]=Qi,Wi[Yi++]=qi,qi=e;var r=Xi;e=Qi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var s=32-at(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Xi=1<<32-at(t)+i|n<<i|r,Qi=s+e}else Xi=1<<s|n<<i|r,Qi=e}function es(e){null!==e.return&&(Zi(e,1),Ji(e,1,0))}function ts(e){for(;e===zi;)zi=ji[--Vi],ji[Vi]=null,Ki=ji[--Vi],ji[Vi]=null;for(;e===qi;)qi=Wi[--Yi],Wi[Yi]=null,Qi=Wi[--Yi],Wi[Yi]=null,Xi=Wi[--Yi],Wi[Yi]=null}var ns=null,rs=null,is=!1,ss=null;function as(e,t){var n=xu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function os(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ns=e,rs=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ns=e,rs=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qi?{id:Xi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=xu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ns=e,rs=null,!0);default:return!1}}function ls(e){return!(!(1&e.mode)||128&e.flags)}function us(e){if(is){var t=rs;if(t){var n=t;if(!os(e,t)){if(ls(e))throw Error(s(418));t=ui(n.nextSibling);var r=ns;t&&os(e,t)?as(r,n):(e.flags=-4097&e.flags|2,is=!1,ns=e)}}else{if(ls(e))throw Error(s(418));e.flags=-4097&e.flags|2,is=!1,ns=e}}}function cs(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ns=e}function hs(e){if(e!==ns)return!1;if(!is)return cs(e),is=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=rs)){if(ls(e))throw ds(),Error(s(418));for(;t;)as(e,t),t=ui(t.nextSibling)}if(cs(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){rs=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}rs=null}}else rs=ns?ui(e.stateNode.nextSibling):null;return!0}function ds(){for(var e=rs;e;)e=ui(e.nextSibling)}function fs(){rs=ns=null,is=!1}function ps(e){null===ss?ss=[e]:ss.push(e)}var gs=E.ReactCurrentBatchConfig;function ms(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function vs(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ys(e){return(0,e._init)(e._payload)}function bs(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Du(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Fu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var s=n.type;return s===w?h(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===s||"object"==typeof s&&null!==s&&s.$$typeof===P&&ys(s)===t.type)?((r=i(t,n.props)).ref=ms(e,t,n),r.return=e,r):((r=Ou(n.type,n.key,n.props,null,e.mode,r)).ref=ms(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,s){return null===t||7!==t.tag?((t=Mu(n,e.mode,r,s)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Fu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case T:return(n=Ou(t.type,t.key,t.props,null,e.mode,n)).ref=ms(e,null,t),n.return=e,n;case S:return(t=Bu(t,e.mode,n)).return=e,t;case P:return d(e,(0,t._init)(t._payload),n)}if(te(t)||M(t))return(t=Mu(t,e.mode,n,null)).return=e,t;vs(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case T:return n.key===i?u(e,t,n,r):null;case S:return n.key===i?c(e,t,n,r):null;case P:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||M(n))return null!==i?null:h(e,t,n,r,null);vs(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case T:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||M(r))return h(t,e=e.get(n)||null,r,i,null);vs(t,r)}return null}function g(i,s,o,l){for(var u=null,c=null,h=s,g=s=0,m=null;null!==h&&g<o.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var v=f(i,h,o[g],l);if(null===v){null===h&&(h=m);break}e&&h&&null===v.alternate&&t(i,h),s=a(v,s,g),null===c?u=v:c.sibling=v,c=v,h=m}if(g===o.length)return n(i,h),is&&Zi(i,g),u;if(null===h){for(;g<o.length;g++)null!==(h=d(i,o[g],l))&&(s=a(h,s,g),null===c?u=h:c.sibling=h,c=h);return is&&Zi(i,g),u}for(h=r(i,h);g<o.length;g++)null!==(m=p(h,i,g,o[g],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?g:m.key),s=a(m,s,g),null===c?u=m:c.sibling=m,c=m);return e&&h.forEach((function(e){return t(i,e)})),is&&Zi(i,g),u}function m(i,o,l,u){var c=M(l);if("function"!=typeof c)throw Error(s(150));if(null==(l=c.call(l)))throw Error(s(151));for(var h=c=null,g=o,m=o=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var b=f(i,g,y.value,u);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(i,g),o=a(b,o,m),null===h?c=b:h.sibling=b,h=b,g=v}if(y.done)return n(i,g),is&&Zi(i,m),c;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=d(i,y.value,u))&&(o=a(y,o,m),null===h?c=y:h.sibling=y,h=y);return is&&Zi(i,m),c}for(g=r(i,g);!y.done;m++,y=l.next())null!==(y=p(g,i,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),o=a(y,o,m),null===h?c=y:h.sibling=y,h=y);return e&&g.forEach((function(e){return t(i,e)})),is&&Zi(i,m),c}return function e(r,s,a,l){if("object"==typeof a&&null!==a&&a.type===w&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case T:e:{for(var u=a.key,c=s;null!==c;){if(c.key===u){if((u=a.type)===w){if(7===c.tag){n(r,c.sibling),(s=i(c,a.props.children)).return=r,r=s;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===P&&ys(u)===c.type){n(r,c.sibling),(s=i(c,a.props)).ref=ms(r,c,a),s.return=r,r=s;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===w?((s=Mu(a.props.children,r.mode,l,a.key)).return=r,r=s):((l=Ou(a.type,a.key,a.props,null,r.mode,l)).ref=ms(r,s,a),l.return=r,r=l)}return o(r);case S:e:{for(c=a.key;null!==s;){if(s.key===c){if(4===s.tag&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){n(r,s.sibling),(s=i(s,a.children||[])).return=r,r=s;break e}n(r,s);break}t(r,s),s=s.sibling}(s=Bu(a,r.mode,l)).return=r,r=s}return o(r);case P:return e(r,s,(c=a._init)(a._payload),l)}if(te(a))return g(r,s,a,l);if(M(a))return m(r,s,a,l);vs(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==s&&6===s.tag?(n(r,s.sibling),(s=i(s,a)).return=r,r=s):(n(r,s),(s=Fu(a,r.mode,l)).return=r,r=s),o(r)):n(r,s)}}var Es=bs(!0),Ts=bs(!1),Ss=_i(null),ws=null,_s=null,As=null;function ks(){As=_s=ws=null}function Ls(e){var t=Ss.current;Ai(Ss),e._currentValue=t}function Cs(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rs(e,t){ws=e,As=_s=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bo=!0),e.firstContext=null)}function Is(e){var t=e._currentValue;if(As!==e)if(e={context:e,memoizedValue:t,next:null},null===_s){if(null===ws)throw Error(s(308));_s=e,ws.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return t}var xs=null;function Ps(e){null===xs?xs=[e]:xs.push(e)}function Ds(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ps(t)):(n.next=i.next,i.next=n),t.interleaved=n,Os(e,r)}function Os(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ms=!1;function Ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Us(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Cl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Os(e,n)}return null===(i=r.interleaved)?(t.next=t,Ps(r)):(t.next=i.next,i.next=t),r.interleaved=t,Os(e,n)}function $s(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Hs(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?i=s=a:s=s.next=a,n=n.next}while(null!==n);null===s?i=s=t:s=s.next=t}else i=s=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gs(e,t,n,r){var i=e.updateQueue;Ms=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,u=l.next;l.next=null,null===a?s=u:a.next=u,a=l;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l)}if(null!==s){var h=i.baseState;for(a=0,c=u=l=null,o=s;;){var d=o.lane,f=o.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,g=o;switch(d=t,f=n,g.tag){case 1:if("function"==typeof(p=g.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=g.payload)?p.call(f,h,d):p))break e;h=F({},h,d);break e;case 2:Ms=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[o]:d.push(o))}else f={eventTime:f,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=f,l=h):c=c.next=f,a|=d;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(d=o).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===s&&(i.shared.lanes=0);Nl|=a,e.lanes=a,e.memoizedState=h}}function js(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(s(191,i));i.call(r)}}}var Vs={},zs=_i(Vs),Ks=_i(Vs),Ws=_i(Vs);function Ys(e){if(e===Vs)throw Error(s(174));return e}function qs(e,t){switch(ki(Ws,t),ki(Ks,e),ki(zs,Vs),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ai(zs),ki(zs,t)}function Xs(){Ai(zs),Ai(Ks),Ai(Ws)}function Qs(e){Ys(Ws.current);var t=Ys(zs.current),n=le(t,e.type);t!==n&&(ki(Ks,e),ki(zs,n))}function Zs(e){Ks.current===e&&(Ai(zs),Ai(Ks))}var Js=_i(0);function ea(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=[];function na(){for(var e=0;e<ta.length;e++)ta[e]._workInProgressVersionPrimary=null;ta.length=0}var ra=E.ReactCurrentDispatcher,ia=E.ReactCurrentBatchConfig,sa=0,aa=null,oa=null,la=null,ua=!1,ca=!1,ha=0,da=0;function fa(){throw Error(s(321))}function pa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(sa=a,aa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ra.current=null===e||null===e.memoizedState?Za:Ja,e=n(r,i),ca){a=0;do{if(ca=!1,ha=0,25<=a)throw Error(s(301));a+=1,la=oa=null,t.updateQueue=null,ra.current=eo,e=n(r,i)}while(ca)}if(ra.current=Qa,t=null!==oa&&null!==oa.next,sa=0,la=oa=aa=null,ua=!1,t)throw Error(s(300));return e}function ma(){var e=0!==ha;return ha=0,e}function va(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===la?aa.memoizedState=la=e:la=la.next=e,la}function ya(){if(null===oa){var e=aa.alternate;e=null!==e?e.memoizedState:null}else e=oa.next;var t=null===la?aa.memoizedState:la.next;if(null!==t)la=t,oa=e;else{if(null===e)throw Error(s(310));e={memoizedState:(oa=e).memoizedState,baseState:oa.baseState,baseQueue:oa.baseQueue,queue:oa.queue,next:null},null===la?aa.memoizedState=la=e:la=la.next=e}return la}function ba(e,t){return"function"==typeof t?t(e):t}function Ea(e){var t=ya(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=oa,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=o=null,u=null,c=a;do{var h=c.lane;if((sa&h)===h)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=d,o=r):u=u.next=d,aa.lanes|=h,Nl|=h}c=c.next}while(null!==c&&c!==a);null===u?o=r:u.next=l,or(r,t.memoizedState)||(bo=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,aa.lanes|=a,Nl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ta(e){var t=ya(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);or(a,t.memoizedState)||(bo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Sa(){}function wa(e,t){var n=aa,r=ya(),i=t(),a=!or(r.memoizedState,i);if(a&&(r.memoizedState=i,bo=!0),r=r.queue,Ma(ka.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==la&&1&la.memoizedState.tag){if(n.flags|=2048,Ia(9,Aa.bind(null,n,r,i,t),void 0,null),null===Rl)throw Error(s(349));30&sa||_a(n,t,i)}return i}function _a(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=aa.updateQueue)?(t={lastEffect:null,stores:null},aa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Aa(e,t,n,r){t.value=n,t.getSnapshot=r,La(t)&&Ca(e)}function ka(e,t,n){return n((function(){La(t)&&Ca(e)}))}function La(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Ca(e){var t=Os(e,1);null!==t&&nu(t,e,1,-1)}function Ra(e){var t=va();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=Wa.bind(null,aa,e),[t.memoizedState,e]}function Ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=aa.updateQueue)?(t={lastEffect:null,stores:null},aa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function xa(){return ya().memoizedState}function Pa(e,t,n,r){var i=va();aa.flags|=e,i.memoizedState=Ia(1|t,n,void 0,void 0===r?null:r)}function Da(e,t,n,r){var i=ya();r=void 0===r?null:r;var s=void 0;if(null!==oa){var a=oa.memoizedState;if(s=a.destroy,null!==r&&pa(r,a.deps))return void(i.memoizedState=Ia(t,n,s,r))}aa.flags|=e,i.memoizedState=Ia(1|t,n,s,r)}function Oa(e,t){return Pa(8390656,8,e,t)}function Ma(e,t){return Da(2048,8,e,t)}function Na(e,t){return Da(4,2,e,t)}function Fa(e,t){return Da(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ua(e,t,n){return n=null!=n?n.concat([e]):null,Da(4,4,Ba.bind(null,t,e),n)}function $a(){}function Ha(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ga(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ja(e,t,n){return 21&sa?(or(n,t)||(n=gt(),aa.lanes|=n,Nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bo=!0),e.memoizedState=n)}function Va(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{bt=n,ia.transition=r}}function za(){return ya().memoizedState}function Ka(e,t,n){var r=tu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e)?qa(t,n):null!==(n=Ds(e,t,n,r))&&(nu(n,e,r,eu()),Xa(n,t,r))}function Wa(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))qa(t,i);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,or(o,a)){var l=t.interleaved;return null===l?(i.next=i,Ps(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ds(e,t,i,r))&&(nu(n,e,r,i=eu()),Xa(n,t,r))}}function Ya(e){var t=e.alternate;return e===aa||null!==t&&t===aa}function qa(e,t){ca=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:Is,useCallback:fa,useContext:fa,useEffect:fa,useImperativeHandle:fa,useInsertionEffect:fa,useLayoutEffect:fa,useMemo:fa,useReducer:fa,useRef:fa,useState:fa,useDebugValue:fa,useDeferredValue:fa,useTransition:fa,useMutableSource:fa,useSyncExternalStore:fa,useId:fa,unstable_isNewReconciler:!1},Za={readContext:Is,useCallback:function(e,t){return va().memoizedState=[e,void 0===t?null:t],e},useContext:Is,useEffect:Oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Pa(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pa(4,2,e,t)},useMemo:function(e,t){var n=va();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=va();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ka.bind(null,aa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},va().memoizedState=e},useState:Ra,useDebugValue:$a,useDeferredValue:function(e){return va().memoizedState=e},useTransition:function(){var e=Ra(!1),t=e[0];return e=Va.bind(null,e[1]),va().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=aa,i=va();if(is){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Rl)throw Error(s(349));30&sa||_a(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Oa(ka.bind(null,r,a,e),[e]),r.flags|=2048,Ia(9,Aa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=va(),t=Rl.identifierPrefix;if(is){var n=Qi;t=":"+t+"R"+(n=(Xi&~(1<<32-at(Xi)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=da++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ja={readContext:Is,useCallback:Ha,useContext:Is,useEffect:Ma,useImperativeHandle:Ua,useInsertionEffect:Na,useLayoutEffect:Fa,useMemo:Ga,useReducer:Ea,useRef:xa,useState:function(){return Ea(ba)},useDebugValue:$a,useDeferredValue:function(e){return ja(ya(),oa.memoizedState,e)},useTransition:function(){return[Ea(ba)[0],ya().memoizedState]},useMutableSource:Sa,useSyncExternalStore:wa,useId:za,unstable_isNewReconciler:!1},eo={readContext:Is,useCallback:Ha,useContext:Is,useEffect:Ma,useImperativeHandle:Ua,useInsertionEffect:Na,useLayoutEffect:Fa,useMemo:Ga,useReducer:Ta,useRef:xa,useState:function(){return Ta(ba)},useDebugValue:$a,useDeferredValue:function(e){var t=ya();return null===oa?t.memoizedState=e:ja(t,oa.memoizedState,e)},useTransition:function(){return[Ta(ba)[0],ya().memoizedState]},useMutableSource:Sa,useSyncExternalStore:wa,useId:za,unstable_isNewReconciler:!1};function to(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function no(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ro={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),s=Bs(r,i);s.payload=t,null!=n&&(s.callback=n),null!==(t=Us(e,s,i))&&(nu(t,e,i,r),$s(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),s=Bs(r,i);s.tag=1,s.payload=t,null!=n&&(s.callback=n),null!==(t=Us(e,s,i))&&(nu(t,e,i,r),$s(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=Bs(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Us(e,i,r))&&(nu(t,e,r,n),$s(t,e,r))}};function io(e,t,n,r,i,s,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,s,a):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,s))}function so(e,t,n){var r=!1,i=Li,s=t.contextType;return"object"==typeof s&&null!==s?s=Is(s):(i=Pi(t)?Ii:Ci.current,s=(r=null!=(r=t.contextTypes))?xi(e,i):Li),t=new t(n,s),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ro,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function ao(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function oo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ns(e);var s=t.contextType;"object"==typeof s&&null!==s?i.context=Is(s):(s=Pi(t)?Ii:Ci.current,i.context=xi(e,s)),i.state=e.memoizedState,"function"==typeof(s=t.getDerivedStateFromProps)&&(no(e,t,s,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ro.enqueueReplaceState(i,i.state,null),Gs(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function uo(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function co(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var ho="function"==typeof WeakMap?WeakMap:Map;function fo(e,t,n){(n=Bs(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,zl=r),co(0,t)},n}function po(e,t,n){(n=Bs(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){co(0,t)}}var s=e.stateNode;return null!==s&&"function"==typeof s.componentDidCatch&&(n.callback=function(){co(0,t),"function"!=typeof r&&(null===Kl?Kl=new Set([this]):Kl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function go(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ho;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Au.bind(null,e,t,n),t.then(e,e))}function mo(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vo(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bs(-1,1)).tag=2,Us(n,t,1))),n.lanes|=1),e)}var yo=E.ReactCurrentOwner,bo=!1;function Eo(e,t,n,r){t.child=null===e?Ts(t,null,n,r):Es(t,e.child,n,r)}function To(e,t,n,r,i){n=n.render;var s=t.ref;return Rs(t,i),r=ga(e,t,n,r,s,i),n=ma(),null===e||bo?(is&&n&&es(t),t.flags|=1,Eo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vo(e,t,i))}function So(e,t,n,r,i){if(null===e){var s=n.type;return"function"!=typeof s||Pu(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ou(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,wo(e,t,s,r,i))}if(s=e.child,0===(e.lanes&i)){var a=s.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vo(e,t,i)}return t.flags|=1,(e=Du(s,r)).ref=t.ref,e.return=t,t.child=e}function wo(e,t,n,r,i){if(null!==e){var s=e.memoizedProps;if(lr(s,r)&&e.ref===t.ref){if(bo=!1,t.pendingProps=r=s,0===(e.lanes&i))return t.lanes=e.lanes,Vo(e,t,i);131072&e.flags&&(bo=!0)}}return ko(e,t,n,r,i)}function _o(e,t,n){var r=t.pendingProps,i=r.children,s=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==s?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ki(Dl,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==s?s.baseLanes:n,ki(Dl,Pl),Pl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ki(Dl,Pl),Pl|=n;else null!==s?(r=s.baseLanes|n,t.memoizedState=null):r=n,ki(Dl,Pl),Pl|=r;return Eo(e,t,i,n),t.child}function Ao(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ko(e,t,n,r,i){var s=Pi(n)?Ii:Ci.current;return s=xi(t,s),Rs(t,i),n=ga(e,t,n,r,s,i),r=ma(),null===e||bo?(is&&r&&es(t),t.flags|=1,Eo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vo(e,t,i))}function Lo(e,t,n,r,i){if(Pi(n)){var s=!0;Ni(t)}else s=!1;if(Rs(t,i),null===t.stateNode)jo(e,t),so(t,n,r),oo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,u=n.contextType;u="object"==typeof u&&null!==u?Is(u):xi(t,u=Pi(n)?Ii:Ci.current);var c=n.getDerivedStateFromProps,h="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;h||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==r||l!==u)&&ao(t,a,r,u),Ms=!1;var d=t.memoizedState;a.state=d,Gs(t,r,a,i),l=t.memoizedState,o!==r||d!==l||Ri.current||Ms?("function"==typeof c&&(no(t,n,c,r),l=t.memoizedState),(o=Ms||io(t,n,o,r,d,l,u))?(h||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=o):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fs(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:to(t.type,o),a.props=u,h=t.pendingProps,d=a.context,l="object"==typeof(l=n.contextType)&&null!==l?Is(l):xi(t,l=Pi(n)?Ii:Ci.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==h||d!==l)&&ao(t,a,r,l),Ms=!1,d=t.memoizedState,a.state=d,Gs(t,r,a,i);var p=t.memoizedState;o!==h||d!==p||Ri.current||Ms?("function"==typeof f&&(no(t,n,f,r),p=t.memoizedState),(u=Ms||io(t,n,u,r,d,p,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Co(e,t,n,r,s,i)}function Co(e,t,n,r,i,s){Ao(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Fi(t,n,!1),Vo(e,t,s);r=t.stateNode,yo.current=t;var o=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Es(t,e.child,null,s),t.child=Es(t,null,o,s)):Eo(e,t,o,s),t.memoizedState=r.state,i&&Fi(t,n,!0),t.child}function Ro(e){var t=e.stateNode;t.pendingContext?Oi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oi(0,t.context,!1),qs(e,t.containerInfo)}function Io(e,t,n,r,i){return fs(),ps(i),t.flags|=256,Eo(e,t,n,r),t.child}var xo,Po,Do,Oo,Mo={dehydrated:null,treeContext:null,retryLane:0};function No(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fo(e,t,n){var r,i=t.pendingProps,a=Js.current,o=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),ki(Js,1&a),null===e)return us(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,o?(i=t.mode,o=t.child,l={mode:"hidden",children:l},1&i||null===o?o=Nu(l,i,0,null):(o.childLanes=0,o.pendingProps=l),e=Mu(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=No(n),t.memoizedState=Mo,e):Bo(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,o){if(n)return 256&t.flags?(t.flags&=-257,Uo(e,t,o,r=uo(Error(s(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Nu({mode:"visible",children:r.children},i,0,null),(a=Mu(a,i,o,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&Es(t,e.child,null,o),t.child.memoizedState=No(o),t.memoizedState=Mo,a);if(!(1&t.mode))return Uo(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Uo(e,t,o,r=uo(a=Error(s(419)),r,void 0))}if(l=0!==(o&e.childLanes),bo||l){if(null!==(r=Rl)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Os(e,i),nu(r,e,i,-1))}return gu(),Uo(e,t,o,r=uo(Error(s(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Lu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,rs=ui(i.nextSibling),ns=t,is=!0,ss=null,null!==e&&(Wi[Yi++]=Xi,Wi[Yi++]=Qi,Wi[Yi++]=qi,Xi=e.id,Qi=e.overflow,qi=t),(t=Bo(t,r.children)).flags|=4096,t)}(e,t,l,i,r,a,n);if(o){o=i.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Du(a,u)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==r?o=Du(r,o):(o=Mu(o,l,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,l=null===(l=e.child.memoizedState)?No(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Mo,i}return e=(o=e.child).sibling,i=Du(o,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Bo(e,t){return(t=Nu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Uo(e,t,n,r){return null!==r&&ps(r),Es(t,e.child,null,n),(e=Bo(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $o(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Cs(e.return,t,n)}function Ho(e,t,n,r,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Go(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Eo(e,t,r.children,n),2&(r=Js.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$o(e,n,t);else if(19===e.tag)$o(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ki(Js,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ea(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ho(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ea(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ho(t,!0,n,null,s);break;case"together":Ho(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function jo(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vo(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Du(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Du(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function zo(e,t){if(!is)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ko(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wo(e,t,n){var r=t.pendingProps;switch(ts(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ko(t),null;case 1:case 17:return Pi(t.type)&&Di(),Ko(t),null;case 3:return r=t.stateNode,Xs(),Ai(Ri),Ai(Ci),na(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hs(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ss&&(au(ss),ss=null))),Po(e,t),Ko(t),null;case 5:Zs(t);var i=Ys(Ws.current);if(n=t.type,null!==e&&null!=t.stateNode)Do(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return Ko(t),null}if(e=Ys(zs.current),hs(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[di]=t,r[fi]=a,e=!!(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<Mr.length;i++)Ur(Mr[i],r);break;case"source":Ur("error",r);break;case"img":case"image":case"link":Ur("error",r),Ur("load",r);break;case"details":Ur("toggle",r);break;case"input":X(r,a),Ur("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Ur("invalid",r);break;case"textarea":ie(r,a),Ur("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&Zr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Zr(r.textContent,u,e),i=["children",""+u]):o.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Ur("scroll",r)}switch(n){case"input":K(r),J(r,a,!0);break;case"textarea":K(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[di]=t,e[fi]=r,xo(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;i<Mr.length;i++)Ur(Mr[i],e);i=r;break;case"source":Ur("error",e),i=r;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),i=r;break;case"details":Ur("toggle",e),i=r;break;case"input":X(e,r),i=q(e,r),Ur("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=F({},r,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ur("invalid",e)}for(a in ye(n,i),u=i)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?me(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&he(e,c):"children"===a?"string"==typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(o.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Ur("scroll",e):null!=c&&b(e,a,c,l))}switch(n){case"input":K(e),J(e,r,!1);break;case"textarea":K(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ko(t),null;case 6:if(e&&null!=t.stateNode)Oo(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(n=Ys(Ws.current),Ys(zs.current),hs(t)){if(r=t.stateNode,n=t.memoizedProps,r[di]=t,(a=r.nodeValue!==n)&&null!==(e=ns))switch(e.tag){case 3:Zr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[di]=t,t.stateNode=r}return Ko(t),null;case 13:if(Ai(Js),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(is&&null!==rs&&1&t.mode&&!(128&t.flags))ds(),fs(),t.flags|=98560,a=!1;else if(a=hs(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(s(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(s(317));a[di]=t}else fs(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ko(t),a=!1}else null!==ss&&(au(ss),ss=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Js.current?0===Ol&&(Ol=3):gu())),null!==t.updateQueue&&(t.flags|=4),Ko(t),null);case 4:return Xs(),Po(e,t),null===e&&Gr(t.stateNode.containerInfo),Ko(t),null;case 10:return Ls(t.type._context),Ko(t),null;case 19:if(Ai(Js),null===(a=t.memoizedState))return Ko(t),null;if(r=!!(128&t.flags),null===(l=a.rendering))if(r)zo(a,!1);else{if(0!==Ol||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ea(e))){for(t.flags|=128,zo(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ki(Js,1&Js.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>Gl&&(t.flags|=128,r=!0,zo(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ea(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),zo(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!is)return Ko(t),null}else 2*Qe()-a.renderingStartTime>Gl&&1073741824!==n&&(t.flags|=128,r=!0,zo(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=Js.current,ki(Js,r?1&n|2:1&n),t):(Ko(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Pl)&&(Ko(t),6&t.subtreeFlags&&(t.flags|=8192)):Ko(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}function Yo(e,t){switch(ts(t),t.tag){case 1:return Pi(t.type)&&Di(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xs(),Ai(Ri),Ai(Ci),na(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zs(t),null;case 13:if(Ai(Js),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));fs()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ai(Js),null;case 4:return Xs(),null;case 10:return Ls(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}xo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Po=function(){},Do=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ys(zs.current);var s,a=null;switch(n){case"input":i=q(e,i),r=q(e,r),a=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Ur("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Oo=function(e,t,n,r){n!==r&&(t.flags|=4)};var qo=!1,Xo=!1,Qo="function"==typeof WeakSet?WeakSet:Set,Zo=null;function Jo(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){_u(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){_u(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,void 0!==s&&el(t,n,s)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[fi],delete t[gi],delete t[mi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(st&&"function"==typeof st.onCommitFiberUnmount)try{st.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xo||Jo(n,t);case 6:var r=cl,i=hl;cl=null,dl(e,t,n),hl=i,null!==(cl=r)&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Gt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=hl,cl=n.stateNode.containerInfo,hl=!0,dl(e,t,n),cl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Xo&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,void 0!==a&&(2&s||4&s)&&el(n,t,a),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Xo&&(Jo(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){_u(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Xo=(r=Xo)||null!==n.memoizedState,dl(e,t,n),Xo=r):dl(e,t,n);break;default:dl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qo),t.forEach((function(t){var r=Cu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,hl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===cl)throw Error(s(160));fl(a,o,i),cl=null,hl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){_u(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){_u(e,e.return,t)}try{nl(5,e,e.return)}catch(t){_u(e,e.return,t)}}break;case 1:gl(t,e),vl(e),512&r&&null!==n&&Jo(n,n.return);break;case 5:if(gl(t,e),vl(e),512&r&&null!==n&&Jo(n,n.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(t){_u(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,o=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&Q(i,a),be(l,o);var c=be(l,a);for(o=0;o<u.length;o+=2){var h=u[o],d=u[o+1];"style"===h?me(i,d):"dangerouslySetInnerHTML"===h?he(i,d):"children"===h?de(i,d):b(i,h,d,c)}switch(l){case"input":Z(i,a);break;case"textarea":se(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[fi]=a}catch(t){_u(e,e.return,t)}}break;case 6:if(gl(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(s(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){_u(e,e.return,t)}}break;case 3:if(gl(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Gt(t.containerInfo)}catch(t){_u(e,e.return,t)}break;case 4:default:gl(t,e),vl(e);break;case 13:gl(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Hl=Qe())),4&r&&pl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Xo=(c=Xo)||h,gl(t,e),Xo=c):gl(t,e),vl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!h&&1&e.mode)for(Zo=e,h=e.child;null!==h;){for(d=Zo=h;null!==Zo;){switch(p=(f=Zo).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Jo(f,f.return);var g=f.stateNode;if("function"==typeof g.componentWillUnmount){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){_u(r,n,e)}}break;case 5:Jo(f,f.return);break;case 22:if(null!==f.memoizedState){Tl(d);continue}}null!==p?(p.return=f,Zo=p):Tl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{i=d.stateNode,c?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=d.stateNode,o=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ge("display",o))}catch(t){_u(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){_u(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gl(t,e),vl(e),4&r&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(de(i,""),r.flags&=-33),ul(e,ol(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,ol(e),a);break;default:throw Error(s(161))}}catch(t){_u(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Zo=e,bl(e,t,n)}function bl(e,t,n){for(var r=!!(1&e.mode);null!==Zo;){var i=Zo,s=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||qo;if(!a){var o=i.alternate,l=null!==o&&null!==o.memoizedState||Xo;o=qo;var u=Xo;if(qo=a,(Xo=l)&&!u)for(Zo=i;null!==Zo;)l=(a=Zo).child,22===a.tag&&null!==a.memoizedState?Sl(i):null!==l?(l.return=a,Zo=l):Sl(i);for(;null!==s;)Zo=s,bl(s,t,n),s=s.sibling;Zo=i,qo=o,Xo=u}El(e)}else 8772&i.subtreeFlags&&null!==s?(s.return=i,Zo=s):El(e)}}function El(e){for(;null!==Zo;){var t=Zo;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Xo||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:to(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&js(t,a,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}js(t,o,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var h=c.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Gt(d)}}}break;default:throw Error(s(163))}Xo||512&t.flags&&il(t)}catch(e){_u(t,t.return,e)}}if(t===e){Zo=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zo=n;break}Zo=t.return}}function Tl(e){for(;null!==Zo;){var t=Zo;if(t===e){Zo=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zo=n;break}Zo=t.return}}function Sl(e){for(;null!==Zo;){var t=Zo;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){_u(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){_u(t,i,e)}}var s=t.return;try{il(t)}catch(e){_u(t,s,e)}break;case 5:var a=t.return;try{il(t)}catch(e){_u(t,a,e)}}}catch(e){_u(t,t.return,e)}if(t===e){Zo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Zo=o;break}Zo=t.return}}var wl,_l=Math.ceil,Al=E.ReactCurrentDispatcher,kl=E.ReactCurrentOwner,Ll=E.ReactCurrentBatchConfig,Cl=0,Rl=null,Il=null,xl=0,Pl=0,Dl=_i(0),Ol=0,Ml=null,Nl=0,Fl=0,Bl=0,Ul=null,$l=null,Hl=0,Gl=1/0,jl=null,Vl=!1,zl=null,Kl=null,Wl=!1,Yl=null,ql=0,Xl=0,Ql=null,Zl=-1,Jl=0;function eu(){return 6&Cl?Qe():-1!==Zl?Zl:Zl=Qe()}function tu(e){return 1&e.mode?2&Cl&&0!==xl?xl&-xl:null!==gs.transition?(0===Jl&&(Jl=gt()),Jl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Xt(e.type):1}function nu(e,t,n,r){if(50<Xl)throw Xl=0,Ql=null,Error(s(185));vt(e,n,r),2&Cl&&e===Rl||(e===Rl&&(!(2&Cl)&&(Fl|=n),4===Ol&&ou(e,xl)),ru(e,r),1===n&&0===Cl&&!(1&t.mode)&&(Gl=Qe()+500,Ui&&Gi()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-at(s),o=1<<a,l=i[a];-1===l?0!==(o&n)&&0===(o&r)||(i[a]=ft(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}(e,t);var r=dt(e,e===Rl?xl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Ui=!0,Hi(e)}(lu.bind(null,e)):Hi(lu.bind(null,e)),ai((function(){!(6&Cl)&&Gi()})),n=null;else{switch(Et(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Ru(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Zl=-1,Jl=0,6&Cl)throw Error(s(327));var n=e.callbackNode;if(Su()&&e.callbackNode!==n)return null;var r=dt(e,e===Rl?xl:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=mu(e,r);else{t=r;var i=Cl;Cl|=2;var a=pu();for(Rl===e&&xl===t||(jl=null,Gl=Qe()+500,du(e,t));;)try{yu();break}catch(t){fu(e,t)}ks(),Al.current=a,Cl=i,null!==Il?t=0:(Rl=null,xl=0,t=Ol)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=su(e,i)),1===t)throw n=Ml,du(e,0),ou(e,r),ru(e,Qe()),n;if(6===t)ou(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!or(s(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=mu(e,r),2===t&&(a=pt(e),0!==a&&(r=a,t=su(e,a))),1!==t)))throw n=Ml,du(e,0),ou(e,r),ru(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:case 5:Tu(e,$l,jl);break;case 3:if(ou(e,r),(130023424&r)===r&&10<(t=Hl+500-Qe())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Tu.bind(null,e,$l,jl),t);break}Tu(e,$l,jl);break;case 4:if(ou(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-at(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_l(r/1960))-r)){e.timeoutHandle=ri(Tu.bind(null,e,$l,jl),r);break}Tu(e,$l,jl);break;default:throw Error(s(329))}}}return ru(e,Qe()),e.callbackNode===n?iu.bind(null,e):null}function su(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=$l,$l=n,null!==t&&au(t)),e}function au(e){null===$l?$l=e:$l.push.apply($l,e)}function ou(e,t){for(t&=~Bl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(6&Cl)throw Error(s(327));Su();var t=dt(e,0);if(!(1&t))return ru(e,Qe()),null;var n=mu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=su(e,r))}if(1===n)throw n=Ml,du(e,0),ou(e,t),ru(e,Qe()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tu(e,$l,jl),ru(e,Qe()),null}function uu(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Gl=Qe()+500,Ui&&Gi())}}function cu(e){null!==Yl&&0===Yl.tag&&!(6&Cl)&&Su();var t=Cl;Cl|=1;var n=Ll.transition,r=bt;try{if(Ll.transition=null,bt=1,e)return e()}finally{bt=r,Ll.transition=n,!(6&(Cl=t))&&Gi()}}function hu(){Pl=Dl.current,Ai(Dl)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(ts(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Di();break;case 3:Xs(),Ai(Ri),Ai(Ci),na();break;case 5:Zs(r);break;case 4:Xs();break;case 13:case 19:Ai(Js);break;case 10:Ls(r.type._context);break;case 22:case 23:hu()}n=n.return}if(Rl=e,Il=e=Du(e.current,null),xl=Pl=t,Ol=0,Ml=null,Bl=Fl=Nl=0,$l=Ul=null,null!==xs){for(t=0;t<xs.length;t++)if(null!==(r=(n=xs[t]).interleaved)){n.interleaved=null;var i=r.next,s=n.pending;if(null!==s){var a=s.next;s.next=i,r.next=a}n.pending=r}xs=null}return e}function fu(e,t){for(;;){var n=Il;try{if(ks(),ra.current=Qa,ua){for(var r=aa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(sa=0,la=oa=aa=null,ca=!1,ha=0,kl.current=null,null===n||null===n.return){Ol=1,Ml=t,Il=null;break}e:{var a=e,o=n.return,l=n,u=t;if(t=xl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,h=l,d=h.tag;if(!(1&h.mode||0!==d&&11!==d&&15!==d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=mo(o);if(null!==p){p.flags&=-257,vo(p,o,l,0,t),1&p.mode&&go(a,c,t),u=c;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(!(1&t)){go(a,c,t),gu();break e}u=Error(s(426))}else if(is&&1&l.mode){var v=mo(o);if(null!==v){!(65536&v.flags)&&(v.flags|=256),vo(v,o,l,0,t),ps(lo(u,l));break e}}a=u=lo(u,l),4!==Ol&&(Ol=2),null===Ul?Ul=[a]:Ul.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Hs(a,fo(0,u,t));break e;case 1:l=u;var y=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof y.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Kl&&Kl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Hs(a,po(a,l,t));break e}}a=a.return}while(null!==a)}Eu(n)}catch(e){t=e,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function pu(){var e=Al.current;return Al.current=Qa,null===e?Qa:e}function gu(){0!==Ol&&3!==Ol&&2!==Ol||(Ol=4),null===Rl||!(268435455&Nl)&&!(268435455&Fl)||ou(Rl,xl)}function mu(e,t){var n=Cl;Cl|=2;var r=pu();for(Rl===e&&xl===t||(jl=null,du(e,t));;)try{vu();break}catch(t){fu(e,t)}if(ks(),Cl=n,Al.current=r,null!==Il)throw Error(s(261));return Rl=null,xl=0,Ol}function vu(){for(;null!==Il;)bu(Il)}function yu(){for(;null!==Il&&!qe();)bu(Il)}function bu(e){var t=wl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?Eu(e):Il=t,kl.current=null}function Eu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Yo(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Ol=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Wo(n,t,Pl)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ol&&(Ol=5)}function Tu(e,t,n){var r=bt,i=Ll.transition;try{Ll.transition=null,bt=1,function(e,t,n,r){do{Su()}while(null!==Yl);if(6&Cl)throw Error(s(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}(e,a),e===Rl&&(Il=Rl=null,xl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Wl||(Wl=!0,Ru(tt,(function(){return Su(),null}))),a=!!(15990&n.flags),15990&n.subtreeFlags||a){a=Ll.transition,Ll.transition=null;var o=bt;bt=1;var l=Cl;Cl|=4,kl.current=null,function(e,t){if(ei=Vt,fr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var o=0,l=-1,u=-1,c=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(l=o+i),d!==a||0!==r&&3!==d.nodeType||(u=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(l=o),f===a&&++h===r&&(u=o),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Vt=!1,Zo=t;null!==Zo;)if(e=(t=Zo).child,1028&t.subtreeFlags&&null!==e)e.return=t,Zo=e;else for(;null!==Zo;){t=Zo;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:to(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var E=t.stateNode.containerInfo;1===E.nodeType?E.textContent="":9===E.nodeType&&E.documentElement&&E.removeChild(E.documentElement);break;default:throw Error(s(163))}}catch(e){_u(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Zo=e;break}Zo=t.return}g=tl,tl=!1}(e,n),ml(n,e),pr(ti),Vt=!!ei,ti=ei=null,e.current=n,yl(n,e,i),Xe(),Cl=l,bt=o,Ll.transition=a}else e.current=n;if(Wl&&(Wl=!1,Yl=e,ql=i),0===(a=e.pendingLanes)&&(Kl=null),function(e){if(st&&"function"==typeof st.onCommitFiberRoot)try{st.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ru(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=zl,zl=null,e;!!(1&ql)&&0!==e.tag&&Su(),1&(a=e.pendingLanes)?e===Ql?Xl++:(Xl=0,Ql=e):Xl=0,Gi()}(e,t,n,r)}finally{Ll.transition=i,bt=r}return null}function Su(){if(null!==Yl){var e=Et(ql),t=Ll.transition,n=bt;try{if(Ll.transition=null,bt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,ql=0,6&Cl)throw Error(s(331));var i=Cl;for(Cl|=4,Zo=e.current;null!==Zo;){var a=Zo,o=a.child;if(16&Zo.flags){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Zo=c;null!==Zo;){var h=Zo;switch(h.tag){case 0:case 11:case 15:nl(8,h,a)}var d=h.child;if(null!==d)d.return=h,Zo=d;else for(;null!==Zo;){var f=(h=Zo).sibling,p=h.return;if(sl(h),h===c){Zo=null;break}if(null!==f){f.return=p,Zo=f;break}Zo=p}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Zo=a}}if(2064&a.subtreeFlags&&null!==o)o.return=a,Zo=o;else e:for(;null!==Zo;){if(2048&(a=Zo).flags)switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Zo=y;break e}Zo=a.return}}var b=e.current;for(Zo=b;null!==Zo;){var E=(o=Zo).child;if(2064&o.subtreeFlags&&null!==E)E.return=o,Zo=E;else e:for(o=b;null!==Zo;){if(2048&(l=Zo).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){_u(l,l.return,e)}if(l===o){Zo=null;break e}var T=l.sibling;if(null!==T){T.return=l.return,Zo=T;break e}Zo=l.return}}if(Cl=i,Gi(),st&&"function"==typeof st.onPostCommitFiberRoot)try{st.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Ll.transition=t}}return!1}function wu(e,t,n){e=Us(e,t=fo(0,t=lo(n,t),1),1),t=eu(),null!==e&&(vt(e,1,t),ru(e,t))}function _u(e,t,n){if(3===e.tag)wu(e,e,n);else for(;null!==t;){if(3===t.tag){wu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Kl||!Kl.has(r))){t=Us(t,e=po(t,e=lo(n,e),1),1),e=eu(),null!==t&&(vt(t,1,e),ru(t,e));break}}t=t.return}}function Au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Rl===e&&(xl&n)===n&&(4===Ol||3===Ol&&(130023424&xl)===xl&&500>Qe()-Hl?du(e,0):Bl|=n),ru(e,t)}function ku(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=eu();null!==(e=Os(e,t))&&(vt(e,t,n),ru(e,n))}function Lu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ku(e,n)}function Cu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),ku(e,n)}function Ru(e,t){return We(e,t)}function Iu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xu(e,t,n,r){return new Iu(e,t,n,r)}function Pu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Du(e,t){var n=e.alternate;return null===n?((n=xu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ou(e,t,n,r,i,a){var o=2;if(r=e,"function"==typeof e)Pu(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case w:return Mu(n.children,i,a,t);case _:o=8,i|=8;break;case A:return(e=xu(12,n,t,2|i)).elementType=A,e.lanes=a,e;case R:return(e=xu(13,n,t,i)).elementType=R,e.lanes=a,e;case I:return(e=xu(19,n,t,i)).elementType=I,e.lanes=a,e;case D:return Nu(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case k:o=10;break e;case L:o=9;break e;case C:o=11;break e;case x:o=14;break e;case P:o=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=xu(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Mu(e,t,n,r){return(e=xu(7,e,r,t)).lanes=n,e}function Nu(e,t,n,r){return(e=xu(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Fu(e,t,n){return(e=xu(6,e,null,t)).lanes=n,e}function Bu(e,t,n){return(t=xu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $u(e,t,n,r,i,s,a,o,l){return e=new Uu(e,t,n,o,l),1===t?(t=1,!0===s&&(t|=8)):t=0,s=xu(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ns(s),e}function Hu(e){if(!e)return Li;e:{if(Ge(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(Pi(n))return Mi(e,n,t)}return t}function Gu(e,t,n,r,i,s,a,o,l){return(e=$u(n,r,!0,e,0,s,0,o,l)).context=Hu(null),n=e.current,(s=Bs(r=eu(),i=tu(n))).callback=null!=t?t:null,Us(n,s,i),e.current.lanes=i,vt(e,i,r),ru(e,r),e}function ju(e,t,n,r){var i=t.current,s=eu(),a=tu(i);return n=Hu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bs(s,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Us(i,t,a))&&(nu(e,i,a,s),$s(e,i,a)),a}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ku(e,t){zu(e,t),(e=e.alternate)&&zu(e,t)}wl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ri.current)bo=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return bo=!1,function(e,t,n){switch(t.tag){case 3:Ro(t),fs();break;case 5:Qs(t);break;case 1:Pi(t.type)&&Ni(t);break;case 4:qs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ki(Ss,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ki(Js,1&Js.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fo(e,t,n):(ki(Js,1&Js.current),null!==(e=Vo(e,t,n))?e.sibling:null);ki(Js,1&Js.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Go(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ki(Js,Js.current),r)break;return null;case 22:case 23:return t.lanes=0,_o(e,t,n)}return Vo(e,t,n)}(e,t,n);bo=!!(131072&e.flags)}else bo=!1,is&&1048576&t.flags&&Ji(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;jo(e,t),e=t.pendingProps;var i=xi(t,Ci.current);Rs(t,n),i=ga(null,t,r,e,i,n);var a=ma();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pi(r)?(a=!0,Ni(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ns(t),i.updater=ro,t.stateNode=i,i._reactInternals=t,oo(t,r,e,n),t=Co(null,t,r,!0,a,n)):(t.tag=0,is&&a&&es(t),Eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(jo(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Pu(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===x)return 14}return 2}(r),e=to(r,e),i){case 0:t=ko(null,t,r,e,n);break e;case 1:t=Lo(null,t,r,e,n);break e;case 11:t=To(null,t,r,e,n);break e;case 14:t=So(null,t,r,to(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,ko(e,t,r,i=t.elementType===r?i:to(r,i),n);case 1:return r=t.type,i=t.pendingProps,Lo(e,t,r,i=t.elementType===r?i:to(r,i),n);case 3:e:{if(Ro(t),null===e)throw Error(s(387));r=t.pendingProps,i=(a=t.memoizedState).element,Fs(e,t),Gs(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Io(e,t,r,n,i=lo(Error(s(423)),t));break e}if(r!==i){t=Io(e,t,r,n,i=lo(Error(s(424)),t));break e}for(rs=ui(t.stateNode.containerInfo.firstChild),ns=t,is=!0,ss=null,n=Ts(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fs(),r===i){t=Vo(e,t,n);break e}Eo(e,t,r,n)}t=t.child}return t;case 5:return Qs(t),null===e&&us(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,ni(r,i)?o=null:null!==a&&ni(r,a)&&(t.flags|=32),Ao(e,t),Eo(e,t,o,n),t.child;case 6:return null===e&&us(t),null;case 13:return Fo(e,t,n);case 4:return qs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Es(t,null,r,n):Eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,To(e,t,r,i=t.elementType===r?i:to(r,i),n);case 7:return Eo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,ki(Ss,r._currentValue),r._currentValue=o,null!==a)if(or(a.value,o)){if(a.children===i.children&&!Ri.current){t=Vo(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Bs(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Cs(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Cs(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}Eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Rs(t,n),r=r(i=Is(i)),t.flags|=1,Eo(e,t,r,n),t.child;case 14:return i=to(r=t.type,t.pendingProps),So(e,t,r,i=to(r.type,i),n);case 15:return wo(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:to(r,i),jo(e,t),t.tag=1,Pi(r)?(e=!0,Ni(t)):e=!1,Rs(t,n),so(t,r,i),oo(t,r,i,n),Co(null,t,r,!0,e,n);case 19:return Go(e,t,n);case 22:return _o(e,t,n)}throw Error(s(156,t.tag))};var Wu="function"==typeof reportError?reportError:function(e){console.error(e)};function Yu(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zu(){}function Ju(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if("function"==typeof i){var o=i;i=function(){var e=Vu(a);o.call(e)}}ju(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var s=r;r=function(){var e=Vu(a);s.call(e)}}var a=Gu(t,r,e,0,null,!1,0,"",Zu);return e._reactRootContainer=a,e[pi]=a.current,Gr(8===e.nodeType?e.parentNode:e),cu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var o=r;r=function(){var e=Vu(l);o.call(e)}}var l=$u(e,0,!1,null,0,!1,0,"",Zu);return e._reactRootContainer=l,e[pi]=l.current,Gr(8===e.nodeType?e.parentNode:e),cu((function(){ju(t,l,n,r)})),l}(n,t,e,i,r);return Vu(a)}qu.prototype.render=Yu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));ju(e,t,null,null)},qu.prototype.unmount=Yu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){ju(null,e,null,null)})),t[pi]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Ft(e)}},Tt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ht(t.pendingLanes);0!==n&&(yt(t,1|n),ru(t,Qe()),!(6&Cl)&&(Gl=Qe()+500,Gi()))}break;case 13:cu((function(){var t=Os(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),Ku(e,1)}},St=function(e){if(13===e.tag){var t=Os(e,134217728);null!==t&&nu(t,e,134217728,eu()),Ku(e,134217728)}},wt=function(e){if(13===e.tag){var t=tu(e),n=Os(e,t);null!==n&&nu(n,e,t,eu()),Ku(e,t)}},_t=function(){return bt},At=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Se=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ti(r);if(!i)throw Error(s(90));W(r),Z(r,i)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=uu,Re=cu;var ec={usingClientEntryPoint:!1,Events:[bi,Ei,Ti,ke,Le,uu]},tc={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ze(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{it=rc.inject(nc),st=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(s(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xu(e))throw Error(s(299));var n=!1,r="",i=Wu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=$u(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Gr(8===e.nodeType?e.parentNode:e),new Yu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return null===(e=ze(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Qu(t))throw Error(s(200));return Ju(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xu(e))throw Error(s(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",o=Wu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=Gu(t,null,e,1,null!=n?n:null,i,0,a,o),e[pi]=t.current,Gr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new qu(t)},t.render=function(e,t,n){if(!Qu(t))throw Error(s(200));return Ju(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qu(e))throw Error(s(40));return!!e._reactRootContainer&&(cu((function(){Ju(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qu(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return Ju(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},7502:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:function(){return r}})},7519:function(e,t,n){"use strict";n.d(t,{A:function(){return ne}});const{entries:r,setPrototypeOf:i,isFrozen:s,getPrototypeOf:a,getOwnPropertyDescriptor:o}=Object;let{freeze:l,seal:u,create:c}=Object,{apply:h,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),u||(u=function(e){return e}),h||(h=function(e,t,n){return e.apply(t,n)}),d||(d=function(e,t){return new e(...t)});const f=C(Array.prototype.forEach),p=C(Array.prototype.lastIndexOf),g=C(Array.prototype.pop),m=C(Array.prototype.push),v=C(Array.prototype.splice),y=C(String.prototype.toLowerCase),b=C(String.prototype.toString),E=C(String.prototype.match),T=C(String.prototype.replace),S=C(String.prototype.indexOf),w=C(String.prototype.trim),_=C(Object.prototype.hasOwnProperty),A=C(RegExp.prototype.test),k=(L=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(L,t)});var L;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return h(e,t,r)}}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;i&&i(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(s(t)||(t[r]=e),i=e)}e[i]=!0}return e}function I(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function x(e){const t=c(null);for(const[n,i]of r(e))_(e,n)&&(Array.isArray(i)?t[n]=I(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=x(i):t[n]=i);return t}function P(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=a(e)}return function(){return null}}const D=l(["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","section","select","shadow","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"]),O=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=l(["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"]),N=l(["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"]),F=l(["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"]),B=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),$=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=l(["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","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","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-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"]),G=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),j=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=u(/<%[\w\W]*|[\w\W]*%>/gm),K=u(/\$\{[\w\W]*/gm),W=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=u(/^aria-[\-\w]+$/),q=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=u(/^(?:\w+script|data):/i),Q=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=u(/^html$/i),J=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:J,DATA_ATTR:W,DOCTYPE_NAME:Z,ERB_EXPR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:V,TMPLIT_EXPR:K});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const s=i,a=s.currentScript,{DocumentFragment:o,HTMLTemplateElement:u,Node:h,Element:d,NodeFilter:L,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:I,DOMParser:V,trustedTypes:z}=t,K=d.prototype,W=P(K,"cloneNode"),Y=P(K,"remove"),X=P(K,"nextSibling"),Q=P(K,"childNodes"),J=P(K,"parentNode");if("function"==typeof u){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ne,re="";const{implementation:ie,createNodeIterator:se,createDocumentFragment:ae,getElementsByTagName:oe}=i,{importNode:le}=s;let ue={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&ie&&void 0!==ie.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:he,TMPLIT_EXPR:de,DATA_ATTR:fe,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:ve}=ee;let{IS_ALLOWED_URI:ye}=ee,be=null;const Ee=R({},[...D,...O,...M,...F,...U]);let Te=null;const Se=R({},[...$,...H,...G,...j]);let we=Object.seal(c(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}})),_e=null,Ae=null,ke=!0,Le=!0,Ce=!1,Re=!0,Ie=!1,xe=!0,Pe=!1,De=!1,Oe=!1,Me=!1,Ne=!1,Fe=!1,Be=!0,Ue=!1,$e=!0,He=!1,Ge={},je=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ze=null;const Ke=R({},["audio","video","img","source","image","track"]);let We=null;const Ye=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Ze=Qe,Je=!1,et=null;const tt=R({},[qe,Xe,Qe],b);let nt=R({},["mi","mo","mn","ms","mtext"]),rt=R({},["annotation-xml"]);const it=R({},["title","style","font","a","script"]);let st=null;const at=["application/xhtml+xml","text/html"];let ot=null,lt=null;const ut=i.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!lt||lt!==e){if(e&&"object"==typeof e||(e={}),e=x(e),st=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ot="application/xhtml+xml"===st?b:y,be=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ot):Ee,Te=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ot):Se,et=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,b):tt,We=_(e,"ADD_URI_SAFE_ATTR")?R(x(Ye),e.ADD_URI_SAFE_ATTR,ot):Ye,ze=_(e,"ADD_DATA_URI_TAGS")?R(x(Ke),e.ADD_DATA_URI_TAGS,ot):Ke,je=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ot):Ve,_e=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ot):x({}),Ae=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ot):x({}),Ge=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,xe=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Ue=e.SANITIZE_NAMED_PROPS||!1,$e=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||q,Ze=e.NAMESPACE||Qe,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,rt=e.HTML_INTEGRATION_POINTS||rt,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Le=!1),Ne&&(Me=!0),Ge&&(be=R({},U),Te=[],!0===Ge.html&&(R(be,D),R(Te,$)),!0===Ge.svg&&(R(be,O),R(Te,H),R(Te,j)),!0===Ge.svgFilters&&(R(be,M),R(Te,H),R(Te,j)),!0===Ge.mathMl&&(R(be,F),R(Te,G),R(Te,j))),e.ADD_TAGS&&(be===Ee&&(be=x(be)),R(be,e.ADD_TAGS,ot)),e.ADD_ATTR&&(Te===Se&&(Te=x(Te)),R(Te,e.ADD_ATTR,ot)),e.ADD_URI_SAFE_ATTR&&R(We,e.ADD_URI_SAFE_ATTR,ot),e.FORBID_CONTENTS&&(je===Ve&&(je=x(je)),R(je,e.FORBID_CONTENTS,ot)),$e&&(be["#text"]=!0),Pe&&R(be,["html","head","body"]),be.table&&(R(be,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,a)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),lt=e}},dt=R({},[...O,...M,...N]),ft=R({},[...F,...B]),pt=function(e){m(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){Y(e)}},gt=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Me||Ne)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(Oe)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===st&&Ze===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Ze===Qe)try{t=(new V).parseFromString(r,st)}catch(e){}if(!t||!t.documentElement){t=ie.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Je?re:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),Ze===Qe?oe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:s},vt=function(e){return se.call(e.ownerDocument||e,e,L.SHOW_ELEMENT|L.SHOW_COMMENT|L.SHOW_TEXT|L.SHOW_PROCESSING_INSTRUCTION|L.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof C)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof h&&e instanceof h};function Et(e,t,r){f(e,(e=>{e.call(n,t,r,lt)}))}const Tt=function(e){let t=null;if(Et(ue.beforeSanitizeElements,e,null),yt(e))return pt(e),!0;const r=ot(e.nodeName);if(Et(ue.uponSanitizeElement,e,{tagName:r,allowedTags:be}),xe&&e.hasChildNodes()&&!bt(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent))return pt(e),!0;if(7===e.nodeType)return pt(e),!0;if(xe&&8===e.nodeType&&A(/<[/\w]/g,e.data))return pt(e),!0;if(!be[r]||_e[r]){if(!_e[r]&&wt(r)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,r))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(r))return!1}if($e&&!je[r]){const t=J(e)||e.parentNode,n=Q(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const i=W(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,X(e))}}return pt(e),!0}return e instanceof d&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=y(e.tagName),r=y(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(dt[n]):e.namespaceURI===qe?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Xe?"math"===n&&rt[r]:Boolean(ft[n]):e.namespaceURI===Qe?!(t.namespaceURI===Xe&&!rt[r])&&!(t.namespaceURI===qe&&!nt[r])&&!ft[n]&&(it[n]||!dt[n]):!("application/xhtml+xml"!==st||!et[e.namespaceURI]))}(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,f([ce,he,de],(e=>{t=T(t,e," ")})),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(ue.afterSanitizeElements,e,null),!1):(pt(e),!0)},St=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in i||n in ut))return!1;if(Le&&!Ae[t]&&A(fe,t));else if(ke&&A(pe,t));else if(!Te[t]||Ae[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(We[t]);else if(A(ye,T(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!ze[e])if(Ce&&!A(ge,T(n,me,"")));else if(n)return!1;return!0},wt=function(e){return"annotation-xml"!==e&&E(e,ve)},_t=function(e){Et(ue.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te,forceKeepAttr:void 0};let i=t.length;for(;i--;){const s=t[i],{name:a,namespaceURI:o,value:l}=s,u=ot(a),c=l;let h="value"===a?c:w(c);if(r.attrName=u,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,Et(ue.uponSanitizeAttribute,e,r),h=r.attrValue,!Ue||"id"!==u&&"name"!==u||(gt(a,e),h="user-content-"+h),xe&&A(/((--!?|])>)|<\/(style|title)/i,h)){gt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(a,e);continue}if(!Re&&A(/\/>/i,h)){gt(a,e);continue}Ie&&f([ce,he,de],(e=>{h=T(h,e," ")}));const d=ot(e.nodeName);if(St(d,u,h)){if(ne&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(o);else switch(z.getAttributeType(d,u)){case"TrustedHTML":h=ne.createHTML(h);break;case"TrustedScriptURL":h=ne.createScriptURL(h)}if(h!==c)try{o?e.setAttributeNS(o,a,h):e.setAttribute(a,h),yt(e)?pt(e):g(n.removed)}catch(t){gt(a,e)}}else gt(a,e)}Et(ue.afterSanitizeAttributes,e,null)},At=function e(t){let n=null;const r=vt(t);for(Et(ue.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Et(ue.uponSanitizeShadowNode,n,null),Tt(n),_t(n),n.content instanceof o&&e(n.content);Et(ue.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!n.isSupported)return e;if(De||ht(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=ot(e.nodeName);if(!be[t]||_e[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof h)r=mt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Me&&!Ie&&!Pe&&-1===e.indexOf("<"))return ne&&Fe?ne.createHTML(e):e;if(r=mt(e),!r)return Me?null:Fe?re:""}r&&Oe&&pt(r.firstChild);const u=vt(He?e:r);for(;a=u.nextNode();)Tt(a),_t(a),a.content instanceof o&&At(a.content);if(He)return e;if(Me){if(Ne)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(Te.shadowroot||Te.shadowrootmode)&&(l=le.call(s,l,!0)),l}let c=Pe?r.outerHTML:r.innerHTML;return Pe&&be["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&A(Z,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),Ie&&f([ce,he,de],(e=>{c=T(c,e," ")})),ne&&Fe?ne.createHTML(c):c},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},n.clearConfig=function(){lt=null,De=!1},n.isValidAttribute=function(e,t,n){lt||ht({});const r=ot(e),i=ot(t);return St(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&m(ue[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=p(ue[e],t);return-1===n?void 0:v(ue[e],n,1)[0]}return g(ue[e])},n.removeHooks=function(e){ue[e]=[]},n.removeAllHooks=function(){ue={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()},7536:function(e){var t=1e3,n=60*t,r=60*n,i=24*r;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,a){a=a||{};var o,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===l&&!1===isNaN(e))return a.long?s(o=e,i,"day")||s(o,r,"hour")||s(o,n,"minute")||s(o,t,"second")||o+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7545:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:function(){return r}})},7558:function(e,t,n){"use strict";n.d(t,{$W:function(){return r.$W},CS:function(){return b},le:function(){return r.le},pn:function(){return r.pn},zh:function(){return r.zh}});var r=n(7736),i=n(3144),s=n(5466),a=n(4120),o=/^--/;function l(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||o.test(e)||c.hasOwnProperty(e)&&c[e]?(""+t).trim():t+"px"}var u={},c={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},h=["Webkit","Ms","Moz","O"];c=Object.keys(c).reduce(((e,t)=>(h.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),c);var d=/^(matrix|translate|scale|rotate|skew)/,f=/^(translate)/,p=/^(rotate|skew)/,g=(e,t)=>s.is.num(e)&&0!==e?e+t:e,m=(e,t)=>s.is.arr(e)?e.every((e=>m(e,t))):s.is.num(e)?e===t:parseFloat(e)===t,v=class extends a.$s{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push((e=>[`translate3d(${e.map((e=>g(e,"px"))).join(",")})`,m(e,0)]))),(0,s.FI)(r,((e,t)=>{if("transform"===t)i.push([e||""]),a.push((e=>[e,""===e]));else if(d.test(t)){if(delete r[t],s.is.und(e))return;const n=f.test(t)?"px":p.test(t)?"deg":"";i.push((0,s.$r)(e)),a.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${g(i,n)})`,m(i,0)]:e=>[`${t}(${e.map((e=>g(e,n))).join(",")})`,m(e,t.startsWith("scale")?1:0)])}})),i.length&&(r.transform=new y(i,a)),super(r)}},y=class extends s.aq{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return(0,s.__)(this.inputs,((n,r)=>{const i=(0,s.oq)(n[0]),[a,o]=this.transforms[r](s.is.arr(i)?i:n.map(s.oq));e+=" "+a,t=t&&o})),t?"none":e}observerAdded(e){1==e&&(0,s.__)(this.inputs,(e=>(0,s.__)(e,(e=>(0,s.at)(e)&&(0,s.Ec)(e,this)))))}observerRemoved(e){0==e&&(0,s.__)(this.inputs,(e=>(0,s.__)(e,(e=>(0,s.at)(e)&&(0,s.DV)(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),(0,s.MI)(this,e)}};r.RV.assign({batchedUpdates:i.unstable_batchedUpdates,createStringInterpolator:s.Rs,colors:s.Tj});var b=(0,a.De)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{className:r,style:i,children:s,scrollTop:a,scrollLeft:c,viewBox:h,...d}=t,f=Object.values(d),p=Object.keys(d).map((t=>n||e.hasAttribute(t)?t:u[t]||(u[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==s&&(e.textContent=s);for(const t in i)if(i.hasOwnProperty(t)){const n=l(t,i[t]);o.test(t)?e.style.setProperty(t,n):e.style[t]=n}p.forEach(((t,n)=>{e.setAttribute(t,f[n])})),void 0!==r&&(e.className=r),void 0!==a&&(e.scrollTop=a),void 0!==c&&(e.scrollLeft=c),void 0!==h&&e.setAttribute("viewBox",h)},createAnimatedStyle:e=>new v(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated},7736:function(e,t,n){"use strict";n.d(t,{$W:function(){return E},RV:function(){return r.RV},le:function(){return r.le},pn:function(){return ge},zh:function(){return pe}});var r=n(5466),i=n(4041),s=n(4120);function a(e,...t){return r.is.fun(e)?e(...t):e}var o=(e,t)=>!0===e||!!(t&&e&&(r.is.fun(e)?e(t):(0,r.$r)(e).includes(t))),l=(e,t)=>r.is.obj(e)?t&&e[t]:e,u=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,c=e=>e,h=(e,t=c)=>{let n=d;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const i={};for(const s of n){const n=t(e[s],s);r.is.und(n)||(i[s]=n)}return i},d=["config","onProps","onStart","onChange","onPause","onResume","onRest"],f={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function p(e){const t=function(e){const t={};let n=0;if((0,r.FI)(e,((e,r)=>{f[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return(0,r.FI)(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function g(e){return e=(0,r.oq)(e),r.is.arr(e)?e.map(g):(0,r.$7)(e)?r.RV.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function m(e){for(const t in e)return!0;return!1}function v(e){return r.is.fun(e)||r.is.arr(e)&&r.is.obj(e[0])}function y(e,t){e.ref?.delete(e),t?.delete(e)}function b(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var E={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},T={...E.default,mass:1,damping:1,easing:r.le.linear,clamp:!1},S=class{constructor(){this.velocity=0,Object.assign(this,T)}};function w(e,t){if(r.is.und(t.decay)){const n=!r.is.und(t.tension)||!r.is.und(t.friction);!n&&r.is.und(t.frequency)&&r.is.und(t.damping)&&r.is.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var _=[],A=class{constructor(){this.changed=!1,this.values=_,this.toValues=null,this.fromValues=_,this.config=new S,this.immediate=!1}};function k(e,{key:t,props:n,defaultProps:i,state:s,actions:l}){return new Promise(((u,c)=>{let h,d,f=o(n.cancel??i?.cancel,t);if(f)m();else{r.is.und(n.pause)||(s.paused=o(n.pause,t));let e=i?.pause;!0!==e&&(e=s.paused||o(e,t)),h=a(n.delay||0,t),e?(s.resumeQueue.add(g),l.pause()):(l.resume(),g())}function p(){s.resumeQueue.add(g),s.timeouts.delete(d),d.cancel(),h=d.time-r.er.now()}function g(){h>0&&!r.RV.skipAnimation?(s.delayed=!0,d=r.er.setTimeout(m,h),s.pauseQueue.add(p),s.timeouts.add(d)):m()}function m(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(p),s.timeouts.delete(d),e<=(s.cancelId||0)&&(f=!0);try{l.start({...n,callId:e,cancel:f},u)}catch(e){c(e)}}}))}var L=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?I(e.get()):t.every((e=>e.noop))?C(e.get()):R(e.get(),t.every((e=>e.finished))),C=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),R=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),I=e=>({value:e,cancelled:!0,finished:!1});function x(e,t,n,i){const{callId:s,parentId:a,onRest:o}=t,{asyncTo:l,promise:u}=n;return a||e!==l||t.reset?n.promise=(async()=>{n.asyncId=s,n.asyncTo=e;const c=h(t,((e,t)=>"onRest"===t?void 0:e));let d,f;const p=new Promise(((e,t)=>(d=e,f=t))),g=e=>{const t=s<=(n.cancelId||0)&&I(i)||s!==n.asyncId&&R(i,!1);if(t)throw e.result=t,f(e),e},m=(e,t)=>{const a=new D,o=new O;return(async()=>{if(r.RV.skipAnimation)throw P(n),o.result=R(i,!1),f(o),o;g(a);const l=r.is.obj(e)?{...e}:{...t,to:e};l.parentId=s,(0,r.FI)(c,((e,t)=>{r.is.und(l[t])&&(l[t]=e)}));const u=await i.start(l);return g(a),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),u})()};let v;if(r.RV.skipAnimation)return P(n),R(i,!1);try{let t;t=r.is.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,i.stop.bind(i))),await Promise.all([t.then(d),p]),v=R(i.get(),!0,!1)}catch(e){if(e instanceof D)v=e.result;else{if(!(e instanceof O))throw e;v=e.result}}finally{s==n.asyncId&&(n.asyncId=a,n.asyncTo=a?l:void 0,n.promise=a?u:void 0)}return r.is.fun(o)&&r.er.batchedUpdates((()=>{o(v,i,i.item)})),v})():u}function P(e,t){(0,r.bX)(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var D=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},O=class extends Error{constructor(){super("SkipAnimationSignal")}},M=e=>e instanceof F,N=1,F=class extends r.aq{constructor(){super(...arguments),this.id=N++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=(0,s.Ao)(this);return e&&e.getValue()}to(...e){return r.RV.to(this,e)}interpolate(...e){return(0,r.ZJ)(),r.RV.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){(0,r.MI)(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||r.WU.sort(this),(0,r.MI)(this,{type:"priority",parent:this,priority:e})}},B=Symbol.for("SpringPhase"),U=e=>(1&e[B])>0,$=e=>(2&e[B])>0,H=e=>(4&e[B])>0,G=(e,t)=>t?e[B]|=3:e[B]&=-3,j=(e,t)=>t?e[B]|=4:e[B]&=-5,V=class extends F{constructor(e,t){if(super(),this.animation=new A,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!r.is.und(e)||!r.is.und(t)){const n=r.is.obj(e)?{...e}:{...t,from:e};r.is.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!($(this)||this._state.asyncTo)||H(this)}get goal(){return(0,r.oq)(this.animation.to)}get velocity(){const e=(0,s.Ao)(this);return e instanceof s.rf?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return U(this)}get isAnimating(){return $(this)}get isPaused(){return H(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const i=this.animation;let{toValues:a}=i;const{config:o}=i,l=(0,s.nm)(i.to);!l&&(0,r.at)(i.to)&&(a=(0,r.$r)((0,r.oq)(i.to))),i.values.forEach(((u,c)=>{if(u.done)return;const h=u.constructor==s.pS?1:l?l[c].lastPosition:a[c];let d=i.immediate,f=h;if(!d){if(f=u.lastPosition,o.tension<=0)return void(u.done=!0);let t=u.elapsedTime+=e;const n=i.fromValues[c],s=null!=u.v0?u.v0:u.v0=r.is.arr(o.velocity)?o.velocity[c]:o.velocity;let a;const l=o.precision||(n==h?.005:Math.min(1,.001*Math.abs(h-n)));if(r.is.und(o.duration))if(o.decay){const e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*t);f=n+s/(1-e)*(1-r),d=Math.abs(u.lastPosition-f)<=l,a=s*r}else{a=null==u.lastVelocity?s:u.lastVelocity;const t=o.restVelocity||l/10,i=o.clamp?0:o.bounce,c=!r.is.und(i),p=n==h?u.v0>0:n<h;let g,m=!1;const v=1,y=Math.ceil(e/v);for(let e=0;e<y&&(g=Math.abs(a)>t,g||(d=Math.abs(h-f)<=l,!d));++e)c&&(m=f==h||f>h==p,m&&(a=-a*i,f=h)),a+=(1e-6*-o.tension*(f-h)+.001*-o.friction*a)/o.mass*v,f+=a*v}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,u.durationProgress>0&&(u.elapsedTime=o.duration*u.durationProgress,t=u.elapsedTime+=e)),r=(o.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,u.durationProgress=r),f=n+o.easing(r)*(h-n),a=(f-u.lastPosition)/e,d=1==r}u.lastVelocity=a,Number.isNaN(f)&&(console.warn("Got NaN while animating:",this),d=!0)}l&&!l[c].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(f,o.round)&&(n=!0)}));const u=(0,s.Ao)(this),c=u.getValue();if(t){const e=(0,r.oq)(i.to);c===e&&!n||o.decay?n&&o.decay&&this._onChange(c):(u.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(c)}set(e){return r.er.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if($(this)){const{to:e,config:t}=this.animation;r.er.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return r.is.und(e)?(n=this.queue||[],this.queue=[]):n=[r.is.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>L(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),P(this._state,e&&this._lastCallId),r.er.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:i}=e;n=r.is.obj(n)?n[t]:n,(null==n||v(n))&&(n=void 0),i=r.is.obj(i)?i[t]:i,null==i&&(i=void 0);const a={to:n,from:i};return U(this)||(e.reverse&&([n,i]=[i,n]),i=(0,r.oq)(i),r.is.und(i)?(0,s.Ao)(this)||this._set(n):this._set(i)),a}_update({...e},t){const{key:n,defaultProps:i}=this;e.default&&Object.assign(i,h(e,((e,t)=>/^on/.test(t)?l(e,n):e))),Q(this,e,"onProps"),Z(this,"onProps",e,this);const s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return k(++this._lastCallId,{key:n,props:e,defaultProps:i,state:a,actions:{pause:()=>{H(this)||(j(this,!0),(0,r.Wd)(a.pauseQueue),Z(this,"onPause",R(this,z(this,this.animation.to)),this))},resume:()=>{H(this)&&(j(this,!1),$(this)&&this._resume(),(0,r.Wd)(a.resumeQueue),Z(this,"onResume",R(this,z(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=K(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(I(this));const i=!r.is.und(e.to),l=!r.is.und(e.from);if(i||l){if(!(t.callId>this._lastToId))return n(I(this));this._lastToId=t.callId}const{key:u,defaultProps:c,animation:h}=this,{to:d,from:f}=h;let{to:p=d,from:m=f}=e;!l||i||t.default&&!r.is.und(p)||(p=m),t.reverse&&([p,m]=[m,p]);const y=!(0,r.n4)(m,f);y&&(h.from=m),m=(0,r.oq)(m);const b=!(0,r.n4)(p,d);b&&this._focus(p);const E=v(t.to),{config:S}=h,{decay:_,velocity:A}=S;(i||l)&&(S.velocity=0),t.config&&!E&&function(e,t,n){n&&(w(n={...n},t),t={...n,...t}),w(e,t),Object.assign(e,t);for(const t in T)null==e[t]&&(e[t]=T[t]);let{frequency:i,damping:s}=e;const{mass:a}=e;r.is.und(i)||(i<.01&&(i=.01),s<0&&(s=0),e.tension=Math.pow(2*Math.PI/i,2)*a,e.friction=4*Math.PI*s*a/i)}(S,a(t.config,u),t.config!==c.config?a(c.config,u):void 0);let k=(0,s.Ao)(this);if(!k||r.is.und(p))return n(R(this,!0));const L=r.is.und(t.reset)?l&&!t.default:!r.is.und(m)&&o(t.reset,u),P=L?m:this.get(),D=g(p),O=r.is.num(D)||r.is.arr(D)||(0,r.$7)(D),M=!E&&(!O||o(c.immediate||t.immediate,u));if(b){const e=(0,s.SJ)(p);if(e!==k.constructor){if(!M)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(D)}}const N=k.constructor;let F=(0,r.at)(p),B=!1;if(!F){const e=L||!U(this)&&y;(b||e)&&(B=(0,r.n4)(g(P),D),F=!B),((0,r.n4)(h.immediate,M)||M)&&(0,r.n4)(S.decay,_)&&(0,r.n4)(S.velocity,A)||(F=!0)}if(B&&$(this)&&(h.changed&&!L?F=!0:F||this._stop(d)),!E&&((F||(0,r.at)(d))&&(h.values=k.getPayload(),h.toValues=(0,r.at)(p)?null:N==s.pS?[1]:(0,r.$r)(D)),h.immediate!=M&&(h.immediate=M,M||L||this._set(d)),F)){const{onRest:e}=h;(0,r.__)(X,(e=>Q(this,t,e)));const i=R(this,z(this,d));(0,r.Wd)(this._pendingCalls,i),this._pendingCalls.add(n),h.changed&&r.er.batchedUpdates((()=>{h.changed=!L,e?.(i,this),L?a(c.onRest,i):h.onStart?.(i,this)}))}L&&this._set(P),E?n(x(t.to,t,this._state,this)):F?this._start():$(this)&&!b?this._pendingCalls.add(n):n(C(P))}_focus(e){const t=this.animation;e!==t.to&&((0,r.Wg)(this)&&this._detach(),t.to=e,(0,r.Wg)(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;(0,r.at)(t)&&((0,r.Ec)(t,this),M(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;(0,r.at)(e)&&(0,r.DV)(e,this)}_set(e,t=!0){const n=(0,r.oq)(e);if(!r.is.und(n)){const e=(0,s.Ao)(this);if(!e||!(0,r.n4)(n,e.getValue())){const i=(0,s.SJ)(n);e&&e.constructor==i?e.setValue(n):(0,s.uX)(this,i.create(n)),e&&r.er.batchedUpdates((()=>{this._onChange(n,t)}))}}return(0,s.Ao)(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Z(this,"onStart",R(this,z(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),a(this.animation.onChange,e,this)),a(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;(0,s.Ao)(this).reset((0,r.oq)(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),$(this)||(G(this,!0),H(this)||this._resume())}_resume(){r.RV.skipAnimation?this.finish():r.WU.start(this)}_stop(e,t){if($(this)){G(this,!1);const n=this.animation;(0,r.__)(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),(0,r.MI)(this,{type:"idle",parent:this});const i=t?I(this.get()):R(this.get(),z(this,e??n.to));(0,r.Wd)(this._pendingCalls,i),n.changed&&(n.changed=!1,Z(this,"onRest",i,this))}}};function z(e,t){const n=g(t),i=g(e.get());return(0,r.n4)(i,n)}function K(e,t=e.loop,n=e.to){const r=a(t);if(r){const i=!0!==r&&p(r),s=(i||e).reverse,a=!i||i.reset;return W({...e,loop:t,default:!1,pause:void 0,to:!s||v(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function W(e){const{to:t,from:n}=e=p(e),i=new Set;return r.is.obj(t)&&q(t,i),r.is.obj(n)&&q(n,i),e.keys=i.size?Array.from(i):null,e}function Y(e){const t=W(e);return r.is.und(t.default)&&(t.default=h(t)),t}function q(e,t){(0,r.FI)(e,((e,n)=>null!=e&&t.add(n)))}var X=["onStart","onRest","onChange","onPause","onResume"];function Q(e,t,n){e.animation[n]=t[n]!==u(t,n)?l(t[n],e.key):void 0}function Z(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var J=["onStart","onChange","onRest"],ee=1,te=class{constructor(e,t){this.id=ee++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];r.is.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(W(e)),this}start(e){let{queue:t}=this;return e?t=(0,r.$r)(e).map(W):this.queue=[],this._flush?this._flush(this,t):(le(this,t),ne(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;(0,r.__)((0,r.$r)(t),(t=>n[t].stop(!!e)))}else P(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(r.is.und(e))this.start({pause:!0});else{const t=this.springs;(0,r.__)((0,r.$r)(e),(e=>t[e].pause()))}return this}resume(e){if(r.is.und(e))this.start({pause:!1});else{const t=this.springs;(0,r.__)((0,r.$r)(e),(e=>t[e].resume()))}return this}each(e){(0,r.FI)(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,(0,r.bX)(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const a=!i&&this._started,o=s||a&&n.size?this.get():null;s&&t.size&&(0,r.bX)(t,(([e,t])=>{t.value=o,e(t,this,this._item)})),a&&(this._started=!1,(0,r.bX)(n,(([e,t])=>{t.value=o,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}r.er.onFrame(this._onFrame)}};function ne(e,t){return Promise.all(t.map((t=>re(e,t)))).then((t=>L(e,t)))}async function re(e,t,n){const{keys:i,to:s,from:a,loop:o,onRest:l,onResolve:c}=t,h=r.is.obj(t.default)&&t.default;o&&(t.loop=!1),!1===s&&(t.to=null),!1===a&&(t.from=null);const d=r.is.arr(s)||r.is.fun(s)?s:void 0;d?(t.to=void 0,t.onRest=void 0,h&&(h.onRest=void 0)):(0,r.__)(J,(n=>{const i=t[n];if(r.is.fun(i)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(i);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(i,{value:null,finished:e||!1,cancelled:t||!1})},h&&(h[n]=t[n])}}));const f=e._state;t.pause===!f.paused?(f.paused=t.pause,(0,r.Wd)(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const p=(i||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),g=!0===t.cancel||!0===u(t,"cancel");(d||g&&f.asyncId)&&p.push(k(++e._lastAsyncId,{props:t,state:f,actions:{pause:r.lQ,resume:r.lQ,start(t,n){g?(P(f,e._lastAsyncId),n(I(e))):(t.onRest=l,n(x(d,t,f,e)))}}})),f.paused&&await new Promise((e=>{f.resumeQueue.add(e)}));const m=L(e,await Promise.all(p));if(o&&m.finished&&(!n||!m.noop)){const n=K(t,o,s);if(n)return le(e,[n]),re(e,n,!0)}return c&&r.er.batchedUpdates((()=>c(m,e,e.item))),m}function ie(e,t){const n={...e.springs};return t&&(0,r.__)((0,r.$r)(t),(e=>{r.is.und(e.keys)&&(e=W(e)),r.is.obj(e.to)||(e={...e,to:void 0}),oe(n,e,(e=>ae(e)))})),se(e,n),n}function se(e,t){(0,r.FI)(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,(0,r.Ec)(t,e))}))}function ae(e,t){const n=new V;return n.key=e,t&&(0,r.Ec)(n,t),n}function oe(e,t,n){t.keys&&(0,r.__)(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function le(e,t){(0,r.__)(t,(t=>{oe(e.springs,t,(t=>ae(t,e)))}))}var ue,ce,he=({children:e,...t})=>{const n=(0,i.useContext)(de),s=t.pause||!!n.pause,a=t.immediate||!!n.immediate;t=(0,r.MA)((()=>({pause:s,immediate:a})),[s,a]);const{Provider:o}=de;return i.createElement(o,{value:t},e)},de=(ue=he,ce={},Object.assign(ue,i.createContext(ce)),ue.Provider._context=ue,ue.Consumer._context=ue,ue);he.Provider=de.Provider,he.Consumer=de.Consumer;var fe=()=>{const e=[],t=function(t){(0,r.HX)();const i=[];return(0,r.__)(e,((e,s)=>{if(r.is.und(t))i.push(e.start());else{const r=n(t,e,s);r&&i.push(e.start(r))}})),i};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return(0,r.__)(e,(e=>e.pause(...arguments))),this},t.resume=function(){return(0,r.__)(e,(e=>e.resume(...arguments))),this},t.set=function(t){(0,r.__)(e,((e,n)=>{const i=r.is.fun(t)?t(n,e):t;i&&e.set(i)}))},t.start=function(t){const n=[];return(0,r.__)(e,((e,i)=>{if(r.is.und(t))n.push(e.start());else{const r=this._getProps(t,e,i);r&&n.push(e.start(r))}})),n},t.stop=function(){return(0,r.__)(e,(e=>e.stop(...arguments))),this},t.update=function(t){return(0,r.__)(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return r.is.fun(e)?e(n,t):e};return t._getProps=n,t};function pe(e,t){const n=r.is.fun(e),[[s],a]=function(e,t,n){const s=r.is.fun(t)&&t;s&&!n&&(n=[]);const a=(0,i.useMemo)((()=>s||3==arguments.length?fe():void 0),[]),o=(0,i.useRef)(0),l=(0,r.CH)(),u=(0,i.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=ie(e,t);return o.current>0&&!u.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ne(e,t):new Promise((r=>{se(e,n),u.queue.push((()=>{r(ne(e,t))})),l()}))}})),[]),c=(0,i.useRef)([...u.ctrls]),h=[],d=(0,r.NQ)(e)||0;function f(e,n){for(let r=e;r<n;r++){const e=c.current[r]||(c.current[r]=new te(null,u.flush)),n=s?s(r,e):t[r];n&&(h[r]=Y(n))}}(0,i.useMemo)((()=>{(0,r.__)(c.current.slice(e,d),(e=>{y(e,a),e.stop(!0)})),c.current.length=e,f(d,e)}),[e]),(0,i.useMemo)((()=>{f(0,Math.min(d,e))}),n);const p=c.current.map(((e,t)=>ie(e,h[t]))),g=(0,i.useContext)(he),v=(0,r.NQ)(g),E=g!==v&&m(g);(0,r.Es)((()=>{o.current++,u.ctrls=c.current;const{queue:e}=u;e.length&&(u.queue=[],(0,r.__)(e,(e=>e()))),(0,r.__)(c.current,((e,t)=>{a?.add(e),E&&e.start({default:g});const n=h[t];n&&(b(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),(0,r.H5)((()=>()=>{(0,r.__)(u.ctrls,(e=>e.stop(!0)))}));const T=p.map((e=>({...e})));return a?[T,a]:T}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[s,a]:s}function ge(e,t,n){const s=r.is.fun(t)&&t,{reset:o,sort:l,trail:u=0,expires:c=!0,exitBeforeEnter:d=!1,onDestroyed:f,ref:g,config:v}=s?s():t,E=(0,i.useMemo)((()=>s||3==arguments.length?fe():void 0),[]),T=(0,r.$r)(e),S=[],w=(0,i.useRef)(null),_=o?null:w.current;(0,r.Es)((()=>{w.current=S})),(0,r.H5)((()=>((0,r.__)(S,(e=>{E?.add(e.ctrl),e.ctrl.ref=E})),()=>{(0,r.__)(w.current,(e=>{e.expired&&clearTimeout(e.expirationId),y(e.ctrl,E),e.ctrl.stop(!0)}))})));const A=function(e,{key:t,keys:n=t},i){if(null===n){const t=new Set;return e.map((e=>{const n=i&&i.find((n=>n.item===e&&"leave"!==n.phase&&!t.has(n)));return n?(t.add(n),n.key):me++}))}return r.is.und(n)?e:r.is.fun(n)?e.map(n):(0,r.$r)(n)}(T,s?s():t,_),k=o&&w.current||[];(0,r.Es)((()=>(0,r.__)(k,(({ctrl:e,item:t,key:n})=>{y(e,E),a(f,t,n)}))));const L=[];if(_&&(0,r.__)(_,((e,t)=>{e.expired?(clearTimeout(e.expirationId),k.push(e)):~(t=L[t]=A.indexOf(e.key))&&(S[t]=e)})),(0,r.__)(T,((e,t)=>{S[t]||(S[t]={key:A[t],item:e,phase:"mount",ctrl:new te},S[t].ctrl.item=e)})),L.length){let e=-1;const{leave:n}=s?s():t;(0,r.__)(L,((t,r)=>{const i=_[r];~t?(e=S.indexOf(i),S[e]={...i,item:T[t]}):n&&S.splice(++e,0,i)}))}r.is.fun(l)&&S.sort(((e,t)=>l(e.item,t.item)));let C=-u;const R=(0,r.CH)(),I=h(t),x=new Map,P=(0,i.useRef)(new Map),D=(0,i.useRef)(!1);(0,r.__)(S,((e,n)=>{const i=e.key,o=e.phase,l=s?s():t;let h,f;const m=a(l.delay||0,i);if("mount"==o)h=l.enter,f="enter";else{const e=A.indexOf(i)<0;if("leave"!=o)if(e)h=l.leave,f="leave";else{if(!(h=l.update))return;f="update"}else{if(e)return;h=l.enter,f="enter"}}if(h=a(h,e.item,n),h=r.is.obj(h)?p(h):{to:h},!h.config){const t=v||I.config;h.config=a(t,e.item,n,f)}C+=u;const y={...I,delay:m+C,ref:g,immediate:l.immediate,reset:!1,...h};if("enter"==f&&r.is.und(y.from)){const i=s?s():t,o=r.is.und(i.initial)||_?i.from:i.initial;y.from=a(o,e.item,n)}const{onResolve:b}=y;y.onResolve=e=>{a(b,e);const t=w.current,n=t.find((e=>e.key===i));if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){const e=t.every((e=>e.ctrl.idle));if("leave"==n.phase){const t=a(c,n.item);if(!1!==t){const r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(R,r)))}}e&&t.some((e=>e.expired))&&(P.current.delete(n),d&&(D.current=!0),R())}};const E=ie(e.ctrl,y);"leave"===f&&d?P.current.set(e,{phase:f,springs:E,payload:y}):x.set(e,{phase:f,springs:E,payload:y})}));const O=(0,i.useContext)(he),M=(0,r.NQ)(O),N=O!==M&&m(O);(0,r.Es)((()=>{N&&(0,r.__)(S,(e=>{e.ctrl.start({default:O})}))}),[O]),(0,r.__)(x,((e,t)=>{if(P.current.size){const e=S.findIndex((e=>e.key===t.key));S.splice(e,1)}})),(0,r.Es)((()=>{(0,r.__)(P.current.size?P.current:x,(({phase:e,payload:t},n)=>{const{ctrl:r}=n;n.phase=e,E?.add(r),N&&"enter"==e&&r.start({default:O}),t&&(b(r,t.ref),!r.ref&&!E||D.current?(r.start(t),D.current&&(D.current=!1)):r.update(t))}))}),o?void 0:n);const F=e=>i.createElement(i.Fragment,null,S.map(((t,n)=>{const{springs:s}=x.get(t)||t.ctrl,a=e({...s},t.item,t,n);return a&&a.type?i.createElement(a.type,{...a.props,key:r.is.str(t.key)||r.is.num(t.key)?t.key:t.ctrl.id,ref:a.ref}):a})));return E?[F,E]:F}var me=1,ve=class extends F{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=(0,r.kx)(...t);const n=this._get(),i=(0,s.SJ)(n);(0,s.uX)(this,i.create(n))}advance(e){const t=this._get(),n=this.get();(0,r.n4)(t,n)||((0,s.Ao)(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&be(this._active)&&Ee(this)}_get(){const e=r.is.arr(this.source)?this.source.map(r.oq):(0,r.$r)((0,r.oq)(this.source));return this.calc(...e)}_start(){this.idle&&!be(this._active)&&(this.idle=!1,(0,r.__)((0,s.nm)(this),(e=>{e.done=!1})),r.RV.skipAnimation?(r.er.batchedUpdates((()=>this.advance())),Ee(this)):r.WU.start(this))}_attach(){let e=1;(0,r.__)((0,r.$r)(this.source),(t=>{(0,r.at)(t)&&(0,r.Ec)(t,this),M(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){(0,r.__)((0,r.$r)(this.source),(e=>{(0,r.at)(e)&&(0,r.DV)(e,this)})),this._active.clear(),Ee(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=(0,r.$r)(this.source).reduce(((e,t)=>Math.max(e,(M(t)?t.priority:0)+1)),0))}};function ye(e){return!1!==e.idle}function be(e){return!e.size||Array.from(e).every(ye)}function Ee(e){e.idle||(e.idle=!0,(0,r.__)((0,s.nm)(e),(e=>{e.done=!0})),(0,r.MI)(e,{type:"idle",parent:e}))}r.RV.assign({createStringInterpolator:r.Rs,to:(e,t)=>new ve(e,t)}),r.WU.advance},7835:function(e,t,n){var r=n(3334),i=n(5630);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},7863:function(e,t,n){"use strict";n.d(t,{yI:function(){return p},fE:function(){return v},fu:function(){return g}});var r,i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},s=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}for(var o=[],l=0;l<256;++l)o.push((l+256).toString(16).slice(1));var u=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=r[s];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(r)},c=n(4041),h=n(1085),d=n(9067),f=n.n(d);class p{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options={dataLayer:"undefined"!=typeof window&&window.dataLayer||null,disabled:!1,paused:!1,variables:null,withoutIdleCallback:!1,...e};const{disabled:t=!1,paused:n=!1,variables:r=null}=this.options;this.disabled=t,this.paused=n,this.variables=null,this.pending=[],null!==r&&this.setVariables(r)}setVariables(e){this.variables=e,null!==e&&this.pushNow(e)}getVariables(){return this.variables}setDisabled(e){this.disabled=e,e&&(this.pending=[])}setPaused(e){this.paused=e,!e&&this.pending.length>0&&(this.pushNow(...this.pending),this.pending=[])}pushNow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const{dataLayer:r=null,withoutIdleCallback:i=!1}=this.options;null===r||this.disabled||(!i&&"requestIdleCallback"in window?window.requestIdleCallback((()=>{r.push(...t)})):i?r.push(...t):setTimeout((()=>{r.push(...t)}),0))}push(){!this.paused||this.disabled?this.pushNow(...arguments):this.pending.push(...arguments)}pushEvent(e,t){this.push({event:e,eventId:u(),...t})}pushEventNow(e,t){this.pushNow({event:e,eventId:u(),...t})}trackEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.pushEvent("eventInteraction",{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r})}trackEventNow(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.pushEventNow("eventInteraction",{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r})}trackSocial(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pushEvent("socialInteraction",{socialNetwork:e,socialAction:t,socialTarget:n||this.getSocialTarget()})}trackVideo(e){let{platform:t=null,id:n=null,url:r,title:i=null,duration:s=null,currentTime:a=null,thumbnail:o=null,...l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.pushEvent("eventInteraction",{eventCategory:"Video",eventAction:e,eventLabel:`${null!==t?`${t}: `:""}${i||document.title}${null!==n?` (${n})`:""}`,videoPlatform:t,videoId:n,videoUrl:r,videoTitle:i,videoDuration:s,videoCurrentTime:null!==a?Math.round(a):null,videoProgress:null!==a&&null!==s&&s>0?Math.round(a/s*100):null,videoThumbnail:o,...l})}getSocialTarget(){return"undefined"!=typeof window?`${window.location.protocol}//${window.location.host}`:null}}const g=c.createContext(),m={tracking:f().instanceOf(p),disabled:f().bool,paused:f().bool,children:f().node};function v(e){let{children:t,tracking:n,disabled:r,paused:i}=e;const s=(0,c.useMemo)((()=>n||new p({disabled:r,paused:i})),[n]);return(0,c.useEffect)((()=>{null===n&&(s.setDisabled(r),s.setPaused(i))}),[n,r,i]),(0,h.jsx)(g.Provider,{value:s,children:t})}v.propTypes=m,v.defaultProps={tracking:null,disabled:!1,paused:!1,children:null}},7882:function(e,t,n){"use strict";var r=n(2265);t.mw={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},t.GR=t.mw,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},7891:function(e,t,n){e.exports=function(e){function t(e){let n,i,s,a=null;function o(...e){if(!o.enabled)return;const r=o,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const s=t.formatters[i];if("function"==typeof s){const t=e[a];n=s.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e,t){let n=0,r=0,i=-1,s=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,s=n,r++):(n++,r++);else{if(-1===i)return!1;r=i+1,s++,n=s}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(7250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},7923:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},7950:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="map-location-dot",r=["map-marked-alt"],i="f5a0",s="M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z";t.definition={prefix:"fas",iconName:n,icon:[576,512,r,i,s]},t.faMapLocationDot=t.definition,t.prefix="fas",t.iconName=n,t.width=576,t.height=512,t.ligatures=r,t.unicode=i,t.svgPathData=s,t.aliases=r},7967:function(e,t,n){"use strict";e.exports=n(2568)},7985:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(6284);function i(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},8054:function(e,t){"use strict";t.mw={prefix:"fas",iconName:"angle-left",icon:[320,512,[8249],"f104","M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},t.Ue=t.mw},8138:function(e,t,n){var r=n(7379),i=n(3142),s=n(547);e.exports=function(e){return"string"==typeof e||!i(e)&&s(e)&&"[object String]"==r(e)}},8139:function(e,t,n){"use strict";e.exports=n(3296)},8360:function(e,t,n){var r=n(7379),i=n(4784),s=n(547),a=Function.prototype,o=Object.prototype,l=a.toString,u=o.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!s(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},8470:function(e,t,n){"use strict";n.d(t,{Ay:function(){return uo}});const r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=s},s=Number.MAX_SAFE_INTEGER||9007199254740991;let a=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),o=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",e.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",e.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.ASSET_LIST_LOAD_ERROR="assetListLoadError",e.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",e.ASSET_LIST_PARSING_ERROR="assetListParsingError",e.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.ATTACH_MEDIA_ERROR="attachMediaError",e.UNKNOWN="unknown",e}({}),l=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.MEDIA_ENDED="hlsMediaEnded",e.STALL_RESOLVED="hlsStallResolved",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFERED_TO_END="hlsBufferedToEnd",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e.ASSET_LIST_LOADING="hlsAssetListLoading",e.ASSET_LIST_LOADED="hlsAssetListLoaded",e.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",e.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",e.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",e.INTERSTITIAL_STARTED="hlsInterstitialStarted",e.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",e.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",e.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",e.INTERSTITIAL_ENDED="hlsInterstitialEnded",e.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",e.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",e.EVENT_CUE_ENTER="hlsEventCueEnter",e}({});var u="manifest",c="level",h="audioTrack",d="subtitleTrack",f="main",p="audio",g="subtitle";class m{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class v{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new m(e),this.fast_=new m(t),this.defaultTTFB_=r,this.ttfb_=new m(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new m(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new m(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new m(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){const n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(null,arguments)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class S{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=w,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const w=function(){},_={trace:w,debug:w,log:w,warn:w,info:w,error:w};function A(){return b({},_)}function k(e,t,n){return t[e]?t[e].bind(t):function(e,t){const n=self.console[e];return n?n.bind(self.console,`${t?"["+t+"] ":""}[${e}] >`):w}(e,n)}const L=A(),C=L;function R(e=!0){if("undefined"!=typeof self)return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function I(e,t){const n=Object.keys(e),r=Object.keys(t),i=n.length,s=r.length;return!i||!s||i===s&&!n.some((e=>-1===r.indexOf(e)))}function x(e,t=!1){if("undefined"!=typeof TextDecoder){const n=new TextDecoder("utf-8").decode(e);if(t){const e=n.indexOf("\0");return-1!==e?n.substring(0,e):n}return n.replace(/\0/g,"")}const n=e.length;let r,i,s,a="",o=0;for(;o<n;){if(r=e[o++],0===r&&t)return a;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:i=e[o++],a+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=e[o++],s=e[o++],a+=String.fromCharCode((15&r)<<12|(63&i)<<6|63&s)}}return a}const P=function(e){let t="";for(let n=0;n<e.length;n++){let r=e[n].toString(16);r.length<2&&(r="0"+r),t+=r}return t};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,M,N,F,B,U,$={exports:{}},H=(O||(O=1,M=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,N=/^(?=([^\/?#]*))\1([^]*)$/,F=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,$.exports=U={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=U.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=U.normalizePath(r.path),U.buildURLFromParts(r)}var i=U.parseURL(t);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return n.alwaysNormalize?(i.path=U.normalizePath(i.path),U.buildURLFromParts(i)):t;var s=U.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var a=N.exec(s.path);s.netLoc=a[1],s.path=a[2]}s.netLoc&&!s.path&&(s.path="/");var o={scheme:s.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(o.netLoc=s.netLoc,"/"!==i.path[0]))if(i.path){var l=s.path,u=l.substring(0,l.lastIndexOf("/")+1)+i.path;o.path=U.normalizePath(u)}else o.path=s.path,i.params||(o.params=s.params,i.query||(o.query=s.query));return null===o.path&&(o.path=n.alwaysNormalize?U.normalizePath(i.path):i.path),U.buildURLFromParts(o)},parseURL:function(e){var t=M.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(F,"");e.length!==(e=e.replace(B,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}}),$.exports);class G{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var j="audio",V="video",z="audiovideo";class K{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,"string"==typeof e&&(e={url:e}),this.base=e,function(e,t){const n=X(e,t);n&&(n.enumerable=!0,Object.defineProperty(e,t,n))}(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;r=1===n.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return null===this._byteRange?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return null===this._streams&&(this._streams={[j]:null,[V]:null,[z]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return null!==this._stats}get hasStreams(){return null!==this._streams}get stats(){return null===this._stats&&(this._stats=new G),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=H.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[j]=null,e[V]=null,e[z]=null}}function W(e){return"initSegment"!==e.sn}class Y extends K{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(r(e)&&r(t))return t-e}return null}get bitrate(){return this.byteLength?8*this.byteLength/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;const e=r(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}get programDateTime(){return null===this._programDateTime&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){r(e)?this._programDateTime=e:this._programDateTime=this.rawProgramDateTime=null}get ref(){return W(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:a}=this,o=a[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,n),o.startDTS=Math.min(o.startDTS,r),o.endDTS=Math.max(o.endDTS,i)):a[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s}}}class q extends K{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function X(e,t){const n=Object.getPrototypeOf(e);if(n){return Object.getOwnPropertyDescriptor(n,t)||X(n,t)}}const Q=Math.pow(2,32)-1,Z=[].push,J={video:1,audio:2,id3:3,text:4};function ee(e){return String.fromCharCode.apply(null,e)}function te(e,t){const n=e[t]<<8|e[t+1];return n<0?65536+n:n}function ne(e,t){const n=ie(e,t);return n<0?4294967296+n:n}function re(e,t){let n=ne(e,t);return n*=Math.pow(2,32),n+=ne(e,t+4),n}function ie(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function se(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function ae(e,t){const n=[];if(!t.length)return n;const r=e.byteLength;for(let i=0;i<r;){const s=ne(e,i),a=s>1?i+s:r;if(ee(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,a));else{const r=ae(e.subarray(i+8,a),t.slice(1));r.length&&Z.apply(n,r)}i=a}return n}function oe(e){const t=[],n=e[0];let r=8;const i=ne(e,r);r+=4;let s=0,a=0;0===n?(s=ne(e,r),a=ne(e,r+4),r+=8):(s=re(e,r),a=re(e,r+8),r+=16),r+=2;let o=e.length+a;const l=te(e,r);r+=2;for(let n=0;n<l;n++){let n=r;const s=ne(e,n);n+=4;const a=2147483647&s;if(1==(2147483648&s)>>>31)return C.warn("SIDX has hierarchical references (not supported)"),null;const l=ne(e,n);n+=4,t.push({referenceSize:a,subsegmentDuration:l,info:{duration:l/i,start:o,end:o+a-1}}),o+=a,n+=4,r=n}return{earliestPresentationTime:s,timescale:i,version:n,referencesCount:l,references:t}}function le(e){const t=[],n=ae(e,["moov","trak"]);for(let e=0;e<n.length;e++){const r=n[e],i=ae(r,["tkhd"])[0];if(i){let e=i[0];const n=ne(i,0===e?12:20),s=ae(r,["mdia","mdhd"])[0];if(s){e=s[0];const i=ne(s,0===e?12:20),a=ae(r,["mdia","hdlr"])[0];if(a){const e=ee(a.subarray(8,12)),s={soun:j,vide:V}[e],o=ue(ae(r,["mdia","minf","stbl","stsd"])[0]);s?(t[n]={timescale:i,type:s,stsd:o},t[s]=T({timescale:i,id:n},o)):t[n]={timescale:i,type:e,stsd:o}}}}}return ae(e,["moov","mvex","trex"]).forEach((e=>{const n=ne(e,4),r=t[n];r&&(r.default={duration:ne(e,12),flags:ne(e,20)})})),t}function ue(e){const t=e.subarray(8),n=t.subarray(86),r=ee(t.subarray(4,8));let i,s=r;const a="enca"===r||"encv"===r;if(a){const e=ae(t,[r])[0];ae(e.subarray("enca"===r?28:78),["sinf"]).forEach((e=>{const t=ae(e,["schm"])[0];if(t){const n=ee(t.subarray(4,8));if("cbcs"===n||"cenc"===n){const t=ae(e,["frma"])[0];t&&(s=ee(t))}}}))}const o=s;switch(s){case"avc1":case"avc2":case"avc3":case"avc4":{const e=ae(n,["avcC"])[0];e&&e.length>3&&(s+="."+de(e[1])+de(e[2])+de(e[3]),i=ce("avc1"===o?"dva1":"dvav",n));break}case"mp4a":{const e=ae(t,[r])[0],n=ae(e.subarray(28),["esds"])[0];if(n&&n.length>7){let e=4;if(3!==n[e++])break;e=he(n,e),e+=2;const t=n[e++];if(128&t&&(e+=2),64&t&&(e+=n[e++]),4!==n[e++])break;e=he(n,e);const r=n[e++];if(64!==r)break;if(s+="."+de(r),e+=12,5!==n[e++])break;e=he(n,e);const i=n[e++];let a=(248&i)>>3;31===a&&(a+=1+((7&i)<<3)+((224&n[e])>>5)),s+="."+a}break}case"hvc1":case"hev1":{const e=ae(n,["hvcC"])[0];if(e&&e.length>12){const t=e[1],n=["","A","B","C"][t>>6],r=31&t,i=ne(e,2),a=(32&t)>>5?"H":"L",o=e[12],l=e.subarray(6,12);s+="."+n+r,s+="."+function(e){let t=0;for(let n=0;n<32;n++)t|=(e>>n&1)<<31-n;return t>>>0}(i).toString(16).toUpperCase(),s+="."+a+o;let u="";for(let e=l.length;e--;){const t=l[e];(t||u)&&(u="."+t.toString(16).toUpperCase()+u)}s+=u}i=ce("hev1"==o?"dvhe":"dvh1",n);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":s=ce(s,n)||s;break;case"vp09":{const e=ae(n,["vpcC"])[0];if(e&&e.length>6){const t=e[4],n=e[5],r=e[6]>>4&15;s+="."+fe(t)+"."+fe(n)+"."+fe(r)}break}case"av01":{const e=ae(n,["av1C"])[0];if(e&&e.length>2){const t=e[1]>>>5,r=31&e[1],a=e[2]>>>7?"H":"M",o=(64&e[2])>>6,l=(32&e[2])>>5,u=2===t&&o?l?12:10:o?10:8,c=(16&e[2])>>4,h=(8&e[2])>>3,d=(4&e[2])>>2,f=3&e[2],p=1,g=1,m=1,v=0;s+="."+t+"."+fe(r)+a+"."+fe(u)+"."+c+"."+h+d+f+"."+fe(p)+"."+fe(g)+"."+fe(m)+"."+v,i=ce("dav1",n)}break}}return{codec:s,encrypted:a,supplemental:i}}function ce(e,t){const n=ae(t,["dvvC"]),r=n.length?n[0]:ae(t,["dvcC"])[0];if(r){const t=r[2]>>1&127,n=r[2]<<5&32|r[3]>>3&31;return e+"."+fe(t)+"."+fe(n)}}function he(e,t){const n=t+5;for(;128&e[t++]&&t<n;);return t}function de(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function fe(e){return(e<10?"0":"")+e}function pe(e){const t=ae(e,["schm"])[0];if(t){const n=ee(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return ae(e,["schi","tenc"])[0]}return null}function ge(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function me(e,t){const n=[],r=t.samples,i=t.timescale,s=t.id;let a=!1;return ae(r,["moof"]).map((o=>{const l=o.byteOffset-8;ae(o,["traf"]).map((o=>{const u=ae(o,["tfdt"]).map((e=>{const t=e[0];let n=ne(e,4);return 1===t&&(n*=Math.pow(2,32),n+=ne(e,8)),n/i}))[0];return void 0!==u&&(e=u),ae(o,["tfhd"]).map((u=>{const c=ne(u,4),h=16777215&ne(u,0);let d=0;const f=!!(16&h);let p=0;const g=!!(32&h);let m=8;c===s&&(!!(1&h)&&(m+=8),!!(2&h)&&(m+=4),!!(8&h)&&(d=ne(u,m),m+=4),f&&(p=ne(u,m),m+=4),g&&(m+=4),"video"===t.type&&(a=ve(t.codec)),ae(o,["trun"]).map((s=>{const o=s[0],u=16777215&ne(s,0),c=!!(1&u);let h=0;const f=!!(4&u),g=!!(256&u);let m=0;const v=!!(512&u);let y=0;const b=!!(1024&u),E=!!(2048&u);let T=0;const S=ne(s,4);let w=8;c&&(h=ne(s,w),w+=4),f&&(w+=4);let _=h+l;for(let l=0;l<S;l++){if(g?(m=ne(s,w),w+=4):m=d,v?(y=ne(s,w),w+=4):y=p,b&&(w+=4),E&&(T=0===o?ne(s,w):ie(s,w),w+=4),t.type===V){let t=0;for(;t<y;){const s=ne(r,_);_+=4,ye(a,r[_])&&be(r.subarray(_,_+s),a?2:1,e+T/i,n),_+=s,t+=s+4}}e+=m/i}})))}))}))})),n}function ve(e){if(!e)return!1;const t=e.substring(0,4);return"hvc1"===t||"hev1"===t||"dvh1"===t||"dvhe"===t}function ye(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6==(31&t)}function be(e,t,n,r){const i=Ee(e);let s=0;s+=t;let a=0,o=0,l=0;for(;s<i.length;){a=0;do{if(s>=i.length)break;l=i[s++],a+=l}while(255===l);o=0;do{if(s>=i.length)break;l=i[s++],o+=l}while(255===l);const e=i.length-s;let t=s;if(o<e)s+=o;else if(o>e){C.error(`Malformed SEI payload. ${o} is too small, only ${e} bytes left to parse.`);break}if(4===a){if(181===i[t++]){const e=te(i,t);if(t+=2,49===e){const e=ne(i,t);if(t+=4,1195456820===e){const e=i[t++];if(3===e){const s=i[t++],o=64&s,l=o?2+3*(31&s):0,u=new Uint8Array(l);if(o){u[0]=s;for(let e=1;e<l;e++)u[e]=i[t++]}r.push({type:e,payloadType:a,pts:n,bytes:u})}}}}}else if(5===a&&o>16){const e=[];for(let n=0;n<16;n++){const r=i[t++].toString(16);e.push(1==r.length?"0"+r:r),3!==n&&5!==n&&7!==n&&9!==n||e.push("-")}const s=o-16,l=new Uint8Array(s);for(let e=0;e<s;e++)l[e]=i[t++];r.push({payloadType:a,pts:n,uuid:e.join(""),userData:x(l),userDataBytes:l})}}}function Ee(e){const t=e.byteLength,n=[];let r=1;for(;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;const i=t-n.length,s=new Uint8Array(i);let a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),s[r]=e[a];return s}function Te(e){const t=e.getUint32(0),n=e.byteOffset,r=e.byteLength;if(r<t)return{offset:n,size:r};if(1886614376!==e.getUint32(4))return{offset:n,size:t};const i=e.getUint32(8)>>>24;if(0!==i&&1!==i)return{offset:n,size:t};const s=e.buffer,a=P(new Uint8Array(s,n+12,16)),o=e.getUint32(28);let l=null,u=null;if(0===i){if(t-32<o||o<22)return{offset:n,size:t};u=new Uint8Array(s,n+32,o)}else if(1===i){if(!o||r<n+32+16*o+16)return{offset:n,size:t};l=[];for(let e=0;e<o;e++)l.push(new Uint8Array(s,n+32+16*e,16))}return{version:i,systemId:a,kids:l,data:u,offset:n,size:t}}const Se=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),we={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function _e(e,t){const n=we[t];return!!n&&!!n[e.slice(0,4)]}function Ae(e,t,n=!0){return!e.split(",").some((e=>!ke(e,t,n)))}function ke(e,t,n=!0){var r;const i=R(n);return null!=(r=null==i?void 0:i.isTypeSupported(Le(e,t)))&&r}function Le(e,t){return`${t}/mp4;codecs=${e}`}function Ce(e){if(e){const t=e.substring(0,4);return we.video[t]}return 2}function Re(e){const t=Se();return e.split(",").reduce(((e,n)=>{const r=t&&ve(n)?9:we.video[n];return r?(2*r+e)/(e?3:2):(we.audio[n]+e)/(e?2:1)}),0)}const Ie={},xe=/flac|opus|mp4a\.40\.34/i;function Pe(e,t=!0){return e.replace(xe,(e=>function(e,t=!0){if(Ie[e])return Ie[e];const n={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[e];for(let i=0;i<n.length;i++){var r;if(ke(n[i],"audio",t))return Ie[e]=n[i],n[i];if("mp3"===n[i]&&null!=(r=R(t))&&r.isTypeSupported("audio/mpeg"))return""}return e}(e.toLowerCase(),t)))}function De(e,t){if(e&&(e.length>4||-1!==["ac-3","ec-3","alac","fLaC","Opus"].indexOf(e)))return e;if(t){const n=t.split(",");if(n.length>1){if(e)for(let t=n.length;t--;)if(n[t].substring(0,4)===e.substring(0,4))return n[t];return n[0]}}return t||e}function Oe(e){if(e.startsWith("av01.")){const t=e.split("."),n=["0","111","01","01","01","0"];for(let e=t.length;e>4&&e<10;e++)t[e]=n[e-4];return t.join(".")}return e}function Me(e){const t=R(e)||{isTypeSupported:()=>!1};return{mpeg:t.isTypeSupported("audio/mpeg"),mp3:t.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:t.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Ne(e){return e.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Fe={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Be(e,t){return{supported:!1,configurations:t,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:e}}const Ue={};function $e(e,t,n,i,s,a){const o=e.audioCodec?e.audioGroups:null,l=null==a?void 0:a.audioCodec,u=null==a?void 0:a.channels,c=u?parseInt(u):l?1/0:2;let h=null;if(null!=o&&o.length)try{h=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce(((e,n)=>{if(n){const r=t.groups[n];if(!r)throw new Error(`Audio track group ${n} not found`);Object.keys(r.channels).forEach((t=>{e[t]=(e[t]||0)+r.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(i,30)||"SDR"!==e.videoRange&&e.videoRange!==n||e.bitrate>Math.max(s,8e6))||!!h&&r(c)&&Object.keys(h).some((e=>parseInt(e)>c))}function He(e,t,n){const i=e.videoCodec,s=e.audioCodec;if(!i&&!s||!n)return Promise.resolve(Fe);const a=[];if(i){const t={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},n=e.videoRange;"SDR"!==n&&(t.transferFunction=n.toLowerCase());const r=i.split(","),s=navigator.userAgent;if(r.some((e=>ve(e)))&&Se())return Promise.resolve(Be(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${s})`),a));a.push.apply(a,r.map((e=>({type:"media-source",video:T(T({},t),{},{contentType:Le(Oe(e),"video")})}))))}return s&&e.audioGroups&&e.audioGroups.forEach((e=>{var n;e&&(null==(n=t.groups[e])||n.tracks.forEach((t=>{if(t.groupId===e){const e=t.channels||"",n=parseFloat(e);r(n)&&n>2&&a.push.apply(a,s.split(",").map((e=>({type:"media-source",audio:{contentType:Le(e,"audio"),channels:""+n}}))))}})))})),Promise.all(a.map((e=>{const t=function(e){const{audio:t,video:n}=e,r=n||t;if(r){const e=Ne(r.contentType);if(n)return`r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${e}_${Math.ceil(n.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}(e);return Ue[t]||(Ue[t]=n.decodingInfo(e))}))).then((e=>({supported:!e.some((e=>!e.supported)),configurations:a,decodingInfoResults:e}))).catch((e=>({supported:!1,configurations:a,decodingInfoResults:[],error:e})))}const Ge=["NONE","TYPE-0","TYPE-1",null],je=["SDR","PQ","HLG"];function Ve(e){const{canSkipUntil:t,canSkipDateRanges:n,age:r}=e;return t&&r<t/2?n?"v2":"YES":""}class ze{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Ke{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>!!e)).map((e=>e.substring(0,4))).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=null==(t=e.supplemental)?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return We(this._audioGroups,e)}hasSubtitleGroup(e){return We(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function We(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}const Ye=(e,t)=>JSON.stringify(e,(e=>{const t=new WeakSet;return(n,r)=>{if(e&&(r=e(n,r)),"object"==typeof r&&null!==r){if(t.has(r))return;t.add(r)}return r}})(t));function qe(e,t){C.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function Xe(e){return e.reduce(((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Qe(e){if(!e)return e;const{lang:t,assocLang:n,characteristics:r,channels:i,audioCodec:s}=e;return{lang:t,assocLang:n,characteristics:r,channels:i,audioCodec:s}}function Ze(e,t,n){if("attrs"in e){const n=t.indexOf(e);if(-1!==n)return n}for(let r=0;r<t.length;r++)if(Je(e,t[r],n))return r;return-1}function Je(e,t,n){const{groupId:r,name:i,lang:s,assocLang:a,default:o}=e,l=e.forced;return(void 0===r||t.groupId===r)&&(void 0===i||t.name===i)&&(void 0===s||function(e,t="--"){return e.length===t.length?e===t:e.startsWith(t)||t.startsWith(e)}(s,t.lang))&&(void 0===s||t.assocLang===a)&&(void 0===o||t.default===o)&&(void 0===l||t.forced===l)&&(!("characteristics"in e)||function(e,t=""){const n=e.split(","),r=t.split(",");return n.length===r.length&&!n.some((e=>-1===r.indexOf(e)))}(e.characteristics||"",t.characteristics))&&(void 0===n||n(e,t))}function et(e,t){const{audioCodec:n,channels:r}=e;return!(void 0!==n&&(t.audioCodec||"").substring(0,4)!==n.substring(0,4)||void 0!==r&&r!==(t.channels||"2"))}function tt(e,t,n){for(let r=t;r>-1;r--)if(n(e[r]))return r;for(let r=t+1;r<e.length;r++)if(n(e[r]))return r;return-1}function nt(e,t){var n;return!!e&&e!==(null==(n=t.loadLevelObj)?void 0:n.uri)}const rt=function(e,t){let n=0,r=e.length-1,i=null,s=null;for(;n<=r;){i=(n+r)/2|0,s=e[i];const a=t(s);if(a>0)n=i+1;else{if(!(a<0))return s;r=i-1}}return null};function it(e,t,n=0,r=0,i=.005){let s=null;if(e){s=t[1+e.sn-t[0].sn]||null;const r=e.endDTS-n;r>0&&r<15e-7&&(n+=15e-7),s&&e.level!==s.level&&s.end<=e.end&&(s=t[2+e.sn-t[0].sn]||null)}else 0===n&&0===t[0].start&&(s=t[0]);if(s&&((!e||e.level===s.level)&&0===st(n,r,s)||function(e,t,n){if(t&&0===t.start&&t.level<e.level&&(t.endPTS||0)>0){const r=t.tagList.reduce(((e,t)=>("INF"===t[0]&&(e+=parseFloat(t[1])),e)),n);return e.start<=r}return!1}(s,e,Math.min(i,r))))return s;const a=rt(t,st.bind(null,n,r));return!a||a===e&&s?s:a}function st(e=0,t=0,n){if(n.start<=e&&n.start+n.duration>e)return 0;const r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function at(e,t,n){const r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function ot(e,t,n){if(e&&e.startCC<=t&&e.endCC>=t){let r=e.fragments;const{fragmentHint:i}=e;let s;return i&&(r=r.concat(i)),rt(r,(e=>e.cc<t?1:e.cc>t?-1:(s=e,e.end<=n?1:e.start>n?-1:0))),s||null}return null}function lt(e){switch(e.details){case o.FRAG_LOAD_TIMEOUT:case o.KEY_LOAD_TIMEOUT:case o.LEVEL_LOAD_TIMEOUT:case o.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function ut(e,t){const n=lt(t);return e.default[(n?"timeout":"error")+"Retry"]}function ct(e,t){const n="linear"===e.backoff?1:Math.pow(2,t);return Math.min(n*e.retryDelayMs,e.maxRetryDelayMs)}function ht(e){return T(T({},e),{errorRetry:null,timeoutRetry:null})}function dt(e,t,n,r){if(!e)return!1;const i=null==r?void 0:r.code,s=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(i)||!!n);return e.shouldRetry?e.shouldRetry(e,t,n,r,s):s}function ft(e){const t={action:0,flags:0};return e&&(t.resolved=!0),t}var pt="NOT_LOADED",gt="APPENDING",mt="PARTIAL",vt="OK";class yt{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.BUFFER_APPENDED,this.onBufferAppended,this),e.on(l.FRAG_BUFFERED,this.onFragBuffered,this),e.on(l.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.BUFFER_APPENDED,this.onBufferAppended,this),e.off(l.FRAG_BUFFERED,this.onFragBuffered,this),e.off(l.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let t=n.length;t--;){const r=n[t];if(!r)break;const i=r.end;if(r.start<=e&&null!==i&&e<=i)return r}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const a=r[i[s]];if((null==a?void 0:a.body.type)===t&&(!n||a.buffered)){const t=a.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(null==r?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach((r=>{const a=this.fragments[r];if(!a)return;if(s>=a.body.sn)return;if(!a.buffered&&(!a.loaded||i))return void(a.body.type===n&&this.removeFragment(a.body));const o=a.range[e];o&&(0!==o.time.length?o.time.some((e=>{const n=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&this.removeFragment(a.body),n})):this.removeFragment(a.body))}))}detectPartialFragments(e){const t=this.timeRanges;if(!t||"initSegment"===e.frag.sn)return;const n=e.frag,r=Et(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach((r=>{const a=n.elementaryStreams[r];if(!a)return;const o=t[r],l=s||!0===a.partial;i.range[r]=this.getBufferedTimes(n,e.part,l,o)})),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),bt(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Tt(n,(t=>t.fragment.sn>=e)))}fragBuffered(e,t){const n=Et(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,a=e.end,o=e.minEndPTS||a,l=e.maxStartPTS||s;for(let e=0;e<r.length;e++){const t=r.start(e)-this.bufferPadding,n=r.end(e)+this.bufferPadding;if(l>=t&&o<=n){i.time.push({startPTS:Math.max(s,r.start(e)),endPTS:Math.min(a,r.end(e))});break}if(s<n&&a>t){const t=Math.max(s,r.start(e)),n=Math.min(a,r.end(e));n>t&&(i.partial=!0,i.time.push({startPTS:t,endPTS:n}))}else if(a<=t)break}return i}getPartialFragment(e){let t,n,r,i=null,s=0;const{bufferPadding:a,fragments:o}=this;return Object.keys(o).forEach((l=>{const u=o[l];u&&bt(u)&&(n=u.body.start-a,r=u.body.end+a,e>=n&&e<=r&&(t=Math.min(e-n,r-e),s<=t&&(i=u.body,s=t)))})),i}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||bt(t))}getState(e){const t=Et(e),n=this.fragments[t];return n?n.buffered?bt(n)?mt:vt:gt:pt}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if("initSegment"===t.frag.sn||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=Et(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if("initSegment"===n.sn)return;const a=n.type;if(r){let e=this.activePartLists[a];e||(this.activePartLists[a]=e=[]),e.push(r)}this.timeRanges=i;const o=i[s];this.detectEvictedFragments(s,o,a,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Et(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((null==i?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach((s=>{const a=this.fragments[s];if(!a)return;const o=a.body;o.type!==n||r&&!o.gap||o.start<t&&o.end>e&&(a.buffered||i)&&this.removeFragment(o)}))}removeFragment(e){const t=Et(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const t=e.sn;this.activePartLists[e.type]=Tt(n,(e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=null==(e=this.hls)||null==(t=e.latestLevelDetails)?void 0:t.partList;n&&n.forEach((e=>e.clearElementaryStreamInfo()))}}function bt(e){var t,n,r;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(n=e.range.audio)?void 0:n.partial)||(null==(r=e.range.audiovideo)?void 0:r.partial))}function Et(e){return`${e.type}_${e.level}_${e.sn}`}function Tt(e,t){return e.filter((e=>{const n=t(e);return n||e.clearElementaryStreamInfo(),n}))}class St{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case 0:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case 1:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}class wt{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let e=0;e<4;e++)n[e]=t.getUint32(4*e);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],a=n[3],o=this.invSubMix,l=o[0],u=o[1],c=o[2],h=o[3],d=new Uint32Array(256);let f=0,p=0,g=0;for(g=0;g<256;g++)d[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){let n=p^p<<1^p<<2^p<<3^p<<4;n=n>>>8^255&n^99,e[f]=n,t[n]=f;const o=d[f],g=d[o],m=d[g];let v=257*d[n]^16843008*n;r[f]=v<<24|v>>>8,i[f]=v<<16|v>>>16,s[f]=v<<8|v>>>24,a[f]=v,v=16843009*m^65537*g^257*o^16843008*f,l[n]=v<<24|v>>>8,u[n]=v<<16|v>>>16,c[n]=v<<8|v>>>24,h[n]=v,f?(f=o^d[d[d[m^o]]],p^=d[d[p]]):f=p=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);const s=this.ksRows=4*(i+6+1);let a,o;const l=this.keySchedule=new Uint32Array(s),u=this.invKeySchedule=new Uint32Array(s),c=this.sBox,h=this.rcon,d=this.invSubMix,f=d[0],p=d[1],g=d[2],m=d[3];let v,y;for(a=0;a<s;a++)a<i?v=l[a]=t[a]:(y=v,a%i===0?(y=y<<8|y>>>24,y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y],y^=h[a/i|0]<<24):i>6&&a%i===4&&(y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y]),l[a]=v=(l[a-i]^y)>>>0);for(o=0;o<s;o++)a=s-o,y=3&o?l[a]:l[a-4],u[o]=o<4||a<=4?y:f[c[y>>>24]]^p[c[y>>>16&255]]^g[c[y>>>8&255]]^m[c[255&y]],u[o]=u[o]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,a=this.invSubMix,o=a[0],l=a[1],u=a[2],c=a[3],h=this.uint8ArrayToUint32Array_(n);let d=h[0],f=h[1],p=h[2],g=h[3];const m=new Int32Array(e),v=new Int32Array(m.length);let y,b,E,T,S,w,_,A,k,L,C,R,I,x;const P=this.networkToHostOrderSwap;for(;t<m.length;){for(k=P(m[t]),L=P(m[t+1]),C=P(m[t+2]),R=P(m[t+3]),S=k^i[0],w=R^i[1],_=C^i[2],A=L^i[3],I=4,x=1;x<r;x++)y=o[S>>>24]^l[w>>16&255]^u[_>>8&255]^c[255&A]^i[I],b=o[w>>>24]^l[_>>16&255]^u[A>>8&255]^c[255&S]^i[I+1],E=o[_>>>24]^l[A>>16&255]^u[S>>8&255]^c[255&w]^i[I+2],T=o[A>>>24]^l[S>>16&255]^u[w>>8&255]^c[255&_]^i[I+3],S=y,w=b,_=E,A=T,I+=4;y=s[S>>>24]<<24^s[w>>16&255]<<16^s[_>>8&255]<<8^s[255&A]^i[I],b=s[w>>>24]<<24^s[_>>16&255]<<16^s[A>>8&255]<<8^s[255&S]^i[I+1],E=s[_>>>24]<<24^s[A>>16&255]<<16^s[S>>8&255]<<8^s[255&w]^i[I+2],T=s[A>>>24]<<24^s[S>>16&255]<<16^s[w>>8&255]<<8^s[255&_]^i[I+3],v[t]=P(y^d),v[t+1]=P(T^f),v[t+2]=P(E^p),v[t+3]=P(b^g),d=k,f=L,p=C,g=R,t+=4}return v.buffer}}class _t{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=function(e){switch(e){case 0:return"AES-CBC";case 1:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${e}`)}}(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}class At{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,n=t&&new DataView(e.buffer).getUint8(t-1);return n?e.slice(0,t-n):e}(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise(((i,s)=>{const a=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(a,t,n,r);const o=this.flush();o?i(o.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:a}=this;if(0!==r||16!==t.byteLength)return C.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),a&&(e=ge(a,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;i&&(n=i);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new wt),l.expandKey(t);const u=s;return this.currentResult=l.decrypt(o.buffer,0,n),this.currentIV=o.slice(-16).buffer,u||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new _t(this.subtle,t,r)}return this.fastAesKey.expandKey().then((t=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new St(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized")))).catch((i=>(C.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r))))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const i=this.flush();if(i)return i.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%16;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(C.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const kt=Math.pow(2,17);class Lt{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new It({type:a.NETWORK_ERROR,details:o.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(n?"part list":"url")),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise(((l,u)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void u(Rt(e));e.gap=!1}const c=this.loader=i?new i(r):new s(r),h=Ct(e);e.loader=c;const d=ht(r.fragLoadPolicy.default),f={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:kt};e.stats=c.stats;const p={onSuccess:(t,n,r,i)=>{this.resetLoader(e,c);let s=t.data;r.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(s.slice(0,16)),s=s.slice(16)),l({frag:e,part:null,payload:s,networkDetails:i})},onError:(t,r,i,s)=>{this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:T({url:n,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:i,stats:s}))},onAbort:(t,n,r)=>{this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:r,stats:t}))},onTimeout:(t,n,r)=>{this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${f.timeout}ms`),networkDetails:r,stats:t}))}};t&&(p.onProgress=(n,r,i,s)=>t({frag:e,part:null,payload:i,networkDetails:s})),c.load(h,f,p)}))}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise(((l,u)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void u(Rt(e,t));const c=this.loader=i?new i(r):new s(r),h=Ct(e,t);e.loader=c;const d=ht(r.fragLoadPolicy.default),f={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:kt};t.stats=c.stats,c.load(h,f,{onSuccess:(r,i,s,a)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const o={frag:e,part:t,payload:r.data,networkDetails:a};n(o),l(o)},onError:(n,r,i,s)=>{this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:T({url:h.url,data:void 0},n),error:new Error(`HTTP Error ${n.code} ${n.text}`),networkDetails:i,stats:s}))},onAbort:(n,r,i)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:i,stats:n}))},onTimeout:(n,r,i)=>{this.resetLoader(e,c),u(new It({type:a.NETWORK_ERROR,details:o.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${f.timeout}ms`),networkDetails:i,stats:n}))}})}))}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const r=Math.round(e.duration/t.duration),s=Math.min(Math.round(n.loaded/i),r),a=(r-s)*Math.round(n.loaded/s);n.total=n.loaded+a}else n.total=Math.max(n.loaded,n.total);const s=n.loading,a=r.loading;s.start?s.first+=a.first-a.start:(s.start=a.start,s.first=a.first),s.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Ct(e,t=null){const n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},s=n.byteRangeStartOffset,a=n.byteRangeEndOffset;if(r(s)&&r(a)){var o;let t=s,n=a;if("initSegment"===e.sn&&("AES-128"===(l=null==(o=e.decryptdata)?void 0:o.method)||"AES-256"===l)){const e=a-s;e%16&&(n=a+(16-e%16)),0!==s&&(i.resetIV=!0,t=s-16)}i.rangeStart=t,i.rangeEnd=n}var l;return i}function Rt(e,t){const n=new Error(`GAP ${e.gap?"tag":"attribute"} found`),r={type:a.MEDIA_ERROR,details:o.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(r.part=t),(t||e).stats.aborted=!0,new It(r)}class It extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class xt extends S{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Pt{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}const Dt={length:0,start:()=>0,end:()=>0};class Ot{static isBuffered(e,t){if(e){const n=Ot.getBuffered(e);for(let e=n.length;e--;)if(t>=n.start(e)&&t<=n.end(e))return!0}return!1}static bufferedRanges(e){if(e){const t=Ot.getBuffered(e);return Ot.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=Ot.bufferedRanges(e);if(r.length)return Ot.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort(((e,t)=>e.start-t.start||t.end-e.end));let r=-1,i=[];if(n)for(let s=0;s<e.length;s++){t>=e[s].start&&t<=e[s].end&&(r=s);const a=i.length;if(a){const t=i[a-1].end;e[s].start-t<n?e[s].end>t&&(i[a-1].end=e[s].end):i.push(e[s])}else i.push(e[s])}else i=e;let s,a=0,o=t,l=t;for(let e=0;e<i.length;e++){const u=i[e].start,c=i[e].end;if(-1===r&&t>=u&&t<=c&&(r=e),t+n>=u&&t<c)o=u,l=c,a=l-t;else if(t+n<u){s=u;break}}return{len:a,start:o||0,end:l||0,nextStart:s,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Dt}catch(e){return C.log("failed to get media.buffered",e),Dt}}}const Mt=/\{\$([a-zA-Z0-9-_]+)\}/g;function Nt(e){return Mt.test(e)}function Ft(e,t){if(null!==e.variableList||e.hasVariableRefs){const n=e.variableList;return t.replace(Mt,(t=>{const r=t.substring(2,t.length-1),i=null==n?void 0:n[r];return void 0===i?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),t):i}))}return t}function Bt(e,t,n){let r,i,s=e.variableList;if(s||(e.variableList=s={}),"QUERYPARAM"in t){r=t.QUERYPARAM;try{const e=new self.URL(n).searchParams;if(!e.has(r))throw new Error(`"${r}" does not match any query parameter in URI: "${n}"`);i=e.get(r)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else r=t.NAME,i=t.VALUE;r in s?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):s[r]=i||""}function Ut(e,t,n){const r=t.IMPORT;if(n&&r in n){let t=e.variableList;t||(e.variableList=t={}),t[r]=n[r]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const $t=/^(\d+)x(\d+)$/,Ht=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Gt{constructor(e,t){"string"==typeof e&&(e=Gt.parseAttrList(e,t)),b(this,e)}get clientAttrs(){return Object.keys(this).filter((e=>"X-"===e.substring(0,2)))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const n=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)n[e]=parseInt(t.slice(2*e,2*e+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce(((e,t)=>(e[t.toLowerCase()]=!0,e)),t)}bool(e){return"YES"===this[e]}decimalResolution(e){const t=$t.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={};for(Ht.lastIndex=0;null!==(n=Ht.exec(e));){const i=n[1].trim();let s=n[2];const a=0===s.indexOf('"')&&s.lastIndexOf('"')===s.length-1;let o=!1;if(a)s=s.slice(1,-1);else switch(i){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":o=!0}if(t&&(a||o))s=Ft(t,s);else if(!o&&!a)switch(i){case"CLOSED-CAPTIONS":if("NONE"===s)break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":C.warn(`${e}: attribute ${i} is missing quotes`)}r[i]=s}return r}}function jt(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e||"SCTE35-CMD"===e}class Vt{constructor(e,t,n=0){var i;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(null==t?void 0:t.tagAnchor)||null,this.tagOrder=null!=(i=null==t?void 0:t.tagOrder)?i:n,t){const n=t.attr;for(const t in n)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==n[t]){C.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=b(new Gt({}),n,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=(null==t?void 0:t.endDate)||new Date(this.attr["END-DATE"]);r(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return void 0===e?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return null===e||null===e.programDateTime?(C.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return null!==t?this._dateAtEnd=new Date(this._startDate.getTime()+1e3*t):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(r(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return"com.apple.hls.interstitial"===this.class}get isValid(){return!!this.id&&!this._badValueForSameId&&r(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}class zt{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1}get hasProgramDateTime(){return!!this.fragments.length&&r(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(-1!==t){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Kt(e){return"AES-128"===e||"AES-256"===e||"AES-256-CTR"===e}function Wt(e){switch(e){case"AES-128":case"AES-256":return 0;case"AES-256-CTR":return 1;default:throw new Error(`invalid full segment method ${e}`)}}function Yt(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function qt(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const Xt="undefined"!=typeof self?self:void 0;var Qt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Zt="org.w3.clearkey",Jt="com.apple.streamingkeydelivery",en="com.microsoft.playready",tn="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function nn(e){switch(e){case Jt:return Qt.FAIRPLAY;case en:return Qt.PLAYREADY;case tn:return Qt.WIDEVINE;case Zt:return Qt.CLEARKEY}}function rn(e){return"edef8ba979d64acea3c827dcd51d21ed"===e?Qt.WIDEVINE:"9a04f07998404286ab92e65be0885f95"===e?Qt.PLAYREADY:"1077efecc0b24d02ace33c1e52e2fb4b"===e||"e2719d58a985b3c9781ab030af78d30e"===e?Qt.CLEARKEY:void 0}function sn(e){switch(e){case Qt.FAIRPLAY:return Jt;case Qt.PLAYREADY:return en;case Qt.WIDEVINE:return tn;case Qt.CLEARKEY:return Zt}}function an(e){const{drmSystems:t,widevineLicenseUrl:n}=e,r=t?[Qt.FAIRPLAY,Qt.WIDEVINE,Qt.PLAYREADY,Qt.CLEARKEY].filter((e=>!!t[e])):[];return!r[Qt.WIDEVINE]&&n&&r.push(Qt.WIDEVINE),r}const on=null!=Xt&&null!=(ln=Xt.navigator)&&ln.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var ln;function un(e){const t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=String.fromCharCode.apply(null,Array.from(t)),r=n.substring(n.indexOf("<"),n.length),i=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(i){const e=i.childNodes[0]?i.childNodes[0].nodeValue:i.getAttribute("VALUE");if(e){const t=Yt(e).subarray(0,16);return function(e){const t=function(e,t,n){const r=e[t];e[t]=e[n],e[n]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),t}}return null}let cn={};class hn{static clearKeyUriToKeyIdMap(){cn={}}constructor(e,t,n,r=[1],i=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&!Kt(e)}isSupported(){if(this.method){if(Kt(this.method)||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Jt:case tn:case en:case Zt:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Kt(this.method)&&this.uri&&!this.iv){"number"!=typeof e&&(C.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=function(e){const t=new Uint8Array(16);for(let n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}(e);return new hn(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=function(e){const t=e.split(":");let n=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),r=e[e.length-1].split(",");if(2===r.length){const t="base64"===r[0],i=r[1];t?(e.splice(-1,1),n=Yt(i)):n=function(e){const t=qt(e).subarray(0,16),n=new Uint8Array(16);return n.set(t,16-t.length),n}(i)}}return n}(this.uri);if(t)switch(this.keyFormat){case tn:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case en:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=function(e,t,n){if(16!==e.byteLength)throw new RangeError("Invalid system id");let r,i,s;r=0,i=new Uint8Array,s=new Uint8Array;const a=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(a.buffer).setUint32(0,n.byteLength,!1),function(e,...t){const n=t.length;let r=8,i=n;for(;i--;)r+=t[i].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=255&r,s.set(e,4),i=0,r=8;i<n;i++)s.set(t[i],r),r+=t[i].byteLength;return s}([112,115,115,104],new Uint8Array([0,0,0,0]),e,s,i,a,n||new Uint8Array)}(e,0,t),this.keyId=un(t);break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=cn[this.uri];if(!e){const t=Object.keys(cn).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16),new DataView(e.buffer,12,4).setUint32(0,t),cn[this.uri]=e}this.keyId=e}return this}}const dn=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,fn=/#EXT-X-MEDIA:(.*)/g,pn=/^#EXT(?:INF|-X-TARGETDURATION):/m,gn=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),mn=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class vn{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return H.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return pn.test(e)}static parseMasterPlaylist(e,t){const n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Nt(e)},r=[];let i;for(dn.lastIndex=0;null!=(i=dn.exec(e));)if(i[1]){var s;const e=new Gt(i[1],n),a=Ft(n,i[2]),o={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:vn.resolve(a,t)},l=e.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),Sn(e.CODECS,o);const u=e["SUPPLEMENTAL-CODECS"];u&&(o.supplemental={},Sn(u,o.supplemental)),null!=(s=o.unknownCodecs)&&s.length||r.push(o),n.levels.push(o)}else if(i[3]){const e=i[3],r=i[4];switch(e){case"SESSION-DATA":{const e=new Gt(r,n),t=e["DATA-ID"];t&&(null===n.sessionData&&(n.sessionData={}),n.sessionData[t]=e);break}case"SESSION-KEY":{const e=En(r,t,n);e.encrypted&&e.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(e)):C.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${r}"`);break}case"DEFINE":Bt(n,new Gt(r,n),t);break;case"CONTENT-STEERING":{const e=new Gt(r,n);n.contentSteering={uri:vn.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":n.startTimeOffset=Tn(r)}}const a=r.length>0&&r.length<n.levels.length;return n.levels=a?r:n.levels,0===n.levels.length&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,a={AUDIO:s.map((e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:s.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let o=0;for(fn.lastIndex=0;null!==(r=fn.exec(e));){const e=new Gt(r[1],n),s=e.TYPE;if(s){const n=a[s],r=i[s]||[];i[s]=r;const l=e.LANGUAGE,u=e["ASSOC-LANGUAGE"],c=e.CHANNELS,h=e.CHARACTERISTICS,d=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:o++,groupId:e["GROUP-ID"]||"",name:e.NAME||l||"",type:s,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:l,url:e.URI?vn.resolve(e.URI,t):""};if(u&&(f.assocLang=u),c&&(f.channels=c),h&&(f.characteristics=h),d&&(f.instreamId=d),null!=n&&n.length){const e=vn.findGroup(n,f.groupId)||n[0];wn(f,e,"audioCodec"),wn(f,e,"textCodec")}r.push(f)}}return i}static parseLevelPlaylist(e,t,n,i,s,a){var o;const l={url:t},u=new zt(t),c=u.fragments,h=[];let d,f,p,g,m=null,v=0,y=0,E=0,T=0,S=0,w=null,_=new Y(i,l),A=-1,k=!1,L=null;if(gn.lastIndex=0,u.m3u8=e,u.hasVariableRefs=Nt(e),"#EXTM3U"!==(null==(o=gn.exec(e))?void 0:o[0]))return u.playlistParsingError=new Error("Missing format identifier #EXTM3U"),u;for(;null!==(d=gn.exec(e));){k&&(k=!1,_=new Y(i,l),_.playlistOffset=E,_.start=E,_.sn=v,_.cc=T,S&&(_.bitrate=S),_.level=n,m&&(_.initSegment=m,m.rawProgramDateTime&&(_.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null),L&&(_.setByteRange(L),L=null)));const e=d[1];if(e){_.duration=parseFloat(e);const t=(" "+d[2]).slice(1);_.title=t||null,_.tagList.push(t?["INF",e,t]:["INF",e])}else if(d[3]){if(r(_.duration)){_.playlistOffset=E,_.start=E,p&&kn(_,p,u),_.sn=v,_.level=n,_.cc=T,c.push(_);const e=(" "+d[3]).slice(1);_.relurl=Ft(u,e),_n(_,w,h),w=_,E+=_.duration,v++,y=0,k=!0}}else{if(d=d[0].match(mn),!d){C.warn("No matches on slow regex match for level playlist!");continue}for(f=1;f<d.length&&void 0===d[f];f++);const e=(" "+d[f]).slice(1),s=(" "+d[f+1]).slice(1),o=d[f+2]?(" "+d[f+2]).slice(1):null;switch(e){case"BYTERANGE":w?_.setByteRange(s,w):_.setByteRange(s);break;case"PROGRAM-DATE-TIME":_.rawProgramDateTime=s,_.tagList.push(["PROGRAM-DATE-TIME",s]),-1===A&&(A=c.length);break;case"PLAYLIST-TYPE":u.type&&Ln(u,e,d),u.type=s.toUpperCase();break;case"MEDIA-SEQUENCE":0!==u.startSN?Ln(u,e,d):c.length>0&&Cn(u,e,d),v=u.startSN=parseInt(s);break;case"SKIP":{u.skippedSegments&&Ln(u,e,d);const t=new Gt(s,u),n=t.decimalInteger("SKIPPED-SEGMENTS");if(r(n)){u.skippedSegments+=n;for(let e=n;e--;)c.push(null);v+=n}const i=t.enumeratedString("RECENTLY-REMOVED-DATERANGES");i&&(u.recentlyRemovedDateranges=(u.recentlyRemovedDateranges||[]).concat(i.split("\t")));break}case"TARGETDURATION":0!==u.targetduration&&Ln(u,e,d),u.targetduration=Math.max(parseInt(s),1);break;case"VERSION":null!==u.version&&Ln(u,e,d),u.version=parseInt(s);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":u.live||Ln(u,e,d),u.live=!1;break;case"#":(s||o)&&_.tagList.push(o?[s,o]:[s]);break;case"DISCONTINUITY":T++,_.tagList.push(["DIS"]);break;case"GAP":_.gap=!0,_.tagList.push([e]);break;case"BITRATE":_.tagList.push([e,s]),S=1e3*parseInt(s),r(S)?_.bitrate=S:S=0;break;case"DATERANGE":{const e=new Gt(s,u),t=new Vt(e,u.dateRanges[e.ID],u.dateRangeTagCount);u.dateRangeTagCount++,t.isValid||u.skippedSegments?u.dateRanges[t.id]=t:C.warn(`Ignoring invalid DATERANGE tag: "${s}"`),_.tagList.push(["EXT-X-DATERANGE",s]);break}case"DEFINE":{const e=new Gt(s,u);"IMPORT"in e?Ut(u,e,a):Bt(u,e,t)}break;case"DISCONTINUITY-SEQUENCE":0!==u.startCC?Ln(u,e,d):c.length>0&&Cn(u,e,d),u.startCC=T=parseInt(s);break;case"KEY":{const e=En(s,t,u);if(e.isSupported()){if("NONE"===e.method){p=void 0;break}p||(p={}),p[e.keyFormat]&&(p=b({},p)),p[e.keyFormat]=e}else C.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${s}"`);break}case"START":u.startTimeOffset=Tn(s);break;case"MAP":{const e=new Gt(s,u);if(_.duration){const t=new Y(i,l);An(t,e,n,p),m=t,_.initSegment=m,m.rawProgramDateTime&&!_.rawProgramDateTime&&(_.rawProgramDateTime=m.rawProgramDateTime)}else{const t=_.byteRangeEndOffset;if(t){const e=_.byteRangeStartOffset;L=`${t-e}@${e}`}else L=null;An(_,e,n,p),m=_,k=!0}m.cc=T;break}case"SERVER-CONTROL":g&&Ln(u,e,d),g=new Gt(s),u.canBlockReload=g.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=g.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&g.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=g.optionalFloat("PART-HOLD-BACK",0),u.holdBack=g.optionalFloat("HOLD-BACK",0);break;case"PART-INF":{u.partTarget&&Ln(u,e,d);const t=new Gt(s);u.partTarget=t.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=u.partList;e||(e=u.partList=[]);const t=y>0?e[e.length-1]:void 0,n=y++,r=new Gt(s,u),i=new q(r,_,l,n,t);e.push(i),_.duration+=i.duration;break}case"PRELOAD-HINT":{const e=new Gt(s,u);u.preloadHint=e;break}case"RENDITION-REPORT":{const e=new Gt(s,u);u.renditionReports=u.renditionReports||[],u.renditionReports.push(e);break}default:C.warn(`line parsed but not handled: ${d}`)}}}w&&!w.relurl?(c.pop(),E-=w.duration,u.partList&&(u.fragmentHint=w)):u.partList&&(_n(_,w,h),_.cc=T,u.fragmentHint=_,p&&kn(_,p,u)),u.targetduration||(u.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const R=c.length,I=c[0],x=c[R-1];if(E+=u.skippedSegments*u.targetduration,E>0&&R&&x){u.averagetargetduration=E/R;const e=x.sn;u.endSN="initSegment"!==e?e:0,u.live||(x.endList=!0),I&&void 0===u.startCC&&(u.startCC=I.cc),A>0&&(function(e,t){let n=e[t];for(let r=t;r--;){const t=e[r];if(!t)return;t.programDateTime=n.programDateTime-1e3*t.duration,n=t}}(c,A),I&&h.unshift(I))}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(E+=u.fragmentHint.duration),u.totalduration=E,h.length&&u.dateRangeTagCount&&I&&yn(h,u),u.endCC=T,u}}function yn(e,t){const n=e.length;if(!n)return;const r=e[n-1],i=t.live?1/0:t.totalduration,s=Object.keys(t.dateRanges);for(let a=s.length;a--;){const o=t.dateRanges[s[a]],l=o.startDate.getTime();o.tagAnchor=r.ref;for(let r=n;r--;){const n=bn(t,l,e,r,i);if(-1!==n){o.tagAnchor=t.fragments[n].ref;break}}}}function bn(e,t,n,r,i){const s=n[r];if(s){const o=s.programDateTime;var a;if(t>=o||0===r)if(t<=o+1e3*(((null==(a=n[r+1])?void 0:a.start)||i)-s.start)){const i=n[r].sn-e.startSN,s=e.fragments;if(s.length>n.length)for(let a=(n[r+1]||s[s.length-1]).sn-e.startSN;a>i;a--){const e=s[a].programDateTime;if(t>=e&&t<e+1e3*s[a].duration)return a}return i}}return-1}function En(e,t,n){var r,i;const s=new Gt(e,n),a=null!=(r=s.METHOD)?r:"",o=s.URI,l=s.hexadecimalInteger("IV"),u=s.KEYFORMATVERSIONS,c=null!=(i=s.KEYFORMAT)?i:"identity";o&&s.IV&&!l&&C.error(`Invalid IV: ${s.IV}`);const h=o?vn.resolve(o,t):"",d=(u||"1").split("/").map(Number).filter(Number.isFinite);return new hn(a,h,c,d,l)}function Tn(e){const t=new Gt(e).decimalFloatingPoint("TIME-OFFSET");return r(t)?t:null}function Sn(e,t){let n=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const r=n.filter((t=>_e(t,e)));r.length&&(t[`${e}Codec`]=r.map((e=>e.split("/")[0])).join(","),n=n.filter((e=>-1===r.indexOf(e))))})),t.unknownCodecs=n}function wn(e,t,n){const r=t[n];r&&(e[n]=r)}function _n(e,t,n){e.rawProgramDateTime?n.push(e):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime)}function An(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function kn(e,t,n){e.levelkeys=t;const{encryptedFragments:r}=n;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||r.push(e)}function Ln(e,t,n){e.playlistParsingError=new Error(`#EXT-X-${t} must not appear more than once (${n[0]})`)}function Cn(e,t,n){e.playlistParsingError=new Error(`#EXT-X-${t} must appear before the first Media Segment (${n[0]})`)}function Rn(e,t){const n=t.startPTS;if(r(n)){let r,i=0;t.sn>e.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&r.setDuration(i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.setStart(e.start+(e.minEndPTS-e.start)):t.setStart(e.start+e.duration):t.setStart(Math.max(e.start-t.duration,0))}function In(e,t,n,i,s,a){i-n<=0&&(C.warn("Fragment should have a positive duration",t),i=n+t.duration,a=s+t.duration);let o=n,l=i;const u=t.startPTS,c=t.endPTS;if(r(u)){const e=Math.abs(u-n);r(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(n,u),n=Math.min(n,u),s=Math.min(s,t.startDTS),l=Math.min(i,c),i=Math.max(i,c),a=Math.max(a,t.endDTS)}const h=n-t.start;0!==t.start&&t.setStart(n),t.setDuration(i-t.start),t.startPTS=n,t.maxStartPTS=o,t.startDTS=s,t.endPTS=i,t.minEndPTS=l,t.endDTS=a;const d=t.sn;if(!e||d<e.startSN||d>e.endSN)return 0;let f;const p=d-e.startSN,g=e.fragments;for(g[p]=t,f=p;f>0;f--)Rn(g[f],g[f-1]);for(f=p;f<g.length-1;f++)Rn(g[f],g[f+1]);return e.fragmentHint&&Rn(g[g.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function xn(e,t,n,r,i){return new Error(`${e} ${i.url}\nPlaylist starting @${t.startSN}\n${t.m3u8}\n\nPlaylist starting @${n.startSN}\n${n.m3u8}`)}function Pn(e,t,n=!0){const r=t.startSN+t.skippedSegments-e.startSN,i=e.fragments,s=r>=0;let a=0;if(s&&r<i.length)a=i[r].start;else if(s&&t.startSN===e.endSN+1)a=e.fragmentEnd;else if(s&&n)a=e.fragmentStart+r*t.levelTargetDuration;else{if(t.skippedSegments||0!==t.fragmentStart)return;a=e.fragmentStart}Dn(t,a)}function Dn(e,t){if(t){const n=e.fragments;for(let r=e.skippedSegments;r<n.length;r++)n[r].addStart(t);e.fragmentHint&&e.fragmentHint.addStart(t)}}function On(e,t=1/0){let n=1e3*e.targetduration;if(e.updated){const r=e.fragments,i=4;if(r.length&&n*i>t){const e=1e3*r[r.length-1].duration;e<n&&(n=e)}}else n/=2;return Math.round(n)}function Mn(e,t,n){if(!e)return null;let r=e.fragments[t-e.startSN];return r||(r=e.fragmentHint,r&&r.sn===t?r:t<e.startSN&&n&&n.sn===t?n:null)}function Nn(e,t,n){return e?Fn(e.partList,t,n):null}function Fn(e,t,n){if(e)for(let r=e.length;r--;){const i=e[r];if(i.index===n&&i.fragment.sn===t)return i}return null}function Bn(e){e.forEach(((e,t)=>{var n;null==(n=e.details)||n.fragments.forEach((e=>{e.level=t,e.initSegment&&(e.initSegment.level=t)}))}))}function Un(e,t){for(let r=0,i=e.length;r<i;r++){var n;if((null==(n=e[r])?void 0:n.cc)===t)return e[r]}return null}function $n(e,t){if(e){const n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function Hn(e,t){const n=t.fragments;for(let t=0,r=n.length;t<r;t++)$n(n[t],e);t.fragmentHint&&$n(t.fragmentHint,e),t.alignedSliding=!0}function Gn(e,t){if(!function(e,t){return!!(e&&t.startCC<e.endCC&&t.endCC>e.startCC)}(t,e))return;const n=Math.min(t.endCC,e.endCC),r=Un(t.fragments,n),i=Un(e.fragments,n);r&&i&&(C.log(`Aligning playlist at start of dicontinuity sequence ${n}`),Hn(r.start-i.start,e))}function jn(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const n=e.fragments,r=t.fragments;if(!n.length||!r.length)return;let i,s;const a=Math.min(t.endCC,e.endCC);t.startCC<a&&e.startCC<a&&(i=Un(r,a),s=Un(n,a)),i&&s||(i=r[Math.floor(r.length/2)],s=Un(n,i.cc)||n[Math.floor(n.length/2)]);const o=i.programDateTime,l=s.programDateTime;o&&l&&Hn((l-o)/1e3-(s.start-i.start),e)}const Vn="STOPPED",zn="IDLE",Kn="KEY_LOADING",Wn="FRAG_LOADING",Yn="FRAG_LOADING_WAITING_RETRY",qn="WAITING_TRACK",Xn="PARSING",Qn="PARSED",Zn="ENDED",Jn="ERROR",er="WAITING_INIT_PTS",tr="WAITING_LEVEL";class nr extends xt{constructor(e,t,n,i,s){super(i,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Vn,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:e,fragCurrent:t,media:n,mediaBuffer:i,state:s}=this,a=n?n.currentTime:0,o=Ot.bufferInfo(i||n,a,e.maxBufferHole);if(this.log(`media seeking to ${r(a)?a.toFixed(3):a}, state: ${s}`),this.state===Zn)this.resetLoadingState();else if(t){const n=e.maxFragLookUpTolerance,r=t.start-n,i=t.start+t.duration+n;if(!o.len||i<o.start||r>o.end){const e=a>i;(a<r||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(n&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),a>this.lastCurrentTime&&(this.lastCurrentTime=a),!this.loadingParts)){const e=Math.max(o.end,a),t=this.shouldLoadParts(this.getLevelDetails(),e);t&&(this.log(`LL-Part loading ON after seeking to ${a.toFixed(2)} with buffer @${e.toFixed(2)}`),this.loadingParts=t)}this.hls.hasEnoughToStart||o.len||(this.log(`setting startPosition to ${a} because of seek before start`),this.nextLoadPosition=this.startPosition=a),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new Lt(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new At(e.config)}registerListeners(){const{hls:e}=this;e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(l.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Vn)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Vn}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return-1===t&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=Ot.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge)return!1;if(this.media.currentTime<e.start)return!1;const a=t.partList;if(null!=a&&a.length){const e=a[a.length-1];return Ot.isBuffered(this.media,e.start+e.duration/2)}const o=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(o)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}get timelineOffset(){const e=this.config.timelineOffset;var t;return e?(null==(t=this.getLevelDetails())?void 0:t.appliedTimelineOffset)||e:0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Vn&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(null!==r){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n)return this.resetLoadingState(),void this.resetTransmuxer();this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Vn,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){this._doFragLoad(e,t,n,(e=>{const t=e.frag;if(this.fragContextChanged(t))return this.warn(`${t.type} sn: ${t.sn}${e.part?" part: "+e.part.index:""} of ${this.fragInfo(t,!1,e.part)}) was dropped during download.`),void this.fragmentTracker.removeFragment(t);t.stats.chunkCount++,this._handleFragmentLoadProgress(e)})).then((e=>{if(!e)return;const t=this.state,n=e.frag;this.fragContextChanged(n)?(t===Wn||!this.fragCurrent&&t===Xn)&&(this.fragmentTracker.removeFragment(n),this.state=zn):("payload"in e&&(this.log(`Loaded ${n.type} sn: ${n.sn} of ${this.playlistLabel()} ${n.level}`),this.hls.trigger(l.FRAG_LOADED,e)),this._handleFragmentLoadComplete(e))})).catch((t=>{this.state!==Vn&&this.state!==Jn&&(this.warn(`Frag error: ${(null==t?void 0:t.message)||t}`),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===gt){const t=e.type,r=this.getFwdBufferInfo(this.mediaBuffer,t),i=Math.max(e.duration,r?r.len:this.config.maxBufferLength),s=this.backtrackFragment;(1===(s?e.sn-s.sn:0)||this.reduceMaxBufferLength(i,e.duration))&&n.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===mt&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(null==t?void 0:t.live)&&"EVENT"!==t.type&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(l.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((e=>{const t=null==e?void 0:e.frag;if(!t||this.fragContextChanged(t)||!this.levels)throw new Error("init load aborted");return e})).then((e=>{const{hls:t}=this,{frag:n,payload:r}=e,i=n.decryptdata;if(r&&r.byteLength>0&&null!=i&&i.key&&i.iv&&Kt(i.method)){const s=self.performance.now();return this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer,Wt(i.method)).catch((e=>{throw t.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:n}),e})).then((r=>{const i=self.performance.now();return t.trigger(l.FRAG_DECRYPTED,{frag:n,payload:r,stats:{tstart:s,tdecrypt:i}}),e.payload=r,this.completeInitSegmentLoad(e)}))}return this.completeInitSegmentLoad(e)})).catch((t=>{this.state!==Vn&&this.state!==Jn&&(this.warn(t),this.resetFragmentLoading(e))}))}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Vn&&(this.state=zn),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?function(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=`[${e.start(r).toFixed(3)}-${e.end(r).toFixed(3)}]`;return t}(Ot.getBuffered(n)):"(detached)"})`),W(e)){var r;if(e.type!==g){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=zn)}const t=null==(r=this.levels)?void 0:r[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=zn}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||0===i.length||i.some((e=>!e)),a=new Pt(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,i){var s;this.fragCurrent=e;const a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;!e.encrypted||null!=(s=e.decryptdata)&&s.key?e.encrypted||(o=this.keyLoader.loadClear(e,a.encryptedFragments),o&&this.log("[eme] blocking frag load until media-keys acquired")):(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Kn,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(l.KEY_LOADED,e),this.state===Kn&&(this.state=zn),e})),this.hls.trigger(l.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING"))));const u=this.fragPrevious;if(W(e)&&(!u||e.sn!==u.sn)){const n=this.shouldLoadParts(t.details,e.end);n!==this.loadingParts&&(this.log(`LL-Part loading ${n?"ON":"OFF"} loading sn ${null==u?void 0:u.sn}->${e.sn}`),this.loadingParts=n)}if(n=Math.max(e.start,n||0),this.loadingParts&&W(e)){const r=a.partList;if(r&&i){n>e.end&&a.fragmentHint&&(e=a.fragmentHint);const s=this.getNextPart(r,e,n);if(s>-1){const u=r[s];let c;return e=this.fragCurrent=u.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${u.index} (${s}/${r.length-1}) of ${this.fragInfo(e,!1,u)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=u.start+u.duration,this.state=Wn,c=o?o.then((n=>!n||this.fragContextChanged(n.frag)?null:this.doFragPartsLoad(e,u,t,i))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,u,t,i).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(l.FRAG_LOADING,{frag:e,part:u,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!e.url||this.loadedEndOfParts(r,n))return Promise.resolve(null)}}if(W(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${a?"["+a.startSN+"-"+a.endSN+"]":""}, target: ${parseFloat(n.toFixed(3))}`),r(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Wn;const c=this.config.progressive;let h;return h=c&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,i))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,c?i:void 0),o]).then((([e])=>(!c&&e&&i&&i(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(l.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h}doFragPartsLoad(e,t,n,r){return new Promise(((i,s)=>{var a;const o=[],u=null==(a=n.details)?void 0:a.partList,c=t=>{this.fragmentLoader.loadPart(e,t,r).then((r=>{o[t.index]=r;const s=r.part;this.hls.trigger(l.FRAG_LOADED,r);const a=Nn(n.details,e.sn,t.index+1)||Fn(u,e.sn,t.index+1);if(!a)return i({frag:e,part:s,partsLoaded:o});c(a)})).catch(s)};c(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===o.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.ERROR,t)}else this.hls.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Xn)return void(this.fragCurrent||this.state===Vn||this.state===Jn||(this.state=zn));const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const a=this.getLevelDetails(),o=a&&n.sn>a.endSN||this.shouldLoadParts(a,n.end);o!==this.loadingParts&&(this.log(`LL-Part loading ${o?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=o),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(null!=e&&e.partList){var n;const i=e.partList[0];var r;if(t>=i.end+((null==(n=e.fragmentHint)?void 0:n.duration)||0))if((this.hls.hasEnoughToStart?(null==(r=this.media)?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(null==t||!t[r])return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const a=t[r],o=a.details,l=s>-1?Nn(o,i,s):null,u=l?l.fragment:Mn(o,i,n);return u?(n&&n!==u&&(u.stats=n.stats),{frag:u,part:l,level:a}):null}bufferFragmentData(e,t,n,r,i){var s;if(!e||this.state!==Xn)return;const{data1:a,data2:o}=e;let u=a;if(a&&o&&(u=ge(a,o)),null==(s=u)||!s.length)return;const c={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:u};if(this.hls.trigger(l.BUFFER_APPENDING,c),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Ot.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const n=t.currentTime,r=Ot.bufferInfo(t,n,0),i=e.duration,s=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),a=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-a>s&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){var n;const i=this.getLoadPosition();if(!r(i))return null;const s=this.lastCurrentTime>i||null!=(n=this.media)&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,i,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=Ot.bufferInfo(e,t,r);if(0===i.len&&void 0!==i.nextStart){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const n=Math.max(Math.min(i.nextStart,s.end)-t,r);return Ot.bufferInfo(e,t,n)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return n=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-3*t,n.maxMaxBufferLength/2,r);return i>=r&&(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0)}getAppendedFrag(e,t=f){var n;const r=null==(n=this.fragmentTracker)?void 0:n.getAppendedFrag(e,t);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,a=i.lowLatencyMode&&!!t.partList;let o=null;if(t.live){const n=i.initialLiveManifestSize;if(r<n)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${n})`),null;if(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<s){var l;a&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),o=this.getInitialLiveFragment(t);const n=this.hls.startPosition,r=this.hls.liveSyncPosition,i=o?(-1!==n&&n>=s?n:r)||o.start:e;this.log(`Setting startPosition to ${i} to match start frag at live edge. mainStart: ${n} liveSyncPosition: ${r} frag.start: ${null==(l=o)?void 0:l.start}`),this.startPosition=this.nextLoadPosition=i}}else e<=s&&(o=n[0]);if(!o){const n=this.loadingParts?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,n,t)}let u=this.filterReplacedPrimary(o,t);if(!u&&o){const e=o.sn-t.startSN;u=this.filterReplacedPrimary(n[e+1]||null,t)}return this.mapToInitFragWhenRequired(u)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===vt||n===mt&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const e=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(null!==e&&n.len+e.len>=i){const e=s.sn;return this.loopSn!==e&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${e}`),this.loopSn=e),null}}return this.loopSn=void 0,s}get primaryPrefetch(){var e,t;if(rr(this.hls.config)&&(null==(e=this.hls.interstitialsManager)||null==(t=e.playingItem)?void 0:t.event))return!0;return!1}filterReplacedPrimary(e,t){if(!e)return e;if(rr(this.hls.config)&&e.type!==g){const n=this.hls.interstitialsManager,r=null==n?void 0:n.bufferingItem;if(r){const n=r.event;if(n){if(n.appendInPlace||Math.abs(e.start-r.start)>1||0===r.start)return null}else{if(e.end<=r.start&&!1===(null==t?void 0:t.live))return null;if(e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}}const i=null==n?void 0:n.playerQueue;if(i)for(let t=i.length;t--;){const n=i[t].interstitial;if(n.appendInPlace&&e.start>=n.startTime&&e.end<=n.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let a=0,o=e.length;a<o;a++){const o=e[a];if(s=s&&!o.independent,r>-1&&n<o.start)break;const l=o.loaded;l?r=-1:(i||o.independent||s)&&o.fragment===t&&(r=a),i=l}return r}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let i=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),i=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!r(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;for(let r=0;r<e.length;++r){const i=e[r];if(at(t,n,i))return i}return null}(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const r=n.sn+1;if(r>=e.startSN&&r<=e.endSN){const s=t[r-e.startSN];n.cc===s.cc&&(i=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=ot(e,n.cc,n.end),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(i=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:a}=n;const{fragmentHint:o}=n,{maxFragLookUpTolerance:l}=r,u=n.partList,c=!!(this.loadingParts&&null!=u&&u.length&&o);let h;var d;(c&&o&&!this.bitrateTest&&u[u.length-1].fragment.sn===o.sn&&(s=s.concat(o),a=o.sn),e<t)?h=it(i,s,e,e<this.lastCurrentTime||e>t-l||null!=(d=this.media)&&d.paused||!this.startFragRequested?0:l):h=s[s.length-1];if(h){const e=h.sn-n.startSN,t=this.fragmentTracker.getState(h);if((t===vt||t===mt&&h.gap)&&(i=h),i&&h.sn===i.sn&&(!c||u[0].fragment.sn>h.sn||!n.live&&!c)&&i&&h.level===i.level){const t=s[e+1];h=h.sn<a&&this.fragmentTracker.getState(t)!==vt?t:null}}return h}alignPlaylists(e,t,n){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,a=!t,o=e.alignedSliding&&r(s);if(a||!o&&!s){!function(e,t){e&&(Gn(t,e),!t.alignedSliding&&e&&jn(t,e),t.alignedSliding||!e||t.skippedSegments||Pn(e,t,!1))}(n,e);const r=e.fragmentStart;return this.log(`Live playlist sliding: ${r.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${i}`),r}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const i=this.timelineOffset;if(-1===n){const s=null!==this.startTimeOffset,a=s?this.startTimeOffset:e.startTimeOffset;null!==a&&r(a)?(n=t+a,a<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+i}this.nextLoadPosition=n+i}getLoadPosition(){var e;const{media:t}=this;let n=0;return null!=(e=this.hls)&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&W(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Yn)||(this.state=zn)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;var r;if(this.fragContextChanged(n))return void this.warn(`Frag load error must match current frag to retry ${n.url} > ${null==(r=this.fragCurrent)?void 0:r.url}`);const i=t.details===o.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(n,!0);const s=t.errorAction,{action:a,flags:l,retryCount:u=0,retryConfig:c}=s||{},h=!!s&&!!c,d=h&&5===a,f=h&&!s.resolved&&1===l;if(!d&&f&&W(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),s.resolved=!0;else if((d||f)&&u<c.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const r=ct(c,u);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${u+1}/${c.maxNumRetry} in ${r}ms`),s.resolved=!0,this.retryDate=self.performance.now()+r,this.state=Yn}else if(c&&s){if(this.resetFragmentErrors(e),!(u<c.maxNumRetry))return void this.warn(`${t.details} reached or exceeded max retry (${u})`);i||3===a||(s.resolved=!0)}else this.state=2===a?tr:Jn;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Xn||this.state===Qn){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(null==t?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===p&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Vn&&(this.state=zn)}afterBufferFlushed(e,t,n){if(!e)return;const r=Ot.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Zn&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Vn&&(this.state=zn)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(i){var s;if(!Object.keys(e.elementaryStreams).reduce(((t,s)=>{const a=e.elementaryStreams[s];if(a){const o=a.endPTS-a.startPTS;if(o<=0)return this.warn(`Could not parse fragment ${e.sn} ${s} duration reliably (${o})`),t||!1;const u=r?0:In(i,e,a.startPTS,a.endPTS,a.startDTS,a.endDTS);return this.hls.trigger(l.LEVEL_PTS_UPDATED,{details:i,level:n,drift:u,type:s,frag:e,start:a.startPTS,end:a.endPTS}),!0}return t}),!1)&&(0===n.fragmentError&&this.treatAsGap(e,n),null===(null==(s=this.transmuxer)?void 0:s.error))){const t=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(t.message),this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Qn,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(l.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")}playlistLabel(){return this.playlistType===f?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${(null!=(r=t&&!n?e.startPTS:(n||e).start)?r:NaN).toFixed(3)}-${(null!=(i=t&&!n?e.endPTS:(n||e).end)?i:NaN).toFixed(3)}]${n&&"main"===e.type?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;null==(e=this.transmuxer)||e.reset()}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function rr(e){return!!e.interstitialsController&&!1!==e.enableInterstitialPlayback}class ir{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;return e.length?(n=1===e.length?e[0]:function(e,t){const n=new Uint8Array(t);let r=0;for(let t=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}(e,t),this.reset(),n):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}var sr,ar={exports:{}},or=(sr||(sr=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new i(r,s||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,a=new Array(s);i<s;i++)a[i]=r[i].fn;return a},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,s,a){var o=n?n+e:e;if(!this._events[o])return!1;var l,u,c=this._events[o],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,s),!0;case 6:return c.fn.call(c.context,t,r,i,s,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},o.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||a(this,s);else{for(var l=0,u=[],c=o.length;l<c;l++)(o[l].fn!==t||i&&!o[l].once||r&&o[l].context!==r)&&u.push(o[l]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o}(ar)),ar.exports),lr=D(or);const ur="1.6.5",cr={};function hr(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function dr(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function fr(e,t){let n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3],n}function pr(e,t){const n=t;let r=0;for(;dr(e,t);)r+=10,r+=fr(e,t+6),hr(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)}function gr(e,t){return 255===e[t]&&240==(246&e[t+1])}function mr(e,t){return 1&e[t+1]?7:9}function vr(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function yr(e,t){return t+1<e.length&&gr(e,t)}function br(e,t){if(yr(e,t)){const n=mr(e,t);if(t+n>=e.length)return!1;const r=vr(e,t);if(r<=n)return!1;const i=t+r;return i===e.length||yr(e,i)}return!1}function Er(e,t,n,r,i){if(!e.samplerate){const s=function(e,t,n,r){const i=t[n+2],s=i>>2&15;if(s>12){const t=new Error(`invalid ADTS sampling index:${s}`);return void e.emit(l.ERROR,l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}const u=1+(i>>6&3),c=t[n+3]>>6&3|(1&i)<<2,h="mp4a.40."+u,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][s];let f=s;5!==u&&29!==u||(f-=3);const p=[u<<3|(14&f)>>1,(1&f)<<7|c<<3];return C.log(`manifest codec:${r}, parsed codec:${h}, channels:${c}, rate:${d} (ADTS object type:${u} sampling index:${s})`),{config:p,samplerate:d,channelCount:c,codec:h,parsedCodec:h,manifestCodec:r}}(t,n,r,i);if(!s)return;b(e,s)}}function Tr(e){return 9216e4/e}function Sr(e,t,n,r,i){const s=r+i*Tr(e.samplerate),a=function(e,t){const n=mr(e,t);if(t+n<=e.length){const r=vr(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}(t,n);let o;if(a){const{frameLength:r,headerLength:i}=a,l=i+r,u=Math.max(0,n+l-t.length);u?(o=new Uint8Array(l-i),o.set(t.subarray(n+i,t.length),0)):o=t.subarray(n+i,n+l);const c={unit:o,pts:s};return u||e.samples.push(c),{sample:c,length:l,missing:u}}const l=t.length-n;return o=new Uint8Array(l),o.set(t.subarray(n,t.length),0),{sample:{unit:o,pts:s},length:l,missing:-1}}function wr(e,t){return dr(e,t)&&fr(e,t+6)+10<=e.length-t}function _r(e,t=0,n=1/0){return function(e,t,n,r){const i=(s=e)instanceof ArrayBuffer?s:s.buffer;var s;let a=1;"BYTES_PER_ELEMENT"in r&&(a=r.BYTES_PER_ELEMENT);const o=(h=e)&&h.buffer instanceof ArrayBuffer&&void 0!==h.byteLength&&void 0!==h.byteOffset?e.byteOffset:0,l=(o+e.byteLength)/a,u=(o+t)/a,c=Math.floor(Math.max(0,Math.min(u,l)));var h;return new r(i,c,Math.floor(Math.min(c+Math.max(n,0),l))-c)}(e,t,n,Uint8Array)}function Ar(e){return"PRIV"===e.type?function(e){if(e.size<2)return;const t=x(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;let t=1;const n=x(e.data.subarray(t),!0);t+=n.length+1;const r=x(e.data.subarray(t));return{key:e.type,info:n,data:r}}const t=x(e.data);return{key:e.type,info:"",data:t}}(e):"APIC"===e.type?function(e){const t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.size<2)return;if(3!==e.data[0])return void console.log("Ignore frame with unrecognized character encoding");const n=e.data.subarray(1).indexOf(0);if(-1===n)return;const r=x(_r(e.data,1,n)),i=e.data[2+n],s=e.data.subarray(3+n).indexOf(0);if(-1===s)return;const a=x(_r(e.data,3+n,s));let o;return o="--\x3e"===r?x(_r(e.data,4+n+s)):(l=e.data.subarray(4+n+s))instanceof ArrayBuffer?l:0==l.byteOffset&&l.byteLength==l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer,t.mimeType=r,t.pictureType=i,t.description=a,t.data=o,t;var l}(e):function(e){if(e.size<2)return;if("TXXX"===e.type){let t=1;const n=x(e.data.subarray(t),!0);t+=n.length+1;const r=x(e.data.subarray(t));return{key:e.type,info:n,data:r}}const t=x(e.data.subarray(1));return{key:e.type,info:"",data:t}}(e)}function kr(e){const t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=fr(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}}function Lr(e){let t=0;const n=[];for(;dr(e,t);){const r=fr(e,t+6);e[t+5]>>6&1&&(t+=10),t+=10;const i=t+r;for(;t+10<i;){const r=kr(e.subarray(t)),i=Ar(r);i&&n.push(i),t+=r.size+10}hr(e,t)&&(t+=10)}return n}function Cr(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info}function Rr(e){if(8===e.data.byteLength){const t=new Uint8Array(e.data),n=1&t[3];let r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}}function Ir(e){const t=Lr(e);for(let e=0;e<t.length;e++){const n=t[e];if(Cr(n))return Rr(n)}}let xr=function(e){return e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3",e.misbklv="urn:misb:KLV:bin:1910.1",e}({});function Pr(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class Dr{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=ge(this.cachedData,e),this.cachedData=null);let n,i=pr(e,0),s=i?i.length:0;const a=this._audioTrack,o=this._id3Track,l=i?Ir(i):void 0,u=e.length;for((null===this.basePTS||0===this.frameIndex&&r(l))&&(this.basePTS=Or(l,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),i&&i.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:xr.audioId3,duration:Number.POSITIVE_INFINITY});s<u;){if(this.canParse(e,s)){const t=this.appendFrame(a,e,s);t?(this.frameIndex++,this.lastPTS=t.sample.pts,s+=t.length,n=s):s=u}else wr(e,s)?(i=pr(e,s),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:xr.audioId3,duration:Number.POSITIVE_INFINITY}),s+=i.length,n=s):s++;if(s===u&&n!==u){const t=e.slice(n);this.cachedData?this.cachedData=ge(this.cachedData,t):this.cachedData=t}}return{audioTrack:a,videoTrack:Pr(),id3Track:o,textTrack:Pr()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Pr(),id3Track:this._id3Track,textTrack:Pr()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Or=(e,t,n)=>r(e)?90*e:9e4*t+(n?9e4*n.baseTime/n.timescale:0);let Mr=null;const Nr=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Fr=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Br=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ur=[0,1,1,4];function $r(e,t,n,r,i){if(n+24>t.length)return;const s=Hr(t,n);if(s&&n+s.frameLength<=t.length){const a=r+i*(9e4*s.samplesPerFrame/s.sampleRate),o={unit:t.subarray(n,n+s.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=s.channelCount,e.samplerate=s.sampleRate,e.samples.push(o),{sample:o,length:s.frameLength,missing:0}}}function Hr(e,t){const n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,s=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==s){const a=e[t+2]>>1&1,o=e[t+3]>>6,l=1e3*Nr[14*(3===n?3-r:3===r?3:4)+i-1],u=Fr[3*(3===n?0:2===n?1:2)+s],c=3===o?1:2,h=Br[n][r],d=Ur[r],f=8*h*d,p=Math.floor(h*l/u+a)*d;if(null===Mr){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Mr=e?parseInt(e[1]):0}return!!Mr&&Mr<=87&&2===r&&l>=224e3&&0===o&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:p,samplesPerFrame:f}}}function Gr(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function jr(e,t){return t+1<e.length&&Gr(e,t)}function Vr(e,t){if(t+1<e.length&&Gr(e,t)){const n=4,r=Hr(e,t);let i=n;null!=r&&r.frameLength&&(i=r.frameLength);const s=t+i;return s===e.length||jr(e,s)}return!1}const zr=(e,t)=>{let n=0,r=5;t+=r;const i=new Uint32Array(1),s=new Uint32Array(1),a=new Uint8Array(1);for(;r>0;){a[0]=e[t];const o=Math.min(r,8),l=8-o;s[0]=4278190080>>>24+l<<l,i[0]=(a[0]&s[0])>>l,n=n?n<<o|i[0]:i[0],t+=1,r-=o}return n};function Kr(e,t,n,r,i){if(n+8>t.length)return-1;if(11!==t[n]||119!==t[n+1])return-1;const s=t[n+4]>>6;if(s>=3)return-1;const a=[48e3,44100,32e3][s],o=63&t[n+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*o+s];if(n+l>t.length)return-1;const u=t[n+6]>>5;let c=0;2===u?c+=2:(1&u&&1!==u&&(c+=2),4&u&&(c+=2));const h=(t[n+6]<<8|t[n+7])>>12-c&1,d=[2,1,2,3,3,4,4,5][u]+h,f=t[n+5]>>3,p=7&t[n+5],g=new Uint8Array([s<<6|f<<1|p>>2,(3&p)<<6|u<<3|h<<2|o>>4,o<<4&224]),m=r+i*(1536/a*9e4),v=t.subarray(n,n+l);return e.config=g,e.channelCount=d,e.samplerate=a,e.samples.push({unit:v,pts:m}),l}const Wr=/\/emsg[-/]ID3/i;function Yr(e,t){return r(e.presentationTime)?e.presentationTime/e.timeScale:t+e.presentationTimeDelta/e.timeScale}class qr{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new At(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,0)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then((i=>{const s=new Uint8Array(i);r.set(s,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}))}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t);let r=0;for(let t=32;t<e.length-16;t+=160,r+=16)n.set(e.subarray(t,t+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let t=32;t<e.length-16;t+=160,r+=16)e.set(n.subarray(r,r+16),t);return e}decryptAvcSample(e,t,n,r,i){const s=Ee(i.data),a=this.getAvcEncryptedData(s);this.decryptBuffer(a.buffer).then((a=>{i.data=this.getAvcDecryptedUnit(s,a),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}))}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||1!==s.type&&5!==s.type||(this.decryptAvcSample(e,t,n,r,s),this.decrypter.isSync())))return}}}}class Xr{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n,r=this.VideoSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!=(t=r)&&t.units){const e=r.units;n=e[e.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const n=t.samples,r=n.length;if(!r)return void t.dropped++;{const t=n[r-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,a=[];let o,l,u,c=0,h=-1,d=0;for(-1===i&&(h=0,d=this.getNALuType(t,0),i=0,c=1);c<r;)if(o=t[c++],i)if(1!==i)if(o)if(1===o){if(l=c-i-1,h>=0){const e={data:t.subarray(h,l),type:d};a.push(e)}else{const n=this.getLastNalUnit(e.samples);n&&(s&&c<=4-s&&n.state&&(n.data=n.data.subarray(0,n.data.byteLength-s)),l>0&&(n.data=ge(n.data,t.subarray(0,l)),n.state=0))}c<r?(u=this.getNALuType(t,c),h=c,d=u,i=0):i=-1}else i=0;else i=3;else i=o?0:2;else i=o?0:1;if(h>=0&&i>=0){const e={data:t.subarray(h,r),type:d,state:i};a.push(e)}if(0===a.length){const n=this.getLastNalUnit(e.samples);n&&(n.data=ge(n.data,t))}return e.naluState=i,a}}class Qr{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&C.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class Zr extends Xr{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s,a=this.VideoSample,o=!1;n.data=null,a&&i.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach((r=>{var i,l;switch(r.type){case 1:{let t=!1;s=!0;const i=r.data;if(o&&i.length>4){const e=this.readSliceType(i);2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var u;t&&null!=(u=a)&&u.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.frame=!0,a.key=t;break}case 5:s=!0,null!=(i=a)&&i.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 6:s=!0,be(r.data,1,n.pts,t.samples);break;case 7:{var c,h;s=!0,o=!0;const t=r.data,n=this.readSPS(t);if(!e.sps||e.width!==n.width||e.height!==n.height||(null==(c=e.pixelRatio)?void 0:c[0])!==n.pixelRatio[0]||(null==(h=e.pixelRatio)?void 0:h[1])!==n.pixelRatio[1]){e.width=n.width,e.height=n.height,e.pixelRatio=n.pixelRatio,e.sps=[t];const r=t.subarray(1,4);let i="avc1.";for(let e=0;e<3;e++){let t=r[e].toString(16);t.length<2&&(t="0"+t),i+=t}e.codec=i}break}case 8:s=!0,e.pps=[r.data];break;case 9:s=!0,e.audFound=!0,null!=(l=a)&&l.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:s=!0;break;default:s=!1}a&&s&&a.units.push(r)})),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return 31&e[t]}readSliceType(e){const t=new Qr(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n,r=8,i=8;for(let s=0;s<e;s++)0!==i&&(n=t.readEG(),i=(r+n+256)%256),r=0===i?r:i}readSPS(e){const t=new Qr(e);let n,r,i,s=0,a=0,o=0,l=0;const u=t.readUByte.bind(t),c=t.readBits.bind(t),h=t.readUEG.bind(t),d=t.readBoolean.bind(t),f=t.skipBits.bind(t),p=t.skipEG.bind(t),g=t.skipUEG.bind(t),m=this.skipScalingList.bind(this);u();const v=u();if(c(5),f(3),u(),g(),100===v||110===v||122===v||244===v||44===v||83===v||86===v||118===v||128===v){const e=h();if(3===e&&f(1),g(),g(),f(1),d())for(r=3!==e?8:12,i=0;i<r;i++)d()&&m(i<6?16:64,t)}g();const y=h();if(0===y)h();else if(1===y)for(f(1),p(),p(),n=h(),i=0;i<n;i++)p();g(),f(1);const b=h(),E=h(),T=c(1);0===T&&f(1),f(1),d()&&(s=h(),a=h(),o=h(),l=h());let S=[1,1];if(d()&&d())switch(u()){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:S=[u()<<8|u(),u()<<8|u()]}return{width:Math.ceil(16*(b+1)-2*s-2*a),height:(2-T)*(E+1)*16-(T?2:4)*(o+l),pixelRatio:S}}}class Jr extends Xr{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s,a=this.VideoSample,o=!1;n.data=null,a&&i.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach((r=>{var i,l;switch(r.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),a.frame=!0,s=!0;break;case 16:case 17:case 18:case 21:var u;s=!0,o&&null!=(u=a)&&u.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:s=!0,null!=(i=a)&&i.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 39:s=!0,be(r.data,2,n.pts,t.samples);break;case 32:s=!0,e.vps||("object"!=typeof e.params&&(e.params={}),e.params=b(e.params,this.readVPS(r.data)),this.initVPS=r.data),e.vps=[r.data];break;case 33:if(s=!0,o=!0,void 0===e.vps||e.vps[0]===this.initVPS||void 0===e.sps||this.matchSPS(e.sps[0],r.data)||(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const t=this.readSPS(r.data);e.width=t.width,e.height=t.height,e.pixelRatio=t.pixelRatio,e.codec=t.codecString,e.sps=[],"object"!=typeof e.params&&(e.params={});for(const n in t.params)e.params[n]=t.params[n]}this.pushParameterSet(e.sps,r.data,e.vps),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0;break;case 34:if(s=!0,"object"==typeof e.params){if(!e.pps){e.pps=[];const t=this.readPPS(r.data);for(const n in t)e.params[n]=t[n]}this.pushParameterSet(e.pps,r.data,e.vps)}break;case 35:s=!0,e.audFound=!0,null!=(l=a)&&l.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:s=!1}a&&s&&a.units.push(r)})),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(126&e[t])>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&3===e[r]&&0===e[r-1]&&0===e[r-2]||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Qr(e);return t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6),{numTemporalLayers:t.readBits(3)+1,temporalIdNested:t.readBoolean()}}readSPS(e){const t=new Qr(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),a=t.readUByte(),o=t.readUByte(),l=t.readUByte(),u=t.readUByte(),c=t.readUByte(),h=t.readUByte(),d=t.readUByte(),f=t.readUByte(),p=t.readUByte(),g=t.readUByte(),m=t.readUByte(),v=[],y=[];for(let e=0;e<n;e++)v.push(t.readBoolean()),y.push(t.readBoolean());if(n>0)for(let e=n;e<8;e++)t.readBits(2);for(let e=0;e<n;e++)v[e]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),y[e]&&t.readUByte();t.readUEG();const b=t.readUEG();3==b&&t.skipBits(1);const E=t.readUEG(),T=t.readUEG(),S=t.readBoolean();let w=0,_=0,A=0,k=0;S&&(w+=t.readUEG(),_+=t.readUEG(),A+=t.readUEG(),k+=t.readUEG());const L=t.readUEG(),C=t.readUEG(),R=t.readUEG();for(let e=t.readBoolean()?0:n;e<=n;e++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let e=0;e<4;e++)for(let n=0;n<(3===e?2:6);n++)if(t.readBoolean()){const n=Math.min(64,1<<4+(e<<1));e>1&&t.readEG();for(let e=0;e<n;e++)t.readEG()}else t.readUEG();t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const I=t.readUEG();let x=0;for(let e=0;e<I;e++){let n=!1;if(0!==e&&(n=t.readBoolean()),n){e===I&&t.readUEG(),t.readBoolean(),t.readUEG();let n=0;for(let e=0;e<=x;e++){const e=t.readBoolean();let r=!1;e||(r=t.readBoolean()),(e||r)&&n++}x=n}else{const e=t.readUEG(),n=t.readUEG();x=e+n;for(let n=0;n<e;n++)t.readUEG(),t.readBoolean();for(let e=0;e<n;e++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const e=t.readUEG();for(let n=0;n<e;n++){for(let e=0;e<R+4;e++)t.readBits(1);t.readBits(1)}}let P=0,D=1,O=1,M=!0,N=1,F=0;t.readBoolean(),t.readBoolean();let B=!1;if(t.readBoolean()){if(t.readBoolean()){const e=t.readUByte();e>0&&e<16?(D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][e-1],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][e-1]):255===e&&(D=t.readBits(16),O=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),B=t.readBoolean(),B&&(w+=t.readUEG(),_+=t.readUEG(),A+=t.readUEG(),k+=t.readUEG()),t.readBoolean()&&(N=t.readBits(32),F=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const e=t.readBoolean(),r=t.readBoolean();let i=!1;(e||r)&&(i=t.readBoolean(),i&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),i&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let s=0;s<=n;s++){M=t.readBoolean();let n=!1;M||t.readBoolean()?t.readEG():n=t.readBoolean();const s=n?1:t.readUEG()+1;if(e)for(let e=0;e<s;e++)t.readUEG(),t.readUEG(),i&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(r)for(let e=0;e<s;e++)t.readUEG(),t.readUEG(),i&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),P=t.readUEG())}let U=E,$=T;if(S||B){let e=1,t=1;1===b?e=t=2:2==b&&(e=2),U=E-e*_-e*w,$=T-t*k-t*A}const H=r?["A","B","C"][r]:"",G=a<<24|o<<16|l<<8|u;let j=0;for(let e=0;e<32;e++)j=(j|(G>>e&1)<<31-e)>>>0;let V=j.toString(16);return 1===s&&"2"===V&&(V="6"),{codecString:`hvc1.${H}${s}.${V}.${i?"H":"L"}${m}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[a,o,l,u],general_constraint_indicator_flags:[c,h,d,f,p,g],general_level_idc:m,bit_depth:L+8,bit_depth_luma_minus8:L,bit_depth_chroma_minus8:C,min_spatial_segmentation_idc:P,chroma_format_idc:b,frame_rate:{fixed:M,fps:F/N}},width:U,height:$,pixelRatio:[D,O]}}readPPS(e){const t=new Qr(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const n=t.readBoolean(),r=t.readBoolean();let i=1;return r&&n?i=0:r?i=3:n&&(i=2),{parallelismType:i}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const ei=188;class ti{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=ti.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),-1!==n}static syncOffset(e){const t=e.length;let n=Math.min(940,t-ei)+1,r=0;for(;r<n;){let i=!1,s=-1,a=0;for(let o=r;o<t;o+=ei){if(71!==e[o]||t-o!==ei&&71!==e[o+ei]){if(a)return-1;break}if(a++,-1===s&&(s=o,0!==s&&(n=Math.min(s+18612,e.length-ei)+1)),i||(i=0===ni(e,o)),i&&a>1&&(0===s&&a>2||o+ei>n))return s}r++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:J[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=ti.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=ti.createTrack("audio",r),this._id3Track=ti.createTrack("id3"),this._txtTrack=ti.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){let i;n||(this.sampleAes=null);const s=this._videoTrack,a=this._audioTrack,o=this._id3Track,l=this._txtTrack;let u=s.pid,c=s.pesData,h=a.pid,d=o.pid,f=a.pesData,p=o.pesData,g=null,m=this.pmtParsed,v=this._pmtId,y=e.length;if(this.remainderData&&(y=(e=ge(this.remainderData,e)).length,this.remainderData=null),y<ei&&!r)return this.remainderData=e,{audioTrack:a,videoTrack:s,id3Track:o,textTrack:l};const b=Math.max(0,ti.syncOffset(e));y-=(y-b)%ei,y<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,y,e.buffer.byteLength-y));let E=0;for(let t=b;t<y;t+=ei)if(71===e[t]){const r=!!(64&e[t+1]),y=ni(e,t);let E;if((48&e[t+3])>>4>1){if(E=t+5+e[t+4],E===t+ei)continue}else E=t+4;switch(y){case u:if(r){if(c&&(i=oi(c,this.logger))){if(null===this.videoParser)switch(s.segmentCodec){case"avc":this.videoParser=new Zr;break;case"hevc":this.videoParser=new Jr}null!==this.videoParser&&this.videoParser.parsePES(s,l,i,!1)}c={data:[],size:0}}c&&(c.data.push(e.subarray(E,t+ei)),c.size+=t+ei-E);break;case h:if(r){if(f&&(i=oi(f,this.logger)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,i);break;case"mp3":this.parseMPEGPES(a,i);break;case"ac3":this.parseAC3PES(a,i)}f={data:[],size:0}}f&&(f.data.push(e.subarray(E,t+ei)),f.size+=t+ei-E);break;case d:r&&(p&&(i=oi(p,this.logger))&&this.parseID3PES(o,i),p={data:[],size:0}),p&&(p.data.push(e.subarray(E,t+ei)),p.size+=t+ei-E);break;case 0:r&&(E+=e[E]+1),v=this._pmtId=ri(e,E);break;case v:{r&&(E+=e[E]+1);const i=ii(e,E,this.typeSupported,n,this.observer,this.logger);u=i.videoPid,u>0&&(s.pid=u,s.segmentCodec=i.segmentVideoCodec),h=i.audioPid,h>0&&(a.pid=h,a.segmentCodec=i.segmentAudioCodec),d=i.id3Pid,d>0&&(o.pid=d),null===g||m||(this.logger.warn(`MPEG-TS PMT found at ${t} after unknown PID '${g}'. Backtracking to sync byte @${b} to parse all TS packets.`),g=null,t=b-188),m=this.pmtParsed=!0;break}case 17:case 8191:break;default:g=y}}else E++;E>0&&si(this.observer,new Error(`Found ${E} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=c,a.pesData=f,o.pesData=p;const T={audioTrack:a,videoTrack:s,id3Track:o,textTrack:l};return r&&this.extractRemainingSamples(T),T}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,a=t.pesData,o=r.pesData;let l;if(s&&(l=oi(s,this.logger))){if(null===this.videoParser)switch(n.segmentCodec){case"avc":this.videoParser=new Zr;break;case"hevc":this.videoParser=new Jr}null!==this.videoParser&&(this.videoParser.parsePES(n,i,l,!0),n.pesData=null)}else n.pesData=s;if(a&&(l=oi(a,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=a&&a.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;o&&(l=oi(o,this.logger))?(this.parseID3PES(r,l),r.pesData=null):r.pesData=o}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new qr(this.observer,this.config,t);return this.decrypt(r,i)}decrypt(e,t){return new Promise((n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,(()=>{n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(()=>{n(e)}))}))}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i,s,a,o=t.data;if(r){this.aacOverFlow=null;const t=r.missing,i=r.sample.unit.byteLength;if(-1===t)o=ge(r.sample.unit,o);else{const s=i-t;r.sample.unit.set(o.subarray(0,t),s),e.samples.push(r.sample),n=r.missing}}for(i=n,s=o.length;i<s-1&&!yr(o,i);i++);if(i!==n){let e;const t=i<s-1;if(e=t?`AAC PES did not start with ADTS header,offset:${i}`:"No ADTS header found in AAC PES",si(this.observer,new Error(e),t,this.logger),!t)return}if(Er(e,this.observer,o,i,this.audioCodec),void 0!==t.pts)a=t.pts;else{if(!r)return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=Tr(e.samplerate);a=r.sample.pts+t}}let l,u=0;for(;i<s;){if(l=Sr(e,o,i,a,u),i+=l.length,l.missing){this.aacOverFlow=l;break}for(u++;i<s-1&&!yr(o,i);i++);}}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const a=t.pts;if(void 0!==a)for(;s<r;)if(jr(n,s)){const t=$r(e,n,s,a,i);if(!t)break;s+=t.length,i++}else s++;else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(void 0===r)return void this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");const i=n.length;let s,a=0,o=0;for(;o<i&&(s=Kr(e,n,o,r,a++))>0;)o+=s}}parseID3PES(e,t){if(void 0===t.pts)return void this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");const n=b({},t,{type:this._videoTrack?xr.emsg:xr.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function ni(e,t){return((31&e[t+1])<<8)+e[t+2]}function ri(e,t){return(31&e[t+10])<<8|e[t+11]}function ii(e,t,n,r,i,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<o;){const o=ni(e,t),l=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!r){ai("ADTS AAC",s);break}case 15:-1===a.audioPid&&(a.audioPid=o);break;case 21:-1===a.id3Pid&&(a.id3Pid=o);break;case 219:if(!r){ai("H.264",s);break}case 27:-1===a.videoPid&&(a.videoPid=o);break;case 3:case 4:n.mpeg||n.mp3?-1===a.audioPid&&(a.audioPid=o,a.segmentAudioCodec="mp3"):s.log("MPEG audio found, not supported in this browser");break;case 193:if(!r){ai("AC-3",s);break}case 129:n.ac3?-1===a.audioPid&&(a.audioPid=o,a.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===a.audioPid&&l>0){let r=t+5,i=l;for(;i>2;){106===e[r]&&(!0!==n.ac3?s.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=o,a.segmentAudioCodec="ac3"));const t=e[r+1]+2;r+=t,i-=t}}break;case 194:case 135:return si(i,new Error("Unsupported EC-3 in M2TS found"),void 0,s),a;case 36:-1===a.videoPid&&(a.videoPid=o,a.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"))}t+=l+5}return a}function si(e,t,n,r){r.warn(`parsing error: ${t.message}`),e.emit(l.ERROR,l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_PARSING_ERROR,fatal:!1,levelRetry:n,error:t,reason:t.message})}function ai(e,t){t.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function oi(e,t){let n,r,i,s,a,o=0;const l=e.data;if(!e||0===e.size)return null;for(;l[0].length<19&&l.length>1;)l[0]=ge(l[0],l[1]),l.splice(1,1);if(n=l[0],1===(n[0]<<16)+(n[1]<<8)+n[2]){if(r=(n[4]<<8)+n[5],r&&r>e.size-6)return null;const u=n[7];192&u&&(s=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,64&u?(a=536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2,s-a>54e5&&(t.warn(`${Math.round((s-a)/9e4)}s delta between PTS and DTS, align them`),s=a)):a=s),i=n[8];let c=i+9;if(e.size<=c)return null;e.size-=c;const h=new Uint8Array(e.size);for(let e=0,t=l.length;e<t;e++){n=l[e];let t=n.byteLength;if(c){if(c>t){c-=t;continue}n=n.subarray(c),t-=c,c=0}h.set(n,o),o+=t}return r&&(r-=i+3),{data:h,pts:s,dts:a,len:r}}return null}class li{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const ui=Math.pow(2,32)-1;class ci{static init(){let e;for(e in ci.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},ci.types)ci.types.hasOwnProperty(e)&&(ci.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);ci.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);ci.STTS=ci.STSC=ci.STCO=i,ci.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ci.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ci.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ci.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);ci.FTYP=ci.box(ci.types.ftyp,s,o,s,a),ci.DINF=ci.box(ci.types.dinf,ci.box(ci.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=255&n,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return ci.box(ci.types.hdlr,ci.HDLR_TYPES[e])}static mdat(e){return ci.box(ci.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ui+1)),r=Math.floor(t%(ui+1));return ci.box(ci.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}static mdia(e){return ci.box(ci.types.mdia,ci.mdhd(e.timescale||0,e.duration||0),ci.hdlr(e.type),ci.minf(e))}static mfhd(e){return ci.box(ci.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?ci.box(ci.types.minf,ci.box(ci.types.smhd,ci.SMHD),ci.DINF,ci.stbl(e)):ci.box(ci.types.minf,ci.box(ci.types.vmhd,ci.VMHD),ci.DINF,ci.stbl(e))}static moof(e,t,n){return ci.box(ci.types.moof,ci.mfhd(e),ci.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=ci.trak(e[t]);return ci.box.apply(null,[ci.types.moov,ci.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(ci.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=ci.trex(e[t]);return ci.box.apply(null,[ci.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ui+1)),r=Math.floor(t%(ui+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return ci.box(ci.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return ci.box(ci.types.sdtp,n)}static stbl(e){return ci.box(ci.types.stbl,ci.stsd(e),ci.box(ci.types.stts,ci.STTS),ci.box(ci.types.stsc,ci.STSC),ci.box(ci.types.stsz,ci.STSZ),ci.box(ci.types.stco,ci.STCO))}static avc1(e){let t,n,r,i=[],s=[];for(t=0;t<e.sps.length;t++)n=e.sps[t],r=n.byteLength,i.push(r>>>8&255),i.push(255&r),i=i.concat(Array.prototype.slice.call(n));for(t=0;t<e.pps.length;t++)n=e.pps[t],r=n.byteLength,s.push(r>>>8&255),s.push(255&r),s=s.concat(Array.prototype.slice.call(n));const a=ci.box(ci.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|e.sps.length].concat(i).concat([e.pps.length]).concat(s))),o=e.width,l=e.height,u=e.pixelRatio[0],c=e.pixelRatio[1];return ci.box(ci.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,ci.box(ci.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ci.box(ci.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,c>>24,c>>16&255,c>>8&255,255&c])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return ci.box(ci.types.mp4a,ci.audioStsd(e),ci.box(ci.types.esds,ci.esds(e)))}static mp3(e){return ci.box(ci.types[".mp3"],ci.audioStsd(e))}static ac3(e){return ci.box(ci.types["ac-3"],ci.audioStsd(e),ci.box(ci.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if("audio"===e.type){if("aac"===t)return ci.box(ci.types.stsd,ci.STSD,ci.mp4a(e));if("ac3"===t&&e.config)return ci.box(ci.types.stsd,ci.STSD,ci.ac3(e));if("mp3"===t&&"mp3"===e.codec)return ci.box(ci.types.stsd,ci.STSD,ci.mp3(e))}else{if(!e.pps||!e.sps)throw new Error("video track missing pps or sps");if("avc"===t)return ci.box(ci.types.stsd,ci.STSD,ci.avc1(e));if("hevc"===t&&e.vps)return ci.box(ci.types.stsd,ci.STSD,ci.hvc1(e))}throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(ui+1)),a=Math.floor(n%(ui+1));return ci.box(ci.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,a>>24,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,i>>8&255,255&i,0,0]))}static traf(e,t){const n=ci.sdtp(e),r=e.id,i=Math.floor(t/(ui+1)),s=Math.floor(t%(ui+1));return ci.box(ci.types.traf,ci.box(ci.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),ci.box(ci.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s])),ci.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,ci.box(ci.types.trak,ci.tkhd(e),ci.mdia(e))}static trex(e){const t=e.id;return ci.box(ci.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let a,o,l,u,c,h;for(t+=8+i,s.set(["video"===e.type?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),a=0;a<r;a++)o=n[a],l=o.duration,u=o.size,c=o.flags,h=o.cts,s.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*a);return ci.box(ci.types.trun,s)}static initSegment(e){ci.types||ci.init();const t=ci.moov(e);return ge(ci.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),3|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let i=r.length;for(let e=0;e<n.length;e+=1){i+=3;for(let t=0;t<n[e].length;t+=1)i+=2+n[e][t].length}const s=new Uint8Array(i);s.set(r,0),i=r.length;const a=n.length-1;for(let e=0;e<n.length;e+=1){s.set(new Uint8Array([32+e|(e===a?128:0),0,n[e].length]),i),i+=3;for(let t=0;t<n[e].length;t+=1)s.set(new Uint8Array([n[e][t].length>>8,255&n[e][t].length]),i),i+=2,s.set(n[e][t],i),i+=n[e][t].length}const o=ci.box(ci.types.hvcC,s),l=e.width,u=e.height,c=e.pixelRatio[0],h=e.pixelRatio[1];return ci.box(ci.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,ci.box(ci.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ci.box(ci.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,h>>24,h>>16&255,h>>8&255,255&h])))}}function hi(e,t,n=1,r=!1){const i=e*t*n;return r?Math.round(i):i}function di(e,t=!1){return hi(e,1e3,1/9e4,t)}ci.types=void 0,ci.HDLR_TYPES=void 0,ci.STTS=void 0,ci.STSC=void 0,ci.STCO=void 0,ci.STSZ=void 0,ci.VMHD=void 0,ci.SMHD=void 0,ci.STSD=void 0,ci.FTYP=void 0,ci.DINF=void 0;let fi,pi=null,gi=null;function mi(e,t,n,r){return{duration:t,size:n,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class vi{constructor(e,t,n,r){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.ISGenerated=!1,null===pi){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);pi=e?parseInt(e[1]):0}if(null===gi){const e=navigator.userAgent.match(/Safari\/(\d+)/i);gi=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce(((e,r)=>{let i=r.pts,s=i-e;return s<-4294967296&&(t=!0,i=yi(i,n),s=i-e),s>0?e:i}),n);return t&&this.logger.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,a,o){let l,u,c,h,d,f,g=i,m=i;const v=e.pid>-1,y=t.pid>-1,b=t.samples.length,E=e.samples.length>0,T=a&&b>0||b>1;if((!v||E)&&(!y||T)||this.ISGenerated||a){if(this.ISGenerated){var S,w,_,A;const e=this.videoTrackConfig;(e&&(t.width!==e.width||t.height!==e.height||(null==(S=t.pixelRatio)?void 0:S[0])!==(null==(w=e.pixelRatio)?void 0:w[0])||(null==(_=t.pixelRatio)?void 0:_[1])!==(null==(A=e.pixelRatio)?void 0:A[1]))||!e&&T||null===this.nextAudioPts&&E)&&this.resetInitSegment()}this.ISGenerated||(c=this.generateIS(e,t,i,s));const n=this.isVideoContiguous;let r,a=-1;if(T&&(a=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!n&&this.config.forceKeyFrameOnDiscontinuity))if(f=!0,a>0){this.logger.warn(`[mp4-remuxer]: Dropped ${a} out of ${b} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(a),t.dropped+=a,m+=(t.samples[0].pts-e)/t.inputTimeScale,r=m}else-1===a&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${b} video samples`),f=!1);if(this.ISGenerated){if(E&&T){const n=this.getVideoStartPts(t.samples),r=(yi(e.samples[0].pts,n)-n)/t.inputTimeScale;g+=Math.max(0,r),m+=Math.max(0,-r)}if(E){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(e,t,i,s)),u=this.remuxAudio(e,g,this.isAudioContiguous,s,y||T||o===p?m:void 0),T){const r=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(e,t,i,s)),l=this.remuxVideo(t,m,n,r)}}else T&&(l=this.remuxVideo(t,m,n,0));l&&(l.firstKeyFrame=a,l.independent=-1!==a,l.firstKeyFramePTS=r)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(d=bi(n,i,this._initPTS,this._initDTS)),r.samples.length&&(h=Ei(r,i,this._initPTS))),{audio:u,video:l,initSegment:c,independent:f,text:h,id3:d}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,a=this.typeSupported,o={},l=this._initPTS;let u,c,h,d,f=!l||r,p="audio/mp4";if(f&&(u=c=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":a.mpeg?(p="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}o.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&a.mpeg?new Uint8Array(0):ci.initSegment([e]),metadata:{channelCount:e.channelCount}},f&&(d=e.id,h=e.inputTimeScale,l&&h===l.timescale?f=!1:u=c=i[0].pts-Math.round(h*n))}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,o.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:ci.initSegment([t]),metadata:{width:t.width,height:t.height}},f)if(d=t.id,h=t.inputTimeScale,l&&h===l.timescale)f=!1;else{const e=this.getVideoStartPts(s),t=Math.round(h*n);c=Math.min(c,yi(s[0].dts,e)-t),u=Math.min(u,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(o).length)return this.ISGenerated=!0,f?(this._initPTS={baseTime:u,timescale:h},this._initDTS={baseTime:c,timescale:h}):u=h=void 0,{tracks:o,initPTS:u,timescale:h,trackId:d}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,u=[],c=s.length,h=this._initPTS;let d,f,p=this.nextAvcDts,g=8,m=this.videoSampleDuration,v=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,E=!1;if(!n||null===p){const e=t*i,r=s[0].pts-yi(s[0].dts,s[0].pts);pi&&null!==p&&Math.abs(e-r-p)<15e3?n=!0:p=e-r}const T=h.baseTime*i/h.timescale;for(let e=0;e<c;e++){const t=s[e];t.pts=yi(t.pts-T,p),t.dts=yi(t.dts-T,p),t.dts<s[e>0?e-1:e].dts&&(E=!0)}E&&s.sort((function(e,t){const n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),d=s[0].dts,f=s[s.length-1].dts;const S=f-d,w=S?Math.round(S/(c-1)):m||e.inputTimeScale/30;if(n){const n=d-p,r=n>w,i=n<-1;if((r||i)&&(r?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${di(n,!0)} ms (${n}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${di(-n,!0)} ms (${n}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!i||p>=s[0].pts||pi)){d=p;const e=s[0].pts-n;if(r)s[0].dts=d,s[0].pts=e;else{let t=!0;for(let r=0;r<s.length&&!(s[r].dts>e&&t);r++){const e=s[r].pts;if(s[r].dts-=n,s[r].pts-=n,r<s.length-1){const n=s[r+1].pts;t=n<=s[r].pts==n<=e}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${di(e,!0)}/${di(d,!0)}, delta: ${di(n,!0)} ms`)}}d=Math.max(0,d);let _=0,A=0,k=d;for(let e=0;e<c;e++){const t=s[e],n=t.units,r=n.length;let i=0;for(let e=0;e<r;e++)i+=n[e].data.length;A+=i,_+=r,t.length=i,t.dts<k?(t.dts=k,k+=w/4|0||1):k=t.dts,v=Math.min(t.pts,v),y=Math.max(t.pts,y)}f=s[c-1].dts;const L=A+4*_+8;let C;try{C=new Uint8Array(L)}catch(e){return void this.observer.emit(l.ERROR,l.ERROR,{type:a.MUX_ERROR,details:o.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:L,reason:`fail allocating video mdat ${L}`})}const R=new DataView(C.buffer);R.setUint32(0,L),C.set(ci.types.mdat,4);let I=!1,x=Number.POSITIVE_INFINITY,P=Number.POSITIVE_INFINITY,D=Number.NEGATIVE_INFINITY,O=Number.NEGATIVE_INFINITY;for(let e=0;e<c;e++){const t=s[e],n=t.units;let a,o=0;for(let e=0,t=n.length;e<t;e++){const t=n[e],r=t.data,i=t.data.byteLength;R.setUint32(g,i),g+=4,C.set(r,g),g+=i,o+=4+i}if(e<c-1)m=s[e+1].dts-t.dts,a=s[e+1].pts-t.pts;else{const n=this.config,o=e>0?t.dts-s[e-1].dts:w;if(a=e>0?t.pts-s[e-1].pts:w,n.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(n.maxBufferHole*i),s=(r?v+r*i:this.nextAudioPts)-t.pts;s>e?(m=s-o,m<0?m=o:I=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${s/90} ms to the next segment; using duration ${m/90} ms for the last video frame.`)):m=o}else m=o}const l=Math.round(t.pts-t.dts);x=Math.min(x,m),D=Math.max(D,m),P=Math.min(P,a),O=Math.max(O,a),u.push(mi(t.key,m,o,l))}if(u.length)if(pi){if(pi<70){const e=u[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(gi&&O-P<D-x&&w/D<.025&&0===u[0].cts){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,n=u.length;t<n;t++){const r=e+u[t].duration,i=e+u[t].cts;if(t<n-1){const e=r+u[t+1].cts;u[t].duration=e-i}else u[t].duration=t?u[t-1].duration:w;u[t].cts=0,e=r}}m=I||!m?w:m,this.nextAvcDts=p=f+m,this.videoSampleDuration=m,this.isVideoContiguous=!0;const M={data1:ci.moof(e.sequenceNumber++,d,b(e,{samples:u})),data2:C,startPTS:v/i,endPTS:(y+m)/i,startDTS:d/i,endDTS:p/i,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,M}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,u=s/(e.samplerate?e.samplerate:s),c=this.getSamplesPerFrame(e),h=c*u,d=this._initPTS,f="mp3"===e.segmentCodec&&this.typeSupported.mpeg,p=[],g=void 0!==i;let m=e.samples,v=f?0:8,y=this.nextAudioPts||-1;const E=t*s,T=d.baseTime*s/d.timescale;if(this.isAudioContiguous=n=n||m.length&&y>0&&(r&&Math.abs(E-y)<9e3||Math.abs(yi(m[0].pts-T,E)-y)<20*h),m.forEach((function(e){e.pts=yi(e.pts-T,E)})),!n||y<0){if(m=m.filter((e=>e.pts>=0)),!m.length)return;y=0===i?0:r&&!g?Math.max(0,E):m[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let n=0,r=y;n<m.length;n++){const i=m[n],a=i.pts,o=a-r,l=Math.abs(1e3*o/s);if(o<=-t*h&&g)0===n&&(this.logger.warn(`Audio frame @ ${(a/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*o/s)} ms.`),this.nextAudioPts=y=r=a);else if(o>=t*h&&l<1e4&&g){let t=Math.round(o/h);r=a-t*h,r<0&&(t--,r+=h),0===n&&(this.nextAudioPts=y=r),this.logger.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(r/s).toFixed(3)}s due to ${Math.round(1e3*o/s)} ms gap.`);for(let s=0;s<t;s++){const t=Math.max(r,0);let s=li.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);s||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),s=i.unit.subarray()),m.splice(n,0,{unit:s,pts:t}),r+=h,n++}}i.pts=r,r+=h}}let S,w=null,_=null,A=0,k=m.length;for(;k--;)A+=m[k].unit.byteLength;for(let t=0,r=m.length;t<r;t++){const r=m[t],i=r.unit;let s=r.pts;if(null!==_)p[t-1].duration=Math.round((s-_)/u);else{if(n&&"aac"===e.segmentCodec&&(s=y),w=s,!(A>0))return;A+=v;try{S=new Uint8Array(A)}catch(e){return void this.observer.emit(l.ERROR,l.ERROR,{type:a.MUX_ERROR,details:o.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:A,reason:`fail allocating audio mdat ${A}`})}f||(new DataView(S.buffer).setUint32(0,A),S.set(ci.types.mdat,4))}S.set(i,v);const h=i.byteLength;v+=h,p.push(mi(!0,c,h,0)),_=s}const L=p.length;if(!L)return;const C=p[p.length-1];this.nextAudioPts=y=_+u*C.duration;const R=f?new Uint8Array(0):ci.moof(e.sequenceNumber++,w/u,b({},e,{samples:p}));e.samples=[];const I=w/s,x=y/s,P={data1:R,data2:S,startPTS:I,endPTS:x,startDTS:I,endDTS:x,type:"audio",hasAudio:!0,hasVideo:!1,nb:L};return this.isAudioContiguous=!0,P}}function yi(e,t){let n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}function bi(e,t,n,r){const i=e.samples.length;if(!i)return;const s=e.inputTimeScale;for(let a=0;a<i;a++){const i=e.samples[a];i.pts=yi(i.pts-n.baseTime*s/n.timescale,t*s)/s,i.dts=yi(i.dts-r.baseTime*s/r.timescale,t*s)/s}const a=e.samples;return e.samples=[],{samples:a}}function Ei(e,t,n){const r=e.samples.length;if(!r)return;const i=e.inputTimeScale;for(let s=0;s<r;s++){const r=e.samples[s];r.pts=yi(r.pts-n.baseTime*i/n.timescale,t*i)/i}e.samples.sort(((e,t)=>e.pts-t.pts));const s=e.samples;return e.samples=[],{samples:s}}function Ti(e,t,n=!1){return void 0!==(null==e?void 0:e.start)?(e.start+(n?e.duration:0))/e.timescale:t}function Si(e,t,n){const r=null==e?void 0:e.codec;return r&&r.length>4?r:t===j?"ec-3"===r||"ac-3"===r||"alac"===r?r:"fLaC"===r||"Opus"===r?Pe(r,!1):(n.warn(`Unhandled audio codec "${r}" in mp4 MAP`),r||"mp4a"):(n.warn(`Unhandled video codec "${r}" in mp4 MAP`),r||"avc1")}try{fi=self.performance.now.bind(self.performance)}catch(e){fi=Date.now}const wi=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=Pr("video",1),s=this.audioTrack=Pr("audio",1),a=this.txtTrack=Pr("text",1);if(this.id3Track=Pr("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const o=le(e);if(o.video){const{id:e,timescale:t,codec:n,supplemental:r}=o.video;i.id=e,i.timescale=a.timescale=t,i.codec=n,i.supplemental=r}if(o.audio){const{id:e,timescale:t,codec:n}=o.audio;s.id=e,s.timescale=t,s.codec=n}a.id=J.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let n=0;n<t;){const r=ne(e,n);if(r>8&&109===e[n+4]&&111===e[n+5]&&111===e[n+6]&&102===e[n+7])return!0;n=r>1?n+r:t}return!1}(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=ge(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},n=ae(e,["moof"]);if(n.length<2)return t.remainder=e,t;const r=n[n.length-1];return t.valid=e.slice(0,r.byteOffset-8),t.remainder=e.slice(r.byteOffset-8),t}(n);this.remainderData=t.remainder,r.samples=t.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=me(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=me(e,t),{videoTrack:t,audioTrack:Pr(),id3Track:r,textTrack:Pr()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=ae(e.samples,["emsg"]);r&&r.forEach((e=>{const r=function(e){const t=e[0];let n="",r="",s=0,a=0,o=0,l=0,u=0,c=0;if(0===t){for(;"\0"!==ee(e.subarray(c,c+1));)n+=ee(e.subarray(c,c+1)),c+=1;for(n+=ee(e.subarray(c,c+1)),c+=1;"\0"!==ee(e.subarray(c,c+1));)r+=ee(e.subarray(c,c+1)),c+=1;r+=ee(e.subarray(c,c+1)),c+=1,s=ne(e,12),a=ne(e,16),l=ne(e,20),u=ne(e,24),c=28}else if(1===t){c+=4,s=ne(e,c),c+=4;const t=ne(e,c);c+=4;const a=ne(e,c);for(c+=4,o=2**32*t+a,i(o)||(o=Number.MAX_SAFE_INTEGER,C.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=ne(e,c),c+=4,u=ne(e,c),c+=4;"\0"!==ee(e.subarray(c,c+1));)n+=ee(e.subarray(c,c+1)),c+=1;for(n+=ee(e.subarray(c,c+1)),c+=1;"\0"!==ee(e.subarray(c,c+1));)r+=ee(e.subarray(c,c+1)),c+=1;r+=ee(e.subarray(c,c+1)),c+=1}return{schemeIdUri:n,value:r,timeScale:s,presentationTime:o,presentationTimeDelta:a,eventDuration:l,id:u,payload:e.subarray(c,e.byteLength)}}(e);if(Wr.test(r.schemeIdUri)){const e=Yr(r,t);let i=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;i<=.001&&(i=Number.POSITIVE_INFINITY);const s=r.payload;n.samples.push({data:s,len:s.byteLength,dts:e,pts:e,type:xr.emsg,duration:i})}else if(this.config.enableEmsgKLVMetadata&&r.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const e=Yr(r,t);n.samples.push({data:r.payload,len:r.payload.byteLength,dts:e,pts:e,type:xr.misbklv,duration:Number.POSITIVE_INFINITY})}}))}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}},remux:class{constructor(e,t,n,r){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1,this.logger=r}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(function(e,t){if(!e||!t)return e;const n=t.keyId;return n&&t.isCommonEncryption&&ae(e,["moov","trak"]).forEach((e=>{const t=ae(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let r=ae(t,["enca"]);const i=r.length>0;i||(r=ae(t,["encv"])),r.forEach((e=>{ae(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=pe(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(C.log(`[eme] Patching keyId in 'enc${i?"a":"v"}>sinf>>tenc' box: ${P(e)} -> ${P(n)}`),t.set(n,8))}}))}))})),e}(e,r)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const r=this.initData=le(e);r.audio&&(t=Si(r.audio,j,this.logger)),r.video&&(n=Si(r.video,V,this.logger));const i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,n,i,s,a){var o,l;let{initPTS:u,lastEndTime:c}=this;const h={audio:void 0,video:void 0,text:i,id3:n,initSegment:void 0};r(c)||(c=this.lastEndTime=s||0);const d=t.samples;if(null==d||!d.length)return h;const f={initPTS:void 0,timescale:void 0,trackId:void 0};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(d),p=this.initData),null==(l=p)||!l.length)return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1);const g=function(e,t,n){const i={},s=ae(e,["moof","traf"]);for(let e=0;e<s.length;e++){const a=s[e],o=ae(a,["tfhd"])[0],l=ne(o,4),u=t[l];if(!u)continue;const c=i[l]||(i[l]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type}),h=ae(a,["tfdt"])[0];if(h){const e=h[0];let t=ne(h,4);1===e&&(t===Q?n.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(t*=Q+1,t+=ne(h,8))),r(t)&&(!r(c.start)||t<c.start)&&(c.start=t)}const d=u.default,f=ne(o,0)|(null==d?void 0:d.flags);let p=(null==d?void 0:d.duration)||0;8&f&&(p=ne(o,2&f?12:8));const g=ae(a,["trun"]);let m=c.start||0,v=0,y=p;for(let e=0;e<g.length;e++){const t=g[e],n=ne(t,4),r=c.sampleCount;c.sampleCount+=n;const i=1&t[3],s=4&t[3],a=1&t[2],o=2&t[2],l=4&t[2],u=8&t[2];let h=8,d=n;for(i&&(h+=4),s&&n&&(1&t[h+1]||void 0!==c.keyFrameIndex||(c.keyFrameIndex=r),h+=4,a?(y=ne(t,h),h+=4):y=p,o&&(h+=4),u&&(h+=4),m+=y,v+=y,d--);d--;)a?(y=ne(t,h),h+=4):y=p,o&&(h+=4),l&&(1&t[h+1]||void 0===c.keyFrameIndex&&(c.keyFrameIndex=c.sampleCount-(d+1),c.keyFrameStart=m),h+=4),u&&(h+=4),m+=y,v+=y;!v&&p&&(v+=p*n)}c.duration+=v}if(!Object.keys(i).some((e=>i[e].duration))){let t=1/0,n=0;const s=ae(e,["sidx"]);for(let e=0;e<s.length;e++){const r=oe(s[e]);if(null!=r&&r.references){t=Math.min(t,r.earliestPresentationTime/r.timescale);const e=r.references.reduce(((e,t)=>e+t.info.duration||0),0);n=Math.max(n,e+r.earliestPresentationTime/r.timescale)}}n&&r(n)&&Object.keys(i).forEach((e=>{i[e].duration||(i[e].duration=n*i[e].timescale-i[e].start)}))}return i}(d,p,this.logger),m=p.audio?g[p.audio.id]:null,v=p.video?g[p.video.id]:null,y=Ti(v,1/0),b=Ti(m,1/0),E=Ti(v,0,!0),T=Ti(m,0,!0);let S,w=s,_=0;if(m&&(!v||!u&&b<y||u&&u.trackId===p.audio.id)?(f.trackId=p.audio.id,S=m,_=T-b):v&&(f.trackId=p.video.id,S=v,_=E-y),S){const e=S.timescale;w=S.start/e,f.timescale=e,u||(f.initPTS=S.start-s*e,this.initPTS=u={baseTime:f.initPTS,timescale:e,trackId:f.trackId})}!a&&u||!function(e,t,n,r){if(null===e)return!0;const i=Math.max(r,1),s=t-e.baseTime/e.timescale;return Math.abs(s-n)>i}(u,w,s,_)&&f.timescale===u.timescale||(f.initPTS=w-s,u&&1===u.timescale&&this.logger.warn(`Adjusting initPTS @${s} from ${u.baseTime/u.timescale} to ${f.initPTS}`),this.initPTS=u={baseTime:f.initPTS,timescale:1});const A=e?w-u.baseTime/u.timescale:c;!function(e,t,n){ae(t,["moof","traf"]).forEach((t=>{ae(t,["tfhd"]).forEach((r=>{const i=ne(r,4),s=e[i];if(!s)return;const a=s.timescale||9e4;ae(t,["tfdt"]).forEach((e=>{const t=e[0],r=n*a;if(r){let n=ne(e,4);if(0===t)n-=r,n=Math.max(n,0),se(e,4,n);else{n*=Math.pow(2,32),n+=ne(e,8),n-=r,n=Math.max(n,0);const t=Math.floor(n/(Q+1)),i=Math.floor(n%(Q+1));se(e,4,t),se(e,8,i)}}}))}))}))}(p,d,u.baseTime/u.timescale);const k=A+_;_>0?this.lastEndTime=k:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const L=!!p.audio,C=!!p.video;let R="";L&&(R+="audio"),C&&(R+="video");const I={data1:d,startPTS:A,startDTS:A,endPTS:k,endDTS:k,type:R,hasAudio:L,hasVideo:C,nb:1,dropped:0};h.audio=L&&!C?I:void 0,h.video=C?I:void 0;const x=null==v?void 0:v.sampleCount;if(x){const e=v.keyFrameIndex,t=-1!==e;I.nb=x,I.dropped=0===e||this.isVideoContiguous?0:t?e:x,I.independent=t,I.firstKeyFrame=e,t&&v.keyFrameStart&&(I.firstKeyFramePTS=v.keyFrameStart-u.baseTime/u.timescale),this.isVideoContiguous||(h.independent=t),this.isVideoContiguous||(this.isVideoContiguous=t),I.dropped&&this.logger.warn(`fmp4 does not start with IDR: firstIDR ${e}/${x} dropped: ${I.dropped} pts: ${I.firstKeyFramePTS||"NA"}`)}return h.initSegment=f,h.id3=bi(n,s,u,u),i.samples.length&&(h.text=Ei(i,s,u)),h}}},{demux:ti,remux:vi},{demux:class extends Dr{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=pr(e,0);let r=(null==n?void 0:n.length)||0;if(Vr(e,r))return!1;for(let n=e.length;r<n;r++)if(br(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&gr(e,t)&&vr(e,t)<=e.length-t}(e,t)}appendFrame(e,t,n){Er(e,this.observer,t,n,e.manifestCodec);const r=Sr(e,t,n,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r}},remux:vi},{demux:class extends Dr{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=pr(e,0);let n=(null==t?void 0:t.length)||0;if(t&&11===e[n]&&119===e[n+1]&&void 0!==Ir(t)&&zr(e,n)<=16)return!1;for(let t=e.length;n<t;n++)if(Vr(e,n))return C.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return Gr(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,n){if(null!==this.basePTS)return $r(e,t,n,this.basePTS,this.frameIndex)}},remux:vi}];wi.splice(2,0,{demux:class extends Dr{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=Kr(e,t,n,this.basePTS,this.frameIndex);if(-1!==r)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=pr(e,0);if(!t)return!1;const n=t.length;return 11===e[n]&&119===e[n+1]&&void 0!==Ir(t)&&zr(e,n)<16}},remux:vi});class _i{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=fi();let s=new Uint8Array(e);const{currentTransmuxState:u,transmuxConfig:c}=this;r&&(this.currentTransmuxState=r);const{contiguous:h,discontinuity:d,trackSwitch:f,accurateTimeOffset:p,timeOffset:g,initSegmentChange:m}=r||u,{audioCodec:v,videoCodec:y,defaultInitPts:b,duration:E,initSegmentData:T}=c,S=function(e,t){let n=null;return e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(S&&Kt(S.method)){const e=this.getDecrypter(),t=Wt(S.method);if(!e.isSync())return this.asyncResult=!0,this.decryptionPromise=e.webCryptoDecrypt(s,S.key.buffer,S.iv.buffer,t).then((e=>{const t=this.push(e,null,n);return this.decryptionPromise=null,t})),this.decryptionPromise;{let r=e.softwareDecrypt(s,S.key.buffer,S.iv.buffer,t);if(n.part>-1){const t=e.flush();r=t?t.buffer:t}if(!r)return i.executeEnd=fi(),Ai(n);s=new Uint8Array(r)}}const w=this.needsProbing(d,f);if(w){const e=this.configureTransmuxer(s);if(e)return this.logger.warn(`[transmuxer] ${e.message}`),this.observer.emit(l.ERROR,l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),i.executeEnd=fi(),Ai(n)}(d||f||m||w)&&this.resetInitSegment(T,v,y,E,t),(d||m||w)&&this.resetInitialTimestamp(b),h||this.resetContiguity();const _=this.transmux(s,S,g,p,n);this.asyncResult=ki(_);const A=this.currentTransmuxState;return A.contiguous=!0,A.discontinuity=!1,A.trackSwitch=!1,i.executeEnd=fi(),_}flush(e){const t=e.transmuxing;t.executeStart=fi();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then((()=>this.flush(e)));const s=[],{timeOffset:a}=r;if(n){const t=n.flush();t&&s.push(this.push(t.buffer,null,e))}const{demuxer:o,remuxer:l}=this;if(!o||!l){t.executeEnd=fi();const n=[Ai(e)];return this.asyncResult?Promise.resolve(n):n}const u=o.flush(a);return ki(u)?(this.asyncResult=!0,u.then((t=>(this.flushRemux(s,t,e),s)))):(this.flushRemux(s,u,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:a}=t,{accurateTimeOffset:o,timeOffset:l}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===f?"level":"track"} ${n.level}`);const u=this.remuxer.remux(r,i,s,a,l,o,!0,this.id);e.push({remuxResult:u,chunkMeta:n}),n.transmuxing.executeEnd=fi()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:a}=this;s&&a&&(s.resetInitSegment(e,t,n,r),a.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return s=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:a,textTrack:o}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,a,o,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,this.id),chunkMeta:i})))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let t=0,n=wi.length;t<n;t++){var s;if(null!=(s=wi[t].demux)&&s.probe(e,this.logger)){i=wi[t];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const a=this.demuxer,o=this.remuxer,l=i.remux,u=i.demux;o&&o instanceof l||(this.remuxer=new l(n,t,r,this.logger)),a&&a instanceof u||(this.demuxer=new u(n,t,r,this.logger),this.probe=u.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new At(this.config)),e}}const Ai=e=>({remuxResult:{},chunkMeta:e});function ki(e){return"then"in e&&e.then instanceof Function}class Li{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class Ci{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let Ri=0;class Ii{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=Ri++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=e=>{const t=e.data,n=this.hls;if(n&&null!=t&&t.event&&t.instanceNo===this.instanceNo)switch(t.event){case"init":{var r;const e=null==(r=this.workerContext)?void 0:r.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":n.logger[t.data.logType]&&n.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.part=this.part,t.data.id=this.id,n.trigger(t.event,t.data)}},this.onWorkerError=e=>{if(!this.hls)return;const t=new Error(`${e.message} (${e.filename}:${e.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(e,t)=>{(t=t||{}).frag=this.frag||void 0,e===l.ERROR&&(t.parent=this.id,t.part=this.part,this.error=t.error),this.hls.trigger(e,t)};this.observer=new lr,this.observer.on(l.FRAG_DECRYPTED,s),this.observer.on(l.ERROR,s);const u=Me(i.preferManagedMediaSource);if(this.useWorker&&"undefined"!=typeof Worker){const n=this.hls.logger;if(i.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{i.workerPath?(n.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=function(e){const t=cr[e];if(t)return t.clientCount++,t;const n=new self.URL(e,self.location.href).href,r={worker:new self.Worker(n),scriptURL:n,clientCount:1};return cr[e]=r,r}(i.workerPath)):(n.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=cr[ur];if(e)return e.clientCount++,e;const t=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),n=self.URL.createObjectURL(t),r={worker:new self.Worker(n),objectURL:n,clientCount:1};return cr[ur]=r,r}());const{worker:e}=this.workerContext;e.addEventListener("message",this.onWorkerMessage),e.addEventListener("error",this.onWorkerError),e.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:u,id:t,config:Ye(i)})}catch(r){n.warn(`Error setting up "${t}" Web Worker, fallback to inline`,r),this.terminateWorker(),this.error=null,this.transmuxer=new _i(this.observer,u,i,"",t,e.logger)}return}}this.transmuxer=new _i(this.observer,u,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=Ri++;const t=this.hls.config,n=Me(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Ye(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),function(e){const t=cr[e||ur];if(t&&1===t.clientCount--){const{worker:n,objectURL:r}=t;delete cr[e||ur],r&&self.URL.revokeObjectURL(r),n.terminate()}}(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,a,o,l,u){var c,h;l.transmuxing.start=self.performance.now();const{instanceNo:d,transmuxer:p}=this,g=s?s.start:i.start,m=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&l.level===v.level),E=v?l.sn-v.sn:-1,T=this.part?l.part-this.part.index:-1,S=0===E&&l.id>1&&l.id===(null==v?void 0:v.stats.chunkCount),w=!b&&(1===E||0===E&&(1===T||S&&T<=0)),_=self.performance.now();(b||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=_),!s||!T&&w||(s.stats.parsing.start=_);const A=!(v&&(null==(c=i.initSegment)?void 0:c.url)===(null==(h=v.initSegment)?void 0:h.url)),k=new Ci(y,w,o,b,g,A);if(!w||y||A){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${l.sn}${l.part>-1?" part: "+l.part:""} ${this.id===f?"level":"track"}: ${l.level} id: ${l.id}\n discontinuity: ${y}\n trackSwitch: ${b}\n contiguous: ${w}\n accurateTimeOffset: ${o}\n timeOffset: ${g}\n initSegmentChange: ${A}`);const e=new Li(n,r,t,a,u);this.configureTransmuxer(e)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:d,cmd:"demux",data:e,decryptdata:m,chunkMeta:l,state:k},e instanceof ArrayBuffer?[e]:[]);else if(p){const t=p.push(e,m,l,k);ki(t)?t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")})):this.handleTransmuxComplete(t)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const t=n.flush(e);ki(t)?t.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")})):this.handleFlushResult(t,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}class xi extends S{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=null==t?void 0:t.renditionReports;if(r){let i=-1;for(let n=0;n<r.length;n++){const s=r[n];let a;try{a=new self.URL(s.URI,t.url).href}catch(e){this.warn(`Could not construct new URL for Rendition Report: ${e}`),a=s.URI||""}if(a===e){i=n;break}a===e.substring(0,a.length)&&(i=n)}if(-1!==i){const e=r[i],s=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let a=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);a>=0&&e>t.partTarget&&(a+=1)}const o=n&&Ve(n);return new ze(s,a>=0?a:void 0,o)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}return e}playlistLoaded(e,t,n){const{details:i,stats:s}=t,u=self.performance.now(),c=s.loading.first?Math.max(0,u-s.loading.first):0;i.advancedDateTime=Date.now()-c;const h=this.hls.config.timelineOffset;if(h!==i.appliedTimelineOffset){const e=Math.max(h||0,0);i.appliedTimelineOffset=e,i.fragments.forEach((t=>{t.start=t.playlistOffset+e}))}if(i.live||null!=n&&n.live){const h="levelInfo"in t?t.levelInfo:t.track;if(i.reloaded(n),n&&i.fragments.length>0){!function(e,t){if(e===t)return;let n=null;const i=e.fragments;for(let e=i.length-1;e>=0;e--){const t=i[e].initSegment;if(t){n=t;break}}let s;e.fragmentHint&&delete e.fragmentHint.endPTS,function(e,t,n){const r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,s=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,a=t.startSN-e.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let u=i;u<=s;u++){const i=l[a+u];let s=o[u];if(r&&!s&&i&&(s=t.fragments[u]=i),i&&s){if(n(i,s,u,o),i.url&&i.url!==s.url)return void(t.playlistParsingError=xn(`media sequence mismatch ${s.sn}:`,e,t,0,s));if(i.cc!==s.cc)return void(t.playlistParsingError=xn(`discontinuity sequence mismatch (${i.cc}!=${s.cc})`,e,t,0,s))}}}(e,t,((e,i,a,o)=>{if((!t.startCC||t.skippedSegments)&&i.cc!==e.cc){const n=e.cc-i.cc;for(let e=a;e<o.length;e++)o[e].cc+=n;t.endCC=o[o.length-1].cc}r(e.startPTS)&&r(e.endPTS)&&(i.setStart(i.startPTS=e.startPTS),i.startDTS=e.startDTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.setDuration(e.endPTS-e.startPTS),i.duration&&(s=i),t.PTSKnown=t.alignedSliding=!0),e.hasStreams&&(i.elementaryStreams=e.elementaryStreams),i.loader=e.loader,e.hasStats&&(i.stats=e.stats),e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)}));const a=t.fragments,o=t.fragmentHint?a.concat(t.fragmentHint):a;if(n&&o.forEach((e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=n)?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments){if(t.deltaUpdateFailed=a.some((e=>!e)),t.deltaUpdateFailed){C.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)a.shift();t.startSN=a[0].sn}else{t.canSkipDateRanges&&(t.dateRanges=function(e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=t,i=b({},e);r&&r.forEach((e=>{delete i[e]}));const s=Object.keys(i).length;return s&&Object.keys(n).forEach((e=>{const t=i[e],r=new Vt(n[e].attr,t);r.isValid?(i[e]=r,t||(r.tagOrder+=s)):C.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Ye(n[e].attr)}"`)})),i}(e.dateRanges,t));const n=e.fragments.filter((e=>e.rawProgramDateTime));if(e.hasProgramDateTime&&!t.hasProgramDateTime)for(let e=1;e<o.length;e++)null===o[e].programDateTime&&_n(o[e],o[e-1],n);yn(n,t)}t.endCC=a[a.length-1].cc}if(!t.startCC){var l;const n=Mn(e,t.startSN-1);t.startCC=null!=(l=null==n?void 0:n.cc)?l:a[0].cc}!function(e,t,n){if(e&&t){let r=0;for(let i=0,s=e.length;i<=s;i++){const s=e[i],a=t[i+r];s&&a&&s.index===a.index&&s.fragment.sn===a.fragment.sn?n(s,a):r--}}}(e.partList,t.partList,((e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),s?In(t,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):Pn(e,t),a.length&&(t.totalduration=t.edge-a[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const u=t.advancedDateTime;if(t.advanced&&u){const e=t.edge;t.driftStart||(t.driftStartTime=u,t.driftStart=e),t.driftEndTime=u,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime;-1===t.requestScheduled&&(t.requestScheduled=e.requestScheduled)}(n,i);const e=i.playlistParsingError;if(e){this.warn(e);const n=this.hls;if(!n.config.ignorePlaylistParsingErrors){var d;const{networkDetails:r}=t;return void n.trigger(l.ERROR,{type:a.NETWORK_ERROR,details:o.LEVEL_PARSING_ERROR,fatal:!1,url:i.url,error:e,reason:e.message,level:t.level||void 0,parent:null==(d=i.fragments[0])?void 0:d.type,networkDetails:r,stats:s})}i.playlistParsingError=null}}-1===i.requestScheduled&&(i.requestScheduled=s.loading.start);const f=this.hls.mainForwardBufferInfo,p=f?f.end-f.len:0,g=On(i,1e3*(i.edge-p));if(i.requestScheduled+g<u?i.requestScheduled=u:i.requestScheduled+=g,this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),!this.canLoad||!i.live)return;let m,v,y;if(i.canBlockReload&&i.endSN&&i.advanced){const e=this.hls.config.lowLatencyMode,r=i.lastPartSn,s=i.endSN,a=i.lastPartIndex,o=r===s;-1!==a?o?(v=s+1,y=e?0:a):(v=r,y=e?a+1:i.maxPartIndex):v=s+1;const l=i.age,c=l+i.ageHeader;let d=Math.min(c-i.partTarget,1.5*i.targetduration);if(d>0){if(c>3*i.targetduration)this.log(`Playlist last advanced ${l.toFixed(2)}s ago. Omitting segment and part directives.`),v=void 0,y=void 0;else if(null!=n&&n.tuneInGoal&&c-i.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${d} with playlist age: ${i.age}`),d=0;else{const e=Math.floor(d/i.targetduration);v+=e,void 0!==y&&(y+=Math.round(d%i.targetduration/i.partTarget)),this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${l.toFixed(2)}s goal: ${d} skip sn ${e} to part ${y}`)}i.tuneInGoal=d}if(m=this.getDeliveryDirectives(i,t.deliveryDirectives,v,y),e||!o)return i.requestScheduled=u,void this.loadingPlaylist(h,m)}else(i.canBlockReload||i.canSkipUntil)&&(m=this.getDeliveryDirectives(i,t.deliveryDirectives,v,y));m&&void 0!==v&&i.canBlockReload&&(i.requestScheduled=s.loading.first+Math.max(g-2*c,g/2)),this.scheduleLoading(h,m,i)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r)return void this.loadingPlaylist(e,t);const i=self.performance.now(),s=r.requestScheduled;if(i>=s)return void this.loadingPlaylist(e,t);const a=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(a)} ms`),this.clearTimer(),this.timer=self.setTimeout((()=>this.loadingPlaylist(e,t)),a)}getDeliveryDirectives(e,t,n,r){let i=Ve(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=""),new ze(n,r,i)}checkRetry(e){const t=e.details,n=lt(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:a}=r||{},o=!!r&&!!a&&(5===i||!r.resolved&&2===i);if(o){var l;if(s>=a.maxNumRetry)return!1;if(n&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=ct(a,s);this.clearTimer(),this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${s+1}/${a.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,r.resolved=!0}return o}}function Pi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Di(e[n].attrs,t[n].attrs))return!1;return!0}function Di(e,t,n){const r=e["STABLE-RENDITION-ID"];return r&&!n?r===t["STABLE-RENDITION-ID"]:!(n||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((n=>e[n]!==t[n]))}function Oi(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class Mi{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(null===this.queues||null===this.tracks)return;const r=this.queues[t];r.push(e),1!==r.length||n||this.executeNext(t)}appendBlocker(e){return new Promise((t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)}))}prependBlocker(e){return new Promise((t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}}))}removeBlockers(){null!==this.queues&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach((e=>{var t;const n=null==(t=e[0])?void 0:t.label;"async-blocker"!==n&&"async-blocker-prepend"!==n||(e[0].execute(),e.splice(0,1))}))}unblockAudio(e){null!==this.queues&&this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(null===this.queues||null===this.tracks)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(t){var n;if(r.onError(t),null===this.queues||null===this.tracks)return;const i=null==(n=this.tracks[e])?void 0:n.buffer;null!=i&&i.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){null!==this.queues&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return(null==(t=this.queues)?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return null===e||null===t?"<destroyed>":`\n${this.list("video")}\n${this.list("audio")}\n${this.list("audiovideo")}}`}list(e){var t,n;return null!=(t=this.queues)&&t[e]||null!=(n=this.tracks)&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=null==(t=this.tracks)?void 0:t[e],r=null==n?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return(null==(t=this.queues)?void 0:t[e].map((e=>e.label)).join(", "))||""}}const Ni=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Fi="HlsJsTrackRemovedError";class Bi extends Error{constructor(e){super(e),this.name=Fi}}function Ui(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}function $i(e){return"audio"===e?1:0}class Hi{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(l.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(l.BUFFER_CODECS,this.onBufferCodecs,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(l.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(l.BUFFER_CODECS,this.onBufferCodecs,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&r(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter(((t,n)=>this.isLevelAllowed(t)&&n<=e));return this.clientRect=null,Hi.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,n){if(null==e||!e.length)return-1;let r=e.length-1;const i=Math.max(t,n);for(let t=0;t<e.length;t+=1){const n=e[t];if((n.width>=i||n.height>=i)&&(s=n,!(a=e[t+1])||s.width!==a.width||s.height!==a.height)){r=t;break}}var s,a;return r}}const Gi="m",ji="a",Vi="v",zi="av",Ki="i",Wi="tt",Yi="h",qi="CMCD-Object",Xi="CMCD-Request",Qi="CMCD-Session",Zi="CMCD-Status",Ji={[qi]:["br","d","ot","tb"],[Xi]:["bl","dl","mtp","nor","nrr","su"],[Qi]:["cid","pr","sf","sid","st","v"],[Zi]:["bs","rtp"]};class es{constructor(e,t){Array.isArray(e)&&(e=e.map((e=>e instanceof es?e:new es(e)))),this.value=e,this.params=t}}function ts(e,t,n){return function(e,t,n,r){return new Error(`failed to ${e} "${i=t,Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":"object"==typeof i?JSON.stringify(i):String(i)}" as ${n}`,{cause:r});var i}("serialize",e,t,n)}class ns{constructor(e){this.description=e}}const rs="Bare Item";function is(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw ts(e,"Integer");return e.toString()}function ss(e,t){if(e<0)return-ss(-e,t);const n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){const t=Math.floor(e*n);return(t%2==0?t:t+1)/n}return Math.round(e*n)/n}function as(e){const t=ss(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw ts(e,"Decimal");const n=t.toString();return n.includes(".")?n:`${n}.0`}const os=/[\x00-\x1f\x7f]+/;function ls(e){const t=(n=e).description||n.toString().slice(7,-1);var n;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw ts(t,"Token");return t}function us(e){switch(typeof e){case"number":if(!r(e))throw ts(e,rs);return Number.isInteger(e)?is(e):as(e);case"string":return function(e){if(os.test(e))throw ts(e,"String");return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return ls(e);case"boolean":return function(e){if("boolean"!=typeof e)throw ts(e,"Boolean");return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${is(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return function(e){if(!1===ArrayBuffer.isView(e))throw ts(e,"Byte Sequence");return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}(e);if(e instanceof ns)return ls(e);default:throw ts(e,rs)}}function cs(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw ts(e,"Key");return e}function hs(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${cs(e)}`:`;${cs(e)}=${us(t)}`)).join("")}function ds(e){return e instanceof es?`${us(e.value)}${hs(e.params)}`:us(e)}const fs=e=>Math.round(e),ps=e=>100*fs(e/100),gs={br:fs,d:fs,bl:ps,dl:ps,mtp:ps,nor:(e,t)=>((null==t?void 0:t.baseUrl)&&(e=function(e,t){const n=new URL(e),r=new URL(t);if(n.origin!==r.origin)return e;const i=n.pathname.split("/").slice(1),s=r.pathname.split("/").slice(1,-1);for(;i[0]===s[0];)i.shift(),s.shift();for(;s.length;)s.shift(),i.unshift("..");return i.join("/")}(e,t.baseUrl)),encodeURIComponent(e)),rtp:ps,tb:fs};function ms(e,t={}){return e?function(e,t){return function(e,t={whitespace:!0}){if("object"!=typeof e)throw ts(e,"Dict");const n=e instanceof Map?e.entries():Object.entries(e),r=(null==t?void 0:t.whitespace)?" ":"";return Array.from(n).map((([e,t])=>{t instanceof es==0&&(t=new es(t));let n=cs(e);var r;return!0===t.value?n+=hs(t.params):(n+="=",Array.isArray(t.value)?n+=`(${(r=t).value.map(ds).join(" ")})${hs(r.params)}`:n+=ds(t)),n})).join(`,${r}`)}(e,t)}(function(e,t){const n={};if(null==e||"object"!=typeof e)return n;const i=Object.keys(e).sort(),s=b({},gs,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return i.forEach((i=>{if(null==a?void 0:a(i))return;let o=e[i];const l=s[i];l&&(o=l(o,t)),"v"===i&&1===o||"pr"==i&&1===o||function(e){return"number"==typeof e?r(e):null!=e&&""!==e&&!1!==e}(o)&&(function(e){return"ot"===e||"sf"===e||"st"===e}(i)&&"string"==typeof o&&(o=new ns(o)),n[i]=o)})),n}(e,t),b({whitespace:!1},t)):""}const vs=/CMCD=[^&#]+/;function ys(e,t,n,r){e&&Object.keys(t).forEach((i=>{const s=e.filter((e=>e.groupId===i)).map((e=>{const s=b({},e);return s.details=void 0,s.attrs=new Gt(s.attrs),s.url=s.attrs.URI=bs(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",n),s.groupId=s.attrs["GROUP-ID"]=t[i],s.attrs["PATHWAY-ID"]=r,s}));e.push(...s)}))}function bs(e,t,n,r){const{HOST:i,PARAMS:s,[n]:a}=r;let o;t&&(o=null==a?void 0:a[t],o&&(e=o));const l=new self.URL(e);return i&&!o&&(l.host=i),s&&Object.keys(s).sort().forEach((e=>{e&&l.searchParams.set(e,s[e])})),l.href}function Es(e,t,n){Ts(e,t,n),e.addEventListener(t,n)}function Ts(e,t,n){e.removeEventListener(t,n)}class Ss extends S{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=Ss.CDMCleanupPromise?[Ss.CDMCleanupPromise]:[],this.onMediaEncrypted=e=>{const{initDataType:t,initData:n}=e,r=`"${e.type}" event: init data type: "${t}"`;if(this.debug(r),null!==n){if(!this.keyFormatPromise){let e=Object.keys(this.keySystemAccessPromises);e.length||(e=an(this.config));const t=e.map(sn).filter((e=>!!e));this.keyFormatPromise=this.getKeyFormatPromise(t)}this.keyFormatPromise.then((i=>{const s=nn(i);let a,o;if("sinf"===t){if(s!==Qt.FAIRPLAY)return void this.warn(`Ignoring unexpected "${e.type}" event with init data type: "${t}" for selected key-system ${s}`);const i=ee(new Uint8Array(n));try{const e=pe(Yt(JSON.parse(i).sinf));if(!e)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");a=new Uint8Array(e.subarray(8,24)),o=Qt.FAIRPLAY}catch(e){return void this.warn(`${r} Failed to parse sinf: ${e}`)}}else{if(s!==Qt.WIDEVINE&&s!==Qt.PLAYREADY)return void this.warn(`Ignoring unexpected "${e.type}" event with init data type: "${t}" for selected key-system ${s}`);const i=function(e){const t=[];if(e instanceof ArrayBuffer){const n=e.byteLength;let r=0;for(;r+32<n;){const n=Te(new DataView(e,r));t.push(n),r+=n.size}}return t}(n),l=i.filter((e=>!!e.systemId&&rn(e.systemId)===s));l.length>1&&this.warn(`${r} Using first of ${l.length} pssh found for selected key-system ${s}`);const u=l[0];if(!u)return void(0===i.length||i.some((e=>!e.systemId))?this.warn(`${r} contains incomplete or invalid pssh data`):this.log(`ignoring ${r} for ${i.map((e=>rn(e.systemId))).join(",")} pssh data in favor of playlist keys`));if(o=rn(u.systemId),0===u.version&&u.data)if(o===Qt.WIDEVINE){const e=u.data.length-22;a=new Uint8Array(u.data.subarray(e,e+16))}else o===Qt.PLAYREADY&&(a=un(u.data))}if(!o||!a)return;const l=P(a),{keyIdToKeySessionPromise:u,mediaKeySessions:c}=this;let h=u[l];for(let e=0;e<c.length;e++){const r=c[e],i=r.decryptdata;if(!i.keyId)continue;const s=P(i.keyId);if(l===s||-1!==i.uri.replace(/-/g,"").indexOf(l)){if(h=u[s],i.pssh)break;delete u[s],i.pssh=new Uint8Array(n),i.keyId=a,h=u[l]=h.then((()=>this.generateRequestWithPreferredKeySession(r,t,n,"encrypted-event-key-match"))),h.catch((e=>this.handleError(e)));break}}if(!h){if(o!==s)return void this.log(`Ignoring "${e.type}" event with ${o} init data for selected key-system ${s}`);h=u[l]=this.getKeySystemSelectionPromise([o]).then((({keySystem:e,mediaKeys:r})=>{var i;this.throwIfDestroyed();const s=new hn("ISO-23001-7",l,null!=(i=sn(e))?i:"");return s.pssh=new Uint8Array(n),s.keyId=a,this.attemptSetMediaKeys(e,r).then((()=>{this.throwIfDestroyed();const i=this.createMediaKeySessionContext({decryptdata:s,keySystem:e,mediaKeys:r});return this.generateRequestWithPreferredKeySession(i,t,n,"encrypted-event-no-match")}))})),h.catch((e=>this.handleError(e)))}}))}},this.onWaitingForKey=e=>{this.log(`"${e.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(l.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(l.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(l.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(l.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(l.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(l.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(l.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(l.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];return r?r.licenseUrl:e===Qt.WIDEVINE&&n?n:void 0}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(void 0===t)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(e,t,n)=>!!e&&n.indexOf(e)===t,r=t.map((e=>e.audioCodec)).filter(n),i=t.map((e=>e.videoCodec)).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise(((t,n)=>{const s=e=>{const l=e.shift();this.getMediaKeysPromise(l,r,i).then((e=>t({keySystem:l,mediaKeys:e}))).catch((t=>{e.length?s(e):n(t instanceof ws?t:new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};s(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if("function"!=typeof n){let e=`Configured requestMediaKeySystemAccess is not a function ${n}`;return null===on&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return n(e,t)}getMediaKeysPromise(e,t,n){const r=function(e,t,n,r){let i;switch(e){case Qt.FAIRPLAY:i=["cenc","sinf"];break;case Qt.WIDEVINE:case Qt.PLAYREADY:i=["cenc"];break;case Qt.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,n,r){return[{initDataTypes:e,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs=${e}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null}))),videoCapabilities:n.map((e=>({contentType:`video/mp4; codecs=${e}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null})))}]}(i,t,n,r)}(e,t,n,this.config.drmSystemOptions),i=this.keySystemAccessPromises[e];let s=null==i?void 0:i.keySystemAccess;if(!s){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Ye(r)}`),s=this.requestMediaKeySystemAccess(e,r);const t=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),s.then((n=>{this.log(`Access for key-system "${n.keySystem}" obtained`);const r=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=n.createMediaKeys().then((n=>(this.log(`Media-keys created for "${e}"`),t.hasMediaKeys=!0,r.then((t=>t?this.setMediaKeysServerCertificate(n,e,t):n))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return s.then((()=>i.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${P(e.keyId||[])}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return P(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${P((null==(n=e.decryptdata)?void 0:n.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),r.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map((e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys}))).filter((({hasMediaKeys:e})=>!!e)).map((({keySystem:e})=>sn(e))).filter((e=>!!e))}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then((({keySystem:e,mediaKeys:t})=>this.attemptSetMediaKeys(e,t)))}selectKeySystem(e){return new Promise(((t,n)=>this.getKeySystemSelectionPromise(e).then((({keySystem:e})=>{const r=sn(e);r?t(r):n(new Error(`Unable to find format for key-system "${e}"`))})).catch(n)))}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=an(this.config),n=e.map(nn).filter((e=>!!e&&-1!==t.indexOf(e)));return this.selectKeySystem(n)}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let i=this.keyIdToKeySessionPromise[n];return i||(i=this.getKeySystemForKeyPromise(t).then((({keySystem:n,mediaKeys:i})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(n,i).then((()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:n,mediaKeys:i,decryptdata:t}))))))),(this.keyIdToKeySessionPromise[n]=i.then((e=>{const n=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(e,"cenc",n,"playlist-key")}))).catch((e=>this.handleError(e)))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof ws?this.hls.trigger(l.ERROR,e.data):this.hls.trigger(l.ERROR,{type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const t=nn(e.keyFormat),n=t?[t]:an(this.config);return this.attemptKeySystemAccess(n)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=an(this.config)),0===e.length)throw new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Ye({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then((()=>{if(!this.media)throw this.mediaKeys=null,new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then((()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===n.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,n,r){var i,s;const l=null==(i=this.config.drmSystems)||null==(s=i[e.keySystem])?void 0:s.generateRequest;if(l)try{const r=l.call(this.hls,t,n,e);if(!r)throw new Error("Invalid response from configured generateRequest filter");t=r.initDataType,n=r.initData?r.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(e){var u;if(this.warn(e.message),null!=(u=this.hls)&&u.config.debug)throw e}if(null===n)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${c} (init data type: ${t} length: ${n?n.byteLength:null})`);const h=new lr,d=e._onmessage=t=>{const n=e.mediaKeysSession;if(!n)return void h.emit("error",new Error("invalid state"));const{messageType:r,message:i}=t;this.log(`"${r}" message event for session "${n.sessionId}" message size: ${i.byteLength}`),"license-request"===r||"license-renewal"===r?this.renewLicense(e,i).catch((e=>{h.eventNames().length?h.emit("error",e):this.handleError(e)})):"license-release"===r?e.keySystem===Qt.FAIRPLAY&&(this.updateKeySession(e,qt("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${r}"`)},f=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void h.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const n=e.keyStatus;h.emit("keyStatus",n),"expired"===n&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};Es(e.mediaKeysSession,"message",d),Es(e.mediaKeysSession,"keystatuseschange",f);const p=new Promise(((e,t)=>{h.on("error",t),h.on("keyStatus",(n=>{n.startsWith("usable")?e():"output-restricted"===n?t(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${n}"`)):"expired"===n?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${n}"`)}))}));return e.mediaKeysSession.generateRequest(t,n).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${c}`)})).catch((e=>{throw new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>p)).catch((t=>{throw h.removeAllListeners(),this.removeSession(e),t})).then((()=>(h.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,n)=>{if("string"==typeof n&&"object"==typeof t){const e=n;n=t,t=e}this.log(`key status change "${t}" for keyStatuses keyId: ${P("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${P(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,n=new(0,t.loader)(t),r=this.getServerCertificateUrl(e);return r?(this.log(`Fetching server certificate for "${e}"`),new Promise(((i,s)=>{const l={responseType:"arraybuffer",url:r},u=t.certLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(e,t,n,r)=>{i(e.data)},onError:(t,n,i,u)=>{s(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:T({url:l.url,data:void 0},t)},`"${e}" certificate request failed (${r}). Status: ${t.code} (${t.text})`))},onTimeout:(t,n,i)=>{s(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${r})`))},onAbort:(e,t,n)=>{s(new Error("aborted"))}};n.load(l,c,h)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise(((r,i)=>{e.setServerCertificate(n).then((i=>{this.log(`setServerCertificate ${i?"success":"not supported by CDM"} (${null==n?void 0:n.byteLength}) on "${t}"`),r(e)})).catch((e=>{i(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=(new DOMParser).parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let t;for(let n=0,r=i.length;n<r;n++){var s,a;t=i[n];const r=null==(s=t.querySelector("name"))?void 0:s.textContent,o=null==(a=t.querySelector("value"))?void 0:a.textContent;r&&o&&e.setRequestHeader(r,o)}}const o=r.querySelector("Challenge"),l=null==o?void 0:o.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return qt(atob(l))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then((()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)})).catch((s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)})).then((n=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:n||r}))):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise(((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(4===l.readyState)if(200===l.status){this._requestLicenseFailureCount=0;let t=l.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const n=this.config.licenseResponseCallback;if(n)try{t=n.call(this.hls,l,s,e)}catch(e){this.error(e)}r(t)}else{const u=n.errorRetry,c=u?u.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new ws({type:a.KEY_SYSTEM_ERROR,details:o.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const n=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${n} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then((({xhr:t,licenseChallenge:n})=>{e.keySystem==Qt.PLAYREADY&&(n=this.unpackPlayReadyKeyMessage(t,n)),t.send(n)}))}))}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Es(n,"encrypted",this.onMediaEncrypted),Es(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(Ts(e,"encrypted",this.onMediaEncrypted),Ts(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,hn.clearKeyUriToKeyIdMap();const r=n.length;Ss.CDMCleanupPromise=Promise.all(n.map((e=>this.removeSession(e))).concat(null==t||null==(e=t.setMediaKeys(null))?void 0:e.catch((e=>{var t;this.log(`Could not clear media keys: ${e}`),null==(t=this.hls)||t.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${e}`)})})))).catch((e=>{var t;this.log(`Could not close sessions and clear media keys: ${e}`),null==(t=this.hls)||t.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${e}`)})})).then((()=>{r&&this.log("finished closing key sessions and clearing media keys")}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const r=this.mediaKeySessions.indexOf(e);r>-1&&this.mediaKeySessions.splice(r,1);const{drmSystemOptions:i}=this.config,s=function(e){var t;return"persistent-license"===e.sessionType||!(null==(t=e.sessionTypes)||!t.some((e=>"persistent-license"===e)))}(i)?new Promise(((e,n)=>{self.setTimeout((()=>n(new Error("MediaKeySession.remove() timeout"))),8e3),t.remove().then(e)})):Promise.resolve();return s.catch((e=>{var t;this.log(`Could not remove session: ${e}`),null==(t=this.hls)||t.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${e}`)})})).then((()=>t.close())).catch((e=>{var t;this.log(`Could not close session: ${e}`),null==(t=this.hls)||t.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${e}`)})}))}}}Ss.CDMCleanupPromise=void 0;class ws extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function _s(e,t){let n;try{n=new Event("addtrack")}catch(e){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function As(e,t){const n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(n){C.debug(`[texttrack-utils]: ${n}`);try{const n=new self.TextTrackCue(t.startTime,t.endTime,t.text);n.id=t.id,e.addCue(n)}catch(e){C.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===n&&(e.mode=n)}function ks(e,t){const n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues)for(let n=e.cues.length;n--;)t&&e.cues[n].removeEventListener("enter",t),e.removeCue(e.cues[n]);"disabled"===n&&(e.mode=n)}function Ls(e,t,n,r){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0){const i=function(e,t,n){const r=[],i=function(e,t){if(t<=e[0].startTime)return 0;const n=e.length-1;if(t>e[n].endTime)return-1;let r,i=0,s=n;for(;i<=s;)if(r=Math.floor((s+i)/2),t<e[r].startTime)s=r-1;else{if(!(t>e[r].startTime&&i<n))return r;i=r+1}return e[i].startTime-t<t-e[s].startTime?i:s}(e,t);if(i>-1)for(let s=i,a=e.length;s<a;s++){const i=e[s];if(i.startTime>=t&&i.endTime<=n)r.push(i);else if(i.startTime>n)return r}return r}(e.cues,t,n);for(let t=0;t<i.length;t++)r&&!r(i[t])||e.removeCue(i[t])}"disabled"===i&&(e.mode=i)}function Cs(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];"subtitles"!==r.kind&&"captions"!==r.kind||!r.label||t.push(e[n])}return t}function Rs(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()}const Is=.025;let xs=function(e){return e[e.Point=0]="Point",e[e.Range=1]="Range",e}({});function Ps(e,t,n){return`${e.identifier}-${n+1}-${Rs(t)}`}class Ds{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,null==(e=this.assetListLoader)||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return!(e<=0||isNaN(n))&&(0===n||((null==(t=this.assetList[e])?void 0:t.startOffset)||0)>n)}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Os(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(0===this.startTime||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime;return t-Os(t,e)<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=r(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Os(e,t)}return e}get appendInPlace(){return!!this.appendInPlaceStarted||!this.appendInPlaceDisabled&&!(this.cue.once||this.cue.pre||!this.startIsAligned||!(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<Is))}set appendInPlace(e){this.appendInPlaceStarted?this.resetOnResume=!e:this.appendInPlaceDisabled=!e}get timelineStart(){return null!==this._timelineStart?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return t=null!==this._duration?this._duration:this.dateRange.duration?this.dateRange.duration:this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return"RANGE"===this.dateRange.attr["X-TIMELINE-OCCUPIES"]?xs.Range:xs.Point}get supplementsPrimary(){return"PRIMARY"===this.dateRange.attr["X-TIMELINE-STYLE"]}get contentMayVary(){return"NO"!==this.dateRange.attr["X-CONTENT-MAY-VARY"]}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||null!==this.assetListResponse}toString(){return`["${(e=this).identifier}" ${e.cue.pre?"<pre>":e.cue.post?"<post>":""}${e.timelineStart.toFixed(2)}-${e.resumeTime.toFixed(2)}]`;var e}}function Os(e,t){return e-t.start<t.duration/2&&!(Math.abs(e-(t.start+t.duration))<Is)?t.start:t.start+t.duration}function Ms(e,t,n){const r=new self.URL(e,n);return"data:"!==r.protocol&&r.searchParams.set("_HLS_primary_id",t),r}function Ns(e,t){for(;null!=(n=e.assetList[++t])&&n.error;)var n;return t}function Fs(e){const t=e.timelineStart,n=e.duration||0;return`["${e.identifier}" ${t.toFixed(2)}-${(t+n).toFixed(2)}]`}class Bs{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls.trigger(l.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;let s=r.uri;try{s=Ms(s,t.primarySessionId).href}catch(e){}i.loadSource(s);const a=()=>{this.hasDetails=!0};i.once(l.LEVEL_LOADED,a),i.once(l.AUDIO_TRACK_LOADED,a),i.once(l.SUBTITLE_TRACK_LOADED,a),i.on(l.MEDIA_ATTACHING,((e,{media:t})=>{this.removeMediaListeners(),this.mediaAttached=t,this.interstitial.playoutLimit&&(t.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(l.BUFFER_APPENDED,(()=>{const e=this.bufferedEnd;this.reachedPlayout(e)&&(this._bufferedEosTime=e,i.trigger(l.BUFFERED_TO_END,void 0))})))}))}get appendInPlace(){var e;return(null==(e=this.interstitial)?void 0:e.appendInPlace)||!1}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if(null!=(t=this.hls)&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const n=this.timelineOffset,r=Ot.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=this._bufferedEosTime-.02}reachedPlayout(e){const t=this.interstitial.playoutLimit;return this.startOffset+e>=t}get destroyed(){var e;return!(null!=(e=this.hls)&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return(null==(e=this.hls)?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=Ot.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){return this.assetItem.duration||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return(null==(e=this.hls)?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){var e;this.mediaAttached&&null!=(e=this.hls)&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}resetDetails(){const e=this.hls;if(this.hasDetails){e.stopLoad();const t=e=>delete e.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${Fs(this.assetItem)} ${null==(e=this.hls)?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}class Us extends S{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach((e=>e.reset())),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce(((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n),0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(void 0===t&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&null!=(i=r[n])&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&"primary"!==t&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const e=n[r].event;if(null!=e&&e.restrictions.jump&&!e.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if((null==(n=t[r].event)?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let e=0;e<r;e++){const r=n[e];if(!r.error){const n=r.timelineStart;if(t===n||t>n&&t<n+(r.duration||0))return e}}return 0}get assetIdAtEnd(){var e,t;const n=null==(e=this.items)||null==(t=e[this.length-1])?void 0:t.event;if(n){const e=n.assetList,t=e[e.length-1];if(t)return t.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),a=Object.keys(r),o=i?i.filter((e=>!a.includes(e.identifier))):[];s.length&&s.sort(((e,t)=>{const n=e.cue.pre,r=e.cue.post,i=t.cue.pre,s=t.cue.post;if(n&&!i)return-1;if(i&&!n)return 1;if(r&&!s)return 1;if(s&&!r)return-1;if(!(n||i||r||s)){const n=e.startTime,r=t.startTime;if(n!==r)return n-r}return e.dateRange.tagOrder-t.dateRange.tagOrder})),this.events=s,o.forEach((e=>{this.removeEvent(e)})),this.updateSchedule(e,o)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const r=this.items,i=this.parseSchedule(n,e);(t.length||(null==r?void 0:r.length)!==i.length||i.some(((e,t)=>Math.abs(e.playout.start-r[t].playout.start)>.005||Math.abs(e.playout.end-r[t].playout.end)>.005)))&&(this.items=i,this.onScheduleUpdate(t,r))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const a=i[s],o=e[a];if(o.isInterstitial){let e=this.eventMap[a];e?e.setDateRange(o):(e=new Ds(o,t),this.eventMap[a]=e,!1===n&&(e.appendInPlace=n)),r.push(e)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if((e=e.filter((e=>!(e.error||e.cue.once&&e.hasPlayed)))).length){this.resolveOffsets(e,t);let r=0,o=0;if(e.forEach(((t,a)=>{const l=t.cue.pre,u=t.cue.post,c=e[a-1]||null,h=t.appendInPlace,d=u?i:t.startOffset,f=t.duration,p=t.timelineOccupancy===xs.Range?f:0,g=t.resumptionOffset,m=(null==c?void 0:c.startTime)===d,v=d+t.cumulativeDuration;let y=h?v+f:d+g;if(l||!u&&d<=0){const e=o;o+=p,t.timelineStart=v;const r=s;s+=f,n.push({event:t,start:v,end:y,playout:{start:r,end:s},integrated:{start:e,end:o}})}else{if(!(d<=i))return;{if(!m){const i=d-r;if(i>.033){const l=r,u=o;o+=i;const c=s;s+=i;const h={previousEvent:e[a-1]||null,nextEvent:t,start:l,end:l+i,playout:{start:c,end:s},integrated:{start:u,end:o}};n.push(h)}else i>0&&c&&(c.cumulativeDuration+=i,n[n.length-1].end=d)}u&&(y=v),t.timelineStart=v;const i=o;o+=p;const l=s;s+=f,n.push({event:t,start:v,end:y,playout:{start:l,end:s},integrated:{start:i,end:o}})}}const b=t.resumeTime;r=u||b>i?i:b})),r<i){var a;const e=r,t=o,l=i-r;o+=l;const u=s;s+=l,n.push({previousEvent:(null==(a=n[n.length-1])?void 0:a.event)||null,nextEvent:null,start:r,end:e+l,playout:{start:u,end:s},integrated:{start:t,end:o}})}this.setDurations(i,s,o)}else{const e=0;n.push({previousEvent:null,nextEvent:null,start:e,end:i,playout:{start:e,end:i},integrated:{start:e,end:i}}),this.setDurations(i,i,i)}return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,i=n.live?1/0:n.edge;let s=0,a=-1;e.forEach(((o,l)=>{const u=o.cue.pre,c=o.cue.post,h=u?0:c?i:o.startTime;this.updateAssetDurations(o),a===h?o.cumulativeDuration=s:(s=0,a=h),!c&&o.snapOptions.in&&(o.resumeAnchor=it(null,n.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<.033&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const d=r(o.resumeOffset)?o.resumeOffset:o.duration;s+=d}))}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>Is?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):t?!Object.keys(t).some((r=>{const i=t[r].details,s=i.edge;if(n>=s)return this.log(`"${e.identifier}" resumption ${n} past ${r} playlist end ${s}`),!1;const a=it(null,i.fragments,n);if(!a)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${r} playlist (${i.fragStart}-${i.fragmentEnd})`),!0;const o="audio"===r?.175:0;return!(Math.abs(a.start-n)<Is+o||Math.abs(a.end-n)<Is+o||(this.log(`"${e.identifier}" resumption ${n} not aligned with ${r} fragment bounds (${a.start}-${a.end} sn: ${a.sn} cc: ${a.cc})`),0))})):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;e.assetList.forEach(((e,s)=>{const a=t+n;e.startOffset=n,e.timelineStart=a,r||(r=null===e.duration),i||(i=!!e.error);const o=e.error?0:e.duration||0;n+=o})),e.duration=r&&!i?Math.max(n,e.duration):n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function $s(e){return`[${e.event?'"'+e.event.identifier+'"':"primary"}: ${e.start.toFixed(2)}-${e.end.toFixed(2)}]`}class Hs{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Ms(n,this.hls.sessionId,e.baseUrl)}catch(t){const r=this.assignAssetListError(e,o.ASSET_LIST_LOAD_ERROR,t,n);return void this.hls.trigger(l.ERROR,r)}t&&"data:"!==r.protocol&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=new(0,i.loader)(i),a={responseType:"json",url:r.href},u=i.interstitialAssetListLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(t,n,r,i)=>{const s=t.data,a=null==s?void 0:s.ASSETS;if(Array.isArray(a))e.assetListResponse=s,this.hls.trigger(l.ASSET_LIST_LOADED,{event:e,assetListResponse:s,networkDetails:i});else{const t=this.assignAssetListError(e,o.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),r.url,n,i);this.hls.trigger(l.ERROR,t)}},onError:(t,n,r,i)=>{const s=this.assignAssetListError(e,o.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${t.code} ${t.text} (${n.url})`),n.url,i,r);this.hls.trigger(l.ERROR,s)},onTimeout:(t,n,r)=>{const i=this.assignAssetListError(e,o.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${n.url})`),n.url,t,r);this.hls.trigger(l.ERROR,i)}};return s.load(a,c,h),this.hls.trigger(l.ASSET_LIST_LOADING,{event:e}),s}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:a.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Gs(e){null==e||e.play().catch((()=>{}))}class js{constructor(e){this.buffered=void 0;const t=(t,n,r)=>{if((n>>>=0)>r-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${r})`);return e[n][t]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Vs={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},zs=e=>String.fromCharCode(Vs[e]||e),Ks=15,Ws=100,Ys={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},qs={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Xs={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Qs={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Zs=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Js{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n="function"==typeof t?t():t;C.log(`${this.time} [${e}] ${n}`)}}}const ea=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class ta{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class na{constructor(){this.uchar=" ",this.penState=new ta}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class ra{constructor(e){this.chars=[],this.pos=0,this.currPenState=new ta,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<Ws;e++)this.chars.push(new na);this.logger=e}equals(e){for(let t=0;t<Ws;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Ws;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Ws;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ws&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ws)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e<t+1;e++)this.chars[e].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=zs(e);this.pos>=Ws?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<Ws;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<Ws;n++){const r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class ia{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Ks;t++)this.rows.push(new ra(e));this.logger=e}reset(){for(let e=0;e<Ks;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let n=0;n<Ks;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Ks;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Ks;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+Ye(e)));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let e=0;e<Ks;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){const r=n.rows[e].cueStartTime,i=this.logger.time;if(null!==r&&null!==i&&r<i)for(let r=0;r<this.nrRollUpRows;r++)this.rows[t-this.nrRollUpRows+r+1].copy(n.rows[e+r])}}this.currRow=t;const n=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,r=Math.max(t-1,0);n.setCursor(e.indent),e.color=n.chars[r].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+Ye(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let n=0;n<Ks;n++){const i=this.rows[n].getTextString();i&&(r=n+1,e?t.push("Row "+r+": '"+i+"'"):t.push(i.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}getTextAndFormat(){return this.rows}}class sa{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new ia(n),this.nonDisplayedMemory=new ia(n),this.lastOutputScreen=new ia(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>t+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+Ye(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class aa{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const r=this.logger=new Js;this.channels=[null,new sa(e,t,r),new sa(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let e=0;e<t.length;e+=2){const n=127&t[e],r=127&t[e+1];let i=!1,s=null;if(0===n&&0===r)continue;this.logger.log(3,(()=>"["+ea([t[e],t[e+1]])+"] -> ("+ea([n,r])+")"));const a=this.cmdHistory;if(n>=16&&n<=31){if(la(n,r,a)){oa(null,null,a),this.logger.log(3,(()=>"Repeated command ("+ea([n,r])+") is dropped"));continue}oa(n,r,this.cmdHistory),i=this.parseCmd(n,r),i||(i=this.parseMidrow(n,r)),i||(i=this.parsePAC(n,r)),i||(i=this.parseBackgroundAttributes(n,r))}else oa(null,null,a);if(!i&&(s=this.parseChars(n,r),s)){const e=this.currentChannel;e&&e>0?this.channels[e].insertChars(s):this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||s||this.logger.log(2,(()=>"Couldn't parse cleaned data "+ea([n,r])+" orig: "+ea([t[e],t[e+1]])))}}parseCmd(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;const n=20===e||21===e||23===e?1:2,r=this.channels[n];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.currentChannel=n,!0}parseMidrow(e,t){let n=0;if((17===e||25===e)&&t>=32&&t<=47){if(n=17===e?1:2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(3,(()=>"MIDROW ("+ea([e,t])+")")),!0)}return!1}parsePAC(e,t){let n;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;const r=e<=23?1:2;n=t>=64&&t<=95?1===r?Ys[e]:Xs[e]:1===r?qs[e]:Qs[e];const i=this.channels[r];return!!i&&(i.setPAC(this.interpretPAC(n,t)),this.currentChannel=r,!0)}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=!(1&~n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let e;e=17===i?t+80:18===i?t+112:t+144,this.logger.log(2,(()=>"Special char '"+zs(e)+"' in channel "+n)),r=[e]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);return r&&this.logger.log(3,(()=>"Char codes = "+ea(r).join(","))),r}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;let n;const r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=Zs[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));const i=e<=23?1:2;return this.channels[i].setBkgData(r),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}oa(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function oa(e,t,n){n.a=e,n.b=t}function la(e,t,n){return n.a===e&&n.b===t}var ua=function(){if(null!=Xt&&Xt.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e,...t){let n=1;for(;n<arguments.length;n++){const t=arguments[n];for(const n in t)e[n]=t[n]}return e}function s(t,s,a){const o=this,l={enumerable:!0};o.hasBeenReset=!1;let u="",c=!1,h=t,d=s,f=a,p=null,g="",m=!0,v="auto",y="start",b=50,E="middle",T=50,S="middle";Object.defineProperty(o,"id",i({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(o,"pauseOnExit",i({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(o,"startTime",i({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",i({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",i({},l,{get:function(){return g},set:function(t){const r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",i({},l,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",i({},l,{get:function(){return y},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",i({},l,{get:function(){return E},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",i({},l,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",i({},l,{get:function(){return S},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),o.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class ca{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function ha(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}const n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}class da{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function fa(e,t,n,r){const i=r?e.split(r):[e];for(const e in i){if("string"!=typeof i[e])continue;const r=i[e].split(n);2===r.length&&t(r[0],r[1])}}const pa=new ua(0,0,""),ga="middle"===pa.align?"middle":"center";function ma(e,t,n){const r=e;function i(){const t=ha(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function s(){e=e.replace(/^\s+/,"")}if(s(),t.startTime=i(),s(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),s(),t.endTime=i(),s(),function(e,t){const r=new da;fa(e,(function(e,t){let i;switch(e){case"region":for(let i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",ga,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",ga,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",ga,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");let i=r.get("line","auto");"auto"===i&&-1===pa.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",ga);let s=r.get("position","auto");"auto"===s&&50===pa.position&&(s="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=s}(e,t)}function va(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class ya{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new ca,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function n(){let e=t.buffer,n=0;for(e=va(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;const r=e.slice(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.slice(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=n();const r=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==r||!r[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let r=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(r?r=!1:e=n(),t.state){case"HEADER":/:/.test(e)?fa(e,(function(e,t){}),/:/):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new ua(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{ma(e,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const n=-1!==e.indexOf("--\x3e");if(!e||n&&(r=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const ba=/\r\n|\n\r|\n|\r/g,Ea=function(e,t,n=0){return e.slice(n,n+t.length)===t};function Ta(e,t,n){return Rs(e.toString())+Rs(t.toString())+Rs(n)}const Sa="stpp.ttml.im1t",wa=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,_a=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Aa={left:"start",center:"center",right:"end",start:"start",end:"end"};function ka(e,t,n,r){const i=ae(new Uint8Array(e),["mdat"]);if(0===i.length)return void r(new Error("Could not parse IMSC1 mdat"));const s=i.map((e=>x(e))),a=function(e,t,n=1,r=!1){return hi(e,t,1/n,r)}(t.baseTime,1,t.timescale);try{s.forEach((e=>n(function(e,t){const n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce(((e,t)=>(e[t]=n.getAttribute(`ttp:${t}`)||r[t],e)),{}),s="preserve"!==n.getAttribute("xml:space"),a=Ca(La(n,"styling","style")),o=Ca(La(n,"layout","region")),l=La(n,"body","[begin]");return[].map.call(l,(e=>{const n=Ra(e,s);if(!n||!e.hasAttribute("begin"))return null;const r=Pa(e.getAttribute("begin"),i),l=Pa(e.getAttribute("dur"),i);let u=Pa(e.getAttribute("end"),i);if(null===r)throw xa(e);if(null===u){if(null===l)throw xa(e);u=r+l}const c=new ua(r-t,u-t,n);c.id=Ta(c.startTime,c.endTime,c.text);const h=function(e,t,n){const r="http://www.w3.org/ns/ttml#styling";let i=null;const s=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return s&&n.hasOwnProperty(s)&&(i=n[s]),["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce(((n,s)=>{const a=Ia(t,r,s)||Ia(e,r,s)||Ia(i,r,s);return a&&(n[s]=a),n}),{})}(o[e.getAttribute("region")],a[e.getAttribute("style")],a),{textAlign:d}=h;if(d){const e=Aa[d];e&&(c.lineAlign=e),c.align=d}return b(c,h),c})).filter((e=>null!==e))}(e,a))))}catch(e){r(e)}}function La(e,t,n){const r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function Ca(e){return e.reduce(((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function Ra(e,t){return[].slice.call(e.childNodes).reduce(((e,n,r)=>{var i;return"br"===n.nodeName&&r?e+"\n":null!=(i=n.childNodes)&&i.length?Ra(n,t):t?e+n.textContent.trim().replace(/\s+/g," "):e+n.textContent}),"")}function Ia(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function xa(e){return new Error(`Could not parse ttml timestamp ${e}`)}function Pa(e,t){if(!e)return null;let n=ha(e);return null===n&&(wa.test(e)?n=function(e,t){const n=wa.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):_a.test(e)&&(n=function(e,t){const n=_a.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}class Da{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}function Oa(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function Ma(e,t){return!!e&&e.kind===Oa(t)&&Oi(t,e)}const Na=/\s/,Fa={newCue(e,t,n,r){const i=[];let s,a,o,l,u;const c=self.VTTCue||self.TextTrackCue;for(let d=0;d<r.rows.length;d++)if(s=r.rows[d],o=!0,l=0,u="",!s.isEmpty()){var h;for(let e=0;e<s.chars.length;e++)Na.test(s.chars[e].uchar)&&o?l++:(u+=s.chars[e].uchar,o=!1);s.cueStartTime=t,t===n&&(n+=1e-4),l>=16?l--:l++;const r=va(u.trim()),f=Ta(t,n,r);null!=e&&null!=(h=e.cues)&&h.getCueById(f)||(a=new c(t,n,r),a.id=f,a.line=d+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*l/32)),i.push(a))}return e&&i.length&&(i.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),i.forEach((t=>As(e,t)))),i}},Ba=/(\d+)-(\d+)\/(\d+)/;class Ua{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||$a,this.controller=new self.AbortController,this.stats=new G}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const s=function(e,t){const n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(b({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),a="arraybuffer"===e.responseType,o=a?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=l&&r(l)?l:u,this.requestTimeout=self.setTimeout((()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))}),t.timeout),(ki(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then((n=>{var s;this.response=this.loader=n;const o=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout((()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))}),u-(o-i.loading.start)),!n.ok){const{status:e,statusText:t}=n;throw new Ha(t||"fetch, bad network response",e,n)}i.loading.first=o,i.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=Ba.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(r(e))return e}const n=e.get("Content-Length");if(n)return parseInt(n)}(n.headers)||i.total;const l=null==(s=this.callbacks)?void 0:s.onProgress;return l&&r(t.highWaterMark)?this.loadProgressively(n,i,e,t.highWaterMark,l):a?n.arrayBuffer():"json"===e.responseType?n.json():n.text()})).then((n=>{var s,a;const l=this.response;if(!l)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const u=n[o];u&&(i.loaded=i.total=u);const c={url:l.url,data:n,code:l.status},h=null==(s=this.callbacks)?void 0:s.onProgress;h&&!r(t.highWaterMark)&&h(i,e,n,l),null==(a=this.callbacks)||a.onSuccess(c,i,e,l)})).catch((t=>{var n;if(self.clearTimeout(this.requestTimeout),i.aborted)return;const r=t&&t.code||0,s=t?t.message:null;null==(n=this.callbacks)||n.onError({code:r,text:s},e,t?t.details:null,i)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new ir,a=e.body.getReader(),o=()=>a.read().then((a=>{if(a.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const l=a.value,u=l.length;return t.loaded+=u,u<r||s.dataLength?(s.push(l),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,l.buffer,e),o()})).catch((()=>Promise.reject()));return o()}}function $a(e,t){return new self.Request(e.url,t)}class Ha extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const Ga=/^age:\s*[\d.]+\s*$/im;class ja{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new G,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then((()=>{if(this.loader===n&&!this.stats.aborted)return i(n,t.url)})).catch((e=>{if(this.loader===n&&!this.stats.aborted)return n.open("GET",t.url,!0),i(n,t.url)})).then((()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)})).catch((e=>{var i;null==(i=this.callbacks)||i.onError({code:n.status,text:e.message},t,n,r)})):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:a}=n.loadPolicy;if(i)for(const t in i)e.setRequestHeader(t,i[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=s&&r(s)?s:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),4===r)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const r=t.status,l="text"===t.responseType?t.responseText:null;if(r>=200&&r<300){const i=null!=l?l:t.response;if(null!=i){var s,a;n.loading.end=Math.max(self.performance.now(),n.loading.first);const o="arraybuffer"===t.responseType?i.byteLength:i.length;n.loaded=n.total=o,n.bwEstimate=8e3*n.total/(n.loading.end-n.loading.first);const l=null==(s=this.callbacks)?void 0:s.onProgress;l&&l(n,e,i,t);const u={url:t.responseURL,data:i,code:r};return void(null==(a=this.callbacks)||a.onSuccess(u,n,e,t))}}const u=i.loadPolicy.errorRetry;var o;dt(u,n.retry,!1,{url:e.url,data:void 0,code:r})?this.retry(u):(C.error(`${r} while loading ${e.url}`),null==(o=this.callbacks)||o.onError({code:r,text:t.statusText},e,t,n))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry;if(dt(e,this.stats.retry,!0))this.retry(e);else{var t;C.warn(`timeout while loading ${null==(t=this.context)?void 0:t.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=ct(e,n.retry),n.retry++,C.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Ga.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Va=T(T({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:6e7,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:ja,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class extends S{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=e=>{var t;const{fragCurrent:n,partCurrent:i,hls:s}=this,{autoLevelEnabled:a,media:o}=s;if(!n||!o)return;const u=performance.now(),c=i?i.stats:n.stats,h=i?i.duration:n.duration,d=u-c.loading.start,f=s.minAutoLevel,p=n.level,g=this._nextAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||p<=f)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!a)return;const m=g>-1&&g!==p,v=!!e||m;if(!v&&(o.paused||!o.playbackRate||!o.readyState))return;const y=s.mainForwardBufferInfo;if(!v&&null===y)return;const b=this.bwEstimator.getEstimateTTFB(),E=Math.abs(o.playbackRate);if(d<=Math.max(b,h/(2*E)*1e3))return;const T=y?y.len/E:0,S=c.loading.first?c.loading.first-c.loading.start:-1,w=c.loaded&&S>-1,_=this.getBwEstimate(),A=s.levels,k=A[p],L=Math.max(c.loaded,Math.round(h*(n.bitrate||k.averageBitrate)/8));let C=w?d-S:d;C<1&&w&&(C=Math.min(d,8*c.loaded/_));const R=w?1e3*c.loaded/C:0,I=b/1e3,x=R?(L-c.loaded)/R:8*L/_+I;if(x<=T)return;const P=R?8*R:_,D=!0===(null==(t=(null==e?void 0:e.details)||this.hls.latestLevelDetails)?void 0:t.live),O=this.hls.config.abrBandWidthUpFactor;let M,N=Number.POSITIVE_INFINITY;for(M=p-1;M>f;M--){const e=A[M].maxBitrate,t=!A[M].details||D;if(N=this.getTimeToLoadFrag(I,P,h*e,t),N<Math.min(T,h+I))break}if(N>=x)return;if(N>10*h)return;w?this.bwEstimator.sample(d-Math.min(b,S),c.loaded):this.bwEstimator.sampleTTFB(d);const F=A[M].maxBitrate;this.getBwEstimate()*O>F&&this.resetEstimator(F);const B=this.findBestLevel(F,f,M,0,T,1,1);B>-1&&(M=B),this.warn(`Fragment ${n.sn}${i?" part "+i.index:""} of level ${p} is loading too slowly;\n Fragment duration: ${n.duration.toFixed(3)}\n Time to underbuffer: ${T.toFixed(3)} s\n Estimated load time for current fragment: ${x.toFixed(3)} s\n Estimated load time for down switch fragment: ${N.toFixed(3)} s\n TTFB estimate: ${0|S} ms\n Current BW estimate: ${r(_)?0|_:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${M} @ ${0|F} bps`),s.nextLoadLevel=s.nextAutoLevel=M,this.clearTimer();const U=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===M&&M>0){const e=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${M>0?"and switching down":""}\n Fragment duration: ${n.duration.toFixed(3)} s\n Time to underbuffer: ${e.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,M>f){let t=this.findBestLevel(this.hls.levels[f].bitrate,f,M,0,e,1,1);-1===t&&(t=f),this.hls.nextLoadLevel=this.hls.nextAutoLevel=t,this.resetEstimator(this.hls.levels[t].bitrate)}}};m||x>2*N?U():this.timer=self.setInterval(U,1e3*N),s.trigger(l.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:i,stats:c})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new v(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.FRAG_LOADING,this.onFragLoading,this),e.on(l.FRAG_LOADED,this.onFragLoaded,this),e.on(l.FRAG_BUFFERED,this.onFragBuffered,this),e.on(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(l.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(l.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.FRAG_LOADING,this.onFragLoading,this),e.off(l.FRAG_LOADED,this.onFragLoaded,this),e.off(l.FRAG_BUFFERED,this.onFragBuffered,this),e.off(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(l.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(l.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(l.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;var r;this.ignoreFragment(n)||(n.bitrateTest||(this.fragCurrent=n,this.partCurrent=null!=(r=t.part)?r:null),this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100))}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case o.BUFFER_ADD_CODEC_ERROR:case o.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case o.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:n,partCurrent:r}=this;if(e&&n&&e.sn===n.sn&&e.level===n.level){const t=performance.now(),n=r?r.stats:e.stats,i=t-n.loading.start,s=n.loading.first?n.loading.first-n.loading.start:-1;if(n.loaded&&s>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(i-Math.min(e,s),n.loaded)}else this.bwEstimator.sampleTTFB(i)}break}}}getTimeToLoadFrag(e,t,n,r){return e+n/t+(r?e+this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const n=this.hls.config,{loading:i}=t.stats,s=i.end-i.first;r(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===f&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=n?n.duration:t.duration,i=this.hls.levels[t.level],s=(i.loaded?i.loaded.bytes:0)+r.loaded,a=(i.loaded?i.loaded.duration:0)+e;i.loaded={bytes:s,duration:a},i.realBitrate=Math.round(8*s/a)}if(t.bitrateTest){const e={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(l.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=null!=r&&r.stats.loaded?r.stats:n.stats;if(i.aborted)return;if(this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==f||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,a=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${a}`),a}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&n&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const r=t&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,r)&&t[e].loadError<=t[r].loadError)return e}return this._nextAutoLevel=r,this.nextAutoLevelKey=this.getAutoLevelKey(),r}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,a=t?t.duration:e?e.duration:0,o=this.getBwEstimate(),l=this.getStarvationDelay();let u=i.abrBandWidthFactor,c=i.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(o,s,r,l,0,u,c);if(e>=0)return this.rebufferNotice=-1,e}let h=a?Math.min(a,i.maxStarvationDelay):i.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;e&&(h=(a?Math.min(a,i.maxLoadingDelay):i.maxLoadingDelay)-e,this.info(`bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*h)} ms`),u=c=1)}const d=this.findBestLevel(o,s,r,l,h,u,c);if(this.rebufferNotice!==d&&(this.rebufferNotice=d,this.info(`${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${d}`)),d>-1)return d;const f=n.levels[s],p=n.loadLevelObj;return p&&(null==f?void 0:f.bitrate)<p.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,i,s,a,o){var l;const u=i+s,c=this.lastLoadedFragLevel,h=-1===c?this.hls.firstLevel:c,{fragCurrent:d,partCurrent:f}=this,{levels:p,allAudioTracks:g,loadLevel:m,config:v}=this.hls;if(1===p.length)return 0;const y=p[h],b=!(null==(l=this.hls.latestLevelDetails)||!l.live),E=-1===m||-1===c;let T,S="SDR",w=(null==y?void 0:y.frameRate)||0;const{audioPreference:_,videoPreference:A}=v,k=this.audioTracksByGroup||(this.audioTracksByGroup=Xe(g));let L=-1;if(E){if(-1!==this.firstSelection)return this.firstSelection;const i=this.codecTiers||(this.codecTiers=function(e,t,n,r){return e.slice(n,r+1).reduce(((e,n,r)=>{if(!n.codecSet)return e;const i=n.audioGroups;let s=e[n.codecSet];s||(e[n.codecSet]=s={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:r,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!i,fragmentError:0}),s.minBitrate=Math.min(s.minBitrate,n.bitrate);const a=Math.min(n.height,n.width);return s.minHeight=Math.min(s.minHeight,a),s.minFramerate=Math.min(s.minFramerate,n.frameRate),s.minIndex=Math.min(s.minIndex,r),s.maxScore=Math.max(s.maxScore,n.score),s.fragmentError+=n.fragmentError,s.videoRanges[n.videoRange]=(s.videoRanges[n.videoRange]||0)+1,i&&i.forEach((e=>{if(!e)return;const n=t.groups[e];n&&(s.hasDefaultAudio=s.hasDefaultAudio||t.hasDefaultAudio?n.hasDefault:n.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(n.channels).forEach((e=>{s.channels[e]=(s.channels[e]||0)+n.channels[e]})))})),e}),{})}(p,k,t,n)),s=function(e,t,n,i,s){const a=Object.keys(e),o=null==i?void 0:i.channels,l=null==i?void 0:i.audioCodec,u=null==s?void 0:s.videoCodec,c=o&&2===parseInt(o);let h=!1,d=!1,f=1/0,p=1/0,g=1/0,m=1/0,v=0,y=[];const{preferHDR:b,allowedVideoRanges:E}=function(e,t){let n=!1,r=[];if(e&&(n="SDR"!==e,r=[e]),t){r=t.allowedVideoRanges||je.slice(0);const e="SDR"!==r.join("")&&!t.videoCodec;n=void 0!==t.preferHDR?t.preferHDR:e&&function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),n||(r=["SDR"])}return{preferHDR:n,allowedVideoRanges:r}}(t,s);for(let t=a.length;t--;){const n=e[a[t]];h||(h=n.channels[2]>0),f=Math.min(f,n.minHeight),p=Math.min(p,n.minFramerate),g=Math.min(g,n.minBitrate),E.filter((e=>n.videoRanges[e]>0)).length>0&&(d=!0)}f=r(f)?f:0,p=r(p)?p:0;const T=Math.max(1080,f),S=Math.max(30,p);g=r(g)?g:n,n=Math.max(g,n),d||(t=void 0);const w=a.length>1;return{codecSet:a.reduce(((t,r)=>{const i=e[r];if(r===t)return t;if(y=d?E.filter((e=>i.videoRanges[e]>0)):[],w){if(i.minBitrate>n)return qe(r,`min bitrate of ${i.minBitrate} > current estimate of ${n}`),t;if(!i.hasDefaultAudio)return qe(r,"no renditions with default or auto-select sound found"),t;if(l&&r.indexOf(l.substring(0,4))%5!=0)return qe(r,`audio codec preference "${l}" not found`),t;if(o&&!c){if(!i.channels[o])return qe(r,`no renditions with ${o} channel sound found (channels options: ${Object.keys(i.channels)})`),t}else if((!l||c)&&h&&0===i.channels[2])return qe(r,"no renditions with stereo sound found"),t;if(i.minHeight>T)return qe(r,`min resolution of ${i.minHeight} > maximum of ${T}`),t;if(i.minFramerate>S)return qe(r,`min framerate of ${i.minFramerate} > maximum of ${S}`),t;if(!y.some((e=>i.videoRanges[e]>0)))return qe(r,`no variants with VIDEO-RANGE of ${Ye(y)} found`),t;if(u&&r.indexOf(u.substring(0,4))%5!=0)return qe(r,`video codec preference "${u}" not found`),t;if(i.maxScore<v)return qe(r,`max score of ${i.maxScore} < selected max of ${v}`),t}return t&&(Re(r)>=Re(t)||i.fragmentError>e[t].fragmentError)?t:(m=i.minIndex,v=i.maxScore,r)}),void 0),videoRanges:y,preferHDR:b,minFramerate:p,minBitrate:g,minIndex:m}}(i,S,e,_,A),{codecSet:a,videoRanges:o,minFramerate:l,minBitrate:u,minIndex:c,preferHDR:h}=s;L=c,T=a,S=h?o[o.length-1]:o[0],w=l,e=Math.max(e,u),this.log(`picked start tier ${Ye(s)}`)}else T=null==y?void 0:y.codecSet,S=null==y?void 0:y.videoRange;const C=f?f.duration:d?d.duration:0,R=this.bwEstimator.getEstimateTTFB()/1e3,I=[];for(let l=n;l>=t;l--){var x;const t=p[l],d=l>h;if(!t)continue;if(v.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const n=navigator.mediaCapabilities;"function"==typeof(null==n?void 0:n.decodingInfo)&&($e(t,k,S,w,e,_)||ve(t.videoCodec))?(t.supportedPromise=He(t,k,n),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const n=this.hls.levels,r=n.indexOf(t);e.error?this.warn(`MediaCapabilities decodingInfo error: "${e.error}" for level ${r} ${Ye(e)}`):e.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${r} ${Ye(e)}`),r>-1&&n.length>1&&(this.log(`Removing unsupported level ${r}`),this.hls.removeLevel(r),-1===this.hls.loadLevel&&(this.hls.nextLoadLevel=0)))}))):t.supportedResult=Fe}if((T&&t.codecSet!==T||S&&t.videoRange!==S||d&&w>t.frameRate||!d&&w>0&&w<t.frameRate||t.supportedResult&&(null==(x=t.supportedResult.decodingInfoResults)||!x[0].smooth))&&(!E||l!==L)){I.push(l);continue}const g=t.details,y=(f?null==g?void 0:g.partTarget:null==g?void 0:g.averagetargetduration)||C;let A;A=d?o*e:a*e;const P=C&&i>=2*C&&0===s?t.averageBitrate:t.maxBitrate,D=this.getTimeToLoadFrag(R,A,P*y,void 0===g);if(A>=P&&(l===c||0===t.loadError&&0===t.fragmentError)&&(D<=R||!r(D)||b&&!this.bitrateTestDelay||D<u)){const e=this.forcedAutoLevel;return l===m||-1!==e&&e===m||(I.length&&this.trace(`Skipped level(s) ${I.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${p[I[0]].codecs}" ${p[I[0]].videoRange}; not compatible with "${T}" ${S}`),this.info(`switch candidate:${h}->${l} adjustedbw(${Math.round(A)})-bitrate=${Math.round(A-P)} ttfb:${R.toFixed(1)} avgDuration:${y.toFixed(1)} maxFetchDuration:${u.toFixed(1)} fetchDuration:${D.toFixed(1)} firstSelection:${E} codecSet:${t.codecSet} videoRange:${t.videoRange} hls.loadLevel:${m}`)),E&&(this.firstSelection=l),l}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}},bufferController:class extends S{constructor(e,t){var n;super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=e=>{var t;this.hls&&"open"===(null==(t=this.mediaSource)?void 0:t.readyState)&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=e=>{const{media:t,mediaSource:n}=this;e&&this.log("Media source opened"),t&&n&&(n.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(l.MEDIA_ATTACHED,{media:t,mediaSource:n}),null!==this.mediaSource&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&this.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=(n=R(e.config.preferManagedMediaSource),"undefined"!=typeof self&&n===self.ManagedMediaSource),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.BUFFER_RESET,this.onBufferReset,this),e.on(l.BUFFER_APPENDING,this.onBufferAppending,this),e.on(l.BUFFER_CODECS,this.onBufferCodecs,this),e.on(l.BUFFER_EOS,this.onBufferEos,this),e.on(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(l.FRAG_PARSED,this.onFragParsed,this),e.on(l.FRAG_CHANGED,this.onFragChanged,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.BUFFER_RESET,this.onBufferReset,this),e.off(l.BUFFER_APPENDING,this.onBufferAppending,this),e.off(l.BUFFER_CODECS,this.onBufferCodecs,this),e.off(l.BUFFER_EOS,this.onBufferEos,this),e.off(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(l.FRAG_PARSED,this.onFragParsed,this),e.off(l.FRAG_CHANGED,this.onFragChanged,this),e.off(l.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const e=this.isUpdating();e||this.operationQueue.removeBlockers();const t=this.isQueued();(e||t)&&this.warn(`Transfering MediaSource with${t?" operations in queue":""}${e?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?b(n,r.tracks):this.sourceBuffers.forEach((e=>{const[t]=e;t&&(n[t]=b({},this.tracks[t]),this.removeBuffer(t)),e[0]=e[1]=null})),{media:e,mediaSource:t,tracks:n}}initTracks(){this.sourceBuffers=[[null,null],[null,null]],this.tracks={},this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),null!=(n=this.transferData)&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media,r=R(this.appendSource);if(this.transferData=this.overrides=void 0,n&&r){const e=!!t.mediaSource;(e||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const i=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(i),e)this._objectUrl=n.src,this.attachTransferred();else{const e=this._objectUrl=self.URL.createObjectURL(i);if(this.appendSource)try{n.removeAttribute("src");const t=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||t&&i instanceof t,Ui(n),function(e,t){const n=self.document.createElement("source");n.type="video/mp4",n.src=t,e.appendChild(n)}(n,e),n.load()}catch(t){n.src=e}else n.src=e}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${(null==(t=this.transferData)?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${null==(n=e.constructor)?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,a=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(r&&i&&s){if(!this.tracksReady)return this.hls.config.startFragPrefetch=!0,void this.log("attachTransferred: waiting for SourceBuffer track info");if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})\nrequired tracks: ${Ye(n,((e,t)=>"initSegment"===e?void 0:t))};\ntransfer tracks: ${Ye(r,((e,t)=>"initSegment"===e?void 0:t))}}`),!I(r,n)){t.mediaSource=null,t.tracks=void 0;const i=e.currentTime,s=this.details,a=Math.max(i,(null==s?void 0:s.fragments[0].start)||0);return a-i>1?void this.log(`attachTransferred: waiting for playback to reach new tracks start time ${i} -> ${a}`):(this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${a} currentTime: ${i}`),this.onMediaDetaching(l.MEDIA_DETACHING,{}),this.onMediaAttaching(l.MEDIA_ATTACHING,t),void(e.currentTime=a))}this.transferData=void 0,i.forEach((e=>{const t=e,n=r[t];if(n){const e=n.buffer;if(e){const r=this.fragmentTracker,i=n.id;if(r.hasFragments(i)||r.hasParts(i)){const n=Ot.getBuffered(e);r.detectEvictedFragments(t,n,i,null,!0)}const s=$i(t),a=[t,e];this.sourceBuffers[s]=a,e.updating&&this.operationQueue&&this.operationQueue.prependBlocker(t),this.trackSourceBuffer(t,n)}}})),a(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),a()}get mediaSourceOpenOrEnded(){var e;const t=null==(e=this.mediaSource)?void 0:e.readyState;return"open"===t||"ended"===t}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log("media source "+(n?"transferring":"detaching")),n)this.sourceBuffers.forEach((([e])=>{e&&this.removeBuffer(e)})),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const e="open"===i.readyState;try{const t=i.sourceBuffers;for(let n=t.length;n--;)e&&t[n].abort(),i.removeSourceBuffer(t[n]);e&&i.endOfStream()}catch(e){this.warn(`onMediaDetaching: ${e.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&Ui(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(l.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach((([e])=>{e&&this.resetBuffer(e)})),this.initTracks()}resetBuffer(e){var t;const n=null==(t=this.tracks[e])?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;null!=(r=this.mediaSource)&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(t){this.warn(`onBufferReset ${e}`,t)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[$i(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Mi(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some((e=>!n[e]));i||s?this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`):(r.forEach((e=>{var r,i,s;const a=t[e],{id:o,codec:l,levelCodec:u,container:c,metadata:h,supplemental:d}=a;let f=n[e];const p=null==(r=this.transferData)||null==(i=r.tracks)?void 0:i[e],g=null!=p&&p.buffer?p:f,m=(null==g?void 0:g.pendingCodec)||(null==g?void 0:g.codec),v=null==g?void 0:g.levelCodec;f||(f=n[e]={buffer:void 0,listeners:[],codec:l,supplemental:d,container:c,levelCodec:u,metadata:h,id:o});const y=De(m,v),b=null==y?void 0:y.replace(Ni,"$1");let E=De(l,u);const T=null==(s=E)?void 0:s.replace(Ni,"$1");E&&y&&b!==T&&("audio"===e.slice(0,5)&&(E=Pe(E,this.appendSource)),this.log(`switching codec ${m} to ${E}`),E!==(f.pendingCodec||f.codec)&&(f.pendingCodec=E),f.container=c,this.appendChangeType(e,c,E))})),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),this.sourceBufferCount||this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce(((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e}),{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const i=this.tracks[e];if(i){const s=i.buffer;null!=s&&s.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),s.changeType(r),i.codec=n,i.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+.05*e.duration;if(!0===(null==(t=this.fragmentTracker.getAppendedFrag(n,f))?void 0:t.gap))return;const i={label:"block-audio",execute:()=>{var e;const t=this.tracks.video;(this.lastVideoAppendEnd>r||null!=t&&t.buffer&&Ot.isBuffered(t.buffer,r)||!0===(null==(e=this.fragmentTracker.getAppendedFrag(r,f))?void 0:e.gap))&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:e=>{this.warn("Error executing block-audio operation",e)}};this.blockedAudioAppend={op:i,frag:e},this.append(i,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:u,part:c,chunkMeta:h}=t,d=h.buffering[i],f=u.sn,p=self.performance.now();d.start=p;const g=u.stats.buffering,m=c?c.stats.buffering:null;0===g.start&&(g.start=p),m&&0===m.start&&(m.start=p);const v=n.audio;let y=!1;"audio"===i&&"audio/mpeg"===(null==v?void 0:v.container)&&(y=!this.lastMpegAudioChunk||1===h.id||this.lastMpegAudioChunk.sn!==h.sn,this.lastMpegAudioChunk=h);const b=this.tracks.video,E=null==b?void 0:b.buffer;if(E&&"initSegment"!==f){const e=c||u,t=this.blockedAudioAppend;if("audio"!==i||"main"===s||this.blockedAudioAppend){if("video"===i){const n=e.end;if(t){const e=t.frag.start;(n>e||n<this.lastVideoAppendEnd||Ot.isBuffered(E,e))&&this.unblockAudio()}this.lastVideoAppendEnd=n}}else{const t=e.start+.05*e.duration,n=E.buffered,r=this.currentOp("video");n.length||r?!r&&!Ot.isBuffered(E,t)&&this.lastVideoAppendEnd<t&&this.blockAudio(e):this.blockAudio(e)}}const T=(c||u).start,S={label:`append-${i}`,execute:()=>{if(d.executeStart=self.performance.now(),y){const e=this.tracks[i];if(e){const t=e.buffer;if(t){const e=T-t.timestampOffset;Math.abs(e)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${T} (delta: ${e}) sn: ${f})`),t.timestampOffset=T)}}}this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();d.executeEnd=d.end=e,0===g.first&&(g.first=e),m&&0===m.first&&(m.first=e);const t={};this.sourceBuffers.forEach((([e,n])=>{e&&(t[e]=Ot.getBuffered(n))})),this.appendErrors[i]=0,"audio"===i||"video"===i?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(l.BUFFER_APPENDED,{type:i,frag:u,part:c,chunkMeta:h,parent:u.type,timeRanges:t})},onError:e=>{var t;const n={type:a.MEDIA_ERROR,parent:u.type,details:o.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:u,part:c,chunkMeta:h,error:e,err:e,fatal:!1},r=null==(t=this.media)?void 0:t.error;if(e.code===DOMException.QUOTA_EXCEEDED_ERR)n.details=o.BUFFER_FULL_ERROR;else if(e.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!r)n.errorAction=ft(!0);else if(e.name===Fi&&0===this.sourceBufferCount)n.errorAction=ft(!0);else{const e=++this.appendErrors[i];this.warn(`Failed ${e}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${r||"no media error"})`),(e>=this.hls.config.appendErrorMaxRetry||r)&&(n.fatal=!0)}this.hls.trigger(l.ERROR,n)}};this.append(S,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(l.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach((([e])=>{e&&this.append(this.getFlushOp(e,r,i),e)}))}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[z]?i.push("audiovideo"):(s[j]&&i.push("audio"),s[V]&&i.push("video")),0===i.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers((()=>{const e=self.performance.now();n.stats.buffering.end=e,r&&(r.stats.buffering.end=e);const t=r?r.stats:n.stats;this.hls.trigger(l.FRAG_BUFFERED,{frag:n,part:r,stats:t,id:n.type})}),i).catch((e=>{this.warn(`Fragment buffered callback ${e}`),this.stepOperationQueue(this.sourceBufferTypes)}))}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some((([e])=>{var t,n;return e&&(!(null!=(t=this.tracks[e])&&t.ended)||(null==(n=this.tracks[e])?void 0:n.ending))}))}onBufferEos(e,t){var n;this.sourceBuffers.forEach((([e])=>{if(e){const n=this.tracks[e];t.type&&t.type!==e||(n.ending=!0,n.ended||(n.ended=!0,this.log(`${e} buffer reached EOS`)))}}));const r=!1!==(null==(n=this.overrides)?void 0:n.endOfStream);this.sourceBufferCount>0&&!this.sourceBuffers.some((([e])=>{var t;return e&&!(null!=(t=this.tracks[e])&&t.ended)}))&&(r?(this.log("Queueing EOS"),this.blockUntilOpen((()=>{this.tracksEnded();const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream(),this.hls.trigger(l.BUFFERED_TO_END,void 0)):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)}))):(this.tracksEnded(),this.hls.trigger(l.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach((([e])=>{if(null!==e){const t=this.tracks[e];t&&(t.ending=!1)}}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen((()=>this.updateMediaSource(e)))}onError(e,t){if(t.details===o.BUFFER_APPEND_ERROR&&t.frag){var n;const e=null==(n=t.errorAction)?void 0:n.nextAutoLevel;r(e)&&e!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||null===t)return;if(!this.sourceBufferCount)return;const i=e.config,s=n.currentTime,a=t.levelTargetDuration,o=t.live&&null!==i.liveBackBufferLength?i.liveBackBufferLength:i.backBufferLength;if(r(o)&&o>=0){const e=Math.max(o,a),t=Math.floor(s/a)*a-e;this.flushBackBuffer(s,a,t)}if(r(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const e=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),t=Math.max(e,a),n=Math.floor(s/a)*a+t;this.flushFrontBuffer(s,a,n)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach((([e,t])=>{if(t){const i=Ot.getBuffered(t);if(i.length>0&&n>i.start(0)){var r;this.hls.trigger(l.BACK_BUFFER_REACHED,{bufferEnd:n});const t=this.tracks[e];if(null!=(r=this.details)&&r.live)this.hls.trigger(l.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(null!=t&&t.ended)return void this.log(`Cannot flush ${e} back buffer while SourceBuffer is in ended state`);this.hls.trigger(l.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:e})}}}))}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach((([t,r])=>{if(r){const i=Ot.getBuffered(r),s=i.length;if(s<2)return;const a=i.start(s-1),o=i.end(s-1);if(n>a||e>=a&&e<=o)return;this.hls.trigger(l.BUFFER_FLUSHING,{startOffset:a,endOffset:1/0,type:t})}}))}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||"open"!==(null==n?void 0:n.readyState))return null;const i=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&n.setLiveSeekableRange){const e=Math.max(0,t.fragmentStart);return{duration:1/0,start:e,end:Math.max(e,i)}}return{duration:1/0}}const s=null==(e=this.overrides)?void 0:e.duration;if(s)return r(s)?{duration:s}:null;const a=this.media.duration;return i>(r(n.duration)?n.duration:0)&&i>a||!r(a)?{duration:i}:null}updateMediaSource({duration:e,start:t,end:n}){const i=this.mediaSource;this.media&&i&&"open"===i.readyState&&(i.duration!==e&&(r(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),i.duration=e),void 0!==t&&void 0!==n&&(this.log(`MediaSource duration is set to ${i.duration}. Setting seekable range to ${t}-${n}.`),i.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Ye(n)}`),this.tracksReady){var r;const e=null==(r=this.transferData)?void 0:r.tracks;e&&Object.keys(e).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach((([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}})),this.hls.trigger(l.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach((([e])=>{this.executeNext(e)}))}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,u=e[s];if(this.isPending(u)){const e=this.getTrackCodec(u,s),i=`${u.container};codecs=${e}`;u.codec=e,this.log(`creating sourceBuffer(${i})${this.currentOp(s)?" Queued":""} ${Ye(u)}`);try{const e=n.addSourceBuffer(i),r=$i(s),a=[s,e];t[r]=a,u.buffer=e}catch(e){var r;return this.error(`error while trying to add sourceBuffer: ${e.message}`),this.shiftAndExecuteNext(s),null==(r=this.operationQueue)||r.removeBlockers(),delete this.tracks[s],void this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:s,mimeType:i,parent:u.id})}this.trackSourceBuffer(s,u)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&("video"===t||"audiovideo"===t)&&Ae(n,"video")&&(r=function(e,t){const n=[];if(e){const t=e.split(",");for(let e=0;e<t.length;e++)_e(t[e],"video")||n.push(t[e])}return t&&n.push(t),n.join(",")}(r,n));const i=De(r,e.levelCodec);return i?"audio"===t.slice(0,5)?Pe(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",((e,t)=>{const n=t.removedRanges;null!=n&&n.length&&this.hls.trigger(l.BUFFER_FLUSHED,{type:e})}))}get mediaSrc(){var e,t;const n=(null==(e=this.media)||null==(t=e.querySelector)?void 0:t.call(e,"source"))||this.media;return null==n?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(n=this.mediaSource)?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}removeExecutor(e,t,n){const{media:i,mediaSource:s}=this,a=this.tracks[e],o=null==a?void 0:a.buffer;if(!i||!s||!o)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void this.shiftAndExecuteNext(e);const l=r(i.duration)?i.duration:1/0,u=r(s.duration)?s.duration:1/0,c=Math.max(0,t),h=Math.min(n,l,u);h>c&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${c},${h}] from the ${e} SourceBuffer`),o.remove(c,h)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=null==n?void 0:n.buffer;if(!r)throw new Bi(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch((e=>{this.warn(`SourceBuffer blocked callback ${e}`),this.stepOperationQueue(this.sourceBufferTypes)}));else try{e()}catch(e){this.warn(`Callback run without blocking ${this.operationQueue} ${e}`)}}isUpdating(){return this.sourceBuffers.some((([e,t])=>e&&t.updating))}isQueued(){return this.sourceBuffers.some((([e])=>e&&!!this.currentOp(e)))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map((e=>this.appendBlocker(e)));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then((t=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))}))}stepOperationQueue(e){e.forEach((e=>{var t;const n=null==(t=this.tracks[e])?void 0:t.buffer;n&&!n.updating&&this.shiftAndExecuteNext(e)}))}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce(((e,t)=>e+(this.isPending(this.tracks[t])?1:0)),0)}get sourceBufferCount(){return this.sourceBuffers.reduce(((e,[t])=>e+(t?1:0)),0)}get sourceBufferTypes(){return this.sourceBuffers.map((([e])=>e)).filter((e=>!!e))}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach((e=>{n.removeEventListener(e.event,e.listener)})),t.listeners.length=0)}},capLevelController:Hi,errorController:class extends S{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(l.ERROR,this.onError,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(l.ERROR,this.onError,this),e.off(l.ERROR,this.onErrorOut,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===f?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case o.FRAG_LOAD_ERROR:case o.FRAG_LOAD_TIMEOUT:case o.KEY_LOAD_ERROR:case o.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case o.FRAG_PARSING_ERROR:if(null!=(n=t.frag)&&n.gap)return void(t.errorAction=ft());case o.FRAG_GAP:case o.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=2);case o.LEVEL_EMPTY_ERROR:case o.LEVEL_PARSING_ERROR:{var s,l;const e=t.parent===f?t.level:r.loadLevel;t.details===o.LEVEL_EMPTY_ERROR&&null!=(s=t.context)&&null!=(l=s.levelDetails)&&l.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case o.LEVEL_LOAD_ERROR:case o.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==i?void 0:i.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level)));case o.AUDIO_TRACK_LOAD_ERROR:case o.AUDIO_TRACK_LOAD_TIMEOUT:case o.SUBTITLE_LOAD_ERROR:case o.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const e=r.loadLevelObj;if(e&&(i.type===h&&e.hasAudioGroup(i.groupId)||i.type===d&&e.hasSubtitleGroup(i.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=2,void(t.errorAction.flags=1)}return;case o.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=r.loadLevelObj,n=null==e?void 0:e.attrs["HDCP-LEVEL"];n?t.errorAction={action:2,flags:2,hdcpLevel:n}:this.keySystemError(t)}return;case o.BUFFER_ADD_CODEC_ERROR:case o.REMUX_ALLOC_ERROR:case o.BUFFER_APPEND_ERROR:var u;return void(t.errorAction||(t.errorAction=this.getLevelSwitchAction(t,null!=(u=t.level)?u:r.loadLevel)));case o.INTERNAL_EXCEPTION:case o.BUFFER_APPENDING_ERROR:case o.BUFFER_FULL_ERROR:case o.LEVEL_SWITCH_ERROR:case o.BUFFER_STALLED_ERROR:case o.BUFFER_SEEK_OVER_HOLE:case o.BUFFER_NUDGE_ON_STALL:return void(t.errorAction=ft())}t.type===a.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=ut(this.hls.config.playlistLoadPolicy,e),r=this.playlistError++;if(dt(n,r,lt(e),e.response))return{action:5,flags:0,retryConfig:n,retryCount:r};const i=this.getLevelSwitchAction(e,t);return n&&(i.retryConfig=n,i.retryCount=r),i}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,a=ut(e.details.startsWith("key")?s:i,e),l=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(r&&(e.details!==o.FRAG_GAP&&r.fragmentError++,dt(a,l,lt(e),e.response)))return{action:5,flags:0,retryConfig:a,retryCount:l};const u=this.getLevelSwitchAction(e,n);return a&&(u.retryConfig=a,u.retryCount=l),u}getLevelSwitchAction(e,t){const n=this.hls;null==t&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const t=e.details;r.loadError++,t===o.BUFFER_APPEND_ERROR&&r.fragmentError++;let u=-1;const{levels:c,loadLevel:m,minAutoLevel:v,maxAutoLevel:y}=n;n.autoLevelEnabled||n.config.preserveManualLevelOnError||(n.loadLevel=-1);const b=null==(i=e.frag)?void 0:i.type,E=(b===p&&t===o.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===o.BUFFER_ADD_CODEC_ERROR||t===o.BUFFER_APPEND_ERROR))&&c.some((({audioCodec:e})=>r.audioCodec!==e)),T="video"===e.sourceBufferName&&(t===o.BUFFER_ADD_CODEC_ERROR||t===o.BUFFER_APPEND_ERROR)&&c.some((({codecSet:e,audioCodec:t})=>r.codecSet!==e&&r.audioCodec===t)),{type:S,groupId:w}=null!=(s=e.context)?s:{};for(let n=c.length;n--;){const i=(n+m)%c.length;if(i!==m&&i>=v&&i<=y&&0===c[i].loadError){var a,l;const n=c[i];if(t===o.FRAG_GAP&&b===f&&e.frag){const t=c[i].details;if(t){const n=it(e.frag,t.fragments,e.frag.start);if(null!=n&&n.gap)continue}}else{if(S===h&&n.hasAudioGroup(w)||S===d&&n.hasSubtitleGroup(w))continue;if(b===p&&null!=(a=r.audioGroups)&&a.some((e=>n.hasAudioGroup(e)))||b===g&&null!=(l=r.subtitleGroups)&&l.some((e=>n.hasSubtitleGroup(e)))||E&&r.audioCodec===n.audioCodec||!E&&r.audioCodec!==n.audioCodec||T&&r.codecSet===n.codecSet)continue}u=i;break}}if(u>-1&&n.loadLevel!==u)return e.levelRetry=!0,this.playlistError=0,{action:2,flags:0,nextAutoLevel:u}}return{action:2,flags:1}}onErrorOut(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case 0:break;case 2:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===o.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r,hdcpLevel:i,nextAutoLevel:s}=n;switch(r){case 0:this.switchLevel(e,s);break;case 2:i&&(t.maxHdcpLevel=Ge[Ge.indexOf(i)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}n.resolved||this.switchLevel(e,s)}switchLevel(e,t){if(void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===o.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&"audiovideo"!==e.sourceBufferName)){const t=Ne(e.mimeType),n=this.hls.levels;for(let r=n.length;r--;)n[r][`${e.sourceBufferName}Codec`]===t&&this.hls.removeLevel(r)}}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(l.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(l.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const e=r-this.lastTime,i=n-this.lastDroppedFrames,s=t-this.lastDecodedFrames,a=1e3*i/e,o=this.hls;if(o.trigger(l.FPS_DROP,{currentDropped:i,currentDecoded:s,totalDroppedFrames:n}),a>0&&i>o.config.fpsDroppedMonitoringThreshold*s){let e=o.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===o.autoLevelCapping||o.autoLevelCapping>=e)&&(e-=1,o.trigger(l.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:o.currentLevel}),o.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:on,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:Fa,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends nr{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",g),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(l.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(l.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(l.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(l.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(l.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(l.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(l.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(l.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(l.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(l.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=zn,this.setInterval(500),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(W(n)&&(this.fragPrevious=n),this.state=zn,!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const a=n.start;for(let e=0;e<i.length;e++)if(a>=i[e].start&&a<=i[e].end){s=i[e];break}const o=n.start+n.duration;s?s.end=o:(s={start:a,end:o},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(0===n&&r!==Number.POSITIVE_INFINITY){const e=r-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let n=0;n<t.length;)if(t[n].end<=e)t.shift();else{if(!(t[n].start<e))break;t[n].start=e,n++}})),this.fragmentTracker.removeFragmentsInRange(n,e,g)}}onError(e,t){const n=t.frag;(null==n?void 0:n.type)===g&&(t.details===o.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Vn&&(this.state=zn))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&Pi(this.levels,t)?this.levels=t.map((e=>new Ke(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new Ke(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,g),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,null==(n=this.levels)||!n.length||-1===this.currentTrackId)return void this.clearInterval();const r=this.levels[this.currentTrackId];null!=r&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==Vn&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:a}=t;if(!i)return void this.warn(`Subtitle tracks were reset while loading level ${a}`);const o=i[a];if(a>=i.length||!o)return;this.log(`Subtitle track ${a} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let u=0;if(s.live||null!=(n=o.details)&&n.live){const e=this.mainDetails;if(s.deltaUpdateFailed||!e)return;const t=e.fragments[0];var c;o.details?(u=this.alignPlaylists(s,o.details,null==(c=this.levelLastLoaded)?void 0:c.details),0===u&&t&&(u=t.start,Dn(s,u))):s.hasProgramDateTime&&e.hasProgramDateTime?(jn(s,e),u=s.fragmentStart):t&&(u=t.start,Dn(s,u))}o.details=s,this.levelLastLoaded=o,a===r&&(this.hls.trigger(l.SUBTITLE_TRACK_UPDATED,{details:s,id:a,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===zn)&&(it(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),o.details=void 0))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&null!=r&&r.key&&r.iv&&Kt(r.method)){const e=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Wt(r.method)).catch((e=>{throw i.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((n=>{const r=performance.now();i.trigger(l.FRAG_DECRYPTED,{frag:t,payload:n,stats:{tstart:e,tdecrypt:r}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=zn}))}}doTick(){if(this.media){if(this.state===zn){const{currentTrackId:e,levels:t}=this,n=null==t?void 0:t[e];if(!n||!t.length||!n.details)return;if(this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=Ot.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:a,len:o}=s,l=n.details;if(o>this.hls.maxBufferLength+l.levelTargetDuration)return;const u=l.fragments,c=u.length,h=l.edge;let d=null;const f=this.fragPrevious;if(a<h){const e=r.maxFragLookUpTolerance,t=a>h-e?0:e;d=it(f,u,Math.max(u[0].start,a),t),!d&&f&&f.start<u[0].start&&(d=u[0])}else d=u[c-1];if(d=this.filterReplacedPrimary(d,n.details),!d)return;const p=u[d.sn-l.startSN-1];if(p&&p.cc===d.cc&&this.fragmentTracker.getState(p)===pt&&(d=p),this.fragmentTracker.getState(d)===pt){const e=this.mapToInitFragWhenRequired(d);e&&this.loadFragment(e,n,a)}}}else this.state=zn}loadFragment(e,t,n){W(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new js(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends xi{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=Cs(this.media.textTracks);for(let n=0;n<t.length;n++)if("hidden"===t[n].mode)e=t[n];else if("showing"===t[n].mode){e=t[n];break}const n=this.findTrackForTextTrack(e);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.LEVEL_LOADING,this.onLevelLoading,this),e.on(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(l.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.LEVEL_LOADING,this.onLevelLoading,this),e.off(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(l.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(l.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r||Cs(n.textTracks).forEach((e=>{ks(e)}))}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r)return void this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${null==s?void 0:s.groupId}`);const a=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(null==r?void 0:r.length)!==(null==n?void 0:n.length)||null!=n&&n.some((e=>-1===(null==r?void 0:r.indexOf(e))))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!n||-1!==n.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!i&&t){this.selectDefaultTrack=!1;const n=Ze(t,e);if(n>-1)i=e[n];else{const e=Ze(t,this.tracks);i=this.tracks[e]}}let r=this.findTrackId(i);-1===r&&i&&(r=this.findTrackId(null));const s={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==n?void 0:n.join(",")}" group-id`),this.hls.trigger(l.SUBTITLE_TRACKS_UPDATED,s),-1!==r&&-1===this.trackId&&this.setSubtitleTrack(r)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if((!n||i.default)&&(n||e)&&(!e||Je(i,e)))return r}if(e){for(let n=0;n<t.length;n++){const r=t[n];if(Di(e.attrs,r.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const r=t[n];if(Di(e.attrs,r.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++)if(Oi(t[n],e))return n}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==d||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(-1===e.id)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&Je(e,n))return n;const r=Ze(e,this.tracksInGroup);if(r>-1){const e=this.tracksInGroup[r];return this.setSubtitleTrack(r),e}if(n)return null;{const n=Ze(e,t);if(n>-1)return t[n]}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,a=null==s?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${a&&s.live?" age "+a.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(l.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Cs(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter((e=>Oi(n,e)))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach((e=>{"disabled"!==e.mode&&e!==r&&(e.mode="disabled")})),r){const e=this.subtitleDisplay?"showing":"hidden";r.mode!==e&&(r.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!r(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.selectDefaultTrack=!1;const n=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i)return void this.hls.trigger(l.SUBTITLE_TRACK_SWITCH,{id:e});const s=!!i.details&&!i.details.live;if(e===this.trackId&&i===n&&s)return;this.log(`Switching to subtitle-track ${e}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:a,groupId:o="",name:u,type:c,url:h}=i;this.hls.trigger(l.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:u,type:c,url:h});const d=this.switchParams(i.url,null==n?void 0:n.details,i.details);this.loadPlaylist(d)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(l.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(l.FRAG_LOADING,this.onFragLoading,this),e.on(l.FRAG_LOADED,this.onFragLoaded,this),e.on(l.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(l.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(l.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(l.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(l.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(l.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(l.FRAG_LOADING,this.onFragLoading,this),e.off(l.FRAG_LOADED,this.onFragLoaded,this),e.off(l.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(l.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(l.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(l.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(l.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Da(this,"textTrack1"),t=new Da(this,"textTrack2"),n=new Da(this,"textTrack3"),r=new Da(this,"textTrack4");this.cea608Parser1=new aa(1,e,t),this.cea608Parser2=new aa(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let e=i.length;e--;){const r=i[e],l=(a=r[0],o=r[1],u=t,c=n,Math.min(o,c)-Math.max(a,u));if(l>=0&&(r[0]=Math.min(r[0],t),r[1]=Math.max(r[1],n),s=!0,l/(n-t)>.5))return}var a,o,u,c;if(s||i.push([t,n]),this.config.renderTextTracksNatively){const i=this.captionsTracks[e];this.Cues.newCue(i,t,n,r)}else{const i=this.Cues.newCue(null,t,n,r);this.hls.trigger(l.CUES_PARSED,{type:"captions",cues:i,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){const{unparsedVttFrags:s}=this;n===f&&(this.initPTS[t.cc]={baseTime:r,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach((e=>{this.onFragLoaded(l.FRAG_LOADED,e)})))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(Ma(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],a=this.getExistingTrack(i,s);if(a)n[e]=a,ks(n[e]),_s(n[e],r);else{const t=this.createTextTrack("captions",i,s);t&&(t[e]=!0,n[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(l.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach((e=>{ks(r[e]),delete r[e]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;e<t.length;e++)ks(t[e])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some((e=>e.textCodec===Sa));if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Pi(this.tracks,n))return void(this.tracks=n);if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const e=this.media,t=e?Cs(e.textTracks):null;if(this.tracks.forEach(((e,n)=>{let r;if(t){let n=null;for(let r=0;r<t.length;r++)if(t[r]&&Ma(t[r],e)){n=t[r],t[r]=null;break}n&&(r=n)}if(r)ks(r);else{const t=Oa(e);r=this.createTextTrack(t,e.name,e.lang),r&&(r.mode="disabled")}r&&this.textTracks.push(r)})),null!=t&&t.length){const e=t.filter((e=>null!==e)).map((e=>e.label));e.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map((e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(l.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const n=`textTrack${t[1]}`,r=this.captionsProperties[n];r&&(r.label=e.name,e.lang&&(r.languageCode=e.lang),r.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===f){var n,r;const{cea608Parser1:e,cea608Parser2:i,lastSn:s}=this,{cc:a,sn:o}=t.frag,l=null!=(n=null==(r=t.part)?void 0:r.index)?n:-1;e&&i&&(o!==s+1||o===s&&l!==this.lastPartIndex+1||a!==this.lastCc)&&(e.reset(),i.reset()),this.lastCc=a,this.lastSn=o,this.lastPartIndex=l}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===g)if(r.byteLength){const e=n.decryptdata,i="stats"in t;if(null==e||!e.encrypted||i){const e=this.tracks[n.level],i=this.vttCCs;i[n.cc]||(i[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),e&&e.textCodec===Sa?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(l.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;ka(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),n.trigger(l.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{n.logger.log(`Failed to parse IMSC1: ${t}`),n.trigger(l.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:n,payload:i}=e,{initPTS:s,unparsedVttFrags:a}=this,o=s.length-1;if(!s[n.cc]&&-1===o)return void a.push(e);const u=this.hls;!function(e,t,n,i,s,a,o){const l=new ya,u=x(new Uint8Array(e)).trim().replace(ba,"\n").split("\n"),c=[],h=t?function(e,t=1){return hi(e,9e4,1/t)}(t.baseTime,t.timescale):0;let d,f="00:00.000",p=0,g=0,m=!0;l.oncue=function(e){const r=n[i];let a=n.ccOffset;const o=(p-h)/9e4;if(null!=r&&r.new&&(void 0!==g?a=n.ccOffset=r.start:function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!=(s=i)&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n}(n,i,o)),o){if(!t)return void(d=new Error("Missing initPTS for VTT MPEGTS"));a=o-n.presentationOffset}const l=e.endTime-e.startTime,u=yi(9e4*(e.startTime+a-g),9e4*s)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const f=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(f)),e.id||(e.id=Ta(e.startTime,e.endTime,f)),e.endTime>0&&c.push(e)},l.onparsingerror=function(e){d=e},l.onflush=function(){d?o(d):a(c)},u.forEach((e=>{if(m){if(Ea(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{Ea(e,"LOCAL:")?f=e.slice(6):Ea(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{g=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(r(t)&&r(n)&&r(i)&&r(s)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=6e4*i,t+=36e5*s,t}(f)/1e3}catch(e){d=e}return}""===e&&(m=!1)}l.parse(e+"\n")})),l.flush()}(null!=(t=n.initSegment)&&t.data?ge(n.initSegment.data,new Uint8Array(i)).buffer:i,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,(e=>{this._appendCues(e,n.level),u.trigger(l.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})}),(t=>{const r="Missing initPTS for VTT MPEGTS"===t.message;r?a.push(e):this._fallbackToIMSC1(n,i),u.logger.log(`Failed to parse VTT cue: ${t}`),r&&o>n.cc||u.trigger(l.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:t})}))}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||ka(t,this.initPTS[e.cc],(()=>{n.textCodec=Sa,this._parseIMSC1(e,t)}),(()=>{n.textCodec="wvtt"}))}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||"disabled"===n.mode)return;e.forEach((e=>As(n,e)))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(l.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===g&&this.onFragLoaded(l.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(n.type!==f||"NONE"!==this.closedCaptionsForLevel(n))for(let e=0;e<r.length;e++){const t=r[e].bytes;if(t){this.cea608Parser1||this.initCea608Parsers();const n=this.extractCea608Data(t);this.cea608Parser1.addData(r[e].pts,n[0]),this.cea608Parser2.addData(r[e].pts,n[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(s&&!(s.currentTime<n)){if(!i||"video"===i){const{captionsTracks:e}=this;Object.keys(e).forEach((r=>Ls(e[r],t,n)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==r){const{textTracks:e}=this;Object.keys(e).forEach((n=>Ls(e[n],t,r)))}}}extractCea608Data(e){const t=[[],[]],n=31&e[0];let r=2;for(let i=0;i<n;i++){const n=e[r++],i=127&e[r++],s=127&e[r++];if((0!==i||0!==s)&&4&n){const e=3&n;0!==e&&1!==e||(t[e].push(i),t[e].push(s))}}return t}},audioStreamController:class extends nr{constructor(e,t,n){super(e,t,n,"audio-stream-controller",p),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(l.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(l.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(l.BUFFER_RESET,this.onBufferReset,this),e.on(l.BUFFER_CREATED,this.onBufferCreated,this),e.on(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(l.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(l.FRAG_LOADING,this.onFragLoading,this),e.on(l.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(l.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(l.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(l.BUFFER_RESET,this.onBufferReset,this),e.off(l.BUFFER_CREATED,this.onBufferCreated,this),e.off(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(l.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(l.FRAG_LOADING,this.onFragLoading,this),e.off(l.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){if(n===f){const e=t.cc,n=this.fragCurrent;if(this.initPTS[e]={baseTime:r,timescale:i},this.log(`InitPTS for cc: ${e} found from main: ${r}/${i}`),this.mainAnchor=t,this.state===er){const n=this.waitingData;(!n&&!this.loadingParts||n&&n.frag.cc!==e)&&this.syncWithAnchor(t,null==n?void 0:n.frag)}else!this.hls.hasEnoughToStart&&n&&n.cc!==e?(n.abortRequests(),this.syncWithAnchor(t,n)):this.state===zn&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=(null==(n=this.mainFragLoading)?void 0:n.frag)||null;if(t&&(null==r?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=ot(this.getLevelDetails(),i,this.getLoadPosition());s&&(this.log(`Waiting fragment cc (${null==t?void 0:t.cc}) cancelled because video is at cc ${e.cc}`),this.startFragRequested=!1,this.nextLoadPosition=s.start,this.resetLoadingState(),this.state===zn&&this.doTickIdle())}startLoad(e,t){if(!this.levels)return this.startPosition=e,void(this.state=Vn);const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),n>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=zn):this.state=qn,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case zn:this.doTickIdle();break;case qn:{const{levels:e,trackId:t}=this,n=null==e?void 0:e[t],r=null==n?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=er}break}case Yn:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||null!=(e=this.media)&&e.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=zn}break}case er:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.state=Wn;const e={frag:t,part:n,payload:r.flush().buffer,networkDetails:null};this._handleFragmentLoadProgress(e),i&&super._handleFragmentLoadComplete(e)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=zn}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||null==n||!n[i])return;const a=n[i],o=a.details;if(!o||this.waitForLive(a)||this.waitForCdnTuneIn(o))return this.state=qn,void(this.startFragRequested=!1);const u=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&u&&(this.bufferFlushed=!1,this.afterBufferFlushed(u,j,p));const c=this.getFwdBufferInfo(u,p);if(null===c)return;if(!this.switchingTrack&&this._streamEnded(c,o))return t.trigger(l.BUFFER_EOS,{type:"audio"}),void(this.state=Zn);const h=c.len,d=t.maxBufferLength,g=o.fragments,m=g[0].start,v=this.getLoadPosition(),y=this.flushing?v:c.end;if(this.switchingTrack&&r){const e=v;o.PTSKnown&&e<m&&(c.end>m||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=m+.05)}if(h>=d&&!this.switchingTrack&&y<g[g.length-1].start)return;let b=this.getNextFragment(y,o);if(b&&this.isLoopLoading(b,y)&&(b=this.getNextFragmentLoopLoading(b,o,c,f,d)),!b)return void(this.bufferFlushed=!0);let E=(null==(e=this.mainFragLoading)?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&E&&W(b)&&!b.endList&&(!o.live||!this.loadingParts&&y<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(E)===vt&&(this.mainFragLoading=E=null),E&&W(E))){if(b.start>E.end){const e=this.fragmentTracker.getFragAtPos(y,f);e&&e.end>E.end&&(E=e,this.mainFragLoading={frag:e,targetBufferTime:null})}if(b.start>E.end)return}this.loadFragment(b,a,y)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map((e=>new Ke(e)))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Vn&&(this.setInterval(100),this.state=zn,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(l.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:a,track:o}=t;if(!r)return void this.warn(`Audio tracks reset while loading track ${s} "${o.name}" of "${a}"`);const u=this.mainDetails;if(!u||i.endCC>u.endCC||u.expired)return this.cachedTrackLoadedData=t,void(this.state!==Vn&&(this.state=qn));this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${o.name}" of "${a}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const c=r[s];let h=0;if(i.live||null!=(n=c.details)&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;var d;c.details&&(h=this.alignPlaylists(i,c.details,null==(d=this.levelLastLoaded)?void 0:d.details)),i.alignedSliding||(Gn(i,u),i.alignedSliding||jn(i,u),h=i.fragmentStart)}c.details=i,this.levelLastLoaded=c,this.startFragRequested||this.setStartPosition(u,h),this.hls.trigger(l.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state!==qn||this.waitForCdnTuneIn(i)||(this.state=zn),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:a,levels:o}=this;if(!o)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);const l=o[a];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const u=l.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(n.start);const c=s.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let h=this.transmuxer;h||(h=this.transmuxer=new Ii(this.hls,p,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const d=this.initPTS[n.cc],f=null==(t=n.initSegment)?void 0:t.data;if(void 0!==d){const e=!1,t=r?r.index:-1,s=-1!==t,a=new Pt(n.level,n.sn,n.stats.chunkCount,i.byteLength,t,s);h.push(i,f,c,"",n,r,u.totalduration,e,a,d)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${u.startSN} ,${u.endSN}],track ${a}`);const{cache:e}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new ir,complete:!1};e.push(new Uint8Array(i)),this.state!==Vn&&(this.state=er)}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===f&&W(t.frag)&&(this.mainFragLoading=t,this.state===zn&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type===p)if(this.fragContextChanged(n))this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if(W(n)){this.fragPrevious=n;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(l.AUDIO_TRACK_SWITCHED,T({},e)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}else this.audioOnly||n.type!==f||n.elementaryStreams.video||n.elementaryStreams.audiovideo||(this.audioOnly=!0,this.mainFragLoading=null)}onError(e,t){var n;if(t.fatal)this.state=Jn;else switch(t.details){case o.FRAG_GAP:case o.FRAG_PARSING_ERROR:case o.FRAG_DECRYPT_ERROR:case o.FRAG_LOAD_ERROR:case o.FRAG_LOAD_TIMEOUT:case o.KEY_LOAD_ERROR:case o.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p,t);break;case o.AUDIO_TRACK_LOAD_ERROR:case o.AUDIO_TRACK_LOAD_TIMEOUT:case o.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==qn||(null==(n=t.context)?void 0:n.type)!==h||(this.state=zn);break;case o.BUFFER_ADD_CODEC_ERROR:case o.BUFFER_APPEND_ERROR:if("audio"!==t.parent)return;this.resetLoadingState();break;case o.BUFFER_FULL_ERROR:if("audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case o.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==V&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==V){this.flushing=!1,this.bufferFlushed=!0,this.state===Zn&&(this.state=zn);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,p),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,a=this.getCurrentContext(s);if(!a)return void this.resetWhenMissingContext(s);const{frag:o,part:u,level:c}=a,{details:h}=c,{audio:d,text:f,id3:p,initSegment:g}=i;if(!this.fragContextChanged(o)&&h){if(this.state=Xn,this.switchingTrack&&d&&this.completeAudioSwitch(this.switchingTrack),null!=g&&g.tracks){const e=o.initSegment||o;this._bufferInitSegment(c,g.tracks,e,s),r.trigger(l.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:g.tracks})}if(d){const{startPTS:e,endPTS:t,startDTS:n,endDTS:r}=d;u&&(u.elementaryStreams[j]={startPTS:e,endPTS:t,startDTS:n,endDTS:r}),o.setElementaryStreamInfo(j,e,t,n,r),this.bufferFragmentData(d,o,u,s)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=b({id:n,frag:o,details:h},p);r.trigger(l.FRAG_PARSING_METADATA,e)}if(f){const e=b({id:n,frag:o,details:h},f);r.trigger(l.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(o)}_bufferInitSegment(e,t,n,r){if(this.state!==Xn)return;if(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio)return;const i=t.audio;i.id=p;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&1===s.split(",").length&&(i.levelCodec=s),this.hls.trigger(l.BUFFER_CODECS,t);const a=i.initSegment;if(null!=a&&a.byteLength){const e={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:a};this.hls.trigger(l.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);var i;if(this.switchingTrack||r===pt||r===mt)if(W(e))if(null!=(i=t.details)&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=er;const n=this.mainDetails;n&&n.fragmentStart!==t.details.fragmentStart&&jn(t.details,n)}else super.loadFragment(e,t,n);else this._loadInitSegment(e,t);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:a}=this.bufferedTrack;Je({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:a},e,et)||(nt(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(l.AUDIO_TRACK_SWITCHED,T({},e))}},audioTrackController:class extends xi{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.LEVEL_LOADING,this.onLevelLoading,this),e.on(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(l.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.LEVEL_LOADING,this.onLevelLoading,this),e.off(l.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(l.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(l.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r)return void this.warn(`Audio track with id:${n} and group:${r} not found in active group ${null==s?void 0:s.groupId}`);const a=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(null==r?void 0:r.length)!==(null==n?void 0:n.length)||null!=n&&n.some((e=>-1===(null==r?void 0:r.indexOf(e))))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!n||-1!==n.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!i&&t){const n=Ze(t,e,et);if(n>-1)i=e[n];else{const e=Ze(t,this.tracks);i=this.tracks[e]}}let r=this.findTrackId(i);-1===r&&i&&(r=this.findTrackId(null));const u={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==n?void 0:n.join(",")}`),this.hls.trigger(l.AUDIO_TRACKS_UPDATED,u);const c=this.trackId;if(-1!==r&&-1===c)this.setAudioTrack(r);else if(e.length&&-1===c){var s;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(s=this.groupIds)?void 0:s.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}}onError(e,t){!t.fatal&&t.context&&(t.context.type!==h||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&Je(e,r,et))return r;const i=Ze(e,this.tracksInGroup,et);if(i>-1){const e=this.tracksInGroup[i];return this.setAudioTrack(i),e}if(r){let r=t.loadLevel;-1===r&&(r=t.firstAutoLevel);const i=function(e,t,n,r,i){const s=t[r],a=t.reduce(((e,t,n)=>{const r=t.uri;return(e[r]||(e[r]=[])).push(n),e}),{})[s.uri];a.length>1&&(r=Math.max.apply(Math,a));const o=s.videoRange,l=s.frameRate,u=s.codecSet.substring(0,4),c=tt(t,r,(t=>{if(t.videoRange!==o||t.frameRate!==l||t.codecSet.substring(0,4)!==u)return!1;const r=t.audioGroups,s=n.filter((e=>!r||-1!==r.indexOf(e.groupId)));return Ze(e,s,i)>-1}));return c>-1?c:tt(t,r,(t=>{const r=t.audioGroups,s=n.filter((e=>!r||-1!==r.indexOf(e.groupId)));return Ze(e,s,i)>-1}))}(e,t.levels,n,r,et);if(-1===i)return null;t.nextLoadLevel=i}if(e.channels||e.audioCodec){const t=Ze(e,n);if(t>-1)return n[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;if(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(l.AUDIO_TRACK_SWITCHING,T({},r)),i)return;const s=this.switchParams(r.url,null==n?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||Je(e,r,et)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:a,channels:o}=e;for(let e=0;e<t.length;e++)if(Je({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:a,channels:o},t[e],et))return e;for(let n=0;n<t.length;n++){const r=t[n];if(Di(e.attrs,r.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const r=t[n];if(Di(e.attrs,r.attrs,["LANGUAGE"]))return n}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&nt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,a=null==s?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${a&&s.live?" age "+a.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(l.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}},emeController:Ss,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:Gi,su:!this.initialized})}catch(e){this.hls.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const{frag:t,part:n}=e,r=this.hls.levels[t.level],i=this.getObjectType(t),s={d:1e3*(n||t).duration,ot:i};i!==Vi&&i!==ji&&i!=zi||(s.br=r.bitrate/1e3,s.tb=this.getTopBandwidth(i)/1e3,s.bl=this.getBufferLength(i));const a=n?this.getNextPart(n):this.getNextFrag(t);null!=a&&a.url&&a.url!==t.url&&(s.nor=a.url),this.apply(e,s)}catch(e){this.hls.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;null!=n&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=!0===n.useHeaders,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHED,this.onMediaDetached,this),e.on(l.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHED,this.onMediaDetached,this),e.off(l.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=null==(n=t.tracks.audio)?void 0:n.buffer,this.videoBuffer=null==(r=t.tracks.video)?void 0:r.buffer}createData(){var e;return{v:1,sf:Yi,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){b(t,this.createData());const n=t.ot===Ki||t.ot===Vi||t.ot===zi;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce(((e,n)=>(r.includes(n)&&(e[n]=t[n]),e)),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),function(e,t,n){b(e,function(e,t={}){const n={};if(!e)return n;const r=Object.entries(e),i=Object.entries(Ji).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),s=r.reduce(((e,t)=>{var n,r;const[s,a]=t,o=(null===(n=i.find((e=>e[1].includes(s))))||void 0===n?void 0:n[0])||Xi;return null!==(r=e[o])&&void 0!==r||(e[o]={}),e[o][s]=a,e}),{});return Object.entries(s).reduce(((e,[n,r])=>(e[n]=ms(r,t),e)),n)}(t,n))}(e.headers,t,i)):e.url=function(e,t,n){const r=function(e,t={}){if(!e)return"";const n=ms(e,t);return`CMCD=${encodeURIComponent(n)}`}(t,n);if(!r)return e;if(vs.test(e))return e.replace(vs,r);const i=e.includes("?")?"&":"?";return`${e}${i}${r}`}(e.url,t,i)}getNextFrag(e){var t;const n=null==(t=this.hls.levels[e.level])?void 0:t.details;if(n){const t=e.sn-n.startSN;return n.fragments[t+1]}}getNextPart(e){var t,n;const{index:r,fragment:i}=e,s=null==(t=this.hls.levels[i.level])||null==(n=t.details)?void 0:n.partList;if(s){const{sn:e}=i;for(let t=s.length-1;t>=0;t--){const n=s[t];if(n.index===r&&n.fragment.sn===e)return s[t+1]}}}getObjectType(e){const{type:t}=e;return"subtitle"===t?Wi:"initSegment"===e.sn?Ki:"audio"===t?ji:"main"===t?this.hls.audioTracks.length?Vi:zi:void 0}getTopBandwidth(e){let t,n=0;const r=this.hls;if(e===ji)t=r.audioTracks;else{const e=r.maxAutoLevel,n=e>-1?e+1:r.levels.length;t=r.levels.slice(0,n)}return t.forEach((e=>{e.bitrate>n&&(n=e.bitrate)})),n>0?n:NaN}getBufferLength(e){const t=this.media,n=e===ji?this.audioBuffer:this.videoBuffer;return n&&t?1e3*Ot.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new n(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,n,r){t(e),this.loader.load(e,n,r)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new n(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,n,r){t(e),this.loader.load(e,n,r)}}}},contentSteeringController:class extends S{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter((t=>t!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;null!==n&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if(2===(null==n?void 0:n.action)&&1===n.flags){const e=this.levels;let r=this._pathwayPriority,i=this.pathwayId;if(t.context){const{groupId:n,pathwayId:r,type:s}=t.context;n&&e?i=this.getPathwayForGroupId(n,s,i):r&&(i=r)}i in this.penalizedPathways||(this.penalizedPathways[i]=performance.now()),!r&&e&&(r=this.pathways()),r&&r.length>1&&(this.updatePathwayPriority(r),n.resolved=this.pathwayId!==i),n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${i} levels: ${e?e.length:e} priorities: ${Ye(r)} penalized: ${Ye(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this._pathwayPriority=e;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach((e=>{r-n[e]>3e5&&delete n[e]}));for(let r=0;r<e.length;r++){const i=e[r];if(i in n)continue;if(i===this.pathwayId)return;const s=this.hls.nextLoadLevel,a=this.hls.levels[s];if(t=this.getLevelsForPathway(i),t.length>0){this.log(`Setting Pathway to "${i}"`),this.pathwayId=i,Bn(t),this.hls.trigger(l.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[s];a&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==a.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==a.bitrate&&this.log(`Unstable Pathways change from bitrate ${a.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=s);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let n=0;n<r.length;n++)if(t===h&&r[n].hasAudioGroup(e)||t===d&&r[n].hasSubtitleGroup(e))return r[n].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach((e=>{const{ID:i,"BASE-ID":s,"URI-REPLACEMENT":a}=e;if(t.some((e=>e.pathwayId===i)))return;const o=this.getLevelsForPathway(s).map((e=>{const t=new Gt(e.attrs);t["PATHWAY-ID"]=i;const s=t.AUDIO&&`${t.AUDIO}_clone_${i}`,o=t.SUBTITLES&&`${t.SUBTITLES}_clone_${i}`;s&&(n[t.AUDIO]=s,t.AUDIO=s),o&&(r[t.SUBTITLES]=o,t.SUBTITLES=o);const l=bs(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",a),u=new Ke({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)u.addGroupId("audio",`${e.audioGroups[t]}_clone_${i}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)u.addGroupId("text",`${e.subtitleGroups[t]}_clone_${i}`);return u}));t.push(...o),ys(this.audioTracks,n,a,i),ys(this.subtitleTracks,r,a,i)}))}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;let r;this.loader&&this.loader.destroy(),this.loader=new n(t);try{r=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==r.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+e)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},u={onSuccess:(e,t,n,i)=>{this.log(`Loaded steering manifest: "${r}"`);const s=e.data;if(1!==(null==s?void 0:s.VERSION))return void this.log(`Steering VERSION ${s.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=s.TTL;const{"RELOAD-URI":a,"PATHWAY-CLONES":o,"PATHWAY-PRIORITY":u}=s;if(a)try{this.uri=new self.URL(a,r).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${a}`)}this.scheduleRefresh(this.uri||n.url),o&&this.clonePathways(o);const c={steeringManifest:s,url:r.toString()};this.hls.trigger(l.STEERING_MANIFEST_LOADED,c),u&&this.updatePathwayPriority(u)},onError:(e,t,n,r)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let i=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,i);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(i=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,n)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,o,u)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var t;const n=null==(t=this.hls)?void 0:t.media;!n||n.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)}),t)}},interstitialsController:class extends S{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const e=this.currentTime;if(void 0===e||this.playbackDisabled)return;const t=e-this.timelinePos;if(Math.abs(t)<1/7056e5)return;const n=t<=-.01;this.timelinePos=e,this.bufferedPos=e;const r=this.playingItem;if(!r)return void this.checkBuffer();if(n&&this.schedule.resetErrorsInRange(e,e-t)&&this.updateSchedule(),this.checkBuffer(),n&&e<r.start||e>=r.end){var i;const e=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(r)&&null!=(i=this.media)&&i.paused&&(this.shouldPlay=!1),!n){const t=this.findItemIndex(r);if(e>t){const n=this.schedule.findJumpRestrictedIndex(t+1,e);if(n>t)return void this.setSchedulePosition(n)}}return void this.setSchedulePosition(e)}const s=this.playingAsset;if(!s){if(this.playingLastItem&&this.isInterstitial(r)){const t=r.event.assetList[0];t&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(e,t))}return}const a=s.timelineStart,o=s.duration||0;(n&&e<a||e>=a+o)&&this.setScheduleToAssetAtTime(e,s)},this.onTimeupdate=()=>{const e=this.currentTime;if(void 0===e||this.playbackDisabled)return;if(!(e>this.timelinePos))return;this.timelinePos=e,e>this.bufferedPos&&this.checkBuffer();const t=this.playingItem;if(!t||this.playingLastItem)return;if(e>=t.end){this.timelinePos=t.end;const e=this.findItemIndex(t);this.setSchedulePosition(e+1)}const n=this.playingAsset;n&&e>=n.timelineStart+(n.duration||0)&&this.setScheduleToAssetAtTime(e,n)},this.onScheduleUpdate=(e,t)=>{const n=this.schedule,r=this.playingItem,i=n.events||[],s=n.items||[],a=n.durations,o=e.map((e=>e.identifier)),u=!(!i.length&&!o.length);(u||t)&&this.log(`INTERSTITIALS_UPDATED (${i.length}): ${i}\nSchedule: ${s.map((e=>$s(e)))} pos: ${this.timelinePos}`),o.length&&this.log(`Removed events ${o}`),this.playerQueue.forEach((e=>{if(e.interstitial.appendInPlace){const t=e.assetItem.timelineStart,n=e.timelineOffset-t;if(n)try{e.timelineOffset=t}catch(r){Math.abs(n)>Is&&this.warn(`${r} ("${e.assetId}" ${e.timelineOffset}->${t})`)}}}));let c=null;if(r){const e=this.updateItem(r,this.timelinePos);this.itemsMatch(r,e)&&(this.playingItem=e,this.waitingItem=this.endedItem=null,c=()=>this.trimInPlace(e,r))}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const h=this.bufferingItem;if(h){const e=this.updateItem(h,this.bufferedPos);this.itemsMatch(h,e)?(this.bufferingItem=e,c||(c=()=>this.trimInPlace(e,h))):h.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(h.event,null))}if(e.forEach((e=>{e.assetList.forEach((e=>{this.clearAssetPlayer(e.identifier,null)}))})),u||t){if(this.hls.trigger(l.INTERSTITIALS_UPDATED,{events:i.slice(0),schedule:s.slice(0),durations:a,removedIds:o}),this.isInterstitial(r)&&o.includes(r.event.identifier))return this.warn(`Interstitial "${r.event.identifier}" removed while playing`),void this.primaryFallback(r.event);c&&c(),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Hs(e),this.schedule=new Us(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(l.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(l.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(l.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(l.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(l.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(l.BUFFER_APPENDED,this.onBufferAppended,this),e.on(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(l.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(l.MEDIA_ENDED,this.onMediaEnded,this),e.on(l.ERROR,this.onError,this),e.on(l.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(l.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(l.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(l.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(l.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(l.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(l.BUFFER_CODECS,this.onBufferCodecs,this),e.off(l.BUFFER_APPENDED,this.onBufferAppended,this),e.off(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(l.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(l.MEDIA_ENDED,this.onMediaEnded,this),e.off(l.ERROR,this.onError,this),e.off(l.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;null==(e=this.getBufferingPlayer())||e.resumeBuffering()}pauseBuffering(){var e;null==(e=this.getBufferingPlayer())||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){Ts(e,"play",this.onPlay),Ts(e,"pause",this.onPause),Ts(e,"seeking",this.onSeeking),Ts(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Es(n,"seeking",this.onSeeking),Es(n,"timeupdate",this.onTimeupdate),Es(n,"play",this.onPlay),Es(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,null===n)this.checkStart();else if(!r){this.clearScheduleState();const e=this.findItemIndex(n);this.setSchedulePosition(e)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const e=this.getBufferingPlayer();e&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,e.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=t=>t?e.getAssetPlayer(t.identifier):t,r=(t,r,i,a,o)=>{if(t){let l=t[r].start;const u=t.event;if(u){if("playout"===r||u.timelineOccupancy!==xs.Point){const e=n(i);(null==e?void 0:e.interstitial)===u&&(l+=e.assetItem.startOffset+e[o])}}else l+=("bufferedPos"===a?s():e[a])-t.start;return l}return 0},i=(t,n)=>{if(0!==t&&"primary"!==n&&e.schedule.length){var r;const i=e.schedule.findItemIndexAtTime(t),s=null==(r=e.schedule.items)?void 0:r[i];if(s)return t+(s[n].start-s.start)}return t},s=()=>{const t=e.bufferedPos;return t===Number.MAX_VALUE?a("primary"):Math.max(t,0)},a=t=>{var n;return null!=(n=e.primaryDetails)&&n.live?e.primaryDetails.edge:e.schedule.durations[t]},o=(t,i)=>{var s,a;const o=e.effectivePlayingItem;if(null!=o&&null!=(s=o.event)&&s.restrictions.skip)return;e.log(`seek to ${t} "${i}"`);const l=e.effectivePlayingItem,u=e.schedule.findItemIndexAtTime(t,i),c=null==(a=e.schedule.items)?void 0:a[u],h=e.getBufferingPlayer(),d=null==h?void 0:h.interstitial,f=null==d?void 0:d.appendInPlace,p=l&&e.itemsMatch(l,c);if(l&&(f||p)){const s=n(e.playingAsset),a=(null==s?void 0:s.media)||e.primaryMedia;if(a){const n="primary"===i?a.currentTime:r(l,i,e.playingAsset,"timelinePos","currentTime"),o=t-n,u=(f?n:a.currentTime)+o;if(u>=0&&(!s||f||u<=s.duration))return void(a.currentTime=u)}}if(c){let n=t;if("primary"!==i){const e=t-c[i].start;n=c.start+e}const r=!e.isInterstitial(c);if(e.isInterstitial(l)&&!l.event.appendInPlace||!r&&!c.event.appendInPlace){if(l){const s=e.findItemIndex(l);if(u>s){const t=e.schedule.findJumpRestrictedIndex(s+1,u);if(t>s)return void e.setSchedulePosition(t)}let a=0;if(r)e.timelinePos=n,e.checkBuffer();else{var g;const e=null==c||null==(g=c.event)?void 0:g.assetList;if(e){const n=t-(c[i]||c).start;for(let t=e.length;t--;){const r=e[t];if(r.duration&&n>=r.startOffset&&n<r.startOffset+r.duration){a=t;break}}}}e.setSchedulePosition(u,a)}}else{const t=e.media||(f?null==h?void 0:h.media:null);t&&(t.currentTime=n)}}},l=()=>{const n=e.effectivePlayingItem;if(e.isInterstitial(n))return n;const r=t();return e.isInterstitial(r)?r:null},u={get currentTime(){const t=l(),n=e.effectivePlayingItem;return n&&n===t?r(n,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-n.playout.start:0},set currentTime(t){const n=l(),r=e.effectivePlayingItem;r&&r===n&&o(t+r.playout.start,"playout")},get duration(){const e=l();return e?e.playout.end-e.playout.start:0},get assetPlayers(){var t;const n=null==(t=l())?void 0:t.event.assetList;return n?n.map((t=>e.getAssetPlayer(t.identifier))):[]},get playingIndex(){var t;const n=null==(t=l())?void 0:t.event;return n&&e.effectivePlayingAsset?n.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return l()}};this.manager={get events(){var t,n;return(null==(t=e.schedule)||null==(n=t.events)?void 0:n.slice(0))||[]},get schedule(){var t,n;return(null==(t=e.schedule)||null==(n=t.items)?void 0:n.slice(0))||[]},get interstitialPlayer(){return l()?u:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const n=t();return e.findItemIndex(n)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const t=e.effectivePlayingItem;return e.findItemIndex(t)},primary:{get bufferedEnd(){return s()},get currentTime(){const t=e.timelinePos;return t>0?t:0},set currentTime(e){o(e,"primary")},get duration(){return a("primary")},get seekableStart(){var t;return(null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(e){o(e,"integrated")},get duration(){return a("integrated")},get seekableStart(){var t;return i((null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0,"integrated")}},skip:()=>{const t=e.effectivePlayingItem,n=null==t?void 0:t.event;if(n&&!n.restrictions.skip){const r=e.findItemIndex(t);if(n.appendInPlace){const e=t.playout.start+t.event.duration;o(e+.001,"playout")}else e.advanceAfterAssetEnded(n,r,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=null==(e=this.schedule)?void 0:e.items;return!!(this.playbackStarted&&t&&n)&&this.findItemIndex(t)===n.length-1}get playbackStarted(){return null!==this.effectivePlayingItem}get currentTime(){var e,t,n;if(null===this.mediaSelection)return;const i=this.waitingItem||this.playingItem;if(this.isInterstitial(i)&&!i.event.appendInPlace)return;let s=this.media;!s&&null!=(e=this.bufferingItem)&&null!=(t=e.event)&&t.appendInPlace&&(s=this.primaryMedia);const a=null==(n=s)?void 0:n.currentTime;return void 0!==a&&r(a)?a:void 0}get primaryMedia(){var e;return this.media||(null==(e=this.detachedData)?void 0:e.media)||null}isInterstitial(e){return!(null==e||!e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r)return void(this.detachedData={media:r});const n=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Ye(n)}`),this.detachedData=n}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,a=e!==s,o=a&&e.interstitial.appendInPlace,l=null==(n=this.detachedData)?void 0:n.mediaSource;let u;if(s.media)o&&(i=s.transferMedia(),this.detachedData=i),u="Primary";else if(l){const e=this.getBufferingPlayer();e?(i=e.transferMedia(),u=`${e}`):u="detached MediaSource"}else u="detached media";if(!i)if(l)i=this.detachedData,this.log(`using detachedData: MediaSource ${Ye(i)}`);else if(!this.detachedData||s.media===t){const e=this.playerQueue;e.length>1&&e.forEach((e=>{if(a&&e.interstitial.appendInPlace!==o){const t=e.interstitial;this.clearInterstitial(e.interstitial,null),t.appendInPlace=!1,t.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${t}`)}})),this.hls.detachMedia(),this.detachedData={media:t}}const c=i&&"mediaSource"in i&&"closed"!==(null==(r=i.mediaSource)?void 0:r.readyState),h=c&&i?i:t;if(this.log(`${c?"transfering MediaSource":"attaching media"} to ${a?e:"Primary"} from ${u}`),h===i){const t=a&&e.assetId===this.schedule.assetIdAtEnd;h.overrides={duration:this.schedule.duration,endOfStream:!a||t,cueRemoval:!a}}e.attachMedia(h)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;-1===this.bufferedPos&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(-1===n){const n=this.hls.startPosition;if(this.timelinePos=n,t.length&&t[0].cue.pre){const n=e.findEventIndex(t[0].identifier);this.setSchedulePosition(n)}else if(n>=0||!this.primaryLive){const t=this.timelinePos=n>0?n:0,r=e.findItemIndexAtTime(t);this.setSchedulePosition(r)}}else if(r&&!this.playingItem){const t=e.findItemIndex(r);this.setSchedulePosition(t)}}advanceAfterAssetEnded(e,t,n){const r=Ns(e,n);if(e.isAssetPastPlayoutLimit(r)){const n=this.schedule.items;if(n){const r=t+1;if(r>=n.length)return void this.setSchedulePosition(-1);const i=e.resumeTime;this.timelinePos<i&&(this.timelinePos=i,this.checkBuffer()),this.setSchedulePosition(r)}}else this.setSchedulePosition(t,r)}setScheduleToAssetAtTime(e,t){const n=this.schedule,r=t.parentIdentifier,i=n.getEvent(r);if(i){const t=n.findEventIndex(r),s=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,t,s-1)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const r=e>=0?n[e]:null,i=this.playingItem,s=this.playingLastItem;if(this.isInterstitial(i)){var a;const u=i.event,c=this.playingAsset,h=null==c?void 0:c.identifier,d=h?this.getAssetPlayer(h):null;if(d&&h&&(!this.eventItemsMatch(i,r)||void 0!==t&&h!==(null==(a=u.assetList)?void 0:a[t].identifier))){var o;const t=u.findAssetIndex(c);this.log(`INTERSTITIAL_ASSET_ENDED ${t+1}/${u.assetList.length} ${Fs(c)}`),this.endedAsset=c,this.playingAsset=null,this.hls.trigger(l.INTERSTITIAL_ASSET_ENDED,{asset:c,assetListIndex:t,event:u,schedule:n.slice(0),scheduleIndex:e,player:d}),this.retreiveMediaSource(h,r),!d.media||null!=(o=this.detachedData)&&o.mediaSource||d.detachMedia()}if(!this.eventItemsMatch(i,r)&&(this.endedItem=i,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${u} ${$s(i)}`),u.hasPlayed=!0,this.hls.trigger(l.INTERSTITIAL_ENDED,{event:u,schedule:n.slice(0),scheduleIndex:e}),u.cue.once)){this.updateSchedule();const e=this.schedule.items;if(r&&e){const n=this.schedule.findItemIndex(r);this.advanceSchedule(n,e,t,i,s)}return}}this.advanceSchedule(e,n,t,i,s)}advanceSchedule(e,t,n,r,i){const s=e>=0?t[e]:null,a=this.primaryMedia,o=this.playerQueue;if(o.length&&o.forEach((t=>{const n=t.interstitial,r=this.schedule.findEventIndex(n.identifier);(r<e||r>e+1)&&this.clearInterstitial(n,s)})),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);const i=s.event;if(void 0===n){const t=Ns(i,(n=this.schedule.findAssetIndex(i,this.timelinePos))-1);if(i.isAssetPastPlayoutLimit(t))return void this.advanceAfterAssetEnded(i,e,n);n=t}const o=this.waitingItem;this.assetsBuffered(s,a)||this.setBufferingItem(s);let u=this.preloadAssets(i,n);if(this.eventItemsMatch(s,o||r)||(this.waitingItem=s,this.log(`INTERSTITIAL_STARTED ${$s(s)} ${i.appendInPlace?"append in place":""}`),this.hls.trigger(l.INTERSTITIAL_STARTED,{event:i,schedule:t.slice(0),scheduleIndex:e})),!i.assetListLoaded)return void this.log(`Waiting for ASSET-LIST to complete loading ${i}`);if(i.assetListLoader&&(i.assetListLoader.destroy(),i.assetListLoader=void 0),!a)return void this.log(`Waiting for attachMedia to start Interstitial ${i}`);this.waitingItem=this.endedItem=null,this.playingItem=s;const c=i.assetList[n];if(!c){const r=t[e+1],s=this.media;return r&&s&&!this.isInterstitial(r)&&s.currentTime<r.start&&(s.currentTime=this.timelinePos=r.start),void this.advanceAfterAssetEnded(i,e,n||0)}if(u||(u=this.getAssetPlayer(c.identifier)),null===u||u.destroyed){const e=i.assetList.length;this.warn(`asset ${n+1}/${e} player destroyed ${i}`),u=this.createAssetPlayer(i,c,n)}if(!this.eventItemsMatch(s,this.bufferingItem)&&i.appendInPlace&&this.isAssetBuffered(c))return;this.startAssetPlayer(u,n,t,e,a),this.shouldPlay&&Gs(u.media)}else null!==s?(this.resumePrimary(s,e,r),this.shouldPlay&&Gs(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return!1===this.hls.config.enableInterstitialPlayback}get primaryDetails(){var e,t;return null==(e=this.mediaSelection)||null==(t=e.main)?void 0:t.details}get primaryLive(){var e;return!(null==(e=this.primaryDetails)||!e.live)}resumePrimary(e,t,n){var r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${$s(e)}`),null==(r=this.detachedData)||!r.mediaSource){let n=this.timelinePos;(n<e.start||n>=e.end)&&(n=this.getPrimaryResumption(e,t),this.timelinePos=n),this.attachPrimary(n,e)}if(!n)return;const i=this.schedule.items;i&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${$s(e)}`),this.hls.trigger(l.INTERSTITIALS_PRIMARY_RESUMED,{schedule:i.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const e=this.primaryDetails;if(0===t)return this.hls.startPosition;if(e&&(n<e.fragmentStart||n>e.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return null!=t&&t.hls?t.hls.bufferedToEnd:Ot.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs(((null==(n=r.mainForwardBufferInfo)?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(l.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(l.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(-1===t.level)return;const n=this.hls.levels[t.level],r=T(T({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r)return void(this.altSelection=T(T({},this.altSelection),{},{audio:n}));const i=T(T({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r)return void(this.altSelection=T(T({},this.altSelection),{},{subtitles:n}));const i=T(T({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Qe(t);this.playerQueue.forEach((e=>e.hls.setAudioOption(t)||e.hls.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Qe(t);this.playerQueue.forEach((e=>e.hls.setSubtitleOption(t)||-1!==t.id&&e.hls.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const e=this.timelinePos;this.bufferedPos=e,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let e=0;e<t.length;e++){const r=t[e];if(r.cue.post){var n;const e=this.schedule.findEventIndex(r.identifier),t=null==(n=this.schedule.items)?void 0:n[e];this.isInterstitial(t)&&this.eventItemsMatch(t,this.bufferingItem)&&this.bufferedToItem(t,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const e=this.findItemIndex(t);this.setSchedulePosition(e+1)}else this.shouldPlay=!1}updateItem(e,t){const n=this.schedule.items;return e&&n&&n[this.findItemIndex(e,t)]||null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach(((t,n)=>{e.event.isAssetPastPlayoutLimit(n)&&this.clearAssetPlayer(t.identifier,null)}));const t=e.end+.25,n=Ot.bufferInfo(this.primaryMedia,t,0);(n.end>t||(n.nextStart||0)>t)&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===(null==(n=t.event)?void 0:n.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const n=Ot.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e)return;if(1===t.length&&this.itemsMatch(t[0],i))return void(this.bufferedPos=e);const s=this.playingItem,a=this.findItemIndex(s);let o=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,u;const n=this.findItemIndex(i),r=Math.min(n+1,t.length-1),s=t[r];if((-1===o&&i&&e>=i.end||null!=(l=s.event)&&l.appendInPlace&&e+.01>=s.start)&&(o=r),r-a>1&&!1===(null==i||null==(u=i.event)?void 0:u.appendInPlace))return;if(this.bufferedPos=e,o>n&&o>a)this.bufferedToItem(s);else{const t=this.primaryDetails;this.primaryLive&&t&&e>t.edge-t.targetduration&&s.start<t.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(s)&&this.preloadAssets(s.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(o===a?this.bufferedToItem(s):o===a+1&&this.bufferedToItem(t[o]))}assetsBuffered(e,t){return 0!==e.event.assetList.length&&!e.event.assetList.some((e=>{const n=this.getAssetPlayer(e.identifier);return!(null!=n&&n.bufferedInPlaceToEnd(t))}))}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),a=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const o=a?a.remaining:t?t.end-this.timelinePos:0;this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${$s(e)}`+(t?` (${o.toFixed(2)} remaining)`:"")),this.playbackDisabled||(s?e.event.assetList.forEach((e=>{const t=this.getAssetPlayer(e.identifier);t&&t.resumeBuffering()})):(this.hls.resumeBuffering(),this.playerQueue.forEach((e=>e.pauseBuffering())))),this.hls.trigger(l.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled)if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(null!==n){this.bufferingAsset=null;const t=this.detachedData;if(t)if(t.mediaSource){const t=!0;this.attachPrimary(e.start,e,t)}else this.preloadPrimary(e);else this.preloadPrimary(e)}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=0===n.assetList.length&&!n.assetListLoader,i=n.cue.once;if(r||!i){const e=this.preloadAssets(n,t);if(null!=e&&e.interstitial.appendInPlace){const r=n.assetList[t],i=this.primaryMedia;r&&i&&this.bufferAssetPlayer(e,i)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=0===r&&!e.assetListLoader,s=e.cue.once;if(i){const i=e.timelineStart;if(e.appendInPlace){var a;const t=this.playingItem;this.isInterstitial(t)||(null==t||null==(a=t.nextEvent)?void 0:a.identifier)!==e.identifier||this.flushFrontBuffer(i+.25)}let s,o=0;if(!this.playingItem&&this.primaryLive&&(o=this.hls.startPosition,-1===o&&(o=this.hls.liveSyncPosition||0)),o&&!e.cue.pre&&!e.cue.post){const e=o-i;e>0&&(s=Math.round(1e3*e)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${s?` live-start: ${o} start-offset: ${s}`:""}`),n)return this.createAsset(e,0,0,i,e.duration,n);const l=this.assetListLoader.loadAssetList(e,s);l&&(e.assetListLoader=l)}else if(!s&&r){for(let n=t;n<r;n++){const t=e.assetList[n],r=this.getAssetPlayerQueueIndex(t.identifier);-1!==r&&!this.playerQueue[r].destroyed||t.error||this.createAssetPlayer(e,t,n)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;t&&(this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach((t=>{this.hls.trigger(l.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:t})})))}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t)for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n];return null}createAsset(e,t,n,r,i,s){const a={parentIdentifier:e.identifier,identifier:Ps(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,a,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const u=r.loadLevelObj||r.levels[r.currentLevel];(s||u)&&(s=b({},s),u.videoCodec&&(s.videoCodec=u.videoCodec),u.videoRange&&(s.allowedVideoRanges=[u.videoRange]));const c=r.audioTracks[r.audioTrack],h=r.subtitleTracks[r.subtitleTrack];let d=0;if(this.primaryLive||e.appendInPlace){const e=this.timelinePos-t.timelineStart;if(e>1){const n=t.duration;n&&e<n&&(d=e)}}const f=t.identifier,p=T(T({},i),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:f,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:d,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:c||i.audioPreference,subtitlePreference:h||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(p.timelineOffset=t.timelineStart));const g=p.cmcd;null!=g&&g.sessionId&&g.contentId&&(p.cmcd=b({},g,{contentId:Rs(t.uri)})),this.getAssetPlayer(f)&&this.warn(`Duplicate date range identifier ${e} and asset ${f}`);const m=new Bs(this.HlsPlayerClass,p,e,t);this.playerQueue.push(m),e.assetList[n]=t;const v=r=>{if(r.live){const t=new Error(`Interstitials MUST be VOD assets ${e}`),r={fatal:!0,type:a.OTHER_ERROR,details:o.INTERSTITIAL_ASSET_ITEM_ERROR,error:t};return void this.handleAssetItemError(r,e,this.schedule.findEventIndex(e.identifier),n,t.message)}const i=r.edge-r.fragmentStart,s=t.duration;(null===s||i>s)&&(this.log(`Interstitial asset "${f}" duration change ${s} > ${i}`),t.duration=i,this.updateSchedule())};m.on(l.LEVEL_UPDATED,((e,{details:t})=>v(t))),m.on(l.LEVEL_PTS_UPDATED,((e,{details:t})=>v(t)));const y=(e,t)=>{const n=this.getAssetPlayer(f);if(n&&t.tracks){n.off(l.BUFFER_CODECS,y),n.tracks=t.tracks;const e=this.primaryMedia;this.bufferingAsset===n.assetItem&&e&&!n.media&&this.bufferAssetPlayer(n,e)}};m.on(l.BUFFER_CODECS,y);const E=()=>{var n;const r=this.getAssetPlayer(f);if(this.log(`buffered to end of asset ${r}`),!r)return;const i=this.schedule.findEventIndex(e.identifier),s=null==(n=this.schedule.items)?void 0:n[i];if(this.isInterstitial(s)){const n=e.findAssetIndex(t),r=Ns(e,n);if(e.isAssetPastPlayoutLimit(r)){var a;const e=null==(a=this.schedule.items)?void 0:a[i+1];e&&this.bufferedToItem(e)}else this.bufferedToItem(s,r)}};m.on(l.BUFFERED_TO_END,E);const S=t=>()=>{if(!this.getAssetPlayer(f))return;this.shouldPlay=!0;const n=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,n,t)};return m.once(l.MEDIA_ENDED,S(n)),m.once(l.PLAYOUT_LIMIT_REACHED,S(1/0)),m.on(l.ERROR,((t,r)=>{const i=this.getAssetPlayer(f);if(r.details!==o.BUFFER_STALLED_ERROR)this.handleAssetItemError(r,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${r.error} ${e}`);else if(null!=i&&i.media){const t=i.currentTime,n=i.duration-t;t&&e.appendInPlace&&n/i.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${f} ${e} at ${i.media.currentTime}`),E()):(this.warn(`Stalled at ${t} of ${t+n} in asset ${f} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}})),m.on(l.DESTROYING,(()=>{if(!this.getAssetPlayer(f))return;const t=new Error(`Asset player destroyed unexpectedly ${f}`),r={fatal:!0,type:a.OTHER_ERROR,details:o.INTERSTITIAL_ASSET_ITEM_ERROR,error:t};this.handleAssetItemError(r,e,this.schedule.findEventIndex(e.identifier),n,t.message)})),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Fs(t)}`),this.hls.trigger(l.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:m}),m}clearInterstitial(e,t){e.assetList.forEach((e=>{this.clearAssetPlayer(e.identifier,t)})),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(-1!==t){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(-1!==n){this.log(`clear asset player "${e}" toSegment: ${t?$s(t):t}`);const r=this.playerQueue[n];this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:a,assetId:o}=e,u=s.assetList.length,c=this.playingAsset;this.endedAsset=null,this.playingAsset=a,c&&c.identifier===o||(c&&(this.clearAssetPlayer(c.identifier,n[r]),delete c.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${u} ${Fs(a)}`),this.hls.trigger(l.INTERSTITIAL_ASSET_STARTED,{asset:a,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;const{interstitial:i,assetItem:s}=e,l=this.schedule.findEventIndex(i.identifier),u=null==(n=this.schedule.items)?void 0:n[l];if(!u)return;this.setBufferingItem(u),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const h=i.appendInPlace;if(h&&!1===(null==c?void 0:c.interstitial.appendInPlace))return;const d=(null==c?void 0:c.tracks)||(null==(r=this.detachedData)?void 0:r.tracks)||this.requiredTracks;if(h&&s!==this.playingAsset){if(!e.tracks)return;if(d&&!I(d,e.tracks)){const t=new Error(`Asset ${Fs(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(d)}')`),n={fatal:!0,type:a.OTHER_ERROR,details:o.INTERSTITIAL_ASSET_ITEM_ERROR,error:t},r=i.findAssetIndex(s);return void this.handleAssetItemError(n,i,l,r,t.message)}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,r,i){if(e.details===o.BUFFER_STALLED_ERROR)return;const s=t.assetList[r];this.warn(`INTERSTITIAL_ASSET_ERROR ${s?Fs(s):s} ${e.error}`);const a=null==s?void 0:s.identifier,u=this.getAssetPlayerQueueIndex(a),c=this.playerQueue[u]||null,h=this.schedule.items,d=b({},e,{fatal:!1,errorAction:ft(!0),asset:s,assetListIndex:r,event:t,schedule:h,scheduleIndex:n,player:c});if(this.hls.trigger(l.INTERSTITIAL_ASSET_ERROR,d),!e.fatal)return;const f=this.playingAsset,p=new Error(i);if(s&&(this.clearAssetPlayer(a,null),s.error=p),t.assetList.some((e=>!e.error))){if(t.appendInPlace){for(let e=r;e<t.assetList.length;e++)this.resetAssetPlayer(t.assetList[e].identifier);this.updateSchedule()}}else t.error=p;t.error?this.primaryFallback(t):f&&f.identifier===a&&this.advanceAfterAssetEnded(t,n,r)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?$s(n):"<none>"} error: ${e.error}`);let r=this.timelinePos;-1===r&&(r=this.hls.startPosition);const i=this.updateItem(n,r);this.itemsMatch(n,i)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}else this.checkStart()}onAssetListLoaded(e,t){var n;const r=t.event,i=r.identifier,s=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(i))return;const a=r.timelineStart,o=r.duration;let l=0;s.forEach(((e,t)=>{const n=parseFloat(e.DURATION);this.createAsset(r,t,l,a+l,n,e.URI),l+=n})),r.duration=l,this.log(`Loaded asset-list with duration: ${l} (was: ${o}) ${r}`);const u=this.waitingItem,c=(null==u?void 0:u.event.identifier)===i;this.updateSchedule();const h=null==(n=this.bufferingItem)?void 0:n.event;if(c){var d;const e=this.schedule.findEventIndex(i),t=null==(d=this.schedule.items)?void 0:d[e];if(t){if(!this.playingItem&&this.timelinePos>t.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==e)return r.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${r}`),void this.primaryFallback(r);this.setBufferingItem(t)}this.setSchedulePosition(e)}else if((null==h?void 0:h.identifier)===i&&h.appendInPlace){const e=r.assetList[0],t=this.getAssetPlayer(e.identifier),n=this.primaryMedia;e&&t&&n&&this.bufferAssetPlayer(t,n)}}onError(e,t){switch(t.details){case o.ASSET_LIST_PARSING_ERROR:case o.ASSET_LIST_LOAD_ERROR:case o.ASSET_LIST_LOAD_TIMEOUT:{const e=t.interstitial;e&&this.primaryFallback(e);break}case o.BUFFER_STALLED_ERROR:this.onTimeupdate(),this.checkBuffer(!0)}}}});function za(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(za):Object.keys(e).reduce(((t,n)=>(t[n]=za(e[n]),t)),{}):e}class Ka extends xt{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var e;null!=(e=this.media)&&e.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{var e;this.hls&&(this.ended=(null==(e=this.media)?void 0:e.currentTime)||1,this.hls.trigger(l.MEDIA_ENDED,{stalled:!1}))},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(100),this.mediaSource=t.mediaSource;const n=this.media=t.media;Es(n,"playing",this.onMediaPlaying),Es(n,"waiting",this.onMediaWaiting),Es(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Ts(n,"playing",this.onMediaPlaying),Ts(n,"waiting",this.onMediaWaiting),Ts(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(null==(e=this.media)||!e.readyState||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=null==(n=this.hls)?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:a}=s,o=this.seeking&&!a,u=!this.seeking&&a,c=s.paused&&!a||s.ended||0===s.playbackRate;if(this.seeking=a,e!==t)return t&&(this.ended=0),this.moved=!0,a||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!c&&e>t&&this.nudgeOnVideoHole(e,t)),void(0===this.waiting&&this.stallResolved(e));if(u||o)return void(o&&this.stallResolved(e));if(c)return this.nudgeRetry=0,this.stallResolved(e),void(!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(l.MEDIA_ENDED,{stalled:!1})));if(!Ot.getBuffered(s).length)return void(this.nudgeRetry=0);const h=Ot.bufferInfo(s,e,0),d=h.nextStart||0,f=this.fragmentTracker;if(a&&f&&this.hls){const t=Wa(this.hls.inFlightFragments,e),n=h.len>2,r=!d||t||d-e>2&&!f.getPartialFragment(e);if(n||r)return;this.moved=!1}const p=null==(r=this.hls)?void 0:r.latestLevelDetails;if(!this.moved&&null!==this.stalled&&f){if(!(h.len>0||d))return;const t=Math.max(d,h.start||0)-e,n=null!=p&&p.live?2*p.targetduration:2,r=f.getPartialFragment(e);if(t>0&&(t<=n||r))return void(s.paused||this._trySkipBufferHole(r))}const g=i.detectStallWithCurrentTimeMs,m=self.performance.now(),v=this.waiting;let y=this.stalled;if(null===y){if(!(v>0&&m-v<g))return void(this.stalled=m);y=this.stalled=v}const b=m-y;if(!a&&(b>=g||v)&&this.hls){var E;if("ended"===(null==(E=this.mediaSource)?void 0:E.readyState)&&(null==p||!p.live)&&Math.abs(e-((null==p?void 0:p.edge)||0))<1){if(this.ended)return;return this.ended=e||1,void this.hls.trigger(l.MEDIA_ENDED,{stalled:!0})}if(this._reportStall(h),!this.media||!this.hls)return}const T=Ot.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(T,b,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(l.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&null!=(n=this.buffered.audio)&&n.length&&r&&r.length>1&&e>r.end(0)){const n=Ot.bufferedInfo(Ot.timeRangesToArray(this.buffered.audio),e,0);if(n.len>1&&t>=n.start){const n=Ot.timeRangesToArray(r),i=Ot.bufferedInfo(n,t,0).bufferedIndex;if(i>-1&&i<n.length-1){const t=Ot.bufferedInfo(n,e,0).bufferedIndex,r=n[i].end,s=n[i+1].start;if((-1===t||t>i)&&s-r<1&&e-r<2){const n=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${r} -> ${s} buffered index: ${t}`);this.warn(n.message),this.media.currentTime+=1e-6;const i=this.fragmentTracker.getPartialFragment(e)||void 0,u=Ot.bufferInfo(this.media,e,0);this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:n,reason:n.message,frag:i,buffer:u.len,bufferInfo:u})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:a}=this,o=null==(r=this.hls)?void 0:r.config;if(!a||!s||!o)return;const l=null==(i=this.hls)?void 0:i.latestLevelDetails,u=s.getPartialFragment(n);if((u||null!=l&&l.live&&n<l.fragmentStart)&&(this._trySkipBufferHole(u)||!this.media))return;const c=e.buffered,h=this.adjacentTraversal(e,n);(c&&c.length>1&&e.len>o.maxBufferHole||e.nextStart&&(e.nextStart-n<o.maxBufferHole||h))&&(t>1e3*o.highBufferWatchdogPeriod||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const e=n.getFragAtPos(t,f),i=n.getFragAtPos(r,f);if(e&&i)return i.sn-e.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&null!==i&&n&&t){this.stallReported=!0;const r=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Ye(e)})`);this.warn(r.message),t.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=null==(t=this.hls)?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,u=Ot.bufferInfo(r,s,0),c=s<u.start?u.start:u.nextStart;if(c&&this.hls){const t=u.len<=i.maxBufferHole,d=u.len>0&&u.len<1&&r.readyState<3,p=c-s;if(p>0&&(t||d)){if(p>i.maxBufferHole){let t=!1;if(0===s){const e=n.getAppendedFrag(0,f);e&&c<e.end&&(t=!0)}if(!t){const t=e||n.getAppendedFrag(s,f);if(t){var h;if(null==(h=this.hls.loadLevelObj)||!h.details)return 0;if(Wa(this.hls.inFlightFragments,c))return 0;let e=!1,r=t.end;for(;r<c;){const t=n.getPartialFragment(r);if(!t){e=!0;break}r+=t.duration}if(e)return 0}}}const t=Math.max(c+.05,s+.1);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${t}`),this.moved=!0,r.currentTime=t,null==e||!e.gap){const n=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${t}`);this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:n,reason:n.message,frag:e||void 0,buffer:u.len,bufferInfo:u})}return t}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=null==t?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const u=s+(r+1)*i.nudgeOffset,c=new Error(`Nudging 'currentTime' from ${s} to ${u}`);this.warn(c.message),n.currentTime=u,t.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_NUDGE_ON_STALL,error:c,fatal:!1,buffer:e.len,bufferInfo:e})}else{const n=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(n.message),t.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.BUFFER_STALLED_ERROR,error:n,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Wa(e,t){const n=Ya(e.main);if(n&&n.start<=t)return n;const r=Ya(e.audio);return r&&r.start<=t?r:null}function Ya(e){if(!e)return null;switch(e.state){case zn:case Vn:case Zn:case Jn:return null}return e.frag}function qa(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Xa(e,t,n,r,i){let s=new e(t,n,"");try{s.value=r,i&&(s.type=i)}catch(a){s=new e(t,n,Ye(i?T({type:i},r):r))}return s}const Qa=(()=>{const e=qa();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Za{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(l.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(l.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(l.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(l.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(l.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var n;this.media=t.media,!1===(null==(n=t.overrides)?void 0:n.cueRemoval)&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,t.transferMedia||(this.id3Track&&(this.removeCues&&ks(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if("metadata"===n.kind&&"id3"===n.label)return _s(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:r}}}=this;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=qa();if(s)for(let e=0;e<i.length;e++){const t=i[e].type;if(t===xr.emsg&&!n||!r)continue;const a=Lr(i[e].data);if(a){const n=i[e].pts;let r=n+i[e].duration;r>Qa&&(r=Qa),r-n<=0&&(r=n+.25);for(let e=0;e<a.length;e++){const i=a[e];if(!Cr(i)){this.updateId3CueEnds(n,t);const e=Xa(s,n,r,i,t);e&&this.id3Track.addCue(e)}}}}}updateId3CueEnds(e,t){var n;const r=null==(n=this.id3Track)?void 0:n.cues;if(r)for(let n=r.length;n--;){const i=r[n];i.type===t&&i.startTime<e&&i.endTime===Qa&&(i.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:o}}=s;if(i&&(a||o)){let e;e="audio"===r?e=>e.type===xr.audioId3&&o:"video"===r?e=>e.type===xr.emsg&&a:e=>e.type===xr.audioId3&&o||e.type===xr.emsg&&a,Ls(i,t,n,e)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:n}=this,{dateRanges:i}=e,s=Object.keys(i);let a=this.dateRangeCuesAppended;var o;if(n&&t)if(null!=(o=n.cues)&&o.length){const e=Object.keys(a).filter((e=>!s.includes(e)));for(let t=e.length;t--;){const r=e[t],i=a[r].cues;delete a[r],Object.keys(i).forEach((e=>{try{const t=i[e];t.removeEventListener("enter",this.onEventCueEnter),n.removeCue(t)}catch(e){}}))}}else a=this.dateRangeCuesAppended={};const l=e.fragments[e.fragments.length-1];if(0===s.length||!r(null==l?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const u=qa();for(let e=0;e<s.length;e++){const t=s[e],n=i[t],r=n.startTime,o=a[t],l=(null==o?void 0:o.cues)||{};let d=(null==o?void 0:o.durationKnown)||!1,f=Qa;const{duration:p,endDate:g}=n;if(g&&null!==p)f=r+p,d=!0;else if(n.endOnNext&&!d){const e=s.reduce(((e,t)=>{if(t!==n.id){const r=i[t];if(r.class===n.class&&r.startDate>n.startDate&&(!e||n.startDate<e.startDate))return r}return e}),null);e&&(f=e.startTime,d=!0)}const m=Object.keys(n.attr);for(let e=0;e<m.length;e++){const i=m[e];if("ID"===(h=i)||"CLASS"===h||"CUE"===h||"START-DATE"===h||"DURATION"===h||"END-DATE"===h||"END-ON-NEXT"===h)continue;const s=l[i];if(s)d&&!o.durationKnown?s.endTime=f:Math.abs(s.startTime-r)>.01&&(s.startTime=r,s.endTime=f);else if(u){let e=n.attr[i];jt(i)&&(c=e,e=Uint8Array.from(c.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const s=Xa(u,r,f,{key:i,data:e},xr.dateRange);s&&(s.id=t,this.id3Track.addCue(s),l[i]=s,this.hls.config.interstitialsController&&("X-ASSET-LIST"!==i&&"X-ASSET-URL"!==i||s.addEventListener("enter",this.onEventCueEnter)))}}a[t]={cues:l,dateRange:n,durationKnown:d}}var c,h}}class Ja{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:e}=this,t=this.levelDetails;if(!e||!t)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(null===n)return;this._latency=n;const{lowLatencyMode:r,maxLiveSyncPlaybackRate:i}=this.config;if(!r||1===i||!t.live)return;const s=this.targetLatency;if(null===s)return;const a=n-s;if(a<Math.min(this.maxLatency,s+t.targetduration)&&a>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,i)),n=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20,r=Math.min(t,Math.max(1,n));this.changeMediaPlaybackRate(e,r)}else 1!==e.playbackRate&&0!==e.playbackRate&&this.changeMediaPlaybackRate(e,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return(null==(e=this.hls)?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(void 0!==e.liveMaxLatencyDuration)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(null===e||null===this.hls)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:a}=this.config,o=this.hls.userConfig;let l=a&&n||t;(this._targetLatencyUpdated||o.liveSyncDuration||o.liveSyncDurationCount||0===l)&&(l=void 0!==i?i:s*r);const u=r;return l+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,u)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(null===e||null===t)return null;const n=this.levelDetails;if(null===n)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,a=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),a)}get drift(){const e=this.levelDetails;return null===e?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(l.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(l.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(l.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===o.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&null!=(n=this.levelDetails)&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&(null==(n=this.hls)||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${null==(r=this.targetLatency)?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}class eo extends xi{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(l.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(l.FRAG_BUFFERED,this.onFragBuffered,this),e.on(l.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(l.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(l.FRAG_BUFFERED,this.onFragBuffered,this),e.off(l.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let a=!1,o=!1,l=!1;t.levels.forEach((e=>{const t=e.attrs;let{audioCodec:u,videoCodec:c}=e;u&&(e.audioCodec=u=Pe(u,n)||void 0),c&&(c=e.videoCodec=function(e){const t=e.split(",");for(let e=0;e<t.length;e++){const n=t[e].split(".");n.length>2&&"avc1"===n[0]&&(t[e]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return t.join(",")}(c));const{width:h,height:d,unknownCodecs:f}=e;let p=f?f.length:0;if(f)for(let t=p;t--;){const n=f[t];this.isAudioSupported(n)?(e.audioCodec=u=u?`${u},${n}`:n,p--,we.audio[u.substring(0,4)]=2):this.isVideoSupported(n)&&(e.videoCodec=c=c?`${c},${n}`:n,p--,we.video[c.substring(0,4)]=2)}if(a||(a=!(!h||!d)),o||(o=!!c),l||(l=!!u),p||u&&!this.isAudioSupported(u)||c&&!this.isVideoSupported(c))return void this.log(`Some or all CODECS not supported "${t.CODECS}"`);const{CODECS:g,"FRAME-RATE":m,"HDCP-LEVEL":v,"PATHWAY-ID":y,RESOLUTION:b,"VIDEO-RANGE":E}=t,T=`${y||"."}-${e.bitrate}-${b}-${m}-${g}-${E}-${v}`;if(i[T])if(i[T].uri===e.url||e.attrs["PATHWAY-ID"])i[T].addGroupId("audio",t.AUDIO),i[T].addGroupId("text",t.SUBTITLES);else{const t=s[T]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const n=this.createLevel(e);i[T]=n,r.push(n)}else{const t=this.createLevel(e);i[T]=t,s[T]=1,r.push(t)}})),this.filterAndSortMediaOptions(r,t,a,o,l)}createLevel(e){const t=new Ke(e),n=e.supplemental;if(null!=n&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const e=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(e.message),t.supportedResult=Be(e,[])}return t}isAudioSupported(e){return Ae(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ae(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],u=[],c=e;if((n||r)&&i&&(c=c.filter((({videoCodec:e,videoRange:t,width:n,height:r})=>{return(!!e||!(!n||!r))&&!!(i=t)&&je.indexOf(i)>-1;var i}))),0===c.length)return void Promise.resolve().then((()=>{if(this.hls){let e="no level with compatible codecs found in manifest",n=e;t.levels.length&&(n=`one or more CODECS in variant not supported: ${Ye(t.levels.map((e=>e.attrs.CODECS)).filter(((e,t,n)=>n.indexOf(e)===t)))}`,this.warn(n),e+=` (${n})`);const r=new Error(e);this.hls.trigger(l.ERROR,{type:a.MEDIA_ERROR,details:o.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:r,reason:n})}}));t.audioTracks&&(s=t.audioTracks.filter((e=>!e.audioCodec||this.isAudioSupported(e.audioCodec))),to(s)),t.subtitles&&(u=t.subtitles,to(u));const h=c.slice(0);c.sort(((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return je.indexOf(e.videoRange)-je.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const n=Ce(e.videoCodec),r=Ce(t.videoCodec);if(n!==r)return r-n}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const n=Re(e.codecSet),r=Re(t.codecSet);if(n!==r)return r-n}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let d=h[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==h.length))for(let e=0;e<h.length;e++)if(h[e].pathwayId===c[0].pathwayId){d=h[e];break}this._levels=c;for(let e=0;e<c.length;e++)if(c[e]===d){var f;this._firstLevel=e;const t=d.bitrate,n=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${t}`),void 0===(null==(f=this.hls.userConfig)?void 0:f.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>n&&n===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const p=i&&!r,g=this.hls.config,m=!(!g.audioStreamController||!g.audioTrackController),v={levels:c,audioTracks:s,subtitleTracks:u,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:m&&!p&&s.some((e=>!!e.url))};this.hls.trigger(l.MANIFEST_PARSED,v)}get levels(){return 0===this._levels.length?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const n=new Error("invalid level idx"),r=e<0;if(this.hls.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.LEVEL_SWITCH_ERROR,level:e,fatal:r,error:n,reason:n.message}),r)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],u=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===u)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${u?" with Pathway "+u:""} from level ${n}${i?" with Pathway "+i:""}`);const c={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(l.LEVEL_SWITCHING,c);const h=s.details;if(!h||h.live){const e=this.switchParams(s.uri,null==r?void 0:r.details,h);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter((e=>-1!==t.indexOf(e)));if(e.length<1)return void this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);this.steering.pathwayPriority=n}}onError(e,t){!t.fatal&&t.context&&t.context.type===c&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===f){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return;const n=this._levels[t.level];null!=n&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;var a;if(!s)return this.warn(`Invalid level index ${r}`),void(null!=(a=t.deliveryDirectives)&&a.skip&&(i.deltaUpdateFailed=!0));if(s===this.currentLevel||t.withoutMultiVariant){0===s.fragmentError&&(s.loadError=0);let e=s.details;e===t.details&&e.advanced&&(e=void 0),this.playlistLoaded(r,t,e)}else null!=(n=t.deliveryDirectives)&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,a=null==s?void 0:s.age;this.log(`Loading level index ${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${a&&s.live?" age "+a.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(l.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(1===this._levels.length)return;const n=this._levels.filter(((t,n)=>n!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((e=>e.level=-1))),!1)));Bn(n),this._levels=n,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(l.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(l.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function to(e){const t={};e.forEach((e=>{const n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function no(){return self.SourceBuffer||self.WebKitSourceBuffer}function ro(){if(!R())return!1;const e=no();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class io extends nr{constructor(e,t,n){super(e,t,n,"stream-controller",f),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const e=this.media,t=e?e.currentTime:null;if(null===t||!r(t))return;if(this.log(`Media seeked to ${t.toFixed(3)}`),!this.getBufferedFrag(t))return;const n=this.getFwdBufferInfoAtPos(e,t,f,0);null!==n&&0!==n.len?this.tick():this.warn(`Main forward buffer length at ${t} on "seeked" event ${n?n.len:"empty"})`)},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(l.MANIFEST_PARSED,this.onManifestParsed,this),e.on(l.LEVEL_LOADING,this.onLevelLoading,this),e.on(l.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(l.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(l.BUFFER_CREATED,this.onBufferCreated,this),e.on(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(l.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(l.MANIFEST_PARSED,this.onManifestParsed,this),e.off(l.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(l.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(l.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(l.BUFFER_CREATED,this.onBufferCreated,this),e.off(l.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(l.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(l.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=r.startLevel;-1===e&&(r.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=r.firstAutoLevel),r.nextLoadLevel=e,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&-1===e&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=zn,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Vn}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case tr:{const{levels:e,level:t}=this,n=null==e?void 0:e[t],r=null==n?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=zn;break}if(this.hls.nextLoadLevel!==this.level){this.state=zn;break}break}case Yn:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,n=null==e?void 0:e[t];this.resetStartWhenNotLoaded(n||null),this.state=zn}}}this.state===zn&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),null!=(e=this.media)&&e.readyState&&!1===this.media.seeking&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(null===t||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(null==n||!n[i])return;const s=n[i],a=this.getMainFwdBufferInfo();if(null===a)return;const o=this.getLevelDetails();if(o&&this._streamEnded(a,o)){const e={};return 2===this.altAudio&&(e.type="video"),this.hls.trigger(l.BUFFER_EOS,e),void(this.state=Zn)}if(!this.buffering)return;e.loadLevel!==i&&-1===e.manualLevel&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const u=s.details;if(!u||this.state===tr||this.waitForLive(s))return this.level=i,this.state=tr,void(this.startFragRequested=!1);const c=a.len,h=this.getMaxBufferLength(s.maxBitrate);if(c>=h)return;this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null);const d=this.backtrackFragment?this.backtrackFragment.start:a.end;let p=this.getNextFragment(d,u);if(this.couldBacktrack&&!this.fragPrevious&&p&&W(p)&&this.fragmentTracker.getState(p)!==vt){var g;const e=(null!=(g=this.backtrackFragment)?g:p).sn-u.startSN,t=u.fragments[e-1];t&&p.cc===t.cc&&(p=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&a.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,d)){if(!p.gap){const e=this.audioOnly&&!this.altAudio?j:V,t=(e===V?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,f)}p=this.getNextFragmentLoopLoading(p,u,a,f,h)}p&&(!p.initSegment||p.initSegment.data||this.bitrateTest||(p=p.initSegment),this.loadFragment(p,s,d))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===pt||r===mt?W(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,f)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(null!=i&&i.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*i.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],r=this.fragLastKbps;n=r&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*r)+1:0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const e=this.followingBufferedFrag(s);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,n=e.duration,r=Math.max(s.end,t+Math.min(Math.max(n-this.config.maxFragLookUpTolerance,n*(this.couldBacktrack?.5:.125)),n*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(r,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Kn:case Wn:case Yn:case Xn:case Qn:this.state=zn}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,2===this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;Es(n,"playing",this.onMediaPlaying),Es(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Ts(n,"playing",this.onMediaPlaying),Ts(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),t.transferMedia||(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(l.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;t.levels.forEach((e=>{const t=e.audioCodec;t&&(n=n||-1!==t.indexOf("mp4a.40.2"),r=r||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=n&&r&&!function(){var e;const t=no();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==zn)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=tr)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,a=t.details,o=a.totalduration;if(!r)return void this.warn(`Levels were reset while loading level ${s}`);this.log(`Level ${s} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const u=t.levelInfo,c=this.fragCurrent;!c||this.state!==Wn&&this.state!==Yn||c.level!==t.level&&c.loader&&this.abortCurrentFrag();let h=0;if(a.live||null!=(n=u.details)&&n.live){var d;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,u.details,null==(d=this.levelLastLoaded)?void 0:d.details)}if(u.details=a,this.levelLastLoaded=u,i||this.setStartPosition(a,h),this.hls.trigger(l.LEVEL_UPDATED,{details:a,level:s}),this.state===tr){if(this.waitForCdnTuneIn(a))return;this.state=zn}i&&a.live&&this.synchronizeToLiveEdge(a),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,a=e.edge,o=i>=s-t.maxFragLookUpTolerance&&i<=a;if(null!==r&&n.duration>r&&(i<r||!o)){const s=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!o&&n.readyState<4||i<a-s)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${a}, reset currentTime to : ${r.toFixed(3)}`),"buffered"===this.config.liveSyncMode){var l;const e=Ot.bufferInfo(n,r,0);if(null==e||null==(l=e.buffered)||!l.length)return void(n.currentTime=r);if(e.start<=i)return void(n.currentTime=r);const{nextStart:t}=Ot.bufferedInfo(e.buffered,i,0);t&&(n.currentTime=t)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);const a=s[n.level];if(!a)return void this.warn(`Level ${n.level} not found on progress`);const o=a.details;if(!o)return this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),void this.fragmentTracker.removeFragment(n);const l=a.videoCodec,u=o.PTSKnown||!o.live,c=null==(t=n.initSegment)?void 0:t.data,h=this._getAudioCodec(a),d=this.transmuxer=this.transmuxer||new Ii(this.hls,f,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=r?r.index:-1,g=-1!==p,m=new Pt(n.level,n.sn,n.stats.chunkCount,i.byteLength,p,g),v=this.initPTS[n.cc];d.push(i,c,h,l,n,r,o.totalduration,u,m,v)}onAudioTrackSwitching(e,t){const n=this.hls,r=2===this.altAudio;if(nt(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r)return this.fragmentTracker.removeAllFragments(),n.once(l.BUFFER_FLUSHED,(()=>{var e;null==(e=this.hls)||e.trigger(l.AUDIO_TRACK_SWITCHED,t)})),void n.trigger(l.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});n.trigger(l.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=nt(t.url,this.hls);if(n){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const e in n){const t=n[e];if("main"===t.id){if(i=e,r=t,"video"===e){const t=n[e];t&&(this.videoBuffer=t.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===f;if(i){if(this.fragContextChanged(n))return this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===Qn&&(this.state=zn));const e=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*e.total/(e.buffering.end-e.loading.first)),W(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&Ot.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal)this.state=Jn;else switch(t.details){case o.FRAG_GAP:case o.FRAG_PARSING_ERROR:case o.FRAG_DECRYPT_ERROR:case o.FRAG_LOAD_ERROR:case o.FRAG_LOAD_TIMEOUT:case o.KEY_LOAD_ERROR:case o.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(f,t);break;case o.LEVEL_LOAD_ERROR:case o.LEVEL_LOAD_TIMEOUT:case o.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==tr||(null==(n=t.context)?void 0:n.type)!==c||(this.state=zn);break;case o.BUFFER_ADD_CODEC_ERROR:case o.BUFFER_APPEND_ERROR:if("main"!==t.parent)return;this.resetLoadingState();break;case o.BUFFER_FULL_ERROR:if("main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case o.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onFragLoadEmergencyAborted(){this.state=zn,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==j||!this.altAudio){const e=(t===V?this.videoBuffer:this.mediaBuffer)||this.media;e&&(this.afterBufferFlushed(e,t,f),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,-1===this.level&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void this.log(`could not seek to ${n}, already seeking at ${t}`);const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=Ot.getBuffered(e),a=s.length?s.start(0):0,o=a-n,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||o>0&&(o<l||this.loadingParts&&o<2*((null==i?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${o} to match buffer start`),n+=o,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${a}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then((e=>{const{hls:n}=this,r=null==e?void 0:e.frag;if(!r||this.fragContextChanged(r))return;t.fragmentError=0,this.state=zn,this.startFragRequested=!1,this.bitrateTest=!1;const i=r.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),n.trigger(l.FRAG_LOADED,e),r.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:i}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:u,part:c,level:h}=o,{video:d,text:f,id3:p,initSegment:g}=s,{details:m}=h,v=this.altAudio?void 0:s.audio;if(this.fragContextChanged(u))this.fragmentTracker.removeFragment(u);else{if(this.state=Xn,g){if(null!=g&&g.tracks){const e=u.initSegment||u;this._bufferInitSegment(h,g.tracks,e,a),i.trigger(l.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:g.tracks})}const e=g.initPTS,t=g.timescale;r(e)&&(this.initPTS[u.cc]={baseTime:e,timescale:t},i.trigger(l.INIT_PTS_FOUND,{frag:u,id:n,initPTS:e,timescale:t}))}if(d&&m){v&&"audiovideo"===d.type&&this.logMuxedErr(u);const e=m.fragments[u.sn-1-m.startSN],t=u.sn===m.startSN,n=!e||u.cc>e.cc;if(!1!==s.independent){const{startPTS:e,endPTS:r,startDTS:i,endDTS:s}=d;if(c)c.elementaryStreams[d.type]={startPTS:e,endPTS:r,startDTS:i,endDTS:s};else if(d.firstKeyFrame&&d.independent&&1===a.id&&!n&&(this.couldBacktrack=!0),d.dropped&&d.independent){const i=this.getMainFwdBufferInfo(),a=(i?i.end:this.getLoadPosition())+this.config.maxBufferHole,o=d.firstKeyFramePTS?d.firstKeyFramePTS:e;if(!t&&a<o-this.config.maxBufferHole&&!n)return void this.backtrack(u);n&&(u.gap=!0),u.setElementaryStreamInfo(d.type,u.start,r,u.start,s,!0)}else t&&e-(m.appliedTimelineOffset||0)>2&&(u.gap=!0);u.setElementaryStreamInfo(d.type,e,r,i,s),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(d,u,c,a,t||n)}else{if(!t&&!n)return void this.backtrack(u);u.gap=!0}}if(v){const{startPTS:e,endPTS:t,startDTS:n,endDTS:r}=v;c&&(c.elementaryStreams[j]={startPTS:e,endPTS:t,startDTS:n,endDTS:r}),u.setElementaryStreamInfo(j,e,t,n,r),this.bufferFragmentData(v,u,c,a)}if(m&&null!=p&&null!=(t=p.samples)&&t.length){const e={id:n,frag:u,details:m,samples:p.samples};i.trigger(l.FRAG_PARSING_METADATA,e)}if(m&&f){const e={id:n,frag:u,details:m,samples:f.samples};i.trigger(l.FRAG_PARSING_USERDATA,e)}}}logMuxedErr(e){this.warn(`${W(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Xn)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:a}=t;if(i){let n=De(i.codec,e.audioCodec);"mp4a"===n&&(n="mp4a.40.5");const r=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){n&&(n=-1!==n.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");const e=i.metadata;e&&"channelCount"in e&&1!==(e.channelCount||1)&&-1===r.indexOf("firefox")&&(n="mp4a.40.5")}n&&-1!==n.indexOf("mp4a.40.5")&&-1!==r.indexOf("android")&&"audio/mpeg"!==i.container&&(n="mp4a.40.2",this.log(`Android: force audio codec to ${n}`)),e.audioCodec&&e.audioCodec!==n&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${n}"`),i.levelCodec=n,i.id=f,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${n||""}/${e.audioCodec||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=f;const n=s.codec;if(4===(null==n?void 0:n.length))switch(n){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e"}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${n}]${s.codec!==n?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}a&&(this.log(`Init audiovideo buffer, container:${a.container}, codecs[level/parsed]=[${e.codecs}/${a.codec}]`),delete t.video,delete t.audio);const o=Object.keys(t);if(o.length){if(this.hls.trigger(l.BUFFER_CODECS,t),!this.hls)return;o.forEach((e=>{const i=t[e].initSegment;null!=i&&i.byteLength&&this.hls.trigger(l.BUFFER_APPENDING,{type:e,data:i,frag:n,part:null,chunkMeta:r,parent:n.type})}))}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&2===this.altAudio?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,f)}get maxBufferLength(){const{levels:e,level:t}=this,n=null==e?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=zn}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const n=e.currentTime;if(Ot.isBuffered(e,n)?t=this.getAppendedFrag(n):Ot.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,n=t.level;e&&t.sn===e.sn&&e.level===n||(this.fragPlaying=t,this.hls.trigger(l.FRAG_CHANGED,{frag:t}),e&&e.level===n||this.hls.trigger(l.LEVEL_SWITCHED,{level:n}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;return r(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;if(r(t)){const e=this.getLevelDetails(),n=this.currentFrag||(e?it(null,e.fragments,t):null);if(n){const e=n.programDateTime;if(null!==e){const r=e+1e3*(t-n.start);return new Date(r)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class so{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[n].loader;if(r){var t;if(e&&e!==(null==(t=r.context)?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=o.KEY_LOAD_ERROR,n,r,i){return new It({type:a.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length)if(t.length){const{sn:n,cc:r}=e;for(let e=0;e<t.length;e++){const i=t[e];if(r<=i.cc&&("initSegment"===n||"initSegment"===i.sn||n<i.sn))return this.emeController.selectKeySystemFormat(i).then((e=>{if(i.setKeyFormat(e),this.emeController&&this.config.requireKeySystemAccessOnStart){const t=nn(e);if(t)return this.emeController.getKeySystemAccess([t])}}))}}else if(this.config.requireKeySystemAccessOnStart){const e=an(this.config);if(e.length)return this.emeController.getKeySystemAccess(e)}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const n=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,o.KEY_LOAD_ERROR,n))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,o.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let a=this.keyUriToKeyInfo[s];if(null!=(n=a)&&n.decryptdata.key)return i.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});var l;if(null!=(r=a)&&r.keyLoadPromise)switch(null==(l=a.mediaKeySessionContext)?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then((t=>(i.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:a})))}switch(a=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===i.keyFormat?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,o.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(n);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,n)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=new(0,n.loader)(n);return t.keyLoader=e.loader=r,e.keyLoadPromise=new Promise(((i,s)=>{const a={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=n.keyLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(e,t,n,r)=>{const{frag:a,keyInfo:l,url:u}=n;if(!a.decryptdata||l!==this.keyUriToKeyInfo[u])return s(this.createKeyLoadError(a,o.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),r));l.decryptdata.key=a.decryptdata.key=new Uint8Array(e.data),a.keyLoader=null,l.loader=null,i({frag:a,keyInfo:l})},onError:(e,n,r,i)=>{this.resetLoader(n),s(this.createKeyLoadError(t,o.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),r,T({url:a.url,data:void 0},e)))},onTimeout:(e,n,r)=>{this.resetLoader(n),s(this.createKeyLoadError(t,o.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),r))},onAbort:(e,n,r)=>{this.resetLoader(n),s(this.createKeyLoadError(t,o.INTERNAL_ABORTED,new Error("key loading aborted"),r))}};r.load(a,u,c)}))}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()}}function ao(e){const{type:t}=e;switch(t){case h:return p;case d:return g;default:return f}}function oo(e,t){let n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}class lo{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(l.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.LEVEL_LOADING,this.onLevelLoading,this),e.on(l.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(l.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(l.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(l.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.LEVEL_LOADING,this.onLevelLoading,this),e.off(l.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(l.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(l.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return this.loaders[e.type]=i,i}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:u,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:a,levelInfo:o}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:c,url:s,deliveryDirectives:a,levelOrTrack:o})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:a}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:h,url:i,deliveryDirectives:s,levelOrTrack:a})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:a}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:d,url:i,deliveryDirectives:s,levelOrTrack:a})}onLevelsUpdated(e,t){const n=this.loaders[c];if(n){const e=n.context;e&&!t.levels.some((t=>t===e.levelOrTrack))&&(n.abort(),delete this.loaders[c])}}load(e){var t;const n=this.hls.config;let i,s=this.getInternalLoader(e);if(s){const t=this.hls.logger,n=s.context;if(n&&n.levelOrTrack===e.levelOrTrack&&(n.url===e.url||n.deliveryDirectives&&!e.deliveryDirectives))return void(n.url===e.url?t.log(`[playlist-loader]: ignore ${e.url} ongoing request`):t.log(`[playlist-loader]: ignore ${e.url} in favor of ${n.url}`));t.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),s.abort()}if(i=e.type===u?n.manifestLoadPolicy.default:b({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),r(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===c&&null!==e.level?t=this.hls.levels[e.level].details:e.type===h&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===d&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,n=t.targetduration;if(e&&n){const t=1e3*Math.max(3*e,.8*n);i=b({},i,{maxTimeToFirstByteMs:Math.min(t,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,i.maxTimeToFirstByteMs)})}}}const a=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(e,t,n,r)=>{const i=this.getInternalLoader(n);this.resetInternalLoader(n.type);const s=e.data;0===s.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),vn.isMediaPlaylist(s)||n.type!==u?this.handleTrackOrLevelPlaylist(e,t,n,r||null,i):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,new Error("no EXTM3U delimiter"),r||null,t)},onError:(e,t,n,r)=>{this.handleNetworkError(t,n,!1,e,r)},onTimeout:(e,t,n)=>{this.handleNetworkError(t,n,!0,void 0,e)}};s.load(e,o,l)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,a=oo(e,n),o=vn.parseMasterPlaylist(s,a);if(o.playlistParsingError)return void this.handleManifestParsingError(e,n,o.playlistParsingError,r,t);const{contentSteering:u,levels:c,sessionData:h,sessionKeys:d,startTimeOffset:f,variableList:p}=o;this.variableList=p;const{AUDIO:g=[],SUBTITLES:m,"CLOSED-CAPTIONS":v}=vn.parseMasterPlaylistMedia(s,a,o);g.length&&(g.some((e=>!e.url))||!c[0].audioCodec||c[0].attrs.AUDIO||(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Gt({}),bitrate:0,url:""}))),i.trigger(l.MANIFEST_LOADED,{levels:c,audioTracks:g,subtitles:m,captions:v,contentSteering:u,url:a,stats:t,networkDetails:r,sessionData:h,sessionKeys:d,startTimeOffset:f,variableList:p})}handleTrackOrLevelPlaylist(e,t,n,i,s){const a=this.hls,{id:o,level:c,type:h}=n,d=oo(e,n),f=r(c)?c:r(o)?o:0,p=ao(n),g=vn.parseLevelPlaylist(e.data,d,f,p,0,this.variableList);if(h===u){const e={attrs:new Gt({}),bitrate:0,details:g,name:"",url:d};g.requestScheduled=t.loading.start+On(g,0),a.trigger(l.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=g,this.handlePlaylistLoaded(g,e,t,n,i,s)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(l.ERROR,{type:a.NETWORK_ERROR,details:o.MANIFEST_PARSING_ERROR,fatal:t.type===u,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===c?s+=`: ${e.level} id: ${e.id}`:e.type!==h&&e.type!==d||(s+=` id: ${e.id} group-id: "${e.groupId}"`);const f=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let p=o.UNKNOWN,g=!1;const m=this.getInternalLoader(e);switch(e.type){case u:p=n?o.MANIFEST_LOAD_TIMEOUT:o.MANIFEST_LOAD_ERROR,g=!0;break;case c:p=n?o.LEVEL_LOAD_TIMEOUT:o.LEVEL_LOAD_ERROR,g=!1;break;case h:p=n?o.AUDIO_TRACK_LOAD_TIMEOUT:o.AUDIO_TRACK_LOAD_ERROR,g=!1;break;case d:p=n?o.SUBTITLE_TRACK_LOAD_TIMEOUT:o.SUBTITLE_LOAD_ERROR,g=!1}m&&this.resetInternalLoader(e.type);const v={type:a.NETWORK_ERROR,details:p,fatal:g,url:e.url,loader:m,context:e,error:f,networkDetails:t,stats:i};if(r){const n=(null==t?void 0:t.url)||e.url;v.response=T({url:n,data:void 0},r)}this.hls.trigger(l.ERROR,v)}handlePlaylistLoaded(e,t,n,r,i,s){const p=this.hls,{type:g,level:m,id:v,groupId:y,deliveryDirectives:b}=r,E=oo(t,r),T=ao(r),S="number"==typeof r.level&&T===f?m:void 0;if(!e.fragments.length){const s=e.playlistParsingError=new Error("No Segments found in Playlist");return void p.trigger(l.ERROR,{type:a.NETWORK_ERROR,details:o.LEVEL_EMPTY_ERROR,fatal:!1,url:E,error:s,reason:s.message,response:t,context:r,level:S,parent:T,networkDetails:i,stats:n})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const w=e.playlistParsingError;if(w){if(this.hls.logger.warn(w),!p.config.ignorePlaylistParsingErrors)return void p.trigger(l.ERROR,{type:a.NETWORK_ERROR,details:o.LEVEL_PARSING_ERROR,fatal:!1,url:E,error:w,reason:w.message,response:t,context:r,level:S,parent:T,networkDetails:i,stats:n});e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),s.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),g){case u:case c:p.trigger(l.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||p.levels[0],level:S||0,id:v||0,stats:n,networkDetails:i,deliveryDirectives:b,withoutMultiVariant:g===u});break;case h:p.trigger(l.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:v||0,groupId:y||"",stats:n,networkDetails:i,deliveryDirectives:b});break;case d:p.trigger(l.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:v||0,groupId:y||"",stats:n,networkDetails:i,deliveryDirectives:b})}}}class uo{static get version(){return ur}static isMSESupported(){return ro()}static isSupported(){return function(){if(!ro())return!1;const e=R();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(Le(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(Le(t,"audio")))))}()}static getMediaSource(){return R()}static get Events(){return l}static get MetadataSchema(){return xr}static get ErrorTypes(){return a}static get ErrorDetails(){return o}static get DefaultConfig(){return uo.defaultConfig?uo.defaultConfig:Va}static set DefaultConfig(e){uo.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new lr,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=function(e,t,n){const r=A();if("object"==typeof console&&!0===e||"object"==typeof e){const t=["debug","log","info","warn","error"];t.forEach((t=>{r[t]=k(t,e,n)}));try{r.log('Debug logs enabled for "Hls instance" in hls.js version 1.6.5')}catch(e){return A()}t.forEach((t=>{L[t]=k(t,e)}))}else b(L,r);return r}(e.debug||!1,0,e.assetPlayerId),n=this.config=function(e,t,n){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=za(e),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const s=`${"level"===e?"playlist":e}LoadPolicy`,a=void 0===t[s],o=[];i.forEach((n=>{const i=`${e}Loading${n}`,l=t[i];if(void 0!==l&&a){o.push(i);const e=r[s].default;switch(t[s]={default:e},n){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&n.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${s}": ${Ye(t[s])}`)})),T(T({},r),t)}(uo.DefaultConfig,e,t);this.userConfig=e,n.progressive&&function(e,t){const n=e.loader;n!==Ua&&n!==ja?(t.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(e.loader=Ua,e.progressive=!0,e.enableSoftwareAES=!0,t.log("[config]: Progressive streaming enabled, using FetchLoader"))}(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:a,fpsController:o}=n,u=new a(this),c=this.abrController=new r(this),h=new yt(this),d=n.interstitialsController,f=d?this.interstitialsController=new d(this,uo):null,p=this.bufferController=new i(this,h),g=this.capLevelController=new s(this),m=new o(this),v=new lo(this),y=n.contentSteeringController,E=y?new y(this):null,S=this.levelController=new eo(this,E),w=new Za(this),_=new so(this.config),C=this.streamController=new io(this,h,_),R=this.gapController=new Ka(this,h);g.setStreamController(C),m.setStreamController(C);const I=[v,S,C];f&&I.splice(1,0,f),E&&I.splice(1,0,E),this.networkControllers=I;const x=[c,p,R,g,m,w,h];this.audioTrackController=this.createController(n.audioTrackController,I);const P=n.audioStreamController;P&&I.push(this.audioStreamController=new P(this,h,_)),this.subtitleTrackController=this.createController(n.subtitleTrackController,I);const D=n.subtitleStreamController;D&&I.push(this.subtititleStreamController=new D(this,h,_)),this.createController(n.timelineController,x),_.emeController=this.emeController=this.createController(n.emeController,x),this.cmcdController=this.createController(n.cmcdController,x),this.latencyController=this.createController(Ja,x),this.coreComponents=x,I.push(u);const O=u.onErrorOut;"function"==typeof O&&this.on(l.ERROR,O,u),this.on(l.MANIFEST_LOADED,v.onManifestLoaded,v)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;const n=e===l.ERROR;this.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.INTERNAL_EXCEPTION,fatal:n,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(l.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const t=new Error(`attachMedia failed: invalid argument (${e})`);return void this.trigger(l.ERROR,{type:a.OTHER_ERROR,details:o.ATTACH_MEDIA_ERROR,fatal:!0,error:t})}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(l.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(l.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(l.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=H.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(l.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),this.started&&this.networkControllers);n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!this.started&&this.networkControllers);e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach((e=>{e.resumeBuffering&&e.resumeBuffering()})))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach((e=>{e.pauseBuffering&&e.pauseBuffering()})))}get inFlightFragments(){const e={[f]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[p]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[g]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=null==e?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)}))}}}()),e}get levels(){return this.levelController.levels||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return Ge.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(r=-1===t&&null!=e&&e.length?e.length-1:t,n)for(let t=r;t--;){const r=e[t].attrs["HDCP-LEVEL"];if(r&&r<=n)return t}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return(null==(t=this.audioTrackController)?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return(null==(t=this.subtitleTrackController)?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!(null==(e=this.bufferController)||!e.bufferedToEnd)}get interstitialsManager(){var e;return(null==(e=this.interstitialsController)?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){return He(e,Xe(t),navigator.mediaCapabilities)}}uo.defaultConfig=void 0},8486:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},8666:function(e){e.exports=function(){return!1}},8758:function(e){(function(){var t,n,r,i,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-s)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),a=1e9*process.uptime(),s=i-a):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},8867:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(4041),i=n(5012),s=n(8953);function a(){var e=r.useContext(s.ob);return(0,i.HM)(e),e}},8942:function(e,t,n){var r=n(4967),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},8953:function(e,t,n){"use strict";n.d(t,{Kq:function(){return s},ob:function(){return a}}),n(5985);var r=n(4041),i="undefined"==typeof window||window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?r.createContext(null):window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=r.createContext(null)),s=(i.Consumer,i.Provider),a=i},8964:function(e,t,n){"use strict";n.d(t,{Ay:function(){return je}});var r=n(7502),i=n(9575),s=n(4041),a="data-focus-lock",o="data-focus-lock-disabled";function l(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var u="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,c=new WeakMap;var h={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},d=n(5608);function f(e){return e}function p(e,t){void 0===t&&(t=f);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var s=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(s)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}function g(e,t){return void 0===t&&(t=f),p(e,t)}var m=g({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),v=g(),y=g(),b=function(e){void 0===e&&(e={});var t=p(null);return t.options=(0,d.Cl)({async:!0,ssr:!1},e),t}({async:!0,ssr:"undefined"!=typeof document}),E=(0,s.createContext)(void 0),T=[],S=(0,s.forwardRef)((function(e,t){var n,r,d,f,p,g,y,S=(0,s.useState)(),w=S[0],_=S[1],A=(0,s.useRef)(),k=(0,s.useRef)(!1),L=(0,s.useRef)(null),C=(0,s.useState)({})[1],R=e.children,I=e.disabled,x=void 0!==I&&I,P=e.noFocusGuards,D=void 0!==P&&P,O=e.persistentFocus,M=void 0!==O&&O,N=e.crossFrame,F=void 0===N||N,B=e.autoFocus,U=void 0===B||B,$=(e.allowTextSelection,e.group),H=e.className,G=e.whiteList,j=e.hasPositiveIndices,V=e.shards,z=void 0===V?T:V,K=e.as,W=void 0===K?"div":K,Y=e.lockProps,q=void 0===Y?{}:Y,X=e.sideCar,Q=e.returnFocus,Z=void 0!==Q&&Q,J=e.focusOptions,ee=e.onActivation,te=e.onDeactivation,ne=(0,s.useState)({})[0],re=(0,s.useCallback)((function(e){var t=e.captureFocusRestore;if(!L.current){var n,r=null==(n=document)?void 0:n.activeElement;L.current=r,r!==document.body&&(L.current=t(r))}A.current&&ee&&ee(A.current),k.current=!0,C()}),[ee]),ie=(0,s.useCallback)((function(){k.current=!1,te&&te(A.current),C()}),[te]),se=(0,s.useCallback)((function(e){var t=L.current;if(t){var n=("function"==typeof t?t():t)||document.body,r="function"==typeof Z?Z(n):Z;if(r){var i="object"==typeof r?r:void 0;L.current=null,e?Promise.resolve().then((function(){return n.focus(i)})):n.focus(i)}}}),[Z]),ae=(0,s.useCallback)((function(e){k.current&&m.useMedium(e)}),[]),oe=v.useMedium,le=(0,s.useCallback)((function(e){A.current!==e&&(A.current=e,_(e))}),[]),ue=(0,i.A)(((n={})[o]=x&&"disabled",n[a]=$,n),q),ce=!0!==D,he=ce&&"tail"!==D,de=(r=[t,le],f=d||null,p=function(e){return r.forEach((function(t){return l(t,e)}))},(g=(0,s.useState)((function(){return{value:f,callback:p,facade:{get current(){return g.value},set current(e){var t=g.value;t!==e&&(g.value=e,g.callback(e,t))}}}}))[0]).callback=p,y=g.facade,u((function(){var e=c.get(y);if(e){var t=new Set(e),n=new Set(r),i=y.current;t.forEach((function(e){n.has(e)||l(e,null)})),n.forEach((function(e){t.has(e)||l(e,i)}))}c.set(y,r)}),[r]),y),fe=(0,s.useMemo)((function(){return{observed:A,shards:z,enabled:!x,active:k.current}}),[x,k.current,z,w]);return s.createElement(s.Fragment,null,ce&&[s.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:x?-1:0,style:h}),j?s.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:x?-1:1,style:h}):null],!x&&s.createElement(X,{id:ne,sideCar:b,observed:w,disabled:x,persistentFocus:M,crossFrame:F,autoFocus:U,whiteList:G,shards:z,onActivation:re,onDeactivation:ie,returnFocus:se,focusOptions:J,noFocusGuards:D}),s.createElement(W,(0,i.A)({ref:de},ue,{className:H,onBlur:oe,onFocus:ae}),s.createElement(E.Provider,{value:fe},R)),he&&s.createElement("div",{"data-focus-guard":!0,tabIndex:x?-1:0,style:h}))}));S.propTypes={};var w=S,_=n(9140),A=n(4586),k=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},L=function(e){return Array.isArray(e)?e:[e]},C=function(e){return Array.isArray(e)?e[0]:e},R=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},I=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},x=function(e,t){var n=e.get(t);if(void 0!==n)return n;var r=function(e,t){return!e||I(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(e)&&!function(e){return e.hasAttribute("inert")}(e)&&t(R(e))}(t,x.bind(void 0,e));return e.set(t,r),r},P=function(e,t){var n=e.get(t);if(void 0!==n)return n;var r=function(e,t){return!(e&&!I(e))||!!N(e)&&t(R(e))}(t,P.bind(void 0,e));return e.set(t,r),r},D=function(e){return e.dataset},O=function(e){return"INPUT"===e.tagName},M=function(e){return O(e)&&"radio"===e.type},N=function(e){var t=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(t)},F=function(e){var t;return Boolean(e&&(null===(t=D(e))||void 0===t?void 0:t.focusGuard))},B=function(e){return!F(e)},U=function(e){return Boolean(e)},$=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,s=e.index-t.index;if(i){if(!n)return 1;if(!r)return-1}return i||s},H=function(e,t,n){return k(e).map((function(e,t){var r=function(e){return e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex}(e);return{node:e,index:t,tabIndex:n&&-1===r?(e.dataset||{}).focusGuard?0:-1:r}})).filter((function(e){return!t||e.tabIndex>=0})).sort($)},G=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),j="".concat(G,", [data-focus-guard]"),V=function(e,t){return k((e.shadowRoot||e).children).reduce((function(e,n){return e.concat(n.matches(t?j:G)?[n]:[],V(n))}),[])},z=function(e,t){return e.reduce((function(e,n){var r,i=V(n,t),s=(r=[]).concat.apply(r,i.map((function(e){return function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?z([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(s,n.parentNode?k(n.parentNode.querySelectorAll(G)).filter((function(e){return e===n})):[])}),[])},K=function(e,t){return k(e).filter((function(e){return x(t,e)})).filter((function(e){return function(e){return!((O(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},W=function(e,t){return void 0===t&&(t=new Map),k(e).filter((function(e){return P(t,e)}))},Y=function(e,t,n){return H(K(z(e,n),t),!0,n)},q=function(e,t){return H(K(z(e),t),!1)},X=function(e,t){return e.shadowRoot?X(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||k(e.children).some((function(e){var n;if(e instanceof HTMLIFrameElement){var r=null===(n=e.contentDocument)||void 0===n?void 0:n.body;return!!r&&X(r,t)}return X(e,t)}))},Q=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?Q(t.shadowRoot):t instanceof HTMLIFrameElement&&function(){try{return t.contentWindow.document}catch(e){return}}()?Q(t.contentWindow.document):t}},Z=function(e){return e.parentNode?Z(e.parentNode):e},J=function(e){return L(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(a);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var s=e[r].compareDocumentPosition(e[i]);(s&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(k(Z(t).querySelectorAll("[".concat(a,'="').concat(n,'"]:not([').concat(o,'="disabled"])')))):[t]),e}),[])},ee=function(e,t){return void 0===t&&(t=Q(C(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&J(e).some((function(e){return X(e,t)||function(e,t){return Boolean(k(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},te=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},ne=function(e,t){return M(e)&&e.name?function(e,t){return t.filter(M).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},re=function(e){return e[0]&&e.length>1?ne(e[0],e):e[0]},ie=function(e,t){return e.indexOf(ne(t,e))},se="NEW_FOCUS",ae=function(e,t,n){var r,i=e.map((function(e){return e.node})),s=W(i.filter((r=n,function(e){var t,n=null===(t=D(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return s&&s.length?re(s):re(W(t))},oe=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&oe(e.parentNode.host||e.parentNode,t),t},le=function(e,t){for(var n=oe(e),r=oe(t),i=0;i<n.length;i+=1){var s=n[i];if(r.indexOf(s)>=0)return s}return!1},ue=function(e,t,n){var r=L(e),i=L(t),s=r[0],a=!1;return i.filter(Boolean).forEach((function(e){a=le(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=le(s,e);t&&(a=!a||X(t,a)?t:le(t,a))}))})),a},ce=function(e,t){return e.reduce((function(e,n){return e.concat(function(e,t){return K((n=e.querySelectorAll("[".concat("data-autofocus-inside","]")),k(n).map((function(e){return z([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var n}(n,t))}),[])},he=function(e,t){var n=Q(L(e).length>0?document:C(e).ownerDocument),r=J(e).filter(B),i=ue(n||e,e,r),s=new Map,a=q(r,s),o=a.filter((function(e){var t=e.node;return B(t)}));if(o[0]){var l,u,c,h=q([i],s).map((function(e){return e.node})),d=(l=h,u=o,c=new Map,u.forEach((function(e){return c.set(e.node,e)})),l.map((function(e){return c.get(e)})).filter(U)),f=d.map((function(e){return e.node})),p=d.filter((function(e){return e.tabIndex>=0})).map((function(e){return e.node})),g=function(e,t,n,r,i){var s=e.length,a=e[0],o=e[s-1],l=F(r);if(!(r&&e.indexOf(r)>=0)){var u=void 0!==r?n.indexOf(r):-1,c=i?n.indexOf(i):u,h=i?e.indexOf(i):-1;if(-1===u)return-1!==h?h:se;if(-1===h)return se;var d,f,p=u-c,g=n.indexOf(a),m=n.indexOf(o),v=(d=n,f=new Set,d.forEach((function(e){return f.add(ne(e,d))})),d.filter((function(e){return f.has(e)}))),y=void 0!==r?v.indexOf(r):-1,b=i?v.indexOf(i):y,E=v.filter((function(e){return e.tabIndex>=0})),T=void 0!==r?E.indexOf(r):-1,S=i?E.indexOf(i):T,w=T>=0&&S>=0?S-T:b-y;if(!p&&h>=0)return h;if(0===t.length)return h;var _=ie(e,t[0]),A=ie(e,t[t.length-1]);return u<=g&&l&&Math.abs(p)>1?A:u>=m&&l&&Math.abs(p)>1?_:p&&Math.abs(w)>1?h:u<=g?A:u>m?_:p?Math.abs(p)>1?h:(s+h+p)%s:void 0}}(f,p,h,n,t);if(g===se){var m=ae(a,p,ce(r,s))||ae(a,f,ce(r,s));return m?{node:m}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===g?g:d[g]}},de=0,fe=!1,pe=function(e,t,n){void 0===n&&(n={});var r=he(e,t);if(!fe&&r){if(de>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),fe=!0,void setTimeout((function(){fe=!1}),1);de++,te(r.node,n.focusOptions),de--}};function ge(e){if(!e)return null;if("undefined"==typeof WeakRef)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}var me=function(e){var t=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ge(n),parent:ge(n.parentElement),left:ge(n.previousElementSibling),right:ge(n.nextElementSibling)}),n=n.parentElement;return{element:ge(e),stack:t,ownerDocument:e.ownerDocument}}(e);return function(){return function(e){var t,n,r,i,s;if(e)for(var a=e.stack,o=e.ownerDocument,l=new Map,u=0,c=a;u<c.length;u++){var h=c[u],d=null===(t=h.parent)||void 0===t?void 0:t.call(h);if(d&&o.contains(d)){for(var f=null===(n=h.left)||void 0===n?void 0:n.call(h),p=h.current(),g=d.contains(p)?p:void 0,m=null===(r=h.right)||void 0===r?void 0:r.call(h),v=Y([d],l),y=null!==(s=null!==(i=null!=g?g:null==f?void 0:f.nextElementSibling)&&void 0!==i?i:m)&&void 0!==s?s:f;y;){for(var b=0,E=v;b<E.length;b++){var T=E[b];if(null==y?void 0:y.contains(T.node))return T.node}y=y.nextElementSibling}if(v.length)return v[0].node}}}(t)}},ve=function(e,t,n){void 0===t&&(t={});var r=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)}(t),i=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=L(t);if(r.every((function(t){return!X(t,e)})))return console.error("Active element is not contained in the scope"),{};var i=n?Y(r,new Map):q(r,new Map),s=i.findIndex((function(t){return t.node===e}));return-1!==s?{prev:i[s-1],next:i[s+1],first:i[0],last:i[i.length-1]}:void 0}(e,r.scope,r.onlyTabbable);if(i){var s=n(i,r.cycle);s&&te(s.node,r.focusOptions)}},ye=function(e,t,n){var r,i,s,a,o=(i=e,s=null===(r=t.onlyTabbable)||void 0===r||r,{first:(a=s?Y(L(i),new Map):q(L(i),new Map))[0],last:a[a.length-1]})[n];o&&te(o.node,t.focusOptions)};function be(e){setTimeout(e,1)}var Ee=function(e){return e&&"current"in e?e.current:e},Te=function(){return document&&document.activeElement===document.body},Se=null,we=null,_e=function(){return null},Ae=null,ke=!1,Le=!1,Ce=function(){return!0};function Re(e,t,n,r){var i=null,s=e;do{var a=r[s];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(s!==e)return;i=null}}while((s+=n)!==t);i&&(i.node.tabIndex=0)}var Ie=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},xe=function(e){return q(e,new Map)},Pe=function(){var e,t,n,r,i,s,a,o=!1;if(Se){var l=Se,u=l.observed,c=l.persistentFocus,h=l.autoFocus,d=l.shards,f=l.crossFrame,p=l.focusOptions,g=l.noFocusGuards,m=u||Ae&&Ae.portaledElement;if(Te()&&we&&we!==document.body&&(!document.body.contains(we)||!xe([(a=we).parentNode]).some((function(e){return e.node===a})))){var v=_e();v&&v.focus()}var y=document&&document.activeElement;if(m){var b=[m].concat(d.map(Ee).filter(Boolean));if(y&&!function(e){return(Se.whiteList||Ce)(e)}(y)||(c||function(){if(!(f?Boolean(ke):"meanwhile"===ke)||!g||!we||Le)return!1;var e=xe(b),t=e.findIndex((function(e){return e.node===we}));return 0===t||t===e.length-1}()||!(Te()||function(e){void 0===e&&(e=document);var t=Q(e);return!!t&&k(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return X(e,t)}))}())||!we&&h)&&(m&&!(ee(b)||y&&function(e,t){return t.some((function(t){return Ie(e,t,t)}))}(y,b)||(s=y,Ae&&Ae.portaledElement===s))&&(document&&!we&&y&&!h?(y.blur&&y.blur(),document.body.focus()):(o=pe(b,we,{focusOptions:p}),Ae={})),(we=document&&document.activeElement)!==document.body&&(_e=me(we)),ke=!1),document&&y!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var E=document&&document.activeElement,T=(t=J(e=b).filter(B),n=ue(e,e,t),r=H(z([n],!0),!0,!0),i=z(t,!1),r.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:F(t)}}))),S=T.map((function(e){return e.node})).indexOf(E);S>-1&&(T.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),Re(S,T.length,1,T),Re(S,-1,-1,T))}}}return o},De=function(e){Pe()&&e&&(e.stopPropagation(),e.preventDefault())},Oe=function(){return be(Pe)},Me=function(){Le=!0},Ne=function(){Le=!1,ke="just",be((function(){ke="meanwhile"}))},Fe={moveFocusInside:pe,focusInside:ee,focusNextElement:function(e,t){void 0===t&&(t={}),ve(e,t,(function(e,t){var n=e.next,r=e.first;return n||t&&r}))},focusPrevElement:function(e,t){void 0===t&&(t={}),ve(e,t,(function(e,t){var n=e.prev,r=e.last;return n||t&&r}))},focusFirstElement:function(e,t){void 0===t&&(t={}),ye(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),ye(e,t,"last")},captureFocusRestore:me};m.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(Ae={observerNode:n,portaledElement:t})})),v.assignMedium(Oe),y.assignMedium((function(e){return e(Fe)}));var Be,Ue,$e=(Be=function(e){return e.filter((function(e){return!e.disabled}))},Ue=function(e){var t=e.slice(-1)[0];t&&!Se&&(document.addEventListener("focusin",De),document.addEventListener("focusout",Oe),window.addEventListener("focus",Me),window.addEventListener("blur",Ne));var n=Se,r=n&&t&&t.id===n.id;Se=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(we=null,r&&n.observed===t.observed||t.onActivation(Fe),Pe(),be(Pe)):(document.removeEventListener("focusin",De),document.removeEventListener("focusout",Oe),window.removeEventListener("focus",Me),window.removeEventListener("blur",Ne),we=null)},function(e){var t,n=[];function r(){t=Be(n.map((function(e){return e.props}))),Ue(t)}var i=function(i){function a(){return i.apply(this,arguments)||this}(0,_.A)(a,i),a.peek=function(){return t};var o=a.prototype;return o.componentDidMount=function(){n.push(this),r()},o.componentDidUpdate=function(){r()},o.componentWillUnmount=function(){var e=n.indexOf(this);n.splice(e,1),r()},o.render=function(){return s.createElement(e,this.props)},a}(s.PureComponent);return(0,A.A)(i,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(e)+")"),i})((function(){return null})),He=(0,s.forwardRef)((function(e,t){return s.createElement(w,(0,i.A)({sideCar:$e,ref:t},e))})),Ge=w.propTypes||{};Ge.sideCar,(0,r.A)(Ge,["sideCar"]),He.propTypes={};var je=He},8981:function(e,t,n){"use strict";n.d(t,{A:function(){return Pe}});var r=n(5608),i=n(280),s=n(4041),a=n(5012),o=n(8953),l=n(4912);(0,l.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:l.W.variadic}),(0,l.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:l.W.variadic}),(0,l.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:l.W.variadic}),(0,l.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.Locale).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:l.W.variadic}),(0,l.B)((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.ListFormat).bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{strategy:l.W.variadic});var u,c,h,d,f=n(6502),p=n(6679);(d=u||(u={}))[d.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",d[d.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",d[d.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",d[d.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",d[d.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",d[d.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",d[d.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",d[d.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",d[d.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",d[d.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",d[d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",d[d.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",d[d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",d[d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",d[d.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",d[d.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",d[d.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",d[d.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",d[d.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",d[d.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",d[d.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",d[d.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",d[d.INVALID_TAG=23]="INVALID_TAG",d[d.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",d[d.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",d[d.UNCLOSED_TAG=27]="UNCLOSED_TAG",function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(c||(c={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(h||(h={}));var g=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,m=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function v(e){var t={};return e.replace(m,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var y=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,b=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,E=/^(@+)?(\+|#+)?[rs]?$/g,T=/(\*)(0+)|(#+)(0+)|(0+)/g,S=/^(0+)$/;function w(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(E,(function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function _(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function A(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!S.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function k(e){return _(e)||{}}function L(e){for(var t={},n=0,i=e;n<i.length;n++){var s=i[n];switch(s.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=s.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=s.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=(0,r.Cl)((0,r.Cl)((0,r.Cl)({},t),{notation:"scientific"}),s.options.reduce((function(e,t){return(0,r.Cl)((0,r.Cl)({},e),k(t))}),{}));continue;case"engineering":t=(0,r.Cl)((0,r.Cl)((0,r.Cl)({},t),{notation:"engineering"}),s.options.reduce((function(e,t){return(0,r.Cl)((0,r.Cl)({},e),k(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(s.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(s.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(T,(function(e,n,r,i,s,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&s)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(S.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(b.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(b,(function(e,n,r,i,s,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:s&&a?(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var a=s.options[0];"w"===a?t=(0,r.Cl)((0,r.Cl)({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=(0,r.Cl)((0,r.Cl)({},t),w(a)))}else if(E.test(s.stem))t=(0,r.Cl)((0,r.Cl)({},t),w(s.stem));else{var o=_(s.stem);o&&(t=(0,r.Cl)((0,r.Cl)({},t),o));var l=A(s.stem);l&&(t=(0,r.Cl)((0,r.Cl)({},t),l))}}return t}var C,R={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function I(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(R[n||""]||R[r||""]||R["".concat(r,"-001")]||R["001"])[0]}var x=new RegExp("^".concat(g.source,"*")),P=new RegExp("".concat(g.source,"*$"));function D(e,t){return{start:e,end:t}}var O=!!String.prototype.startsWith&&"_a".startsWith("a",1),M=!!String.fromCodePoint,N=!!Object.fromEntries,F=!!String.prototype.codePointAt,B=!!String.prototype.trimStart,U=!!String.prototype.trimEnd,$=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},H=!0;try{H="a"===(null===(C=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===C?void 0:C[0])}catch(e){H=!1}var G,j=O?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},V=M?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,s=0;i>s;){if((n=e[s++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},z=N?Object.fromEntries:function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],s=i[0],a=i[1];t[s]=a}return t},K=F?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},W=B?function(e){return e.trimStart()}:function(e){return e.replace(x,"")},Y=U?function(e){return e.trimEnd()}:function(e){return e.replace(P,"")};function q(e,t){return new RegExp(e,t)}if(H){var X=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");G=function(e,t){var n;return X.lastIndex=t,null!==(n=X.exec(e)[1])&&void 0!==n?n:""}}else G=function(e,t){for(var n=[];;){var r=K(e,t);if(void 0===r||Z(r)||J(r))break;n.push(r),t+=r>=65536?2:1}return V.apply(void 0,n)};function Q(e){return e>=97&&e<=122||e>=65&&e<=90}function Z(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function J(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ee(e,t){return Object.keys(e).reduce((function(n,i){return n[i]=(0,r.Cl)({timeZone:t},e[i]),n}),{})}function te(e,t){return Object.keys((0,r.Cl)((0,r.Cl)({},e),t)).reduce((function(n,i){return n[i]=(0,r.Cl)((0,r.Cl)({},e[i]||{}),t[i]||{}),n}),{})}function ne(e,t){if(!t)return e;var n=f.S.formats;return(0,r.Cl)((0,r.Cl)((0,r.Cl)({},n),e),{date:te(ee(n.date,t),ee(e.date||{},t)),time:te(ee(n.time,t),ee(e.time||{},t))})}!function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((s=this.parseArgument(e,n)).err)return s;r.push(s.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(u.UNMATCHED_CLOSING_TAG,D(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&Q(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;r.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;r.push(s.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:c.pound,location:D(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:c.literal,value:"<".concat(r,"/>"),location:D(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var s=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Q(this.char()))return this.error(u.INVALID_TAG,D(a,this.clonePosition()));var o=this.clonePosition();return r!==this.parseTagName()?this.error(u.UNMATCHED_CLOSING_TAG,D(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:c.tag,value:r,children:s,location:D(n,this.clonePosition())},err:null}:this.error(u.INVALID_TAG,D(a,this.clonePosition())))}return this.error(u.UNCLOSED_TAG,D(n,this.clonePosition()))}return this.error(u.INVALID_TAG,D(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var s=this.tryParseUnquoted(e,t);if(s)r+=s;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var o=D(n,this.clonePosition());return{val:{type:c.literal,value:r,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Q(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return V.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),V(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(u.EMPTY_ARGUMENT,D(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(u.MALFORMED_ARGUMENT,D(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:c.argument,value:r,location:D(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(u.MALFORMED_ARGUMENT,D(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=G(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:D(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(u.EXPECT_ARGUMENT_TYPE,D(a,l));case"number":case"date":case"time":this.bumpSpace();var d=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((S=this.parseSimpleArgStyleIfPossible()).err)return S;if(0===(y=Y(S.val)).length)return this.error(u.EXPECT_ARGUMENT_STYLE,D(this.clonePosition(),this.clonePosition()));d={style:y,styleLocation:D(f,this.clonePosition())}}if((w=this.tryParseArgumentClose(i)).err)return w;var p=D(i,this.clonePosition());if(d&&j(null==d?void 0:d.style,"::",0)){var g=W(d.style.slice(2));if("number"===o)return(S=this.parseNumberSkeletonFromString(g,d.styleLocation)).err?S:{val:{type:c.number,value:n,location:p,style:S.val},err:null};if(0===g.length)return this.error(u.EXPECT_DATE_TIME_SKELETON,p);var m=g;this.locale&&(m=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var s=0;r+1<e.length&&e.charAt(r+1)===i;)s++,r++;var a=1+(1&s),o=s<2?1:3+(s>>1),l=I(t);for("H"!=l&&"k"!=l||(o=0);o-- >0;)n+="a";for(;a-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(g,this.locale));var y={type:h.dateTime,pattern:m,location:d.styleLocation,parsedOptions:this.shouldParseSkeletons?v(m):{}};return{val:{type:"date"===o?c.date:c.time,value:n,location:p,style:y},err:null}}return{val:{type:"number"===o?c.number:"date"===o?c.date:c.time,value:n,location:p,style:null!==(s=null==d?void 0:d.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var b=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(u.EXPECT_SELECT_ARGUMENT_OPTIONS,D(b,(0,r.Cl)({},b)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),T=0;if("select"!==o&&"offset"===E.value){if(!this.bumpIf(":"))return this.error(u.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,D(this.clonePosition(),this.clonePosition()));var S;if(this.bumpSpace(),(S=this.tryParseDecimalInteger(u.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,u.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return S;this.bumpSpace(),E=this.parseIdentifierIfPossible(),T=S.val}var w,_=this.tryParsePluralOrSelectOptions(e,o,t,E);if(_.err)return _;if((w=this.tryParseArgumentClose(i)).err)return w;var A=D(i,this.clonePosition());return"select"===o?{val:{type:c.select,value:n,options:z(_.val),location:A},err:null}:{val:{type:c.plural,value:n,options:z(_.val),offset:T,pluralType:"plural"===o?"cardinal":"ordinal",location:A},err:null};default:return this.error(u.INVALID_ARGUMENT_TYPE,D(a,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,D(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(u.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,D(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(y).filter((function(e){return e.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),o=0,l=a;o<l.length;o++)if(0===l[o].length)throw new Error("Invalid number skeleton");t.push({stem:s,options:a})}return t}(e)}catch(e){return this.error(u.INVALID_NUMBER_SKELETON,t)}return{val:{type:h.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?L(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,s=!1,a=[],o=new Set,l=r.value,c=r.location;;){if(0===l.length){var h=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(u.EXPECT_PLURAL_ARGUMENT_SELECTOR,u.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=D(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}if(o.has(l))return this.error("select"===t?u.DUPLICATE_SELECT_ARGUMENT_SELECTOR:u.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?u.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:u.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,D(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var g=this.tryParseArgumentClose(f);if(g.err)return g;a.push([l,{value:p.val,location:D(f,this.clonePosition())}]),o.add(l),this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===a.length?this.error("select"===t?u.EXPECT_SELECT_ARGUMENT_SELECTOR:u.EXPECT_PLURAL_ARGUMENT_SELECTOR,D(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(u.MISSING_OTHER_CLAUSE,D(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;i=!0,s=10*s+(a-48),this.bump()}var o=D(r,this.clonePosition());return i?$(s*=n)?{val:s,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=K(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(j(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Z(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null}}();var re=function(e,t,n,i,s){var a=e.locale,o=e.formats,l=e.messages,u=e.defaultLocale,h=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,g=e.timeZone,m=e.defaultRichTextElements;void 0===n&&(n={id:""});var v=n.id,y=n.defaultMessage;!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n("[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue")}(!!v);var b=String(v),E=l&&Object.prototype.hasOwnProperty.call(l,b)&&l[b];if(Array.isArray(E)&&1===E.length&&E[0].type===c.literal)return E[0].value;if(!i&&E&&"string"==typeof E&&!m)return E.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=(0,r.Cl)((0,r.Cl)({},m),i||{}),o=ne(o,g),h=ne(h,g),!E){if(!1===d&&""===E)return E;if((!y||a&&a.toLowerCase()!==u.toLowerCase())&&f(new p.sb(n,a)),y)try{return t.getMessageFormat(y,u,h,s).format(i)}catch(e){return f(new p.Ho('Error formatting default message for: "'.concat(b,'", rendering default message verbatim'),a,n,e)),"string"==typeof y?y:b}return b}try{return t.getMessageFormat(E,a,o,(0,r.Cl)({formatters:t},s||{})).format(i)}catch(e){f(new p.Ho('Error formatting message: "'.concat(b,'", using ').concat(y?"default message":"id"," as fallback."),a,n,e))}if(y)try{return t.getMessageFormat(y,u,h,s).format(i)}catch(e){f(new p.Ho('Error formatting the default message for: "'.concat(b,'", rendering message verbatim'),a,n,e))}return"string"==typeof E?E:"string"==typeof y?y:b},ie=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function se(e,t,n){var r=e.locale,s=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,l=o&&(0,i.F3)(s,"number",o,a)||{};return t(r,(0,i.J9)(n,ie,l))}function ae(e,t,n,r){void 0===r&&(r={});try{return se(e,t,r).format(n)}catch(t){e.onError(new p.pg("Error formatting number.",e.locale,t))}return String(n)}function oe(e,t,n,r){void 0===r&&(r={});try{return se(e,t,r).formatToParts(n)}catch(t){e.onError(new p.pg("Error formatting number.",e.locale,t))}return[]}var le=n(4179),ue=["numeric","style"];function ce(e,t,n,r,s){void 0===s&&(s={}),r||(r="second"),Intl.RelativeTimeFormat||e.onError(new le.IF('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',le.O4.MISSING_INTL_API));try{return function(e,t,n){var r=e.locale,s=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,l=!!o&&(0,i.F3)(s,"relative",o,a)||{};return t(r,(0,i.J9)(n,ue,l))}(e,t,s).format(n,r)}catch(t){e.onError(new p.pg("Error formatting relative time.",e.locale,t))}return String(n)}var he=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function de(e,t,n,s){var a=e.locale,o=e.formats,l=e.onError,u=e.timeZone;void 0===s&&(s={});var c=s.format,h=(0,r.Cl)((0,r.Cl)({},u&&{timeZone:u}),c&&(0,i.F3)(o,t,c,l)),d=(0,i.J9)(s,he,h);return"time"!==t||d.hour||d.minute||d.second||d.timeStyle||d.dateStyle||(d=(0,r.Cl)((0,r.Cl)({},d),{hour:"numeric",minute:"numeric"})),n(a,d)}function fe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],a=void 0===s?{}:s,o="string"==typeof i?new Date(i||0):i;try{return de(e,"date",t,a).format(o)}catch(t){e.onError(new p.pg("Error formatting date.",e.locale,t))}return String(o)}function pe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],a=void 0===s?{}:s,o="string"==typeof i?new Date(i||0):i;try{return de(e,"time",t,a).format(o)}catch(t){e.onError(new p.pg("Error formatting time.",e.locale,t))}return String(o)}function ge(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=n[0],a=n[1],o=n[2],l=void 0===o?{}:o,u=e.timeZone,c=e.locale,h=e.onError,d=(0,i.J9)(l,he,u?{timeZone:u}:{});try{return t(c,d).formatRange(s,a)}catch(t){h(new p.pg("Error formatting date time range.",e.locale,t))}return String(s)}function me(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],a=void 0===s?{}:s,o="string"==typeof i?new Date(i||0):i;try{return de(e,"date",t,a).formatToParts(o)}catch(t){e.onError(new p.pg("Error formatting date.",e.locale,t))}return[]}function ve(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],a=void 0===s?{}:s,o="string"==typeof i?new Date(i||0):i;try{return de(e,"time",t,a).formatToParts(o)}catch(t){e.onError(new p.pg("Error formatting time.",e.locale,t))}return[]}var ye=["type"];function be(e,t,n,r){var s=e.locale,a=e.onError;void 0===r&&(r={}),Intl.PluralRules||a(new le.IF('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',le.O4.MISSING_INTL_API));var o=(0,i.J9)(r,ye);try{return t(s,o).select(n)}catch(e){a(new p.pg("Error formatting plural.",s,e))}return"other"}var Ee=["type","style"],Te=Date.now();function Se(e,t,n,r){void 0===r&&(r={});var i=we(e,t,n,r).reduce((function(e,t){var n=t.value;return"string"!=typeof n?e.push(n):"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n),e}),[]);return 1===i.length?i[0]:0===i.length?"":i}function we(e,t,n,s){var a=e.locale,o=e.onError;void 0===s&&(s={}),Intl.ListFormat||o(new le.IF('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',le.O4.MISSING_INTL_API));var l=(0,i.J9)(s,Ee);try{var u={},c=n.map((function(e,t){if("object"==typeof e){var n=function(e){return"".concat(Te,"_").concat(e,"_").concat(Te)}(t);return u[n]=e,n}return String(e)}));return t(a,l).formatToParts(c).map((function(e){return"literal"===e.type?e:(0,r.Cl)((0,r.Cl)({},e),{value:u[e.value]||e.value})}))}catch(e){o(new p.pg("Error formatting list.",a,e))}return n}var _e=["style","type","fallback","languageDisplay"];function Ae(e,t,n,r){var s=e.locale,a=e.onError;Intl.DisplayNames||a(new le.IF('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',le.O4.MISSING_INTL_API));var o=(0,i.J9)(r,_e);try{return t(s,o).of(n)}catch(e){a(new p.pg("Error formatting display name.",s,e))}}var ke=n(1478);function Le(e){return e?Object.keys(e).reduce((function(t,n){var r=e[n];return t[n]=(0,ke.RK)(r)?(0,a.yU)(r):r,t}),{}):e}var Ce=function(e,t,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var l=Le(i),u=re.apply(void 0,(0,r.fX)([e,t,n,l],a,!1));return Array.isArray(u)?s.Children.toArray(u):u},Re=function(e,t){var n=e.defaultRichTextElements,s=(0,r.Tt)(e,["defaultRichTextElements"]),o=Le(n),l=function(e,t){var n=(0,i.GT)(t),s=(0,r.Cl)((0,r.Cl)({},i.JF),e),a=s.locale,o=s.defaultLocale,l=s.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&l?l(new p.hr('Missing locale data for locale: "'.concat(a,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&l&&l(new p.hr('Missing locale data for locale: "'.concat(a,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(l&&l(new p.uo('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),s.locale=s.defaultLocale||"en"),function(e){var t;e.onWarn&&e.defaultRichTextElements&&"string"==typeof((t=e.messages||{})?t[Object.keys(t)[0]]:void 0)&&e.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(s),(0,r.Cl)((0,r.Cl)({},s),{formatters:n,formatNumber:ae.bind(null,s,n.getNumberFormat),formatNumberToParts:oe.bind(null,s,n.getNumberFormat),formatRelativeTime:ce.bind(null,s,n.getRelativeTimeFormat),formatDate:fe.bind(null,s,n.getDateTimeFormat),formatDateToParts:me.bind(null,s,n.getDateTimeFormat),formatTime:pe.bind(null,s,n.getDateTimeFormat),formatDateTimeRange:ge.bind(null,s,n.getDateTimeFormat),formatTimeToParts:ve.bind(null,s,n.getDateTimeFormat),formatPlural:be.bind(null,s,n.getPluralRules),formatMessage:re.bind(null,s,n),$t:re.bind(null,s,n),formatList:Se.bind(null,s,n.getListFormat),formatListToParts:we.bind(null,s,n.getListFormat),formatDisplayName:Ae.bind(null,s,n.getDisplayNames)})}((0,r.Cl)((0,r.Cl)((0,r.Cl)({},a.JF),s),{defaultRichTextElements:o}),t),u={locale:l.locale,timeZone:l.timeZone,fallbackOnEmptyString:l.fallbackOnEmptyString,formats:l.formats,defaultLocale:l.defaultLocale,defaultFormats:l.defaultFormats,messages:l.messages,onError:l.onError,defaultRichTextElements:o};return(0,r.Cl)((0,r.Cl)({},l),{formatMessage:Ce.bind(null,u,l.formatters),$t:Ce.bind(null,u,l.formatters)})};function Ie(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache=(0,i.MT)(),t.state={cache:t.cache,intl:Re(Ie(t.props),t.cache),prevConfig:Ie(t.props)},t}return(0,r.C6)(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,r=t.cache,i=Ie(e);return(0,a.bN)(n,i)?null:{intl:Re(i,r),prevConfig:i}},t.prototype.render=function(){return(0,a.HM)(this.state.intl),s.createElement(o.Kq,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=a.JF,t}(s.PureComponent),Pe=xe},9067:function(e,t,n){e.exports=n(6999)()},9106:function(e,t,n){var r=n(5630);e.exports=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?r(e,void 0,t):[]}},9140:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1087);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},9182:function(e){var t;t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),t=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=t[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},s=void 0===r.replacement?"-":r.replacement,a=void 0===r.trim||r.trim,o=n.normalize().split("").reduce((function(t,n){var a=i[n];return void 0===a&&(a=e[n]),void 0===a&&(a=n),a===s&&(a=" "),t+a.replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return r.strict&&(o=o.replace(/[^A-Za-z0-9\s]/g,"")),a&&(o=o.trim()),o=o.replace(/\s+/g,s),r.lower&&(o=o.toLowerCase()),o}return n.extend=function(t){Object.assign(e,t)},n},e.exports=t(),e.exports.default=t()},9203:function(e,t,n){"use strict";n.d(t,{m:function(){return y}});var r=n(6654),i=n.n(r);class s extends Error{constructor(e,t,n){super(e),this.name="ResponseError",this.responseData=t,this.status=n}getResponseData(){return this.responseData}}class a extends s{constructor(e,t,n){super(e,t,n),this.name="ValidationError"}getErrors(){return this.responseData}}const o=e=>e.json().then((t=>({data:t,response:e}))),l=e=>{const{response:t,data:n}=e;if(t.status>=200&&t.status<300)return n;throw new s(t.statusText,n,t.status)},u=e=>{if("ResponseError"===e.name&&422===e.status)throw new a(e.message,e.responseData,e.status);throw e},c=(e,t,n)=>{const{headers:r,...i}=n||{};return fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...r||null},body:JSON.stringify(t),...i||null}).then(o).then(l).catch(u)},h=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||"csrf-token";return"undefined"==typeof document?null:[].slice.call(document.getElementsByTagName("meta")).reduce(((t,n)=>n.getAttribute("name")===e?n.getAttribute("content"):t),null)},d=function(){let{csrfMetaName:e=null,xsrfCookieName:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=i().get();return(null!==e?t[e]:null)||t["XSRF-TOKEN"]||null}(t);if(null!==n)return{"X-XSRF-TOKEN":n};const r=h(e);return null!==r?{"X-CSRF-TOKEN":r}:null};var f=n(1580),p=n.n(f),g=n(8138),m=n.n(g),v=n(4041);const y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{fields:t=[],action:n=null,postForm:r=null,initialErrors:i=null,errors:s=null,setErrors:a=null,initialGeneralError:o=null,generalError:l=null,setGeneralError:u=null,initialValue:f=null,value:g=null,setValue:y=null,getFieldValue:b=null,onComplete:E=null,csrfMetaName:T=null,xsrfCookieName:S=null}=e||{},[w,_]=(0,v.useState)(f||g),[A,k]=(0,v.useState)(i||s),[L,C]=(0,v.useState)(o||l),[R,I]=(0,v.useState)({success:!1,loading:!1,error:!1}),[x,P]=(0,v.useState)(null),D=null!==y,O=D?g:w,M=D?y:_,N=null!==a,F=N?s:A,B=N?a:k,U=null!==u,$=U?l:L,H=U?u:C,G=[O,F,b].concat(t),j=(0,v.useCallback)(((e,t)=>{null!==(null!==F&&F[e]||null)&&B({...F,[e]:null}),M({...O,[e]:null!==b?b(t):t})}),G),V=(0,v.useMemo)((()=>((e,t)=>{let{value:n,errors:r,onChange:i,...s}=t;return e.reduce(((e,t)=>{const{name:a=(m()(t)?t:null)}=p()(t)?t:{};return{...e,[a]:{...p()(t)?t:null,name:a,value:null!==n&&n[a]||null,errors:null!==r&&r[a]||null,onChange:e=>i(a,e),...s}}}),{})})(t,{value:O,errors:F,onChange:j})),G),z=(0,v.useMemo)((()=>h()),[]),K=e=>{if(I({success:!1,loading:!1,error:!0}),"ValidationError"===e.name){const{errors:t=null}=e.getResponseData();B(t)}else H(e.message)},W=e=>{I({success:!0,loading:!1,error:!1}),P(e),E(e)},Y=(0,v.useCallback)(((e,t)=>null!==r?r(e,t):c(e,t,{credentials:"include",headers:d({csrfMetaName:T,xsrfCookieName:S})})),[r,c,d,T,S]),q=(0,v.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;I({success:!1,loading:!0,error:!1}),H(null),B(null),Y(n,{...e,_token:h()}).then(W).catch(K)}),[Y,n,O]),X=(0,v.useCallback)((e=>{e.preventDefault(),q()}),[q]);let Q=null;return R.loading?Q="loading":R.success?Q="success":R.error&&(Q="error"),{value:O,setValue:M,setErrors:B,setGeneralError:H,csrfToken:z,submit:q,onSubmit:X,...R,status:Q,response:x,fields:V,errors:F,generalError:$}}},9220:function(e,t,n){"use strict";let r;n.d(t,{A:function(){return h}});const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let o,l,u=0,c=0;var h=function(e,t,n){let r=t&&n||0;const i=t||new Array(16);let h=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:l;if(null==h||null==d){const t=e.random||(e.rng||s)();null==h&&(h=o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=l=16383&(t[6]<<8|t[7]))}let f=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:c+1;const g=f-u+(p-c)/1e4;if(g<0&&void 0===e.clockseq&&(d=d+1&16383),(g<0||f>u)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,c=p,l=d,f+=122192928e5;const m=(1e4*(268435455&f)+p)%4294967296;i[r++]=m>>>24&255,i[r++]=m>>>16&255,i[r++]=m>>>8&255,i[r++]=255&m;const v=f/4294967296*1e4&268435455;i[r++]=v>>>8&255,i[r++]=255&v,i[r++]=v>>>24&15|16,i[r++]=v>>>16&255,i[r++]=d>>>8|128,i[r++]=255&d;for(let e=0;e<6;++e)i[r+e]=h[e];return t||function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(i)}},9296:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1087);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},9460:function(e){e.exports=function(e){return function(t){return e(t)}}},9548:function(e,t,n){"use strict";var r=n(4041);t.A=r.createContext(null)},9572:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="rectangle-ad",r=["ad"],i="f641",s="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM229.5 173.3l72 144c5.9 11.9 1.1 26.3-10.7 32.2s-26.3 1.1-32.2-10.7L253.2 328l-90.3 0-5.4 10.7c-5.9 11.9-20.3 16.7-32.2 10.7s-16.7-20.3-10.7-32.2l72-144c4.1-8.1 12.4-13.3 21.5-13.3s17.4 5.1 21.5 13.3zM208 237.7L186.8 280l42.3 0L208 237.7zM392 256a24 24 0 1 0 0 48 24 24 0 1 0 0-48zm24-43.9l0-28.1c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96 0 48c0 13.3-10.7 24-24 24c-6.6 0-12.6-2.7-17-7c-9.4 4.5-19.9 7-31 7c-39.8 0-72-32.2-72-72s32.2-72 72-72c8.4 0 16.5 1.4 24 4.1z";t.definition={prefix:"fas",iconName:n,icon:[576,512,r,i,s]},t.faRectangleAd=t.definition,t.prefix="fas",t.iconName=n,t.width=576,t.height=512,t.ligatures=r,t.unicode=i,t.svgPathData=s,t.aliases=r},9575:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:function(){return r}})},9645:function(e){e.exports=function(){"use strict";function e(e){var t=e.split(":");try{var n=t[2].split(",");return 1===n.length&&(n=t[2].split(".")),3600*parseFloat(t[0],10)+60*parseFloat(t[1],10)+parseFloat(n[0],10)+parseFloat(n[1],10)/1e3}catch(e){return 0}}function t(e,t){for(var n=t;!e[n];)n++;return n}return function(){for(var n=[],r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/(?:\r\n|\r|\n)/gm),i=function(e){for(var t=e.length-1;t>=0&&!e[t];)t--;return t}(r)+1,s=0,a=void 0,o=void 0,l=void 0,u=0;u<i;u++){for(l={},o=[],u=t(r,u),l.id=parseInt(r[u++],10),a=r[u++].split(/[\t ]*-->[\t ]*/),l.start=e(a[0]),-1!==(s=a[1].indexOf(" "))&&(a[1]=a[1].substr(0,s)),l.end=e(a[1]);u<i&&r[u];)o.push(r[u++]);l.text=o.join("\\N").replace(/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,""),l.text=l.text.replace(/</g,"&lt;").replace(/>/g,"&gt;"),l.text=l.text.replace(/&lt;(\/?(font|b|u|i|s))((\s+(\w|\w[\w\-]*\w)(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)(\/?)&gt;/gi,"<$1$3$7>"),l.text=l.text.replace(/\\N/gi,"<br />"),n.push(l)}return n}}()},9740:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(4586);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},9756:function(e,t,n){var r=n(2478);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9772:function(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function s(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var o,l,u,c;if(Array.isArray(e)){if((o=e.length)!=a.length)return!1;for(l=o;0!==l--;)if(!s(e[l],a[l]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;for(c=e.entries();!(l=c.next()).done;)if(!s(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((o=e.length)!=a.length)return!1;for(l=o;0!==l--;)if(e[l]!==a[l])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((o=(u=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(l=o;0!==l--;)if(!Object.prototype.hasOwnProperty.call(a,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=o;0!==l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!s(e[u[l]],a[u[l]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return s(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},9828:function(e){e.exports=function(){return[]}},9850:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(7502);function i(e,t){if(null==e)return{};var n,i,s=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}}}]);