var Purs_EntryPoints_Livestream_Livestream=(()=>{var Ioe=Object.create;var ub=Object.defineProperty;var Toe=Object.getOwnPropertyDescriptor;var Soe=Object.getOwnPropertyNames;var Coe=Object.getPrototypeOf,Foe=Object.prototype.hasOwnProperty;var Goe=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ue=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),r8=(e,n)=>{for(var a in n)ub(e,a,{get:n[a],enumerable:!0})},o8=(e,n,a,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Soe(n))!Foe.call(e,r)&&r!==a&&ub(e,r,{get:()=>n[r],enumerable:!(t=Toe(n,r))||t.enumerable});return e};var ml=(e,n,a)=>(a=e!=null?Ioe(Coe(e)):{},o8(n||!e||!e.__esModule?ub(a,"default",{value:e,enumerable:!0}):a,e)),ib=e=>o8(ub({},"__esModule",{value:!0}),e);var Eo={};r8(Eo,{Children:()=>Lp,Component:()=>Pp,Fragment:()=>uM,PureComponent:()=>Nse,Suspense:()=>Ose,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Ase,cloneElement:()=>qD,createContext:()=>oM,createElement:()=>nr,createRef:()=>E1,default:()=>vt,forwardRef:()=>oc,isValidElement:()=>iM,lazy:()=>Lse,memo:()=>Pse,useCallback:()=>$D,useContext:()=>Use,useDebugValue:()=>kse,useEffect:()=>Pr,useImperativeHandle:()=>Af,useLayoutEffect:()=>WD,useMemo:()=>xD,useReducer:()=>Bse,useRef:()=>Kt,useState:()=>Ps,version:()=>Hse});var vt,Ase,Lp,qD,Pp,oM,nr,E1,oc,uM,iM,Lse,Pse,Nse,Ose,$D,Use,kse,Pr,Af,WD,xD,Bse,Kt,Ps,Hse,Ct=Goe(()=>{vt=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ase,Children:Lp,cloneElement:qD,Component:Pp,createContext:oM,createElement:nr,createRef:E1,forwardRef:oc,Fragment:uM,isValidElement:iM,lazy:Lse,memo:Pse,PureComponent:Nse,Suspense:Ose,useCallback:$D,useContext:Use,useDebugValue:kse,useEffect:Pr,useImperativeHandle:Af,useLayoutEffect:WD,useMemo:xD,useReducer:Bse,useRef:Kt,useState:Ps,version:Hse}=window.React});var cM=Ue((pQe,rU)=>{"use strict";var tU=Object.getOwnPropertySymbols,lve=Object.prototype.hasOwnProperty,cve=Object.prototype.propertyIsEnumerable;function sve(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function vve(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var n={},a=0;a<10;a++)n["_"+String.fromCharCode(a)]=a;var t=Object.getOwnPropertyNames(n).map(function(u){return n[u]});if(t.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(u){r[u]=u}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}rU.exports=vve()?Object.assign:function(e,n){for(var a,t=sve(e),r,u=1;u{"use strict";var vM=cM(),Vd=60103,iU=60106;vr.Fragment=60107;vr.StrictMode=60108;vr.Profiler=60114;var lU=60109,cU=60110,sU=60112;vr.Suspense=60113;var vU=60115,fU=60116;typeof Symbol=="function"&&Symbol.for&&(zc=Symbol.for,Vd=zc("react.element"),iU=zc("react.portal"),vr.Fragment=zc("react.fragment"),vr.StrictMode=zc("react.strict_mode"),vr.Profiler=zc("react.profiler"),lU=zc("react.provider"),cU=zc("react.context"),sU=zc("react.forward_ref"),vr.Suspense=zc("react.suspense"),vU=zc("react.memo"),fU=zc("react.lazy"));var zc,oU=typeof Symbol=="function"&&Symbol.iterator;function fve(e){return e===null||typeof e!="object"?null:(e=oU&&e[oU]||e["@@iterator"],typeof e=="function"?e:null)}function QD(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";yU.exports=RU()});var xU=Ue(Kd=>{"use strict";var Ns=cM(),Pf=wU();function Io(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;aKD;KD++)li[KD]=KD+1;var li,KD;li[15]=0;var Dve=/^[: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]*$/,bU=Object.prototype.hasOwnProperty,EU={},IU={};function BU(e){return bU.call(IU,e)?!0:bU.call(EU,e)?!1:Dve.test(e)?IU[e]=!0:(EU[e]=!0,!1)}function Rve(e,n,a,t){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return t?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yve(e,n,a,t){if(n===null||typeof n>"u"||Rve(e,n,a,t))return!0;if(t)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function rl(e,n,a,t,r,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=t,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var ci={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ci[e]=new rl(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];ci[n]=new rl(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ci[e]=new rl(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ci[e]=new rl(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){ci[e]=new rl(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ci[e]=new rl(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ci[e]=new rl(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ci[e]=new rl(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ci[e]=new rl(e,5,!1,e.toLowerCase(),null,!1,!1)});var SM=/[\-:]([a-z])/g;function CM(e){return e[1].toUpperCase()}"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 n=e.replace(SM,CM);ci[n]=new rl(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(SM,CM);ci[n]=new rl(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(SM,CM);ci[n]=new rl(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ci[e]=new rl(e,1,!1,e.toLowerCase(),null,!1,!1)});ci.xlinkHref=new rl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ci[e]=new rl(e,1,!1,e.toLowerCase(),null,!0,!0)});var wve=/["'&<>]/;function Up(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=wve.exec(e);if(n){var a="",t,r=0;for(t=n.index;tL1))throw Error(Io(301));if(e===bv)if(A1=!0,e={action:a,next:null},V_===null&&(V_=new Map),a=V_.get(n),a===void 0)V_.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function dM(){}var Bp=null,Sve={readContext:function(e){var n=Bp.threadID;return eR(e,n),e[n]},useContext:function(e){kp();var n=Bp.threadID;return eR(e,n),e[n]},useMemo:CU,useReducer:SU,useRef:function(e){bv=kp(),ao=FM();var n=ao.memoizedState;return n===null?(e={current:e},ao.memoizedState=e):n},useState:function(e){return SU(qU,e)},useLayoutEffect:function(){},useCallback:function(e,n){return CU(function(){return e},n)},useImperativeHandle:dM,useEffect:dM,useDebugValue:dM,useDeferredValue:function(e){return kp(),e},useTransition:function(){return kp(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(Bp.identifierPrefix||"")+"R:"+(Bp.uniqueID++).toString(36)},useMutableSource:function(e,n){return kp(),n(e._source)}},FU={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function GU(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"}}var $U={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},Cve=Ns({menuitem:!0},$U),ZD={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,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},Fve=["Webkit","ms","Moz","O"];Object.keys(ZD).forEach(function(e){Fve.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ZD[n]=ZD[e]})});var Gve=/([A-Z])/g,Mve=/^ms-/,z_=Pf.Children.toArray,hM=hve.ReactCurrentDispatcher,Ave={listing:!0,pre:!0,textarea:!0},Lve=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,MU={},gM={};function Pve(e){if(e==null)return e;var n="";return Pf.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var Nve=Object.prototype.hasOwnProperty,Ove={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function AU(e,n){if(e===void 0)throw Error(Io(152,XD(n)||"Component"))}function Uve(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,d=gve(l,n,a,s),p=[],R=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(te,le){R=!0,p=[le]},enqueueSetState:function(te,le){if(p===null)return null;p.push(le)}};if(s){if(s=new l(i.props,d,E),typeof l.getDerivedStateFromProps=="function"){var w=l.getDerivedStateFromProps.call(null,i.props,s.state);w!=null&&(s.state=Ns({},s.state,w))}}else if(bv={},s=l(i.props,d,E),s=HU(l,i.props,s,d),s==null||s.render==null){e=s,AU(e,l);return}if(s.props=i.props,s.context=d,s.updater=E,E=s.state,E===void 0&&(s.state=E=null),typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")if(typeof s.componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.UNSAFE_componentWillMount(),p.length){E=p;var I=R;if(p=null,R=!1,I&&E.length===1)s.state=E[0];else{w=I?E[0]:s.state;var L=!0;for(I=I?1:0;I=l))throw Error(Io(304));var s=new Uint16Array(l);for(s.set(i),li=s,li[0]=u+1,i=u;i=s.children.length){var d=s.footer;if(d!==""&&(this.previousWasTextNode=!1),this.stack.pop(),s.type==="select")this.currentSelectValue=null;else if(s.type!=null&&s.type.type!=null&&s.type.type.$$typeof===G1)this.popProvider(s.type);else if(s.type===M1){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var R=s.fallbackFrame;if(!R)throw Error(Io(303));this.stack.push(R),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=d}else{var E=s.children[s.childIndex++],w="";try{w+=this.render(E,s.context,s.domNamespace)}catch(I){throw I!=null&&typeof I.then=="function"?Error(Io(294)):I}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=w}}return u[0]}finally{hM.current=r,Bp=t,JU()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?Up(r):this.previousWasTextNode?""+Up(r):(this.previousWasTextNode=!0,Up(r));if(t=Uve(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!Pf.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===DM?Io(257):Io(258,r.toString()));return a=z_(a),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}var u=a.type;if(typeof u=="string")return this.renderDOM(a,t,r);switch(u){case UU:case OU:case RM:case yM:case EM:case F1:return a=z_(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case M1:throw Error(Io(294));case NU:throw Error(Io(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case bM:bv={};var i=u.render(a.props,a.ref);return i=HU(u.render,a.props,i,a.ref),i=z_(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case IM:return a=[Pf.createElement(u.type,Ns({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case G1:return u=z_(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case wM:u=a.type,i=a.props;var l=this.threadID;return eR(u,l),u=z_(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case PU:throw Error(Io(338));case TM:return u=a.type,i=u._init,u=i(u._payload),a=[Pf.createElement(u,Ns({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(Io(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===FU.html&&GU(u),!MU.hasOwnProperty(u)){if(!Lve.test(u))throw Error(Io(65,u));MU[u]=!0}var i=a.props;if(u==="input")i=Ns({type:void 0},i,{defaultChecked:void 0,defaultValue:void 0,value:i.value!=null?i.value:i.defaultValue,checked:i.checked!=null?i.checked:i.defaultChecked});else if(u==="textarea"){var l=i.value;if(l==null){l=i.defaultValue;var s=i.children;if(s!=null){if(l!=null)throw Error(Io(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(Io(93));s=s[0]}l=""+s}l==null&&(l="")}i=Ns({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Ns({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var d=Pve(i.children);if(s!=null){var p=i.value!=null?i.value+"":d;if(l=!1,Array.isArray(s)){for(var R=0;R":(le+=">",l="");e:{if(s=i.dangerouslySetInnerHTML,s!=null){if(s.__html!=null){s=s.__html;break e}}else if(s=i.children,typeof s=="string"||typeof s=="number"){s=Up(s);break e}s=null}return s!=null?(i=[],Ave.hasOwnProperty(u)&&s.charAt(0)===` `&&(le+=` `),le+=s):i=z_(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?GU(a):r==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":r,this.stack.push({domNamespace:r,type:u,children:i,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,le},e})();Kd.renderToNodeStream=function(){throw Error(Io(207))};Kd.renderToStaticMarkup=function(e,n){e=new WU(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};Kd.renderToStaticNodeStream=function(){throw Error(Io(208))};Kd.renderToString=function(e,n){e=new WU(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};Kd.version="17.0.2"});var zU=Ue((gQe,jU)=>{"use strict";jU.exports=xU()});var GJ=Ue((lI,P2)=>{(function(n,a){typeof lI=="object"&&typeof P2=="object"?P2.exports=a():typeof define=="function"&&define.amd?define([],a):typeof lI=="object"?lI.Pusher=a():n.Pusher=a()})(window,function(){return(function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="",a(a.s=2)})([(function(e,n,a){"use strict";var t=this&&this.__extends||(function(){var w=function(I,L){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,V){U.__proto__=V}||function(U,V){for(var Q in V)V.hasOwnProperty(Q)&&(U[Q]=V[Q])},w(I,L)};return function(I,L){w(I,L);function U(){this.constructor=I}I.prototype=L===null?Object.create(L):(U.prototype=L.prototype,new U)}})();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=(function(){function w(I){I===void 0&&(I="="),this._paddingCharacter=I}return w.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},w.prototype.encode=function(I){for(var L="",U=0;U>>18&63),L+=this._encodeByte(V>>>12&63),L+=this._encodeByte(V>>>6&63),L+=this._encodeByte(V>>>0&63)}var Q=I.length-U;if(Q>0){var V=I[U]<<16|(Q===2?I[U+1]<<8:0);L+=this._encodeByte(V>>>18&63),L+=this._encodeByte(V>>>12&63),Q===2?L+=this._encodeByte(V>>>6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},w.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},w.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},w.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),U=I.length-L,V=new Uint8Array(this.maxDecodedLength(U)),Q=0,te=0,le=0,ne=0,Z=0,ee=0,me=0;te>>4,V[Q++]=Z<<4|ee>>>2,V[Q++]=ee<<6|me,le|=ne&r,le|=Z&r,le|=ee&r,le|=me&r;if(te>>4,le|=ne&r,le|=Z&r),te>>2,le|=ee&r),te>>8&6,L+=51-I>>>8&-75,L+=61-I>>>8&-15,L+=62-I>>>8&3,String.fromCharCode(L)},w.prototype._decodeChar=function(I){var L=r;return L+=(42-I&I-44)>>>8&-r+I-43+62,L+=(46-I&I-48)>>>8&-r+I-47+63,L+=(47-I&I-58)>>>8&-r+I-48+52,L+=(64-I&I-91)>>>8&-r+I-65+0,L+=(96-I&I-123)>>>8&-r+I-97+26,L},w.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var U=I.length-1;U>=0&&I[U]===this._paddingCharacter;U--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},w})();n.Coder=u;var i=new u;function l(w){return i.encode(w)}n.encode=l;function s(w){return i.decode(w)}n.decode=s;var d=(function(w){t(I,w);function I(){return w!==null&&w.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var U=L;return U+=65,U+=25-L>>>8&6,U+=51-L>>>8&-75,U+=61-L>>>8&-13,U+=62-L>>>8&49,String.fromCharCode(U)},I.prototype._decodeChar=function(L){var U=r;return U+=(44-L&L-46)>>>8&-r+L-45+62,U+=(94-L&L-96)>>>8&-r+L-95+63,U+=(47-L&L-58)>>>8&-r+L-48+52,U+=(64-L&L-91)>>>8&-r+L-65+0,U+=(96-L&L-123)>>>8&-r+L-97+26,U},I})(u);n.URLSafeCoder=d;var p=new d;function R(w){return p.encode(w)}n.encodeURLSafe=R;function E(w){return p.decode(w)}n.decodeURLSafe=E,n.encodedLength=function(w){return i.encodedLength(w)},n.maxDecodedLength=function(w){return i.maxDecodedLength(w)},n.decodedLength=function(w){return i.decodedLength(w)}}),(function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",r="utf8: invalid source encoding";function u(s){for(var d=new Uint8Array(i(s)),p=0,R=0;R>6,d[p++]=128|E&63):E<55296?(d[p++]=224|E>>12,d[p++]=128|E>>6&63,d[p++]=128|E&63):(R++,E=(E&1023)<<10,E|=s.charCodeAt(R)&1023,E+=65536,d[p++]=240|E>>18,d[p++]=128|E>>12&63,d[p++]=128|E>>6&63,d[p++]=128|E&63)}return d}n.encode=u;function i(s){for(var d=0,p=0;p=s.length-1)throw new Error(t);p++,d+=4}else throw new Error(t)}return d}n.encodedLength=i;function l(s){for(var d=[],p=0;p=s.length)throw new Error(r);var w=s[++p];if((w&192)!==128)throw new Error(r);R=(R&31)<<6|w&63,E=128}else if(R<240){if(p>=s.length-1)throw new Error(r);var w=s[++p],I=s[++p];if((w&192)!==128||(I&192)!==128)throw new Error(r);R=(R&15)<<12|(w&63)<<6|I&63,E=2048}else if(R<248){if(p>=s.length-2)throw new Error(r);var w=s[++p],I=s[++p],L=s[++p];if((w&192)!==128||(I&192)!==128||(L&192)!==128)throw new Error(r);R=(R&15)<<18|(w&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(R=55296&&R<=57343)throw new Error(r);if(R>=65536){if(R>1114111)throw new Error(r);R-=65536,d.push(String.fromCharCode(55296|R>>10)),R=56320|R&1023}}d.push(String.fromCharCode(R))}return d.join("")}n.decode=l}),(function(e,n,a){e.exports=a(3).default}),(function(e,n,a){"use strict";a.r(n);var t=(function(){function h(m,D){this.lastId=0,this.prefix=m,this.name=D}return h.prototype.create=function(m){this.lastId++;var D=this.lastId,M=this.prefix+D,A=this.name+"["+D+"]",Y=!1,Ge=function(){Y||(m.apply(null,arguments),Y=!0)};return this[D]=Ge,{number:D,id:M,name:A,callback:Ge}},h.prototype.remove=function(m){delete this[m.number]},h})(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=(function(){function h(m){this.options=m,this.receivers=m.receivers||r,this.loading={}}return h.prototype.load=function(m,D,M){var A=this;if(A.loading[m]&&A.loading[m].length>0)A.loading[m].push(M);else{A.loading[m]=[M];var Y=Nt.createScriptRequest(A.getPath(m,D)),Ge=A.receivers.create(function(Cn){if(A.receivers.remove(Ge),A.loading[m]){var xa=A.loading[m];delete A.loading[m];for(var pr=function(Zu){Zu||Y.cleanup()},eo=0;eo>>6)+E(128|m&63):E(224|m>>>12&15)+E(128|m>>>6&63)+E(128|m&63)},Q=function(h){return h.replace(/[^\x00-\x7F]/g,V)},te=function(h){var m=[0,2,1][h.length%3],D=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),M=[w.charAt(D>>>18),w.charAt(D>>>12&63),m>=2?"=":w.charAt(D>>>6&63),m>=1?"=":w.charAt(D&63)];return M.join("")},le=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,te)},ne=(function(){function h(m,D,M,A){var Y=this;this.clear=D,this.timer=m(function(){Y.timer&&(Y.timer=A(Y.timer))},M)}return h.prototype.isRunning=function(){return this.timer!==null},h.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},h})(),Z=ne,ee=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})();function me(h){window.clearTimeout(h)}function We(h){window.clearInterval(h)}var Qe=(function(h){ee(m,h);function m(D,M){return h.call(this,setTimeout,me,D,function(A){return M(),null})||this}return m})(Z),dn=(function(h){ee(m,h);function m(D,M){return h.call(this,setInterval,We,D,function(A){return M(),A})||this}return m})(Z),qn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(h){return new Qe(0,h)},method:function(h){for(var m=[],D=1;D0)for(var A=0;A=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}},pe=af,hs=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),gs=(function(h){hs(m,h);function m(D,M){var A=h.call(this)||this;return A.id=D,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return m.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},m.prototype.send=function(D){return this.transport.send(D)},m.prototype.send_event=function(D,M,A){var Y={event:D,data:M};return A&&(Y.channel=A),In.debug("Event sent",Y),this.send(pe.encodeMessage(Y))},m.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},m.prototype.close=function(){this.transport.close()},m.prototype.bindListeners=function(){var D=this,M={message:function(Y){var Ge;try{Ge=pe.decodeMessage(Y)}catch(Cn){D.emit("error",{type:"MessageParseError",error:Cn,data:Y.data})}if(Ge!==void 0){switch(In.debug("Event recd",Ge),Ge.event){case"pusher:error":D.emit("error",{type:"PusherError",data:Ge.data});break;case"pusher:ping":D.emit("ping");break;case"pusher:pong":D.emit("pong");break}D.emit("message",Ge)}},activity:function(){D.emit("activity")},error:function(Y){D.emit("error",{type:"WebSocketError",error:Y})},closed:function(Y){A(),Y&&Y.code&&D.handleCloseEvent(Y),D.transport=null,D.emit("closed")}},A=function(){Da(M,function(Y,Ge){D.transport.unbind(Ge,Y)})};Da(M,function(Y,Ge){D.transport.bind(Ge,Y)})},m.prototype.handleCloseEvent=function(D){var M=pe.getCloseAction(D),A=pe.getCloseError(D);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},m})($a),tf=gs,Ds=(function(){function h(m,D){this.transport=m,this.callback=D,this.bindListeners()}return h.prototype.close=function(){this.unbindListeners(),this.transport.close()},h.prototype.bindListeners=function(){var m=this;this.onMessage=function(D){m.unbindListeners();var M;try{M=pe.processHandshake(D)}catch(A){m.finish("error",{error:A}),m.transport.close();return}M.action==="connected"?m.finish("connected",{connection:new tf(M.id,m.transport),activityTimeout:M.activityTimeout}):(m.finish(M.action,{error:M.error}),m.transport.close())},this.onClosed=function(D){m.unbindListeners();var M=pe.getCloseAction(D)||"backoff",A=pe.getCloseError(D);m.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},h.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},h.prototype.finish=function(m,D){this.callback(An({transport:this.transport,action:m},D))},h})(),Sc=Ds,Ig=(function(){function h(m,D){this.channel=m;var M=D.authTransport;if(typeof Nt.getAuthorizers()[M]>"u")throw"'"+M+"' is not a recognized auth transport";this.type=M,this.options=D,this.authOptions=D.auth||{}}return h.prototype.composeQuery=function(m){var D="socket_id="+encodeURIComponent(m)+"&channel_name="+encodeURIComponent(this.channel.name);for(var M in this.authOptions.params)D+="&"+encodeURIComponent(M)+"="+encodeURIComponent(this.authOptions.params[M]);return D},h.prototype.authorize=function(m,D){h.authorizers=h.authorizers||Nt.getAuthorizers(),h.authorizers[this.type].call(this,Nt,m,D)},h})(),j0=Ig,Vm=(function(){function h(m,D){this.timeline=m,this.options=D||{}}return h.prototype.send=function(m,D){this.timeline.isEmpty()||this.timeline.send(Nt.TimelineTransport.getAgent(this,m),D)},h})(),Qm=Vm,Cc=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),ki=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),rf=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Km=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Tg=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Ym=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Sw=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),__=(function(h){Cc(m,h);function m(D){var M=this.constructor,A=h.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),$C=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),WC=(function(h){$C(m,h);function m(D,M){var A=h.call(this,function(Y,Ge){In.debug("No callbacks on "+D+" for "+Y)})||this;return A.name=D,A.pusher=M,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return m.prototype.authorize=function(D,M){return M(!1,{auth:""})},m.prototype.trigger=function(D,M){if(D.indexOf("client-")!==0)throw new ki("Event '"+D+"' does not start with 'client-'");if(!this.subscribed){var A=za.buildLogSuffix("triggeringClientEvents");In.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(D,M,this.name)},m.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},m.prototype.handleEvent=function(D){var M=D.event,A=D.data;if(M==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(D);else if(M.indexOf("pusher_internal:")!==0){var Y={};this.emit(M,A,Y)}},m.prototype.handleSubscriptionSucceededEvent=function(D){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",D.data)},m.prototype.subscribe=function(){var D=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(M,A){M?(In.error(A),D.emit("pusher:subscription_error",A)):(A=A,D.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:D.name}))}))},m.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},m.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},m.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},m})($a),Cw=WC,xC=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),jC=(function(h){xC(m,h);function m(){return h!==null&&h.apply(this,arguments)||this}return m.prototype.authorize=function(D,M){var A=Fc.createAuthorizer(this,this.pusher.config);return A.authorize(D,M)},m})(Cw),Sg=jC,Fw=(function(){function h(){this.reset()}return h.prototype.get=function(m){return Object.prototype.hasOwnProperty.call(this.members,m)?{id:m,info:this.members[m]}:null},h.prototype.each=function(m){var D=this;Da(this.members,function(M,A){m(D.get(A))})},h.prototype.setMyID=function(m){this.myID=m},h.prototype.onSubscription=function(m){this.members=m.presence.hash,this.count=m.presence.count,this.me=this.get(this.myID)},h.prototype.addMember=function(m){return this.get(m.user_id)===null&&this.count++,this.members[m.user_id]=m.user_info,this.get(m.user_id)},h.prototype.removeMember=function(m){var D=this.get(m.user_id);return D&&(delete this.members[m.user_id],this.count--),D},h.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},h})(),zC=Fw,VC=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),Gw=(function(h){VC(m,h);function m(D,M){var A=h.call(this,D,M)||this;return A.members=new zC,A}return m.prototype.authorize=function(D,M){var A=this;h.prototype.authorize.call(this,D,function(Y,Ge){if(!Y){if(Ge=Ge,Ge.channel_data===void 0){var Cn=za.buildLogSuffix("authenticationEndpoint");In.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+Cn)),M("Invalid auth response");return}var xa=JSON.parse(Ge.channel_data);A.members.setMyID(xa.user_id)}M(Y,Ge)})},m.prototype.handleEvent=function(D){var M=D.event;if(M.indexOf("pusher_internal:")===0)this.handleInternalEvent(D);else{var A=D.data,Y={};D.user_id&&(Y.user_id=D.user_id),this.emit(M,A,Y)}},m.prototype.handleInternalEvent=function(D){var M=D.event,A=D.data;switch(M){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(D);break;case"pusher_internal:member_added":var Y=this.members.addMember(A);this.emit("pusher:member_added",Y);break;case"pusher_internal:member_removed":var Ge=this.members.removeMember(A);Ge&&this.emit("pusher:member_removed",Ge);break}},m.prototype.handleSubscriptionSucceededEvent=function(D){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(D.data),this.emit("pusher:subscription_succeeded",this.members))},m.prototype.disconnect=function(){this.members.reset(),h.prototype.disconnect.call(this)},m})(Sg),QC=Gw,Mw=a(1),Cg=a(0),KC=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),YC=(function(h){KC(m,h);function m(D,M,A){var Y=h.call(this,D,M)||this;return Y.key=null,Y.nacl=A,Y}return m.prototype.authorize=function(D,M){var A=this;h.prototype.authorize.call(this,D,function(Y,Ge){if(Y){M(!0,Ge);return}var Cn=Ge.shared_secret;if(!Cn){var xa="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,xa);return}A.key=Object(Cg.decode)(Cn),delete Ge.shared_secret,M(!1,Ge)})},m.prototype.trigger=function(D,M){throw new Ym("Client events are not currently supported for encrypted channels")},m.prototype.handleEvent=function(D){var M=D.event,A=D.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){h.prototype.handleEvent.call(this,D);return}this.handleEncryptedEvent(M,A)},m.prototype.handleEncryptedEvent=function(D,M){var A=this;if(!this.key){In.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){In.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Y=Object(Cg.decode)(M.ciphertext);if(Y.length0&&this.emit("connecting_in",Math.round(D/1e3)),this.retryTimer=new Qe(D||0,function(){M.disconnectInternally(),M.connect()})},m.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},m.prototype.setUnavailableTimer=function(){var D=this;this.unavailableTimer=new Qe(this.options.unavailableTimeout,function(){D.updateState("unavailable")})},m.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},m.prototype.sendActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Qe(this.options.pongTimeout,function(){D.timeline.error({pong_timed_out:D.options.pongTimeout}),D.retryIn(0)})},m.prototype.resetActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Qe(this.activityTimeout,function(){D.sendActivityCheck()}))},m.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},m.prototype.buildConnectionCallbacks=function(D){var M=this;return An({},D,{message:function(A){M.resetActivityCheck(),M.emit("message",A)},ping:function(){M.send_event("pusher:pong",{})},activity:function(){M.resetActivityCheck()},error:function(A){M.emit("error",{type:"WebSocketError",error:A})},closed:function(){M.abandonConnection(),M.shouldRetry()&&M.retryIn(1e3)}})},m.prototype.buildHandshakeCallbacks=function(D){var M=this;return An({},D,{connected:function(A){M.activityTimeout=Math.min(M.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),M.clearUnavailableTimer(),M.setConnection(A.connection),M.socket_id=M.connection.id,M.updateState("connected",{socket_id:M.socket_id})}})},m.prototype.buildErrorCallbacks=function(){var D=this,M=function(A){return function(Y){Y.error&&D.emit("error",{type:"WebSocketError",error:Y.error}),A(Y)}};return{tls_only:M(function(){D.usingTLS=!0,D.updateStrategy(),D.retryIn(0)}),refused:M(function(){D.disconnect()}),backoff:M(function(){D.retryIn(1e3)}),retry:M(function(){D.retryIn(0)})}},m.prototype.setConnection=function(D){this.connection=D;for(var M in this.connectionCallbacks)this.connection.bind(M,this.connectionCallbacks[M]);this.resetActivityCheck()},m.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var D in this.connectionCallbacks)this.connection.unbind(D,this.connectionCallbacks[D]);var M=this.connection;return this.connection=null,M}},m.prototype.updateState=function(D,M){var A=this.state;if(this.state=D,A!==D){var Y=D;Y==="connected"&&(Y+=" with new socket ID "+M.socket_id),In.debug("State changed",A+" -> "+Y),this.timeline.info({state:D,params:M}),this.emit("state_change",{previous:A,current:D}),this.emit(D,M)}},m.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},m})($a),Aw=eF,nF=(function(){function h(){this.channels={}}return h.prototype.add=function(m,D){return this.channels[m]||(this.channels[m]=Lw(m,D)),this.channels[m]},h.prototype.all=function(){return Rt(this.channels)},h.prototype.find=function(m){return this.channels[m]},h.prototype.remove=function(m){var D=this.channels[m];return delete this.channels[m],D},h.prototype.disconnect=function(){Da(this.channels,function(m){m.disconnect()})},h})(),aF=nF;function Lw(h,m){if(h.indexOf("private-encrypted-")===0){if(m.config.nacl)return Fc.createEncryptedChannel(h,m,m.config.nacl);var D="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=za.buildLogSuffix("encryptedChannelSupport");throw new Ym(D+". "+M)}else return h.indexOf("private-")===0?Fc.createPrivateChannel(h,m):h.indexOf("presence-")===0?Fc.createPresenceChannel(h,m):Fc.createChannel(h,m)}var tF={createChannels:function(){return new aF},createConnectionManager:function(h,m){return new Aw(h,m)},createChannel:function(h,m){return new Cw(h,m)},createPrivateChannel:function(h,m){return new Sg(h,m)},createPresenceChannel:function(h,m){return new QC(h,m)},createEncryptedChannel:function(h,m,D){return new XC(h,m,D)},createTimelineSender:function(h,m){return new Qm(h,m)},createAuthorizer:function(h,m){return m.authorizer?m.authorizer(h,m):new j0(h,m)},createHandshake:function(h,m){return new Sc(h,m)},createAssistantToTheTransportManager:function(h,m,D){return new Xs(h,m,D)}},Fc=tF,rF=(function(){function h(m){this.options=m||{},this.livesLeft=this.options.lives||1/0}return h.prototype.getAssistant=function(m){return Fc.createAssistantToTheTransportManager(this,m,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},h.prototype.isAlive=function(){return this.livesLeft>0},h.prototype.reportDeath=function(){this.livesLeft-=1},h})(),Pw=rF,oF=(function(){function h(m,D){this.strategies=m,this.loop=!!D.loop,this.failFast=!!D.failFast,this.timeout=D.timeout,this.timeoutLimit=D.timeoutLimit}return h.prototype.isSupported=function(){return zn(this.strategies,Mn.method("isSupported"))},h.prototype.connect=function(m,D){var M=this,A=this.strategies,Y=0,Ge=this.timeout,Cn=null,xa=function(pr,eo){eo?D(null,eo):(Y=Y+1,M.loop&&(Y=Y%A.length),Y0&&(Y=new Qe(M.timeout,function(){Ge.abort(),A(!0)})),Ge=m.connect(D,function(Cn,xa){Cn&&Y&&Y.isRunning()&&!M.failFast||(Y&&Y.ensureAborted(),A(Cn,xa))}),{abort:function(){Y&&Y.ensureAborted(),Ge.abort()},forceMinPriority:function(Cn){Ge.forceMinPriority(Cn)}}},h})(),of=oF,uF=(function(){function h(m){this.strategies=m}return h.prototype.isSupported=function(){return zn(this.strategies,Mn.method("isSupported"))},h.prototype.connect=function(m,D){return iF(this.strategies,m,function(M,A){return function(Y,Ge){if(A[M].error=Y,Y){Nw(A)&&D(!0);return}_t(A,function(Cn){Cn.forceMinPriority(Ge.transport.priority)}),D(null,Ge)}})},h})(),Fg=uF;function iF(h,m,D){var M=Ha(h,function(A,Y,Ge,Cn){return A.connect(m,D(Y,Cn))});return{abort:function(){_t(M,Gg)},forceMinPriority:function(A){_t(M,function(Y){Y.forceMinPriority(A)})}}}function Nw(h){return Un(h,function(m){return!!m.error})}function Gg(h){!h.error&&!h.aborted&&(h.abort(),h.aborted=!0)}var lF=(function(){function h(m,D,M){this.strategy=m,this.transports=D,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(m,D){var M=this.usingTLS,A=Ow(M),Y=[this.strategy];if(A&&A.timestamp+this.ttl>=Mn.now()){var Ge=this.transports[A.transport];Ge&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Y.push(new of([Ge],{timeout:A.latency*2+1e3,failFast:!0})))}var Cn=Mn.now(),xa=Y.pop().connect(m,function pr(eo,Zu){eo?(Uw(M),Y.length>0?(Cn=Mn.now(),xa=Y.pop().connect(m,pr)):D(eo)):(sF(M,Zu.transport.name,Mn.now()-Cn),D(null,Zu))});return{abort:function(){xa.abort()},forceMinPriority:function(pr){m=pr,xa&&xa.forceMinPriority(pr)}}},h})(),cF=lF;function Mg(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function Ow(h){var m=Nt.getLocalStorage();if(m)try{var D=m[Mg(h)];if(D)return JSON.parse(D)}catch{Uw(h)}return null}function sF(h,m,D){var M=Nt.getLocalStorage();if(M)try{M[Mg(h)]=pt({timestamp:Mn.now(),transport:m,latency:D})}catch{}}function Uw(h){var m=Nt.getLocalStorage();if(m)try{delete m[Mg(h)]}catch{}}var vF=(function(){function h(m,D){var M=D.delay;this.strategy=m,this.options={delay:M}}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(m,D){var M=this.strategy,A,Y=new Qe(this.options.delay,function(){A=M.connect(m,D)});return{abort:function(){Y.ensureAborted(),A&&A.abort()},forceMinPriority:function(Ge){m=Ge,A&&A.forceMinPriority(Ge)}}},h})(),Xm=vF,kw=(function(){function h(m,D,M){this.test=m,this.trueBranch=D,this.falseBranch=M}return h.prototype.isSupported=function(){var m=this.test()?this.trueBranch:this.falseBranch;return m.isSupported()},h.prototype.connect=function(m,D){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(m,D)},h})(),z0=kw,fF=(function(){function h(m){this.strategy=m}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(m,D){var M=this.strategy.connect(m,function(A,Y){Y&&M.abort(),D(A,Y)});return M},h})(),_F=fF;function Rs(h){return function(){return h.isSupported()}}var Bw=function(h,m,D){var M={};function A(Wo,tb,rb,qF,ob){var b=D(h,Wo,tb,rb,qF,ob);return M[Wo]=b,b}var Y=Object.assign({},m,{hostNonTLS:h.wsHost+":"+h.wsPort,hostTLS:h.wsHost+":"+h.wssPort,httpPath:h.wsPath}),Ge=Object.assign({},Y,{useTLS:!0}),Cn=Object.assign({},m,{hostNonTLS:h.httpHost+":"+h.httpPort,hostTLS:h.httpHost+":"+h.httpsPort,httpPath:h.httpPath}),xa={loop:!0,timeout:15e3,timeoutLimit:6e4},pr=new Pw({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),eo=new Pw({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Zu=A("ws","ws",3,Y,pr),jl=A("wss","ws",3,Ge,pr),kF=A("sockjs","sockjs",1,Cn),Kw=A("xhr_streaming","xhr_streaming",1,Cn,eo),Yw=A("xdr_streaming","xdr_streaming",1,Cn,eo),Xw=A("xhr_polling","xhr_polling",1,Cn),BF=A("xdr_polling","xdr_polling",1,Cn),Zw=new of([Zu],xa),HF=new of([jl],xa),JF=new of([kF],xa),eb=new of([new z0(Rs(Kw),Kw,Yw)],xa),nb=new of([new z0(Rs(Xw),Xw,BF)],xa),ab=new of([new z0(Rs(eb),new Fg([eb,new Xm(nb,{delay:4e3})]),nb)],xa),Ug=new z0(Rs(ab),ab,JF),kg;return m.useTLS?kg=new Fg([Zw,new Xm(Ug,{delay:2e3})]):kg=new Fg([Zw,new Xm(HF,{delay:2e3}),new Xm(Ug,{delay:5e3})]),new cF(new _F(new z0(Rs(Zu),kg,Ug)),M,{ttl:18e5,timeline:m.timeline,useTLS:m.useTLS})},pF=Bw,mF=(function(){var h=this;h.timeline.info(h.buildTimelineMessage({transport:h.name+(h.options.useTLS?"s":"")})),h.hooks.isInitialized()?h.changeState("initialized"):h.hooks.file?(h.changeState("initializing"),p.load(h.hooks.file,{useTLS:h.options.useTLS},function(m,D){h.hooks.isInitialized()?(h.changeState("initialized"),D(!0)):(m&&h.onError(m),h.onClose(),D(!1))})):h.onClose()}),Hw={getRequest:function(h){var m=new window.XDomainRequest;return m.ontimeout=function(){h.emit("error",new rf),h.close()},m.onerror=function(D){h.emit("error",D),h.close()},m.onprogress=function(){m.responseText&&m.responseText.length>0&&h.onChunk(200,m.responseText)},m.onload=function(){m.responseText&&m.responseText.length>0&&h.onChunk(200,m.responseText),h.emit("finished",200),h.close()},m},abortRequest:function(h){h.ontimeout=h.onerror=h.onprogress=h.onload=null,h.abort()}},dF=Hw,Jw=(function(){var h=function(m,D){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},h(m,D)};return function(m,D){h(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),hF=256*1024,qw=(function(h){Jw(m,h);function m(D,M,A){var Y=h.call(this)||this;return Y.hooks=D,Y.method=M,Y.url=A,Y}return m.prototype.start=function(D){var M=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){M.close()},Nt.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(D)},m.prototype.close=function(){this.unloader&&(Nt.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},m.prototype.onChunk=function(D,M){for(;;){var A=this.advanceBuffer(M);if(A)this.emit("chunk",{status:D,data:A});else break}this.isBufferTooLong(M)&&this.emit("buffer_too_long")},m.prototype.advanceBuffer=function(D){var M=D.slice(this.position),A=M.indexOf(` `);return A!==-1?(this.position+=A+1,M.slice(0,A)):null},m.prototype.isBufferTooLong=function(D){return this.position===D.length&&D.length>hF},m})($a),$w=qw,V0;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(V0||(V0={}));var Gc=V0,gF=1,Ww=(function(){function h(m,D){this.hooks=m,this.session=_l(1e3)+"/"+ys(8),this.location=DF(D),this.readyState=Gc.CONNECTING,this.openStream()}return h.prototype.send=function(m){return this.sendRaw(JSON.stringify([m]))},h.prototype.ping=function(){this.hooks.sendHeartbeat(this)},h.prototype.close=function(m,D){this.onClose(m,D,!0)},h.prototype.sendRaw=function(m){if(this.readyState===Gc.OPEN)try{return Nt.createSocketRequest("POST",Ag(RF(this.location,this.session))).start(m),!0}catch{return!1}else return!1},h.prototype.reconnect=function(){this.closeStream(),this.openStream()},h.prototype.onClose=function(m,D,M){this.closeStream(),this.readyState=Gc.CLOSED,this.onclose&&this.onclose({code:m,reason:D,wasClean:M})},h.prototype.onChunk=function(m){if(m.status===200){this.readyState===Gc.OPEN&&this.onActivity();var D,M=m.data.slice(0,1);switch(M){case"o":D=JSON.parse(m.data.slice(1)||"{}"),this.onOpen(D);break;case"a":D=JSON.parse(m.data.slice(1)||"[]");for(var A=0;A0&&h.onChunk(D.status,D.responseText);break;case 4:D.responseText&&D.responseText.length>0&&h.onChunk(D.status,D.responseText),h.emit("finished",D.status),h.close();break}},D},abortRequest:function(h){h.onreadystatechange=null,h.abort()}},Pt=jw,uf={createStreamingSocket:function(h){return this.createSocket(bF,h)},createPollingSocket:function(h){return this.createSocket(IF,h)},createSocket:function(h,m){return new yF(h,m)},createXHR:function(h,m){return this.createRequest(Pt,h,m)},createRequest:function(h,m,D){return new $w(h,m,D)}},Lg=uf;Lg.createXDR=function(h,m){return this.createRequest(dF,h,m)};var TF=Lg,SF={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:d,getDefaultStrategy:pF,Transports:Xu,transportConnectionInitializer:mF,HTTPFactory:TF,TimelineTransport:ce,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(h){var m=this;window.Pusher=h;var D=function(){m.onDocumentBody(h.ready)};window.JSON?D():p.load("json2",{},D)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:W,jsonp:k}},onDocumentBody:function(h){var m=this;document.body?h():setTimeout(function(){m.onDocumentBody(h)},0)},createJSONPRequest:function(h,m){return new j(h,m)},createScriptRequest:function(h){return new P(h)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var h=this.getXHRAPI();return new h},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return xl},createWebSocket:function(h){var m=this.getWebSocketAPI();return new m(h)},createSocketRequest:function(h,m){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,m);if(this.isXDRSupported(m.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,m);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var h=this.getXHRAPI();return!!h&&new h().withCredentials!==void 0},isXDRSupported:function(h){var m=h?"https:":"http:",D=this.getProtocol();return!!window.XDomainRequest&&D===m},addUnloadListener:function(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener:function(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)}},Nt=SF,Zm;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(Zm||(Zm={}));var ed=Zm,CF=(function(){function h(m,D,M){this.key=m,this.session=D,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return h.prototype.log=function(m,D){m<=this.options.level&&(this.events.push(An({},D,{timestamp:Mn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},h.prototype.error=function(m){this.log(ed.ERROR,m)},h.prototype.info=function(m){this.log(ed.INFO,m)},h.prototype.debug=function(m){this.log(ed.DEBUG,m)},h.prototype.isEmpty=function(){return this.events.length===0},h.prototype.send=function(m,D){var M=this,A=An({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],m(A,function(Y,Ge){Y||M.sent++,D&&D(Y,Ge)}),!0},h.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},h})(),zw=CF,Pg=(function(){function h(m,D,M,A){this.name=m,this.priority=D,this.transport=M,this.options=A||{}}return h.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},h.prototype.connect=function(m,D){var M=this;if(this.isSupported()){if(this.priority{"use strict";var kTe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";B$.exports=kTe});var W$=Ue((VAn,$$)=>{"use strict";var BTe=H$();function J$(){}function q$(){}q$.resetWarningCache=J$;$$.exports=function(){function e(t,r,u,i,l,s){if(s!==BTe){var d=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 d.name="Invariant Violation",d}}e.isRequired=e;function n(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:q$,resetWarningCache:J$};return a.PropTypes=a,a}});var j$=Ue((YAn,x$)=>{x$.exports=W$()();var QAn,KAn});var EL=Ue(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var V$=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],MI=V$.join(","),Q$=typeof Element>"u",mm=Q$?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wL=!Q$&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},K$=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(MI));return a&&mm.call(n,MI)&&r.unshift(n),r=r.filter(t),r},Y$=function e(n,a,t){for(var r=[],u=Array.from(n);u.length;){var i=u.shift();if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,d=e(s,!0,t);t.flatten?r.push.apply(r,d):r.push({scope:i,candidates:d})}else{var p=mm.call(i,MI);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var R=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(R&&E){var w=e(R===!0?i.children:R.children,!0,t);t.flatten?r.push.apply(r,w):r.push({scope:i,candidates:w})}else u.unshift.apply(u,i.children)}}return r},X$=function(n,a){return n.tabIndex<0&&(a||/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||n.isContentEditable)&&isNaN(parseInt(n.getAttribute("tabindex"),10))?0:n.tabIndex},HTe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},Z$=function(n){return n.tagName==="INPUT"},JTe=function(n){return Z$(n)&&n.type==="hidden"},qTe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},$Te=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(mm.call(i,"details:not([open]) *"))return!0;var l=wL(n).host,s=(l==null?void 0:l.ownerDocument.contains(l))||n.ownerDocument.contains(n);if(!t||t==="full"){if(typeof r=="function"){for(var d=n;n;){var p=n.parentElement,R=wL(n);if(p&&!p.shadowRoot&&r(p)===!0)return z$(n);n.assignedSlot?n=n.assignedSlot:!p&&R!==n.ownerDocument?n=R.host:n=p}n=d}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return z$(n);return!1},VTe=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var a=n.parentElement;a;){if(a.tagName==="FIELDSET"&&a.disabled){for(var t=0;t=0)},KTe=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=X$(l,i),d=i?e(r.candidates):l;s===0?i?a.push.apply(a,d):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:d})}),t.sort(HTe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},YTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=Y$([n],a.includeContainer,{filter:bL.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:QTe}):t=K$(n,a.includeContainer,bL.bind(null,a)),KTe(t)},XTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=Y$([n],a.includeContainer,{filter:AI.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=K$(n,a.includeContainer,AI.bind(null,a)),t},ZTe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return mm.call(n,MI)===!1?!1:bL(a,n)},eSe=V$.concat("iframe").join(","),nSe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return mm.call(n,eSe)===!1?!1:AI(a,n)};Ch.focusable=XTe;Ch.isFocusable=nSe;Ch.isTabbable=ZTe;Ch.tabbable=YTe});var oW=Ue(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var Zf=EL();function eW(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function nW(e){for(var n=1;n0){var t=e[e.length-1];t!==a&&t.pause()}var r=e.indexOf(a);r===-1||e.splice(r,1),e.push(a)},deactivateTrap:function(a){var t=e.indexOf(a);t!==-1&&e.splice(t,1),e.length>0&&e[e.length-1].unpause()}}})(),tSe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},rSe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},oSe=function(n){return n.key==="Tab"||n.keyCode===9},tW=function(n){return setTimeout(n,0)},rW=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},jR=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?me-1:0),Qe=1;Qe=0)Z=t.activeElement;else{var ee=u.tabbableGroups[0],me=ee&&ee.firstTabbableNode;Z=me||d("fallbackFocus")}if(!Z)throw new Error("Your focus-trap needs to have at least one focusable element");return Z},R=function(){if(u.containerGroups=u.containers.map(function(Z){var ee=Zf.tabbable(Z,r.tabbableOptions),me=Zf.focusable(Z,r.tabbableOptions);return{container:Z,tabbableNodes:ee,focusableNodes:me,firstTabbableNode:ee.length>0?ee[0]:null,lastTabbableNode:ee.length>0?ee[ee.length-1]:null,nextTabbableNode:function(Qe){var dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,qn=me.findIndex(function(Mn){return Mn===Qe});if(!(qn<0))return dn?me.slice(qn+1).find(function(Mn){return Zf.isTabbable(Mn,r.tabbableOptions)}):me.slice(0,qn).reverse().find(function(Mn){return Zf.isTabbable(Mn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Z){return Z.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},E=function ne(Z){if(Z!==!1&&Z!==t.activeElement){if(!Z||!Z.focus){ne(p());return}Z.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Z,tSe(Z)&&Z.select()}},w=function(Z){var ee=d("setReturnFocus",Z);return ee||(ee===!1?!1:Z)},I=function(Z){var ee=LI(Z);if(!(s(ee)>=0)){if(jR(r.clickOutsideDeactivates,Z)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Zf.isFocusable(ee,r.tabbableOptions)});return}jR(r.allowOutsideClick,Z)||Z.preventDefault()}},L=function(Z){var ee=LI(Z),me=s(ee)>=0;me||ee instanceof Document?me&&(u.mostRecentlyFocusedNode=ee):(Z.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},U=function(Z){var ee=LI(Z);R();var me=null;if(u.tabbableGroups.length>0){var We=s(ee),Qe=We>=0?u.containerGroups[We]:void 0;if(We<0)Z.shiftKey?me=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:me=u.tabbableGroups[0].firstTabbableNode;else if(Z.shiftKey){var dn=rW(u.tabbableGroups,function(Da){var ha=Da.firstTabbableNode;return ee===ha});if(dn<0&&(Qe.container===ee||Zf.isFocusable(ee,r.tabbableOptions)&&!Zf.isTabbable(ee,r.tabbableOptions)&&!Qe.nextTabbableNode(ee,!1))&&(dn=We),dn>=0){var qn=dn===0?u.tabbableGroups.length-1:dn-1,Mn=u.tabbableGroups[qn];me=Mn.lastTabbableNode}}else{var An=rW(u.tabbableGroups,function(Da){var ha=Da.lastTabbableNode;return ee===ha});if(An<0&&(Qe.container===ee||Zf.isFocusable(ee,r.tabbableOptions)&&!Zf.isTabbable(ee,r.tabbableOptions)&&!Qe.nextTabbableNode(ee))&&(An=We),An>=0){var Hn=An===u.tabbableGroups.length-1?0:An+1,Ia=u.tabbableGroups[Hn];me=Ia.firstTabbableNode}}}else me=d("fallbackFocus");me&&(Z.preventDefault(),E(me))},V=function(Z){if(rSe(Z)&&jR(r.escapeDeactivates,Z)!==!1){Z.preventDefault(),i.deactivate();return}if(oSe(Z)){U(Z);return}},Q=function(Z){var ee=LI(Z);s(ee)>=0||jR(r.clickOutsideDeactivates,Z)||jR(r.allowOutsideClick,Z)||(Z.preventDefault(),Z.stopImmediatePropagation())},te=function(){if(u.active)return aW.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?tW(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",I,{capture:!0,passive:!1}),t.addEventListener("touchstart",I,{capture:!0,passive:!1}),t.addEventListener("click",Q,{capture:!0,passive:!1}),t.addEventListener("keydown",V,{capture:!0,passive:!1}),i},le=function(){if(u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchstart",I,!0),t.removeEventListener("click",Q,!0),t.removeEventListener("keydown",V,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Z){if(u.active)return this;var ee=l(Z,"onActivate"),me=l(Z,"onPostActivate"),We=l(Z,"checkCanFocusTrap");We||R(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,ee&&ee();var Qe=function(){We&&R(),te(),me&&me()};return We?(We(u.containers.concat()).then(Qe,Qe),this):(Qe(),this)},deactivate:function(Z){if(!u.active)return this;var ee=nW({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Z);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,le(),u.active=!1,u.paused=!1,aW.deactivateTrap(i);var me=l(ee,"onDeactivate"),We=l(ee,"onPostDeactivate"),Qe=l(ee,"checkCanReturnFocus"),dn=l(ee,"returnFocus","returnFocusOnDeactivate");me&&me();var qn=function(){tW(function(){dn&&E(w(u.nodeFocusedBeforeActivation)),We&&We()})};return dn&&Qe?(Qe(w(u.nodeFocusedBeforeActivation)).then(qn,qn),this):(qn(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,le(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,R(),te(),this)},updateContainerElements:function(Z){var ee=[].concat(Z).filter(Boolean);return u.containers=ee.map(function(me){return typeof me=="string"?t.querySelector(me):me}),u.active&&R(),this}},i.updateContainerElements(n),i};IL.createFocusTrap=uSe});var lW=Ue((e2n,iW)=>{"use strict";function TL(e){"@babel/helpers - typeof";return TL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},TL(e)}function iSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function uW(e,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function NI(e){return NI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},NI(e)}function _Se(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var PI=(Ct(),ib(Eo)),Dt=j$(),pSe=oW(),mSe=pSe.createFocusTrap,dSe=EL(),hSe=dSe.isFocusable,CL=(function(e){cSe(a,e);var n=sSe(a);function a(t){var r;iSe(this,a),r=n.call(this,t),_Se(VR(r),"getNodeForOption",function(l){var s,d=(s=this.internalOptions[l])!==null&&s!==void 0?s:this.originalOptions[l];if(typeof d=="function"){for(var p=arguments.length,R=new Array(p>1?p-1:0),E=1;E element.");var i=function(d){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(d):u.ref&&(u.ref.current=d)),r.focusTrapElements=p||[d]},l=PI.cloneElement(u,{ref:i});return l}return null}}]),a})(PI.Component),zR=typeof Element>"u"?Function:Element;CL.propTypes={active:Dt.bool,paused:Dt.bool,focusTrapOptions:Dt.shape({document:Dt.object,onActivate:Dt.func,onPostActivate:Dt.func,checkCanFocusTrap:Dt.func,onDeactivate:Dt.func,onPostDeactivate:Dt.func,checkCanReturnFocus:Dt.func,initialFocus:Dt.oneOfType([Dt.instanceOf(zR),Dt.string,Dt.bool,Dt.func]),fallbackFocus:Dt.oneOfType([Dt.instanceOf(zR),Dt.string,Dt.func]),escapeDeactivates:Dt.oneOfType([Dt.bool,Dt.func]),clickOutsideDeactivates:Dt.oneOfType([Dt.bool,Dt.func]),returnFocusOnDeactivate:Dt.bool,setReturnFocus:Dt.oneOfType([Dt.instanceOf(zR),Dt.string,Dt.bool,Dt.func]),allowOutsideClick:Dt.oneOfType([Dt.bool,Dt.func]),preventScroll:Dt.bool,tabbableOptions:Dt.shape({displayCheck:Dt.oneOf(["full","non-zero-area","none"]),getShadowRoot:Dt.oneOfType([Dt.bool,Dt.func])})}),containerElements:Dt.arrayOf(Dt.instanceOf(zR)),children:Dt.oneOfType([Dt.element,Dt.instanceOf(zR)])};CL.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:mSe};iW.exports=CL});var Dx=Ue(Hr=>{"use strict";var Vu=typeof Symbol=="function"&&Symbol.for,s3=Vu?Symbol.for("react.element"):60103,v3=Vu?Symbol.for("react.portal"):60106,VI=Vu?Symbol.for("react.fragment"):60107,QI=Vu?Symbol.for("react.strict_mode"):60108,KI=Vu?Symbol.for("react.profiler"):60114,YI=Vu?Symbol.for("react.provider"):60109,XI=Vu?Symbol.for("react.context"):60110,f3=Vu?Symbol.for("react.async_mode"):60111,ZI=Vu?Symbol.for("react.concurrent_mode"):60111,eT=Vu?Symbol.for("react.forward_ref"):60112,nT=Vu?Symbol.for("react.suspense"):60113,_Ge=Vu?Symbol.for("react.suspense_list"):60120,aT=Vu?Symbol.for("react.memo"):60115,tT=Vu?Symbol.for("react.lazy"):60116,pGe=Vu?Symbol.for("react.block"):60121,mGe=Vu?Symbol.for("react.fundamental"):60117,dGe=Vu?Symbol.for("react.responder"):60118,hGe=Vu?Symbol.for("react.scope"):60119;function gc(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case s3:switch(e=e.type,e){case f3:case ZI:case VI:case KI:case QI:case nT:return e;default:switch(e=e&&e.$$typeof,e){case XI:case eT:case tT:case aT:case YI:return e;default:return n}}case v3:return n}}}function gx(e){return gc(e)===ZI}Hr.AsyncMode=f3;Hr.ConcurrentMode=ZI;Hr.ContextConsumer=XI;Hr.ContextProvider=YI;Hr.Element=s3;Hr.ForwardRef=eT;Hr.Fragment=VI;Hr.Lazy=tT;Hr.Memo=aT;Hr.Portal=v3;Hr.Profiler=KI;Hr.StrictMode=QI;Hr.Suspense=nT;Hr.isAsyncMode=function(e){return gx(e)||gc(e)===f3};Hr.isConcurrentMode=gx;Hr.isContextConsumer=function(e){return gc(e)===XI};Hr.isContextProvider=function(e){return gc(e)===YI};Hr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===s3};Hr.isForwardRef=function(e){return gc(e)===eT};Hr.isFragment=function(e){return gc(e)===VI};Hr.isLazy=function(e){return gc(e)===tT};Hr.isMemo=function(e){return gc(e)===aT};Hr.isPortal=function(e){return gc(e)===v3};Hr.isProfiler=function(e){return gc(e)===KI};Hr.isStrictMode=function(e){return gc(e)===QI};Hr.isSuspense=function(e){return gc(e)===nT};Hr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===VI||e===ZI||e===KI||e===QI||e===nT||e===_Ge||typeof e=="object"&&e!==null&&(e.$$typeof===tT||e.$$typeof===aT||e.$$typeof===YI||e.$$typeof===XI||e.$$typeof===eT||e.$$typeof===mGe||e.$$typeof===dGe||e.$$typeof===hGe||e.$$typeof===pGe)};Hr.typeOf=gc});var yx=Ue((Y4n,Rx)=>{"use strict";Rx.exports=Dx()});var wm=Ue((s8n,uT)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function tMe(){this.__data__=[],this.size=0}dj.exports=tMe});var L3=Ue((x7n,gj)=>{function rMe(e,n){return e===n||e!==e&&n!==n}gj.exports=rMe});var uy=Ue((j7n,Dj)=>{var oMe=L3();function uMe(e,n){for(var a=e.length;a--;)if(oMe(e[a][0],n))return a;return-1}Dj.exports=uMe});var yj=Ue((z7n,Rj)=>{var iMe=uy(),lMe=Array.prototype,cMe=lMe.splice;function sMe(e){var n=this.__data__,a=iMe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():cMe.call(n,a,1),--this.size,!0}Rj.exports=sMe});var bj=Ue((V7n,wj)=>{var vMe=uy();function fMe(e){var n=this.__data__,a=vMe(n,e);return a<0?void 0:n[a][1]}wj.exports=fMe});var Ij=Ue((Q7n,Ej)=>{var _Me=uy();function pMe(e){return _Me(this.__data__,e)>-1}Ej.exports=pMe});var Sj=Ue((K7n,Tj)=>{var mMe=uy();function dMe(e,n){var a=this.__data__,t=mMe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}Tj.exports=dMe});var iy=Ue((Y7n,Cj)=>{var hMe=hj(),gMe=yj(),DMe=bj(),RMe=Ij(),yMe=Sj();function Uh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var wMe=iy();function bMe(){this.__data__=new wMe,this.size=0}Fj.exports=bMe});var Aj=Ue((Z7n,Mj)=>{function EMe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}Mj.exports=EMe});var Pj=Ue((eOn,Lj)=>{function IMe(e){return this.__data__.get(e)}Lj.exports=IMe});var Oj=Ue((nOn,Nj)=>{function TMe(e){return this.__data__.has(e)}Nj.exports=TMe});var P3=Ue((aOn,Uj)=>{var SMe=typeof global=="object"&&global&&global.Object===Object&&global;Uj.exports=SMe});var jv=Ue((tOn,kj)=>{var CMe=P3(),FMe=typeof self=="object"&&self&&self.Object===Object&&self,GMe=CMe||FMe||Function("return this")();kj.exports=GMe});var ST=Ue((rOn,Bj)=>{var MMe=jv(),AMe=MMe.Symbol;Bj.exports=AMe});var $j=Ue((oOn,qj)=>{var Hj=ST(),Jj=Object.prototype,LMe=Jj.hasOwnProperty,PMe=Jj.toString,ly=Hj?Hj.toStringTag:void 0;function NMe(e){var n=LMe.call(e,ly),a=e[ly];try{e[ly]=void 0;var t=!0}catch{}var r=PMe.call(e);return t&&(n?e[ly]=a:delete e[ly]),r}qj.exports=NMe});var xj=Ue((uOn,Wj)=>{var OMe=Object.prototype,UMe=OMe.toString;function kMe(e){return UMe.call(e)}Wj.exports=kMe});var cy=Ue((iOn,Vj)=>{var jj=ST(),BMe=$j(),HMe=xj(),JMe="[object Null]",qMe="[object Undefined]",zj=jj?jj.toStringTag:void 0;function $Me(e){return e==null?e===void 0?qMe:JMe:zj&&zj in Object(e)?BMe(e):HMe(e)}Vj.exports=$Me});var N3=Ue((lOn,Qj)=>{function WMe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}Qj.exports=WMe});var O3=Ue((cOn,Kj)=>{var xMe=cy(),jMe=N3(),zMe="[object AsyncFunction]",VMe="[object Function]",QMe="[object GeneratorFunction]",KMe="[object Proxy]";function YMe(e){if(!jMe(e))return!1;var n=xMe(e);return n==VMe||n==QMe||n==zMe||n==KMe}Kj.exports=YMe});var Xj=Ue((sOn,Yj)=>{var XMe=jv(),ZMe=XMe["__core-js_shared__"];Yj.exports=ZMe});var nz=Ue((vOn,ez)=>{var U3=Xj(),Zj=(function(){var e=/[^.]+$/.exec(U3&&U3.keys&&U3.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function eAe(e){return!!Zj&&Zj in e}ez.exports=eAe});var k3=Ue((fOn,az)=>{var nAe=Function.prototype,aAe=nAe.toString;function tAe(e){if(e!=null){try{return aAe.call(e)}catch{}try{return e+""}catch{}}return""}az.exports=tAe});var rz=Ue((_On,tz)=>{var rAe=O3(),oAe=nz(),uAe=N3(),iAe=k3(),lAe=/[\\^$.*+?()[\]{}|]/g,cAe=/^\[object .+?Constructor\]$/,sAe=Function.prototype,vAe=Object.prototype,fAe=sAe.toString,_Ae=vAe.hasOwnProperty,pAe=RegExp("^"+fAe.call(_Ae).replace(lAe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mAe(e){if(!uAe(e)||oAe(e))return!1;var n=rAe(e)?pAe:cAe;return n.test(iAe(e))}tz.exports=mAe});var uz=Ue((pOn,oz)=>{function dAe(e,n){return e==null?void 0:e[n]}oz.exports=dAe});var Em=Ue((mOn,iz)=>{var hAe=rz(),gAe=uz();function DAe(e,n){var a=gAe(e,n);return hAe(a)?a:void 0}iz.exports=DAe});var CT=Ue((dOn,lz)=>{var RAe=Em(),yAe=jv(),wAe=RAe(yAe,"Map");lz.exports=wAe});var sy=Ue((hOn,cz)=>{var bAe=Em(),EAe=bAe(Object,"create");cz.exports=EAe});var fz=Ue((gOn,vz)=>{var sz=sy();function IAe(){this.__data__=sz?sz(null):{},this.size=0}vz.exports=IAe});var pz=Ue((DOn,_z)=>{function TAe(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}_z.exports=TAe});var dz=Ue((ROn,mz)=>{var SAe=sy(),CAe="__lodash_hash_undefined__",FAe=Object.prototype,GAe=FAe.hasOwnProperty;function MAe(e){var n=this.__data__;if(SAe){var a=n[e];return a===CAe?void 0:a}return GAe.call(n,e)?n[e]:void 0}mz.exports=MAe});var gz=Ue((yOn,hz)=>{var AAe=sy(),LAe=Object.prototype,PAe=LAe.hasOwnProperty;function NAe(e){var n=this.__data__;return AAe?n[e]!==void 0:PAe.call(n,e)}hz.exports=NAe});var Rz=Ue((wOn,Dz)=>{var OAe=sy(),UAe="__lodash_hash_undefined__";function kAe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=OAe&&n===void 0?UAe:n,this}Dz.exports=kAe});var wz=Ue((bOn,yz)=>{var BAe=fz(),HAe=pz(),JAe=dz(),qAe=gz(),$Ae=Rz();function kh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var bz=wz(),WAe=iy(),xAe=CT();function jAe(){this.size=0,this.__data__={hash:new bz,map:new(xAe||WAe),string:new bz}}Ez.exports=jAe});var Sz=Ue((IOn,Tz)=>{function zAe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}Tz.exports=zAe});var vy=Ue((TOn,Cz)=>{var VAe=Sz();function QAe(e,n){var a=e.__data__;return VAe(n)?a[typeof n=="string"?"string":"hash"]:a.map}Cz.exports=QAe});var Gz=Ue((SOn,Fz)=>{var KAe=vy();function YAe(e){var n=KAe(this,e).delete(e);return this.size-=n?1:0,n}Fz.exports=YAe});var Az=Ue((COn,Mz)=>{var XAe=vy();function ZAe(e){return XAe(this,e).get(e)}Mz.exports=ZAe});var Pz=Ue((FOn,Lz)=>{var e2e=vy();function n2e(e){return e2e(this,e).has(e)}Lz.exports=n2e});var Oz=Ue((GOn,Nz)=>{var a2e=vy();function t2e(e,n){var a=a2e(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}Nz.exports=t2e});var B3=Ue((MOn,Uz)=>{var r2e=Iz(),o2e=Gz(),u2e=Az(),i2e=Pz(),l2e=Oz();function Bh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var c2e=iy(),s2e=CT(),v2e=B3(),f2e=200;function _2e(e,n){var a=this.__data__;if(a instanceof c2e){var t=a.__data__;if(!s2e||t.length{var p2e=iy(),m2e=Gj(),d2e=Aj(),h2e=Pj(),g2e=Oj(),D2e=Bz();function Hh(e){var n=this.__data__=new p2e(e);this.size=n.size}Hh.prototype.clear=m2e;Hh.prototype.delete=d2e;Hh.prototype.get=h2e;Hh.prototype.has=g2e;Hh.prototype.set=D2e;Hz.exports=Hh});var $z=Ue((POn,qz)=>{var R2e="__lodash_hash_undefined__";function y2e(e){return this.__data__.set(e,R2e),this}qz.exports=y2e});var xz=Ue((NOn,Wz)=>{function w2e(e){return this.__data__.has(e)}Wz.exports=w2e});var zz=Ue((OOn,jz)=>{var b2e=B3(),E2e=$z(),I2e=xz();function FT(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new b2e;++n{function T2e(e,n){for(var a=-1,t=e==null?0:e.length;++a{function S2e(e,n){return e.has(n)}Kz.exports=S2e});var H3=Ue((BOn,Xz)=>{var C2e=zz(),F2e=Qz(),G2e=Yz(),M2e=1,A2e=2;function L2e(e,n,a,t,r,u){var i=a&M2e,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var d=u.get(e),p=u.get(n);if(d&&p)return d==n&&p==e;var R=-1,E=!0,w=a&A2e?new C2e:void 0;for(u.set(e,n),u.set(n,e);++R{var P2e=jv(),N2e=P2e.Uint8Array;Zz.exports=N2e});var aV=Ue((JOn,nV)=>{function O2e(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}nV.exports=O2e});var rV=Ue((qOn,tV)=>{function U2e(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}tV.exports=U2e});var cV=Ue(($On,lV)=>{var oV=ST(),uV=eV(),k2e=L3(),B2e=H3(),H2e=aV(),J2e=rV(),q2e=1,$2e=2,W2e="[object Boolean]",x2e="[object Date]",j2e="[object Error]",z2e="[object Map]",V2e="[object Number]",Q2e="[object RegExp]",K2e="[object Set]",Y2e="[object String]",X2e="[object Symbol]",Z2e="[object ArrayBuffer]",eLe="[object DataView]",iV=oV?oV.prototype:void 0,J3=iV?iV.valueOf:void 0;function nLe(e,n,a,t,r,u,i){switch(a){case eLe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Z2e:return!(e.byteLength!=n.byteLength||!u(new uV(e),new uV(n)));case W2e:case x2e:case V2e:return k2e(+e,+n);case j2e:return e.name==n.name&&e.message==n.message;case Q2e:case Y2e:return e==n+"";case z2e:var l=H2e;case K2e:var s=t&q2e;if(l||(l=J2e),e.size!=n.size&&!s)return!1;var d=i.get(e);if(d)return d==n;t|=$2e,i.set(e,n);var p=B2e(l(e),l(n),t,r,u,i);return i.delete(e),p;case X2e:if(J3)return J3.call(e)==J3.call(n)}return!1}lV.exports=nLe});var vV=Ue((WOn,sV)=>{function aLe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var tLe=Array.isArray;fV.exports=tLe});var pV=Ue((jOn,_V)=>{var rLe=vV(),oLe=GT();function uLe(e,n,a){var t=n(e);return oLe(e)?t:rLe(t,a(e))}_V.exports=uLe});var dV=Ue((zOn,mV)=>{function iLe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function lLe(){return[]}hV.exports=lLe});var yV=Ue((QOn,RV)=>{var cLe=dV(),sLe=gV(),vLe=Object.prototype,fLe=vLe.propertyIsEnumerable,DV=Object.getOwnPropertySymbols,_Le=DV?function(e){return e==null?[]:(e=Object(e),cLe(DV(e),function(n){return fLe.call(e,n)}))}:sLe;RV.exports=_Le});var bV=Ue((KOn,wV)=>{function pLe(e,n){for(var a=-1,t=Array(e);++a{function mLe(e){return e!=null&&typeof e=="object"}EV.exports=mLe});var TV=Ue((XOn,IV)=>{var dLe=cy(),hLe=fy(),gLe="[object Arguments]";function DLe(e){return hLe(e)&&dLe(e)==gLe}IV.exports=DLe});var MV=Ue((ZOn,GV)=>{var SV=TV(),RLe=fy(),FV=Object.prototype,yLe=FV.hasOwnProperty,wLe=FV.propertyIsEnumerable,bLe=SV((function(){return arguments})())?SV:function(e){return RLe(e)&&yLe.call(e,"callee")&&!wLe.call(e,"callee")};GV.exports=bLe});var LV=Ue((e6n,AV)=>{function ELe(){return!1}AV.exports=ELe});var q3=Ue((_y,Jh)=>{var ILe=jv(),TLe=LV(),OV=typeof _y=="object"&&_y&&!_y.nodeType&&_y,PV=OV&&typeof Jh=="object"&&Jh&&!Jh.nodeType&&Jh,SLe=PV&&PV.exports===OV,NV=SLe?ILe.Buffer:void 0,CLe=NV?NV.isBuffer:void 0,FLe=CLe||TLe;Jh.exports=FLe});var kV=Ue((n6n,UV)=>{var GLe=9007199254740991,MLe=/^(?:0|[1-9]\d*)$/;function ALe(e,n){var a=typeof e;return n=n==null?GLe:n,!!n&&(a=="number"||a!="symbol"&&MLe.test(e))&&e>-1&&e%1==0&&e{var LLe=9007199254740991;function PLe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LLe}BV.exports=PLe});var JV=Ue((t6n,HV)=>{var NLe=cy(),OLe=$3(),ULe=fy(),kLe="[object Arguments]",BLe="[object Array]",HLe="[object Boolean]",JLe="[object Date]",qLe="[object Error]",$Le="[object Function]",WLe="[object Map]",xLe="[object Number]",jLe="[object Object]",zLe="[object RegExp]",VLe="[object Set]",QLe="[object String]",KLe="[object WeakMap]",YLe="[object ArrayBuffer]",XLe="[object DataView]",ZLe="[object Float32Array]",e3e="[object Float64Array]",n3e="[object Int8Array]",a3e="[object Int16Array]",t3e="[object Int32Array]",r3e="[object Uint8Array]",o3e="[object Uint8ClampedArray]",u3e="[object Uint16Array]",i3e="[object Uint32Array]",po={};po[ZLe]=po[e3e]=po[n3e]=po[a3e]=po[t3e]=po[r3e]=po[o3e]=po[u3e]=po[i3e]=!0;po[kLe]=po[BLe]=po[YLe]=po[HLe]=po[XLe]=po[JLe]=po[qLe]=po[$Le]=po[WLe]=po[xLe]=po[jLe]=po[zLe]=po[VLe]=po[QLe]=po[KLe]=!1;function l3e(e){return ULe(e)&&OLe(e.length)&&!!po[NLe(e)]}HV.exports=l3e});var $V=Ue((r6n,qV)=>{function c3e(e){return function(n){return e(n)}}qV.exports=c3e});var xV=Ue((py,qh)=>{var s3e=P3(),WV=typeof py=="object"&&py&&!py.nodeType&&py,my=WV&&typeof qh=="object"&&qh&&!qh.nodeType&&qh,v3e=my&&my.exports===WV,W3=v3e&&s3e.process,f3e=(function(){try{var e=my&&my.require&&my.require("util").types;return e||W3&&W3.binding&&W3.binding("util")}catch{}})();qh.exports=f3e});var x3=Ue((o6n,VV)=>{var _3e=JV(),p3e=$V(),jV=xV(),zV=jV&&jV.isTypedArray,m3e=zV?p3e(zV):_3e;VV.exports=m3e});var KV=Ue((u6n,QV)=>{var d3e=bV(),h3e=MV(),g3e=GT(),D3e=q3(),R3e=kV(),y3e=x3(),w3e=Object.prototype,b3e=w3e.hasOwnProperty;function E3e(e,n){var a=g3e(e),t=!a&&h3e(e),r=!a&&!t&&D3e(e),u=!a&&!t&&!r&&y3e(e),i=a||t||r||u,l=i?d3e(e.length,String):[],s=l.length;for(var d in e)(n||b3e.call(e,d))&&!(i&&(d=="length"||r&&(d=="offset"||d=="parent")||u&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||R3e(d,s)))&&l.push(d);return l}QV.exports=E3e});var XV=Ue((i6n,YV)=>{var I3e=Object.prototype;function T3e(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||I3e;return e===a}YV.exports=T3e});var eQ=Ue((l6n,ZV)=>{function S3e(e,n){return function(a){return e(n(a))}}ZV.exports=S3e});var aQ=Ue((c6n,nQ)=>{var C3e=eQ(),F3e=C3e(Object.keys,Object);nQ.exports=F3e});var rQ=Ue((s6n,tQ)=>{var G3e=XV(),M3e=aQ(),A3e=Object.prototype,L3e=A3e.hasOwnProperty;function P3e(e){if(!G3e(e))return M3e(e);var n=[];for(var a in Object(e))L3e.call(e,a)&&a!="constructor"&&n.push(a);return n}tQ.exports=P3e});var uQ=Ue((v6n,oQ)=>{var N3e=O3(),O3e=$3();function U3e(e){return e!=null&&O3e(e.length)&&!N3e(e)}oQ.exports=U3e});var lQ=Ue((f6n,iQ)=>{var k3e=KV(),B3e=rQ(),H3e=uQ();function J3e(e){return H3e(e)?k3e(e):B3e(e)}iQ.exports=J3e});var sQ=Ue((_6n,cQ)=>{var q3e=pV(),$3e=yV(),W3e=lQ();function x3e(e){return q3e(e,W3e,$3e)}cQ.exports=x3e});var _Q=Ue((p6n,fQ)=>{var vQ=sQ(),j3e=1,z3e=Object.prototype,V3e=z3e.hasOwnProperty;function Q3e(e,n,a,t,r,u){var i=a&j3e,l=vQ(e),s=l.length,d=vQ(n),p=d.length;if(s!=p&&!i)return!1;for(var R=s;R--;){var E=l[R];if(!(i?E in n:V3e.call(n,E)))return!1}var w=u.get(e),I=u.get(n);if(w&&I)return w==n&&I==e;var L=!0;u.set(e,n),u.set(n,e);for(var U=i;++R{var K3e=Em(),Y3e=jv(),X3e=K3e(Y3e,"DataView");pQ.exports=X3e});var hQ=Ue((d6n,dQ)=>{var Z3e=Em(),ePe=jv(),nPe=Z3e(ePe,"Promise");dQ.exports=nPe});var DQ=Ue((h6n,gQ)=>{var aPe=Em(),tPe=jv(),rPe=aPe(tPe,"Set");gQ.exports=rPe});var yQ=Ue((g6n,RQ)=>{var oPe=Em(),uPe=jv(),iPe=oPe(uPe,"WeakMap");RQ.exports=iPe});var FQ=Ue((D6n,CQ)=>{var j3=mQ(),z3=CT(),V3=hQ(),Q3=DQ(),K3=yQ(),SQ=cy(),$h=k3(),wQ="[object Map]",lPe="[object Object]",bQ="[object Promise]",EQ="[object Set]",IQ="[object WeakMap]",TQ="[object DataView]",cPe=$h(j3),sPe=$h(z3),vPe=$h(V3),fPe=$h(Q3),_Pe=$h(K3),Im=SQ;(j3&&Im(new j3(new ArrayBuffer(1)))!=TQ||z3&&Im(new z3)!=wQ||V3&&Im(V3.resolve())!=bQ||Q3&&Im(new Q3)!=EQ||K3&&Im(new K3)!=IQ)&&(Im=function(e){var n=SQ(e),a=n==lPe?e.constructor:void 0,t=a?$h(a):"";if(t)switch(t){case cPe:return TQ;case sPe:return wQ;case vPe:return bQ;case fPe:return EQ;case _Pe:return IQ}return n});CQ.exports=Im});var UQ=Ue((R6n,OQ)=>{var Y3=Jz(),pPe=H3(),mPe=cV(),dPe=_Q(),GQ=FQ(),MQ=GT(),AQ=q3(),hPe=x3(),gPe=1,LQ="[object Arguments]",PQ="[object Array]",MT="[object Object]",DPe=Object.prototype,NQ=DPe.hasOwnProperty;function RPe(e,n,a,t,r,u){var i=MQ(e),l=MQ(n),s=i?PQ:GQ(e),d=l?PQ:GQ(n);s=s==LQ?MT:s,d=d==LQ?MT:d;var p=s==MT,R=d==MT,E=s==d;if(E&&AQ(e)){if(!AQ(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new Y3),i||hPe(e)?pPe(e,n,a,t,r,u):mPe(e,n,s,a,t,r,u);if(!(a&gPe)){var w=p&&NQ.call(e,"__wrapped__"),I=R&&NQ.call(n,"__wrapped__");if(w||I){var L=w?e.value():e,U=I?n.value():n;return u||(u=new Y3),r(L,U,a,t,u)}}return E?(u||(u=new Y3),dPe(e,n,a,t,r,u)):!1}OQ.exports=RPe});var JQ=Ue((y6n,HQ)=>{var yPe=UQ(),kQ=fy();function BQ(e,n,a,t,r){return e===n?!0:e==null||n==null||!kQ(e)&&!kQ(n)?e!==e&&n!==n:yPe(e,n,a,t,BQ,r)}HQ.exports=BQ});var $Q=Ue((w6n,qQ)=>{var wPe=JQ();function bPe(e,n){return wPe(e,n)}qQ.exports=bPe});var SK=Ue((S5n,YPe)=>{YPe.exports=`.rc-tooltip.rc-tooltip-zoom-appear, .rc-tooltip.rc-tooltip-zoom-enter { opacity: 0; } .rc-tooltip.rc-tooltip-zoom-enter, .rc-tooltip.rc-tooltip-zoom-leave { display: block; } .rc-tooltip-zoom-enter, .rc-tooltip-zoom-appear { opacity: 0; animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28); animation-play-state: paused; } .rc-tooltip-zoom-leave { animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05); animation-play-state: paused; } .rc-tooltip-zoom-enter.rc-tooltip-zoom-enter-active, .rc-tooltip-zoom-appear.rc-tooltip-zoom-appear-active { animation-name: rcToolTipZoomIn; animation-play-state: running; } .rc-tooltip-zoom-leave.rc-tooltip-zoom-leave-active { animation-name: rcToolTipZoomOut; animation-play-state: running; } @keyframes rcToolTipZoomIn { 0% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } 100% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } } @keyframes rcToolTipZoomOut { 0% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } 100% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } } .rc-tooltip { position: absolute; z-index: 1070; display: block; visibility: visible; line-height: 1.5; font-size: 12px; background-color: rgba(0, 0, 0, 0.05); padding: 1px; opacity: 0.9; } .rc-tooltip-hidden { display: none; } .rc-tooltip-inner { padding: 8px 10px; color: #333333; text-align: left; text-decoration: none; background-color: #ffffff; border-radius: 3px; min-height: 34px; border: 1px solid #b1b1b1; } .rc-tooltip-arrow, .rc-tooltip-arrow-inner { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .rc-tooltip-placement-top .rc-tooltip-arrow, .rc-tooltip-placement-topLeft .rc-tooltip-arrow, .rc-tooltip-placement-topRight .rc-tooltip-arrow { bottom: -5px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #b1b1b1; } .rc-tooltip-placement-top .rc-tooltip-arrow-inner, .rc-tooltip-placement-topLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-topRight .rc-tooltip-arrow-inner { bottom: 1px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #ffffff; } .rc-tooltip-placement-top .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-topLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-topRight .rc-tooltip-arrow { right: 15%; } .rc-tooltip-placement-right .rc-tooltip-arrow, .rc-tooltip-placement-rightTop .rc-tooltip-arrow, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { left: -5px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #b1b1b1; } .rc-tooltip-placement-right .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow-inner { left: 1px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #ffffff; } .rc-tooltip-placement-right .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-rightTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-left .rc-tooltip-arrow, .rc-tooltip-placement-leftTop .rc-tooltip-arrow, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { right: -5px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #b1b1b1; } .rc-tooltip-placement-left .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow-inner { right: 1px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #ffffff; } .rc-tooltip-placement-left .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-leftTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-bottom .rc-tooltip-arrow, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { top: -5px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #b1b1b1; } .rc-tooltip-placement-bottom .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow-inner { top: 1px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #ffffff; } .rc-tooltip-placement-bottom .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { right: 15%; } `});var Xne=Ue((ow,jN)=>{typeof window<"u"&&(function(n,a){typeof ow=="object"&&typeof jN=="object"?jN.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ow=="object"?ow.Hls=a():n.Hls=a()})(ow,function(){return(function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="/dist/",a(a.s="./src/hls.ts")})({"./node_modules/eventemitter3/index.js":(function(e,n,a){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(r=!1));function i(p,R,E){this.fn=p,this.context=R,this.once=E||!1}function l(p,R,E,w,I){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,w||p,I),U=r?r+R:R;return p._events[U]?p._events[U].fn?p._events[U]=[p._events[U],L]:p._events[U].push(L):(p._events[U]=L,p._eventsCount++),p}function s(p,R){--p._eventsCount===0?p._events=new u:delete p._events[R]}function d(){this._events=new u,this._eventsCount=0}d.prototype.eventNames=function(){var R=[],E,w;if(this._eventsCount===0)return R;for(w in E=this._events)t.call(E,w)&&R.push(r?w.slice(1):w);return Object.getOwnPropertySymbols?R.concat(Object.getOwnPropertySymbols(E)):R},d.prototype.listeners=function(R){var E=r?r+R:R,w=this._events[E];if(!w)return[];if(w.fn)return[w.fn];for(var I=0,L=w.length,U=new Array(L);I0},!1)}function p(R,E){for(var w={main:[E]},I={main:[]},L={main:{}};d(w);)for(var U=Object.keys(w),V=0;V>>8^Rt&255^99,te[Ia]=Rt,le[Rt]=Ia;var _t=Hn[Ia],Ha=Hn[_t],Sr=Hn[Ha],Xe=Hn[Rt]*257^Rt*16843008;Z[Ia]=Xe<<24|Xe>>>8,ee[Ia]=Xe<<16|Xe>>>16,me[Ia]=Xe<<8|Xe>>>24,We[Ia]=Xe,Xe=Sr*16843009^Ha*65537^_t*257^Ia*16843008,dn[Rt]=Xe<<24|Xe>>>8,qn[Rt]=Xe<<16|Xe>>>16,Mn[Rt]=Xe<<8|Xe>>>24,An[Rt]=Xe,Ia?(Ia=_t^Hn[Hn[Hn[Sr^_t]]],Da^=Hn[Hn[Da]]):Ia=Da=1}},V.expandKey=function(te){for(var le=this.uint8ArrayToUint32Array_(te),ne=!0,Z=0;Z>>6)+1,O=(X[k+2]&60)>>>2,O>Ae.length-1){W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+O});return}return K=(X[k+2]&1)<<2,K|=(X[k+3]&192)>>>6,l.logger.log("manifest codec:"+S+",ADTS data:type:"+P+",sampleingIndex:"+O+"["+Ae[O]+"Hz],channelConfig:"+K),/firefox/i.test(ce)?O>=6?(P=5,ve=new Array(4),j=O-3):(P=2,ve=new Array(2),j=O):ce.indexOf("android")!==-1?(P=2,ve=new Array(2),j=O):(P=5,ve=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&O>=6?j=O-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(O>=6&&K===1||/vivaldi/i.test(ce))||!S&&K===1)&&(P=2,ve=new Array(2)),j=O)),ve[0]=P<<3,ve[0]|=(O&14)>>1,ve[1]|=(O&1)<<7,ve[1]|=K<<3,P===5&&(ve[1]|=(j&14)>>1,ve[2]=(j&1)<<7,ve[2]|=8,ve[3]=0),{config:ve,samplerate:Ae[O],channelCount:K,codec:"mp4a.40."+P,manifestCodec:Te}}function p(W,X){return W[X]===255&&(W[X+1]&246)===240}function R(W,X){return W[X+1]&1?7:9}function E(W,X){return(W[X+3]&3)<<11|W[X+4]<<3|(W[X+5]&224)>>>5}function w(W,X){return!!(X+10&&X+O+j<=ve)return K=k+S*P,{headerLength:O,frameLength:j,stamp:K}}function Q(W,X,k,S,P){var O=U(W.samplerate),j=V(X,k,S,P,O);if(j){var K=j.stamp,ve=j.headerLength,ce=j.frameLength,Te={unit:X.subarray(k+ve,k+ve+ce),pts:K,dts:K};return W.samples.push(Te),{sample:Te,length:ce+ve}}}var te=a("./src/demux/id3.js"),le=(function(){function W(k,S,P){this.observer=k,this.config=P,this.remuxer=S}var X=W.prototype;return X.resetInitSegment=function(S,P,O,j){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:P,duration:j,inputTimeScale:9e4}},X.resetTimeStamp=function(){},W.probe=function(S){if(!S)return!1;for(var P=te.default.getID3Data(S,0)||[],O=P.length,j=S.length;Ok.length)){var j=this.parseHeader(k,S);if(j&&S+j.frameLength<=k.length){var K=j.samplesPerFrame*9e4/j.sampleRate,ve=P+O*K,ce={unit:k.subarray(S,S+j.frameLength),pts:ve,dts:ve};return X.config=[],X.channelCount=j.channelCount,X.samplerate=j.sampleRate,X.samples.push(ce),{sample:ce,length:j.frameLength}}}},parseHeader:function(X,k){var S=X[k+1]>>3&3,P=X[k+1]>>1&3,O=X[k+2]>>4&15,j=X[k+2]>>2&3,K=X[k+2]>>1&1;if(S!==1&&O!==0&&O!==15&&j!==3){var ve=S===3?3-P:P===3?3:4,ce=ee.BitratesMap[ve*14+O-1]*1e3,Te=S===3?0:S===2?1:2,Ae=ee.SamplingRateMap[Te*3+j],Ne=X[k+3]>>6===3?1:2,Be=ee.SamplesCoefficients[S][P],Rn=ee.BytesInSlot[P],Ln=Be*8*Rn,Ve=parseInt(Be*ce/Ae+K,10)*Rn;return{sampleRate:Ae,channelCount:Ne,frameLength:Ve,samplesPerFrame:Ln}}},isHeaderPattern:function(X,k){return X[k]===255&&(X[k+1]&224)===224&&(X[k+1]&6)!==0},isHeader:function(X,k){return!!(k+1S?(this.word<<=S,this.bitsAvailable-=S):(S-=this.bitsAvailable,P=S>>3,S-=P>>3,this.bytesAvailable-=P,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},X.readBits=function(S){var P=Math.min(this.bitsAvailable,S),O=this.word>>>32-P;return S>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=P,this.bitsAvailable>0?this.word<<=P:this.bytesAvailable>0&&this.loadWord(),P=S-P,P>0&&this.bitsAvailable?O<>>S)!==0)return this.word<<=S,this.bitsAvailable-=S,S;return this.loadWord(),S+this.skipLZ()},X.skipUEG=function(){this.skipBits(1+this.skipLZ())},X.skipEG=function(){this.skipBits(1+this.skipLZ())},X.readUEG=function(){var S=this.skipLZ();return this.readBits(S+1)-1},X.readEG=function(){var S=this.readUEG();return 1&S?1+S>>>1:-1*(S>>>1)},X.readBoolean=function(){return this.readBits(1)===1},X.readUByte=function(){return this.readBits(8)},X.readUShort=function(){return this.readBits(16)},X.readUInt=function(){return this.readBits(32)},X.skipScalingList=function(S){var P=8,O=8,j,K;for(j=0;j=S.length){O();return}if(!(S[P].unit.length<32)){var j=this.decrypter.isSync();if(this.decryptAacSample(S,P,O,j),!j)return}}},X.getAvcEncryptedData=function(S){for(var P=Math.floor((S.length-48)/160)*16+16,O=new Int8Array(P),j=0,K=32;K<=S.length-16;K+=160,j+=16)O.set(S.subarray(K,K+16),j);return O},X.getAvcDecryptedUnit=function(S,P){P=new Uint8Array(P);for(var O=0,j=32;j<=S.length-16;j+=160,O+=16)S.set(P.subarray(O,O+16),j);return S},X.decryptAvcSample=function(S,P,O,j,K,ve){var ce=this.discardEPB(K.data),Te=this.getAvcEncryptedData(ce),Ae=this;this.decryptBuffer(Te.buffer,function(Ne){K.data=Ae.getAvcDecryptedUnit(ce,Ne),ve||Ae.decryptAvcSamples(S,P,O+1,j)})},X.decryptAvcSamples=function(S,P,O,j){for(;;P++,O=0){if(P>=S.length){j();return}for(var K=S[P].units;!(O>=K.length);O++){var ve=K[O];if(!(ve.length<=48||ve.type!==1&&ve.type!==5)){var ce=this.decrypter.isSync();if(this.decryptAvcSample(S,P,O,j,ve,ce),!ce)return}}}},W})(),qn=dn,Mn={video:1,audio:2,id3:3,text:4},An=(function(){function W(k,S,P,O){this.observer=k,this.config=P,this.typeSupported=O,this.remuxer=S,this.sampleAes=null}var X=W.prototype;return X.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new qn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},W.probe=function(S){var P=W._syncOffset(S);return P<0?!1:(P&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+P+", junk ahead ?"),!0)},W._syncOffset=function(S){for(var P=Math.min(1e3,S.length-564),O=0;O>4,Ae>1){if(Ne=K+5+S[K+4],Ne===K+188)continue}else Ne=K+4;switch(Te){case $a:ce&&(rr&&(Be=mo(rr))&&qo(Be,!1),rr={data:[],size:0}),rr&&(rr.data.push(S.subarray(Ne,K+188)),rr.size+=K+188-Ne);break;case qt:ce&&(yt&&(Be=mo(yt))&&($n.isAAC?Nu(Be):Fo(Be)),yt={data:[],size:0}),yt&&(yt.data.push(S.subarray(Ne,K+188)),yt.size+=K+188-Ne);break;case Nr:ce&&(qr&&(Be=mo(qr))&&hi(Be),qr={data:[],size:0}),qr&&(qr.data.push(S.subarray(Ne,K+188)),qr.size+=K+188-Ne);break;case 0:ce&&(Ne+=S[Ne]+1),Xa=this._pmtId=Lt(S,Ne);break;case Xa:ce&&(Ne+=S[Ne]+1);var uo=gr(S,Ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);$a=uo.avc,$a>0&&(Ve.pid=$a),qt=uo.audio,qt>0&&($n.pid=qt,$n.isAAC=uo.isAAC),Nr=uo.id3,Nr>0&&(Ra.pid=Nr),Rn&&!Ln&&(l.logger.log("reparse from beginning"),Rn=!1,K=$o-188),Ln=this.pmtParsed=!0;break;case 17:case 8191:break;default:Rn=!0;break}}else this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});rr&&(Be=mo(rr))?(qo(Be,!0),Ve.pesData=null):Ve.pesData=rr,yt&&(Be=mo(yt))?($n.isAAC?Nu(Be):Fo(Be),$n.pesData=null):(yt&&yt.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),$n.pesData=yt),qr&&(Be=mo(qr))?(hi(Be),Ra.pesData=null):Ra.pesData=qr,this.sampleAes==null?this.remuxer.remux($n,Ve,Ra,this._txtTrack,P,O,j):this.decryptAndRemux($n,Ve,Ra,this._txtTrack,P,O,j)},X.decryptAndRemux=function(S,P,O,j,K,ve,ce){if(S.samples&&S.isAAC){var Te=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){Te.decryptAndRemuxAvc(S,P,O,j,K,ve,ce)})}else this.decryptAndRemuxAvc(S,P,O,j,K,ve,ce)},X.decryptAndRemuxAvc=function(S,P,O,j,K,ve,ce){if(P.samples){var Te=this;this.sampleAes.decryptAvcSamples(P.samples,0,0,function(){Te.remuxer.remux(S,P,O,j,K,ve,ce)})}else this.remuxer.remux(S,P,O,j,K,ve,ce)},X.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},X._parsePAT=function(S,P){return(S[P+10]&31)<<8|S[P+11]},X._parsePMT=function(S,P,O,j){var K,ve,ce,Te,Ae={audio:-1,avc:-1,id3:-1,isAAC:!0};for(K=(S[P+1]&15)<<8|S[P+2],ve=P+3+K-4,ce=(S[P+10]&15)<<8|S[P+11],P+=12+ce;P1;){var Ln=new Uint8Array(Rn[0].length+Rn[1].length);Ln.set(Rn[0]),Ln.set(Rn[1],Rn[0].length),Rn[0]=Ln,Rn.splice(1,1)}if(O=Rn[0],K=(O[0]<<16)+(O[1]<<8)+O[2],K===1){if(ve=(O[4]<<8)+O[5],ve&&ve>S.size-6||(j=O[7],j&192&&(Ae=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,Ae>4294967295&&(Ae-=8589934592),j&64?(Ne=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[18]&254)/2,Ne>4294967295&&(Ne-=8589934592),Ae-Ne>60*9e4&&(l.logger.warn(Math.round((Ae-Ne)/9e4)+"s delta between PTS and DTS, align them"),Ae=Ne)):Ne=Ae),ce=O[8],Be=ce+9,S.size<=Be))return null;S.size-=Be,Te=new Uint8Array(S.size);for(var Ve=0,$n=Rn.length;Ve<$n;Ve++){O=Rn[Ve];var Ra=O.byteLength;if(Be)if(Be>Ra){Be-=Ra;continue}else O=O.subarray(Be),Ra-=Be,Be=0;Te.set(O,P),P+=Ra}return ve&&(ve-=ce+3),{data:Te,pts:Ae,dts:Ne,len:ve}}else return null},X.pushAccesUnit=function(S,P){if(S.units.length&&S.frame){var O=P.samples,j=O.length;if(isNaN(S.pts))if(j){var K=O[j-1];S.pts=K.pts,S.dts=K.dts}else{P.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||P.sps&&(j||this.contiguous)?(S.id=j,O.push(S)):P.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},X._parseAVCPES=function(S,P){var O=this,j=this._avcTrack,K=this._parseAVCNALu(S.data),ve=!1,ce,Te=this.avcSample,Ae,Ne=!1,Be,Rn=this.pushAccesUnit.bind(this),Ln=function($n,Ra,$a,qt){return{key:$n,pts:Ra,dts:$a,units:[],debug:qt}};S.data=null,Te&&K.length&&!j.audFound&&(Rn(Te,j),Te=this.avcSample=Ln(!1,S.pts,S.dts,"")),K.forEach(function(Ve){switch(Ve.type){case 1:Ae=!0,Te||(Te=O.avcSample=Ln(!0,S.pts,S.dts,"")),ve&&(Te.debug+="NDR "),Te.frame=!0;var $n=Ve.data;if(Ne&&$n.length>4){var Ra=new Qe($n).readSliceType();(Ra===2||Ra===4||Ra===7||Ra===9)&&(Te.key=!0)}break;case 5:Ae=!0,Te||(Te=O.avcSample=Ln(!0,S.pts,S.dts,"")),ve&&(Te.debug+="IDR "),Te.key=!0,Te.frame=!0;break;case 6:Ae=!0,ve&&Te&&(Te.debug+="SEI "),ce=new Qe(O.discardEPB(Ve.data)),ce.readUByte();for(var $a=0,qt=0,Nr=!1,Xa=0;!Nr&&ce.bytesAvailable>1;){$a=0;do Xa=ce.readUByte(),$a+=Xa;while(Xa===255);qt=0;do Xa=ce.readUByte(),qt+=Xa;while(Xa===255);if($a===4&&ce.bytesAvailable!==0){Nr=!0;var rr=ce.readUByte();if(rr===181){var yt=ce.readUShort();if(yt===49){var qr=ce.readUInt();if(qr===1195456820){var Lt=ce.readUByte();if(Lt===3){var gr=ce.readUByte(),mo=ce.readUByte(),qo=31&gr,Nu=[gr,mo];for(Be=0;Be16){var Fo=[];for(Be=0;Be<16;Be++)Fo.push(ce.readUByte().toString(16)),(Be===3||Be===5||Be===7||Be===9)&&Fo.push("-");var hi=qt-16,$o=new Uint8Array(hi);for(Be=0;Be0){if(P.pts>=S[O-1].pts)S.push(P);else for(var j=O-1;j>=0;j--)if(P.pts=0)Ne={data:S.subarray(Rn,P-ce-1),type:Ln},Ae.push(Ne);else{var Ve=this._getLastNalUnit();if(Ve&&(Te&&P<=4-Te&&Ve.state&&(Ve.data=Ve.data.subarray(0,Ve.data.byteLength-Te)),K=P-ce-1,K>0)){var $n=new Uint8Array(Ve.data.byteLength+K);$n.set(Ve.data,0),$n.set(S.subarray(0,K),Ve.data.byteLength),Ve.data=$n}}P=0&&ce>=0&&(Ne={data:S.subarray(Rn,O),type:Ln,state:ce},Ae.push(Ne)),Ae.length===0){var Ra=this._getLastNalUnit();if(Ra){var $a=new Uint8Array(Ra.data.byteLength+S.byteLength);$a.set(Ra.data,0),$a.set(S,Ra.data.byteLength),Ra.data=$a}}return ve.naluState=ce,Ae},X.discardEPB=function(S){for(var P=S.byteLength,O=[],j=1,K,ve;j1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Ra-j)/90)),j=Ra)}for(;Ne>24&255,K[1]=P>>16&255,K[2]=P>>8&255,K[3]=P&255,K.set(k,4),O=0,P=8;O>24&255,k>>16&255,k>>8&255,k&255,P>>24,P>>16&255,P>>8&255,P&255,O>>24,O>>16&255,O>>8&255,O&255,85,196,0,0]))},W.mdia=function(k){return W.box(W.types.mdia,W.mdhd(k.timescale,k.duration),W.hdlr(k.type),W.minf(k))},W.mfhd=function(k){return W.box(W.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},W.minf=function(k){return k.type==="audio"?W.box(W.types.minf,W.box(W.types.smhd,W.SMHD),W.DINF,W.stbl(k)):W.box(W.types.minf,W.box(W.types.vmhd,W.VMHD),W.DINF,W.stbl(k))},W.moof=function(k,S,P){return W.box(W.types.moof,W.mfhd(k),W.traf(P,S))},W.moov=function(k){for(var S=k.length,P=[];S--;)P[S]=W.trak(k[S]);return W.box.apply(null,[W.types.moov,W.mvhd(k[0].timescale,k[0].duration)].concat(P).concat(W.mvex(k)))},W.mvex=function(k){for(var S=k.length,P=[];S--;)P[S]=W.trex(k[S]);return W.box.apply(null,[W.types.mvex].concat(P))},W.mvhd=function(k,S){S*=k;var P=Math.floor(S/(_t+1)),O=Math.floor(S%(_t+1)),j=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,P>>24,P>>16&255,P>>8&255,P&255,O>>24,O>>16&255,O>>8&255,O&255,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 W.box(W.types.mvhd,j)},W.sdtp=function(k){var S=k.samples||[],P=new Uint8Array(4+S.length),O,j;for(j=0;j>>8&255),S.push(K&255),S=S.concat(Array.prototype.slice.call(j));for(O=0;O>>8&255),P.push(K&255),P=P.concat(Array.prototype.slice.call(j));var ve=W.box(W.types.avcC,new Uint8Array([1,S[3],S[4],S[5],255,224|k.sps.length].concat(S).concat([k.pps.length]).concat(P))),ce=k.width,Te=k.height,Ae=k.pixelRatio[0],Ne=k.pixelRatio[1];return W.box(W.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,ce>>8&255,ce&255,Te>>8&255,Te&255,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]),ve,W.box(W.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),W.box(W.types.pasp,new Uint8Array([Ae>>24,Ae>>16&255,Ae>>8&255,Ae&255,Ne>>24,Ne>>16&255,Ne>>8&255,Ne&255])))},W.esds=function(k){var S=k.config.length;return new Uint8Array([0,0,0,0,3,23+S,0,1,0,4,15+S,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([S]).concat(k.config).concat([6,1,2]))},W.mp4a=function(k){var S=k.samplerate;return W.box(W.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]),W.box(W.types.esds,W.esds(k)))},W.mp3=function(k){var S=k.samplerate;return W.box(W.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]))},W.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?W.box(W.types.stsd,W.STSD,W.mp3(k)):W.box(W.types.stsd,W.STSD,W.mp4a(k)):W.box(W.types.stsd,W.STSD,W.avc1(k))},W.tkhd=function(k){var S=k.id,P=k.duration*k.timescale,O=k.width,j=k.height,K=Math.floor(P/(_t+1)),ve=Math.floor(P%(_t+1));return W.box(W.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,S>>24&255,S>>16&255,S>>8&255,S&255,0,0,0,0,K>>24,K>>16&255,K>>8&255,K&255,ve>>24,ve>>16&255,ve>>8&255,ve&255,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,O>>8&255,O&255,0,0,j>>8&255,j&255,0,0]))},W.traf=function(k,S){var P=W.sdtp(k),O=k.id,j=Math.floor(S/(_t+1)),K=Math.floor(S%(_t+1));return W.box(W.types.traf,W.box(W.types.tfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255])),W.box(W.types.tfdt,new Uint8Array([1,0,0,0,j>>24,j>>16&255,j>>8&255,j&255,K>>24,K>>16&255,K>>8&255,K&255])),W.trun(k,P.length+16+20+8+16+8+8),P)},W.trak=function(k){return k.duration=k.duration||4294967295,W.box(W.types.trak,W.tkhd(k),W.mdia(k))},W.trex=function(k){var S=k.id;return W.box(W.types.trex,new Uint8Array([0,0,0,0,S>>24,S>>16&255,S>>8&255,S&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},W.trun=function(k,S){var P=k.samples||[],O=P.length,j=12+16*O,K=new Uint8Array(j),ve,ce,Te,Ae,Ne,Be;for(S+=8+j,K.set([0,0,15,1,O>>>24&255,O>>>16&255,O>>>8&255,O&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255],0),ve=0;ve>>24&255,Te>>>16&255,Te>>>8&255,Te&255,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255,Ne.isLeading<<2|Ne.dependsOn,Ne.isDependedOn<<6|Ne.hasRedundancy<<4|Ne.paddingValue<<1|Ne.isNonSync,Ne.degradPrio&61440,Ne.degradPrio&15,Be>>>24&255,Be>>>16&255,Be>>>8&255,Be&255],12+16*ve);return W.box(W.types.trun,K)},W.initSegment=function(k){W.types||W.init();var S=W.moov(k),P;return P=new Uint8Array(W.FTYP.byteLength+S.byteLength),P.set(W.FTYP),P.set(S,W.FTYP.byteLength),P},W})(),Sr=Ha,Xe=9e4;function Wa(W,X,k,S){return k===void 0&&(k=1),S===void 0&&(S=!1),At(W,X,1/k)}function At(W,X,k,S){k===void 0&&(k=1),S===void 0&&(S=!1);var P=W*X*k;return S?Math.round(P):P}function zn(W,X){return X===void 0&&(X=!1),At(W,1e3,1/Xe,X)}function Un(W,X){return X===void 0&&(X=1),At(W,Xe,1/X)}var Ze=Un(10),Ma=Un(.2),Ja=(function(){function W(k,S,P,O){this.observer=k,this.config=S,this.typeSupported=P;var j=navigator.userAgent;this.isSafari=O&&O.indexOf("Apple")>-1&&j&&!j.match("CriOS"),this.ISGenerated=!1}var X=W.prototype;return X.destroy=function(){},X.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},X.resetInitSegment=function(){this.ISGenerated=!1},X.remux=function(S,P,O,j,K,ve,ce){if(this.ISGenerated||this.generateIS(S,P,K),this.ISGenerated){var Te=S.samples.length,Ae=P.samples.length,Ne=K,Be=K;if(Te&&Ae){var Rn=(S.samples[0].pts-P.samples[0].pts)/P.inputTimeScale;Ne+=Math.max(0,Rn),Be+=Math.max(0,-Rn)}if(Te){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,P,K));var Ln=this.remuxAudio(S,Ne,ve,ce);if(Ae){var Ve;Ln&&(Ve=Ln.endPTS-Ln.startPTS),P.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,P,K)),this.remuxVideo(P,Be,ve,Ve,ce)}}else if(Ae){var $n=this.remuxVideo(P,Be,ve,0,ce);$n&&S.codec&&this.remuxEmptyAudio(S,Ne,ve,$n)}}O.samples.length&&this.remuxID3(O,K),j.samples.length&&this.remuxText(j,K),this.observer.trigger(t.default.FRAG_PARSED)},X.generateIS=function(S,P,O){var j=this.observer,K=S.samples,ve=P.samples,ce=this.typeSupported,Te="audio/mp4",Ae={},Ne={tracks:Ae},Be=this._initPTS===void 0,Rn,Ln;if(Be&&(Rn=Ln=1/0),S.config&&K.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ce.mpeg?(Te="audio/mpeg",S.codec=""):ce.mp3&&(S.codec="mp3")),Ae.audio={container:Te,codec:S.codec,initSegment:!S.isAAC&&ce.mpeg?new Uint8Array:Sr.initSegment([S]),metadata:{channelCount:S.channelCount}},Be&&(Rn=Ln=K[0].pts-S.inputTimeScale*O)),P.sps&&P.pps&&ve.length){var Ve=P.inputTimeScale;P.timescale=Ve,Ae.video={container:"video/mp4",codec:P.codec,initSegment:Sr.initSegment([P]),metadata:{width:P.width,height:P.height}},Be&&(Rn=Math.min(Rn,ve[0].pts-Ve*O),Ln=Math.min(Ln,ve[0].dts-Ve*O),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:Rn}))}Object.keys(Ae).length?(j.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Ne),this.ISGenerated=!0,Be&&(this._initPTS=Rn,this._initDTS=Ln)):j.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},X.remuxVideo=function(S,P,O,j,K){var ve=8,ce,Te,Ae,Ne,Be,Rn,Ln,Ve=S.timescale,$n=S.samples,Ra=[],$a=$n.length,qt=this._PTSNormalize,Nr=this._initPTS,Xa=this.nextAvcDts,rr=this.isSafari;if($a!==0){rr&&(O|=$n.length&&Xa&&(K&&Math.abs(P-Xa/Ve)<.1||Math.abs($n[0].pts-Xa-Nr)1?l.logger.log("AVC: "+zn(gr,!0)+" ms hole between fragments detected,filling it"):gr<-1&&l.logger.log("AVC: "+zn(-gr,!0)+" ms overlapping between fragments detected"),Be=Xa,$n[0].dts=Be,Ne=Math.max(Ne-gr,Xa),$n[0].pts=Ne,l.logger.log("Video: PTS/DTS adjusted: "+zn(Ne,!0)+"/"+zn(Be,!0)+", delta: "+zn(gr,!0)+" ms")),Lt=$n[$n.length-1],Ln=Math.max(Lt.dts,0),Rn=Math.max(Lt.pts,0,Ln),rr&&(ce=Math.round((Ln-Be)/($n.length-1)));for(var mo=0,qo=0,Nu=0;Nu<$a;Nu++){for(var Fo=$n[Nu],hi=Fo.units,$o=hi.length,uo=0,tu=0;tu<$o;tu++)uo+=hi[tu].data.length;qo+=uo,mo+=$o,Fo.length=uo,rr?Fo.dts=Be+Nu*ce:Fo.dts=Math.max(Fo.dts,Be),Fo.pts=Math.max(Fo.pts,Fo.dts)}var Oi=qo+4*mo+8;try{Te=new Uint8Array(Oi)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Oi,reason:"fail allocating video mdat "+Oi});return}var Ui=new DataView(Te.buffer);Ui.setUint32(0,Oi),Te.set(Sr.types.mdat,4);for(var Xu=0;Xu<$a;Xu++){for(var ru=$n[Xu],fl=ru.units,xl=0,Tc=void 0,Xs=0,af=fl.length;Xs0?Xu-1:Xu].dts;if(tf.stretchShortVideoTrack){var Sc=tf.maxBufferHole,Ig=Math.floor(Sc*Ve),j0=(j?Ne+j*Ve:this.nextAudioPts)-ru.pts;j0>Ig?(ce=j0-Ds,ce<0&&(ce=Ds),l.logger.log("It is approximately "+zn(j0,!1)+" ms to the next segment; using duration "+zn(ce,!1)+" ms for the last video frame.")):ce=Ds}else ce=Ds}Tc=Math.round(ru.pts-ru.dts)}Ra.push({size:xl,duration:ce,cts:Tc,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:ru.key?2:1,isNonSync:ru.key?0:1}})}this.nextAvcDts=Ln+ce;var Vm=S.dropped;if(S.nbNalu=0,S.dropped=0,Ra.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var Qm=Ra[0].flags;Qm.dependsOn=2,Qm.isNonSync=0}S.samples=Ra,Ae=Sr.moof(S.sequenceNumber++,Be,S),S.samples=[];var Cc={data1:Ae,data2:Te,startPTS:Ne/Ve,endPTS:(Rn+ce)/Ve,startDTS:Be/Ve,endDTS:this.nextAvcDts/Ve,type:"video",hasAudio:!1,hasVideo:!0,nb:Ra.length,dropped:Vm};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Cc),Cc}},X.remuxAudio=function(S,P,O,j){var K=S.inputTimeScale,ve=S.timescale,ce=K/ve,Te=S.isAAC?1024:1152,Ae=Te*ce,Ne=this._PTSNormalize,Be=this._initPTS,Rn=!S.isAAC&&this.typeSupported.mpeg,Ln,Ve,$n,Ra,$a,qt,Nr=Rn?0:8,Xa=S.samples,rr=[],yt=this.nextAudioPts;if(O|=Xa.length&&yt&&(j&&Math.abs(P-yt/K)<.1||Math.abs(Xa[0].pts-yt-Be)<20*Ae),Xa.forEach(function(Sc){Sc.pts=Sc.dts=Ne(Sc.pts-Be,P*K)}),Xa=Xa.filter(function(Sc){return Sc.pts>=0}),Xa.length!==0){if(O||(j?yt=P*K:yt=Xa[0].pts),S.isAAC)for(var qr=this.config.maxAudioFramesDrift,Lt=0,gr=yt;Lt=qr*Ae&&qo.1*Ae,mo.pts=mo.dts=gr,gr+=Ae,Lt++}for(var uo=Xa.length,tu=0;uo--;)tu+=Xa[uo].unit.byteLength;for(var Oi=0,Ui=Xa.length;Oi0&&xl0&&(Ve=Rt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),Ve||(Ve=ru.subarray()),tu+=Tc*Ve.length);else if(xl<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+zn(yt,!0)+" ms / "+zn(fl,!0)+" ms / "+zn(-xl,!0)+" ms"),tu-=ru.byteLength;continue}fl=yt}if($a=fl,tu>0){tu+=Nr;try{$n=new Uint8Array(tu)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:tu,reason:"fail allocating audio mdat "+tu});return}if(!Rn){var Xs=new DataView($n.buffer);Xs.setUint32(0,tu),$n.set(Sr.types.mdat,4)}}else return;for(var af=0;af=2&&(hs=rr[uo-2].duration,Ln.duration=hs),uo){this.nextAudioPts=yt=qt+ce*hs,S.samples=rr,Rn?Ra=new Uint8Array:Ra=Sr.moof(S.sequenceNumber++,$a/ce,S),S.samples=[];var gs=$a/K,tf=yt/K,Ds={data1:Ra,data2:$n,startPTS:gs,endPTS:tf,startDTS:gs,endDTS:tf,type:"audio",hasAudio:!0,hasVideo:!1,nb:uo};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Ds),Ds}return null}},X.remuxEmptyAudio=function(S,P,O,j){var K=S.inputTimeScale,ve=S.samplerate?S.samplerate:K,ce=K/ve,Te=this.nextAudioPts,Ae=(Te!==void 0?Te:j.startDTS*K)+this._initDTS,Ne=j.endDTS*K+this._initDTS,Be=1024,Rn=ce*Be,Ln=Math.ceil((Ne-Ae)/Rn),Ve=Rt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!Ve){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var $n=[],Ra=0;Ra4294967296;)S+=O;return S},W})(),pt=Ja,tr=(function(){function W(k){this.observer=k}var X=W.prototype;return X.destroy=function(){},X.resetTimeStamp=function(){},X.resetInitSegment=function(){},X.remux=function(S,P,O,j,K,ve,ce,Te){var Ae=this.observer,Ne="";S&&(Ne+="audio"),P&&(Ne+="video"),Ae.trigger(t.default.FRAG_PARSING_DATA,{data1:Te,startPTS:K,startDTS:K,type:Ne,hasAudio:!!S,hasVideo:!!P,nb:1,dropped:0}),Ae.trigger(t.default.FRAG_PARSED)},W})(),In=tr,Oa=Object(s.getSelfScope)(),hr;try{hr=Oa.performance.now.bind(Oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),hr=Oa.Date.now}var za=(function(){function W(k,S,P,O){this.observer=k,this.typeSupported=S,this.config=P,this.vendor=O}var X=W.prototype;return X.destroy=function(){var S=this.demuxer;S&&S.destroy()},X.push=function(S,P,O,j,K,ve,ce,Te,Ae,Ne,Be,Rn){var Ln=this;if(S.byteLength>0&&P!=null&&P.key!=null&&P.method==="AES-128"){var Ve=this.decrypter;Ve==null&&(Ve=this.decrypter=new u.default(this.observer,this.config));var $n=hr();Ve.decrypt(S,P.key.buffer,P.iv.buffer,function(Ra){var $a=hr();Ln.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:$n,tdecrypt:$a}}),Ln.pushDecrypted(new Uint8Array(Ra),P,new Uint8Array(O),j,K,ve,ce,Te,Ae,Ne,Be,Rn)})}else this.pushDecrypted(new Uint8Array(S),P,new Uint8Array(O),j,K,ve,ce,Te,Ae,Ne,Be,Rn)},X.pushDecrypted=function(S,P,O,j,K,ve,ce,Te,Ae,Ne,Be,Rn){var Ln=this.demuxer;if(!Ln||(ce||Te)&&!this.probe(S)){for(var Ve=this.observer,$n=this.typeSupported,Ra=this.config,$a=[{demux:Hn,remux:pt},{demux:Z.default,remux:In},{demux:ne,remux:pt},{demux:Da,remux:pt}],qt=0,Nr=$a.length;qt1?L-1:0),V=1;V1?L-1:0),V=1;V0)return p.subarray(E,E+w)},s._readSize=function(p,R){var E=0;return E=(p[R]&127)<<21,E|=(p[R+1]&127)<<14,E|=(p[R+2]&127)<<7,E|=p[R+3]&127,E},s.getTimeStamp=function(p){for(var R=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:te+=String.fromCharCode(U);break;case 12:case 13:V=p[le++],te+=String.fromCharCode((U&31)<<6|V&63);break;case 14:V=p[le++],Q=p[le++],te+=String.fromCharCode((U&15)<<12|(V&63)<<6|(Q&63)<<0);break;default:}}return te},s})(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder<"u"&&(u=new s.TextDecoder("utf-8")),u}var l=r._utf8ArrayToStr;n.default=r}),"./src/demux/mp4demuxer.js":(function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),r=a("./src/events.js"),u=Math.pow(2,32)-1,i=(function(){function l(d,p){this.observer=d,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,R,E,w){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);R==null&&(R="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:R+","+E,initSegment:w?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:R,initSegment:w?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:w?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else R&&(this.audioCodec=R),E&&(this.videoCodec=E)},l.probe=function(p){return l.findBox({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},l.bin2str=function(p){return String.fromCharCode.apply(null,p)},l.readUint16=function(p,R){p.data&&(R+=p.start,p=p.data);var E=p[R]<<8|p[R+1];return E<0?65536+E:E},l.readUint32=function(p,R){p.data&&(R+=p.start,p=p.data);var E=p[R]<<24|p[R+1]<<16|p[R+2]<<8|p[R+3];return E<0?4294967296+E:E},l.writeUint32=function(p,R,E){p.data&&(R+=p.start,p=p.data),p[R]=E>>24,p[R+1]=E>>16&255,p[R+2]=E>>8&255,p[R+3]=E&255},l.findBox=function(p,R){var E=[],w,I,L,U,V,Q,te;if(p.data?(Q=p.start,U=p.end,p=p.data):(Q=0,U=p.byteLength),!R.length)return null;for(w=Q;w1?w+I:U,L===R[0]&&(R.length===1?E.push({data:p,start:w+8,end:te}):(V=l.findBox({data:p,start:w+8,end:te},R.slice(1)),V.length&&(E=E.concat(V)))),w=te;return E},l.parseSegmentIndex=function(p){var R=l.findBox(p,["moov"])[0],E=R?R.end:null,w=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var U=I.data[0];w=U===0?8:16;var V=l.readUint32(I,w);w+=4;var Q=0,te=0;U===0?w+=8:w+=16,w+=2;var le=I.end+te,ne=l.readUint16(I,w);w+=2;for(var Z=0;Z>>31;if(Qe===1){console.warn("SIDX has hierarchical references (not supported)");return}var dn=l.readUint32(I,ee);ee+=4,L.push({referenceSize:We,subsegmentDuration:dn,info:{duration:dn/V,start:le,end:le+We-1}}),le+=We,ee+=4,w=ee}return{earliestPresentationTime:Q,timescale:V,version:U,referencesCount:ne,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var R=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(w){var I=l.findBox(w,["tkhd"])[0];if(I){var L=I.data[I.start],U=L===0?12:20,V=l.readUint32(I,U),Q=l.findBox(w,["mdia","mdhd"])[0];if(Q){L=Q.data[Q.start],U=L===0?12:20;var te=l.readUint32(Q,U),le=l.findBox(w,["mdia","hdlr"])[0];if(le){var ne=l.bin2str(le.data.subarray(le.start+8,le.start+12)),Z={soun:"audio",vide:"video"}[ne];if(Z){var ee=l.findBox(w,["mdia","minf","stbl","stsd"]);if(ee.length){ee=ee[0];var me=l.bin2str(ee.data.subarray(ee.start+12,ee.start+16));t.logger.log("MP4Demuxer:"+Z+":"+me+" found")}R[V]={timescale:te,type:Z},R[Z]={timescale:te,id:V}}}}}}),R},l.getStartDTS=function(p,R){var E,w,I;return E=l.findBox(R,["moof","traf"]),w=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(U){var V,Q,te;return V=l.readUint32(U,4),Q=p[V].timescale||9e4,te=l.findBox(L,["tfdt"]).map(function(le){var ne,Z;return ne=le.data[le.start],Z=l.readUint32(le,4),ne===1&&(Z*=Math.pow(2,32),Z+=l.readUint32(le,8)),Z})[0],te/Q})})),I=Math.min.apply(null,w),isFinite(I)?I:0},l.offsetStartDTS=function(p,R,E){l.findBox(R,["moof","traf"]).map(function(w){return l.findBox(w,["tfhd"]).map(function(I){var L=l.readUint32(I,4),U=p[L].timescale||9e4;l.findBox(w,["tfdt"]).map(function(V){var Q=V.data[V.start],te=l.readUint32(V,4);if(Q===0)l.writeUint32(V,4,te-E*U);else{te*=Math.pow(2,32),te+=l.readUint32(V,8),te-=E*U,te=Math.max(te,0);var le=Math.floor(te/(u+1)),ne=Math.floor(te%(u+1));l.writeUint32(V,4,le),l.writeUint32(V,8,ne)}})})})},s.append=function(p,R,E,w){var I=this.initData;I||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),I=this.initData);var L,U=this.initPTS;if(U===void 0){var V=l.getStartDTS(I,p);this.initPTS=U=V-R,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:U})}l.offsetStartDTS(I,p,U),L=l.getStartDTS(I,p),this.remuxer.remux(I.audio,I.video,null,null,L,E,w,p)},s.destroy=function(){},l})();n.default=i}),"./src/errors.ts":(function(e,n,a){"use strict";a.r(n),a.d(n,"ErrorTypes",function(){return t}),a.d(n,"ErrorDetails",function(){return r});var t;(function(u){u.NETWORK_ERROR="networkError",u.MEDIA_ERROR="mediaError",u.KEY_SYSTEM_ERROR="keySystemError",u.MUX_ERROR="muxError",u.OTHER_ERROR="otherError"})(t||(t={}));var r;(function(u){u.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",u.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",u.KEY_SYSTEM_NO_SESSION="keySystemNoSession",u.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",u.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",u.MANIFEST_LOAD_ERROR="manifestLoadError",u.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",u.MANIFEST_PARSING_ERROR="manifestParsingError",u.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",u.LEVEL_LOAD_ERROR="levelLoadError",u.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",u.LEVEL_SWITCH_ERROR="levelSwitchError",u.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",u.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",u.FRAG_LOAD_ERROR="fragLoadError",u.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",u.FRAG_DECRYPT_ERROR="fragDecryptError",u.FRAG_PARSING_ERROR="fragParsingError",u.REMUX_ALLOC_ERROR="remuxAllocError",u.KEY_LOAD_ERROR="keyLoadError",u.KEY_LOAD_TIMEOUT="keyLoadTimeOut",u.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",u.BUFFER_APPEND_ERROR="bufferAppendError",u.BUFFER_APPENDING_ERROR="bufferAppendingError",u.BUFFER_STALLED_ERROR="bufferStalledError",u.BUFFER_FULL_ERROR="bufferFullError",u.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",u.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",u.INTERNAL_EXCEPTION="internalException"})(r||(r={}))}),"./src/events.js":(function(e,n,a){"use strict";a.r(n);var t={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"};n.default=t}),"./src/hls.ts":(function(e,n,a){"use strict";a.r(n);var t={};a.r(t),a.d(t,"newCue",function(){return RF});var r=a("./node_modules/url-toolkit/src/url-toolkit.js"),u=a("./src/errors.ts"),i=a("./src/polyfills/number-isFinite.js"),l=a("./src/events.js"),s=a("./src/utils/logger.js"),d={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},p=(function(){function b(f){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=f,this.onEvent=this.onEvent.bind(this);for(var v=arguments.length,o=new Array(v>1?v-1:0),c=1;c>8*(15-c)&255;return o},g.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new V(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},te(b,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(v){this._url=v}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Object(i.isFiniteNumber)(this.programDateTime))return null;var v=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){return!!(this.decryptdata&&this.decryptdata.uri!==null&&this.decryptdata.key===null)}}]),b})();function Z(b,g){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:o},g.hexadecimalInteger=function(v){if(this[v]){var o=(this[v]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var c=new Uint8Array(o.length/2),_=0;_Number.MAX_SAFE_INTEGER?1/0:o},g.decimalFloatingPoint=function(v){return parseFloat(this[v])},g.enumeratedString=function(v){return this[v]},g.decimalResolution=function(v){var o=We.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},b.parseAttrList=function(v){var o,c={};for(Qe.lastIndex=0;(o=Qe.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},b})(),qn=dn,Mn={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function An(b,g){var f=Mn[g];return!!f&&f[b.slice(0,4)]===!0}function Hn(b,g){return MediaSource.isTypeSupported((g||"video")+'/mp4;codecs="'+b+'"')}var Ia=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Da=/#EXT-X-MEDIA:(.*)/g,ha=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Rt=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,_t=/\.(mp4|m4s|m4v|m4a)$/i,Ha=(function(){function b(){}return b.findGroup=function(f,v){for(var o=0;o2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},b.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(f,v){var o=[];Ia.lastIndex=0;function c(N,q){["video","audio"].forEach(function(J){var re=N.filter(function(en){return An(en,J)});if(re.length){var Fe=re.filter(function(en){return en.lastIndexOf("avc1",0)===0||en.lastIndexOf("mp4a",0)===0});q[J+"Codec"]=Fe.length>0?Fe[0]:re[0],N=N.filter(function(en){return re.indexOf(en)===-1})}}),q.unknownCodecs=N}for(var _;(_=Ia.exec(f))!=null;){var y={},C=y.attrs=new qn(_[1]);y.url=b.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(y.width=F.width,y.height=F.height),y.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),y.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),y),y.videoCodec&&y.videoCodec.indexOf("avc1")!==-1&&(y.videoCodec=b.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},b.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(Da.lastIndex=0;(_=Da.exec(f))!==null;){var F=new qn(_[1]);if(F.TYPE===o){var N={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:o,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(N.url=b.resolve(F.URI,v)),c.length){var q=b.findGroup(c,N.groupId);N.audioCodec=q?q.codec:c[0].codec}y.push(N)}}return y},b.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new me(v),N=0,q=null,J=new ne,re,Fe,en,Sn=null;for(ha.lastIndex=0;(re=ha.exec(f))!==null;){var qa=re[1];if(qa){J.duration=parseFloat(qa);var Sa=(" "+re[2]).slice(1);J.title=Sa||null,J.tagList.push(Sa?["INF",qa,Sa]:["INF",qa])}else if(re[3]){if(Object(i.isFiniteNumber)(J.duration)){var Ua=y++;J.type=c,J.start=C,en&&(J.levelkey=en),J.sn=Ua,J.level=o,J.cc=N,J.urlId=_,J.baseurl=v,J.relurl=(" "+re[3]).slice(1),Xe(J,q),F.fragments.push(J),q=J,C+=J.duration,J=new ne}}else if(re[4]){var Ka=(" "+re[4]).slice(1);q?J.setByteRange(Ka,q):J.setByteRange(Ka)}else if(re[5])J.rawProgramDateTime=(" "+re[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),Sn===null&&(Sn=F.fragments.length);else{if(re=re[0].match(Rt),!re){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(Fe=1;Fe=0&&(en.method=Xt,en.key=null,en.iv=wt));break}case"START":{var ei=new qn(Tt),ad=ei.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(ad)&&(F.startTimeOffset=ad);break}case"MAP":{var td=new qn(Tt);J.relurl=td.URI,td.BYTERANGE&&J.setByteRange(td.BYTERANGE),J.baseurl=v,J.level=o,J.type=c,J.sn="initSegment",F.initSegment=J,J=new ne,J.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+re);break}}}return J=q,J&&!J.relurl&&(F.fragments.pop(),C-=J.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=y-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=N,!F.initSegment&&F.fragments.length&&F.fragments.every(function($F){return _t.test($F.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),J=new ne,J.relurl=F.fragments[0].relurl,J.baseurl=v,J.level=o,J.type=c,J.sn="initSegment",F.initSegment=J,F.needSidxRanges=!0),Sn&&Sr(F.fragments,Sn),F},b})();function Sr(b,g){for(var f=b[g],v=g-1;v>=0;v--){var o=b[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function Xe(b,g){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):g&&g.programDateTime&&(b.programDateTime=g.endProgramDateTime),Object(i.isFiniteNumber)(b.programDateTime)||(b.programDateTime=null,b.rawProgramDateTime=null)}function Wa(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var At=window,zn=At.performance,Un=(function(b){Wa(g,b);function g(v){var o;return o=b.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,o.loaders={},o}g.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},g.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return w.AUDIO;case E.SUBTITLE_TRACK:return w.SUBTITLE;default:return w.MAIN}},g.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=g.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,y=c.loader,C=_||y,F=new C(c);return o.loader=F,this.loaders[o.type]=F,F},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.destroyInternalLoaders(),b.prototype.destroy.call(this)},f.onManifestLoading=function(o){this.load({url:o.url,type:E.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(o){this.load({url:o.url,type:E.LEVEL,level:o.level,id:o.id,responseType:"text"})},f.onAudioTrackLoading=function(o){this.load({url:o.url,type:E.AUDIO_TRACK,level:null,id:o.id,responseType:"text"})},f.onSubtitleTrackLoading=function(o){this.load({url:o.url,type:E.SUBTITLE_TRACK,level:null,id:o.id,responseType:"text"})},f.load=function(o){var c=this.hls.config;s.logger.debug("Loading playlist of type "+o.type+", level: "+o.level+", id: "+o.id);var _=this.getInternalLoader(o);if(_){var y=_.context;if(y&&y.url===o.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+o.type),_.abort()}var C,F,N,q;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,N=c.manifestLoadingRetryDelay,q=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,q=0,N=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,N=c.levelLoadingRetryDelay,q=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var J={timeout:F,maxRetry:C,retryDelay:N,maxRetryDelay:q},re={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+o.url),_.load(o,J,re),!0},f.loadsuccess=function(o,c,_,y){if(y===void 0&&(y=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,y);return}if(this.resetInternalLoader(_.type),typeof o.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=o.data;if(c.tload=zn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",y);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,y):this._handleMasterPlaylist(o,c,_,y)},f.loaderror=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,o)},f.loadtimeout=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(o,c,_,y){var C=this.hls,F=o.data,N=g.getResponseUrl(o,_),q=Ha.parseMasterPlaylist(F,N);if(!q.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var J=q.map(function(Sn){return{id:Sn.attrs.AUDIO,codec:Sn.audioCodec}}),re=Ha.parseMasterPlaylistMedia(F,N,"AUDIO",J),Fe=Ha.parseMasterPlaylistMedia(F,N,"SUBTITLES");if(re.length){var en=!1;re.forEach(function(Sn){Sn.url||(en=!0)}),en===!1&&q[0].audioCodec&&!q[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),re.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:q,audioTracks:re,subtitles:Fe,url:N,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,N=_.level,q=_.type,J=g.getResponseUrl(o,_),re=Object(i.isFiniteNumber)(F)?F:0,Fe=Object(i.isFiniteNumber)(N)?N:re,en=g.mapContextToLevelType(_),Sn=Ha.parseLevelPlaylist(o.data,J,Fe,en,re);if(Sn.tload=c.tload,q===E.MANIFEST){var qa={url:J,details:Sn};C.trigger(l.default.MANIFEST_LOADED,{levels:[qa],audioTracks:[],url:J,stats:c,networkDetails:y})}if(c.tparsed=zn.now(),Sn.needSidxRanges){var Sa=Sn.initSegment.url;this.load({url:Sa,isSidxRequest:!0,type:q,level:N,levelDetails:Sn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=Sn,this._handlePlaylistLoaded(o,c,_,y)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=I.default.parseSegmentIndex(new Uint8Array(o.data));if(_){var y=_.references,C=c.levelDetails;y.forEach(function(F,N){var q=F.info;if(C){var J=C.fragments[N];J.byteRange.length===0&&J.setByteRange(String(1+q.end-q.start)+"@"+String(q.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,y){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:y})},f._handleNetworkError=function(o,c,_,y){_===void 0&&(_=!1),y===void 0&&(y=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,N=this.getInternalLoader(o);switch(o.type){case E.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case E.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case E.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}N&&(N.abort(),this.resetInternalLoader(o.type));var q={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:N,context:o,networkDetails:c};y&&(q.response=y),this.hls.trigger(l.default.ERROR,q)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,N=_.id,q=_.levelDetails;if(!q||!q.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var J=g.canHaveQualityLevels(_.type);if(J)this.hls.trigger(l.default.LEVEL_LOADED,{details:q,level:F||0,id:N||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:q,id:N,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:q,id:N,stats:c,networkDetails:y});break}},g})(R),Ze=Un;function Ma(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Ja=(function(b){Ma(g,b);function g(v){var o;return o=b.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=g.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},b.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,y=this.loaders,C=this.hls.config,F=C.fLoader,N=C.loader;c.loaded=0;var q=y[_];q&&(s.logger.warn("abort previous fragment loader for type: "+_),q.abort()),q=y[_]=c.loader=C.fLoader?new F(C):new N(C);var J,re,Fe;J={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var en=c.byteRangeStartOffset,Sn=c.byteRangeEndOffset;Object(i.isFiniteNumber)(en)&&Object(i.isFiniteNumber)(Sn)&&(J.rangeStart=en,J.rangeEnd=Sn),re={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},Fe={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},q.load(J,re,Fe)},f.loadsuccess=function(o,c,_,y){y===void 0&&(y=null);var C=o.data,F=_.frag;F.loader=void 0,this.loaders[F.type]=void 0,this.hls.trigger(l.default.FRAG_LOADED,{payload:C,frag:F,stats:c,networkDetails:y})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c.frag,response:o,networkDetails:_})},f.loadtimeout=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c.frag,networkDetails:_})},f.loadprogress=function(o,c,_,y){y===void 0&&(y=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:y})},g})(R),pt=Ja;function tr(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var In=(function(b){tr(g,b);function g(v){var o;return o=b.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=g.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},b.prototype.destroy.call(this)},f.onKeyLoading=function(o){var c=o.frag,_=c.type,y=this.loaders[_];if(!c.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var C=c.decryptdata.uri;if(C!==this.decrypturl||this.decryptkey===null){var F=this.hls.config;if(y&&(s.logger.warn("abort previous key loader for type:"+_),y.abort()),!C){s.logger.warn("key uri is falsy");return}c.loader=this.loaders[_]=new F.loader(F),this.decrypturl=C,this.decryptkey=null;var N={url:C,frag:c,responseType:"arraybuffer"},q={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},J={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(N,q,J)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var y=_.frag;if(!y.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=y.decryptdata.key=new Uint8Array(o.data),y.loader=void 0,delete this.loaders[y.type],this.hls.trigger(l.default.KEY_LOADED,{frag:y})},f.loaderror=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:_,response:o})},f.loadtimeout=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:_})},g})(R),Oa=In;function hr(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var za={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},jt=(function(b){hr(g,b);function g(v){var o;return o=b.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,o.bufferPadding=.2,o.fragments=Object.create(null),o.timeRanges=Object.create(null),o.config=v.config,o}var f=g.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,R.prototype.destroy.call(this),b.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,y=Object.keys(_).filter(function(F){var N=_[F];if(N.body.type!==c||!N.buffered)return!1;var q=N.body;return q.startPTS<=o&&o<=q.endPTS});if(y.length===0)return null;var C=y.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,y,C;Object.keys(this.fragments).forEach(function(F){var N=_.fragments[F];if(N.buffered===!0){var q=N.range[o];if(q){y=q.time;for(var J=0;J=C&&c<=F){y.push({startPTS:Math.max(o,_.start(q)),endPTS:Math.min(c,_.end(q))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(q)),endPTS:Math.min(c,_.end(q))}),N=!0;else if(c<=C)break;return{time:y,partial:N}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,N=0;return Object.keys(this.fragments).forEach(function(q){var J=c.fragments[q];c.isPartial(J)&&(y=J.body.startPTS-c.bufferPadding,C=J.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),N<=_&&(F=J.body,N=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=za.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=za.PARTIAL:y=za.OK:y=za.APPENDING),y},f.isPartial=function(o){return o.buffered===!0&&(o.range.video!==void 0&&o.range.video.partial===!0||o.range.audio!==void 0&&o.range.audio.partial===!0)},f.isTimeBuffered=function(o,c,_){for(var y,C,F=0;F<_.length;F++){if(y=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=y&&c<=C)return!0;if(c<=y)return!1}return!1},f.onFragLoaded=function(o){var c=o.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(o){var c=this;this.timeRanges=o.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var y=c.timeRanges[_];c.detectEvictedFragments(_,y)})},f.onFragBuffered=function(o){this.detectPartialFragments(o.frag)},f.hasFragment=function(o){var c=this.getFragmentKey(o);return this.fragments[c]!==void 0},f.removeFragment=function(o){var c=this.getFragmentKey(o);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},g})(R),W={search:function(g,f){for(var v=0,o=g.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=g[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},X=W,k=(function(){function b(){}return b.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},b.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],y;for(y=0;yC&&(c[y-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,N,q=v,J=v,re=0;re=Fe&&v1?c-1:0),y=1;yg?(v.duration=c-v.start,v.duration<0&&s.logger.warn("negative duration computed for frag "+v.sn+",level "+v.level+", there should be some duration drift between playlist and fragment!")):(o.duration=v.start-c,o.duration<0&&s.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):f>g?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Ve(b,g,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(g.startPTS)){var y=Math.abs(g.startPTS-f);Object(i.isFiniteNumber)(g.deltaPTS)?g.deltaPTS=Math.max(y,g.deltaPTS):g.deltaPTS=y,_=Math.max(f,g.startPTS),f=Math.min(f,g.startPTS),v=Math.max(v,g.endPTS),o=Math.min(o,g.startDTS),c=Math.max(c,g.endDTS)}var C=f-g.start;g.start=g.startPTS=f,g.maxStartPTS=_,g.endPTS=v,g.startDTS=o,g.endDTS=c,g.duration=v-f;var F=g.sn;if(!b||Fb.endSN)return 0;var N,q,J;for(N=F-b.startSN,q=b.fragments,q[N]=g,J=N;J>0;J--)Ln(q,J,J-1);for(J=N;Jv.length))for(var c=0;cg?-1:0})}function Lt(b,g,f){var v=!1;return g&&g.details&&f&&(f.endCC>f.startCC||b&&b.cc=(o||0))return null;f=f||0;for(var c=0;cb&&f.start?-1:0}function tu(b,g,f){var v=Math.min(g,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>b}var Oi=250,Ui=2,Xu=.1,ru=.05,fl=(function(){function b(f,v,o,c){this.config=f,this.media=v,this.fragmentTracker=o,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var g=b.prototype;return g.poll=function(v){var o=this.config,c=this.media,_=this.stalled,y=c.currentTime,C=c.seeking,F=this.seeking&&!C,N=!this.seeking&&C;if(this.seeking=C,y!==v){if(this.moved=!0,_!==null){if(this.stallReported){var q=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(q)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((N||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var J=k.bufferInfo(c,y,0),re=J.len>0,Fe=J.nextStart||0;if(!(!re&&!Fe)){if(C){var en=J.len>Ui,Sn=!Fe||Fe-y>Ui;if(en||Sn)return;this.moved=!1}if(!this.moved&&this.stalled){var qa=Math.max(Fe,J.start||0)-y;if(qa>0&&qa<=Ui){this._trySkipBufferHole(null);return}}var Sa=self.performance.now();if(_===null){this.stalled=Sa;return}var Ua=Sa-_;!C&&Ua>=Oi&&this._reportStall(J.len);var Ka=k.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ka,Ua)}}},g._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var N=this._trySkipBufferHole(F);if(N)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},g._reportStall=function(v){var o=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},g._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,y=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var N=_.buffered.start(F);if(y+o.maxBufferHole>=C&&y1?c-1:0),y=1;y1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},g})(R);function af(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var pe={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},hs=(function(b){af(g,b);function g(){return b.apply(this,arguments)||this}var f=g.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var o=this.fragCurrent;o&&(o.loader&&o.loader.abort(),this.fragmentTracker.removeFragment(o)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=pe.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,y=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=y.getState(_);return C===za.PARTIAL||C===za.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=k.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===pe.FRAG_LOADING){var N=this.fragCurrent;if(F.len===0&&N){var q=o.maxFragLookUpTolerance,J=N.start-q,re=N.start+N.duration+q;Cre?(N.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),N.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=pe.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===pe.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=pe.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=pe.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(o,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return o+Math.max(0,c.totalduration-_)},g})(Xs);function gs(b,g){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=pe.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=pe.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,b.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case pe.BUFFER_FLUSHING:this.fragLoadError=0;break;case pe.IDLE:this._doTickIdle();break;case pe.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=pe.IDLE);break;case pe.FRAG_LOADING_WAITING_RETRY:var c=window.performance.now(),_=this.retryDate;(!_||c>=_||this.media&&this.media.seeking)&&(s.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=pe.IDLE);break;case pe.ERROR:case pe.STOPPED:case pe.FRAG_LOADING:case pe.PARSING:case pe.PARSED:case pe.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var o=this.hls,c=o.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var y;this.loadedmetadata?y=_.currentTime:y=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(F){var N=F.bitrate,q;N?q=Math.max(8*c.maxBufferSize/N,c.maxBufferLength):q=c.maxBufferLength,q=Math.min(q,c.maxMaxBufferLength);var J=k.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),re=J.len;if(!(re>=q)){s.logger.trace("buffer length of "+re.toFixed(3)+" is below max of "+q.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var Fe=F.details;if(!Fe||Fe.live&&this.levelLastLoaded!==C){this.state=pe.WAITING_LEVEL;return}if(this._streamEnded(J,Fe)){var en={};this.altAudio&&(en.type="video"),this.hls.trigger(l.default.BUFFER_EOS,en),this.state=pe.ENDED;return}this._fetchPayloadOrEos(y,J,Fe)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,N=F.length;if(N!==0){var q=F[0].start,J=F[N-1].start+F[N-1].duration,re=c.end,Fe;if(_.initSegment&&!_.initSegment.data)Fe=_.initSegment;else if(_.live){var en=this.config.initialLiveManifestSize;if(Nen&&en>J.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+en.toFixed(3)),J.currentTime=en),this.nextLoadPosition=en}if(o.PTSKnown&&c>y&&J&&J.readyState)return null;if(this.startFragRequested&&!o.PTSKnown){if(C)if(o.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),re=hi(F,C.endProgramDateTime,q.maxFragLookUpTolerance);else{var Sn=C.sn+1;if(Sn>=o.startSN&&Sn<=o.endSN){var qa=F[Sn-o.startSN];C.cc===qa.cc&&(re=qa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+re.sn))}re||(re=X.search(F,function(Sa){return C.cc-Sa.cc}),re&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+re.sn))}re||(re=F[Math.min(N-1,Math.round(N/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+re.sn))}return re},f._findFragment=function(o,c,_,y,C,F,N){var q=this.hls.config,J;if(CF-q.maxFragLookUpTolerance?0:q.maxFragLookUpTolerance;J=$o(c,y,C,re)}else J=y[_-1];if(J){var Fe=J.sn-N.startSN,en=c&&J.level===c.level,Sn=y[Fe-1],qa=y[Fe+1];if(c&&J.sn===c.sn)if(en&&!J.backtracked)if(J.snq.maxBufferHole&&c.dropped&&Fe?(J=Sn,s.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(J=qa,s.logger.log("Re-loading fragment with SN: "+J.sn))}else J=null;else J.backtracked&&(qa&&qa.backtracked?(s.logger.warn("Already backtracked from fragment "+qa.sn+", will not backtrack to fragment "+J.sn+". Loading fragment "+qa.sn),J=qa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),J.dropped=0,Sn?(J=Sn,J.backtracked=!0):Fe&&(J=null)))}return J},f._loadKey=function(o){this.state=pe.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:o})},f._loadFragment=function(o){var c=this.fragmentTracker.getState(o);this.fragCurrent=o,o.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(o.sn)&&!o.bitrateTest&&(this.nextLoadPosition=o.start+o.duration),o.backtracked||c===za.NOT_LOADED||c===za.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Be(this.hls,"main")),this.state=pe.FRAG_LOADING):c===za.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,w.MAIN)},f.followingBufferedFrag=function(o){return o?this.getBufferedFrag(o.endPTS+.5):null},f._checkFragmentChanged=function(){var o,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),k.isBuffered(_,c)?o=this.getBufferedFrag(c):k.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var y=o;if(y!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:y});var C=y.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=y}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var o=this.media,c;o?(c=o.paused,o.pause()):c=!0,this.previouslyPaused=c}var _=this.fragCurrent;_&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var o=this.media;o&&o.buffered.length&&(this.immediateSwitch=!1,k.isBuffered(o,o.currentTime)&&(o.currentTime-=1e-4),this.previouslyPaused||o.play())},f.nextLevelSwitch=function(){var o=this.media;if(o&&o.readyState){var c,_,y;if(_=this.getBufferedFrag(o.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),o.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],N=this.fragLastKbps;N&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*N)+1:c=0}if(y=this.getBufferedFrag(o.currentTime+c),y&&(y=this.followingBufferedFrag(y),y)){var q=this.fragCurrent;q&&q.loader&&q.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=pe.BUFFER_FLUSHING;var _={startOffset:o,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("seeked",this.onvseeked),c.addEventListener("ended",this.onvended);var _=this.config;this.levels&&_.autoStartLoad&&this.hls.startLoad(_.startPosition),this.gapController=new fl(_,c,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var c=this.levels;c&&c.forEach(function(_){_.details&&_.details.fragments.forEach(function(y){y.backtracked=void 0})}),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("seeked",this.onvseeked),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var o=this.media,c=o?o.currentTime:void 0;Object(i.isFiniteNumber)(c)&&s.logger.log("media seeked to "+c.toFixed(3)),this.tick()},f.onManifestLoading=function(){s.logger.log("trigger BUFFER_RESET"),this.hls.trigger(l.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(o){var c=!1,_=!1,y;o.levels.forEach(function(F){y=F.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(c=!0),y.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=c&&_,this.audioCodecSwitch&&s.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=o.altAudio,this.levels=o.levels,this.startFragRequested=!1;var C=this.config;(C.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(C.startPosition)},f.onLevelLoaded=function(o){var c=o.details,_=o.level,y=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,N=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var q=C.details;q&&c.fragments.length>0?($n(q,c),N=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(N,q),c.PTSKnown&&Object(i.isFiniteNumber)(N)?s.logger.log("live playlist sliding:"+N.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),qo(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,qo(this.fragPrevious,y,c))}else c.PTSKnown=!1;if(C.details=c,this.levelLastLoaded=_,this.hls.trigger(l.default.LEVEL_UPDATED,{details:c,level:_}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var J=c.startTimeOffset;Object(i.isFiniteNumber)(J)?(J<0&&(s.logger.log("negative start time offset "+J+", count from end of last fragment"),J=N+F+J),s.logger.log("start time offset found in playlist, adjust startPosition to "+J),this.startPosition=J):c.live?(this.startPosition=this.computeLivePosition(N,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===pe.WAITING_LEVEL&&(this.state=pe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,y=this.levels,C=this.media,F=o.frag;if(this.state===pe.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var N=o.stats,q=y[c.level],J=q.details;if(this.bitrateTest=!1,this.stats=N,s.logger.log("Loaded "+c.sn+" of ["+J.startSN+" ,"+J.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=pe.IDLE,this.startFragRequested=!1,N.tparsed=N.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:N,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=pe.IDLE,N.tparsed=N.tbuffered=window.performance.now(),J.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:N,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+J.startSN+" ,"+J.endSN+"],level "+c.level+", cc "+c.cc),this.state=pe.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var re=!(C&&C.seeking)&&(J.PTSKnown||!J.live),Fe=J.initSegment?J.initSegment.data:[],en=this._getAudioCodec(q),Sn=this.demuxer=this.demuxer||new Be(this.hls,"main");Sn.push(o.payload,Fe,en,q.videoCodec,c,J.totalduration,re)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===pe.PARSING){var y=o.tracks,C,F;if(y.audio&&this.altAudio&&delete y.audio,F=y.audio,F){var N=this.levels[this.level].audioCodec,q=navigator.userAgent.toLowerCase();N&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),N.indexOf("mp4a.40.5")!==-1?N="mp4a.40.2":N="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&q.indexOf("firefox")===-1&&(N="mp4a.40.5"),q.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(N="mp4a.40.2",s.logger.log("Android: force audio codec to "+N)),F.levelCodec=N,F.id=o.id}F=y.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,y);for(C in y){F=y[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var J=F.initSegment;J&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:J,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="main"&&y.sn===_.sn&&y.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===pe.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),o.hasAudio===!0&&F.addElementaryStream(le.AUDIO),o.hasVideo===!0&&F.addElementaryStream(le.VIDEO),s.logger.log("Parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb+",dropped:"+(o.dropped||0)),o.type==="video")if(F.dropped=o.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var N=C.details;if(N&&F.sn===N.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=o.startPTS,this.state=pe.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var q=Ve(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),J=this.hls;J.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:q,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(re){re&&re.length&&c.state===pe.PARSING&&(c.appended=!0,c.pendingBuffering=!0,J.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:re,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===pe.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=pe.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(o){var c=!!o.url,_=o.id;if(!c){if(this.mediaBuffer!==this.media){s.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),y.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=pe.IDLE}var C=this.hls;C.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:_}),this.altAudio=!1}},f.onAudioTrackSwitched=function(o){var c=o.id,_=!!this.hls.audioTracks[c].url;if(_){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,y,C=!1;for(var F in c){var N=c[F];N.id==="main"?(y=F,_=N,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(o){if(o.parent==="main"){var c=this.state;(c===pe.PARSING||c===pe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===pe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+rr.toString(c.buffered)),this.fragPrevious=o;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:o,id:"main"}),this.state=pe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&k.isBuffered(this.media,this.media.currentTime)&&k.isBuffered(this.media,this.media.currentTime+.5);switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:if(!o.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var y=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+y+" ms"),this.retryDate=window.performance.now()+y,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=pe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=pe.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==pe.ERROR&&(o.fatal?(this.state=pe.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===pe.WAITING_LEVEL&&(this.state=pe.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===pe.PARSING||this.state===pe.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=pe.IDLE):(s.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}},f._reduceMaxBufferLength=function(o){var c=this.config;return c.maxMaxBufferLength>=o?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var o=this.media;if(!(!o||o.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:o,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=pe.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var o=this.mediaBuffer?this.mediaBuffer:this.media;o&&this.fragmentTracker.detectEvictedFragments(le.VIDEO,o.buffered),this.state=pe.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var o=this.media,c=o.currentTime,_=o.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),o.currentTime=_)},f._getAudioCodec=function(o){var c=this.config.defaultAudioCodec||o.audioCodec;return this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5")),c},tf(g,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("main stream-controller: "+c+"->"+o),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:o})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var o=this.media;if(o){var c=this.getBufferedFrag(o.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var o=this.media;return o?this.followingBufferedFrag(this.getBufferedFrag(o.currentTime)):null}},{key:"nextLevel",get:function(){var o=this.nextBufferedFrag;return o?o.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(o){this._liveSyncPosition=o}}]),g})(hs),j0=Ig;function Vm(b,g){for(var f=0;f0){y=c[0].bitrate,c.sort(function(re,Fe){return re.bitrate-Fe.bitrate}),this._levels=c;for(var J=0;J=0&&o1&&q.loadError0){var c=this.currentLevelIndex,_=o.urlId,y=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:y,level:c,id:_})}}},Qm(g,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(o){var c=this._levels;c&&(o=Math.min(o,c.length-1),(this.currentLevelIndex!==o||!c[o].details)&&this.setLevelInternal(o))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(o){this.manualLevelIndex=o,this._startLevel===void 0&&(this._startLevel=o),o!==-1&&(this.level=o)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(o){this._firstLevel=o}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var o=this.hls.config.startLevel;return o!==void 0?o:this._firstLevel}else return this._startLevel},set:function(o){this._startLevel=o}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(o){this.level=o,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=o)}}]),g})(R),Ym=a("./src/demux/id3.js");function Sw(b,g){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=b,g.dispatchEvent(f)}function __(b){if(b&&b.cues)for(;b.cues.length>0;)b.removeCue(b.cues[0])}function $C(b,g){if(gb[b.length-1].endTime)return b[b.length-1];for(var f=0,v=b.length-1;f<=v;){var o=Math.floor((v+f)/2);if(gb[o].endTime)f=o+1;else return b[o]}return b[f].endTime-gq&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),q=N+.25);for(var J=0;J=this.minWeight_},g.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},g.destroy=function(){},b})(),VC=zC;function Gw(b,g){for(var f=0;f500*_.duration/q){var J=o.levels,re=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/N),Fe=J[_.level],en=Fe.realBitrate?Math.max(Fe.realBitrate,Fe.bitrate):Fe.bitrate,Sn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*en/8)),qa=c.currentTime,Sa=(Sn-F.loaded)/re,Ua=(k.bufferInfo(c,qa,o.config.maxBufferHole).end-qa)/q;if(Ua<2*_.duration/q&&Sa>Ua){var Ka,Tt;for(Tt=_.level-1;Tt>C;Tt--){var pl=J[Tt].realBitrate?Math.max(J[Tt].realBitrate,J[Tt].bitrate):J[Tt].bitrate,gi=_.duration*pl/(8*.8*re);if(gi=y;re--){var Fe=J[re];if(Fe){var en=Fe.details,Sn=en?en.totalduration/en.fragments.length:c,qa=en?en.live:!1,Sa=void 0;re<=o?Sa=N*_:Sa=q*_;var Ua=J[re].realBitrate?Math.max(J[re].realBitrate,J[re].bitrate):J[re].bitrate,Ka=Ua*Sn/Sa;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+re+"/"+Math.round(Sa)+"/"+Ua+"/"+Sn+"/"+F+"/"+Ka),Sa>Ua&&(!Ka||qa&&!this.bitrateTestDelay||Ka=0)return Sn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var qa=q?Math.min(q,y.maxStarvationDelay):y.maxStarvationDelay,Sa=y.abrBandWidthFactor,Ua=y.abrBandWidthUpFactor;if(en===0){var Ka=this.bitrateTestDelay;if(Ka){var Tt=q?Math.min(q,y.maxLoadingDelay):y.maxLoadingDelay;qa=Tt-Ka,s.logger.trace("bitrate test took "+Math.round(1e3*Ka)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*qa)+" ms"),Sa=Ua=1}}return Sn=this._findBestLevel(N,q,Fe,C,c,en+qa,Sa,Ua,_),Math.max(Sn,0)}}]),g})(R),ZC=XC;function eF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Aw=j(),nF=(function(b){eF(g,b);function g(v){var o;return o=b.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_RESET,l.default.BUFFER_APPENDING,l.default.BUFFER_CODECS,l.default.BUFFER_EOS,l.default.BUFFER_FLUSHING,l.default.LEVEL_PTS_UPDATED,l.default.LEVEL_UPDATED)||this,o._msDuration=null,o._levelDuration=null,o._levelTargetDuration=10,o._live=null,o._objectUrl=null,o._needsFlush=!1,o._needsEos=!1,o.config=void 0,o.audioTimestampOffset=void 0,o.bufferCodecEventsExpected=0,o._bufferCodecEventsTotal=0,o.media=null,o.mediaSource=null,o.segments=[],o.parent=void 0,o.appending=!1,o.appended=0,o.appendError=0,o.flushBufferCounter=0,o.tracks={},o.pendingTracks={},o.sourceBuffer={},o.flushRange=[],o._onMediaSourceOpen=function(){s.logger.log("media source opened"),o.hls.trigger(l.default.MEDIA_ATTACHED,{media:o.media});var c=o.mediaSource;c&&c.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},o._onMediaSourceClose=function(){s.logger.log("media source closed")},o._onMediaSourceEnded=function(){s.logger.log("media source ended")},o._onSBUpdateEnd=function(){if(o.audioTimestampOffset&&o.sourceBuffer.audio){var c=o.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+c.timestampOffset+" to "+o.audioTimestampOffset),c.timestampOffset=o.audioTimestampOffset,delete o.audioTimestampOffset}o._needsFlush&&o.doFlush(),o._needsEos&&o.checkEos(),o.appending=!1;var _=o.parent,y=o.segments.reduce(function(J,re){return re.parent===_?J+1:J},0),C={},F=o.sourceBuffer;for(var N in F){var q=F[N];if(!q)throw Error("handling source buffer update end error: source buffer for "+N+" uninitilized and unable to update buffered TimeRanges.");C[N]=q.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:y,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),y===0&&o.flushLiveBackBuffer()},o._onSBUpdateError=function(c){s.logger.error("sourceBuffer error:",c),o.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},o.config=v.config,o}var f=g.prototype;return f.destroy=function(){R.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var y=this.sourceBuffer.audio;if(!y)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(y.timestampOffset-o.start);if(C>.1){var F=y.updating;try{y.abort()}catch(N){s.logger.warn("can not abort audio buffer: "+N)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+y.timestampOffset+" to "+o.start),y.timestampOffset=o.start)}}},f.onManifestParsed=function(o){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o){var c=this.media=o.media;if(c&&Aw){var _=this.mediaSource=new Aw;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),c.src=window.URL.createObjectURL(_),this._objectUrl=c.src}},f.onMediaDetaching=function(){s.logger.log("media source detaching");var o=this.mediaSource;if(o){if(o.readyState==="open")try{o.endOfStream()}catch(c){s.logger.warn("onMediaDetaching:"+c.message+" while calling endOfStream")}o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(l.default.MEDIA_DETACHED)},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,c=this.pendingTracks,_=Object.keys(c).length;(_&&!o||_===2)&&(this.createSourceBuffers(c),this.pendingTracks={},this.doAppending())},f.onBufferReset=function(){var o=this.sourceBuffer;for(var c in o){var _=o[c];try{_&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(_),_.removeEventListener("updateend",this._onSBUpdateEnd),_.removeEventListener("error",this._onSBUpdateError))}catch{}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},f.onBufferCodecs=function(o){var c=this;Object.keys(this.sourceBuffer).length||(Object.keys(o).forEach(function(_){c.pendingTracks[_]=o[_]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},f.createSourceBuffers=function(o){var c=this.sourceBuffer,_=this.mediaSource;if(!_)throw Error("createSourceBuffers called when mediaSource was null");for(var y in o)if(!c[y]){var C=o[y];if(!C)throw Error("source buffer exists for track "+y+", however track does not");var F=C.levelCodec||C.codec,N=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+N+")");try{var q=c[y]=_.addSourceBuffer(N);q.addEventListener("updateend",this._onSBUpdateEnd),q.addEventListener("error",this._onSBUpdateError),this.tracks[y]={buffer:q,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(J){s.logger.error("error while trying to add sourceBuffer:"+J.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:J,mimeType:N})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:this.tracks})},f.onBufferAppending=function(o){this._needsFlush||(this.segments?this.segments.push(o):this.segments=[o],this.doAppending())},f.onBufferEos=function(o){for(var c in this.sourceBuffer)if(!o.type||o.type===c){var _=this.sourceBuffer[c];_&&!_.ended&&(_.ended=!0,s.logger.log(c+" sourceBuffer now EOS"))}this.checkEos()},f.checkEos=function(){var o=this.sourceBuffer,c=this.mediaSource;if(!c||c.readyState!=="open"){this._needsEos=!1;return}for(var _ in o){var y=o[_];if(y){if(!y.ended)return;if(y.updating){this._needsEos=!0;return}}}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{c.endOfStream()}catch{s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},f.onBufferFlushing=function(o){o.type?this.flushRange.push({start:o.startOffset,end:o.endOffset,type:o.type}):(this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"video"}),this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},f.flushLiveBackBuffer=function(){if(this._live){var o=this.config.liveBackBufferLength;if(!(!isFinite(o)||o<0)){if(!this.media){s.logger.error("flushLiveBackBuffer called without attaching media");return}for(var c=this.media.currentTime,_=this.sourceBuffer,y=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=y.length-1;F>=0;F--){var N=y[F],q=_[N];if(q){var J=q.buffered;J.length>0&&C>J.start(0)&&this.removeBufferRange(N,q,0,C)&&this.hls.trigger(l.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C})}}}}},f.onLevelUpdated=function(o){var c=o.details;c.fragments.length>0&&(this._levelDuration=c.totalduration+c.fragments[0].start,this._levelTargetDuration=c.averagetargetduration||c.targetduration||10,this._live=c.live,this.updateMediaElementDuration())},f.updateMediaElementDuration=function(){var o=this.config,c;if(!(this._levelDuration===null||!this.media||!this.mediaSource||!this.sourceBuffer||this.media.readyState===0||this.mediaSource.readyState!=="open")){for(var _ in this.sourceBuffer){var y=this.sourceBuffer[_];if(y&&y.updating===!0)return}c=this.media.duration,this._msDuration===null&&(this._msDuration=this.mediaSource.duration),this._live===!0&&o.liveDurationInfinity===!0?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>c||!Object(i.isFiniteNumber)(c))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},f.doFlush=function(){for(;this.flushRange.length;){var o=this.flushRange[0];if(this.flushBuffer(o.start,o.end,o.type))this.flushRange.shift(),this.flushBufferCounter=0;else{this._needsFlush=!0;return}}if(this.flushRange.length===0){this._needsFlush=!1;var c=0,_=this.sourceBuffer;try{for(var y in _){var C=_[y];C&&(c+=C.buffered.length)}}catch{s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=c,this.hls.trigger(l.default.BUFFER_FLUSHED)}},f.doAppending=function(){var o=this.config,c=this.hls,_=this.segments,y=this.sourceBuffer;if(Object.keys(y).length){if(!this.media||this.media.error){this.segments=[],s.logger.error("trying to append although a media error occured, flush segment and abort");return}if(!this.appending){var C=_.shift();if(C)try{var F=y[C.type];if(!F){this._onSBUpdateEnd();return}if(F.updating){_.unshift(C);return}F.ended=!1,this.parent=C.parent,F.appendBuffer(C.data),this.appendError=0,this.appended++,this.appending=!0}catch(q){s.logger.error("error while trying to append buffer:"+q.message),_.unshift(C);var N={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};q.code===22?(this.segments=[],N.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,N.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],N.fatal=!0)),c.trigger(l.default.ERROR,N)}}}},f.flushBuffer=function(o,c,_){var y=this.sourceBuffer;if(!Object.keys(y).length)return!0;var C="null";if(this.media&&(C=this.media.currentTime.toFixed(3)),s.logger.log("flushBuffer,pos/start/end: "+C+"/"+o+"/"+c),this.flushBufferCounter>=this.appended)return s.logger.warn("abort flushing too many retries"),!0;var F=y[_];if(F){if(F.ended=!1,F.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(_,F,o,c))return this.flushBufferCounter++,!1}return s.logger.log("buffer flushed"),!0},f.removeBufferRange=function(o,c,_,y){try{for(var C=0;C.5){var re="null";return this.media&&(re=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+q+","+J+"], of ["+F+","+N+"], pos:"+re),c.remove(q,J),!0}}}catch(Fe){s.logger.warn("removeBufferRange failed",Fe)}return!1},g})(R),aF=nF;function Lw(b,g){for(var f=0;fthis.autoLevelCapping&&c.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},f.getMaxLevel=function(o){var c=this;if(!this.levels)return-1;var _=this.levels.filter(function(y,C){return g.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return g.getMaxLevelByMediaSize(_,this.mediaWidth,this.mediaHeight)},f.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},f.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},g.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},g.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var y=function(J,re){return re?J.width!==re.width||J.height!==re.height:!0},C=o.length-1,F=0;F=c||N.height>=_)&&y(N,o[F+1])){C=F;break}}return C},tF(g,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=g.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=g.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),g})(R),Pw=rF;function oF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var of=window,uF=of.performance,Fg=(function(b){oF(g,b);function g(v){return b.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=g.prototype;return f.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},f.onMediaAttaching=function(o){var c=this.hls.config;if(c.capLevelOnFPSDrop){var _=this.video=o.media instanceof window.HTMLVideoElement?o.media:null;typeof _.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,c,_){var y=uF.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,N=c-this.lastDecodedFrames,q=1e3*F/C,J=this.hls;if(J.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:N,totalDroppedFrames:_}),q>0&&F>J.config.fpsDroppedMonitoringThreshold*N){var re=J.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+re),re>0&&(J.autoLevelCapping===-1||J.autoLevelCapping>=re)&&(re=re-1,J.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:re,droppedLevel:J.currentLevel}),J.autoLevelCapping=re,J.streamController.nextLevelSwitch())}}this.lastTime=y,this.lastDroppedFrames=_,this.lastDecodedFrames=c}},f.checkFPSInterval=function(){var o=this.video;if(o)if(this.isVideoPlaybackQualityAvailable){var c=o.getVideoPlaybackQuality();this.checkFPS(o,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},g})(R),iF=Fg,Nw=window,Gg=Nw.performance,lF=Nw.XMLHttpRequest,cF=(function(){function b(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var g=b.prototype;return g.destroy=function(){this.abort(),this.loader=null},g.abort=function(){var v=this.loader;v&&v.readyState!==4&&(this.stats.aborted=!0,v.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},g.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:Gg.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},g.loadInternal=function(){var v,o=this.context;v=this.loader=new lF;var c=this.stats;c.tfirst=0,c.loaded=0;var _=this.xhrSetup;try{if(_)try{_(v,o.url)}catch{v.open("GET",o.url,!0),_(v,o.url)}v.readyState||v.open("GET",o.url,!0)}catch(y){this.callbacks.onError({code:v.status,text:y.message},o,v);return}o.rangeEnd&&v.setRequestHeader("Range","bytes="+o.rangeStart+"-"+(o.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=o.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),v.send()},g.readystatechange=function(v){var o=v.currentTarget,c=o.readyState,_=this.stats,y=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Gg.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Gg.now());var N,q;y.responseType==="arraybuffer"?(N=o.response,q=N.byteLength):(N=o.responseText,q=N.length),_.loaded=_.total=q;var J={url:o.responseURL,data:N};this.callbacks.onSuccess(J,_,y,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+y.url),this.callbacks.onError({code:F,text:o.statusText},y,o)):(s.logger.warn(F+" while loading "+y.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,C.maxRetryDelay),_.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),C.timeout)},g.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},g.loadprogress=function(v){var o=v.currentTarget,c=this.stats;c.loaded=v.loaded,v.lengthComputable&&(c.total=v.total);var _=this.callbacks.onProgress;_&&_(c,this.context,null,o)},b})(),Mg=cF;function Ow(b,g){for(var f=0;f=this.tracks.length){s.logger.warn("Invalid audio track id:",o.id);return}if(s.logger.log("audioTrack "+o.id+" loaded"),this.tracks[o.id].details=o.details,o.details.live&&!this.hasInterval()){var c=o.details.targetduration*1e3;this.setInterval(c)}!o.details.live&&this.hasInterval()&&this.clearInterval()},f.onAudioTrackSwitched=function(o){var c=this.tracks[o.id].groupId;c&&this.audioGroupId!==c&&(this.audioGroupId=c)},f.onLevelLoaded=function(o){this._selectAudioGroup(o.level)},f.onError=function(o){o.type===u.ErrorTypes.NETWORK_ERROR&&(o.fatal&&this.clearInterval(),o.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",o.context.id),this._handleLoadError()))},f._setAudioTrack=function(o){if(this._trackId===o&&this.tracks[this._trackId].details){s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");return}if(o<0||o>=this.tracks.length){s.logger.warn("Invalid id passed to audio-track controller");return}var c=this.tracks[o];s.logger.log("Now switching to audio-track index "+o),this.clearInterval(),this._trackId=o;var _=c.url,y=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:y,url:_}),this._loadTrackDetailsIfNeeded(c)},f.doTick=function(){this._updateTrack(this._trackId)},f._selectAudioGroup=function(o){var c=this.hls.levels[o];if(!(!c||!c.audioGroupIds)){var _=c.audioGroupIds[c.urlId];this.audioGroupId!==_&&(this.audioGroupId=_,this._selectInitialAudioTrack())}},f._selectInitialAudioTrack=function(){var o=this,c=this.tracks;if(c.length){var _=this.tracks[this._trackId],y=null;if(_&&(y=_.name),this._selectDefaultTrack){var C=c.filter(function(q){return q.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,N=function(){c.forEach(function(J){F||(!o.audioGroupId||J.groupId===o.audioGroupId)&&(!y||y===J.name)&&(o._setAudioTrack(J.id),F=!0)})};N(),F||(y=null,N()),F||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},f._needsTrackLoading=function(o){var c=o.details,_=o.url;return!c||c.live?!!_:!1},f._loadTrackDetailsIfNeeded=function(o){if(this._needsTrackLoading(o)){var c=o.url,_=o.id;s.logger.log("loading audio-track playlist for id: "+_),this.hls.trigger(l.default.AUDIO_TRACK_LOADING,{url:c,id:_})}},f._updateTrack=function(o){if(!(o<0||o>=this.tracks.length)){this.clearInterval(),this._trackId=o,s.logger.log("trying to update audio-track "+o);var c=this.tracks[o];this._loadTrackDetailsIfNeeded(c)}},f._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var o=this._trackId,c=this.tracks[o],_=c.name,y=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+y+'"');for(var F=o,N=0;N0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=pe.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=pe.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=pe.STOPPED},f.doTick=function(){var o,c,_,y=this.hls,C=y.config;switch(this.state){case pe.ERROR:case pe.PAUSED:case pe.BUFFER_FLUSHING:break;case pe.STARTING:this.state=pe.WAITING_TRACK,this.loadedmetadata=!1;break;case pe.IDLE:var F=this.tracks;if(!F||!this.media&&(this.startFragRequested||!C.startFragPrefetch))break;if(this.loadedmetadata)o=this.media.currentTime;else if(o=this.nextLoadPosition,o===void 0)break;var N=this.mediaBuffer?this.mediaBuffer:this.media,q=this.videoBuffer?this.videoBuffer:this.media,J=k.bufferInfo(N,o,C.maxBufferHole),re=k.bufferInfo(q,o,C.maxBufferHole),Fe=J.len,en=J.end,Sn=this.fragPrevious,qa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Sa=Math.max(qa,re.len),Ua=this.audioSwitch,Ka=this.trackId;if((Fe"u"){this.state=pe.WAITING_TRACK;break}if(!Ua&&this._streamEnded(J,_)){this.hls.trigger(l.default.BUFFER_EOS,{type:"audio"}),this.state=pe.ENDED;return}var Tt=_.fragments,pl=Tt.length,gi=Tt[0].start,Mc=Tt[pl-1].start+Tt[pl-1].duration,Xt;if(Ua){if(_.live&&!_.PTSKnown)s.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),en=0;else if(en=o,_.PTSKnown&&ogi||J.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=gi+.05;else return}if(_.initSegment&&!_.initSegment.data)Xt=_.initSegment;else if(en<=gi){if(Xt=Tt[0],this.videoTrackCC!==null&&Xt.cc!==this.videoTrackCC&&(Xt=qr(Tt,this.videoTrackCC)),_.live&&Xt.loadIdx&&Xt.loadIdx===this.fragLoadIdx){var or=J.nextStart?J.nextStart:gi;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(or+.05)),this.media.currentTime=or+.05;return}}else{var wt,ei=C.maxFragLookUpTolerance,ad=Sn?Tt[Sn.sn-Tt[0].sn+1]:void 0,td=function(Bg){var t8=Math.min(ei,Bg.duration);return Bg.start+Bg.duration-t8<=en?1:Bg.start-t8>en&&Bg.start?-1:0};enMc-ei&&(ei=0),ad&&!td(ad)?wt=ad:wt=X.search(Tt,td)):wt=Tt[pl-1],wt&&(Xt=wt,gi=wt.start,Sn&&Xt.level===Sn.level&&Xt.sn===Sn.sn&&(Xt.sn<_.endSN?(Xt=Tt[Xt.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+Xt.sn)):Xt=null))}Xt&&(Xt.encrypted?(s.logger.log("Loading key for "+Xt.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ka),this.state=pe.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:Xt})):(s.logger.log("Loading "+Xt.sn+", cc: "+Xt.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ka+", currentTime:"+o+",bufferEnd:"+en.toFixed(3)),this.fragCurrent=Xt,(Ua||this.fragmentTracker.getState(Xt)===za.NOT_LOADED)&&(Xt.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(Xt.sn)&&(this.nextLoadPosition=Xt.start+Xt.duration),y.trigger(l.default.FRAG_LOADING,{frag:Xt}),this.state=pe.FRAG_LOADING)))}break;case pe.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=pe.IDLE);break;case pe.FRAG_LOADING_WAITING_RETRY:var $F=Rs.now(),e8=this.retryDate;N=this.media;var Eoe=N&&N.seeking;(!e8||$F>=e8||Eoe)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=pe.IDLE);break;case pe.WAITING_INIT_PTS:var WF=this.videoTrackCC;if(this.initPTS[WF]===void 0)break;var n8=this.waitingFragment;if(n8){var a8=n8.frag.cc;WF!==a8?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+a8+") does not match video track CC ("+WF+")"),this.waitingFragment=null,this.state=pe.IDLE)):(this.state=pe.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=pe.IDLE;break;case pe.STOPPED:case pe.FRAG_LOADING:case pe.PARSING:case pe.PARSED:case pe.ENDED:break;default:break}},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("ended",this.onvended);var _=this.config;this.tracks&&_.autoStartLoad&&this.startLoad(_.startPosition)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(o){s.logger.log("audio tracks updated"),this.tracks=o.audioTracks},f.onAudioTrackSwitching=function(o){var c=!!o.url;this.trackId=o.id,this.fragCurrent=null,this.state=pe.PAUSED,this.waitingFragment=null,c?this.setInterval(Bw):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=pe.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,y=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var N=y.details;N&&c.fragments.length>0?($n(N,c),F=c.fragments[0].start,c.PTSKnown?s.logger.log("live audio playlist sliding:"+F.toFixed(3)):s.logger.log("live audio playlist - outdated PTS, unknown sliding")):(c.PTSKnown=!1,s.logger.log("live audio playlist - first load, unknown sliding"))}else c.PTSKnown=!1;if(y.details=c,!this.startFragRequested){if(this.startPosition===-1){var q=c.startTimeOffset;Object(i.isFiniteNumber)(q)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+q),this.startPosition=q):c.live?(this.startPosition=this.computeLivePosition(F,c),s.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===pe.WAITING_TRACK&&(this.state=pe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===pe.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var y=this.tracks[this.trackId],C=y.details,F=C.totalduration,N=c.level,q=c.sn,J=c.cc,re=this.config.defaultAudioCodec||y.audioCodec||"mp4a.40.2",Fe=this.stats=o.stats;if(q==="initSegment")this.state=pe.IDLE,Fe.tparsed=Fe.tbuffered=Rs.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:Fe,frag:c,id:"audio"}),this.tick();else{this.state=pe.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Be(this.hls,"audio"));var en=this.initPTS[J],Sn=C.initSegment?C.initSegment.data:[];if(C.initSegment||en!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+N);var qa=!1;this.demuxer.push(o.payload,Sn,re,null,c,F,qa,en)}else s.logger.log("unknown video PTS for continuity counter "+J+", waiting for video PTS before demuxing audio frag "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+N),this.waitingFragment=o,this.state=pe.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===pe.PARSING){var y=o.tracks,C;if(y.video&&delete y.video,C=y.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,y),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var N={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[N]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,N))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&y.sn===_.sn&&y.level===_.level&&this.state===pe.PARSING){var C=this.trackId,F=this.tracks[C],N=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(le.AUDIO),s.logger.log("parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb),Ve(F.details,_,o.startPTS,o.endPTS);var q=this.audioSwitch,J=this.media,re=!1;if(q)if(J&&J.readyState){var Fe=J.currentTime;s.logger.log("switching audio track : currentTime:"+Fe),Fe>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=pe.BUFFER_FLUSHING,N.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),re=!0,this.audioSwitch=!1,N.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,N.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var en=this.pendingData;if(!en){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),N.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(Sn){Sn&&Sn.length&&en.push({type:o.type,data:Sn,parent:"audio",content:"data"})}),!re&&en.length&&(en.forEach(function(Sn){c.state===pe.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,Sn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===pe.PARSING&&(this.stats.tparsed=Rs.now(),this.state=pe.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(o){var c=o.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onBufferAppended=function(o){if(o.parent==="audio"){var c=this.state;(c===pe.PARSING||c===pe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===pe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=Rs.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var y=this.mediaBuffer?this.mediaBuffer:this.media;y&&s.logger.log("audio buffered : "+rr.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=pe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag;if(!(c&&c.type!=="audio"))switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=o.frag;if(_&&_.type!=="audio")break;if(!o.fatal){var y=this.fragLoadError;y?y++:y=1;var C=this.config;if(y<=C.fragLoadingMaxRetry){this.fragLoadError=y;var F=Math.min(Math.pow(2,y-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=Rs.now()+F,this.state=pe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=pe.ERROR}break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==pe.ERROR&&(this.state=o.fatal?pe.ERROR:pe.IDLE,s.logger.warn("AudioStreamController: "+o.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===pe.PARSING||this.state===pe.PARSED)){var N=this.mediaBuffer,q=this.media.currentTime,J=N&&k.isBuffered(N,q)&&k.isBuffered(N,q+.5);if(J){var re=this.config;re.maxMaxBufferLength>=re.maxBufferLength&&(re.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+re.maxMaxBufferLength+"s")),this.state=pe.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=pe.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var o=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){o.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=pe.PARSED):(this.state=pe.IDLE,this.fragPrevious=null,this.tick())},z0(g,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("audio stream:"+c+"->"+o)}},get:function(){return this._state}}]),g})(hs),mF=pF,Hw=(function(){if(typeof window<"u"&&window.VTTCue)return window.VTTCue;var b="auto",g={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(y){if(typeof y!="string")return!1;var C=g[y.toLowerCase()];return C?y.toLowerCase():!1}function o(y){if(typeof y!="string")return!1;var C=f[y.toLowerCase()];return C?y.toLowerCase():!1}function c(y){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");pl=wt,this.hasBeenReset=!0}})),Object.defineProperty(N,"positionAlign",c({},q,{get:function(){return gi},set:function(wt){var ei=o(wt);if(!ei)throw new SyntaxError("An invalid or illegal string was specified.");gi=ei,this.hasBeenReset=!0}})),Object.defineProperty(N,"size",c({},q,{get:function(){return Mc},set:function(wt){if(wt<0||wt>100)throw new Error("Size must be between 0 and 100.");Mc=wt,this.hasBeenReset=!0}})),Object.defineProperty(N,"align",c({},q,{get:function(){return Xt},set:function(wt){var ei=o(wt);if(!ei)throw new SyntaxError("An invalid or illegal string was specified.");Xt=ei,this.hasBeenReset=!0}})),N.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_})(),dF=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function Jw(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new dF,this.regionList=[]}function hF(b){function g(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=b.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?g(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?g(f[1],f[2],0,f[4]):g(0,f[1],f[2],f[4]):null}function qw(){this.values=Object.create(null)}qw.prototype={set:function(g,f){!this.get(g)&&f!==""&&(this.values[g]=f)},get:function(g,f,v){return v?this.has(g)?this.values[g]:f[v]:this.has(g)?this.values[g]:f},has:function(g){return g in this.values},alt:function(g,f,v){for(var o=0;o=0&&f<=100)?(this.set(g,f),!0):!1}};function $w(b,g,f,v){var o=v?b.split(v):[b];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var y=_[0],C=_[1];g(y,C)}}}var V0=new Hw(0,0,0),Gc=V0.align==="middle"?"middle":"center";function gF(b,g,f){var v=b;function o(){var y=hF(b);if(y===null)throw new Error("Malformed timestamp: "+v);return b=b.replace(/^[^\sa-zA-Z-]+/,""),y}function c(y,C){var F=new qw;$w(y,function(J,re){switch(J){case"region":for(var Fe=f.length-1;Fe>=0;Fe--)if(f[Fe].id===re){F.set(J,f[Fe].region);break}break;case"vertical":F.alt(J,re,["rl","lr"]);break;case"line":var en=re.split(","),Sn=en[0];F.integer(J,Sn),F.percent(J,Sn)&&F.set("snapToLines",!1),F.alt(J,Sn,["auto"]),en.length===2&&F.alt("lineAlign",en[1],["start",Gc,"end"]);break;case"position":en=re.split(","),F.percent(J,en[0]),en.length===2&&F.alt("positionAlign",en[1],["start",Gc,"end","line-left","line-right","auto"]);break;case"size":F.percent(J,re);break;case"align":F.alt(J,re,["start",Gc,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var N=F.get("line","auto");N==="auto"&&V0.line===-1&&(N=-1),C.line=N,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Gc);var q=F.get("position","auto");q==="auto"&&V0.position===50&&(q=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=q}function _(){b=b.replace(/^\s+/,"")}if(_(),g.startTime=o(),_(),b.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);b=b.substr(3),_(),g.endTime=o(),_(),c(b,g)}function Ww(b){return b.replace(//gi,` `)}Jw.prototype={parse:function(g){var f=this;g&&(f.buffer+=f.decoder.decode(g,{stream:!0}));function v(){var F=f.buffer,N=0;for(F=Ww(F);N")===-1){f.cue.id=c;continue}case"CUE":try{gF(c,f.cue,f.regionList)}catch{f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var C=c.indexOf("-->")!==-1;if(!c||C&&(y=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+=` `),f.cue.text+=c;continue;case"BADCUE":c||(f.state="ID");continue}}}catch{f.state==="CUETEXT"&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state=f.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var g=this;try{if(g.buffer+=g.decoder.decode(),(g.cue||g.state==="HEADER")&&(g.buffer+=` `,g.parse()),g.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return g.onflush&&g.onflush(),this}};var DF=Jw;function RF(b,g,f,v){for(var o,c,_,y,C,F=window.VTTCue||TextTrackCue,N=0;N=16?y--:y++,navigator.userAgent.match(/Firefox\//)?c.line=N+1:c.line=N>7?N-2:N+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(y/32))),b.addCue(c)}}var Ag={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},xw=function(g){var f=g;return Ag.hasOwnProperty(g)&&(f=Ag[g]),String.fromCharCode(f)},_l=15,ys=100,yF={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},wF={17:2,18:4,21:6,22:8,23:10,19:13,20:15},bF={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},EF={25:2,26:4,29:6,30:8,31:10,27:13,28:15},IF=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],jw;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(jw||(jw={}));var Pt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(g){this.time=g},log:function(g,f){var v=this.verboseFilter[g];this.verboseLevel>=v}},uf=function(g){for(var f=[],v=0;vys&&(Pt.log("ERROR","Too large cursor position "+this.pos),this.pos=ys)},g.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=xw(v);if(this.pos>=ys){Pt.log("ERROR","Cannot insert "+v.toString(16)+" ("+o+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(o,this.currPenState),this.moveCursor(1)},g.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},g.getTextAndFormat=function(){return this.rows},b})(),Zm=(function(){function b(f,v){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.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new Nt,this.nonDisplayedMemory=new Nt,this.lastOutputScreen=new Nt,this.currRollUpRow=this.displayedMemory.rows[_l-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var g=b.prototype;return g.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[_l-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},g.getHandler=function(){return this.outputFilter},g.setHandler=function(v){this.outputFilter=v},g.setPAC=function(v){this.writeScreen.setPAC(v)},g.setBkgData=function(v){this.writeScreen.setBkgData(v)},g.setMode=function(v){v!==this.mode&&(this.mode=v,Pt.log("INFO","MODE="+v),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},g.insertChars=function(v){for(var o=0;o=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}Pt.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},g.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Pt.time;o!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=o:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,o,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:o),this.lastOutputScreen.copy(this.displayedMemory))},g.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},b})(),ed=(function(){function b(f,v,o){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=f||1,this.outputs=[v,o],this.channels=[new Zm(1,v),new Zm(2,o)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var g=b.prototype;return g.getHandler=function(v){return this.channels[v].getHandler()},g.setHandler=function(v,o){this.channels[v].setHandler(o)},g.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Pt.setTime(v);for(var F=0;F ("+uf([_,y])+")");if(c=this.parseCmd(_,y),c||(c=this.parseMidrow(_,y)),c||(c=this.parsePAC(_,y)),c||(c=this.parseBackgroundAttributes(_,y)),!c&&(C=this.parseChars(_,y),C))if(this.currChNr&&this.currChNr>=0){var N=this.channels[this.currChNr-1];N.insertChars(C)}else Pt.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Pt.log("WARNING","Couldn't parse cleaned data "+uf([_,y])+" orig: "+uf([o[F],o[F+1]])))}},g.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,y=(v===23||v===31)&&o>=33&&o<=35;if(!(_||y))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Pt.log("DEBUG","Repeated command ("+uf([v,o])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?o===32?C.ccRCL():o===33?C.ccBS():o===34?C.ccAOF():o===35?C.ccAON():o===36?C.ccDER():o===37?C.ccRU(2):o===38?C.ccRU(3):o===39?C.ccRU(4):o===40?C.ccFON():o===41?C.ccRDC():o===42?C.ccTR():o===43?C.ccRTD():o===44?C.ccEDM():o===45?C.ccCR():o===46?C.ccENM():o===47&&C.ccEOC():C.ccTO(o-32),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},g.parseMidrow=function(v,o){var c=null;if((v===17||v===25)&&o>=32&&o<=47){if(v===17?c=1:c=2,c!==this.currChNr)return Pt.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Pt.log("DEBUG","MIDROW ("+uf([v,o])+")"),!0}return!1},g.parsePAC=function(v,o){var c=null,_=null,y=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(y||C))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,o>=64&&o<=95?_=c===1?yF[v]:bF[v]:_=c===1?wF[v]:EF[v];var F=this.interpretPAC(_,o),N=this.channels[c-1];return N.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},g.interpretPAC=function(v,o){var c=o,_={color:null,italics:!1,indent:null,underline:!1,row:v};return o>95?c=o-96:c=o-64,_.underline=(c&1)===1,c<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((c-16)/2)*4,_},g.parseChars=function(v,o){var c=null,_=null,y=null;if(v>=25?(c=2,y=v-8):(c=1,y=v),y>=17&&y<=19){var C=o;y===17?C=o+80:y===18?C=o+112:C=o+144,Pt.log("INFO","Special char '"+xw(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=uf(_);Pt.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},g.parseBackgroundAttributes=function(v,o){var c,_,y,C,F=(v===16||v===24)&&o>=32&&o<=47,N=(v===23||v===31)&&o>=45&&o<=47;return F||N?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=IF[_],o%2===1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),y=v<24?1:2,C=this.channels[y-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},g.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},b})(),Pg=function(g,f,v){return g.substr(v||0,f.length)===f},FF=function(g){var f=parseInt(g.substr(-3)),v=parseInt(g.substr(-6,2)),o=parseInt(g.substr(-9,2)),c=g.length>9?parseInt(g.substr(0,g.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(o)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+g);return f+=1e3*v,f+=60*1e3*o,f+=3600*1e3*c,f},nd=function(g){for(var f=5381,v=g.length;v;)f=f*33^g.charCodeAt(--v);return(f>>>0).toString()},GF=function(g,f,v){var o=g[f],c=g[o.prevCC];if(!c||!c.new&&o.new){g.ccOffset=g.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)g.ccOffset+=o.start-c.start,o.new=!1,o=c,c=g[o.prevCC];g.presentationOffset=v},MF={parse:function(g,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(Ym.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(y,` `).split(` `),F="00:00.000",N=0,q=0,J=0,re=[],Fe,en=!0,Sn=!1,qa=new DF;qa.oncue=function(Sa){var Ua=v[o],Ka=v.ccOffset;Ua&&Ua.new&&(q!==void 0?Ka=v.ccOffset=Ua.start:GF(v,o,J)),J&&(Ka=J-v.presentationOffset),Sn&&(Sa.startTime+=Ka-q,Sa.endTime+=Ka-q),Sa.id=nd(Sa.startTime.toString())+nd(Sa.endTime.toString())+nd(Sa.text),Sa.text=decodeURIComponent(encodeURIComponent(Sa.text)),Sa.endTime>0&&re.push(Sa)},qa.onparsingerror=function(Sa){Fe=Sa},qa.onflush=function(){if(Fe&&_){_(Fe);return}c(re)},C.forEach(function(Sa){if(en)if(Pg(Sa,"X-TIMESTAMP-MAP=")){en=!1,Sn=!0,Sa.substr(16).split(",").forEach(function(Ua){Pg(Ua,"LOCAL:")?F=Ua.substr(6):Pg(Ua,"MPEGTS:")&&(N=parseInt(Ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),N-=f,q=FF(F)/1e3,J=N/9e4}catch(Ua){Sn=!1,Fe=Ua}return}else Sa===""&&(en=!1);qa.parse(Sa+` `)}),qa.flush()}},AF=MF;function Vw(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function LF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var PF=(function(b){LF(g,b);function g(v){var o;if(o=b.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_USERDATA,l.default.FRAG_DECRYPTED,l.default.MANIFEST_LOADING,l.default.MANIFEST_LOADED,l.default.FRAG_LOADED,l.default.INIT_PTS_FOUND)||this,o.media=null,o.config=void 0,o.enabled=!0,o.Cues=void 0,o.textTracks=[],o.tracks=[],o.initPTS=[],o.unparsedVttFrags=[],o.cueRanges=[],o.captionsTracks={},o.captionsProperties=void 0,o.cea608Parser=void 0,o.lastSn=-1,o.prevCC=-1,o.vttCCs=null,o.hls=v,o.config=v.config,o.Cues=v.config.cueHandler,o.captionsProperties={textTrack1:{label:o.config.captionsTextTrack1Label,languageCode:o.config.captionsTextTrack1LanguageCode},textTrack2:{label:o.config.captionsTextTrack2Label,languageCode:o.config.captionsTextTrack2LanguageCode}},o.config.enableCEA708Captions){var c=new zw(Vw(o),"textTrack1"),_=new zw(Vw(o),"textTrack2");o.cea608Parser=new CF(0,c,_)}return o}var f=g.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,N=C.length;N--;){var q=C[N],J=NF(q[0],q[1],c,_);if(J>=0&&(q[0]=Math.min(q[0],c),q[1]=Math.max(q[1],_),F=!0,J/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,y)},f.onInitPtsFound=function(o){var c=this,_=o.frag,y=o.id,C=o.initPTS,F=this.unparsedVttFrags;y==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(N){c.onFragLoaded(N)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!N||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),y.live){var q=Nr(N.details,y,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+q+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},q)}else this._clearReloadTimer()},f.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},f.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},f._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},f._loadCurrentTrack=function(){var o=this.trackId,c=this.tracks,_=this.hls,y=c[o];o<0||!y||y.details&&!y.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:y.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,y=this.trackId;if(c){var C=m(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(q){q.mode="disabled"});else{var F=C[y];F&&(F.mode="disabled")}var N=C[o];N&&(N.mode=_?"showing":"hidden")}},f._setSubtitleTrackInternal=function(o){var c=this.hls,_=this.tracks;!Object(i.isFiniteNumber)(o)||o<-1||o>=_.length||(this.trackId=o,s.logger.log("Switching to subtitle track "+o),c.trigger(l.default.SUBTITLE_TRACK_SWITCH,{id:o}),this._loadCurrentTrack())},f._onTextTracksChanged=function(){if(this.media){for(var o=-1,c=m(this.media.textTracks),_=0;_=y[N].start&&F<=y[N].end){C=y[N];break}var q=c.start+c.duration;C?C.end=q:(C={start:F,end:q},y.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=pe.IDLE},f.onMediaDetaching=function(){var o=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(c){o.tracksBuffered[c.id]=[]}),this.media=null,this.state=pe.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=pe.IDLE)},f.onSubtitleTracksUpdated=function(o){var c=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=o.subtitleTracks,this.tracks.forEach(function(_){c.tracksBuffered[_.id]=[]})},f.onSubtitleTrackSwitch=function(o){if(this.currentTrackId=o.id,!this.tracks||!this.tracks.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.tracks[this.currentTrackId];c&&c.details&&this.setInterval(xa)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,y=this.currentTrackId,C=this.tracks,F=C[y];c>=C.length||c!==y||!F||(_.live&&Ra(F.details,_,this.lastAVStart),F.details=_,this.setInterval(xa))},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,y=o.frag,C=this.hls;if(this.state===pe.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=Cn.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(N){var q=Cn.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:N,stats:{tstart:F,tdecrypt:q}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=pe.IDLE;return}switch(this.state){case pe.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,y=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,N=o.maxFragLookUpTolerance,q=Math.min(o.maxBufferLength,o.maxMaxBufferLength),J=k.bufferedInfo(this._getBuffered(),y.currentTime,F),re=J.end,Fe=J.len,en=C[c].details,Sn=en.fragments,qa=Sn.length,Sa=Sn[qa-1].start+Sn[qa-1].duration;if(Fe>q)return;var Ua,Ka=this.fragPrevious;reYw){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=Yw-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){if(o.mediaKeySystemDomain===eo.WIDEVINE)return c;throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},f._requestLicense=function(o,c){s.logger.log("Requesting content license for key-system");var _=this._mediaKeysList[0];if(!_){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var y=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(y,o,c);s.logger.log("Sending license request to URL: "+y);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(N){s.logger.error("Failure requesting DRM license: "+N),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(o){if(this._emeEnabled){var c=o.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)}},f.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},f.onManifestParsed=function(o){if(this._emeEnabled){var c=o.levels.map(function(y){return y.audioCodec}),_=o.levels.map(function(y){return y.videoCodec});this._attemptKeySystemAccess(eo.WIDEVINE,c,_)}},kF(g,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),g})(R),HF=Zw;function JF(b){for(var g=1;gc)return y}return 0}},{key:"maxAutoLevel",get:function(){var o=this.levels,c=this.autoLevelCapping,_;return c===-1&&o&&o.length?_=o.length-1:_=c,_}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(o){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,o)}},{key:"audioTracks",get:function(){var o=this.audioTrackController;return o?o.audioTracks:[]}},{key:"audioTrack",get:function(){var o=this.audioTrackController;return o?o.audioTrack:-1},set:function(o){var c=this.audioTrackController;c&&(c.audioTrack=o)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTrack:-1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleTrack=o)}},{key:"subtitleDisplay",get:function(){var o=this.subtitleTrackController;return o?o.subtitleDisplay:!1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=o)}}]),g})(ce);ob.defaultConfig=void 0}),"./src/polyfills/number-isFinite.js":(function(e,n,a){"use strict";a.r(n),a.d(n,"isFiniteNumber",function(){return t});var t=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)}}),"./src/utils/get-self-scope.js":(function(e,n,a){"use strict";a.r(n),a.d(n,"getSelfScope",function(){return t});function t(){return typeof window>"u"?self:window}}),"./src/utils/logger.js":(function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return R}),a.d(n,"logger",function(){return E});var t=a("./src/utils/get-self-scope.js");function r(){}var u={trace:r,debug:r,log:r,warn:r,info:r,error:r},i=u;function l(w,I){return I="["+w+"] > "+I,I}var s=Object(t.getSelfScope)();function d(w){var I=s.console[w];return I?function(){for(var L=arguments.length,U=new Array(L),V=0;V1?I-1:0),U=1;U{"use strict";Object.defineProperty(uw,"__esModule",{value:!0});uw.Direction=void 0;var f5e;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(f5e=uw.Direction||(uw.Direction={}))});var VN=Ue(ft=>{"use strict";var iw=ft&&ft.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(d&&dt)return t;if(e=a)throw new RangeError("min (".concat(n,") is equal/bigger than max (").concat(a,")"));if(ea)throw new RangeError("value (".concat(e,") is bigger than max (").concat(a,")"))}ft.checkBoundaries=g5e;function D5e(e,n,a){return ea?a:e}ft.checkValuesAgainstBoundaries=D5e;function R5e(e){if(!(e.length<2)&&!e.slice(1).every(function(n,a){return e[a]<=n}))throw new RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))}ft.checkInitialOverlap=R5e;function y5e(e){var n=window.getComputedStyle(e);return{top:parseInt(n["margin-top"],10),bottom:parseInt(n["margin-bottom"],10),left:parseInt(n["margin-left"],10),right:parseInt(n["margin-right"],10)}}ft.getMargin=y5e;function w5e(e){var n=window.getComputedStyle(e);return{top:parseInt(n["padding-top"],10)+parseInt(n["border-top-width"],10),bottom:parseInt(n["padding-bottom"],10)+parseInt(n["border-bottom-width"],10),left:parseInt(n["padding-left"],10)+parseInt(n["border-left-width"],10),right:parseInt(n["padding-right"],10)+parseInt(n["border-right-width"],10)}}ft.getPaddingAndBorder=w5e;function b5e(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return rae(r,t*n[u].x,n[u].y)})}ft.translateThumbs=b5e;function E5e(e,n,a,t){for(var r=0,u=aae(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},G5e=function(e,n,a,t,r,u,i){i===void 0&&(i=function(d){return d});var l=[],s=function(d){var p=nae(a[d],t[d],r,u,i),R=n[d].x;n.forEach(function(E,w){var I=E.x,L=nae(a[w],t[w],r,u,i);d!==w&&(R>=I&&R<=I+L||R+p>=I&&R+p<=I+L)&&(l.includes(w)||(l.push(d),l.push(w),l=iw(iw([],l,!0),[d,w],!1),s(w)))})};return s(e),Array.from(new Set(l.sort()))},M5e=function(e,n,a,t,r,u){t===void 0&&(t=.1),r===void 0&&(r=" - "),u===void 0&&(u=function(w){return w});var i=(0,ft.getStepDecimals)(t),l=(0,zN.useState)({}),s=l[0],d=l[1],p=(0,zN.useState)(u(n[a].toFixed(i))),R=p[0],E=p[1];return(0,zN.useEffect)(function(){if(e){var w=e.getThumbs();if(w.length<1)return;var I={},L=e.getOffsets(),U=G5e(a,L,w,n,r,i,u),V=u(n[a].toFixed(i));if(U.length){var Q=U.reduce(function(ee,me,We,Qe){return ee.length?iw(iw([],ee,!0),[L[Qe[We]].x],!1):[L[Qe[We]].x]},[]);if(Math.min.apply(Math,Q)===L[a].x){var te=[];U.forEach(function(ee){te.push(n[ee].toFixed(i))}),V=Array.from(new Set(te.sort(function(ee,me){return parseFloat(ee)-parseFloat(me)}))).map(u).join(r);var le=Math.min.apply(Math,Q),ne=Math.max.apply(Math,Q),Z=w[U[Q.indexOf(ne)]].getBoundingClientRect().width;I.left="".concat(Math.abs(le-(ne+Z))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(V),d(I)}},[e,n]),[R,s]};ft.useThumbOverlap=M5e;function aae(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return tae(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var uae=Ue(wc=>{"use strict";var A5e=wc&&wc.__extends||(function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(t[u]=r[u])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}})(),L5e=wc&&wc.__createBinding||(Object.create?(function(e,n,a,t){t===void 0&&(t=a);var r=Object.getOwnPropertyDescriptor(n,a);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(e,t,r)}):(function(e,n,a,t){t===void 0&&(t=a),e[t]=n[a]})),P5e=wc&&wc.__setModuleDefault||(Object.create?(function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}):function(e,n){e.default=n}),N5e=wc&&wc.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var a in e)a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)&&L5e(n,e,a);return P5e(n,e),n},oae=wc&&wc.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var i=(0,_r.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.clientX,r.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,_r.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var u;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var i=(0,_r.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var u=(0,_r.isTouchEvent)(r);if(!(!u&&r.button!==0)){var i=t.getTargetIndex(r);i!==-1&&(u?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:i,thumbZIndexes:t.state.thumbZIndexes.map(function(l,s){return s===i?Math.max.apply(Math,t.state.thumbZIndexes):l<=t.state.thumbZIndexes[i]?l:l-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var u=t.props,i=u.values,l=u.onChange,s=u.step,d=u.rtl,p=u.direction,R=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),w=d||p===Au.Direction.Left||p===Au.Direction.Down?-1:1;E!==-1&&(O5e.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,_r.replaceAt)(i,E,t.normalizeValue(i[E]+w*(r.key==="PageUp"?s*10:s),E)))):U5e.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,_r.replaceAt)(i,E,t.normalizeValue(i[E]-w*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(r){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(r,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,d=t.props,p=d.direction,R=d.min,E=d.max,w=d.onChange,I=d.values,L=d.step,U=d.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var V=t.trackRef.current;if(!V)return null;var Q=V.getBoundingClientRect(),te=(0,_r.isVertical)(p)?Q.height:Q.width;if(s[0]!==-1&&s[1]!==-1){var le=r-s[0],ne=u-s[1],Z=0;switch(p){case Au.Direction.Right:case Au.Direction.Left:Z=le/te*(E-R);break;case Au.Direction.Down:case Au.Direction.Up:Z=ne/te*(E-R);break;default:(0,_r.assertUnreachable)(p)}if(U&&(Z*=-1),Math.abs(Z)>=L/2){for(var ee=0;eeE?Z=E-I[ee]:me=L/2&&w((0,_r.replaceAt)(I,l,t.normalizeValue(Qe,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,d=i.step,p=i.allowOverlap,R=i.values;return(0,_r.normalizeValue)(r,u,l,s,d,p,R)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,u=r.onFinalChange,i=r.values;u&&u(i)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var u=0;u-1?"grabbing":this.props.draggableTrack?(0,_r.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?_r.voidFn:this.onMouseDownTrack,onTouchStart:E?_r.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:oae(oae([],U.map(function(V,Q,te){return l({props:{style:a.props.direction===Au.Direction.Left||a.props.direction===Au.Direction.Right?{position:"absolute",left:"".concat(V[0],"px"),marginTop:"".concat(V[1],"px")}:{position:"absolute",top:"".concat(V[0],"px"),marginLeft:"".concat(V[1],"px")},key:"mark".concat(Q),ref:a.markRefs[Q]},index:Q})}),!0),s.map(function(V,Q){var te=a.state.draggedThumbIndex===Q;return u({index:Q,value:V,isDragged:te,props:{style:{position:"absolute",zIndex:L[Q],cursor:E?"inherit":te?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:Q,tabIndex:E?void 0:0,"aria-valuemax":R?p:s[Q+1]||p,"aria-valuemin":R?d:s[Q-1]||d,"aria-valuenow":V,draggable:!1,ref:a.thumbRefs[Q],role:"slider",onKeyDown:E?_r.voidFn:a.onKeyDown,onKeyUp:E?_r.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:Au.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n})(ZS.Component);wc.default=k5e});var iae=Ue(Ni=>{"use strict";var B5e=Ni&&Ni.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ni,"__esModule",{value:!0});Ni.checkValuesAgainstBoundaries=Ni.relativeValue=Ni.useThumbOverlap=Ni.Direction=Ni.getTrackBackground=Ni.Range=void 0;var H5e=B5e(uae());Ni.Range=H5e.default;var eC=VN();Object.defineProperty(Ni,"getTrackBackground",{enumerable:!0,get:function(){return eC.getTrackBackground}});Object.defineProperty(Ni,"useThumbOverlap",{enumerable:!0,get:function(){return eC.useThumbOverlap}});Object.defineProperty(Ni,"relativeValue",{enumerable:!0,get:function(){return eC.relativeValue}});Object.defineProperty(Ni,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return eC.checkValuesAgainstBoundaries}});var J5e=XS();Object.defineProperty(Ni,"Direction",{enumerable:!0,get:function(){return J5e.Direction}})});var LJe={};r8(LJe,{boot:()=>AJe});var u8=function(e){return function(n){for(var a=e.length,t=n.length,r=new Array(a*t),u=0,i=0;i=a.length?n:e(a[t])};var _8=function(e,n,a,t){for(var r=0,u=t.length;r=t.length)return n;var r=t.slice();return r.splice(a,1),e(r)};var ud=function(e){return e.slice().reverse()};var m8=function(e,n){return n.filter(e)};var d8=(function(){function e(n,a,t,r,u,i){var l,s,d,p,R,E,w;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,d=l,p=u;s0?(t[p++]=E,++d):(t[p++]=R,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var ir={show:B8};var H8=function(e){return e.showRecordFields},w_=function(){return function(){return function(e){var n=H8(e);return{show:function(a){return"{"+(n(lt.value)(a)+"}")}}}}};var ep={show:U8},pn={show:O8},jg={show:k8},sd={show:function(e){if(e)return"true";if(!e)return"false";throw new Error("Failed pattern match at Data.Show (line 29, column 1 - line 31, column 23): "+[e.constructor.name])}},oe=function(e){return e.show};var b_=function(e){var n=Vt(e);return function(a){var t=H8(a);return function(r){var u=oe(r);return{showRecordFields:function(i){return function(l){var s=t(lt.value)(l),d=n(lt.value),p=du(d)(l);return" "+(d+(": "+(u(p)+(","+s))))}}}}}},E_=function(e){var n=Vt(e);return function(a){var t=oe(a);return{showRecordFields:function(r){return function(u){var i=n(lt.value),l=du(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Se=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var je=(function(){function e(){}return e.value=new e,e})(),zg=function(e){return e};var vd=function(e){return e.to};var fd=function(e){return e.from};var rue=hn(En),G=(function(){function e(){}return e.value=new e,e})(),T=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var J8=function(e){var n=tn(e);return{append:function(a){return function(t){if(a instanceof G)return t;if(t instanceof G)return a;if(a instanceof T&&t instanceof T)return new T(n(a.value0)(t.value0));throw new Error("Failed pattern match at Data.Maybe (line 182, column 1 - line 185, column 43): "+[a.constructor.name,t.constructor.name])}}}};var Wn=function(e){return function(n){return function(a){if(a instanceof G)return e;if(a instanceof T)return n(a.value0);throw new Error("Failed pattern match at Data.Maybe (line 237, column 1 - line 237, column 51): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},yr=Wn(!0)(gn(!1)),Gr=Wn(!1)(gn(!0));var ue={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},oue=B(ue);var ze=function(e){return Wn(e)(rue)},lr=function(){return function(e){if(e instanceof T)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var $r=function(e){var n=be(e);return{eq:function(a){return function(t){return a instanceof G&&t instanceof G?!0:a instanceof T&&t instanceof T?n(a.value0)(t.value0):!1}}}},Ri=function(e){var n=xe(e),a=$r(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return He.value;if(t instanceof G)return ye.value;if(r instanceof G)return De.value;if(t instanceof T&&r instanceof T)return n(t.value0)(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 0, column 0 - line 0, column 0): "+[t.constructor.name,r.constructor.name])}},Eq0:function(){return a}}};var Ro={apply:function(e){return function(n){if(e instanceof T)return oue(e.value0)(n);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return ue}};var nn={bind:function(e){return function(n){if(e instanceof T)return n(e.value0);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return Ro}};var ka=(function(){return{pure:T.create,Apply0:function(){return Ro}}})();var hu={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return ue}},uue=(function(){return{empty:G.value,Alt0:function(){return hu}}})(),gu={Applicative0:function(){return ka},Plus1:function(){return uue}};var Me=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Le=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var Lc=function(e){return Wn(new Me(e))(Le.create)};var no={map:function(e){return function(n){if(n instanceof Me)return new Me(n.value0);if(n instanceof Le)return new Le(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},lue=B(no);var wr=function(e){return function(n){return function(a){if(a instanceof Me)return e(a.value0);if(a instanceof Le)return n(a.value0);throw new Error("Failed pattern match at Data.Either (line 208, column 1 - line 208, column 64): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},_f=(function(){return wr(gn(G.value))(T.create)})();var Vg={apply:function(e){return function(n){if(e instanceof Me)return new Me(e.value0);if(e instanceof Le)return lue(e.value0)(n);throw new Error("Failed pattern match at Data.Either (line 70, column 1 - line 72, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return no}};var yi={bind:wr(function(e){return function(n){return new Me(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return Vg}};var lv=(function(){return{pure:Le.create,Apply0:function(){return Vg}}})(),gb={Applicative0:function(){return lv},Bind1:function(){return yi}};var Dl=function(e){return e};var Es={map:function(e){return function(n){return e(n)}}};var q8={apply:function(e){return function(n){return e(n)}},Functor0:function(){return Es}},cue={bind:function(e){return function(n){return n(e)}},Apply0:function(){return q8}},_d={pure:Dl,Apply0:function(){return q8}},Or={Applicative0:function(){return _d},Bind1:function(){return cue}};var $8=function(e){return Math.min(Math.abs(e),2147483647)},W8=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},x8=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var ZF={Ring0:function(){return ov}};var Du=function(e){return e.mod};var go={degree:$8,div:W8,mod:x8,CommutativeRing0:function(){return ZF}},uu=function(e){return e.div};var cr={mempty:"",Semigroup0:function(){return Y0}};var Gt=function(e){return e.mempty};var z8=function(e){return function(){return e}},V8=function(e){return function(n){return function(){return n(e())()}}};var eG=function(e){return function(n){return function(){for(var a=0,t=e.length;a=0;u--)t=e(a[u])(t);return t}}},y7=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=0;u":e===void 0?"":e instanceof Date?e.toString():typeof Blob<"u"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var Qie=Ur(Je),Z7=Ts(C_),Kie=Zt(Je);var wd=function(e){return e.foldrWithIndex};var bd=function(e){return e.foldlWithIndex};var Yie=function(e){var n=wd(e);return function(a){var t=tn(a.Semigroup0()),r=Gt(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},vD={foldrWithIndex:function(e){return function(n){var a=Qie(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=Z7(yn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=Kie(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=Z7(yn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return Yie(vD)(e)},Foldable0:function(){return Je}};var eO=function(e){var n=bd(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof G?a(r)(i):u}}};return n(t)(G.value)}};var nO=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Er=function(e){return e},aO=function(e){return function(n){return function(a){var t;a<11?t="[0-"+(a-1).toString()+"]":a===11?t="[0-9a]":t="[0-9a-"+String.fromCharCode(86+a)+"]";var r=new RegExp("^[\\+\\-]?"+t+"+$","i");return function(u){if(r.test(u)){var i=parseInt(u,a);return(i|0)===i?e(i):n}else return n}}}};var Bb=isFinite;var IG=Math.abs;var Ed=Math.floor,TG=Math.log;var Hb=function(e){return function(n){return Math.pow(e,n)}};var Rp=Math.round;var tO=2.302585092994046;var rO=Fr(xg),oO=kt(xg);var rle=(function(){return aO(T.create)(G.value)})(),Cs=rle(10),Df=(function(){return nO(T.create)(G.value)})(),iO=function(e){if(!Bb(e))return 0;if(e>=Er(rO))return rO;if(e<=Er(oO))return oO;if($e)return ze(0)(Df(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},CG=function(e){return iO(Rp(e))};var Bu=function(e){return iO(Ed(e))};function fD(e){return Object.prototype.toString.call(e).slice(8,-1)}function A_(e){return e===null}function L_(e){return e===void 0}var Jb=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function lO(e){return e.stack||e.toString()}function Vi(e){return new Error(e)}function yp(e){return e.message}function qb(e){return function(){throw e}}var sO=function(e){return qb(Vi(e))};var vO={show:lO};var wo=function(e){return e.throwError};var Ar=function(e){return e.catchError};var P_=function(e){var n=Ar(e),a=e.MonadThrow0().Monad0(),t=B(a.Bind1().Apply0().Functor0()),r=x(a.Applicative0());return function(u){return n(t(Le.create)(u))(function(i){return r(Me.create(i))})}};var Mo={liftEffect:hn(En),Monad0:function(){return cv}},kn=function(e){return e.liftEffect};var lle=B(no);var xb=function(e){return e};var mD=function(e){return e};var jb=function(e){return function(n){return e(n)}},Cd=function(e){var n=B(e);return{map:function(a){return jb(n(lle(a)))}}};var _O=function(e){return{Applicative0:function(){return Zl(e)},Bind1:function(){return Uc(e)}}},Uc=function(e){var n=ae(e.Bind1()),a=x(e.Applicative0());return{bind:function(t){return function(r){return n(t)(wr(function(u){return a(Me.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return zb(e)}}},zb=function(e){var n=Cd(e.Bind1().Apply0().Functor0());return{apply:dl(_O(e)),Functor0:function(){return n}}},Zl=function(e){return{pure:(function(){var n=x(e.Applicative0());return function(a){return xb(n(Le.create(a)))}})(),Apply0:function(){return zb(e)}}};var Vb=function(e){var n=_O(e);return{throwError:(function(){var a=x(e.Applicative0());return function(t){return xb(a(Me.create(t)))}})(),Monad0:function(){return n}}};var dD=function(e){var n=tn(e);return function(a){var t=a.Bind1(),r=ae(t),u=x(a.Applicative0()),i=Cd(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(d){if(d instanceof Le)return u(new Le(d.value0));if(d instanceof Me)return r(s)(function(p){if(p instanceof Le)return u(new Le(p.value0));if(p instanceof Me)return u(new Me(n(d.value0)(p.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 87, column 9 - line 89, column 49): "+[p.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 83, column 5 - line 89, column 49): "+[d.constructor.name])})}},Functor0:function(){return i}}}};var wl=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})();var Qb=function(e){var n=ku(e);return function(a){return new wl(a,n)}};var FG=function(e){var n=B(e);return{map:function(a){return function(t){return new wl(a(t.value0),n(a)(t.value1))}}}};var GG=function(e){var n=Go(e),a=Zt(e),t=Ur(e);return{foldMap:function(r){var u=tn(r.Semigroup0()),i=n(r);return function(l){return function(s){return u(l(s.value0))(i(l)(s.value1))}}},foldl:function(r){return function(u){return function(i){return a(r)(r(u)(i.value0))(i.value1)}}},foldr:function(r){return function(u){return function(i){return r(i.value0)(t(r)(u)(i.value1))}}}}};var Lr=(function(){function e(){}return e.value=new e,e})(),Mt=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),Kb=function(e){return e},hle=function(e){return new Mt(e.value0,e.value1)};var gle=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,d){if(d instanceof Mt&&d.value1 instanceof Mt&&d.value1.value1 instanceof Mt){r=new Mt(d,s),t=d.value1.value1.value1;return}var p=function(E){return E instanceof Mt&&E.value1 instanceof Mt&&E.value1.value1 instanceof Lr?new Mt(e(E.value0),new Mt(e(E.value1.value0),Lr.value)):E instanceof Mt&&E.value1 instanceof Lr?new Mt(e(E.value0),Lr.value):Lr.value},R=function(E){return function(w){var I=E,L=!1,U;function V(Q,te){if(Q instanceof Mt&&Q.value0 instanceof Mt&&Q.value0.value1 instanceof Mt&&Q.value0.value1.value1 instanceof Mt){I=Q.value1,w=new Mt(e(Q.value0.value0),new Mt(e(Q.value0.value1.value0),new Mt(e(Q.value0.value1.value1.value0),te)));return}return L=!0,te}for(;!L;)U=V(I,w);return U}};return u=!0,R(s)(p(d))}for(;!u;)i=l(r,t);return i}};return n(Lr.value)},MG={map:gle};var Yb=FG(MG),Qo={foldr:function(e){return function(n){var a=(function(){var r=function(u){return function(i){var l=u,s=!1,d;function p(R,E){if(E instanceof Lr)return s=!0,R;if(E instanceof Mt){l=new Mt(E.value0,R),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[R.constructor.name,E.constructor.name])}for(;!s;)d=p(l,i);return d}};return r(Lr.value)})(),t=Zt(Qo)(it(e))(n);return function(r){return t(a(r))}}},foldl:function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,d){if(d instanceof Lr)return u=!0,s;if(d instanceof Mt){r=e(s)(d.value0),t=d.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[d.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=tn(e.Semigroup0()),a=Gt(e);return function(t){return Zt(Qo)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var Dle=Ur(Qo);var gD=GG(Qo);var Xb={append:function(e){return function(n){return Dle(Mt.create)(n)(e)}}},hO=tn(Xb);var DD={append:function(e){return function(n){return new wl(e.value0,hO(e.value1)(hle(n)))}}};var gO={alt:hO,Functor0:function(){return MG}},AG=(function(){return{empty:Lr.value,Alt0:function(){return gO}}})();var Sle=$t(n7);var wO=function(e){return new Mt(e,Lr.value)};var LG=(function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Lr)return r=!0,l;if(s instanceof Mt){t=new Mt(s.value0,l),a=s.value1;return}throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[l.constructor.name,s.constructor.name])}for(;!r;)u=i(t,a);return u}};return e(Lr.value)})();var PG=function(e){var n=ae(e.Monad0().Bind1()),a=ai(e);return function(t){var r=t.Plus1().Alt0(),u=La(r),i=B(r.Functor0()),l=x(t.Applicative0());return function(s){var d=function(p){return n(u(i(Yr.create)(s))(l(new Wr(void 0))))(function(R){return l(Sle(function(E){return new Mt(E,p)})(function(E){return LG(p)})(R))})};return a(d)(Lr.value)}}};var Hu=function(e){return Ur(e)(Mt.create)(Lr.value)};var bO=function(e){return e()};var EO=function(e){throw new Error(e)};var IO=function(){return EO};var Mle=IO(),Ale=bO,bl=function(e){return Ale(function(){return Mle(e)})};var yD=(function(){var e=Qb(AG);return function(n){return Kb(e(n))}})();var CO=function(e){return e.value0};var Gd=function(e){return e.join("")},wD=function(e){return e.split("")},Qi=function(e){return e},FO=function(e){return function(n){return function(a){return function(t){return a>=0&&a=0&&e=0&&e<100&&l.setUTCFullYear(e),l.getTime()};function qO(e,n){var a=JG(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=JG(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function $O(e){return function(n){return function(a){return function(t){var r=JG(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond),u=new Date(r+a);return isNaN(u.getTime())?n:e({year:u.getUTCFullYear(),month:u.getUTCMonth()+1,day:u.getUTCDate(),hour:u.getUTCHours(),minute:u.getUTCMinutes(),second:u.getUTCSeconds(),millisecond:u.getUTCMilliseconds()})}}}}var WO=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function xO(e,n,a,t){var r=WO(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function jO(e,n,a){return WO(e,n-1,a).getUTCDay()}function H_(e){return e.charCodeAt(0)}function zO(e){return String.fromCharCode(e)}var Ko=function(e){var n=x(e.Applicative0()),a=ku(e.Plus1());return function(t){if(t)return n(void 0);if(!t)return a;throw new Error("Failed pattern match at Control.Alternative (line 48, column 1 - line 48, column 54): "+[t.constructor.name])}};var VO=kt(y_),QO=Fr(y_);var Fa=function(e){return e.toEnum};var Yn=function(e){return e.fromEnum},$G=function(e){var n=Fa(e),a=Yn(e),t=kt(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof T)return l.value0;if(l instanceof G){var s=i=H_(VO)&&e<=H_(QO)?new T(zO(e)):G.value},uce={succ:Cp(qG)(H_),pred:Fp(qG)(H_),Ord0:function(){return db}};var Gp=(function(){return{cardinality:H_(QO)-H_(VO)|0,toEnum:qG,fromEnum:H_,Bounded0:function(){return y_},Enum1:function(){return uce}}})();var r1=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},KO=oe(pn);var nc=(function(){function e(){}return e.value=new e,e})(),Hc=(function(){function e(){}return e.value=new e,e})(),Jc=(function(){function e(){}return e.value=new e,e})(),qc=(function(){function e(){}return e.value=new e,e})(),$c=(function(){function e(){}return e.value=new e,e})(),Wc=(function(){function e(){}return e.value=new e,e})(),As=(function(){function e(){}return e.value=new e,e})(),Ii=(function(){function e(){}return e.value=new e,e})(),Ki=(function(){function e(){}return e.value=new e,e})(),Ti=(function(){function e(){}return e.value=new e,e})(),Yi=(function(){function e(){}return e.value=new e,e})(),Xi=(function(){function e(){}return e.value=new e,e})(),Si=(function(){function e(){}return e.value=new e,e})(),Ci=(function(){function e(){}return e.value=new e,e})(),Zi=(function(){function e(){}return e.value=new e,e})(),el=(function(){function e(){}return e.value=new e,e})(),nl=(function(){function e(){}return e.value=new e,e})(),al=(function(){function e(){}return e.value=new e,e})(),Sl=(function(){function e(){}return e.value=new e,e})();var YO={show:function(e){return"(Year "+(KO(e)+")")}},XO={show:function(e){if(e instanceof nc)return"Monday";if(e instanceof Hc)return"Tuesday";if(e instanceof Jc)return"Wednesday";if(e instanceof qc)return"Thursday";if(e instanceof $c)return"Friday";if(e instanceof Wc)return"Saturday";if(e instanceof As)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},o1={show:function(e){if(e instanceof Ii)return"January";if(e instanceof Ki)return"February";if(e instanceof Ti)return"March";if(e instanceof Yi)return"April";if(e instanceof Xi)return"May";if(e instanceof Si)return"June";if(e instanceof Ci)return"July";if(e instanceof Zi)return"August";if(e instanceof el)return"September";if(e instanceof nl)return"October";if(e instanceof al)return"November";if(e instanceof Sl)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},ZO={show:function(e){return"(Day "+(KO(e)+")")}},u1=Ca,i1=Ca,e6=Wt,ice={eq:function(e){return function(n){return e instanceof nc&&n instanceof nc||e instanceof Hc&&n instanceof Hc||e instanceof Jc&&n instanceof Jc||e instanceof qc&&n instanceof qc||e instanceof $c&&n instanceof $c||e instanceof Wc&&n instanceof Wc||e instanceof As&&n instanceof As}}},n6={compare:function(e){return function(n){if(e instanceof nc&&n instanceof nc)return He.value;if(e instanceof nc)return ye.value;if(n instanceof nc)return De.value;if(e instanceof Hc&&n instanceof Hc)return He.value;if(e instanceof Hc)return ye.value;if(n instanceof Hc)return De.value;if(e instanceof Jc&&n instanceof Jc)return He.value;if(e instanceof Jc)return ye.value;if(n instanceof Jc)return De.value;if(e instanceof qc&&n instanceof qc)return He.value;if(e instanceof qc)return ye.value;if(n instanceof qc)return De.value;if(e instanceof $c&&n instanceof $c)return He.value;if(e instanceof $c)return ye.value;if(n instanceof $c)return De.value;if(e instanceof Wc&&n instanceof Wc)return He.value;if(e instanceof Wc)return ye.value;if(n instanceof Wc)return De.value;if(e instanceof As&&n instanceof As)return He.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return ice}},WG={eq:function(e){return function(n){return e instanceof Ii&&n instanceof Ii||e instanceof Ki&&n instanceof Ki||e instanceof Ti&&n instanceof Ti||e instanceof Yi&&n instanceof Yi||e instanceof Xi&&n instanceof Xi||e instanceof Si&&n instanceof Si||e instanceof Ci&&n instanceof Ci||e instanceof Zi&&n instanceof Zi||e instanceof el&&n instanceof el||e instanceof nl&&n instanceof nl||e instanceof al&&n instanceof al||e instanceof Sl&&n instanceof Sl}}},Nd={compare:function(e){return function(n){if(e instanceof Ii&&n instanceof Ii)return He.value;if(e instanceof Ii)return ye.value;if(n instanceof Ii)return De.value;if(e instanceof Ki&&n instanceof Ki)return He.value;if(e instanceof Ki)return ye.value;if(n instanceof Ki)return De.value;if(e instanceof Ti&&n instanceof Ti)return He.value;if(e instanceof Ti)return ye.value;if(n instanceof Ti)return De.value;if(e instanceof Yi&&n instanceof Yi)return He.value;if(e instanceof Yi)return ye.value;if(n instanceof Yi)return De.value;if(e instanceof Xi&&n instanceof Xi)return He.value;if(e instanceof Xi)return ye.value;if(n instanceof Xi)return De.value;if(e instanceof Si&&n instanceof Si)return He.value;if(e instanceof Si)return ye.value;if(n instanceof Si)return De.value;if(e instanceof Ci&&n instanceof Ci)return He.value;if(e instanceof Ci)return ye.value;if(n instanceof Ci)return De.value;if(e instanceof Zi&&n instanceof Zi)return He.value;if(e instanceof Zi)return ye.value;if(n instanceof Zi)return De.value;if(e instanceof el&&n instanceof el)return He.value;if(e instanceof el)return ye.value;if(n instanceof el)return De.value;if(e instanceof nl&&n instanceof nl)return He.value;if(e instanceof nl)return ye.value;if(n instanceof nl)return De.value;if(e instanceof al&&n instanceof al)return He.value;if(e instanceof al)return ye.value;if(n instanceof al)return De.value;if(e instanceof Sl&&n instanceof Sl)return He.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return WG}},a6=Wt,l1=(function(){return{bottom:-271820,top:275759,Ord0:function(){return u1}}})(),lce=(function(){return{bottom:nc.value,top:As.value,Ord0:function(){return n6}}})(),c1=(function(){return{bottom:Ii.value,top:Sl.value,Ord0:function(){return Nd}}})(),su={cardinality:547580,toEnum:function(e){if(e>=-271820&&e<=275759)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 35, column 1 - line 40, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return l1},Enum1:function(){return cce(0)}},cce=r1("enumYear","Data.Date.Component",function(){return{succ:(function(){var e=Fa(su),n=Yn(su);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(su),n=Yn(su);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return u1}}});var J_={cardinality:7,toEnum:function(e){return e===1?new T(nc.value):e===2?new T(Hc.value):e===3?new T(Jc.value):e===4?new T(qc.value):e===5?new T($c.value):e===6?new T(Wc.value):e===7?new T(As.value):G.value},fromEnum:function(e){if(e instanceof nc)return 1;if(e instanceof Hc)return 2;if(e instanceof Jc)return 3;if(e instanceof qc)return 4;if(e instanceof $c)return 5;if(e instanceof Wc)return 6;if(e instanceof As)return 7;throw new Error("Failed pattern match at Data.Date.Component (line 175, column 14 - line 182, column 16): "+[e.constructor.name])},Bounded0:function(){return lce},Enum1:function(){return sce(0)}},sce=r1("enumWeekday","Data.Date.Component",function(){return{succ:(function(){var e=Fa(J_),n=Yn(J_);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(J_),n=Yn(J_);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return n6}}});var Do={cardinality:12,toEnum:function(e){return e===1?new T(Ii.value):e===2?new T(Ki.value):e===3?new T(Ti.value):e===4?new T(Yi.value):e===5?new T(Xi.value):e===6?new T(Si.value):e===7?new T(Ci.value):e===8?new T(Zi.value):e===9?new T(el.value):e===10?new T(nl.value):e===11?new T(al.value):e===12?new T(Sl.value):G.value},fromEnum:function(e){if(e instanceof Ii)return 1;if(e instanceof Ki)return 2;if(e instanceof Ti)return 3;if(e instanceof Yi)return 4;if(e instanceof Xi)return 5;if(e instanceof Si)return 6;if(e instanceof Ci)return 7;if(e instanceof Zi)return 8;if(e instanceof el)return 9;if(e instanceof nl)return 10;if(e instanceof al)return 11;if(e instanceof Sl)return 12;throw new Error("Failed pattern match at Data.Date.Component (line 87, column 14 - line 99, column 19): "+[e.constructor.name])},Bounded0:function(){return c1},Enum1:function(){return vce(0)}},vce=r1("enumMonth","Data.Date.Component",function(){return{succ:(function(){var e=Fa(Do),n=Yn(Do);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(Do),n=Yn(Do);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return Nd}}});var GD={bottom:1,top:31,Ord0:function(){return i1}},Tl={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return GD},Enum1:function(){return fce(0)}},fce=r1("enumDay","Data.Date.Component",function(){return{succ:(function(){var e=Fa(Tl),n=Yn(Tl);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(Tl),n=Yn(Tl);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return i1}}});var Od=Tb()();var t6=hn(En),s1=function(e){return e},r6=function(e){return e},Ud=function(e){return e};var o6=function(e){return e},MD=function(e){return e.toDuration};var u6={append:function(e){return function(n){return e+n}}};var v1={append:function(e){return function(n){return e+n}}};var i6=uv;var l6=uv;var xG=function(e){return e.fromDuration};var Sf={fromDuration:Od(s1)(function(e){return e*1e3}),toDuration:Od(Ud)(function(e){return e/1e3})},Mp={fromDuration:Od(r6)(function(e){return e*6e4}),toDuration:Od(Ud)(function(e){return e/6e4})},kd={fromDuration:t6,toDuration:t6};var jG={fromDuration:Od(o6)(function(e){return e*864e5}),toDuration:Od(Ud)(function(e){return e/864e5})};var s6=Yn(Do),zG=lr(),c6=Fa(J_),pce=oe(YO),mce=oe(o1),dce=oe(ZO);var hce=be(e6),gce=be(WG),Dce=be(a6),Rce=xe(u1),yce=xe(Nd),wce=xe(i1);var bce=Fa(Do);var f1=(function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e})(),Fl=function(e){return e.value0},AD=function(e){var n=jO(e.value0,s6(e.value1),e.value2),a=n===0;return zG(c6(a?7:n))},v6={show:function(e){return"(Date "+(pce(e.value0)+(" "+(mce(e.value1)+(" "+(dce(e.value2)+")")))))}},Gl=function(e){return e.value1};var _1={eq:function(e){return function(n){return hce(e.value0)(n.value0)&&gce(e.value1)(n.value1)&&Dce(e.value2)(n.value2)}}},Ece=be(_1),KG={compare:function(e){return function(n){var a=Rce(e.value0)(n.value0);if(a instanceof ye)return ye.value;if(a instanceof De)return De.value;var t=yce(e.value1)(n.value1);return t instanceof ye?ye.value:t instanceof De?De.value:wce(e.value2)(n.value2)}},Eq0:function(){return _1}};var Dv=function(e){return e.value2},q_=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new f1(r,zG(bce(u)),i)}}};return xO(t,e,s6(n),a)}}},p1=function(e){return function(n){return function(a){var t=new f1(e,n,a),r=Ece(q_(e)(n)(a))(t);return r?new T(t):G.value}}},YG=(function(){return{bottom:new f1(kt(l1),kt(c1),kt(GD)),top:new f1(Fr(l1),Fr(c1),Fr(GD)),Ord0:function(){return KG}}})();var m1=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},d1=oe(pn);var f6={show:function(e){return"(Second "+(d1(e)+")")}},_6={show:function(e){return"(Minute "+(d1(e)+")")}},p6={show:function(e){return"(Millisecond "+(d1(e)+")")}},m6={show:function(e){return"(Hour "+(d1(e)+")")}},h1=Ca,g1=Ca,D1=Ca,R1=Ca,d6=Wt,h6=Wt,g6=Wt,D6=Wt,LD={bottom:0,top:59,Ord0:function(){return h1}},PD={bottom:0,top:59,Ord0:function(){return g1}},ND={bottom:0,top:999,Ord0:function(){return D1}},OD={bottom:0,top:23,Ord0:function(){return R1}},ac={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return LD},Enum1:function(){return Ice(0)}},Ice=m1("enumSecond","Data.Time.Component",function(){return{succ:(function(){var e=Fa(ac),n=Yn(ac);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(ac),n=Yn(ac);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return h1}}});var tc={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return PD},Enum1:function(){return Tce(0)}},Tce=m1("enumMinute","Data.Time.Component",function(){return{succ:(function(){var e=Fa(tc),n=Yn(tc);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(tc),n=Yn(tc);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return g1}}});var tl={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return ND},Enum1:function(){return Sce(0)}},Sce=m1("enumMillisecond","Data.Time.Component",function(){return{succ:(function(){var e=Fa(tl),n=Yn(tl);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(tl),n=Yn(tl);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return D1}}});var rc={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return OD},Enum1:function(){return Cce(0)}},Cce=m1("enumHour","Data.Time.Component",function(){return{succ:(function(){var e=Fa(rc),n=Yn(rc);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(rc),n=Yn(rc);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return R1}}});var Mce=oe(m6),Ace=oe(_6),Lce=oe(f6),Pce=oe(p6);var Nce=be(D6),Oce=be(h6),Uce=be(d6),kce=be(g6),Bce=xe(R1),Hce=xe(g1),Jce=xe(h1),qce=xe(D1);var Rv=(function(){function e(n,a,t,r){this.value0=n,this.value1=a,this.value2=t,this.value3=r}return e.create=function(n){return function(a){return function(t){return function(r){return new e(n,a,t,r)}}}},e})(),R6={show:function(e){return"(Time "+(Mce(e.value0)+(" "+(Ace(e.value1)+(" "+(Lce(e.value2)+(" "+(Pce(e.value3)+")")))))))}};var Ff=function(e){return e.value2},yv=function(e){return e.value1},xc=function(e){return e.value3};var Ls=function(e){return e.value0};var XG={eq:function(e){return function(n){return Nce(e.value0)(n.value0)&&Oce(e.value1)(n.value1)&&Uce(e.value2)(n.value2)&&kce(e.value3)(n.value3)}}},ZG={compare:function(e){return function(n){var a=Bce(e.value0)(n.value0);if(a instanceof ye)return ye.value;if(a instanceof De)return De.value;var t=Hce(e.value1)(n.value1);if(t instanceof ye)return ye.value;if(t instanceof De)return De.value;var r=Jce(e.value2)(n.value2);return r instanceof ye?ye.value:r instanceof De?De.value:qce(e.value3)(n.value3)}},Eq0:function(){return XG}};var Bd=(function(){return{bottom:new Rv(kt(OD),kt(PD),kt(LD),kt(ND)),top:new Rv(Fr(OD),Fr(PD),Fr(LD),Fr(ND)),Ord0:function(){return ZG}}})();var $ce=Yn(su),Wce=Yn(Do),xce=Yn(Tl),jce=Yn(rc),zce=Yn(tc),Vce=Yn(ac),Qce=Yn(tl),Kce=oe(v6),Yce=oe(R6),Xce=be(_1),Zce=be(XG),ese=xe(KG),nse=xe(ZG),ase=ae(nn),Hd=va(Ro),eM=B(ue),tse=Hi(nn),rse=Fa(su),ose=Fa(Do),use=Fa(Tl),ise=Fa(rc),lse=Fa(tc),cse=Fa(ac),sse=Fa(tl),jc=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),nM=function(e){return{year:$ce(Fl(e.value0)),month:Wce(Gl(e.value0)),day:xce(Dv(e.value0)),hour:jce(Ls(e.value1)),minute:zce(yv(e.value1)),second:Vce(Ff(e.value1)),millisecond:Qce(xc(e.value1))}},UD=function(e){return e.value1},y6={show:function(e){return"(DateTime "+(Kce(e.value0)+(" "+(Yce(e.value1)+")")))}};var vse={eq:function(e){return function(n){return Xce(e.value0)(n.value0)&&Zce(e.value1)(n.value1)}}},Ml={compare:function(e){return function(n){var a=ese(e.value0)(n.value0);return a instanceof ye?ye.value:a instanceof De?De.value:nse(e.value1)(n.value1)}},Eq0:function(){return vse}},Al=function(e){var n=MD(e);return function(a){return function(t){return n(qO(nM(a),nM(t)))}}},Mf=function(e){return e.value0},Jd=(function(){return{bottom:new jc(kt(YG),kt(Bd)),top:new jc(Fr(YG),Fr(Bd)),Ord0:function(){return Ml}}})(),wv=function(e){var n=xG(e);return function(a){return function(t){return ase($O(T.create)(G.value)(n(a))(nM(t)))(function(r){return Hd(eM(jc.create)(tse(Hd(Hd(eM(p1)(rse(r.year)))(ose(r.month)))(use(r.day)))))(Hd(Hd(Hd(eM(Rv.create)(ise(r.hour)))(lse(r.minute)))(cse(r.second)))(sse(r.millisecond)))})}}};var Gi=(function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",d="Sequential",p="Map",R="Apply",E="Alt",w="Cons",I="Resume",L="Release",U="Finalizer",V="Finalized",Q="Forked",te="Fiber",le="Thunk";function ne(Xe,Wa,At,zn){this.tag=Xe,this._1=Wa,this._2=At,this._3=zn}function Z(Xe){var Wa=function(At,zn,Un){return new ne(Xe,At,zn,Un)};return Wa.tag=Xe,Wa}function ee(Xe){return new ne(n,void 0)}function me(Xe){try{Xe()}catch(Wa){setTimeout(function(){throw Wa},0)}}function We(Xe,Wa,At){try{return Wa(At())}catch(zn){return Xe(zn)}}function Qe(Xe,Wa,At){try{return Wa(At)()}catch(zn){return At(Xe(zn))(),ee}}var dn=(function(){var Xe=1024,Wa=0,At=0,zn=new Array(Xe),Un=!1;function Ze(){var Ma;for(Un=!0;Wa!==0;)Wa--,Ma=zn[At],zn[At]=void 0,At=(At+1)%Xe,Ma();Un=!1}return{isDraining:function(){return Un},enqueue:function(Ma){var Ja,pt;Wa===Xe&&(pt=Un,Ze(),Un=pt),zn[(At+Wa)%Xe]=Ma,Wa++,Un||Ze()}}})();function qn(Xe){var Wa={},At=0,zn=0;return{register:function(Un){var Ze=At++;Un.onComplete({rethrow:!0,handler:function(Ma){return function(){zn--,delete Wa[Ze]}}})(),Wa[Ze]=Un,zn++},isEmpty:function(){return zn===0},killAll:function(Un,Ze){return function(){if(zn===0)return Ze();var Ma=0,Ja={};function pt(In){Ja[In]=Wa[In].kill(Un,function(Oa){return function(){delete Ja[In],Ma--,Xe.isLeft(Oa)&&Xe.fromLeft(Oa)&&setTimeout(function(){throw Xe.fromLeft(Oa)},0),Ma===0&&Ze()}})()}for(var tr in Wa)Wa.hasOwnProperty(tr)&&(Ma++,pt(tr));return Wa={},At=0,zn=0,function(In){return new ne(r,function(){for(var Oa in Ja)Ja.hasOwnProperty(Oa)&&Ja[Oa]()})}}}}}var Mn=0,An=1,Hn=2,Ia=3,Da=4,ha=5,Rt=6;function _t(Xe,Wa,At){var zn=0,Un=Mn,Ze=At,Ma=null,Ja=null,pt=null,tr=null,In=null,Oa=0,hr=0,za=null,jt=!0;function W(P){for(var O,j,K;;)switch(O=null,j=null,K=null,Un){case Hn:Un=An;try{Ze=pt(Ze),tr===null?pt=null:(pt=tr._1,tr=tr._2)}catch(ce){Un=ha,Ma=Xe.left(ce),Ze=null}break;case Ia:Xe.isLeft(Ze)?(Un=ha,Ma=Ze,Ze=null):pt===null?Un=ha:(Un=Hn,Ze=Xe.fromRight(Ze));break;case An:switch(Ze.tag){case i:pt&&(tr=new ne(w,pt,tr)),pt=Ze._2,Un=An,Ze=Ze._1;break;case n:pt===null?(Un=ha,Ze=Xe.right(Ze._1)):(Un=Hn,Ze=Ze._1);break;case r:Un=Ia,Ze=We(Xe.left,Xe.right,Ze._1);break;case u:Un=Da,Ze=Qe(Xe.left,Ze._1,function(ce){return function(){zn===P&&(zn++,dn.enqueue(function(){zn===P+1&&(Un=Ia,Ze=ce,W(zn))}))}});return;case a:Un=ha,Ma=Xe.left(Ze._1),Ze=null;break;case t:pt===null?In=new ne(w,Ze,In,Ja):In=new ne(w,Ze,new ne(w,new ne(I,pt,tr),In,Ja),Ja),pt=null,tr=null,Un=An,Ze=Ze._1;break;case l:Oa++,pt===null?In=new ne(w,Ze,In,Ja):In=new ne(w,Ze,new ne(w,new ne(I,pt,tr),In,Ja),Ja),pt=null,tr=null,Un=An,Ze=Ze._1;break;case s:Un=Ia,O=_t(Xe,Wa,Ze._2),Wa&&Wa.register(O),Ze._1&&O.run(),Ze=Xe.right(O);break;case d:Un=An,Ze=Sr(Xe,Wa,Ze._1);break}break;case ha:if(pt=null,tr=null,In===null)Un=Rt,Ze=Ja||Ma||Ze;else switch(O=In._3,K=In._1,In=In._2,K.tag){case t:Ja&&Ja!==O&&Oa===0?Un=ha:Ma&&(Un=An,Ze=K._2(Xe.fromLeft(Ma)),Ma=null);break;case I:Ja&&Ja!==O&&Oa===0||Ma?Un=ha:(pt=K._1,tr=K._2,Un=Hn,Ze=Xe.fromRight(Ze));break;case l:Oa--,Ma===null&&(j=Xe.fromRight(Ze),In=new ne(w,new ne(L,K._2,j),In,O),(Ja===O||Oa>0)&&(Un=An,Ze=K._3(j)));break;case L:In=new ne(w,new ne(V,Ze,Ma),In,Ja),Un=An,Ja&&Ja!==O&&Oa===0?Ze=K._1.killed(Xe.fromLeft(Ja))(K._2):Ma?Ze=K._1.failed(Xe.fromLeft(Ma))(K._2):Ze=K._1.completed(Xe.fromRight(Ze))(K._2),Ma=null,Oa++;break;case U:Oa++,In=new ne(w,new ne(V,Ze,Ma),In,Ja),Un=An,Ze=K._1;break;case V:Oa--,Un=ha,Ze=K._1,Ma=K._2;break}break;case Rt:for(var ve in za)za.hasOwnProperty(ve)&&(jt=jt&&za[ve].rethrow,me(za[ve].handler(Ze)));za=null,Ja&&Ma?setTimeout(function(){throw Xe.fromLeft(Ma)},0):Xe.isLeft(Ze)&&jt&&setTimeout(function(){if(jt)throw Xe.fromLeft(Ze)},0);return;case Mn:Un=An;break;case Da:return}}function X(P){return function(){if(Un===Rt)return jt=jt&&P.rethrow,P.handler(Ze)(),function(){};var O=hr++;return za=za||{},za[O]=P,function(){za!==null&&delete za[O]}}}function k(P,O){return function(){if(Un===Rt)return O(Xe.right(void 0))(),function(){};var j=X({rethrow:!1,handler:function(){return O(Xe.right(void 0))}})();switch(Un){case Mn:Ja=Xe.left(P),Un=Rt,Ze=Ja,W(zn);break;case Da:Ja===null&&(Ja=Xe.left(P)),Oa===0&&(Un===Da&&(In=new ne(w,new ne(U,Ze(P)),In,Ja)),Un=ha,Ze=null,Ma=null,W(++zn));break;default:Ja===null&&(Ja=Xe.left(P)),Oa===0&&(Un=ha,Ze=null,Ma=null)}return j}}function S(P){return function(){var O=X({rethrow:!1,handler:P})();return Un===Mn&&W(zn),O}}return{kill:k,join:S,onComplete:X,isSuspended:function(){return Un===Mn},run:function(){Un===Mn&&(dn.isDraining()?W(zn):dn.enqueue(function(){W(zn)}))}}}function Ha(Xe,Wa,At,zn){var Un=0,Ze={},Ma=0,Ja={},pt=new Error("[ParAff] Early exit"),tr=null,In=e;function Oa(X,k,S){var P=k,O=null,j=null,K=0,ve={},ce,Te;e:for(;;)switch(ce=null,P.tag){case Q:if(P._3===e&&(ce=Ze[P._1],ve[K++]=ce.kill(X,function(Ae){return function(){K--,K===0&&S(Ae)()}})),O===null)break e;P=O._2,j===null?O=null:(O=j._1,j=j._2);break;case p:P=P._2;break;case R:case E:O&&(j=new ne(w,O,j)),O=P,P=P._1;break}if(K===0)S(Xe.right(void 0))();else for(Te=0,ce=K;Te()=>e.props.def;function K6(e){class n extends vt.Component{constructor(t){super(t),t.init&&t.init(this)()}render(){return this.props.render(this)()}componentDidMount(){this.props.componentDidMount(this)()}componentWillUnmount(){this.props.componentWillUnmount(this)()}}return n.displayName=e?"Elmish_"+e:"ElmishRoot",n}var I1=typeof module>"u"?void 0:module.require,aQe=(function(){try{return I1===void 0?void 0:I1("util")}catch{return}})();var tQe=(function(){var e;if(typeof performance<"u")e=performance;else if(I1)try{e=I1("perf_hooks").performance}catch{}return(function(){return(e||Date).now()})})();var Y6=(e,n)=>n[e],X6=(e,n,a)=>a[e]=n;var zd=function(n){return function(a){return n(a)()}};var Np=function(n){return function(a){return function(){return n(a)}}},j_=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},Op=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var uve=ge(ca),VD=(function(){function e(){}return e.value=new e,e})(),nU=function(){return function(e){var n=Vt(e);return function(a){return Op(X6)(n(lt.value))}}},lM=function(e){var n=sr(e);return function(a){var t=Vt(a);return function(r){return function(u){return uve(function(){return Y6(t(lt.value),u)})(n)}}}};Ct();var uc=window.ReactDOM,{createPortal:aU,findDOMNode:sQe,flushSync:vQe,unstable_batchedUpdates:fQe}=window.ReactDOM;var GM=ml(zU(),1);function VU(e){return e.state&&e.state.s}function QU(e,n,a){return e.setState({s:n},a)}function KU(e,n){return e.state={s:n}}var YU=uc.render,XU=uc.hydrate,MM=GM.default&&GM.default.renderToString||(e=>""),kve=uc.unmountComponentAtNode,ZU=vt.Fragment;function e5(e,n,a){return vt.createElement.apply(null,[e,Bve(e,n)].concat(a))}function Bve(e,n){if(typeof e!="string"||n._data==null)return n;var a={_data:void 0};for(var t in n._data){var r=n._data[t];a["data-"+t]=r}return Object.assign({},n,a)}function n5(e){return n=>e===n}var P1=function(e){return function(n){return function(a){var t=he(a);if(e instanceof G&&t instanceof G)return void 0;if(e instanceof T&&t instanceof G)return void 0;if(e instanceof T&&t instanceof T){if(n5(e.value0)(t.value0))return void 0;if($e)return n(new T(t.value0))()}return n(t)()}}};var ie={asReactChildren:function(e){return[e]}},on={asReactChildren:function(e){return[e]}},Ce={asReactChildren:hn(En)};var cn=Ke,AM=Op(QU),a5=j_(YU),t5=j_(XU),r5=Np(VU),Aa=!1;var o5=j_(KU),nR=function(e){return e.asReactChildren},ic=function(){return function(e){var n=nR(e);return function(a){return function(t){return function(r){return e5(a,t,n(r))}}}}},u5=ic()(Ce),Ev=function(){return function(e){return function(n){return u5(e)(n)([])}}},Oe=u5(ZU)({});var LM=B(ca),$ve=x(St),i5=function(e){return{initialize:function(n){return o5(n)(e.initialState)},getState:function(n){return function(){var t=LM(he)(r5(n))();return ze(e.initialState)(t)}},setState:AM}},l5=(function(){var e=function(n){return function(a){return{initialize:function(t){return tp(new T(a.initialState))(n)},getState:function(t){return LM(ze(a.initialState))(ap(n))},setState:function(t){return function(r){return function(u){return function(){return tp(new T(r))(n)(),AM(t)(r)($ve(void 0))(),u()}}}}}}};return LM(e)(pd(G.value))})();var v5=ge(Ye),f5=tn(Dr);var xve=x(St),_5=nU(),p5={reflectSymbol:function(){return"__unmounted"}},jve=_5(p5),m5={reflectSymbol:function(){return"__subscriptions"}},zve=_5(m5),N1=ge(ca),Vve=lM(ct)(p5),c5=B(ca),Qve=lM(gt(HO))(m5),Kve=fn(ln),Yve=tt(io),Xve=Sb(St)(Je),Zve=Kve(Na),d5=kn(Mo),efe=ld(cv),nfe=tn(d_(aG(vb))),PM=function(e){return e},Q_=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),afe={map:function(e){return function(n){return new Q_(e(n.value0),n.value1)}}},Po=function(e){return{bimap:function(n){return function(a){return function(t){return new Q_(a(t.value0),v5(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},h5={apply:function(e){return function(n){return new Q_(e.value0(n.value0),f5(e.value1)(n.value1))}},Functor0:function(){return afe}},da={bind:function(e){return function(n){var a=n(e.value0);return new Q_(a.value0,f5(e.value1)(a.value1))}},Apply0:function(){return h5}},Bn={pure:function(e){return new Q_(e,[])},Apply0:function(){return h5}};var g5=function(e){var n=ae(e);return function(a){var t=kn(a);return function(r){return function(u){return new Q_(r,v5(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var Hp=function(e){return new Q_(void 0,[e])},Ut=function(e){return Hp(gn(e))},K_=function(e){var n=ae(e.Monad0().Bind1()),a=kn(e);return function(t){return Hp(function(r){return n(t)(function(u){return a(Wn(xve(void 0))(r.dispatch)(u))})})}},nt=function(e){var n=g5(e.Monad0().Bind1())(e);return function(a){return n(void 0)([a])}},D5=function(e){return function(n){var a=jve(VD.value),t=zve(VD.value),r=function(w){return function(I){return function(L){return function(){var V=N1(jD(w))(function(Q){return Q.init})();return n({initialState:V.value0}).setState(w)(I)(L)()}}}},u=(function(){var w=c5(ze(!1)),I=Vve(VD.value);return function(L){return w(I(L))}})(),i=(function(){var w=c5(ze([])),I=Qve(VD.value);return function(L){return w(I(L))}})(),l=function(w){return function(){return Yve(Xve)(i(w))(),t([])(w)()}},s=function(w){return function(){var L=N1(jD(w))(function(U){return U.init})();return n({initialState:L.value0}).getState(w)()}},d=function(w){return function(I){return function(){var U=i(w)();return t(bu(Wd(I))(U))(w)()}}},p=function(w){return function(I){var L=function(U){return Wd(Zve(xr(0))(function(){return U({dispatch:(function(){var V=R(I);return function(Q){return d5(V(Q))}})(),onStop:d(I)})}))};return eG(w)(L)}},R=function(w){return function(I){return efe(u(w))(function(){var U=s(w)(),V=N1(jD(w))(function(te){return te.update})(),Q=V(U)(I);return r(w)(Q.value0)(p(Q.value1)(w))()})}},E=function(w){return function(){var L=s(w)(),U=N1(jD(w))(function(V){return V.view})();return U(L)(R(w))}};return function(w){return Q6(e,{def:w,init:n({initialState:w.init.value0}).initialize,render:E,componentDidMount:p(w.init.value1),componentWillUnmount:nfe(a(!0))(l)})}}},NM=function(e){return function(){var a=d5(l5)();return V6(function(t){return D5(t)(a)(e)})}},Nf=function(e){return function(n){return z6(e,function(a){var t=D5(a)(i5);return function(r){return t(n(r))}})}};function aR(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var r in e)({}).hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}var Os=function(){return function(){return function(e){return function(n){return aR(e,n)}}}};var O1=function(e){var n=Vt(e);return function(){return function(){return function(a){return function(t){return sb(n(a))(t)}}}}};var y5=Ev(),OM=ic(),w5=Os()();var tR=Ke;var UM=function(e){var n=OM(e);return function(a){return function(t){return n(tR(a))(t)}}},ks=function(e){var n=OM(e);return function(a){return function(t){return function(r){return n(tR(a))(w5(r)({className:t}))}}}},rR=function(e){return function(n){return function(a){return y5(tR(e))(w5(a)({className:n}))}}},kM=function(e){return function(n){return y5(tR(e))({className:n})}},Zo=function(e){return function(n){var a=OM(n);return function(t){return function(r){return a(tR(e))({className:t})(r)}}}};var Yt=Ke;var Yd=function(e){var n=ks(e);return function(){return function(){return n("video")}}},U1=function(e){return Zo("video")(e)};var k1=function(e){return Zo("ul")(e)};var Of=function(e){return Zo("tr")(e)};var Y_=function(e){return Zo("thead")(e)};var X_=function(e){return Zo("th")(e)};var Xd=function(){return function(){return rR("textarea")}};var B1=function(e){var n=ks(e);return function(){return function(){return n("td")}}},Bs=function(e){return Zo("td")(e)};var Z_=function(e){return Zo("tbody")(e)};var e0=function(e){return Zo("table")(e)};var $u=function(e){return Zo("strong")(e)},Zd=function(e){var n=ks(e);return function(){return function(){return n("span")}}},Ft=function(e){return Zo("span")(e)},H1=function(){return function(){return rR("source")}};var J1=function(e){var n=ks(e);return function(){return function(){return n("select")}}};var eh=function(e){var n=ks(e);return function(){return function(){return n("p")}}},jr=function(e){return Zo("p")(e)};var q1=function(e){var n=ks(e);return function(){return function(){return n("option")}}};var $1=function(e){return Zo("li")(e)};var n0=function(e){return Zo("label")(e)};var vu=function(){return function(){return rR("input")}};var Vc=function(){return function(){return rR("img")}};var Ht=function(e){return Zo("i")(e)};var Hs=kM("hr");var nh=function(e){return Zo("h6")(e)};var Qc=function(e){return Zo("h4")(e)},W1=function(e){var n=ks(e);return function(){return function(){return n("h3")}}},fu=function(e){return Zo("h3")(e)},Iv=function(e){var n=ks(e);return function(){return function(){return n("h2")}}},zr=function(e){return Zo("h2")(e)};var a0=function(e){return Zo("h1")(e)},t0=function(e){var n=ks(e);return function(){return function(){return n("form")}}};var Vr=function(e){var n=ks(e);return function(){return function(){return n("div")}}},Pe=function(e){return Zo("div")(e)};var x1=kM("br");var b5=qd(BD);var rfe=x(St);var BM={map:function(e){return function(n){return b5(b5(e))(n)}}},E5=ge(BM),I5=function(e){var n=ae(e.Monad0().Bind1()),a=kn(e);return function(t){return Hp(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},Mi=function(e){var n=I5(e);return function(a){return function(t){return n(E5(t)(a))}}};var T5=function(e){return function(n){return e(Wn(rfe(void 0))(n))}},ah=function(e){var n=I5(e);return function(a){return function(t){return n(T5(E5(t)(a)))}}};var Xn=(function(){return{"genericTop'":je.value}})();var HM=function(e){return e["genericTop'"]},Zn=function(e){return{"genericTop'":HM(e)}};var ea=(function(){return{"genericBottom'":je.value}})();var oR=function(e){return e["genericBottom'"]},na=function(e){return{"genericBottom'":oR(e)}};var aa=function(e){return{"genericBottom'":new Se(oR(e))}},S5=function(e){var n=vd(e);return function(a){return n(oR(a))}};var r0=B(ue),j1=ut();var JM=function(e){return e["genericToEnum'"]};var z1=function(e){return e["genericSucc'"]},xM=function(e){var n=vd(e),a=fd(e);return function(t){var r=r0(n),u=z1(t);return function(i){return r(u(a(i)))}}},qM=function(e){return e["genericPred'"]};var $M=function(e){return e["genericFromEnum'"]};var ta=function(e){var n=qM(e),a=z1(e);return function(t){var r=HM(t);return function(u){var i=qM(u),l=z1(u);return function(s){var d=oR(s);return{"genericPred'":function(p){if(p instanceof Se)return r0(Se.create)(n(p.value0));if(p instanceof fe){var R=i(p.value0);if(R instanceof G)return new T(new Se(r));if(R instanceof T)return new T(new fe(R.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[R.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[p.constructor.name])},"genericSucc'":function(p){if(p instanceof Se){var R=a(p.value0);if(R instanceof G)return new T(new fe(d));if(R instanceof T)return new T(new Se(R.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[R.constructor.name])}if(p instanceof fe)return r0(fe.create)(l(p.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[p.constructor.name])}}}}}};var ra={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},oa=function(e){var n=qM(e),a=z1(e);return{"genericPred'":function(t){return r0(zg)(n(t))},"genericSucc'":function(t){return r0(zg)(a(t))}}};var WM=function(e){return e["genericCardinality'"]};var ua=function(e){var n=WM(e),a=JM(e),t=$M(e);return function(r){var u=JM(r),i=$M(r);return{"genericCardinality'":j1(n)+j1(WM(r))|0,"genericToEnum'":function(l){var s=function(d){if(l>=0&&lt.value0;return r?a.value0:t.value0})()|0,(1+a.value1|0)+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 708, column 5 - line 712, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 700, column 32 - line 712, column 68): "+[a.constructor.name])};var Q1=function(e){return function(n){return new si(1,1,e,n,Yc.value,Yc.value)}},U5=(function(){var e=function(t){if(t instanceof Yc)return 0;if(t instanceof si)return t.value0;throw new Error("Failed pattern match at Data.Map.Internal (line 757, column 12 - line 759, column 26): "+[t.constructor.name])},n=function(t,r,u,i,l,s,d){return s instanceof si&&s.value0>e(d)?Kc(s.value2,s.value3,Kc(t,r,u,s.value4),Kc(i,l,s.value5,d)):Kc(i,l,Kc(t,r,u,s),d)},a=function(t,r,u,i,l,s,d){return s instanceof si&&e(l)<=s.value0?Kc(s.value2,s.value3,Kc(u,i,l,s.value4),Kc(t,r,s.value5,d)):Kc(u,i,l,Kc(t,r,s,d))};return function(t,r,u,i){if(u instanceof Yc)return i instanceof Yc?Q1(t)(r):i instanceof si&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):Kc(t,r,u,i);if(u instanceof si){if(i instanceof si){if(i.value0>(u.value0+1|0))return n(t,r,u,i.value2,i.value3,i.value4,i.value5);if(u.value0>(i.value0+1|0))return a(t,r,u.value2,u.value3,u.value4,u.value5,i)}return i instanceof Yc&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):Kc(t,r,u,i)}throw new Error("Failed pattern match at Data.Map.Internal (line 717, column 40 - line 738, column 34): "+[u.constructor.name])}})();var Js=function(e){var n=xe(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof Yc)return u=!0,G.value;if(s instanceof si){var d=n(a)(s.value2);if(d instanceof ye){r=s.value4;return}if(d instanceof De){r=s.value5;return}if(d instanceof He)return u=!0,new T(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[d.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 8 - line 286, column 22): "+[s.constructor.name])}for(;!u;)i=l(r);return i};return t}};var th=function(e){var n=xe(e);return function(a){return function(t){var r=function(u){if(u instanceof Yc)return Q1(a)(t);if(u instanceof si){var i=n(a)(u.value2);if(i instanceof ye)return U5(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof De)return U5(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof He)return new si(u.value0,u.value1,a,t,u.value4,u.value5);throw new Error("Failed pattern match at Data.Map.Internal (line 471, column 7 - line 474, column 35): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 468, column 8 - line 474, column 35): "+[u.constructor.name])};return r}}};var lc=(function(){return Yc.value})(),vi=function(e){var n=th(e);return function(a){return Zt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(lc)}};var Bfe=typeof Array.from=="function",J5=typeof Symbol<"u"&&Symbol!=null&&typeof Symbol.iterator<"u"&&typeof String.prototype[Symbol.iterator]=="function",Hfe=typeof String.prototype.fromCodePoint=="function",Jfe=typeof String.prototype.codePointAt=="function",q5=function(e){return Jfe?function(n){return n.codePointAt(0)}:e},$5=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){var i=u.length;if(r<0||r>=i)return a;if(J5)for(var l=u[Symbol.iterator](),s=r;;--s){var d=l.next();if(d.done)return a;if(s===0)return n(t(d.value))}return e(r)(u)}}}}}};var W5=function(e){return Hfe?String.fromCodePoint:e},x5=function(e){return function(n){return J5?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=cR(yf(1)(e)),r=Q5(t);return r?V5(n)(t):n}return n},eA=q5(Zfe),$p=j5(Xfe)(eA),Eu=function(e){return xo($p(e))};var K1=function(e){return function(n){return z5(function(a){return Eu(Md(a)(n))})(e1(e)(n))}},ZM=(function(){var e=$G(Gp)(kt(y_))(Fr(y_));return function(n){return Qi(e(n))}})(),e_e=function(e){if(e<=65535)return ZM(e);var n=Vfe(e-65536|0)(1024)+55296|0,a=Qfe(e-65536|0)(1024)+56320|0;return ZM(n)+ZM(a)};var uh=W5(e_e),Y5=function(e){return function(n){if(e<1)return"";var a=u0(n);return a instanceof T?uh(a.value0.head)+Y5(e-1|0)(a.value0.tail):n}},ol=x5(Y5);var Y1={eq:function(e){return function(n){return e===n}}},X1={compare:function(e){return function(n){return Kfe(e)(n)}},Eq0:function(){return Y1}},kf=function(e){return function(n){return hv(kc(ol(e)(n)))(n)}};var n_e=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=u0(l);if(s instanceof T){var d=i===0;if(d)return t=!0,new T(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,G.value}for(;!t;)r=u(a,n);return r}},ih=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(eA(n)):$5(n_e)(T.create)(G.value)(eA)(e)(n)}},a_e={bottom:0,top:1114111,Ord0:function(){return X1}},Cv=(function(){return{cardinality:1114112,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if($e)return G.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[e.constructor.name])},Bounded0:function(){return a_e},Enum1:function(){return t_e(0)}}})(),t_e=jfe("enumCodePoint","Data.String.CodePoints",function(){return{succ:Cp(Fa(Cv))(Yn(Cv)),pred:Fp(Fa(Cv))(Yn(Cv)),Ord0:function(){return X1}}});var D_e=ut();var c9={show:D_e};var s9=Ee;var y_e=If(Je),w_e=ge(Ye),b_e=pp(VM),Vn=function(e){return function(n){var a=y_e(w_e(n)(function(t){return new yn(e(t),t)}));return function(t){return Ms(t)(a)}}},v9=function(e){var n=xM(e),a=S5(e);return function(t){var r=n(t);return function(u){return function(i){return b_e(function(l){return new yn(l,r(l))})(a(i))}}}},Qn=function(e){var n=v9(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Tv(u(i))}}}};var E_e={info:"info",warning:"warn",error:"error"},sc=e=>n=>a=>t=>{let r=E_e[e];if(typeof console<"u"&&console[r]&&console[r](n,a),typeof window<"u"){let u=new Error(n);typeof window.Sentry<"u"&&window.Sentry.captureException(u,{extra:a})}return t()},f9=(e,n)=>(n.__sentryFingerprint=e,n);var _9=function(e){return Oc(f9)(e)};var Xc="error";var aE={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Le)return a.value0;if(a instanceof Me)return sc(Xc)("Failed to parse "+e.diagnosticName)({error:a.value0,value:n})(function(t){return e.default});throw new Error("Failed pattern match at Utils.Parse (line 49, column 5 - line 57, column 24): "+[a.constructor.name])}}},Ga=function(e){return e.parseOrPanic},T_e=Ga(aE),Et=function(e){var n=Ga(e);return function(a){var t=B(a);return function(r){return n({parse:function(u){return t(T.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},S_e=Et(aE)(no),l0=function(e){var n=B_(e);return function(a){return S_e({parse:n,diagnosticName:a})}},sn={parseOrPanic:function(e){return T_e({default:e.default,diagnosticName:e.diagnosticName,parse:(function(){var n=Wn(new Me(""))(Le.create);return function(a){return n(e.parse(a))}})()})}};var p9=oa(ra),m9=na(ea),d9=la(ia),Hf=(function(){function e(){}return e.value=new e,e})(),Jf=(function(){function e(){}return e.value=new e,e})(),C_e={to:function(e){if(e instanceof Se)return Hf.value;if(e instanceof fe)return Jf.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof Hf)return new Se(je.value);if(e instanceof Jf)return new fe(je.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var F_e=function(e){if(e instanceof Hf)return"school";if(e instanceof Jf)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},tE=(function(){return Ga(sn)({parse:Vn(F_e)(Qn(C_e)(ta(p9)(Zn(Xn))(p9)(m9))(ua(d9)(d9))(aa(m9))),default:Hf.value,diagnosticName:"Sem.Connections.Types.Actor"})})();var R9=oa(ra),h9=ta(R9)(Zn(Xn)),y9=na(ea),g9=aa(y9),w9=la(ia),D9=ua(w9),G_e=La(hu),qs=(function(){function e(){}return e.value=new e,e})(),c0=(function(){function e(){}return e.value=new e,e})(),qf=(function(){function e(){}return e.value=new e,e})(),M_e={to:function(e){if(e instanceof Se)return qs.value;if(e instanceof fe&&e.value0 instanceof Se)return c0.value;if(e instanceof fe&&e.value0 instanceof fe)return qf.value;throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])},from:function(e){if(e instanceof qs)return new Se(je.value);if(e instanceof c0)return new fe(new Se(je.value));if(e instanceof qf)return new fe(new fe(je.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var A_e=function(e){if(e instanceof qs)return"pending";if(e instanceof c0)return"connected";if(e instanceof qf)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},tA=(function(){var e=Vn(A_e)(Qn(M_e)(h9(h9(R9)(y9))(g9))(D9(D9(w9)))(g9)),n=function(a){return a==="cold"?new T(qf.value):G.value};return Ga(sn)({parse:function(a){return G_e(e(a))(n(a))},default:qs.value,diagnosticName:"Sem.Connections.Types.Status"})})();var L_e=Dd(cr),b9=oe(pn),P_e=yo(Je)(cr),N_e=Ft(ie);var E9=function(e){return{initiator:tE(e.initiator),status:tA(e.status),introMessage:ze("")(he(e.introMessage))}},I9=25,rA=function(e){return Eu(e)>=I9},T9=function(e){var n=Eu(e),a=n>0,t=L_e(" ")([(function(){return a?b9(n)+" characters":""})(),P_e(["(",b9(I9),(function(){return a?"":" character"})()," minimum)"])]),r=(function(){var u=rA(e);return u?"text-success":""})();return N_e(r)(t)};var uE=(function(){function e(){}return e.value=new e,e})(),C9=(function(){function e(){}return e.value=new e,e})();var F9=(function(){var e=Ga(sn)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(C9.value):n instanceof T&&n.value0==="free"?new T(uE.value):n instanceof T&&n.value0==="churned"?new T(uE.value):n instanceof G?new T(uE.value):G.value},default:uE.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(he(n))}})();var G9=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:he(e.imageUrl),partnerStatus:F9(e.partnerStatus)}};var k_e=ae(nn),oA=ht(),vR=Bt(Ee),M9=$({reflectSymbol:function(){return"id"}}),B_e=fn(ln)(nn),H_e=Ko(gu),J_e=B(ue);var q_e=(function(){function e(){}return e.value=new e,e})(),$_e=(function(){function e(){}return e.value=new e,e})(),W_e=(function(){function e(){}return e.value=new e,e})(),uA=(function(){function e(){}return e.value=new e,e})(),x_e=(function(){function e(){}return e.value=new e,e})(),iE=(function(){function e(){}return e.value=new e,e})(),fR=(function(){function e(){}return e.value=new e,e})(),iA=(function(){function e(){}return e.value=new e,e})(),lA=(function(){function e(){}return e.value=new e,e})();var A9={show:ut()};var j_e=Ee,z_e=l0(oA($({reflectSymbol:function(){return"avatarUrl"}})(vR)($({reflectSymbol:function(){return"bio"}})(vR)($({reflectSymbol:function(){return"connection"}})(Bt(oA($({reflectSymbol:function(){return"initiator"}})(Ee)($({reflectSymbol:function(){return"introMessage"}})(vR)($({reflectSymbol:function(){return"status"}})(Ee)(mn))))))($({reflectSymbol:function(){return"firstName"}})(Ee)(M9(j_e)($({reflectSymbol:function(){return"lastName"}})(Ee)($({reflectSymbol:function(){return"school"}})(oA($({reflectSymbol:function(){return"allowedToContact"}})(ct)(M9(s9)($({reflectSymbol:function(){return"imageUrl"}})(vR)($({reflectSymbol:function(){return"name"}})(Ee)($({reflectSymbol:function(){return"partnerStatus"}})(vR)(mn)))))))($({reflectSymbol:function(){return"title"}})(Ee)($({reflectSymbol:function(){return"type"}})(Ee)($({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(Dn)(mn))))))))))));var L9=function(e){if(e instanceof q_e)return"sheet-view";if(e instanceof $_e)return"school-details";if(e instanceof W_e)return"network-gallery";if(e instanceof uA)return"livestream-details";if(e instanceof x_e)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},P9=function(e){return k_e(z_e("SemUser")(e))(function(n){return B_e(H_e(n.type==="Sem::User"))(function(){return new T({school:G9(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:he(n.avatarUrl),title:n.title,bio:he(n.bio),connection:J_e(E9)(he(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Fv=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Gv=function(e){return e()};var z9=(function(){function e(){}return e.value=new e,e})(),V9=(function(){function e(){}return e.value=new e,e})(),Q9=(function(){function e(){}return e.value=new e,e})();var R0e=function(e){if(e instanceof z9)return"disabled";if(e instanceof V9)return"free-consultation";if(e instanceof Q9)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 27, column 13 - line 30, column 40): "+[e.constructor.name])};var y0e=(function(){return[z9.value,V9.value,Q9.value]})(),K9=Et(sn)(ue)({parse:Vn(R0e)(y0e),diagnosticName:"InquiryMode"});var b0e=function(e,n,a,t,r,u,i){var l=new Date(Date.UTC(e,n,a,t,r,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l};function Y9(e,n,a,t,r,u,i){return b0e(e,n-1,a,t,r,u,i).getTime()}function X9(e){return function(n){var a=new Date(n);return e(a.getUTCFullYear())(a.getUTCMonth()+1)(a.getUTCDate())(a.getUTCHours())(a.getUTCMinutes())(a.getUTCSeconds())(a.getUTCMilliseconds())}}var I0e=lr(),T0e=Fa(Do);var S0e=Yn(Do);var Z9=function(e){return e},sE=(function(){var e=function(n){return function(a){return function(t){return function(r){return function(u){return function(i){return function(l){return new jc(q_(n)(I0e(T0e(a)))(t),new Rv(r,u,i,l))}}}}}}};return X9(e)})();var ek=function(e){return Y9(Fl(e.value0),S0e(Gl(e.value0)),Dv(e.value0),Ls(e.value1),yv(e.value1),Ff(e.value1),xc(e.value1))};var nk=function(e){var n=tn(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,d;function p(R,E,w){if(w<1)return s=!0,R;i=n(R)(E),l=E,u=w-1|0}for(;!s;)d=p(i,l,u);return d}}};return a(Gt(e))};var C0e=ut();var xp=(function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e})(),mR=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})();var ak=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),tk=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hA=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})();var ch={defer:function(e){var n=Fv(e);return function(a,t,r,u,i){var l=Gv(n);return l(a,t,r,u,i)}}};var Mv={map:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return n(a,t,r,u,function(s,d){return t(function(p){return i(s,e(d))})})})}}}};var Av={apply:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,d){return t(function(p){return n(s,t,r,u,function(R,E){return t(function(w){return i(R,d(E))})})})})})}}},Functor0:function(){return Mv}};var Lv={bind:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,d){return t(function(p){var R=n(d);return R(s,t,r,u,i)})})})}}},Apply0:function(){return Av}},F0e=tt(Lv);var Zc={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Av}};var G0e={Applicative0:function(){return Zc},Bind1:function(){return Lv}};var rk={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return G0e}},M0e=wo(rk);var jp={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new xp(a.value0,a.value1,!1),t,r,function(s,d){return t(function(p){return s.value2?u(s,d):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Mv}},A0e=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var L0e=function(e){var n=e.Monad0(),a=B(n.Bind1().Apply0().Functor0()),t=x(n.Applicative0()),r=ai(e);return function(u){return function(i){var l=function(s){var d=!1,p;function R(E){var w=E(void 0);if(w instanceof ak){s=w.value0;return}if(w instanceof tk)return d=!0,a(Yr.create)(w.value0);if(w instanceof hA)return d=!0,t(new Wr(new yn(w.value1,w.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[w.constructor.name])}for(;!d;)p=R(s);return p};return r(l)(function(s){return i(u,ak.create,tk.create,function(d,p){return new hA(d,new Me(p))},function(d,p){return new hA(d,new Le(p))})})}}};var ok=A0e(function(e){return new yn(e.value1,e)}),gA=function(e){return e.value1},DA=function(e){return e.value0};var P0e={index:0,line:1,column:1},uk=function(e){var n=B(e.Monad0().Bind1().Apply0().Functor0()),a=L0e(e);return function(t){return function(r){var u=new xp(t,P0e,!1);return n(zo)(a(u)(r))}}},N0e=uk(Qg),ik=function(e){var n=N0e(e);return function(a){return C0e(n(a))}};var O0e=function(e){return function(n){return M0e(new mR(e,n))}},sh=function(e){return F0e(O0e(e))(ok)};var lk={empty:sh("No alternative"),Alt0:function(){return jp}},zp={Applicative0:function(){return Zc},Plus1:function(){return lk}};var j0e=La(jp);var z0e=x(Zc);var V0e=B(Mv);var Pv=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new xp(i.value0,i.value1,n.value2),l)},u)}};var vE=function(e){return function(n){return j0e(n)(z0e(e))}},Vp=function(e){return vE(G.value)(V0e(T.create)(e))};var vk=Yn(Cv),X0e=Du(go);var Z0e=oe(ir);var fk=function(e){return function(n){return function(a){var t=vk(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=ih(0)(a);return r instanceof T&&vk(r.value0)===10?{index:e.index+1|0,line:e.line,column:e.column}:{index:e.index+1|0,line:e.line+1|0,column:1}}return t===9?{index:e.index+1|0,line:e.line,column:(e.column+8|0)-X0e(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},epe=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,d,p){var R=u0(d);if(R instanceof G)return u=!0,s;if(R instanceof T){var E=(function(){if(cc(R.value0.tail))return fk(s)(R.value0.head)(p);if($e)return fk(s)(R.value0.head)(R.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): ")})();t=E,r=R.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[R.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var yA=Fb(function(e){return function(n){return function(a){return function(t){return function(r){var u=cc(e.value0);return u?r(new xp(e.value0,e.value1,!0),void 0):t(e,new mR("Expected EOF",e.value1))}}}}}),pk=function(e){return Fb(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Me)return r(n,new mR(i.value0,n.value1));if(i instanceof Le)return u(new xp(i.value0.remainder,epe(n.value1)(i.value0.consumed)(i.value0.remainder),!cc(i.value0.consumed)),i.value0.value);throw new Error("Failed pattern match at Parsing.String (line 286, column 7 - line 290, column 121): "+[i.constructor.name])}}}}})};var Nv=function(e){return pk(function(n){var a=El(e)(n);return a instanceof T?new Le({value:e,consumed:e,remainder:a.value0}):new Me("Expected "+Z0e(e))})};var mk=oe(pn),ape=br(Ru),tpe=rd(Av);var rpe=function(e){return"(line "+(mk(e.line)+(", col "+(mk(e.column)+")")))},ope=function(e){return DA(e)+(" "+rpe(gA(e)))},wA=function(e){return function(n){return ape(ope)(ik(n)(tpe(e)(yA)))}};var pE=Fa(Gp);var fi=oe(pn);var Dpe=Go(Qo),Rpe=Dpe(cr);var ype=hb(Ca)(ov);var IA=Yn(su),wpe=oe(o1),bpe=Yn(Do),wk=Yn(Tl),Epe=ut(),Ipe=Yn(J_),bk=oe(XO),TA=Yn(rc),Tpe=Du(go),Ek=Yn(tc),Ik=Yn(ac),SA=Yn(tl),Tk=uu(go);var Xp=(function(){function e(){}return e.value=new e,e})(),Ck=(function(){function e(){}return e.value=new e,e})(),Spe=(function(){function e(){}return e.value=new e,e})(),$s=(function(){function e(){}return e.value=new e,e})(),hE=(function(){function e(){}return e.value=new e,e})(),Fk=(function(){function e(){}return e.value=new e,e})(),Gk=(function(){function e(){}return e.value=new e,e})(),es=(function(){function e(){}return e.value=new e,e})(),Cpe=(function(){function e(){}return e.value=new e,e})(),Fpe=(function(){function e(){}return e.value=new e,e})(),Ws=(function(){function e(){}return e.value=new e,e})(),Gpe=(function(){function e(){}return e.value=new e,e})(),gE=(function(){function e(){}return e.value=new e,e})(),ns=(function(){function e(){}return e.value=new e,e})(),as=(function(){function e(){}return e.value=new e,e})(),Mpe=(function(){function e(){}return e.value=new e,e})(),Ll=(function(){function e(){}return e.value=new e,e})(),Ape=(function(){function e(){}return e.value=new e,e})(),DE=(function(){function e(){}return e.value=new e,e})(),Lpe=(function(){function e(){}return e.value=new e,e})(),Ppe=(function(){function e(){}return e.value=new e,e})(),Npe=(function(){function e(){}return e.value=new e,e})(),ar=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var Ope=function(e){if(e instanceof Ii)return"Jan";if(e instanceof Ki)return"Feb";if(e instanceof Ti)return"Mar";if(e instanceof Yi)return"Apr";if(e instanceof Xi)return"May";if(e instanceof Si)return"Jun";if(e instanceof Ci)return"Jul";if(e instanceof Zi)return"Aug";if(e instanceof el)return"Sep";if(e instanceof nl)return"Oct";if(e instanceof al)return"Nov";if(e instanceof Sl)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var f0=function(e){if(e<0)return"-"+f0(-e|0);if(e<10)return"0"+fi(e);if($e)return fi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},Mk=function(e){if(e<0)return"-"+Mk(-e|0);if(e<10)return"000"+fi(e);if(e<100)return"00"+fi(e);if(e<1e3)return"0"+fi(e);if($e)return fi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},Ak=function(e){if(e<0)return"-"+Ak(-e|0);if(e<10)return"00"+fi(e);if(e<100)return"0"+fi(e);if($e)return fi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var Upe=function(e){var n=fi(ype(e)),a=Eu(n);return a===1?"0"+n:a===2?n:kf(a-2|0)(n)};var kpe=function(e){var n=e===0;return n?12:e},Bpe=function(e){return function(n){if(n instanceof Xp)return Mk(IA(Fl(e.value0)));if(n instanceof Ck)return Upe(IA(Fl(e.value0)));if(n instanceof Spe)return fi(IA(Fl(e.value0)));if(n instanceof $s)return wpe(Gl(e.value0));if(n instanceof hE)return Ope(Gl(e.value0));if(n instanceof Fk)return f0(bpe(Gl(e.value0)));if(n instanceof Gk)return f0(wk(Dv(e.value0)));if(n instanceof es)return fi(wk(Dv(e.value0)));if(n instanceof Cpe)return fi(Bu((function(t){return t/1e3})(Epe(Z9(ek(e))))));if(n instanceof Fpe)return fi(Ipe(AD(e.value0)));if(n instanceof Ws)return bk(AD(e.value0));if(n instanceof Gpe)return ol(3)(bk(AD(e.value0)));if(n instanceof gE)return f0(TA(Ls(e.value1)));if(n instanceof ns)return f0(kpe(Tpe(TA(Ls(e.value1)))(12)));if(n instanceof as){var a=TA(Ls(e.value1))>=12;return a?"PM":"AM"}if(n instanceof Mpe)return fi(Ek(yv(e.value1)));if(n instanceof Ll)return f0(Ek(yv(e.value1)));if(n instanceof Ape)return fi(Ik(Ff(e.value1)));if(n instanceof DE)return f0(Ik(Ff(e.value1)));if(n instanceof Lpe)return Ak(SA(xc(e.value1)));if(n instanceof Ppe)return fi((function(t){return Tk(t)(100)})(SA(xc(e.value1))));if(n instanceof Npe)return f0((function(t){return Tk(t)(10)})(SA(xc(e.value1))));if(n instanceof ar)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},ju=function(e){return function(n){return Rpe(Bpe(n))(e)}};var Len=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function RE(e){return Math.round(e).toString()}var fh=ae(Lv);var Jpe=x(Zc),qpe=yd(zp)(ch);var $pe=wG(zp)(ch),yE=nk(cr),Wpe=_p(Zc)(gd),xpe=B(ue);var Lk=bs(Ca),jpe=uu(go),zpe=oe(pn),Vpe=ge(no),Qpe=oe(ep),Kpe=hn(En);var Ype=fh(Vp(Pv(Nv("+"))))(function(e){return fh(qpe(Nv("0")))(function(n){return fh(Vp(Pv(Nv(",0"))))(function(a){return fh(Vp(Pv(Nv("."))))(function(t){return fh(Wpe(t)(function(r){return Pv($pe(Nv("0")))}))(function(r){return fh(Vp(Pv(Nv("a"))))(function(u){return Jpe({sign:Gr(e),before:xo(n),comma:Gr(a),after:ze(0)(xpe(xo)(r)),abbreviations:Gr(u)})})})})})})}),Xpe=wA(Ype);var Pk=function(e){return function(n){var a=IG(n),t=(function(){if(a>0)return Lk(Bu(TG(a)/tO))(0);if($e)return 0;throw new Error("Failed pattern match at Data.Formatter.Number (line 100, column 5 - line 102, column 22): ")})();if(e.abbreviations){var r=jpe(t)(3),u=(function(){var V=r<1;return V?n:n/Hb(1e3)(Er(r))})(),i=(function(){if(r===0)return"";if(r===1)return"K";if(r===2)return"M";if(r===3)return"G";if(r===4)return"T";if(r===5)return"P";if(r===6)return"E";if(r===7)return"Z";if(r===8)return"Y";if($e)return"10e+"+zpe(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): ")})();return Pk({comma:e.comma,before:e.before,after:e.after,sign:e.sign,abbreviations:!1})(u)+i}var l=(e.before-t|0)-1|0,s=Hb(10)(Er(Lk(0)(e.after))),d=Rp(a*s)/s,p=Ed(d),R=d-p,E=Rp(R*s),w=(function(){var V=RE(E),Q=Eu(V),te=yE("0")(e.after-Q|0);return te+V})(),I=(function(){var V=e.after<1;return V?"":"."+((function(){var Q=E===0;return Q?yE("0")(e.after):""})()+(function(){var Q=E>0;return Q?w:""})())})(),L=function(V){return function(Q){return function(te){var le=V,ne=Q,Z=!1,ee;function me(We,Qe,dn){var qn=dp(dn);if(qn instanceof G)return Z=!0,Gd(We);if(qn instanceof T&&Qe<3){le=bu(qn.value0.head)(We),ne=Qe+1|0,te=qn.value0.tail;return}le=bu(",")(We),ne=0,te=dn}for(;!Z;)ee=me(le,ne,te);return ee}}},U=(function(){return e.comma?L([])(0)(ud(wD(yE("0")(l)+RE(p)))):yE("0")(l)+RE(p)})();return(function(){var V=n<0;if(V)return"-";var Q=n>0&&e.sign;return Q?"+":""})()+(U+I)}},Zpe=function(e){return function(n){return Vpe(Xpe(e))(it(Pk)(n))}},_h=function(e){return function(n){return wr(gn(Qpe(n)))(Kpe)(Zpe(e)(n))}};var nme=Ke;var Nk=function(e){return L_(e)};var Pl=function(e){var n=Nk(e);return n?G.value:new T(nme(e))};var Za=function(e){return function(n){var a=Nk(e);return a?n:e}};var nu=function(){return Ke};var hR=oe(pn),ame=Yn(su),tme=Yn(Do),rme=nu(),ome=wi(),ume=Al(Mp),CA=uu(go),ime=Hu(Je);var lme=function(e){return function(n){if(n.minutes<=0)return e.justNow;if(n.minutes<=1)return"a minute"+e.suffix;if(n.minutes<=45)return hR(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return hR(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return hR(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return hR(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if($e)return hR(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 158, column 1 - line 158, column 81): "+[e.constructor.name,n.constructor.name])}},bE=function(e){return lme({suffix:" "+e,justNow:"just now"})},Ok=function(){return function(e){var n=function(d){return(ame(Fl(Mf(d)))*12|0)+tme(Gl(Mf(d)))|0},a=rme(e),t=Za(a.format)(bE("ago")),r=CG(ome(ume(a.to)(a.from))),u=CA(r+30|0)(60),i=CA(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=CA(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var Uk=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var FA=_h("0,0");var kk=function(e){return FA(Er(e))},_c=function(e){return function(n){return function(a){return kk(e)+(" "+Uk(e)(n)(a))}}};var Bk=(function(){return ju(ime([Ws.value,new ar(", "),$s.value,new ar(" "),es.value,new ar(" at "),ns.value,new ar(":"),Ll.value,new ar(" "),as.value]))})();Ct();var Hk=vt.Fragment,GA=()=>document.visibilityState=="visible",Jk=(e,n)=>document.elementFromPoint(e,n);function qk(e){return function(n){return function(){return n.getElementById(e)}}}var vme=B(ca),EE=function(e){var n=vme(he),a=qk(e);return function(t){return n(a(t))}};var IE=function(e){return function(n){return function(){return n[e]}}},fme=IE("children"),_me=IE("firstElementChild"),pme=IE("lastElementChild"),mme=IE("childElementCount");var Ai=function(){return window};function Wk(e,n,a,t){if(typeof window<"u"){var r=window[a];if(r!=null&&t instanceof r)return n(t)}for(var u=t;u!=null;){var i=Object.getPrototypeOf(u),l=i.constructor.name;if(l===a)return n(t);if(l==="Object")return e;u=i}return e}var Kn=function(e){return function(n){return Wk(G.value,T.create,e,n)}};var xk=Ke;var TE=Ke;var jk=Ke;function zk(e,n,a){var t=Object.prototype.toString.call(a);return t.indexOf("[object HTML")===0&&t.indexOf("Element]")===t.length-8?n(a):e}var MA=Ke;var Vk=function(e){return zk(G.value,T.create,e)};function LA(e){return function(){return e.seeking}}function gR(e){return function(){return e.currentTime}}function PA(e){return function(){return e.volume}}function NA(e){return function(n){return function(){n.volume=e}}}function OA(e){return function(){return e.muted}}function em(e){return function(n){return function(){n.muted=e}}}var Kk=Kn("HTMLMediaElement");var Yk=Kn("HTMLMediaElement");function kA(e){return function(){return e.hash}}function BA(e){return function(n){return function(){n.hash=e}}}function HA(e){return function(){return e.platform}}function _0(e){return function(){return e.document}}function JA(e){return function(){return e.navigator}}function DR(e){return function(){return e.location}}var Zk=Ke;var sde=B(Ye);var vde=_p(St)(gd),eB=ae(io),aB=ge(ca),fde=ae(nn);var WA=cn("\xA0");var ja=it(Wn(Aa));var tB=function(e){return function(n){if(e)return Aa;if($e)return n(void 0);throw new Error("Failed pattern match at Utils.HTML (line 113, column 1 - line 113, column 65): "+[e.constructor.name,n.constructor.name])}},xA=function(e){return function(n){return tB(e)(gn(n))}};var jA=function(e){return function(n){if(e)return n(void 0);if($e)return Aa;throw new Error("Failed pattern match at Utils.HTML (line 100, column 1 - line 100, column 61): "+[e.constructor.name,n.constructor.name])}},Qa=function(e){return function(n){return jA(e)(gn(n))}};var _de=ic()(Ce)(Hk),pde=function(e){return function(n){return _de({key:e.key})(lD(x1(""))(sde(cn)(xu(` `)(n))))}},mh=pde({key:""}),FE=function(e){return vde(Yk(e.target))(gR)};var rB=function(e){return function(){return Jk(e.x,e.y)}},oB=function(e){return eB(aB(eB(Ai)(_0))(TE))(EE(e))},GE=function(e){return aB(oB(e))(function(n){return fde(n)(Vk)})};var RR=Dn;var iB=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},zA=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),lB=()=>new Date,cB=(()=>{let e=new Date;return typeof window<"u"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var nm=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();var vB={liftAff:hn(En),MonadEffect0:function(){return qe}};var egn=(function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,R){this.queue=p,this.value=R,this.next=null,this.prev=null}function a(p){this.draining=!1,this.error=null,this.value=p,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function r(p){try{p()}catch(R){setTimeout(function(){throw R},0)}}function u(p,R){var E=new n(p,R);switch(p.size){case 0:p.head=E;break;case 1:E.prev=p.head,p.head.next=E,p.last=E;break;default:E.prev=p.last,p.last.next=E,p.last=E}return p.size++,E}function i(p){var R;switch(p.size){case 0:return null;case 1:R=p.head,p.head=null;break;case 2:R=p.last,p.head.next=null,p.last=null;break;default:R=p.last,p.last=R.prev,p.last.next=null}return R.prev=null,R.queue=null,p.size--,R.value}function l(p){var R;switch(p.size){case 0:return null;case 1:R=p.head,p.head=null;break;case 2:R=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:R=p.head,p.head=R.next,p.head.prev=null}return R.next=null,R.queue=null,p.size--,R.value}function s(p){if(p.queue!==null){if(p.queue.last===p){i(p.queue);return}if(p.queue.head===p){l(p.queue);return}p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),p.queue.size--,p.queue=null,p.value=null,p.next=null,p.prev=null}}function d(p,R){if(!R.draining){var E=R.puts,w=R.takes,I=R.reads,L,U,V,Q,te;for(R.draining=!0;;){if(L=null,U=null,V=null,Q=R.value,te=I.size,R.error!==null){for(Q=p.left(R.error);L=l(E);)r(L.cb(Q));for(;U=l(I);)r(U(Q));for(;V=l(w);)r(V(Q));break}if(Q===t&&(L=l(E))&&(R.value=Q=L.value),Q!==t){for(V=l(w);te--&&(U=l(I));)r(U(p.right(Q)));V!==null&&(R.value=t,r(V(p.right(Q))))}if(L!==null&&r(L.cb(p.right(void 0))),R.value===t&&E.size===0||R.value!==t&&w.size===0)break}R.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=d,a})();var yR=function(e){return x_(ap(e))},wR=function(e){return x_(pd(e))};var kde=x(St),d0=ae(nn),Bde=Fa(su),Hde=Fa(Do),Jde=Fa(Tl),qde=Fa(rc),$de=Fa(tc),Wde=Fa(ac),xde=Fa(tl),jde=x(ka),mB=tt(io),zde=ge(ue);var Vde=(function(){return wR(G.value)})();var dB=function(e){return d0(Bde(e.year))(function(n){return d0(Hde(e.month+1|0))(function(a){return d0(Jde(e.day))(function(t){return d0(qde(e.hour))(function(r){return d0($de(e.minute))(function(u){return d0(Wde(e.second))(function(i){return d0(xde(e.millisecond))(function(l){return jde(new jc(q_(n)(a)(t),new Rv(r,u,i,l)))})})})})})})})},hB=function(e){var n=sO("Failed to obtain current time. This should never happen.");return Wn(n)(kde)(dB(zA(e)))},h0=mB(hB)(lB),ME=function(e){var n=yR(Vde);if(n instanceof T)return n.value0;if(n instanceof G)return x_(mB(hB)(cB));throw new Error("Failed pattern match at Utils.DateTime (line 66, column 3 - line 68, column 76): "+[n.constructor.name])},Li=function(e){return d0(zde(iB({just:T.create,nothing:G.value})(e))(zA))(dB)};var KA=x(ka),Qde=B(ue),gB=ae(nn);var wB=oa(ra),DB=ta(wB)(Zn(Xn)),bB=na(ea),RB=aa(bB),EB=la(ia),yB=ua(EB);var YA=(function(){function e(){}return e.value=new e,e})(),XA=(function(){function e(){}return e.value=new e,e})(),ZA=(function(){function e(){}return e.value=new e,e})();var Kde={to:function(e){if(e instanceof Se)return YA.value;if(e instanceof fe&&e.value0 instanceof Se)return XA.value;if(e instanceof fe&&e.value0 instanceof fe)return ZA.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof YA)return new Se(je.value);if(e instanceof XA)return new fe(new Se(je.value));if(e instanceof ZA)return new fe(new fe(je.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Yde=function(e){if(e instanceof YA)return"stuffed";if(e instanceof XA)return"satisfied";if(e instanceof ZA)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 233, column 27 - line 236, column 35): "+[e.constructor.name])};var Xde=Et(sn)(ue)({parse:Vn(Yde)(Qn(Kde)(DB(DB(wB)(bB))(RB))(yB(yB(EB)))(RB)),diagnosticName:"ClientAppetite"}),IB=function(e){return gB(Wn(KA(G.value))((function(){var n=Qde(KA);return function(a){return n(Xde(a))}})())(he(e.clientAppetite)))(function(n){return gB(K9(e.inquiryMode))(function(a){return KA({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:he(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:he(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var TB=ae(nn),dh=ht(),e2=Bt(Ee),SB=$({reflectSymbol:function(){return"description"}})(Ee),AE=$({reflectSymbol:function(){return"id"}})(Dn),a2=$({reflectSymbol:function(){return"name"}})(Ee),FB=dh(AE(a2($({reflectSymbol:function(){return"slug"}})(Ee)(mn)))),CB=gt(FB),ehe=l0(dh($({reflectSymbol:function(){return"advisingConfig"}})(Bt(dh($({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Bt(ct))($({reflectSymbol:function(){return"clientAppetite"}})(e2)($({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Bt(Dn))($({reflectSymbol:function(){return"inquiryMode"}})(Ee)($({reflectSymbol:function(){return"packages"}})(gt(dh($({reflectSymbol:function(){return"activeForSale"}})(ct)(SB(AE(a2($({reflectSymbol:function(){return"numMinutes"}})(Dn)($({reflectSymbol:function(){return"packageCategories"}})(CB)($({reflectSymbol:function(){return"refundPeriodLengthDays"}})(Dn)($({reflectSymbol:function(){return"totalPriceCents"}})(RR)(mn)))))))))))($({reflectSymbol:function(){return"pricePerHourCents"}})(RR)($({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(Dn)($({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(Dn)($({reflectSymbol:function(){return"themes"}})(gt(dh($({reflectSymbol:function(){return"active"}})(ct)($({reflectSymbol:function(){return"category"}})(FB)(SB($({reflectSymbol:function(){return"durationMinutes"}})(Dn)(AE($({reflectSymbol:function(){return"priceCents"}})(RR)($({reflectSymbol:function(){return"title"}})(Ee)(mn))))))))))(mn))))))))))))($({reflectSymbol:function(){return"entity"}})(dh($({reflectSymbol:function(){return"bio"}})(Ee)(AE($({reflectSymbol:function(){return"imageUrl"}})(e2)(a2($({reflectSymbol:function(){return"organizationId"}})(Dn)($({reflectSymbol:function(){return"organizationName"}})(Ee)($({reflectSymbol:function(){return"shortEducation"}})(e2)($({reflectSymbol:function(){return"tags"}})(CB)(mn))))))))))(mn)))),n2=x(ka),t2=B(ue),bR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ER=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nhe=function(e){return TB(ehe("ServiceProviderPresenter")(e))(function(n){return TB(Wn(n2(G.value))((function(){var a=t2(n2);return function(t){return a(IB(t))}})())(he(n.advisingConfig)))(function(a){return n2({entity:n.entity,advisingConfig:a})})})},GB=Et(sn)(ue)({parse:function(e){return e.type==="Sem::User"?t2(bR.create)(P9(e.presenter)):e.type==="ServiceProviders::Individual"?t2(ER.create)(nhe(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var PB=oa(ra),MB=ta(PB)(Zn(Xn)),NB=na(ea),AB=aa(NB),OB=la(ia),LB=ua(OB),xf=(function(){function e(){}return e.value=new e,e})(),Uv=(function(){function e(){}return e.value=new e,e})(),jf=(function(){function e(){}return e.value=new e,e})(),ahe={to:function(e){if(e instanceof Se)return xf.value;if(e instanceof fe&&e.value0 instanceof Se)return Uv.value;if(e instanceof fe&&e.value0 instanceof fe)return jf.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof xf)return new Se(je.value);if(e instanceof Uv)return new fe(new Se(je.value));if(e instanceof jf)return new fe(new fe(je.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},UB={eq:function(e){return function(n){return e instanceof xf&&n instanceof xf||e instanceof Uv&&n instanceof Uv||e instanceof jf&&n instanceof jf}}},LE=function(e){if(e instanceof xf)return"ready";if(e instanceof Uv)return"live";if(e instanceof jf)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var IR=(function(){return Ga(sn)({parse:Vn(LE)(Qn(ahe)(MB(MB(PB)(NB))(AB))(LB(LB(OB)))(AB)),default:xf.value,diagnosticName:"livestream poll status"})})(),o2=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:he(e.autoDisplayMinutesFromStart)}};var kB=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:he(e.undergrad.college),major:he(e.undergrad.major),year:he(e.undergrad.year)},gradCollege:he(e.gradCollege),workExperience:he(e.workExperience),admissionsStory:he(e.admissionsStory),pictureUrl:he(e.pictureUrl),allStreamsUrl:he(e.allStreamsUrl)}};var rhe=xe(Ca),ohe=Il(),WB=ge(ue),xB=oa(ra),BB=ta(xB)(Zn(Xn)),jB=na(ea),HB=aa(jB),zB=la(ia),JB=ua(zB),VB=Ga(sn),qB=sv(),$B=tt(nn),uhe=ge(Ye),ihe=B(ue),lhe=ae(nn),ul=(function(){function e(){}return e.value=new e,e})(),_u=(function(){function e(){}return e.value=new e,e})(),ko=(function(){function e(){}return e.value=new e,e})();var xs=pn,che=oe(xs);var she={to:function(e){if(e instanceof Se)return ul.value;if(e instanceof fe&&e.value0 instanceof Se)return _u.value;if(e instanceof fe&&e.value0 instanceof fe)return ko.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof ul)return new Se(je.value);if(e instanceof _u)return new fe(new Se(je.value));if(e instanceof ko)return new fe(new fe(je.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},g0={eq:function(e){return function(n){return e instanceof ul&&n instanceof ul||e instanceof _u&&n instanceof _u||e instanceof ko&&n instanceof ko}}},TR={eq:function(e){return function(n){return e===n}}},QB={compare:function(e){return function(n){return rhe(e)(n)}},Eq0:function(){return TR}};var D0=function(e){return ohe({livestream_conference_id:che(e.id),livestream_conference_presenter_name:ze("")(WB(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:ze("")(e.partnerType)})},KB=(function(){var e=function(n){if(n instanceof ul)return"waiting_room";if(n instanceof _u)return"on_air";if(n instanceof ko)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Vn(e)(Qn(she)(BB(BB(xB)(jB))(HB))(JB(JB(zB)))(HB))})(),YB=(function(){return VB({parse:KB,default:ul.value,diagnosticName:"livestream status"})})(),vhe=VB({parse:Li,default:kt(Jd),diagnosticName:"livestream scheduled start time"}),SR=function(e){return{uid:e.uid,title:e.title,description:e.description,url:e.url,imageUrl:e.imageUrl,duration:e.duration,tailTime:e.tailTime,stats:e.stats,isPrivate:e.isPrivate,legacyRecording:e.legacyRecording,collegeFair:e.collegeFair,id:e.id,school:WB(he(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:qB(n.id),slug:qB(n.slug)}}),scheduledStartTime:vhe(e.scheduledStartTime),onAirTime:$B(Li)(he(e.onAirTime)),streamStatus:YB(e.streamStatus),watchUrl:he(e.watchUrl),streamingStartTime:$B(Li)(he(e.streamingStartTime)),polls:uhe(e.polls)(function(n){return{poll:o2(n.poll),status:IR(n.status)}}),presenter:ihe(kB)(he(e.presenter)),partnerType:he(e.partnerType),guestPresenter:lhe(he(e.guestPresenter))(GB),zoomJoinUrl:he(e.zoomJoinUrl),zoomStartUrl:he(e.zoomStartUrl)}};var XB=oa(ra),ZB=na(ea),eH=la(ia),pc=(function(){function e(){}return e.value=new e,e})(),hh=(function(){function e(){}return e.value=new e,e})(),fhe={to:function(e){if(e instanceof Se)return pc.value;if(e instanceof fe)return hh.value;throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof pc)return new Se(je.value);if(e instanceof hh)return new fe(je.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},PE={eq:function(e){return function(n){return e instanceof pc&&n instanceof pc||e instanceof hh&&n instanceof hh}}};var CR=function(e){if(e instanceof hh)return"anonymous-all-schools";if(e instanceof pc)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},NE=(function(){return Ga(sn)({parse:Vn(CR)(Qn(fhe)(ta(XB)(Zn(Xn))(XB)(ZB))(ua(eH)(eH))(aa(ZB))),diagnosticName:"Profile.PublishScope",default:hh.value})})();var ts=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),rs=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),os=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),us=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var i2=function(e){return{id:e.id,title:e.title,requireAnonymousUserFirstName:e.requireAnonymousUserFirstName,requireAnonymousUserLastName:e.requireAnonymousUserLastName,requireAnonymousUserEmail:e.requireAnonymousUserEmail,requireReferredUserFirstName:e.requireReferredUserFirstName,requireReferredUserLastName:e.requireReferredUserLastName,description:he(e.description)}},am=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:Li(e.time)}},nH=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:he(e.fullName),publishScope:NE(e.publishScope)}},l2=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:he(e.autoDisplayMinutesFromStart)}},mc="overlay-visibility-test";var aH=oa(ra),OE=ta(aH)(Zn(Xn)),tH=na(ea),UE=aa(tH),rH=la(ia),kE=ua(rH),zf=(function(){function e(){}return e.value=new e,e})(),R0=(function(){function e(){}return e.value=new e,e})(),tm=(function(){function e(){}return e.value=new e,e})(),y0=(function(){function e(){}return e.value=new e,e})(),w0=(function(){function e(){}return e.value=new e,e})(),_he={to:function(e){if(e instanceof Se)return zf.value;if(e instanceof fe&&e.value0 instanceof Se)return R0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return tm.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return y0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe)return w0.value;throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof zf)return new Se(je.value);if(e instanceof R0)return new fe(new Se(je.value));if(e instanceof tm)return new fe(new fe(new Se(je.value)));if(e instanceof y0)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof w0)return new fe(new fe(new fe(new fe(je.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},oH=function(e){if(e instanceof zf)return"love-this";if(e instanceof R0)return"helpful";if(e instanceof tm)return"not-helpful";if(e instanceof y0)return"writing-down";if(e instanceof w0)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},uH=function(e){return{authorTag:e.authorTag,kind:oH(e.kind)}},phe=(function(){return Ga(sn)({parse:Vn(oH)(Qn(_he)(OE(OE(OE(OE(aH)(tH))(UE))(UE))(UE))(kE(kE(kE(kE(rH)))))(UE)),default:zf.value,diagnosticName:"Livestream Reaction Kind"})})(),iH=function(e){return{authorTag:e.authorTag,kind:phe(e.kind)}};var cH=typeof CV<"u"&&CV.pathInfo||typeof global<"u"&&global.CV&&global.CV.pathInfo||(e=>null);function sH(e,n){let a=typeof CV<"u"&&CV.apiEndpoint||typeof global<"u"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function vH(e,n,a,t,r){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(r.url,l);if(l.open(r.method||"GET",s,!0,r.username,r.password),r.headers)try{for(var d=0,p;(p=r.headers[d])!=null;d++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var R=function(E){return function(){u(new Error(E))}};return l.onerror=R(a),l.ontimeout=R(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(E){return E.length>0}).map(function(E){var w=E.indexOf(":");return t(E.substring(0,w))(E.substring(w+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,w,I){try{l.abort()}catch(L){return w(L)}return I()}}}var BE="application/json",fH="application/x-www-form-urlencoded";var pH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),mH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),dH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),c2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),DH=function(e){return e instanceof c2?new T(fH):e instanceof HE?new T(BE):G.value};var RH=(function(){return HE.create})();var yH=ut();var JE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),rm=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),wH=function(e){if(e instanceof JE||e instanceof qE)return yH(e.value0);if(e instanceof rm)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var v2=function(e){if(e instanceof JE)return"Accept";if(e instanceof qE)return"Content-Type";if(e instanceof rm)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var EH=hn(En),f2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),p2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$E=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),WE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),xE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),IH=function(e){if(e instanceof f2)return"arraybuffer";if(e instanceof _2)return"blob";if(e instanceof p2)return"document";if(e instanceof $E||e instanceof WE)return"text";if(e instanceof xE)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},TH=function(e){return e instanceof $E?new T(BE):G.value},SH=(function(){return new WE(EH)})();var CH=(function(){return new xE(EH)})();var GH=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})();var Rhe=ut();var om=function(e){return Rhe(mD(e))};function MH(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var zE=function(e){return MH(Me.create,Le.create,e)};function LH(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function PH(e,n,a){try{return n(LH(encodeURIComponent(a)))}catch(t){return e(t)}}function NH(e,n,a){try{return n(LH(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var GR=(function(){return T_(PH)(gn(G.value))(T.create)})();var VE=(function(){return T_(NH)(gn(G.value))(T.create)})();var Ehe=va(Ro),OH=B(ue),Ihe=cu(yl)(ka);var The=function(e){return e};var UH=(function(){var e=function(t){if(t.value1 instanceof G)return VE(t.value0);if(t.value1 instanceof T)return Ehe(OH(function(r){return function(u){return r+("="+u)}})(VE(t.value0)))(VE(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=OH(fo("&")),a=Ihe(e);return function(t){return n(a(The(t)))}})();var m2=(function(){function e(){}return e.value=new e,e})(),um=(function(){function e(){}return e.value=new e,e})(),d2=(function(){function e(){}return e.value=new e,e})(),im=(function(){function e(){}return e.value=new e,e})(),KE=(function(){function e(){}return e.value=new e,e})(),MR=(function(){function e(){}return e.value=new e,e})(),h2=(function(){function e(){}return e.value=new e,e})(),g2=(function(){function e(){}return e.value=new e,e})(),D2=(function(){function e(){}return e.value=new e,e})(),R2=(function(){function e(){}return e.value=new e,e})(),y2=(function(){function e(){}return e.value=new e,e})(),w2=(function(){function e(){}return e.value=new e,e})(),b2=(function(){function e(){}return e.value=new e,e})(),E2=(function(){function e(){}return e.value=new e,e})(),I2=(function(){function e(){}return e.value=new e,e})(),YE=(function(){function e(){}return e.value=new e,e})();var Che=function(e){return e},Fhe={show:function(e){if(e instanceof m2)return"OPTIONS";if(e instanceof um)return"GET";if(e instanceof d2)return"HEAD";if(e instanceof im)return"POST";if(e instanceof KE)return"PUT";if(e instanceof MR)return"DELETE";if(e instanceof h2)return"TRACE";if(e instanceof g2)return"CONNECT";if(e instanceof D2)return"PROPFIND";if(e instanceof R2)return"PROPPATCH";if(e instanceof y2)return"MKCOL";if(e instanceof w2)return"COPY";if(e instanceof b2)return"MOVE";if(e instanceof E2)return"LOCK";if(e instanceof I2)return"UNLOCK";if(e instanceof YE)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var kH=wr(oe(Fhe))(Che);var BH={eq:function(e){return function(n){return e instanceof m2&&n instanceof m2||e instanceof um&&n instanceof um||e instanceof d2&&n instanceof d2||e instanceof im&&n instanceof im||e instanceof KE&&n instanceof KE||e instanceof MR&&n instanceof MR||e instanceof h2&&n instanceof h2||e instanceof g2&&n instanceof g2||e instanceof D2&&n instanceof D2||e instanceof R2&&n instanceof R2||e instanceof y2&&n instanceof y2||e instanceof w2&&n instanceof w2||e instanceof b2&&n instanceof b2||e instanceof E2&&n instanceof E2||e instanceof I2&&n instanceof I2||e instanceof YE&&n instanceof YE}}};var HH=function(e){return $_(function(n){return function(){var t=e(function(r){return n(Me.create(r))()},function(r){return n(Le.create(r))()});return function(r){return $_(function(u){return function(){return t(r,function(l){return u(Me.create(l))()},function(l){return u(Le.create(l))()}),rM}})}}})};var S2=x(Zl(Or)),Mhe=Ip(Or),lm=bf(Or),JH=La(dD(DD)(Or)),Ahe=ev(Uc(Or)),XE=B(ue),Lhe=xi(Je)(Ot),Phe=be(Rr),Nhe=tt(nn),Ohe=B(Ye),Uhe=ge(st),khe=P_(Xo),Bhe=x(ba);var ZE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),eI=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),nI=(function(){function e(){}return e.value=new e,e})(),aI=(function(){function e(){}return e.value=new e,e})(),tI=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qH=function(e){return function(n){var a=function(p){return p===""?S2(F5):wr(function(R){return Mhe(Ep.create(R))})(S2)(zE(p))},t=(function(){if(n.responseFormat instanceof f2)return lm("ArrayBuffer");if(n.responseFormat instanceof _2)return lm("Blob");if(n.responseFormat instanceof p2)return function(p){return JH(lm("Document")(p))(JH(lm("XMLDocument")(p))(lm("HTMLDocument")(p)))};if(n.responseFormat instanceof $E)return Ahe(function(p){return n.responseFormat.value0(a(p))})(lm("String"));if(n.responseFormat instanceof WE)return lm("String");if(n.responseFormat instanceof xE)return gn(n.responseFormat.value0(S2(void 0)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])})(),r=function(p){if(p instanceof pH)return new Le(p.value0(bo));if(p instanceof mH)return new Le(bo(p.value0));if(p instanceof dH)return new Le(bo(p.value0));if(p instanceof hH)return new Le(bo(p.value0));if(p instanceof gH)return new Le(bo(p.value0));if(p instanceof c2)return Lc("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(XE(bo)(UH(p.value0)));if(p instanceof HE)return new Le(bo(V1(p.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[p.constructor.name])},u=function(p){return function(R){return p instanceof T&&!Lhe(m_(Phe)(v2)(p.value0))(R)?hp(R)(p.value0):R}},i=function(p){return u(XE(qE.create)(Nhe(DH)(p)))(u(XE(JE.create)(TH(n.responseFormat)))(n.headers))},l=function(p){return{method:kH(n.method),url:n.url,headers:Ohe(function(R){return{field:v2(R),value:wH(R)}})(i(n.content)),content:p,responseType:IH(n.responseFormat),username:et(n.username),password:et(n.password),withCredentials:n.withCredentials,timeout:ze(0)(XE(function(R){return R})(n.timeout))}},s=function(p){return Uhe(khe(HH(vH(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",GH.create,l(p)))))(function(R){if(R instanceof Le){var E=om(t(R.value0.body));if(E instanceof Me)return new Me(new eI(CO(E.value0),R.value0));if(E instanceof Le)return new Le({headers:R.value0.headers,status:R.value0.status,statusText:R.value0.statusText,body:E.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[E.constructor.name])}if(R instanceof Me)return new Me((function(){var w=yp(R.value0),I=w==="AffjaxTimeoutErrorMessageIdent";if(I)return nI.value;var L=w==="AffjaxRequestFailedMessageIdent";return L?aI.value:new tI(R.value0)})());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[R.constructor.name])})};if(n.content instanceof G)return s(et(G.value));if(n.content instanceof T){var d=r(n.content.value0);if(d instanceof Le)return s(et(new T(d.value0)));if(d instanceof Me)return Bhe(new Me(new ZE(d.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[d.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Dh=(function(){return{method:new Me(um.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:CH,timeout:G.value}})();var WH={eq:function(e){return function(n){return e===n}}};var C2={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var xH=qH(C2);function _J(e){return Buffer.from(e).toString("base64")}function pJ(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var A2=typeof btoa=="function";function mJ(e){let a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Jv||!Jv.key)return Jv||console.error("Pusher config is missing in global context"),new kge;let t={auth:{headers:{"X-CSRF-Token":Jv.authToken}},authEndpoint:Jv.authPath,cluster:Jv.cluster};return Jv.dev&&Object.assign(t,{wsHost:Jv.dev.wsHost,wsPort:Jv.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new MJ.default(Jv.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),AJ=e=>{let n=Oge().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),Uge()}};function kge(){typeof document<"u"&&(document.mockPusher=this),this.localObject={},this.channels=[],this.disconnect=function(){document.mockPusher=null},this.subscribe=function(e){let n=this.channels.find(t=>t.name===e);if(n)return n;let a=new Bge(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function Bge(e){this.name=e,this.handlers={},this.triggered=[],this.disconnect=()=>{},this.bind=function(n,a){this.handlers[n]=a},this.unbind=function(n,a){this.handlers[n]===a&&(this.handlers[n]=null)},this.trigger=function(n,a){this.triggered.push({eventName:n,eventData:a})}}var cI=function(e){return e};var jge=function(e){return e},NJ=function(e){var n=xe(e),a=jge(e.Eq0());return{compare:function(t){return function(r){return M8(n(t)(r))}},Eq0:function(){return a}}};var vI=function(e){return function(){console.error(e)}};var $J=function(e){var n=kn(e);return function(a){return n(vI(a))}};var cDe=x(St),WJ=ae(io),sDe=B(ca),vDe=$J(Mo),N2=function(e){var n=function(t){var r=e(t);return MM(r.view(r.init.value0)(gn(cDe(void 0))))},a=function(t){return function(r){return function(u){return function(){var l=WJ(WJ(Ai)((function(){var d=sDe(TE);return function(p){return d(_0(p))}})()))(EE(r))();if(l instanceof G)return vDe("Element #"+(r+" not found"))();if(l instanceof T){var s=NM(e(u))();return t(s)(l.value0)()}throw new Error("Failed pattern match at Elmish.Boot (line 117, column 11 - line 122, column 21): "+[l.constructor.name])}}}};return{mount:a(a5),renderToString:n,hydrate:a(t5)}};var _De=x(St),pDe=wi(),xJ=function(e){return{handleMaybe:function(n){return function(a){return zd((function(){var t=Wn(_De(void 0))(n);return function(r){return t(pDe(a(r)))}})())}}}};var Eh={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},jJ={handleEffect:function(e){return zd(e)}};var qv={handle:function(e){return function(n){return function(a){return e(n)()}}}},O2=function(e){return e.handleMaybe},U2=function(e){return e.handleEffect},Nl=function(e){return e.handle};var UR="";function VJ(e){var n=e.split(` `);return n.reduce(function(a,t){var r=hDe(t)||DDe(t)||wDe(t)||TDe(t)||EDe(t);return r&&a.push(r),a},[])}var mDe=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,dDe=/\((\S*)(?::(\d+))(?::(\d+))\)/;function hDe(e){var n=mDe.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=dDe.exec(n[2]);return t&&r!=null&&(n[2]=r[1],n[3]=r[2],n[4]=r[3]),{file:a?null:n[2],methodName:n[1]||UR,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var gDe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function DDe(e){var n=gDe.exec(e);return n?{file:n[2],methodName:n[1]||UR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var RDe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,yDe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function wDe(e){var n=RDe.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=yDe.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||UR,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var bDe=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function EDe(e){var n=bDe.exec(e);return n?{file:n[3],methodName:n[1]||UR,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var IDe=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function TDe(e){var n=IDe.exec(e);return n?{file:n[2],methodName:n[1]||UR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function KJ({skipFrames:e,prefix:n}){let a=new Error().stack,r=VJ(a)[e],u=QJ(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=QJ(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var QJ=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var FDe=x(Bn),GDe=hn(En),fI=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),MDe={map:function(e){return function(n){return new fI(function(a){return n.value0(function(t){return a(e(t))})})}}},ADe=B(MDe);var YJ=function(e){return PM(KJ(e))},Vf=function(e){return new fI(function(n){return n(e)})},vm=function(e){return function(n){return new fI(function(a){return Nf(e)(n)(a)})}},XJ=function(e){return function(n){return Nf(e)(function(a){return{init:FDe(void 0),update:gn(cf),view:gn(gn(n.value0(GDe)))}})(void 0)}},ZJ=function(e){var n=YJ({skipFrames:3,prefix:"WithHook"});return function(a){return XJ(n)(ADe(a)(e))}};var Ih=function(e){var n=YJ({skipFrames:3,prefix:"HooksComponent"});return XJ(n)(e)},$v=function(){return function(e){return function(n){return new fI(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},LDe=$v(),fm=function(e){return function(){return LDe}};Ct();var k2=class extends vt.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},eq=k2;var NDe=lr();var nq=function(e){return"ref:"+Vt(e)(lt.value)},aq=function(e){var n=nq(e);return function(a){return NDe(Ms(n)(a))}},tq=function(e){var n=nq(e);return function(a){return t1(n)(a)}};var UDe=ic(),rq=fn(ln)(da),oq=x(Bn),kDe=O2(xJ(O6)),uq={reflectSymbol:function(){return"deps"}},BDe=aq(uq),HDe=tq(uq),JDe=hn(En);var qDe=function(e){var n=UDe(e);return function(){return function(){return n(eq)}}},$De=qDe(on)()(),WDe=function(e){var n=Uu(e);return function(a){return function(t){return function(r){return function(u){return vm(a)(function(i){return t({init:rq(Ut(u(r)))(function(){return oq(r)}),update:function(l){return function(s){return rq(Ut(u(s)))(function(){return oq(s)})}},view:function(l){return function(s){return $De({componentDidUpdate:kDe(s)(function(d){var p=n(BDe(d))(r);return p?new T(r):G.value}),deps:HDe(r)})(i(void 0))}}})})}}}}};var Th=function(e){var n=WDe(e);return function(a){return function(t){return n("UseEffectPrime")(JDe)(a)(t)}}};var iq=x(Bn),xDe=hn(En);var jDe=function(e){return function(n){return function(a){return vm(e)(function(t){return n({init:iq(a),update:function(r){return function(u){return iq(u)}},view:lp(t)})})}}},cs=function(e){return jDe("UseState")(xDe)(e)};var B2=(function(){return $v()(cs(G.value))(function(e){return Vf(new yn(e.value0,P1(e.value0)(e.value1)))})})();var lq=fn(ln)(da),VDe=Mi(qe),QDe=hn(En),cq=x(Bn),kR=function(e){return function(n){return vm("UseSubscription")(function(a){return{init:lq(VDe(QDe)(e))(function(){return cq(void 0)}),update:function(t){return function(r){return lq(Ut(n(r)))(function(){return cq(void 0)})}},view:function(t){return function(r){return a(void 0)}}}})}};var pI=typeof CV<"u"&&CV.assetsRoot||typeof global<"u"&&global.CV&&global.CV.assetsRoot||"/";var HR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Ol=(function(){function e(){}return e.value=new e,e})();var mq=function(e){if(e instanceof HR)return e.value0;if(e instanceof Ol)return"";throw new Error("Failed pattern match at Utils.HTML.Img.Alt (line 24, column 15 - line 26, column 19): "+[e.constructor.name])};var ZDe=(function(){function e(){}return e.value=new e,e})(),eRe=(function(){function e(){}return e.value=new e,e})();var dq=function(e){if(e instanceof ZDe)return"eager";if(e instanceof eRe)return"lazy";throw new Error("Failed pattern match at Utils.HTML.Img.Loading (line 19, column 15 - line 21, column 17): "+[e.constructor.name])};var H2=Pc(iu(Ot)),aRe=nu(),tRe=ge(ue),rRe=Vc()(),mI=function(e){var n=El(e);return function(a){return Gr(n(a))}},hq=function(e){if(H2(mI("http://"))(H2(mI("https://"))(H2(mI("//"))(mI("blob:"))))(e))return e;if($e)return pI+ze(e)(El("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 69, column 1 - line 69, column 30): "+[e.constructor.name])},Ul=function(){return function(e){return function(n){var a=aRe(n),t={alt:mq(a.alt),height:Za(a.height)(void 0),loading:ze(void 0)(tRe(Pl(a.loading))(dq)),onClick:Za(a.onClick)(void 0),src:hq(a.src),style:Za(a.style)(void 0),width:Za(a.width)(void 0)};return rRe(e)(t)}}};var Dq=x(Bn),oRe=Ga(aE),uRe=ae(yi);var iRe={init:Dq(void 0),update:function(e){return function(n){return Dq(void 0)}},view:function(e){return function(n){return Aa}}},J2=function(e){var n=B_(e);return function(a){return N2(oRe({parse:function(t){return uRe(n(t))(function(r){return Wn(new Me("Component construction failed"))(Le.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:iRe}))}};var ke=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jn=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var WRe=yo(Je)(cr),xRe=ti(St)(lu),jRe=ge(BM);var zRe={show:function(e){return e}},VRe=oe(zRe);var DI=Ee;var QRe=function(e){var n=l0(e);return function(a){return function(t){return function(r){var u=WRe(["Pusher event ",t," over channel ",VRe(a)]),i=function(l){return xRe(n(u)(l))(r)()};return function(){return AJ({channel:a,event:t,handler:i})}}}}},dc=function(e){var n=QRe(e);return function(a){var t=a.Monad0(),r=ae(t.Bind1()),u=kn(a),i=x(t.Applicative0());return function(l){return function(s){return function(d){return r(u(n(l)(s)(d)))(function(p){return i(u(p))})}}}}},KRe=dc(Sp),RI=function(e){var n=KRe(e);return function(a){return function(t){return jRe(n(a)(t))(gn(void 0))}}};var $q=Hv(kv),ll=js($q),Bo=ae(Na),qR=js(Hv($q)),Wq=x(ba),YRe=ge(ue),JR=ht(),xq=$({reflectSymbol:function(){return"pollId"}})(Dn),XRe=$({reflectSymbol:function(){return"status"}})(Ee)(mn),ZRe=sr(gt(JR(xq(XRe)))),jq=B(Ye),zq=B(st),eye=$({reflectSymbol:function(){return"id"}}),nye=eye(Dn),Vq=JR($({reflectSymbol:function(){return"author"}})(JR($({reflectSymbol:function(){return"cvid"}})(Ee)($({reflectSymbol:function(){return"username"}})(Ee)(mn))))(nye($({reflectSymbol:function(){return"isFromHQ"}})(ct)($({reflectSymbol:function(){return"isPublic"}})(ct)($({reflectSymbol:function(){return"text"}})(Ee)($({reflectSymbol:function(){return"time"}})(Ee)(mn))))))),aye=bh(Vq);var tye=Bt(Ee);var rye=bh(gt(JR(xq($({reflectSymbol:function(){return"responses"}})(JR($({reflectSymbol:function(){return"answered"}})(Dn)($({reflectSymbol:function(){return"optionCounts"}})(gt(Dn))($({reflectSymbol:function(){return"seen"}})(Dn)($({reflectSymbol:function(){return"skipped"}})(Dn)(mn))))))(mn))))),oye=bh(tye),uye=bh(gt(Vq));var V2=qR("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Bo(e({id:n.id,status:LE(a)}))(Bv(function(t){return Wq(ze([])(YRe(ZRe(t))(jq(function(r){return{pollId:r.pollId,status:IR(r.status)}}))))}))}}});var Q2=qR("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Bo(e({id:n.id,options:a}))(ro)}}}),Qq=ll("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Bo(e({conference_id:n}))(ro)}}),Kq=ll("livestreams_conferences_status_complete_path")(function(e){return function(n){return Bo(e({conference_id:n}))(ro)}}),Yq=ll("livestreams_cta_save_referral_path")(function(e){return function(n){return Bo(e(n))(ro)}}),Xq=ll("livestreams_polls_report_shown_path")(function(e){return function(n){return Bo(e({id:n.id}))(ro)}}),Zq=qR("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Bo(e({stream_id:n,visible:a.visible}))(ro)}}}),e$=qR("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Bo(e({conference_id:n,current_time_minutes:a}))(ro)}}}),n$=ll("livestreams_questions_visibility_path")(function(e){return function(n){return Bo(e({question_id:n.questionId,is_public:n.isPublic}))(ro)}}),a$=ll("livestreams_questions_post_path")(function(e){return function(n){return Bo(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Bv(function(a){return zq(am)(aye("Livestream question")(a))}))}}),t$=ll("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ro)}}),r$=ll("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ro)}}),o$=ll("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ro)}}),u$=ll("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(ro)}}),yI=ll("livestreams_register_path")(function(e){return function(n){return Bo(e({from_conference_id:et(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(ro)}});var i$=qR("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Bo(e({conference_id:n,reaction:uH(a)}))(ro)}}}),l$=ll("livestreams_polls_responses_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Bv(rye("livestream poll responses")))}}),c$=ll("livestreams_conferences_download_url_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Bv(function(a){return zq(he)(oye("Livestream download URL")(a))}))}}),wI=js(kv)("livestreams_dismiss_network_settings_modal_path")(function(e){return Bo(e({}))(ro)});var s$=ll("livestreams_conferences_ban_user_path")(function(e){return function(n){return Bo(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(ro)}}),bI=ll("livestreams_questions_all_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Bv(function(a){return Bo(uye("Livestream questions")(a))(function(t){return Wq(jq(am)(t))})}))}});var X2=(function(){function e(){}return e.value=new e,e})(),Z2=(function(){function e(){}return e.value=new e,e})(),eL=(function(){function e(){}return e.value=new e,e})(),nL=(function(){function e(){}return e.value=new e,e})(),aL=(function(){function e(){}return e.value=new e,e})(),tL=(function(){function e(){}return e.value=new e,e})(),rL=(function(){function e(){}return e.value=new e,e})(),oL=(function(){function e(){}return e.value=new e,e})(),uL=(function(){function e(){}return e.value=new e,e})(),iL=(function(){function e(){}return e.value=new e,e})(),lL=(function(){function e(){}return e.value=new e,e})(),cL=(function(){function e(){}return e.value=new e,e})(),sL=(function(){function e(){}return e.value=new e,e})(),vL=(function(){function e(){}return e.value=new e,e})(),Br=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fL=(function(){function e(){}return e.value=new e,e})();var II=function(e){if(e instanceof Br&&e.value0 instanceof X2)return"architecture";if(e instanceof Br&&e.value0 instanceof eL)return"chemistry";if(e instanceof Br&&e.value0 instanceof Z2)return"business";if(e instanceof Br&&e.value0 instanceof nL)return"computer-science";if(e instanceof Br&&e.value0 instanceof aL)return"criminal-justice-and-corrections";if(e instanceof Br&&e.value0 instanceof tL)return"economics";if(e instanceof Br&&e.value0 instanceof rL)return"engineering";if(e instanceof Br&&e.value0 instanceof oL)return"english";if(e instanceof Br&&e.value0 instanceof uL)return"film";if(e instanceof Br&&e.value0 instanceof iL)return"finance";if(e instanceof Br&&e.value0 instanceof lL)return"history";if(e instanceof Br&&e.value0 instanceof cL)return"political-science";if(e instanceof Br&&e.value0 instanceof sL)return"pre-med";if(e instanceof Br&&e.value0 instanceof vL)return"psychology";if(e instanceof fL)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var TI=(function(){function e(){}return e.value=new e,e})(),mye=(function(){function e(){}return e.value=new e,e})(),dye=(function(){function e(){}return e.value=new e,e})();var _$=function(e){if(e instanceof TI)return G.value;if(e instanceof dye)return new T("open");if(e instanceof mye)return new T("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var m$=function(e){var n=UM(e);return function(){return function(){return n("button")}}};var d$=function(e){var n=UM(e);return function(){return function(){return n("a")}}};var Y1e=Xr(iu(Ot)),X1e=function(e){return e},vn=bo(null),Z1e=function(e){return Y1e(A_)(e)},h$=function(e){var n=Z1e(e);return n?e:""},Qr=function(e){return X1e(bo(e))};var eEe=U2(jJ),g$=Os()(),un=function(e){return eEe(e)},ga=function(e){var n=m$(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(g$(r)({className:a,"aria-label":t}))(u)}}}}}}},D$=function(e){var n=ga(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},oo=function(e){var n=d$(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(g$(r)({className:a,"aria-label":t}))(u)}}}}}}};var C$=lr();var FI=function(e){return function(n){var a=(function(){var u=gv("?")(n);return u?"&":"?"})(),t=C$(GR(e.value)),r=C$(GR(e.key));return n+(a+(r+("="+t)))}};var UEe=(function(){function e(){}return e.value=new e,e})(),kEe=(function(){function e(){}return e.value=new e,e})(),BEe=(function(){function e(){}return e.value=new e,e})(),HEe=(function(){function e(){}return e.value=new e,e})(),JEe=(function(){function e(){}return e.value=new e,e})(),qEe=(function(){function e(){}return e.value=new e,e})(),$Ee=(function(){function e(){}return e.value=new e,e})(),WEe=(function(){function e(){}return e.value=new e,e})(),xEe=(function(){function e(){}return e.value=new e,e})(),jEe=(function(){function e(){}return e.value=new e,e})(),zEe=(function(){function e(){}return e.value=new e,e})(),VEe=(function(){function e(){}return e.value=new e,e})(),QEe=(function(){function e(){}return e.value=new e,e})(),KEe=(function(){function e(){}return e.value=new e,e})(),YEe=(function(){function e(){}return e.value=new e,e})(),XEe=(function(){function e(){}return e.value=new e,e})(),ZEe=(function(){function e(){}return e.value=new e,e})(),eIe=(function(){function e(){}return e.value=new e,e})(),nIe=(function(){function e(){}return e.value=new e,e})(),aIe=(function(){function e(){}return e.value=new e,e})(),tIe=(function(){function e(){}return e.value=new e,e})(),rIe=(function(){function e(){}return e.value=new e,e})(),oIe=(function(){function e(){}return e.value=new e,e})(),uIe=(function(){function e(){}return e.value=new e,e})(),iIe=(function(){function e(){}return e.value=new e,e})(),lIe=(function(){function e(){}return e.value=new e,e})(),cIe=(function(){function e(){}return e.value=new e,e})(),sIe=(function(){function e(){}return e.value=new e,e})(),vIe=(function(){function e(){}return e.value=new e,e})(),fIe=(function(){function e(){}return e.value=new e,e})(),_Ie=(function(){function e(){}return e.value=new e,e})(),pIe=(function(){function e(){}return e.value=new e,e})(),mIe=(function(){function e(){}return e.value=new e,e})(),dIe=(function(){function e(){}return e.value=new e,e})(),hIe=(function(){function e(){}return e.value=new e,e})(),gIe=(function(){function e(){}return e.value=new e,e})(),DIe=(function(){function e(){}return e.value=new e,e})(),RIe=(function(){function e(){}return e.value=new e,e})(),yIe=(function(){function e(){}return e.value=new e,e})(),wIe=(function(){function e(){}return e.value=new e,e})(),bIe=(function(){function e(){}return e.value=new e,e})(),EIe=(function(){function e(){}return e.value=new e,e})(),IIe=(function(){function e(){}return e.value=new e,e})(),TIe=(function(){function e(){}return e.value=new e,e})(),SIe=(function(){function e(){}return e.value=new e,e})(),CIe=(function(){function e(){}return e.value=new e,e})(),FIe=(function(){function e(){}return e.value=new e,e})(),GIe=(function(){function e(){}return e.value=new e,e})(),MIe=(function(){function e(){}return e.value=new e,e})(),AIe=(function(){function e(){}return e.value=new e,e})(),LIe=(function(){function e(){}return e.value=new e,e})(),PIe=(function(){function e(){}return e.value=new e,e})(),NIe=(function(){function e(){}return e.value=new e,e})(),OIe=(function(){function e(){}return e.value=new e,e})(),UIe=(function(){function e(){}return e.value=new e,e})(),kIe=(function(){function e(){}return e.value=new e,e})();var Ba=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cl=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var F$=function(e){if(e instanceof Ba&&e.value0 instanceof UEe)return"AcceptanceRate";if(e instanceof Ba&&e.value0 instanceof kEe)return"AcceptanceRateMen";if(e instanceof Ba&&e.value0 instanceof BEe)return"AcceptanceRateWomen";if(e instanceof Ba&&e.value0 instanceof HEe)return"Address";if(e instanceof Ba&&e.value0 instanceof JEe)return"AdmissionChances";if(e instanceof Ba&&e.value0 instanceof qEe)return"AdmissionDifficulty";if(e instanceof Ba&&e.value0 instanceof $Ee)return"AdmissionsNotificationDate";if(e instanceof Ba&&e.value0 instanceof WEe)return"AdmissionsWebsite";if(e instanceof Ba&&e.value0 instanceof xEe)return"AppDeadlineIsRolling";if(e instanceof Ba&&e.value0 instanceof jEe)return"ApplicationEffort";if(e instanceof Ba&&e.value0 instanceof zEe)return"ApplicationRound";if(e instanceof Ba&&e.value0 instanceof VEe)return"BasketballConference";if(e instanceof Ba&&e.value0 instanceof QEe)return"CampusSetting";if(e instanceof Ba&&e.value0 instanceof KEe)return"City";if(e instanceof Ba&&e.value0 instanceof YEe)return"ClassRank";if(e instanceof Ba&&e.value0 instanceof XEe)return"CoEdSingleSex";if(e instanceof Ba&&e.value0 instanceof ZEe)return"CollegeType";if(e instanceof Ba&&e.value0 instanceof eIe)return"CommuterCollege";if(e instanceof Ba&&e.value0 instanceof nIe)return"Diversity";if(e instanceof Ba&&e.value0 instanceof aIe)return"DropoutRate";if(e instanceof Ba&&e.value0 instanceof rIe)return"FinancialAidWebsite";if(e instanceof Ba&&e.value0 instanceof oIe)return"FirstYearEnrollment";if(e instanceof Ba&&e.value0 instanceof uIe)return"FootballConference";if(e instanceof Ba&&e.value0 instanceof iIe)return"FourYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof lIe)return"HasDivisionOneBasketball";if(e instanceof Ba&&e.value0 instanceof cIe)return"HasDivisionOneFootball";if(e instanceof Ba&&e.value0 instanceof sIe)return"HasMedicalSchool";if(e instanceof Ba&&e.value0 instanceof vIe)return"HasStudyAbroad";if(e instanceof Ba&&e.value0 instanceof fIe)return"HBCU";if(e instanceof Ba&&e.value0 instanceof _Ie)return"InListStatus";if(e instanceof Ba&&e.value0 instanceof pIe)return"MainWebsite";if(e instanceof Ba&&e.value0 instanceof tIe)return"Majors";if(e instanceof Ba&&e.value0 instanceof mIe)return"Name";if(e instanceof Ba&&e.value0 instanceof dIe)return"NetCostEstimate";if(e instanceof Ba&&e.value0 instanceof hIe)return"Notes";if(e instanceof Ba&&e.value0 instanceof gIe)return"PercentInternationalStudents";if(e instanceof Ba&&e.value0 instanceof DIe)return"Phone";if(e instanceof Ba&&e.value0 instanceof RIe)return"Photo";if(e instanceof Ba&&e.value0 instanceof yIe)return"Prestige";if(e instanceof Ba&&e.value0 instanceof wIe)return"ProgramLength";if(e instanceof Ba&&e.value0 instanceof bIe)return"PublicPrivate";if(e instanceof Ba&&e.value0 instanceof EIe)return"RecommendationLetters";if(e instanceof Ba&&e.value0 instanceof IIe)return"Region";if(e instanceof Ba&&e.value0 instanceof TIe)return"ReligiousAffiliation";if(e instanceof Ba&&e.value0 instanceof SIe)return"SatActDeadline";if(e instanceof Ba&&e.value0 instanceof CIe)return"SatActTestPolicy";if(e instanceof Ba&&e.value0 instanceof FIe)return"SatSubjectTestDeadline";if(e instanceof Ba&&e.value0 instanceof GIe)return"SixYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof MIe)return"State";if(e instanceof Ba&&e.value0 instanceof AIe)return"StudentFacultyRatio";if(e instanceof Ba&&e.value0 instanceof LIe)return"SubmissionDeadline";if(e instanceof Ba&&e.value0 instanceof PIe)return"TOEFLPolicy";if(e instanceof Ba&&e.value0 instanceof NIe)return"TotalUndergrads";if(e instanceof Ba&&e.value0 instanceof OIe)return"TuitionInState";if(e instanceof Ba&&e.value0 instanceof UIe)return"TuitionOutOfState";if(e instanceof Ba&&e.value0 instanceof kIe)return"YieldRate";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof X2)return"RankingArchitecture";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof Z2)return"RankingBusiness";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof eL)return"RankingChemistry";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof nL)return"RankingComputerScience";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof aL)return"RankingCriminalJusticeAndCorrections";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof tL)return"RankingEconomics";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof rL)return"RankingEngineering";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof oL)return"RankingEnglish";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof uL)return"RankingFilm";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof iL)return"RankingFinance";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof lL)return"RankingHistory";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof cL)return"RankingPoliticalScience";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof sL)return"RankingPreMed";if(e instanceof cl&&e.value0 instanceof Br&&e.value0.value0 instanceof vL)return"RankingPsychology";if(e instanceof cl&&e.value0 instanceof fL)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var HIe=(function(){function e(){}return e.value=new e,e})(),JIe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qIe=(function(){function e(){}return e.value=new e,e})();var G$=function(e){if(e instanceof HIe)return"filters";if(e instanceof JIe)return"filter:"+F$(e.value0);if(e instanceof qIe)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 33, column 26 - line 36, column 39): "+[e.constructor.name])};function M$(e,n){typeof CV<"u"&&CV.tracking&&CV.tracking.event(e,n)}var xIe=Il();var Kf=function(e){var n=kn(e);return function(a){return function(t){return n(function(){return M$(a,t)})}}},Yf=function(e){var n=Kf(e);return function(){return function(a){return function(t){return n(a)(xIe(t))}}}};var WR=(function(){function e(){}return e.value=new e,e})(),C0=(function(){function e(){}return e.value=new e,e})(),xR=(function(){function e(){}return e.value=new e,e})(),UTe=(function(){function e(){}return e.value=new e,e})(),k$=function(e){if(e instanceof WR)return"modal-sm";if(e instanceof C0)return"";if(e instanceof xR)return"modal-lg";if(e instanceof UTe)return"modal-xl";throw new Error("Failed pattern match at Bootstrap.Modal.Size (line 14, column 13 - line 18, column 27): "+[e.constructor.name])};var cW=ml(lW(),1),sW=cW.default;var DSe=ic(),vW=function(e){var n=DSe(e);return function(){return function(){return n(sW)}}};function FL(e){return function(){return function(n){return e(n)()}}}function GL(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function ML(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var fW="message";var _W="hashchange";var pW="popstate";var mW="keyup",dW="keydown";var hW="mouseup";var gW="mousemove";var DW=kn(qe),RW=B(ca),SSe=tt(io),QR=(function(){var e=function(t){return function(r){return function(u){return DW(function(){var l=r(),s=FL(function(d){return u(d)})();return GL(t)(s)(!1)(l)(),DW(ML(t)(s)(!1)(l))})}}},n=function(t){return e(t)(RW(Zk)(Ai))},a=function(t){return e(t)(RW(jk)(SSe(_0)(Ai)))};return{hashchange:n(_W),mousemove:n(gW),mouseup:n(hW),popstate:n(pW),resize:n("resize"),message:n(fW),keydown:a(dW),keyup:a(mW),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}})();var OI=function(){return Ke};var UI=Pe(on),PL=nu(),CSe=vW(on)()(),LL=Vr(on)()(),FSe=Vr(Ce)()(),GSe=Pe(Ce),MSe=ga(ie)()(),ASe=Cr(ba),LSe=kn(qe),wW=OI(),zs=function(){return function(e){var n=UI("modal-backdrop fade show")(Aa),a=PL(e),t=a.id+"-description",r=Pl(a.footer),u=Pl(a.header),i=a.id+"-label",l={style:Za(a.dialogStyle)(Yt({})),role:"dialog","aria-modal":"true","aria-labelledby":(function(){if(u instanceof T)return i;if(u instanceof G)return"";throw new Error("Failed pattern match at Bootstrap.Modal (line 71, column 11 - line 73, column 26): "+[u.constructor.name])})(),"aria-describedby":t},s=Za(a.size)(C0.value),d=fo(" ")([(function(){var R=Za(a.scrollable)(!0);return R?"modal-dialog-scrollable":""})(),(function(){var R=Za(a.centered)(!0);return R?"modal-dialog-centered":""})(),k$(s),Za(a.dialogClass)("")]),p=CSe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(UI("modal fade show d-block")(LL("modal-dialog "+d)(l)(FSe("modal-content "+Za(a.contentClass)(""))({style:Za(a.contentStyle)(Yt({}))})([ja(u)(LL("modal-header "+Za(a.headerClass)(""))({id:i})),LL("modal-body "+Za(a.bodyClass)(""))({id:t})(a.body),ja(r)(UI("modal-footer "+Za(a.footerClass)("")))]))));return Oe([p,n])}},NL=zs(),Vs=function(){return function(e){var n=PL(e),a=GSe("d-flex w-100 justify-content-between align-items-center")([UI("mr-4")(Za(n.title)(Aa)),MSe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Za(n.dismissButtonClass)("text-body"))(Qr("Close"))({type:"button",onClick:un(function(r){return n.onDismiss})})("")]),t=function(r){return ASe(r.key==="Escape")(LSe(n.onDismiss))};return ZJ(kR(QR.keyup)(t))(function(r){var u=Za(n.bodyScrollable)(!1);return NL(u?(function(){var i=PL(wW(n));return{body:i.body,bodyClass:i.bodyClass,centered:i.centered,contentClass:i.contentClass,contentStyle:i.contentStyle,dialogClass:i.dialogClass,dialogStyle:i.dialogStyle,footer:i.footer,footerClass:i.footerClass,headerClass:i.headerClass,id:i.id,scrollable:i.scrollable,size:i.size,header:a}})():wW({bodyClass:n.bodyClass,bodyScrollable:n.bodyScrollable,centered:n.centered,contentClass:n.contentClass,contentStyle:n.contentStyle,dialogClass:n.dialogClass,dialogStyle:n.dialogStyle,dismissButtonClass:n.dismissButtonClass,footer:n.footer,footerClass:n.footerClass,headerClass:n.headerClass,id:n.id,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Oe([a,n.body])}))})}},Fh=function(e){var n=nR(e);return function(a){return function(t){return function(r){return NL({id:t.id,bodyClass:a,body:Oe(n(r))})}}}};var NSe=nu(),OSe=hn(En),USe=t0(Ce)()(),kSe=ga(on)()(),BSe=vu()();var kI="login",OL=function(){return function(e){var n=NSe(e),a=(function(){var u=Za(n.auth0ActiveTab)(kI);return u})(),t=ze({path:"",token:"",impersonationToken:""})(iI("login_path")),r=function(u){return function(i){return Wn(OSe)(function(l){return FI((function(s){return{key:u,value:s}})(l))})(Pl(i))}};return USe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(FI({key:"screen_hint",value:a})(t.path))),target:(function(){var u=Za(n.openInNewTab)(!1);return u?"_blank":""})()})([kSe(Za(n.className)("btn btn-primary px-4"))(vn)({type:"submit",disabled:Za(n.disabled)(!1)})(Za(n.content)(cn(Za(n.text)("Log in")))),BSe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var dm=function(e){return function(n){return function(){return n[e]}}},$Se=dm("URL"),WSe=dm("documentURI"),xSe=dm("origin"),jSe=dm("compatMode"),zSe=dm("characterSet"),VSe=dm("contentType");var QSe=dm("documentElement");var BI=function(e){return function(n){return n[e]}},ZSe=BI("namespaceURI"),eCe=BI("prefix"),nCe=BI("localName"),aCe=BI("tagName");function kL(e){return function(){return e.id}}function BL(e){return function(){return e.classList}}function HL(e){return function(){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}}var JL=Ke;var EW=Kn("Element");var Qs=function(e){return function(n){return function(){return n[e]}}};var iCe=Qs("baseURI"),lCe=Qs("ownerDocument"),IW=Qs("parentNode"),cCe=Qs("parentElement");var sCe=Qs("childNodes"),vCe=Qs("firstChild"),fCe=Qs("lastChild"),_Ce=Qs("previousSibling"),pCe=Qs("nextSibling"),mCe=Qs("nodeValue");var dCe=Qs("textContent");function $L(e){return function(n){return function(){return e.isEqualNode(n)}}}var yCe=B(ca);var TW=(function(){var e=yCe(he);return function(n){return e(IW(n))}})();var gm=(function(){function e(){}return e.value=new e,e})(),CW=(function(){function e(){}return e.value=new e,e})(),FW=(function(){function e(){}return e.value=new e,e})(),KR=(function(){function e(){}return e.value=new e,e})(),GW=(function(){function e(){}return e.value=new e,e})(),MW=(function(){function e(){}return e.value=new e,e})(),AW=(function(){function e(){}return e.value=new e,e})();var HI=function(e){if(e instanceof gm)return G.value;if(e instanceof CW)return new T("for-you");if(e instanceof FW)return new T("chancing");if(e instanceof KR)return new T("finances");if(e instanceof GW)return new T("majors");if(e instanceof MW)return new T("admission-requirements");if(e instanceof AW)return new T("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 84, column 14 - line 91, column 39): "+[e.constructor.name])};var xL=ge(ue);var jL=Dd(cr),XCe=ut(),ZCe=zl(ue),zL=function(e){return"/schools/"+e.slug},VL="/schools/hub";var LW=function(e){return function(n){var a=xL(_$(n.whatificator))(function(l){return"simulator="+l}),t=xL(n.mobileOverlay)(function(l){return"overlay="+G$(l)}),r=fo("&")(oi([t,a])),u=xL(n.focusedSchool)(function(l){return jL("/")(oi([new T(XCe(l.slug)),HI(l.tab)]))}),i=(function(){return e.knownSeoState instanceof T&&n.seoView?jL("/")(oi([new T(zL({slug:e.knownSeoState.value0.slug})),u])):jL("/")(oi([new T(VL),new T(Wn(e.basePath)(II)(n.ranking)),ZCe(u)("d"),u]))})();return i+((function(){var l=r==="";return l?"":"?"})()+r)}};var NW="/profile";var tFe=ut();var QL=function(e){return function(n){return fo("/")(oi([new T("/schools"),new T(tFe(n)),HI(e)]))}},OW=NW,UW="/livestreams/upcoming";var rFe=function(e){return LW({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:TI.value})};var JI=function(e){return function(n){return rFe(new T({tab:e,slug:n}))}};var kW=(function(){function e(){}return e.value=new e,e})(),BW=(function(){function e(){}return e.value=new e,e})(),qI=(function(){function e(){}return e.value=new e,e})(),$I=(function(){function e(){}return e.value=new e,e})(),HW=(function(){function e(){}return e.value=new e,e})(),JW=(function(){function e(){}return e.value=new e,e})(),qW=(function(){function e(){}return e.value=new e,e})(),$W=function(e){if(e instanceof kW)return"avatar-xxs";if(e instanceof BW)return"avatar-xs";if(e instanceof qI)return"avatar-sm";if(e instanceof $I)return"";if(e instanceof HW)return"avatar-lg";if(e instanceof JW)return"avatar-xl";if(e instanceof qW)return"avatar-xxl";throw new Error("Failed pattern match at Dashkit.Avatar.Size (line 16, column 13 - line 23, column 34): "+[e.constructor.name])};var xW={show:ut()};var fFe=Number.MAX_SAFE_INTEGER;var ZL=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if($e)return e.first+(" "+e.last);throw new Error("Failed pattern match at Profile.Types.Name (line 11, column 1 - line 11, column 27): "+[e.constructor.name])};var rGe=be(PE);var ZW={show:function(e){return e}};var ex=function(e){return rGe(e.publishScope)(pc.value)};var Gh=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),e3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),n3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),a3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),t3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),r3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),o3=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var u3=oe(xW);var oGe=oe(A9),ax=oe(c9),uGe=oe(ZW);var iGe="/messages";var lGe=function(e){return function(n){return e+("/"+(function(){if(n instanceof Gh)return"admission-officer/"+oGe(n.value0);if(n instanceof e3)return"school/"+ax(n.value0);if(n instanceof n3)return"student/"+uGe(n.value0);if(n instanceof a3)return"high-school/"+u3(n.value0);if(n instanceof t3)return"service-provider/"+u3(n.value0);if(n instanceof r3)return"parent/"+u3(n.value0);if(n instanceof o3)return"recruiter/"+ax(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])})())}},i3=lGe(iGe);var sGe=js(Hv(kv)),vGe=ae(Na),tx=ge(ue),rx=ut(),fGe=zt(st);var ox=sGe("network_connections_invite_school_path")(function(e){return function(n){return vGe(e({school_id:n.schoolId,message:et(n.introMessage),sem_user_id:et(tx(n.semUserId)(rx)),livestream_id:et(tx(n.livestreamId)(rx))}))(ro)}}),ux=function(e){return function(n){return fGe(ox({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var ix=function(e){return function(n){return function(a){return ox({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};Ct();function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;px+=1;var a=px;function t(r){if(r===0)hx(a),e();else{var u=mx(function(){t(r-1)});c3.set(a,u)}}return t(n),a}hc.cancel=function(e){var n=c3.get(e);return hx(n),dx(n)};function ym(e,n){return e?e.contains(n):!1}function XR(e){return e instanceof HTMLElement?e:uc.findDOMNode(e)}var wx=ml(yx());Ct();function _3(e,n){typeof e=="function"?e(n):So(e)==="object"&&e&&"current"in e&&(e.current=n)}function rT(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=Array(n);a"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4)))});Ct();var xx=ml(wm());Ct();Ct();var $x=ml(wm());function Mx(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit".concat(e)]="webkit".concat(n),a["Moz".concat(e)]="moz".concat(n),a["ms".concat(e)]="MS".concat(n),a["O".concat(e)]="o".concat(n.toLowerCase()),a}function RGe(e,n){var a={animationend:Mx("Animation","AnimationEnd"),transitionend:Mx("Transition","TransitionEnd")};return e&&("AnimationEvent"in n||delete a.animationend.animation,"TransitionEvent"in n||delete a.transitionend.transition),a}var yGe=RGe(Wv(),typeof window<"u"?window:{}),Lx={};Wv()&&(Ax=document.createElement("div"),Lx=Ax.style);var Ax,iT={};function Px(e){if(iT[e])return iT[e];var n=yGe[e];if(n)for(var a=Object.keys(n),t=a.length,r=0;r1&&arguments[1]!==void 0?arguments[1]:2;n();var u=hc(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Pr(function(){return function(){n()}},[]),[a,n]});Ct();var wGe=Wv()?WD:Pr,sT=wGe;var kx=[ss,e_,M0,cT],D3=!1,Bx=!0;function vT(e){return e===M0||e===cT}var Hx=(function(e,n){var a=n_(g3),t=Jr(a,2),r=t[0],u=t[1],i=Ux(),l=Jr(i,2),s=l[0],d=l[1];function p(){u(ss,!0)}return sT(function(){if(r!==g3&&r!==cT){var R=kx.indexOf(r),E=kx[R+1],w=n(r);w===D3?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}w===!0?L():Promise.resolve(w).then(L)})}},[e,r]),Pr(function(){return function(){d()}},[]),[p,r]});Ct();Ct();var Jx=(function(e){var n=Kt(),a=Kt(e);a.current=e;var t=$D(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(d3,t),i.removeEventListener(m3,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(d3,t),i.addEventListener(m3,t),n.current=i)}return Pr(function(){return function(){r(n.current)}},[]),[u,r]});function R3(e,n,a,t){var r=t.motionEnter,u=r===void 0?!0:r,i=t.motionAppear,l=i===void 0?!0:i,s=t.motionLeave,d=s===void 0?!0:s,p=t.motionDeadline,R=t.motionLeaveImmediately,E=t.onAppearPrepare,w=t.onEnterPrepare,I=t.onLeavePrepare,L=t.onAppearStart,U=t.onEnterStart,V=t.onLeaveStart,Q=t.onAppearActive,te=t.onEnterActive,le=t.onLeaveActive,ne=t.onAppearEnd,Z=t.onEnterEnd,ee=t.onLeaveEnd,me=t.onVisibleChanged,We=n_(),Qe=Jr(We,2),dn=Qe[0],qn=Qe[1],Mn=n_(G0),An=Jr(Mn,2),Hn=An[0],Ia=An[1],Da=n_(null),ha=Jr(Da,2),Rt=ha[0],_t=ha[1],Ha=Kt(!1),Sr=Kt(null);function Xe(){return a()}var Wa=Kt(!1);function At(jt){var W=Xe();if(!(jt&&!jt.deadline&&jt.target!==W)){var X=Wa.current,k;Hn===ZR&&X?k=ne==null?void 0:ne(W,jt):Hn===ey&&X?k=Z==null?void 0:Z(W,jt):Hn===ny&&X&&(k=ee==null?void 0:ee(W,jt)),Hn!==G0&&X&&k!==!1&&(Ia(G0,!0),_t(null,!0))}}var zn=Jx(At),Un=Jr(zn,1),Ze=Un[0],Ma=xD(function(){var jt,W,X;switch(Hn){case ZR:return jt={},sl(jt,ss,E),sl(jt,e_,L),sl(jt,M0,Q),jt;case ey:return W={},sl(W,ss,w),sl(W,e_,U),sl(W,M0,te),W;case ny:return X={},sl(X,ss,I),sl(X,e_,V),sl(X,M0,le),X;default:return{}}},[Hn]),Ja=Hx(Hn,function(jt){if(jt===ss){var W=Ma[ss];return W?W(Xe()):D3}if(In in Ma){var X;_t(((X=Ma[In])===null||X===void 0?void 0:X.call(Ma,Xe(),null))||null)}return In===M0&&(Ze(Xe()),p>0&&(clearTimeout(Sr.current),Sr.current=setTimeout(function(){At({deadline:!0})},p))),Bx}),pt=Jr(Ja,2),tr=pt[0],In=pt[1],Oa=vT(In);Wa.current=Oa,sT(function(){qn(n);var jt=Ha.current;if(Ha.current=!0,!!e){var W;!jt&&n&&l&&(W=ZR),jt&&n&&u&&(W=ey),(jt&&!n&&d||!jt&&R&&!n&&d)&&(W=ny),W&&(Ia(W),tr())}},[n]),Pr(function(){(Hn===ZR&&!l||Hn===ey&&!u||Hn===ny&&!d)&&Ia(G0)},[l,u,d]),Pr(function(){return function(){Ha.current=!1,clearTimeout(Sr.current)}},[]);var hr=Kt(!1);Pr(function(){dn&&(hr.current=!0),dn!==void 0&&Hn===G0&&((hr.current||dn)&&(me==null||me(dn)),hr.current=!0)},[dn,Hn]);var za=Rt;return Ma[ss]&&In===e_&&(za=at({transition:"none"},za)),[Hn,In,za,dn!=null?dn:n]}Ct();var bGe=(function(e){Lh(a,e);var n=Ph(a);function a(){return Mh(this,a),n.apply(this,arguments)}return Ah(a,[{key:"render",value:function(){return this.props.children}}]),a})(Pp),qx=bGe;function EGe(e){var n=e;So(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=oc(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,d=s===void 0?!0:s,p=r.forceRender,R=r.children,E=r.motionName,w=r.leavedClassName,I=r.eventProps,L=a(r),U=Kt(),V=Kt();function Q(){try{return U.current instanceof HTMLElement?U.current:XR(V.current)}catch{return null}}var te=R3(L,l,Q,r),le=Jr(te,4),ne=le[0],Z=le[1],ee=le[2],me=le[3],We=Kt(me);me&&(We.current=!0);var Qe=$D(function(Da){U.current=Da,_3(u,Da)},[u]),dn,qn=at(at({},I),{},{visible:l});if(!R)dn=null;else if(ne===G0||!a(r))me?dn=R(at({},qn),Qe):!d&&We.current?dn=R(at(at({},qn),{},{className:w}),Qe):p?dn=R(at(at({},qn),{},{style:{display:"none"}}),Qe):dn=null;else{var Mn,An;Z===ss?An="prepare":vT(Z)?An="active":Z===e_&&(An="start"),dn=R(at(at({},qn),{},{className:(0,$x.default)(h3(E,ne),(Mn={},sl(Mn,h3(E,"".concat(ne,"-").concat(An)),An),sl(Mn,E,typeof E=="string"),Mn)),style:ee}),Qe)}if(iM(dn)&&oT(dn)){var Hn=dn,Ia=Hn.ref;Ia||(dn=qD(dn,{ref:Qe}))}return nr(qx,{ref:V},dn)});return t.displayName="CSSMotion",t}var fT=EGe(lT);Ct();var _T="add",pT="keep",mT="remove",hT="removed";function IGe(e){var n;return e&&So(e)==="object"&&"key"in e?n=e:n={key:e},at(at({},n),{},{key:String(n.key)})}function dT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(IGe)}function Wx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],t=0,r=n.length,u=dT(e),i=dT(n);u.forEach(function(d){for(var p=!1,R=t;R1});return s.forEach(function(d){a=a.filter(function(p){var R=p.key,E=p.status;return R!==d||E!==mT}),a.forEach(function(p){p.key===d&&(p.status=pT)})}),a}var TGe=["component","children","onVisibleChanged","onAllRemoved"],SGe=["status"],CGe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function FGe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fT,a=(function(t){Lh(u,t);var r=Ph(u);function u(){var i;Mh(this,u);for(var l=arguments.length,s=new Array(l),d=0;d=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function ZGe(e,n,a,t){var r=It.clone(e),u={width:n.width,height:n.height};return t.adjustX&&r.left=a.left&&r.left+u.width>a.right&&(u.width-=r.left+u.width-a.right),t.adjustX&&r.left+u.width>a.right&&(r.left=Math.max(a.right-u.width,a.left)),t.adjustY&&r.top=a.top&&r.top+u.height>a.bottom&&(u.height-=r.top+u.height-a.bottom),t.adjustY&&r.top+u.height>a.bottom&&(r.top=Math.max(a.bottom-u.height,a.top)),It.mix(r,u)}function A3(e){var n,a,t;if(!It.isWindow(e)&&e.nodeType!==9)n=It.offset(e),a=It.outerWidth(e),t=It.outerHeight(e);else{var r=It.getWindow(e);n={left:It.getWindowScrollLeft(r),top:It.getWindowScrollTop(r)},a=It.viewportWidth(r),t=It.viewportHeight(r)}return n.width=a,n.height=t,n}function aj(e,n){var a=n.charAt(0),t=n.charAt(1),r=e.width,u=e.height,i=e.left,l=e.top;return a==="c"?l+=u/2:a==="b"&&(l+=u),t==="c"?i+=r/2:t==="r"&&(i+=r),{left:i,top:l}}function RT(e,n,a,t,r){var u=aj(n,a[1]),i=aj(e,a[0]),l=[i.left-u.left,i.top-u.top];return{left:Math.round(e.left-l[0]+t[0]-r[0]),top:Math.round(e.top-l[1]+t[1]-r[1])}}function tj(e,n,a){return e.lefta.right}function rj(e,n,a){return e.topa.bottom}function eMe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function TT(e,n,a){var t=a.target||n,r=A3(t),u=!aMe(t,a.overflow&&a.overflow.alwaysByViewport);return pj(e,r,a,u)}TT.__getOffsetParent=C3;TT.__getVisibleRectForElement=M3;function mj(e,n,a){var t,r,u=It.getDocument(e),i=u.defaultView||u.parentWindow,l=It.getWindowScrollLeft(i),s=It.getWindowScrollTop(i),d=It.viewportWidth(i),p=It.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var R={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+d&&r>=0&&r<=s+p,w=[a.points[0],"cc"];return pj(e,R,Vx(Vx({},a),{},{points:w}),E)}var aK=ml($Q());var xQ=(function(){if(typeof Map<"u")return Map;function e(n,a){var t=-1;return n.some(function(r,u){return r[0]===a?(t=u,!0):!1}),t}return(function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var t=e(this.__entries__,a),r=this.__entries__[t];return r&&r[1]},n.prototype.set=function(a,t){var r=e(this.__entries__,a);~r?this.__entries__[r][1]=t:this.__entries__.push([a,t])},n.prototype.delete=function(a){var t=this.__entries__,r=e(t,a);~r&&t.splice(r,1)},n.prototype.has=function(a){return!!~e(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,t){t===void 0&&(t=null);for(var r=0,u=this.__entries__;r0},e.prototype.connect_=function(){!X3||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),FPe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!X3||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(n){var a=n.propertyName,t=a===void 0?"":a,r=CPe.some(function(u){return!!~t.indexOf(u)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),jQ=(function(e,n){for(var a=0,t=Object.keys(n);a"u"||!(Element instanceof Object))){if(!(n instanceof Wh(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new kPe(n)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof Wh(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)&&(a.delete(n),a.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&n.activeObservations_.push(a)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,a=this.activeObservations_.map(function(t){return new BPe(t.target,t.broadcastRect())});this.callback_.call(n,a,n),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),VQ=typeof WeakMap<"u"?new WeakMap:new xQ,QQ=(function(){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=GPe.getInstance(),t=new HPe(n,a,this);VQ.set(this,t)}return e})();["observe","unobserve","disconnect"].forEach(function(e){QQ.prototype[e]=function(){var n;return(n=VQ.get(this))[e].apply(n,arguments)}});var JPe=(function(){return typeof AT.ResizeObserver<"u"?AT.ResizeObserver:QQ})(),KQ=JPe;function YQ(e,n){return e===n?!0:!e||!n?!1:"pageX"in n&&"pageY"in n?e.pageX===n.pageX&&e.pageY===n.pageY:"clientX"in n&&"clientY"in n?e.clientX===n.clientX&&e.clientY===n.clientY:!1}function XQ(e,n){e!==document.activeElement&&ym(n,e)&&typeof e.focus=="function"&&e.focus()}function Z3(e,n){var a=null,t=null;function r(i){var l=Jr(i,1),s=l[0].target;if(document.documentElement.contains(s)){var d=s.getBoundingClientRect(),p=d.width,R=d.height,E=Math.floor(p),w=Math.floor(R);(a!==E||t!==w)&&Promise.resolve().then(function(){n({width:E,height:w})}),a=E,t=w}}var u=new KQ(r);return e&&u.observe(e),function(){u.disconnect()}}Ct();var ZQ=(function(e,n){var a=vt.useRef(!1),t=vt.useRef(null);function r(){window.clearTimeout(t.current)}function u(i){if(r(),!a.current||i===!0){if(e()===!1)return;a.current=!0,t.current=window.setTimeout(function(){a.current=!1},n)}else t.current=window.setTimeout(function(){a.current=!1,u()},n)}return[u,function(){a.current=!1,r()}]});function eK(e){return typeof e!="function"?null:e()}function nK(e){return So(e)!=="object"||!e?null:e}var qPe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,d=n.monitorBufferTime,p=d===void 0?0:d,R=vt.useRef({}),E=vt.useRef(),w=vt.Children.only(t),I=vt.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=ZQ(function(){var Z=I.current,ee=Z.disabled,me=Z.target,We=Z.align,Qe=Z.onAlign;if(!ee&&me){var dn=E.current,qn,Mn=eK(me),An=nK(me);R.current.element=Mn,R.current.point=An,R.current.align=We;var Hn=document,Ia=Hn.activeElement;return Mn&&jx(Mn)?qn=TT(dn,Mn,We):An&&(qn=mj(dn,An,We)),XQ(Ia,dn),Qe&&qn&&Qe(dn,qn),!0}return!1},p),U=Jr(L,2),V=U[0],Q=U[1],te=vt.useRef({cancel:function(){}}),le=vt.useRef({cancel:function(){}});vt.useEffect(function(){var Z=eK(u),ee=nK(u);E.current!==le.current.element&&(le.current.cancel(),le.current.element=E.current,le.current.cancel=Z3(E.current,V)),(R.current.element!==Z||!YQ(R.current.point,ee)||!(0,aK.default)(R.current.align,i))&&(V(),te.current.element!==Z&&(te.current.cancel(),te.current.element=Z,te.current.cancel=Z3(Z,V)))}),vt.useEffect(function(){r?Q():V()},[r]);var ne=vt.useRef(null);return vt.useEffect(function(){s?ne.current||(ne.current=F0(window,"resize",V)):ne.current&&(ne.current.remove(),ne.current=null)},[s]),vt.useEffect(function(){return function(){te.current.cancel(),le.current.cancel(),ne.current&&ne.current.remove(),Q()}},[]),vt.useImperativeHandle(a,function(){return{forceAlign:function(){return V(!0)}}}),vt.isValidElement(w)&&(w=vt.cloneElement(w,{ref:rT(w.ref,E)})),w},tK=vt.forwardRef(qPe);tK.displayName="Align";var rK=tK;var oK=rK;Ct();var $Pe=Wv()?WD:Pr,eP=$Pe;var _K=ml(wm());function NT(e,n){this.v=e,this.k=n}function Qu(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Qu=function(i,l,s,d){function p(R,E){Qu(i,R,function(w){return this._invoke(R,E,w)})}l?r?r(i,l,{value:s,enumerable:!d,configurable:!d,writable:!d}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Qu(e,n,a,t)}function dy(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(w,I,L,U){var V=I&&I.prototype instanceof l?I:l,Q=Object.create(V.prototype);return Qu(Q,"_invoke",(function(te,le,ne){var Z,ee,me,We=0,Qe=ne||[],dn=!1,qn={p:0,n:0,v:e,a:Mn,f:Mn.bind(e,4),d:function(Hn,Ia){return Z=Hn,ee=0,me=e,qn.n=Ia,i}};function Mn(An,Hn){for(ee=An,me=Hn,n=0;!dn&&We&&!Ia&&n3?(Ia=Rt===Hn)&&(me=Da[(ee=Da[4])?5:(ee=3,3)],Da[4]=Da[5]=e):Da[0]<=ha&&((Ia=An<2&&haHn||Hn>Rt)&&(Da[4]=An,Da[5]=Hn,qn.n=Rt,ee=0))}if(Ia||An>1)return i;throw dn=!0,Hn}return function(An,Hn,Ia){if(We>1)throw TypeError("Generator is already running");for(dn&&Hn===1&&Mn(Hn,Ia),ee=Hn,me=Ia;(n=ee<2?e:me)||!dn;){Z||(ee?ee<3?(ee>1&&(qn.n=-1),Mn(ee,me)):qn.n=me:qn.v=me);try{if(We=2,Z){if(ee||(An="next"),n=Z[An]){if(!(n=n.call(Z,me)))throw TypeError("iterator result is not an object");if(!n.done)return n;me=n.value,ee<2&&(ee=0)}else ee===1&&(n=Z.return)&&n.call(Z),ee<2&&(me=TypeError("The iterator does not provide a '"+An+"' method"),ee=1);Z=e}else if((n=(dn=qn.n<0)?me:te.call(le,qn))!==i)break}catch(Da){Z=e,ee=1,me=Da}finally{We=1}}return{value:n,done:dn}}})(w,L,U),!0),Q}var i={};function l(){}function s(){}function d(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(Qu(n={},t,function(){return this}),n),R=d.prototype=l.prototype=Object.create(p);function E(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,d):(w.__proto__=d,Qu(w,r,"GeneratorFunction")),w.prototype=Object.create(R),w}return s.prototype=d,Qu(R,"constructor",d),Qu(d,"constructor",s),s.displayName="GeneratorFunction",Qu(d,r,"GeneratorFunction"),Qu(R),Qu(R,r,"Generator"),Qu(R,t,function(){return this}),Qu(R,"toString",function(){return"[object Generator]"}),(dy=function(){return{w:u,m:E}})()}function xh(e,n){function a(r,u,i,l){try{var s=e[r](u),d=s.value;return d instanceof NT?n.resolve(d.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(d).then(function(p){s.value=p,i(s)},function(p){return a("throw",p,i,l)})}catch(p){l(p)}}var t;this.next||(Qu(xh.prototype),Qu(xh.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Qu(this,"_invoke",function(r,u,i){function l(){return new n(function(s,d){a(r,i,s,d)})}return t=t?t.then(l,l):l()},!0)}function OT(e,n,a,t,r){return new xh(dy().w(e,n,a,t),r||Promise)}function uK(e,n,a,t,r){var u=OT(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function iK(e){var n=Object(e),a=[];for(var t in n)a.unshift(t);return function r(){for(;a.length;)if((t=a.pop())in n)return r.value=t,r.done=!1,r;return r.done=!0,r}}function nP(e){if(e!=null){var n=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(n)return n.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}throw new TypeError(So(e)+" is not iterable")}function hy(){"use strict";var e=dy(),n=e.m(hy),a=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function t(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===a||(l.displayName||l.name)==="GeneratorFunction")}var r={throw:1,return:2,break:3,continue:3};function u(i){var l,s;return function(d){l||(l={stop:function(){return s(d.a,2)},catch:function(){return d.v},abrupt:function(R,E){return s(d.a,r[R],E)},delegateYield:function(R,E,w){return l.resultName=E,s(d.d,nP(R),w)},finish:function(R){return s(d.f,R)}},s=function(R,E,w){d.p=l.prev,d.n=l.next;try{return R(E,w)}finally{l.next=d.n}}),l.resultName&&(l[l.resultName]=d.v,l.resultName=void 0),l.sent=d.v,l.next=d.n;try{return i.call(this,l)}finally{d.p=l.prev,d.n=l.next}}}return(hy=function(){return{wrap:function(s,d,p,R){return e.w(u(s),d,p,R&&R.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,d){return new NT(s,d)},AsyncIterator:xh,async:function(s,d,p,R,E){return(t(d)?OT:uK)(u(s),d,p,R,E)},keys:iK,values:nP}})()}function lK(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(d){return void a(d)}l.done?n(s):Promise.resolve(s).then(t,r)}function cK(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){lK(u,t,r,i,l,"next",s)}function l(s){lK(u,t,r,i,l,"throw",s)}i(void 0)})}}Ct();var sK=["measure","alignPre","align",null,"motion"],vK=(function(e,n){var a=n_(null),t=Jr(a,2),r=t[0],u=t[1],i=Kt();function l(p){u(p,!0)}function s(){hc.cancel(i.current)}function d(p){s(),i.current=hc(function(){l(function(R){switch(r){case"align":return"motion";case"motion":return"stable";default:}return R}),p==null||p()})}return Pr(function(){l("measure")},[e]),Pr(function(){r==="measure"&&n(),r&&(i.current=hc(cK(hy().mark(function p(){var R,E;return hy().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:R=sK.indexOf(r),E=sK[R+1],E&&R!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Pr(function(){return function(){s()}},[]),[r,d]});Ct();var fK=(function(e){var n=Ps({width:0,height:0}),a=Jr(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=xD(function(){var l={};if(e){var s=t.width,d=t.height;e.indexOf("height")!==-1&&d?l.height=d:e.indexOf("minHeight")!==-1&&d&&(l.minHeight=d),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]});var pK=oc(function(e,n){var a=e.visible,t=e.prefixCls,r=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,d=e.destroyPopupOnHide,p=e.forceRender,R=e.align,E=e.point,w=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,U=e.onMouseEnter,V=e.onMouseLeave,Q=e.onMouseDown,te=e.onTouchStart,le=e.onClick,ne=Kt(),Z=Kt(),ee=Ps(),me=Jr(ee,2),We=me[0],Qe=me[1],dn=fK(s),qn=Jr(dn,2),Mn=qn[0],An=qn[1];function Hn(){s&&An(w())}var Ia=vK(a,Hn),Da=Jr(Ia,2),ha=Da[0],Rt=Da[1],_t=Ps(0),Ha=Jr(_t,2),Sr=Ha[0],Xe=Ha[1],Wa=Kt();eP(function(){ha==="alignPre"&&Xe(0)},[ha]);function At(){return E||w}function zn(){var In;(In=ne.current)===null||In===void 0||In.forceAlign()}function Un(In,Oa){var hr=I(Oa);We!==hr&&Qe(hr),Xe(function(za){return za+1}),ha==="align"&&(L==null||L(In,Oa))}eP(function(){ha==="align"&&(Sr<2?zn():Rt(function(){var In;(In=Wa.current)===null||In===void 0||In.call(Wa)}))},[Sr]);var Ze=at({},gT(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Oa=Ze[In];Ze[In]=function(hr,za){return Rt(),Oa==null?void 0:Oa(hr,za)}});function Ma(){return new Promise(function(In){Wa.current=In})}Pr(function(){!Ze.motionName&&ha==="motion"&&Rt()},[Ze.motionName,ha]),Af(n,function(){return{forceAlign:zn,getElement:function(){return Z.current}}});var Ja=at(at({},Mn),{},{zIndex:l,opacity:ha==="motion"||ha==="stable"||!a?void 0:0,pointerEvents:!a&&ha!=="stable"?"none":void 0},u),pt=!0;R!=null&&R.points&&(ha==="align"||ha==="stable")&&(pt=!1);var tr=i;return Lp.count(i)>1&&(tr=nr("div",{className:"".concat(t,"-content")},i)),nr(Nh,mi({visible:a,ref:Z,leavedClassName:"".concat(t,"-hidden")},Ze,{onAppearPrepare:Ma,onEnterPrepare:Ma,removeOnLeave:d,forceRender:p}),function(In,Oa){var hr=In.className,za=In.style,jt=(0,_K.default)(t,r,We,hr);return nr(oK,{target:At(),key:"popup",ref:ne,monitorWindowResize:!0,disabled:pt,align:R,onAlign:Un},nr("div",{ref:Oa,className:jt,onMouseEnter:U,onMouseLeave:V,onMouseDownCapture:Q,onTouchStartCapture:te,onClick:le,style:at(at({},za),Ja)},tr))})});pK.displayName="PopupInner";var mK=pK;Ct();var dK=ml(wm()),hK=oc(function(e,n){var a=e.prefixCls,t=e.visible,r=e.zIndex,u=e.children,i=e.mobile;i=i===void 0?{}:i;var l=i.popupClassName,s=i.popupStyle,d=i.popupMotion,p=d===void 0?{}:d,R=i.popupRender,E=e.onClick,w=Kt();Af(n,function(){return{forceAlign:function(){},getElement:function(){return w.current}}});var I=at({zIndex:r},s),L=u;return Lp.count(u)>1&&(L=nr("div",{className:"".concat(a,"-content")},u)),R&&(L=R(L)),nr(Nh,mi({visible:t,ref:w,removeOnLeave:!0},p),function(U,V){var Q=U.className,te=U.style,le=(0,dK.default)(a,l,Q);return nr("div",{ref:V,className:le,onClick:E,style:at(at({},te),I)},L)})});hK.displayName="MobilePopupInner";var gK=hK;var WPe=["visible","mobile"],DK=oc(function(e,n){var a=e.visible,t=e.mobile,r=Rm(e,WPe),u=Ps(a),i=Jr(u,2),l=i[0],s=i[1],d=Ps(!1),p=Jr(d,2),R=p[0],E=p[1],w=at(at({},r),{},{visible:l});Pr(function(){s(a),a&&t&&E(Gx())},[a,t]);var I=R?nr(gK,mi({},w,{mobile:t,ref:n})):nr(mK,mi({},w,{ref:n}));return nr("div",null,nr(y3,w),I)});DK.displayName="Popup";var RK=DK;Ct();var xPe=oM(null),aP=xPe;function tP(){}function jPe(){return""}function zPe(e){return e?e.ownerDocument:window.document}var VPe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function QPe(e){var n=(function(a){Lh(r,a);var t=Ph(r);function r(u){var i;Mh(this,r),i=t.call(this,u),i.popupRef=E1(),i.triggerRef=E1(),i.portalContainer=void 0,i.attachId=void 0,i.clickOutsideHandler=void 0,i.touchOutsideHandler=void 0,i.contextMenuOutsideHandler1=void 0,i.contextMenuOutsideHandler2=void 0,i.mouseDownTimeout=void 0,i.focusTime=void 0,i.preClickTime=void 0,i.preTouchTime=void 0,i.delayTimer=void 0,i.hasPopupMouseDown=void 0,i.onMouseEnter=function(s){var d=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,d,d?null:s)},i.onMouseMove=function(s){i.fireEvents("onMouseMove",s),i.setPoint(s)},i.onMouseLeave=function(s){i.fireEvents("onMouseLeave",s),i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onPopupMouseEnter=function(){i.clearDelayTimer()},i.onPopupMouseLeave=function(s){var d;s.relatedTarget&&!s.relatedTarget.setTimeout&&ym((d=i.popupRef.current)===null||d===void 0?void 0:d.getElement(),s.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(s){i.fireEvents("onFocus",s),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(s){i.fireEvents("onMouseDown",s),i.preClickTime=Date.now()},i.onTouchStart=function(s){i.fireEvents("onTouchStart",s),i.preTouchTime=Date.now()},i.onBlur=function(s){i.fireEvents("onBlur",s),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(s){s.preventDefault(),i.fireEvents("onContextMenu",s),i.setPopupVisible(!0,s)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(s){if(i.fireEvents("onClick",s),i.focusTime){var d;if(i.preClickTime&&i.preTouchTime?d=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?d=i.preClickTime:i.preTouchTime&&(d=i.preTouchTime),Math.abs(d-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&s&&s.preventDefault&&s.preventDefault();var p=!i.state.popupVisible;(i.isClickToHide()&&!p||p&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,s)},i.onPopupMouseDown=function(){if(i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout(function(){i.hasPopupMouseDown=!1},0),i.context){var s;(s=i.context).onPopupMouseDown.apply(s,arguments)}},i.onDocumentClick=function(s){if(!(i.props.mask&&!i.props.maskClosable)){var d=s.target,p=i.getRootDomNode(),R=i.getPopupDomNode();(!ym(p,d)||i.isContextMenuOnly())&&!ym(R,d)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var d=XR(i.triggerRef.current);if(d)return d}catch{}return uc.findDOMNode(jI(i))},i.getPopupClassNameFromAlign=function(s){var d=[],p=i.props,R=p.popupPlacement,E=p.builtinPlacements,w=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return R&&E&&d.push(Ix(E,w,s,I)),L&&d.push(L(s)),d.join(" ")},i.getComponent=function(){var s=i.props,d=s.prefixCls,p=s.destroyPopupOnHide,R=s.popupClassName,E=s.onPopupAlign,w=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,U=s.popupStyle,V=s.mask,Q=s.maskAnimation,te=s.maskTransitionName,le=s.maskMotion,ne=s.zIndex,Z=s.popup,ee=s.stretch,me=s.alignPoint,We=s.mobile,Qe=s.forceRender,dn=s.onPopupClick,qn=i.state,Mn=qn.popupVisible,An=qn.point,Hn=i.getPopupAlign(),Ia={};return i.isMouseEnterToShow()&&(Ia.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Ia.onMouseLeave=i.onPopupMouseLeave),Ia.onMouseDown=i.onPopupMouseDown,Ia.onTouchStart=i.onPopupMouseDown,nr(RK,mi({prefixCls:d,destroyPopupOnHide:p,visible:Mn,point:me&&An,className:R,align:Hn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},Ia,{stretch:ee,getRootDomNode:i.getRootDomNode,style:U,mask:V,zIndex:ne,transitionName:L,maskAnimation:Q,maskTransitionName:te,maskMotion:le,ref:i.popupRef,motion:w,mobile:We,forceRender:Qe,onClick:dn}),typeof Z=="function"?Z():Z)},i.attachParent=function(s){hc.cancel(i.attachId);var d=i.props,p=d.getPopupContainer,R=d.getDocument,E=i.getRootDomNode(),w;p?(E||p.length===0)&&(w=p(E)):w=R(i.getRootDomNode()).body,w?w.appendChild(s):i.attachId=hc(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,d=s(i.getRootDomNode()).createElement("div");d.style.position="absolute",d.style.top="0",d.style.left="0",d.style.width="100%",i.portalContainer=d}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var d=i.props.alignPoint;!d||!s||i.setState({point:{pageX:s.pageX,pageY:s.pageY}})},i.handlePortalUpdate=function(){i.state.prevPopupVisible!==i.state.popupVisible&&i.props.afterPopupVisibleChange(i.state.popupVisible)},i.triggerContextValue={onPopupMouseDown:i.onPopupMouseDown};var l;return"popupVisible"in u?l=!!u.popupVisible:l=!!u.defaultPopupVisible,i.state={prevPopupVisible:l,popupVisible:l},VPe.forEach(function(s){i["fire".concat(s)]=function(d){i.fireEvents(s,d)}}),i}return Ah(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var i=this.props,l=this.state;if(l.popupVisible){var s;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(s=i.getDocument(this.getRootDomNode()),this.clickOutsideHandler=F0(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=F0(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=F0(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=F0(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),hc.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var i;return((i=this.popupRef.current)===null||i===void 0?void 0:i.getElement())||null}},{key:"getPopupAlign",value:function(){var i=this.props,l=i.popupPlacement,s=i.popupAlign,d=i.builtinPlacements;return l&&d?Ex(d,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,d=this.state.popupVisible;this.clearDelayTimer(),d!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:d}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var d=this,p=l*1e3;if(this.clearDelayTimer(),p){var R=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){d.setPopupVisible(i,R),d.clearDelayTimer()},p)}else this.setPopupVisible(i,s)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(i){var l=this.props.children.props,s=this.props;return l[i]&&s[i]?this["fire".concat(i)]:l[i]||s[i]}},{key:"isClickToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var i=this.props.action;return i==="contextMenu"||i.length===1&&i[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("contextMenu")!==-1||s.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("hover")!==-1||s.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("hover")!==-1||s.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("focus")!==-1||s.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("focus")!==-1||s.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var i;(i=this.popupRef.current)===null||i===void 0||i.forceAlign()}}},{key:"fireEvents",value:function(i,l){var s=this.props.children.props[i];s&&s(l);var d=this.props[i];d&&d(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,d=l.forceRender,p=l.alignPoint,R=l.className,E=l.autoDestroy,w=Lp.only(s),I={key:"trigger"};this.isContextMenuToShow()?I.onContextMenu=this.onContextMenu:I.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(I.onClick=this.onClick,I.onMouseDown=this.onMouseDown,I.onTouchStart=this.onTouchStart):(I.onClick=this.createTwoChains("onClick"),I.onMouseDown=this.createTwoChains("onMouseDown"),I.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(I.onMouseEnter=this.onMouseEnter,p&&(I.onMouseMove=this.onMouseMove)):I.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?I.onMouseLeave=this.onMouseLeave:I.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(I.onFocus=this.onFocus,I.onBlur=this.onBlur):(I.onFocus=this.createTwoChains("onFocus"),I.onBlur=this.createTwoChains("onBlur"));var L=(0,yK.default)(w&&w.props&&w.props.className,R);L&&(I.className=L);var U=at({},I);oT(w)&&(U.ref=rT(this.triggerRef,w.ref));var V=qD(w,U),Q;return(i||this.popupRef.current||d)&&(Q=nr(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&(Q=null),nr(aP.Provider,{value:this.triggerContextValue},V,Q)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,d={};return s!==void 0&&l.popupVisible!==s&&(d.popupVisible=s,d.prevPopupVisible=l.popupVisible),d}}]),r})(Pp);return n.contextType=aP,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:jPe,getDocument:zPe,onPopupVisibleChange:tP,afterPopupVisibleChange:tP,onPopupAlign:tP,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},n}var wK=QPe(bx);var vs={adjustX:1,adjustY:1},fs=[0,0],bK={left:{points:["cr","cl"],overflow:vs,offset:[-4,0],targetOffset:fs},right:{points:["cl","cr"],overflow:vs,offset:[4,0],targetOffset:fs},top:{points:["bc","tc"],overflow:vs,offset:[0,-4],targetOffset:fs},bottom:{points:["tc","bc"],overflow:vs,offset:[0,4],targetOffset:fs},topLeft:{points:["bl","tl"],overflow:vs,offset:[0,-4],targetOffset:fs},leftTop:{points:["tr","tl"],overflow:vs,offset:[-4,0],targetOffset:fs},topRight:{points:["br","tr"],overflow:vs,offset:[0,-4],targetOffset:fs},rightTop:{points:["tl","tr"],overflow:vs,offset:[4,0],targetOffset:fs},bottomRight:{points:["tr","br"],overflow:vs,offset:[0,4],targetOffset:fs},rightBottom:{points:["bl","br"],overflow:vs,offset:[4,0],targetOffset:fs},bottomLeft:{points:["tl","bl"],overflow:vs,offset:[0,4],targetOffset:fs},leftBottom:{points:["br","bl"],overflow:vs,offset:[-4,0],targetOffset:fs}};Ct();var EK=ml(wm());function UT(e){var n=e.showArrow,a=e.arrowContent,t=e.children,r=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return nr("div",{className:(0,EK.default)("".concat(r,"-content"),l),style:s},n!==!1&&nr("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),nr("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var KPe=function(n,a){var t=n.overlayClassName,r=n.trigger,u=r===void 0?["hover"]:r,i=n.mouseEnterDelay,l=i===void 0?0:i,s=n.mouseLeaveDelay,d=s===void 0?.1:s,p=n.overlayStyle,R=n.prefixCls,E=R===void 0?"rc-tooltip":R,w=n.children,I=n.onVisibleChange,L=n.afterVisibleChange,U=n.transitionName,V=n.animation,Q=n.motion,te=n.placement,le=te===void 0?"right":te,ne=n.align,Z=ne===void 0?{}:ne,ee=n.destroyTooltipOnHide,me=ee===void 0?!1:ee,We=n.defaultVisible,Qe=n.getTooltipContainer,dn=n.overlayInnerStyle,qn=n.arrowContent,Mn=n.overlay,An=n.id,Hn=n.showArrow,Ia=Rm(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),Da=Kt(null);Af(a,function(){return Da.current});var ha=at({},Ia);"visible"in n&&(ha.popupVisible=n.visible);var Rt=function(){return nr(UT,{showArrow:Hn,arrowContent:qn,key:"content",prefixCls:E,id:An,overlayInnerStyle:dn},Mn)},_t=!1,Ha=!1;if(typeof me=="boolean")_t=me;else if(me&&So(me)==="object"){var Sr=me.keepParent;_t=Sr===!0,Ha=Sr===!1}return nr(wK,mi({popupClassName:t,prefixCls:E,popup:Rt,action:u,builtinPlacements:bK,popupPlacement:le,ref:Da,popupAlign:Z,getPopupContainer:Qe,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:U,popupAnimation:V,popupMotion:Q,defaultPopupVisible:We,destroyPopupOnHide:_t,autoDestroy:Ha,mouseLeaveDelay:d,popupStyle:p,mouseEnterDelay:l},ha),w)},IK=oc(KPe);var TK=IK;var CK=e=>vt.createElement(TK,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?(()=>document.querySelector(e.tooltipContainerSelector)||document.body):void 0}));if(typeof window<"u"&&typeof global>"u")try{Promise.resolve().then(()=>ml(SK(),1)).then(e=>{let n=e.default,a=document.createElement("style");a.type="text/css",a.appendChild(document.createTextNode(n)),document.head.appendChild(a)})}catch(e){window.Sentry&&window.Sentry.captureException(e)}var tNe=ic();var FK="click";var kT="top",jh=function(e){var n=tNe(e);return function(){return function(){return n(CK)}}};var GK="right";var MK=e=>()=>e.preventDefault&&e.preventDefault();var oP=function(){return MK};var uNe=ht();var uP=ae(nn),iP=sr(uNe($({reflectSymbol:function(){return"value"}})(Ee)(mn))),lP=x(ka);var BT=function(e){return ze("")(uP(iP(bo(e.target)))(function(n){return lP(n.value)}))},cP=function(e){return ze("")(uP(iP(bo(e.target)))(function(n){return lP(n.value)}))},a_=function(e){return ze("")(uP(iP(bo(e.target)))(function(n){return lP(n.value)}))};var AK="/network/connections";var LK=15;var vNe=jh(on)()(),fNe=Ft(Ce),_Ne=(function(){return"You\u2019ve hit the "+(oe(pn)(LK)+`-connection limit, designed to encourage you to focus on building meaningful connections that lead to impactful opportunities. Remove an existing connection to make space for a new one that aligns with your goals. `)})(),pNe=$u(on)("text-decoration-underline")(oo(ie)()()("text-dark")(vn)({href:AK})("Manage my connections")),PK=function(e){return function(n){return vNe({placement:e,trigger:FK,overlay:fNe("")([cn(_Ne),pNe]),overlayStyle:Yt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var NK=ae(nn),zh=function(e){var n=NK(e.guestPresenter)(function(a){if(a instanceof bR)return new T(a.value0);if(a instanceof ER)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return NK(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var dNe=(function(){function e(){}return e.value=new e,e})(),hNe=(function(){function e(){}return e.value=new e,e})(),vP=(function(){function e(){}return e.value=new e,e})(),gNe=(function(){function e(){}return e.value=new e,e})(),DNe=(function(){function e(){}return e.value=new e,e})(),RNe=(function(){function e(){}return e.value=new e,e})(),OK=function(e){if(e instanceof dNe)return"account_settings_page";if(e instanceof hNe)return"preference_survey";if(e instanceof vP)return"livestream_registration";if(e instanceof gNe)return"chancing_wizard_network_step";if(e instanceof DNe)return"main_profile_page";if(e instanceof RNe)return"autopilot_acceptance_page";throw new Error("Failed pattern match at Profile.PublishContext (line 15, column 13 - line 21, column 57): "+[e.constructor.name])};var GNe=Hv(kv),fP=js(GNe),_P=ae(Na);var MNe=nu(),kK=ge(ue);var BK=fP("profile_visibility_path")(function(e){return function(n){return _P(e({visibility:{publish_scope:CR(n)}}))(ro)}}),HK=function(){return fP("profile_network_settings_path")(function(e){return function(n){return(function(a){return _P(e({network_settings:{publish_scope:CR(a.publishScope),publish_context:OK(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:et(kK(Pl(a.livestreamConference))(function(t){return{school_name:et(kK(zh(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(ro)})(MNe(n))}})},JK=fP("profile_name_path")(function(e){return function(n){return _P(e({name:n}))(ro)}});var ANe=Vs(),LNe=fu(ie),PNe=zr(ie),pP=jr(ie),mP=Qc(ie),A0=Pe(Ce),Vh=ga(ie)()(),NNe=fn(ln),dP=Nl(qv),Tm=Pe(on),$K=Ul(),ONe=a0(ie),UNe=yo(Je)(cr),WK=vu()(),hP=Nl(Eh),kNe=Xd()(),xK=Pe(ie),BNe=k1(Ce),gP=$1(ie),HNe=Ft(ie),JNe=jh(on)()(),qNe=jr(Ce),$Ne=oo(ie)()(),WNe=Ht(ie),Sm=x(Bn),jK=NNe(da),xNe=OI(),Dy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zK=(function(){function e(){}return e.value=new e,e})(),VK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),QK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),KK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Ry=(function(){function e(){}return e.value=new e,e})(),DP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XK=function(e){return function(n){var a=function(d){return ANe({id:"invite-school-modal",body:d,title:LNe("my-0")((function(){return e.stage instanceof iE?"Join the CollegeVine network":"Connect with "+e.schoolName})()),headerClass:"pb-0",onDismiss:n(new Jn(Ry.value)),size:xR.value})},t=L9(e.context),r=Oe([PNe("mt-3")("Review your message before you send it"),pP("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),mP("mt-4")("Your message"),mh(e.message),A0("d-flex mt-4 justify-content-start")([Vh("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(vn)({onClick:un(function(d){return function(){return n(new Jn(new DP({introMessage:e.message})))(),n(new ke(new Dy(lA.value)))()}})})("Send"),Vh("btn btn-lg btn-outline-primary ml-3 text-nowrap")(vn)({onClick:dP(n)(new ke(new Dy(fR.value)))})("No, I need to edit something")])]),u=Oe([A0("text-center")([Tm("")($K("mt-4")({src:"/img/checkmate-icon.png",alt:Ol.value,height:"80",width:"80"})),ONe("mt-4")("Connection request sent!"),pP("mx-md-4")(UNe(["You\u2019ve successfully demonstrated your interest to ",e.schoolName,". ","This counselor isn\u2019t part of the platform yet but we\u2019ve forwarded your message to them. ","You\u2019ll get an email notification when they respond."])),Vh("btn btn-lg btn-outline-secondary mt-4")(vn)({onClick:dP(n)(new Jn(Ry.value))})("Close")])]),i=Vh("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(vn)({onClick:dP(n)(new Jn(Ry.value))})("Cancel"),l=(function(){var d=rA(e.message)&&(function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!cc(e.firstName)&&!cc(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 243, column 15 - line 247, column 88): "+[e.profile.fullName.constructor.name])})(),p=(function(){if(e.vineBelowConnectionLimit instanceof T&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof T&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof G)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 236, column 13 - line 239, column 31): "+[e.vineBelowConnectionLimit.constructor.name])})();return Oe([Qa(yr(e.profile.fullName))(Oe([mP("mt-md-4")("Your preferred name"),A0("form-row mx-1")([WK("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:hP(n)(function(R){return ke.create(KK.create(a_(R)))}),placeholder:"First name"}),WK("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:hP(n)(function(R){return ke.create(YK.create(a_(R)))}),placeholder:"Last name"})])])),mP("mt-md-4")("Your message"),kNe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:hP(n)(function(R){return ke.create(QK.create(BT(R)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),Tm("mt-2")(T9(e.message)),xK("mt-3 mt-md-4 small")("The ideal connection message should include:"),BNe("small")([gP("")("Your name, where you\u2019re from, and a bit about who you are"),gP("")("What you\u2019re interested in studying along with one or two insightful questions"),gP("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),A0("d-flex mt-4 justify-content-start")([PK(kT)(Tm("")(Vh("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(vn)({onClick:un(function(R){return function(){return(function(){if(e.profile.fullName instanceof T)return void 0;if(e.profile.fullName instanceof G)return n(new ke(new VK({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 219, column 23 - line 223, column 113): "+[e.profile.fullName.constructor.name])})(),n(new ke(new Dy(iA.value)))()}}),disabled:!d||p,style:Yt({pointerEvents:(function(){return p?"none":"auto"})()})})("Connect"))),i])])})(),s=A0("mx-md-7")([Tm("border border-success rounded p-4 my-4")(A0("row align-items-center")([Tm("col-12 col-md-auto text-center text-md-left")($K("img-fluid")({src:"/img/network/publish-profile-icon.png",alt:Ol.value,height:"67",width:"143"})),Tm("col text-center text-md-left")(HNe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),A0("d-flex flex-nowrap align-items-center")([xK("mr-4")("Publish your profile to join the CollegeVine Network"),JNe({placement:GK,overlay:qNe("")([cn(` Your profile includes academics, extracurriculars, major interest, demographics and financial aid intent. By agreeing to publish, you will also be adding select preferences survey answers to `),$Ne("")(vn)({href:OW})("your profile"),cn(".")]),overlayStyle:Yt({width:"15rem"})})(WNe("cursor-default text-secondary fe fe-info large")(""))]),pP("text-secondary small d-none d-md-block mt-4")("Joining the CollegeVine Network won\u2019t result in spam from colleges you don\u2019t want to hear from."),A0("d-flex mt-4 justify-content-start justify-content-md-center")([Vh("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(vn)({onClick:un(function(d){return function(){return n(new ke(zK.value))(),n(new ke(new Dy(fR.value)))()}})})("Publish profile"),i])]);return Tm("t--network-sem-user-modal")((function(){if(e.stage instanceof iE)return a(s);if(e.stage instanceof fR)return a(l);if(e.stage instanceof iA)return a(r);if(e.stage instanceof lA)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 97, column 5 - line 101, column 38): "+[e.stage.constructor.name])})())}},ZK=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof Dy)return Sm({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,vineBelowConnectionLimit:e.vineBelowConnectionLimit,stage:n.value0.value0});if(n.value0 instanceof zK)return jK(Ut(BK(pc.value)))(function(){return Sm({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{fullName:e.profile.fullName,publishScope:pc.value}})});if(n.value0 instanceof VK)return jK(Ut(JK(n.value0.value0)))(function(){return Sm({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{publishScope:e.profile.publishScope,fullName:new T(ZL(n.value0.value0))}})});if(n.value0 instanceof QK)return Sm({context:e.context,firstName:e.firstName,lastName:e.lastName,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,message:n.value0.value0});if(n.value0 instanceof KK)return Sm({context:e.context,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,firstName:n.value0.value0});if(n.value0 instanceof YK)return Sm({context:e.context,firstName:e.firstName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,lastName:n.value0.value0});throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 76, column 31 - line 90, column 39): "+[n.value0.constructor.name])}if(n instanceof Jn)return Sm(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 75, column 1 - line 75, column 55): "+[e.constructor.name,n.constructor.name])}},jNe=function(e){var n=ex(e);return n?fR.value:iE.value},eY=function(e){return{firstName:"",lastName:"",message:"",profile:xNe(e.profile),stage:jNe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var HT=be($r(Rr)),VNe=nu(),QNe=Pe(on),KNe=Ul(),RP=Ft(ie),yP=Vr(on)()(),YNe=Ht(ie),XNe=$v(),ZNe=fm(ln)(),e4e=kn(qe),n4e=ga(Ce)()(),a4e=oP(),t4e=tt(io),Qh=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),wP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nY=(function(){function e(){}return e.value=new e,e})(),r4e=(function(){function e(){}return e.value=new e,e})(),o4e={eq:function(e){return function(n){return e instanceof Qh&&n instanceof Qh?e.value0.url===n.value0.url:e instanceof yy&&n instanceof yy?HT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&HT(e.value0.textColorClass)(n.value0.textColorClass):e instanceof wP&&n instanceof wP?HT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof bP&&n instanceof bP?HT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},u4e=Th(o4e),aY=function(){return function(e){var n=VNe(e),a=(function(){var r=Za(n.shape)(nY.value);if(r instanceof nY)return"rounded-circle";if(r instanceof r4e)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 130, column 9 - line 132, column 37): "+[r.constructor.name])})(),t=function(r){return QNe("avatar "+($W(Za(n.size)($I.value))+(" "+Za(n.className)(""))))((function(){if(r instanceof Qh)return KNe("avatar-img img-fluid "+(a+(" "+Za(n.borderClassName)(""))))({src:r.value0.url,alt:new HR(h$(Za(n.ariaLabel)(vn)))});if(r instanceof yy)return RP("avatar-title font-weight-bold fw-bold "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+(ze("")(r.value0.textColorClass)+(" "+Za(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof wP)return yP("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Za(n.borderClassName)(""))))))({"aria-label":Za(n.ariaLabel)(vn)})(YNe(r.value0.iconClass)(""));if(r instanceof bP)return yP("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Za(n.borderClassName)(""))))))({"aria-label":Za(n.ariaLabel)(vn)})(RP("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 87, column 11 - line 127, column 48): "+[r.constructor.name])})())};return Ih(XNe(cs(n.source))(function(r){return ZNe(u4e(n.source)(function(u){return e4e(r.value1(u))}))(function(){return Vf(Oe([t(r.value0),(function(){return r.value0 instanceof Qh?ja(Pl(n.hideAvatar))(function(u){return yP("hq-only-menu-item")({style:Yt({marginTop:"-50px",marginLeft:"200px"})})(n4e("btn btn-sm btn-warning mb-4 t--hide-avatar")(vn)({onClick:un(function(i){return function(){return a4e(i)(),t4e(r.value1)(u)()}})})([RP("badge badge-info bg-info text-dark mr-2")("HQ"),cn("Hide")]))}):Aa})()]))})}))}};var l4e=aY();var tY=function(e){return function(n){return l4e({source:(function(){if(e.avatarUrl instanceof T)return new Qh({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new yy({initials:e.initials,backgroundColorClass:G.value,textColorClass:G.value});throw new Error("Failed pattern match at Sem.Utils (line 16, column 15 - line 24, column 14): "+[e.avatarUrl.constructor.name])})(),size:n})}};var EP=B(ue),s4e=tn(J8(Y0));var rY=function(e){var n=function(a){return ze("")(EP(Qi)(ED(0)(a)))};return Sv((function(){var a=xu(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":ze("?")(s4e(EP(n)(gp(a)))(EP(n)(Rd(a))))})())},oY=function(e){return rh(e.firstName+(" "+e.lastName))};var IP=fu(ie),f4e=oo(ie)()(),_4e=oo(Ce)()(),uY=Ht(ie),p4e=ga(Ce)()(),m4e=Wi(St)(lu),d4e=ge(ue),h4e=ae(nn),TP=Pe(ie),JT=Pe(Ce),iY=Pe(on),g4e=nh(ie),lY=Os()(),D4e=Qc(ie),R4e=jr(ie),Kh=x(Bn),fY=fn(ln),y4e=fY(da),w4e=nt(qe),b4e=fY(Na),E4e=x(ba),I4e=$t(Po(st)),cY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),wy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),vY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_Y=(function(){var e=function(a){return function(t){return function(r){var u=IP("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=IP("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,f4e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(vn)({href:i3(new Gh(t.semUser.id))})("View Message")],s=oY(t.semUser),d=rY(s),p=IP("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),R=[p,_4e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(vn)({href:i3(new Gh(t.semUser.id))})([uY("fe fe-message-square mr-2 large")(""),cn("Send a message to "+t.semUser.firstName)])],E=function(L){return p4e("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(vn)({onClick:un(function(U){return m4e(r)(d4e(h4e(a.currentUser)(function(V){return V.profile}))(sY.create))}),disabled:L.isDisabled})([uY("fe fe-message-square mr-2 large")(""),cn("Connect with "+t.semUser.firstName)])},w=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),TP("mt-4 text-secondary small")("Invitation pending")];return JT("t--livestream-details-guest-presenter-sem-user mb-4")([ja(a.currentUser)(function(L){return Qa(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(iY("card")(JT("card-body")((function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof c0)return R;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof qs&&t.semUser.connection.value0.initiator instanceof Jf||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof qf&&t.semUser.connection.value0.initiator instanceof Jf)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof qs&&t.semUser.connection.value0.initiator instanceof Hf)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof qf&&t.semUser.connection.value0.initiator instanceof Hf||t.semUser.connection instanceof G)return w;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])})())))}),g4e("text-uppercase text-secondary")("Your guest presenter"),JT("row align-items-center mt-4")([iY("col-auto")(tY(lY(t.semUser)({initials:d}))(qI.value)),JT("col")([D4e("mb-1")(s),TP("text-secondary small")(t.semUser.school.name),TP("text-secondary small")(t.semUser.title)]),ja(t.semUser.bio)(function(L){return R4e("mt-4 mb-2 ml-2")(L)})]),ja(t.modal)(function(L){return XK(L.value0)(function(U){return r(wy.create(U))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof wy&&r.value0 instanceof Jn){if(r.value0.value0 instanceof Ry)return Kh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof DP)return y4e(w4e(b4e(ix(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return E4e(new vY({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return Kh(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 55 - line 55, column 19): "+[r.value0.value0.constructor.name])}if(t.modal instanceof T&&r instanceof wy&&r.value0 instanceof ke)return I4e(wy.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new cY(u))}})(ZK(t.modal.value0.value0)(new ke(r.value0.value0)));if(r instanceof wy&&r.value0 instanceof ke)return Kh(t);if(r instanceof sY)return Kh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new cY(eY({schoolName:a.semUser.school.name,context:uA.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof vY)return Kh({currentUser:t.currentUser,modal:t.modal,vineBelowConnectionLimit:t.vineBelowConnectionLimit,semUser:{avatarUrl:t.semUser.avatarUrl,bio:t.semUser.bio,firstName:t.semUser.firstName,id:t.semUser.id,lastName:t.semUser.lastName,school:t.semUser.school,title:t.semUser.title,unreadMessageCountFromSemUser:t.semUser.unreadMessageCountFromSemUser,connection:new T({initiator:Jf.value,introMessage:r.value0.introMessage,status:qs.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 47, column 5 - line 47, column 67): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return Nf("Livestream Guest Presenter SEM user")(function(a){return{init:Kh(lY(a)({modal:G.value})),view:e(a),update:n(a)}})})();var S4e=Ft(Ce),C4e=Ht(ie),by=Pe(Ce),pY=nh(ie),F4e=B(Ye),SP=Pe(on),G4e=Vc()(),M4e=fu(ie),mY=function(e){return function(n){var a=function(i){return S4e("badge badge-light bg-light text-dark mr-3")([C4e("fe fe-tag mr-2")(""),cn(i.name)])},t=function(i){return function(l){return by("mb-3")([pY("text-secondary text-uppercase mb-2")(i),l])}},r=by("mt-4")([ja(he(n.entity.shortEducation))(function(i){return t("Education")(cn(i))}),t("Bio")(mh(n.entity.bio)),xA(ji(n.entity.tags))(t("Specialties")(Oe(F4e(a)(n.entity.tags))))]),u=by("row")([ja(he(n.entity.imageUrl))(function(i){return SP("p-0 m-0")(SP("col-auto my-auto")(SP("avatar avatar-md")(G4e("avatar-img rounded-circle")({src:i,alt:n.entity.name}))))}),by("col-auto my-auto")([pY("text-uppercase text-secondary mb-2")("Advisor"),M4e("m-0")(n.entity.name)])]);return by("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var Ey=function(e){return function(n){return function(a){return function(t){if(n instanceof bR)return _Y({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof ER)return mY(e)(n.value0);throw new Error("Failed pattern match at Livestream.GuestPresenter.GuestPresenter (line 16, column 1 - line 16, column 78): "+[e.constructor.name,n.constructor.name,a.constructor.name,t.constructor.name])}}}};var L4e=oo(Ce)()(),P4e=Ht(ie),Yh=Pe(ie),Dc=Pe(on),Rc=Pe(Ce),gY=fu(ie),DY=Vc()(),RY=ge(Ye),N4e=Ft(ie),hY=ge(ue),O4e=jr(Ce),yY=$u(ie),wY=oo(ie)()(),U4e=oe(pn),Iy=B(ue),k4e=eh(Ce)()(),B4e=oe(xs),Ty=function(e){var n=function(a){return function(t){return L4e("mr-3")(vn)({href:t,target:"_blank"})([cn(a),P4e("fe fe-external-link ml-1")("")])}};return Oe([Yh("text-uppercase text-muted small mb-2")("School information"),Dc("card shadow-none")(Rc("card-body")([gY("mb-1")(e.name),Yh("text-uppercase small text-secondary")(e.cityState),Rc("mt-3 d-none d-md-block")([n("Stats")(JI(gm.value)(e.slug)),n("Cost")(JI(KR.value)(e.slug)),n("Map")(JI(gm.value)(e.slug))]),Rc("mt-3 d-md-none")([n("Stats")(QL(gm.value)(e.slug)),n("Cost")(QL(KR.value)(e.slug))])]))])},H4e=function(e){var n=function(i){return DY("avatar-img rounded-circle")({src:i,alt:e.fullName})},a=fo(" ")(RY(xu(" ")(e.fullName))(ol(1))),t=N4e("avatar-title rounded-circle text-uppercase")(a),r=function(i){return ze("")(hY(i)(function(l){return" '"+l}))},u=function(i){return function(l){return O4e("")([yY("")(i+": "),cn(l)])}};return Oe([Yh("text-uppercase text-muted small mb-2")("Your host"),Rc("row align-items-center mb-4 pr-4")([Dc("col-auto")(Dc("avatar")(Wn(t)(n)(e.pictureUrl))),Dc("col")(Rc("row align-items-center justify-content-between")([Yh("col-12 col-md-auto x-large")(e.fullName),Dc("col-12 col-md-auto")(ja(e.allStreamsUrl)(function(i){return wY("t--host-streams")(vn)({href:i})("See all "+(U4e(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Oe(oi([Iy(u("Undergrad College"))(hY(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),Iy(u("Major"))(e.undergrad.major),Iy(u("Graduate College"))(e.gradCollege),Iy(u("Work Experience"))(e.workExperience),Iy(u("My Admissions Story"))(e.admissionsStory)]))])},J4e=function(e){return Oe([Yh("text-uppercase text-muted small mb-2")("Description"),Rc("")([Dc("col-6 col-md-4 float-right")(DY("img-fluid rounded")({src:e.imageUrl,alt:e.title})),Rc("")(RY(xu(` `)(e.description))(function(n){return k4e("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},q4e=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+B4e(e.conference.id));return Dc("card mt-3")(Dc("card-body py-3")(Rc("row align-items-center")([Dc("col-12 col-md-auto mb-3 mb-md-0")(Yh("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Rc("col-12 col-md mb-3 mb-md-0")([cn("This livestream was part of the "),yY("")("\u{1F3AA} Student panel college fair"),cn(". Recordings for all 100+ Q&A panels are available.")]),Dc("col-12 col-md-auto")(wY("btn btn-sm btn-outline-primary px-3")(vn)({href:n})("See all recordings"))])))},qT=function(e){var n=(function(){if(e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof T||e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof G||e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof T)return"col-12 col-md-6";if(e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof G)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 51, column 16 - line 55, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])})();return Oe([Qa(e.conference.collegeFair)(q4e(e)),Dc("card")(Rc("card-body")([gY("text-center mb-4")("About this livestream"),Rc("row")([Rc(n)([ja(e.conference.school)(function(a){return Dc("d-md-none")(Ty(a))}),J4e(e.conference)]),Rc(n)([ja(e.conference.guestPresenter)(function(a){return Ey(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ja(e.conference.school)(function(a){return Dc("d-none d-md-block")(Ty(a))}),ja(e.conference.presenter)(H4e)])])]))])};var CY=fn(ln),$4e=CY(da),W4e=nt(qe),x4e=Ar(Xo),EY=x(ba),YT=x(Bn),j4e=CY(Na),$T=x(ka),IY=Pe(ie),WT=Qc(ie),xT=e0(Ce),jT=Y_(Ce),L0=Of(Ce),_s=X_(ie),zT=Z_(Ce),VT=ge(Ye),P0=Bs(ie),QT=Bs(on),KT=ga(ie)()(),z4e=Vl(ot),V4e=B(Ye),Q4e=tn(d_(d_(mb))),K4e=Vl(Ml),Y4e=Vl(QB),X4e=oe(xs),Z4e=zr(ie),e8e=Pe(Ce),XT=(function(){function e(){}return e.value=new e,e})(),FY=(function(){function e(){}return e.value=new e,e})(),Sy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),TY=(function(){function e(){}return e.value=new e,e})(),SY=(function(){function e(){}return e.value=new e,e})(),GY=function(e){return function(n){return function(a){var t=function(u){return $4e(W4e(x4e(u)(function(i){return EY(SY.value)})))(function(){return YT({ctas:n.ctas,stage:FY.value,error:G.value})})},r=function(u){if(u instanceof ts)return u$({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof rs)return r$({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof os)return o$({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof us)return t$({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 224, column 15 - line 232, column 83): "+[u.constructor.name])};if(a instanceof Sy)return t(j4e(r(a.value0))(function(){return EY(TY.value)}));if(a instanceof TY)return YT({ctas:n.ctas,error:n.error,stage:XT.value});if(a instanceof SY)return YT({ctas:n.ctas,stage:XT.value,error:new T("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 207, column 24 - line 217, column 92): "+[a.constructor.name])}}},MY=function(e){return YT({stage:XT.value,error:G.value,ctas:e})},n8e=(function(){return ju(Hu(Je)([$s.value,new ar(" "),es.value,new ar(", "),ns.value,new ar(":"),Ll.value,new ar(" "),as.value]))})(),AY=function(e){return function(n){if(e.ctas.length===0)return Aa;var a=function(L){return L instanceof us?$T(L.value0):G.value},t=function(L){return L instanceof rs?$T(L.value0):G.value},r=function(L){return L instanceof os?$T(L.value0):G.value},u=function(L){return L instanceof ts?$T(L.value0):G.value},i=(function(){if(e.stage instanceof XT)return Aa;if(e.stage instanceof FY)return IY("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Opening...");throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 186, column 24 - line 191, column 23): "+[e.stage.constructor.name])})(),l=function(L){return L.length===0?Aa:Oe([WT("")("Referrals"),xT("table table-sm mb-0")([jT("")([L0("")([_s("")("Title"),_s("")("Actions")])]),zT("")(VT(L)(function(U){return L0("t--cta t--cta-referral")([P0("pt-3")(U.title),QT("text-nowrap")(KT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new Sy(new us(U)))})})("Launch CTA"))])}))])])},s=function(L){return L.length===0?Aa:Oe([WT("")("General"),xT("table table-sm mb-0")([jT("")([L0("")([_s("")("Title"),_s("")("URL"),_s("")("Link Text"),_s("")("Actions")])]),zT("")(VT(G_(z4e(function(U){return U.title}))(L))(function(U){return L0("t--cta t--cta-general")([P0("pt-3")((function(){var V=Gr(U.autoDisplayMinutesFromStart);return V?"\u23F0 ":""})()+U.title),P0("pt-3")(U.url),P0("pt-3")(U.buttonText),QT("text-nowrap")(KT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new Sy(new rs(U)))})})("Launch CTA"))])}))])])},d=function(L){return L.length===0?Aa:Oe([WT("")("Featured Service Providers"),xT("table table-sm mb-0")([jT("")([L0("")([_s("")("Advisors"),_s("")("Link Text"),_s("")("Actions")])]),zT("")(VT(L)(function(U){return L0("t--cta t--cta-featured-sp")([P0("pt-3")(fo(", ")(V4e(function(V){return V.name})(U.providers))),P0("pt-3")(U.linkText),QT("text-nowrap")(KT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new Sy(new os(U)))})})("Launch CTA"))])}))])])},p=function(L){return L.length===0?Aa:Oe([WT("")("Upcoming events"),xT("table table-sm mb-0")([jT("")([L0("")([_s("")("Livestream"),_s("")("Date & Time"),_s("")("Actions")])]),zT("")(VT(G_(Q4e(K4e(function(U){return U.startTime}))(Y4e(function(U){return U.conferenceId})))(L))(function(U){return L0("t--cta t--cta-stream-"+X4e(U.conferenceId))([P0("pt-3")(U.title),P0("pt-3")(n8e(U.startTime)+(" "+nm)),QT("text-nowrap")(KT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new Sy(new ts(U)))})})("Launch CTA"))])}))])])},R=Vo(a)(e.ctas),E=Vo(t)(e.ctas),w=Vo(r)(e.ctas),I=Vo(u)(e.ctas);return Oe([Z4e("")("Calls to action"),e8e("t--ctas position-relative")([ja(e.error)(function(L){return IY("alert alert-danger")(L)}),p(I),s(E),d(w),l(R),i])])}};var LY=js(Hv(kv)),PY=ae(Na),t8e=L2(Ee),Xh=(function(){function e(){}return e.value=new e,e})(),Cy=(function(){function e(){}return e.value=new e,e})(),Fy=(function(){function e(){}return e.value=new e,e})(),NY={eq:function(e){return function(n){return e instanceof Xh&&n instanceof Xh||e instanceof Cy&&n instanceof Cy||e instanceof Fy&&n instanceof Fy}}},OY=LY("profile_validate_username_path")(function(e){return function(n){return PY(e({username:n}))(Bv(function(a){return t8e("username validation result")(a)(function(t){return t==="available"?new T(Xh.value):t==="taken"?new T(Cy.value):t==="invalid"?new T(Fy.value):G.value})}))}}),UY=LY("profile_set_username_path")(function(e){return function(n){return PY(e({username:n}))(ro)}});var o8e=be($r(tv()(ws(ws(av)()({reflectSymbol:function(){return"username"}})(Rr))()({reflectSymbol:function(){return"result"}})(NY)))),CP=Pe(Ce),kY=Pe(on),u8e=jr(ie),i8e=Ul(),Gy=Pe(ie),l8e=vu()(),BY=ga(ie)()(),c8e=Cr(St),FP=fn(ln)(da),s8e=Cr(Bn),GP=nt(qe),v8e=zl(st),Cm=x(Bn),f8e=B(st),_8e=ae(Na),p8e=P_(Xo),HY=x(ba),WY=(function(){function e(){}return e.value=new e,e})(),xY=(function(){function e(){}return e.value=new e,e})(),jY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qY=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),zY=(function(){function e(){}return e.value=new e,e})(),$Y=(function(){function e(){}return e.value=new e,e})(),MP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),AP=(function(){function e(){}return e.value=new e,e})(),VY=function(e){return function(n){var a=e.username!==""&&yr(e.updating)&&o8e(e.validated)(new T({username:e.username,result:Xh.value}));return Oe([CP("row")([kY("col col-md-6")(u8e("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),kY("col-6 d-none d-md-block")(i8e("img-fluid")({alt:Ol.value,src:"/img/illustrations/clipboards.svg"}))]),Gy("")("Your username:"),CP("input-group")([l8e("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:un(function(t){return n(new ke(new jY(a_(t))))})})]),CP("d-flex mt-3")([BY("btn btn-light mr-3")(vn)({onClick:un(function(t){return n(new Jn(AP.value))})})("Cancel"),BY("btn btn-primary t--submit-username")(vn)({type:"button",disabled:!a,onClick:un(function(t){return c8e(a)(n(new ke(zY.value)))})})("Save")]),ja(e.validated)(function(t){if(t.result instanceof Xh)return Aa;if(t.result instanceof Cy)return Gy("small text-danger")("Sorry, this username is already taken");if(t.result instanceof Fy)return Gy("small text-danger")("Usernames can only contain letters, numbers, or these symbols: _ - . with no spaces");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 73, column 37 - line 79, column 121): "+[t.result.constructor.name])}),ja(e.updating)(function(t){if(t instanceof WY)return Gy("text-success")("Updating your username...");if(t instanceof xY)return Gy("small text-danger")("There was an error saving your username. Please try again.");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 80, column 30 - line 84, column 95): "+[t.constructor.name])})])}},QY=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof jY)return FP(s8e(n.value0.value0!=="")(GP(v8e(xr(100))(new ke(new JY(n.value0.value0))))))(function(){return Cm({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof JY){if(n.value0.value0===e.username)return FP(GP(f8e((function(){var a=qY.create(n.value0.value0);return function(t){return ke.create(a(t))}})())(OY(n.value0.value0))))(function(){return Cm({username:e.username,validated:G.value,updating:G.value})});if($e)return Cm(e)}if(n.value0 instanceof qY)return Cm({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof zY)return FP(GP(_8e(p8e(UY(e.username)))(function(a){if(a instanceof Le)return HY(new Jn(new MP(e.username)));if(a instanceof Me)return HY(new ke($Y.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return Cm({username:e.username,validated:G.value,updating:new T(WY.value)})});if(n.value0 instanceof $Y)return Cm({username:e.username,validated:e.validated,updating:new T(xY.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 93, column 31 - line 120, column 48): "+[n.value0.constructor.name])}if(n instanceof Jn)return Cm(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 92, column 1 - line 92, column 55): "+[e.constructor.name,n.constructor.name])}},KY=function(e){return{username:e,validated:G.value,updating:G.value}};var d8e=nu(),h8e=jh(on)()(),g8e=Ft(Ce),D8e=Ht(ie),R8e=function(e){var n=nR(e);return function(){return function(a){return function(t){var r=d8e(a);return h8e({placement:kT,overlay:Oe(n(t)),overlayStyle:Za(r.overlayStyle)(Yt({width:"15rem"}))})(g8e("d-inline-flex align-items-center text-secondary "+r.className)([D8e("d-inline-block fe fe-help-circle "+(function(){var u=r.anchorText==="";return u?"":"mr-2"})())(""),cn(r.anchorText)]))}}}},ZT=function(e){var n=R8e(e)();return function(a){return n({className:a,anchorText:""})}};var XY=oa(ra),My=ta(XY)(Zn(Xn)),ZY=na(ea),Ay=aa(ZY),eX=la(ia),Ly=ua(eX),y8e=B(ue),Zh=(function(){function e(){}return e.value=new e,e})(),eg=(function(){function e(){}return e.value=new e,e})(),ng=(function(){function e(){}return e.value=new e,e})(),ag=(function(){function e(){}return e.value=new e,e})(),tg=(function(){function e(){}return e.value=new e,e})(),Fm=(function(){function e(){}return e.value=new e,e})(),w8e={to:function(e){if(e instanceof Se)return Zh.value;if(e instanceof fe&&e.value0 instanceof Se)return eg.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return ng.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return ag.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe&&e.value0.value0.value0.value0 instanceof Se)return tg.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe&&e.value0.value0.value0.value0 instanceof fe)return Fm.value;throw new Error("Failed pattern match at Common.Persona (line 20, column 1 - line 20, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof Zh)return new Se(je.value);if(e instanceof eg)return new fe(new Se(je.value));if(e instanceof ng)return new fe(new fe(new Se(je.value)));if(e instanceof ag)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof tg)return new fe(new fe(new fe(new fe(new Se(je.value)))));if(e instanceof Fm)return new fe(new fe(new fe(new fe(new fe(je.value)))));throw new Error("Failed pattern match at Common.Persona (line 20, column 1 - line 20, column 34): "+[e.constructor.name])}},nX=Qn(w8e)(My(My(My(My(My(XY)(ZY))(Ay))(Ay))(Ay))(Ay))(Ly(Ly(Ly(Ly(Ly(eX))))))(Ay);var b8e={eq:function(e){return function(n){return e instanceof Zh&&n instanceof Zh||e instanceof eg&&n instanceof eg||e instanceof ng&&n instanceof ng||e instanceof ag&&n instanceof ag||e instanceof tg&&n instanceof tg||e instanceof Fm&&n instanceof Fm}}},eS=function(e){if(e instanceof Zh)return"student";if(e instanceof eg)return"transfer_student";if(e instanceof ng)return"counselor";if(e instanceof ag)return"iec";if(e instanceof tg)return"parent";if(e instanceof Fm)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 38, column 13 - line 44, column 24): "+[e.constructor.name])},aX=(function(){var e=Vn(eS)(nX);return Ga(sn)({parse:function(n){return n==="unknown"?new T(G.value):y8e(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})})(),tX=function(e){if(e instanceof Zh)return"Student";if(e instanceof eg)return"Transfer Student";if(e instanceof ng)return"High School Counselor";if(e instanceof ag)return"Independent Educational Counselor (IEC)";if(e instanceof tg)return"Parent";if(e instanceof Fm)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 28, column 11 - line 34, column 24): "+[e.constructor.name])},rX=(function(){return M_(b8e)(Fm.value)(nX)})();function oX(){typeof fbq>"u"||fbq("trackCustom","LivestreamRegistrationComplete")}var T8e=x(St),S8e=wR(!1);var nS=function(e){if(yR(S8e))return T8e(void 0);if($e)return oX;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var PP=B(no);var LP=ae(yi),C8e=x(lv),F8e=ai(e7);var iX=function(e){return e},lX=function(e){return function(n){return PP(function(a){return a.result})(e({substring:n,position:0}))}};var zv={map:function(e){return function(n){var a=PP(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},Gm=function(e){return function(n){return new Me({pos:n.position,error:e})}},Mm={apply:function(e){return function(n){return function(a){return LP(e(a))(function(t){return LP(n(t.suffix))(function(r){return C8e({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return zv}};var t_={bind:function(e){return function(n){return function(a){return LP(e(a))(function(t){return iX(n(t.result))(t.suffix)})}}},Apply0:function(){return Mm}};var r_={pure:function(e){return function(n){return new Le({result:e,suffix:n})}},Apply0:function(){return Mm}};var G8e={Applicative0:function(){return r_},Bind1:function(){return t_}},cX={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof Yr)return new Yr({state:t.result.value0,str:t.suffix});if(t.result instanceof Wr)return new Wr({result:t.result.value0,suffix:t.suffix});throw new Error("Failed pattern match at StringParser.Parser (line 87, column 5 - line 87, column 68): "+[t.constructor.name])};return function(t){return F8e(function(r){return PP(a)(iX(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return G8e}};var Am={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Me){if(a.position===t.value0.pos)return n(a);if($e)return new Me({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return zv}},M8e={empty:Gm("No alternative"),Alt0:function(){return Am}},sX={Applicative0:function(){return r_},Plus1:function(){return M8e}};var vX=La(Am),NP=ae(t_),OP=x(r_),L8e=B(zv);var P8e=Ou(Mm),N8e=va(Mm);var UP=function(e){return function(n){return vX(e)(Gm(n))}},kP=function(e){return function(n){var a=e(n);return a instanceof Me?new Me({pos:n.position,error:a.value0.error}):a}},Vv=function(e){return vX(NP(e)(function(n){return OP(void 0)}))(OP(void 0))};var fX=function(e){return function(n){return new wl(e,n)}};var O8e=function(e){return function(n){var a=e(n);if(a instanceof Le){var t=n.position65535;return t?e(n):dX(a.value0)}if(a instanceof G)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})})(),N0=function(e){return kP(mX(J8e)(function(n){var a=e(n);return a?dX(n):Gm("Character "+(hX(n)+" did not satisfy predicate"))}))},yc=function(e){return UP(N0(function(n){return n===e}))("Could not match character "+hX(e))};var $8e=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},W8e=lr(),JP=B(zv),x8e=yo(gD)(cr),j8e=B(Yb),Ku=fn(ln)(t_),Pi=zt(zv),o_=x(r_),Hl=La(Am);var rg=Ou(Mm),O0=ae(t_),RX=yo(Qo)(cr);var Ho=function(e){return W8e(pE(e))},qP=function(e){return JP((function(){var n=j8e(Qi);return function(a){return x8e(n(a))}})())(_X(N0(e)))},yX=function(e){return Ku(Pi(e))(function(){return Ku(Pi(tS(e)))(function(){return o_(void 0)})})},tS=function(e){return Hl(yX(e))(o_(void 0))},wX=function(e){return Ku(Pi(N0(e)))(function(){return Ku(Pi(tS(N0(e))))(function(){return o_(void 0)})})},z8e=yc(Ho(0));var bX=yc(` `),EX=function(e){return e===" "||e===" "},V8e=N0(EX),HP=wX(EX),Q8e=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},Qv=function(e){return function(n){return function(a){return a>=e&&a<=n}}},K8e=Qv(Ho(33))(Ho(126)),Y8e=N0(K8e),$P=function(e){return function(n){return gv(Qi(n))(e)}},rS=function(e){return Qv(Ho(1))(Ho(8))(e)||Qv(Ho(14))(Ho(31))(e)||$P("\v\f\x7F")(e)},X8e=function(e){return Qv(Ho(33))(Ho(39))(e)||Qv(Ho(42))(Ho(91))(e)||Qv(Ho(93))(Ho(126))(e)||rS(e)},Z8e=function(e){return Qv(Ho(33))(Ho(90))(e)||Qv(Ho(94))(Ho(126))(e)||rS(e)},e7e=N0(rS),n7e=function(e){return $P(Qi(Ho(33)))(e)||Qv(Ho(35))(Ho(91))(e)||Qv(Ho(93))(Ho(126))(e)||rS(e)};var IX=yc("\r"),DX=Pi(rg(IX)(bX)),og=(function(){var e=yX(rg(DX)(HP)),n=rg(HP)(Vv(rg(DX)(HP)));return Hl(n)(e)})(),TX=(function(){var e=Ku(Pi(yc("\\")))(function(){return Hl(Y8e)(Hl(V8e)(Hl(bX)(Hl(IX)(Hl(e7e)(z8e)))))});return O0(e)(function(n){return o_("\\"+Qi(n))})})(),a7e=Hl(qP(n7e))(TX),t7e=(function(){var e=Ku(Pi(yc('"')))(function(){return O0(Lm(rg(Vv(og))(a7e)))(function(n){return Ku(Pi(Vv(og)))(function(){return Ku(Pi(yc('"')))(function(){return o_(n)})})})});return JP(function(n){return'"'+(RX(n)+'"')})(e)})(),SX=$8e("comment","Text.Email.Parser",function(){return Ku(Pi(yc("(")))(function(){return Ku(tS(Hl(wX(X8e))(Hl(Pi(TX))(Hl(SX(155))(og)))))(function(){return Ku(Pi(yc(")")))(function(){return o_(void 0)})})})}),r7e=SX(152),aS=tS(Hl(r7e)(og)),o7e=Ku(Vv(aS))(function(){return Ku(Pi(yc("[")))(function(){return O0(Lm(rg(Vv(og))(qP(Z8e))))(function(e){return Ku(Vv(og))(function(){return Ku(Pi(yc("]")))(function(){return Ku(Vv(aS))(function(){return o_("["+(RX(e)+"]"))})})})})})}),u7e=(function(){var e=function(n){return Q8e(n)||$P("!#$%&'*+/=?^_`{|}~-")(n)};return qP(e)})(),CX=(function(){var e=Ku(Pi(Vv(aS)))(function(){return O0(Hl(u7e)(t7e))(function(a){return Ku(Pi(Vv(aS)))(function(){return o_(a)})})}),n=pX(e)(yc("."));return JP(Nc(gD)(cr)("."))(n)})(),i7e=Hl(CX)(o7e),l7e=CX,WP=O0(l7e)(function(e){return O0(yc("@"))(function(){return O0(i7e)(function(n){return O0(gX)(function(){return o_({localPart:e,domainPart:n})})})})});var v7e=function(e){return lX(WP)(e)},f7e=(function(){var e=br(Ru)(oe(w_()()(b_({reflectSymbol:function(){return"error"}})(E_({reflectSymbol:function(){return"pos"}})(pn))(ir))));return function(n){return e(v7e(n))}})(),Ny=function(e){var n=f7e(e);if(n instanceof Me)return!1;if(n instanceof Le)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var xP=$u(ie),oS=vu()(),GX=J1(Ce)()(),MX=ge(ue),AX=Wi(St)(lu),LX=B(ue),uS=q1(ie)()(),PX=ge(Ye),Oy=Pe(Ce),_7e=OL(),jP=oe(pn),p7e=Cb(Je)(Ot),m7e=t0(Ce)()(),Pm=Pe(on),NX=ga(ie)()(),d7e=oe(xs),Uy=x(Bn),OX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),UX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),kX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),BX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ug=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(R){return function(E){return function(w){return function(I){return function(L){return Oe([xP("")(R),oS("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:w,placeholder:E,autoFocus:L.autoFocus,onChange:un(function(U){return t(I(a_(U)))})})])}}}}}},u=[xP("")("I'm a..."),GX("form-control")({name:"livestream_public_registration_form[i_am_a]",value:ze("")(MX(a.persona)(eS)),onChange:un(function(p){return AX(t)(LX(HX.create)(aX(cP(p))))})})([Qa(yr(a.persona))(uS("")({value:""})("Select one...")),Oe(PX(rX)(function(p){return uS("")({value:eS(p)})(tX(p))}))])],i=Oy("d-flex align-items-center")([cn("Already have an account? "),_7e({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:kI,openInNewTab:!1})]),l=[xP("")("Graduation year"),GX("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:ze("")(MX(a.gradYear)(jP)),onChange:un(function(p){return AX(t)(LX(BX.create)(Cs(cP(p))))})})([Qa(yr(a.gradYear))(uS("")({value:""})("Select one...")),Oe(PX(n.allowedGradYears)(function(p){return uS("")({value:jP(p)})(jP(p))}))])],s=ze({path:"",token:"",impersonationToken:""})(iI("livestreams_register_path")),d=p7e([Ny(a.email),a.firstName!=="",a.lastName!=="",Gr(a.gradYear),Gr(a.persona)]);return Oe([i,m7e("")({action:s.path,method:"POST"})([Pm("row")(Pm("col")(r("email")("Email")("Your email")(a.email)(OX.create)({autoFocus:e.autoFocus}))),Pm("row mt-3")(Pm("col")(r("first_name")("First name")("Your first name")(a.firstName)(UX.create)({autoFocus:!1}))),Pm("row mt-3")(Pm("col")(r("last_name")("Last name")("Your last name")(a.lastName)(kX.create)({autoFocus:!1}))),Oy("row mt-3")([Oy("col-6")(l),Oy("col-6")(u)]),Pm("row mt-3")(Oy("col-12")([NX("btn btn-primary w-100 mt-3 t--register")(vn)({type:"submit",disabled:!d,onClick:un(function(p){return nS(void 0)})})("Register"),ja(e.cancelButton)(function(p){return NX("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(vn)({type:"button",onClick:un(function(R){return p.click})})(p.text)})])),oS("")({type:"hidden",name:"authenticity_token",value:s.token}),oS("")({type:"hidden",name:"register_for_conference_id",value:d7e(n.conference.id)}),oS("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},ig=function(e){return function(n){if(n instanceof OX)return Uy({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof UX)return Uy({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof kX)return Uy({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof BX)return Uy({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof HX)return Uy({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new T(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 172, column 16 - line 182, column 36): "+[n.constructor.name])}},lg=(function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}})();var JX=Pe(Ce),h7e=ZT(ie),g7e=oo(ie)()(),cg=function(e){return Oe([JX("")([cn(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),h7e("")(` The only information we may share with colleges when you attend their events includes your name, email, graduation year, and whether you\u2019re a student, parent, or school counselor. `)]),JX("")([cn(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),g7e("")(Qr("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),cn(".")])])};var QP={eq:function(e){return function(n){return e===n}}};var u_=fn(ln)(da),R7e=Mi(qe),qX=ht(),y7e=dc(qX($({reflectSymbol:function(){return"author"}})(qX($({reflectSymbol:function(){return"cvid"}})(Ee)($({reflectSymbol:function(){return"username"}})(Ee)(mn))))($({reflectSymbol:function(){return"id"}})(Dn)($({reflectSymbol:function(){return"isFromHQ"}})(ct)($({reflectSymbol:function(){return"isPublic"}})(ct)($({reflectSymbol:function(){return"text"}})(Ee)($({reflectSymbol:function(){return"time"}})(Ee)(mn))))))))(qe),vg=nt(qe),lS=x(ba),Jo=x(Bn),KP=Vs(),w7e=jr(Ce),YP=Ft(ie),XP=$u(ie),b7e=Ht(ie),Nm=Pe(Ce),sg=Pe(on),iS=ga(ie)()(),ky=Pe(ie),$X=zr(ie),VX=ge(Ye),E7e=Vr(Ce)()(),I7e=Ft(Ce),QX=ae(nn),T7e=Xd()(),S7e=Wi(St)(lu),C7e=n0(Ce),F7e=vu()(),G7e=ZT(ie),M7e=be($r(Rr)),A7e=ge(ue),WX=ri(NJ(Ri(Ml))),L7e=Uu(QP),xX=B(st),P7e=tn(Dr),N7e=Is(Je)(QP),jX=$t(Po(st)),KX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YX=(function(){function e(){}return e.value=new e,e})(),XX=(function(){function e(){}return e.value=new e,e})(),Om=(function(){function e(){}return e.value=new e,e})(),cS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),vS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),eZ=(function(){function e(){}return e.value=new e,e})(),ZP=(function(){function e(){}return e.value=new e,e})(),eN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nZ=(function(){function e(){}return e.value=new e,e})(),zX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nN=(function(){function e(){}return e.value=new e,e})(),fS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_S=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aZ=(function(){function e(){}return e.value=new e,e})(),fg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),By=(function(){function e(){}return e.value=new e,e})();var tZ=function(e){return u_(R7e(function(n){return ke.create(eN.create(am(n)))})(y7e(e.pusher.dataChannel)("question")))(function(){return u_(vg(lS(new ke(nZ.value))))(function(){return Jo({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:Om.value})})})},rZ=function(e){if(e.user instanceof G)return new T(new ke(nN.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new ke(aZ.value));if(e.user instanceof T&&e.user.value0.username instanceof T)return G.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 363, column 3 - line 369, column 14): "+[e.user.constructor.name])},O7e=(function(){return ju(Hu(Je)([ns.value,new ar(":"),Ll.value,new ar(" "),as.value]))})(),oZ=function(e){return function(n){return function(a){var t=function(s){return a(ke.create(s))},r=function(s){return KP({id:"question-modal",onDismiss:t(By.value),body:Oe([w7e("")([YP("")("By: "),XP("")("@"+s.author.username)]),b7e("")(s.text),Hs(""),Nm("row align-items-center mb-3")([sg("col-4")(iS("btn w-100 btn-"+(function(){return s.isPublic?"secondary":"success"})())(vn)({onClick:un(function(d){return t(new _S(YX.value))})})((function(){return s.isPublic?"Hide from audience":"Show to audience"})())),ky("col")((function(){return s.isPublic?"This question will no longer be visible to the public, but HQ people will still see it.":"This question will become visible to the audience, even anonymous users."})())]),Nm("row align-items-center")([sg("col-4")(iS("btn w-100 btn-danger")(vn)({onClick:un(function(d){return t(new _S(XX.value))})})("Ban this user")),Nm("col")([cn("This user will not be able to ask any more questions "),XP("")("in this livestream. "),YP("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Oe([iS("btn btn-outline-primary px-4")(vn)({onClick:un(function(d){return t(By.value)})})("Never mind, close this dialog")])})},u=function(s){return KP({id:"questions-registration-form-modal",onDismiss:t(By.value),title:$X("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Oe([ug({cancelButton:G.value,autoFocus:!0})(e)(s)(function(d){return t(fS.create(d))}),sg("small mt-3")(cg(e))])})},i=function(s){return KP({id:"questions-username-modal",onDismiss:t(By.value),title:$X("")("Please select a user name"),body:VY(s)(function(d){return t(fg.create(d))}),bodyClass:"t--username-modal"})},l=function(s){var d=function(R){return function(E){return function(w){return Oe([ky("ml-2 badge badge-"+E)(R),ja(w)(function(I){return ky("ml-2 text-secondary")(O7e(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?d("CollegeVine")("success")(s.time):s.isPublic?d("Question")("warning")(G.value):Aa};return Oe([sg("position-relative h-100")(sg("d-flex flex-column position-absolute-fullsize")(Nm("d-flex flex-column flex-grow-1 min-height-0")([Nm("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(VX(n.questions)(function(s){return E7e("p-1 t--question"+(function(){return e.isPrivilegedUser?" cursor-pointer":""})())({onClick:un(function(d){return t(new _S(new KX(s)))})})([I7e("small d-inline-flex align-items-center")([XP("")("@"+s.author.username),l(s),cn(":")]),YP("ml-1")(s.text)])})),Nm("")([ja(QX(e.user)(function(s){return s.username}))(function(s){return ky("small text-secondary mt-2")("@"+s)}),T7e("form-control t--question-text")({onChange:un(function(s){return t(new ZX(BT(s)))}),onClick:un(function(s){return S7e(a)(rZ(e))}),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),Qa(e.isPrivilegedUser)(sg("form-check my-2")(C7e("form-check-label d-flex align-items-center t--broadcast-checkbox")([F7e("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:un(function(s){return t(eZ.value)})}),ky("badge badge-info bg-info text-dark mr-2")("HQ"),cn("Send to all viewers")]))),Nm("d-flex justify-content-end align-items-center")([G7e("large mr-2")(` Questions you ask will only be visible to you and the host unless they select it to read to the audience, at which point it will appear with a yellow \u201CQuestion\u201D tag for all viewers to see. `),iS("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(vn)({onClick:un(function(s){return t(ZP.value)}),disabled:n.newQuestionText===""})((function(){return n.newQuestionBroadcast?"Send to all":"Send to host"})())])])]))),(function(){if(n.modal instanceof Om)return Aa;if(n.modal instanceof sS)return u(n.modal.value0);if(n.modal instanceof cS)return r(n.modal.value0);if(n.modal instanceof vS)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 140, column 5 - line 144, column 41): "+[n.modal.constructor.name])})()])}}},U7e=function(e){return function(n){return M7e(A7e(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},uZ=function(e){return function(n){return function(a){if(a instanceof Jn)return Jo(n);if(a instanceof ke){if(a.value0 instanceof ZX){var t=rZ(e);if(t instanceof T)return u_(vg(lS(t.value0)))(function(){return Jo(n)});if(t instanceof G)return Jo({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 250, column 5 - line 255, column 46): "+[t.constructor.name])}if(a.value0 instanceof eZ)return Jo({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof ZP)return u_(vg(lS(new ke(nN.value))))(function(){return Jo(n)});if(a.value0 instanceof eN)return Jo({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:WX(function(l){return cI((function(s){return s.time})(l))})(wu(U7e(e))(bu(a.value0.value0)(wu((function(){var l=L7e(a.value0.value0.id);return function(s){return l((function(d){return d.id})(s))}})())(n.questions))))});if(a.value0 instanceof nZ)return u_(vg(xX(function(l){return ke.create(zX.create(l))})(bI(e.conference.id))))(function(){return Jo(n)});if(a.value0 instanceof zX){var u=VX(a.value0.value0)(function(l){return l.id});return Jo({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:WX(function(l){return cI((function(s){return s.time})(l))})(P7e(a.value0.value0)(wu(function(l){return N7e(l.id)(u)})(n.questions)))})}if(a.value0 instanceof nN)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new sS(lg)});var i=function(l){if(a.value0 instanceof fS)return Jo(n);if(a.value0 instanceof aZ)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new vS(KY(ze("")(QX(e.user)(function(d){return d.username}))))});if(a.value0 instanceof fg&&a.value0.value0 instanceof Jn&&a.value0.value0.value0 instanceof MP)return u_(vg(lS(new Jn(a.value0.value0.value0.value0))))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Om.value})});if(a.value0 instanceof fg&&a.value0.value0 instanceof Jn&&a.value0.value0.value0 instanceof AP)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Om.value});var s=function(d){if(a.value0 instanceof fg&&$e)return Jo(n);if(a.value0 instanceof By)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Om.value});if(a.value0 instanceof _S){if(e.isPrivilegedUser){if(a.value0.value0 instanceof KX)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new cS(a.value0.value0.value0)});var p=function(R){var E=function(w){return Jo(n)};return a.value0.value0 instanceof XX&&n.modal instanceof cS?u_(Ut(s$({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Om.value})}):E(!0)};return a.value0.value0 instanceof YX&&n.modal instanceof cS?u_(Ut(n$({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Om.value})}):p(!0)}if($e)return Jo(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof fg&&n.modal instanceof vS?jX(function(d){return ke.create(fg.create(d))})(function(d){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new vS(d)}})(QY(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof fS&&n.modal instanceof sS?jX(function(l){return ke.create(fS.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new sS(l)}})(ig(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof ZP&&e.user instanceof T?u_(vg(xX(function(r){return ke.create(eN.create(r))})(a$({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Jo({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var au={PRIMARY:"#1557B0",SECONDARY:"#4A5568",SUCCESS:"#007A3D",DANGER:"#C91E3E",WHITE:"#FFF",GRAY_300:"#E3EBF6",GRAY_500:"#6B7C93",GRAY_600:"#5E7290",GRAY_700:"#4A5568"};var B7e=au.PRIMARY,H7e=au.SECONDARY,J7e=au.SUCCESS,q7e=au.DANGER,$7e=au.WHITE,W7e=au.GRAY_300,x7e=au.GRAY_500,j7e=au.GRAY_600,aN=au.GRAY_700;var pS,V7e=new Uint8Array(16);function tN(){if(!pS&&(pS=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pS(V7e)}var iZ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Q7e(e){return typeof e=="string"&&iZ.test(e)}var rN=Q7e;var di=[];for(mS=0;mS<256;++mS)di.push((mS+256).toString(16).substr(1));var mS;function K7e(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(di[e[n+0]]+di[e[n+1]]+di[e[n+2]]+di[e[n+3]]+"-"+di[e[n+4]]+di[e[n+5]]+"-"+di[e[n+6]]+di[e[n+7]]+"-"+di[e[n+8]]+di[e[n+9]]+"-"+di[e[n+10]]+di[e[n+11]]+di[e[n+12]]+di[e[n+13]]+di[e[n+14]]+di[e[n+15]]).toLowerCase();if(!rN(a))throw TypeError("Stringified UUID is invalid");return a}var lZ=K7e;function Y7e(e,n,a){e=e||{};var t=e.random||(e.rng||tN)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){a=a||0;for(var r=0;r<16;++r)n[a+r]=t[r];return n}return lZ(t)}var oN=Y7e;var cZ=oN;var Z7e=function(e){return e},uN=function(e){return e};var iN=ae(io)(cZ)((function(){var e=x(St);return function(n){return e(Z7e(n))}})());function lN(){return Date.now()}var nOe=B(ca);var Jl=nOe(sE)(lN);var _g=nt(qe),gZ=fn(ln),aOe=gZ(Na),tOe=tn(v1),rOe=B(st),Jy=kn(qe),oOe=Ht(ie),uOe=Ul(),DZ=Vr(on)()(),vZ=Wg(Ml),iOe=Du(go),lOe=Yn(tl),cOe=oe(y6),fZ=oe(ep),sOe=B(Ye),Kv=gZ(da),vOe=Mi(qe),fOe=dc(ht()($({reflectSymbol:function(){return"authorTag"}})(Ee)($({reflectSymbol:function(){return"kind"}})(Ee)(mn))))(qe),gS=B(ca),U0=x(Bn),_Z=kt(Jd),pZ=$g(Ml),_Oe=x(ba),cN=wv(kd),pOe=Pe(Ce),mOe=ge(Ye),dOe=ga(Ce)()(),hOe=Ft(ie),hS=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),Hy=(function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e})(),RZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),vN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sN=function(e){return _g(aOe(xr(tOe(e)(10)))(function(){return rOe(vN.create)(Jy(Jl))}))},mZ=50,yZ=function(e){var n=function(r){return oOe("text-white fe fe-"+r)("")},a=(function(){if(e instanceof zf)return n("heart");if(e instanceof R0)return n("thumbs-up");if(e instanceof tm)return n("thumbs-down");if(e instanceof y0)return n("file-text");if(e instanceof w0)return uOe("")({src:"/img/icons/smile-white.svg",alt:Ol.value,style:Yt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 154, column 12 - line 159, column 133): "+[e.constructor.name])})(),t=(function(){if(e instanceof zf)return"#F0747B";if(e instanceof R0)return"#008CFD";if(e instanceof tm)return aN;if(e instanceof y0)return"#18A668";if(e instanceof w0)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 161, column 23 - line 166, column 34): "+[e.constructor.name])})();return DZ("d-flex justify-content-center align-items-center rounded-circle")({style:Yt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},wZ=6,dZ=(function(){return wZ*1e3})(),bZ=function(e){return function(n){var a=function(t){if(vZ(t.removeAt)(e.currentTime))return Aa;var r=Er(iOe(lOe(xc(UD(t.startDecayAt))))(10)),u=(function(){var p=r<=3;if(p)return"linear";var R=r<=7;return R?"ease-in":"ease"})(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=vZ(t.startDecayAt)(e.currentTime),d=wZ+(r-5)/10;return DZ("position-absolute mb-4 mt-2")({key:cOe(t.startDecayAt),style:Yt({right:fZ(l)+"rem",top:(function(){return s?"0":"90%"})(),opacity:(function(){return s?0:i?1:.6})(),transitionProperty:"top opacity",transitionDuration:fZ(d)+"s",transitionTimingFunction:u})})(yZ(t.reaction.kind))};return Oe(sOe(a)(e.reactions))}},EZ=function(e){return Kv(vOe(function(n){return new Hy(iH(n),G.value)})(fOe(e.pusher.dataChannel)("reaction")))(function(){return Kv(_g(Jy(gS(function(n){return RZ.create(uN(n))})(iN))))(function(){return Kv(_g(Jy(gS(vN.create)(Jl))))(function(){return U0({authorTag:"",currentTime:_Z,coolDownUntil:_Z,reactions:[]})})})})},hZ=800,IZ=function(e){return function(n){return function(a){if(a instanceof hS&&a.value1 instanceof G)return Kv(_g(Jy(gS((function(){var t=hS.create(a.value0);return function(r){return t(T.create(r))}})())(Jl))))(function(){return U0(n)});if(a instanceof hS&&a.value1 instanceof T){if(pZ(n.coolDownUntil)(a.value1.value0))return Kv(_g(_Oe(new Hy({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return U0(n)});if($e)return Kv(Ut(i$(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return Kv(sN(hZ))(function(){return U0({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:ze(a.value1.value0)(cN(hZ)(a.value1.value0))})})})}if(a instanceof Hy&&a.value1 instanceof G)return Kv(_g(Jy(gS((function(){var t=Hy.create(a.value0);return function(r){return t(T.create(r))}})())(Jl))))(function(){return U0(n)});if(a instanceof Hy&&a.value1 instanceof T)return Kv(sN(mZ))(function(){return Kv(sN(dZ))(function(){var t={reaction:a.value0,startDecayAt:ze(a.value1.value0)(cN(mZ)(a.value1.value0)),removeAt:ze(a.value1.value0)(cN(dZ)(a.value1.value0))};return U0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:hp(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof RZ)return U0({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof vN)return U0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:wu(function(t){return pZ(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 172, column 22 - line 215, column 8): "+[a.constructor.name])}}},TZ=function(e){return function(n){var a=function(t){if(t instanceof zf)return"love this";if(t instanceof R0)return"helpful";if(t instanceof tm)return"not helpful";if(t instanceof y0)return"taking notes";if(t instanceof w0)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 140, column 13 - line 145, column 30): "+[t.constructor.name])};return pOe("d-flex justify-content-end my-2")(mOe([zf.value,w0.value,R0.value,y0.value])(function(t){return dOe("btn bg-light d-flex align-items-center p-0 ml-3")(Qr(a(t)))({onClick:un(function(r){return n(new hS(t,G.value))}),style:Yt({borderRadius:"1em"})})([yZ(t),hOe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var OZ=fn(ln),DOe=ae(Na),_N=kn(qe),DS=x(ba),wS=jr(ie),RS=oe(pn),qy=OZ(da),$y=nt(qe),ps=x(Bn),SZ=Ar(Xo),CZ=Ou(JD),FZ=B(st),ROe=ti(Bn)(lu),yOe=Al(Sf),GZ=Pe(ie),wOe=zs(),bOe=zr(ie),MZ=ga(ie)()(),AZ=Pe(on),EOe=ga(Ce)()(),IOe=Ht(ie),TOe=Pe(Ce),UZ=(function(){function e(){}return e.value=new e,e})(),kZ=(function(){function e(){}return e.value=new e,e})(),BZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HZ=(function(){function e(){}return e.value=new e,e})(),LZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JZ=(function(){function e(){}return e.value=new e,e})(),PZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),pN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qZ=(function(){function e(){}return e.value=new e,e})(),$Z=(function(){function e(){}return e.value=new e,e})(),mN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yS=(function(){function e(){}return e.value=new e,e})(),WZ=OZ(Na)(xr(1e3))(function(){return DOe(_N(Jl))(function(e){return DS(new mN(e))})}),SOe=function(e){return{header:"Go on-air?",body:Oe([wS("")("Are you sure you want to go on-air?"),wS("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(RS(e.videoLagSeconds)+` seconds if you confirm. If you're presenting with Zoom, make sure you've gone "live" on Zoom as well. `))]),confirmText:"Confirm, go on-air!",cancelText:"Cancel",confirmMsg:HZ.value}},NZ=function(e){return function(n){return function(a){return function(t){return qy($y(WZ))(function(){return ps({confirmation:n.confirmation,network:UZ.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},xZ=function(e){return function(n){return function(a){if(a instanceof HZ)return qy($y(SZ(CZ(Qq(e.conference.id))(FZ(LZ.create)(_N(Jl))))(function(l){return DS(new fN("Error opening the stream. Please try again."))})))(function(){return ps({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:kZ.value})});if(a instanceof LZ)return NZ(e)(n)(a.value0)(_u.value);if(a instanceof JZ)return qy($y(SZ(CZ(Kq(e.conference.id))(FZ(PZ.create)(_N(Jl))))(function(l){return DS(new fN("Error closing the stream. Please try again."))})))(function(){return ps(n)});if(a instanceof PZ)return NZ(e)(n)(a.value0)(ko.value);if(a instanceof pN)return ps({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof qZ)return qy(ROe(n.confirmation)(function(l){return $y(DS(l.confirmMsg))}))(function(){return ps({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof $Z)return ps({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof fN)return ps({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new BZ(a.value0)});var t=function(l){if(a instanceof mN||a instanceof yS)return ps(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 181, column 1 - line 181, column 76): "+[a.constructor.name])};if(a instanceof mN){if(n.transition instanceof T){var r=yOe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Bu(r)|0,i=u>0;return i?qy($y(WZ))(function(){return ps({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):ps({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},jZ=function(e){return ps({streamStatus:e.streamStatus,transition:G.value,network:UZ.value,confirmation:G.value})},COe=(function(){return{header:"End the stream?",body:Oe([wS("")("Are you sure you want to end the stream?"),wS("mb-0 font-weight-bold fw-bold")("You won't be able to restart it again!")]),confirmText:"Yes, end it",cancelText:"No, keep streaming",confirmMsg:JZ.value}})(),zZ=function(e){return function(n){return function(a){var t=(function(){return n.network instanceof kZ?GZ("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):Aa})(),r=function(d){return wOe({id:"stream-controls-confirmation-modal",header:bOe("my-0")(d.header),bodyClass:"p-5",body:d.body,footerClass:"p-4",footer:Oe([MZ("btn btn-primary px-4")(vn)({onClick:un(function(p){return a(qZ.value)})})(d.confirmText),MZ("btn btn-outline-primary px-4")(vn)({onClick:un(function(p){return a($Z.value)})})(d.cancelText)])})},u=function(d){return function(p){return function(R){return function(E){return function(w){return AZ("col-auto pr-0")(EOe("btn btn-"+(d+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(vn)({onClick:un(function(I){return a(w)})})([IOe("fe mr-2 fe-"+p)(""),cn(R)]))}}}}},i=(function(){if(n.streamStatus instanceof ul)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new pN(SOe(e)));var d=function(p){if(n.streamStatus instanceof _u)return Oe([u("lg")("radio")("ON AIR")("success")(yS.value),u("sm")("x-circle")("End stream")("outline-danger")(new pN(COe))]);if(n.streamStatus instanceof ko)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(yS.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof _u&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(yS.value):d(!0)})(),l=function(d){return GZ("alert small m-0 flex-grow-1 alert-"+d)},s=(function(){if(n.network instanceof BZ)return l("danger")(n.network.value0);if(n.streamStatus instanceof ul)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var d=function(p){if(n.streamStatus instanceof _u)return l("light")(` We're live. The audience should see your video with a `+(RS(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var R=function(E){if(n.streamStatus instanceof ko)return l("light")("The stream has ended. The audience does not see any video right now.");throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof ko&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(RS(n.transition.value0.secondsLeft)+" seconds.")):R(!0)};return n.streamStatus instanceof _u&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(RS(n.transition.value0.secondsLeft)+" seconds...")):d(!0)})();return TOe("position-relative row align-items-center t--stream-controls")([i,AZ("col")(s),t,ja(n.confirmation)(r)])}}};var GOe=wv(Mp),KZ=Al(Mp),VZ=Ok(),MOe=Vs(),AOe=zr(ie),LOe=Pe(ie),QZ=jr(ie),POe=ga(ie)()(),YZ=nt(qe),XZ=fn(ln),ZZ=B(st),eee=kn(qe),nee=XZ(da),NOe=bi(Je)(Wt),dN=x(Bn),gN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hN=(function(){function e(){}return e.value=new e,e})(),OOe=[30,15,5,0],aee=function(e){return ze(e.conference.scheduledStartTime)(GOe(Er(e.conference.duration))(e.conference.scheduledStartTime))},tee=function(e){return function(n){return function(a){if(!n.modal)return Aa;if(n.now instanceof G)return Aa;if(n.now instanceof T){var t=aee(e),r=KZ(t)(n.now.value0),u=(function(){if(r<1)return" ended "+VZ({from:t,to:n.now.value0,format:bE("ago")});if($e)return" ends "+VZ({from:n.now.value0,to:t,format:bE("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 69, column 7 - line 71, column 105): ")})();return MOe({id:"stream-end-warning-modal",onDismiss:a(hN.value),body:Oe([AOe("mb-0")("Host-only warning"),LOe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),QZ("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),QZ("")(` You have `+(_c(e.conference.tailTime)("extra minute")("extra minutes")+` after scheduled stream end, in case you absolutely cannot wrap up before then. After that the video streaming will be terminated. `)),POe("btn btn-primary px-4")(vn)({onClick:un(function(i){return a(hN.value)})})("Got it")])})}throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 44, column 1 - line 44, column 71): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},UOe=YZ(XZ(Na)(xr(60100))(function(){return ZZ(gN.create)(eee(h0))})),ree=function(e){return function(n){return function(a){if(a instanceof gN)return nee(UOe)(function(){var t=KZ(aee(e))(a.value0),r=NOe(Bu(t))(OOe);return dN({now:new T(a.value0),modal:n.modal||r})});if(a instanceof hN)return dN({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 74, column 22 - line 85, column 33): "+[a.constructor.name])}}},oee=(function(){return nee(YZ(ZZ(gN.create)(eee(h0))))(function(){return dN({modal:!1,now:G.value})})})();var see=fn(ln),BOe=see(Na),uee=x(ba),HOe=see(da),JOe=nt(qe),qOe=Ar(Xo),ES=x(Bn),$Oe=be(TR),vee=Hu(Je),DN=Pe(Ce),bS=Ht(ie),WOe=ga(ie)()(),xOe=oo(ie)()(),jOe=ga(on)()(),zOe=zs(),iee=Pe(on),VOe=$u(ie),QOe=Iv(ie)()(),KOe=Ft(ie),fee=(function(){function e(){}return e.value=new e,e})(),_ee=(function(){function e(){}return e.value=new e,e})(),RN=(function(){function e(){}return e.value=new e,e})(),pee=(function(){function e(){}return e.value=new e,e})(),mee=(function(){function e(){}return e.value=new e,e})(),lee=(function(){function e(){}return e.value=new e,e})(),cee=(function(){function e(){}return e.value=new e,e})(),YOe=(function(){function e(){}return e.value=new e,e})(),dee=function(e){return function(n){return function(a){var t=BOe(yI({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return uee(new ke(lee.value))});if(a instanceof mee)return HOe(JOe(qOe(t)(function(r){return uee(new ke(cee.value))})))(function(){return ES({cta:n.cta,stage:_ee.value})});if(a instanceof lee)return ES({cta:n.cta,stage:pee.value});if(a instanceof cee)return ES({cta:n.cta,stage:RN.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 136, column 24 - line 146, column 44): "+[a.constructor.name])}}},hee=function(e){return function(n){return $Oe(e.cta.conferenceId)(n.conferenceId)}},gee=function(e){return ES({cta:e,stage:fee.value})},XOe=(function(){return ju(vee([Ws.value,new ar(", "),$s.value,new ar(" "),es.value,new ar(" at "),ns.value,new ar(":"),Ll.value,new ar(" "),as.value]))})(),ZOe=(function(){return ju(vee([Ws.value]))})(),Dee=function(e){return function(n){return function(a){var t=(function(){return n.stage instanceof RN?DN("text-danger small mt-2")([bS("fe fe-x-circle mr-2")(""),cn("Something went wrong. Please try again.")]):Aa})(),r=function(d){return a(ke.create(d))},u=(function(){if(e.user instanceof T)return WOe("btn btn-primary px-4 t--register-one-click")(Qr("Register for this livestream"))({onClick:un(function(d){return r(mee.value)})})("Register (one-click)");if(e.user instanceof G)return xOe("btn btn-primary px-4 t--register-new-tab")(Qr("Register for this livestream"))({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 87, column 22 - line 97, column 25): "+[e.user.constructor.name])})(),i=(function(){if(n.stage instanceof fee||n.stage instanceof RN)return u;if(n.stage instanceof _ee)return DN("text-secondary")([bS("fe fe-refresh-cw mr-2")(""),cn("Hold on tight...")]);if(n.stage instanceof pee)return DN("text-success")([bS("fe fe-check-circle mr-2")(""),cn("You\u2019ve registered \u2013\xA0see you "+(ZOe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 71, column 36 - line 85, column 10): "+[n.stage.constructor.name])})(),l=function(d){return a(Jn.create(d))},s=jOe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Qr("Close"))({onClick:un(function(d){return l(YOe.value)})})(bS("fe fe-x")(""));return zOe({id:"livestream-event-cta-modal",body:Oe([iee("row justify-content-end mt-n3")(s),VOe("")("Join us for our upcoming livestream:"),QOe("mt-3")({id:mc})(n.cta.title),KOe("small")(XOe(n.cta.startTime)+(" "+nm)),iee("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:WR.value})}}};var n6e=zs(),IS=Pe(Ce),a6e=W1(ie)()(),TS=Pe(on),t6e=ga(on)()(),r6e=Ht(ie),o6e=ge(Ye),u6e=Vc()(),i6e=fu(ie),l6e=jr(ie),c6e=oo(ie)()(),s6e=fn(ln),v6e=s6e(da),f6e=nt(qe),_6e=kn(qe),p6e=Yf(Mo)(),m6e=oe(pn),Ree=x(Bn),d6e=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yee=(function(){function e(){}return e.value=new e,e})(),wee=function(e){return function(n){var a=(function(){var i=xo(e.cta.providers);return i===1?C0.value:i===2?C0.value:xR.value})(),t=function(i){return n(ke.create(i))},r=function(i){return n(Jn.create(i))},u=(function(){var i=xo(e.cta.providers);return i===1?"col-12":i===2?"col-12 col-md-6 mb-3 mb-md-0":"col-12 col-md-4 mb-3 mb-md-0"})();return n6e({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Oe([IS("row no-gutters g-0 mb-4")([IS("col text-center")([a6e("mb-2")({id:mc})("The admissions process is hard - advisors are here to help!"),cn("Schedule a free consultation to get your questions answered")]),TS("col-auto text-right")(t6e("btn btn-link p-0 m-0 text-white")(Qr("Close"))({onClick:un(function(i){return r(yee.value)})})(r6e("fe fe-x")("")))]),IS("row text-center")(o6e(e.cta.providers)(function(i){return IS(u)([TS("row mb-3")(TS("col-auto mx-auto")(TS("avatar avatar-xl")(u6e("avatar-img rounded-circle img-fluid")({src:i.avatarUrl,alt:i.name})))),i6e("mb-2")(i.name),l6e("mb-3")(i.location),c6e("btn btn-primary btn-sm px-3 py-1")(vn)({target:"_blank",href:i.linkUrl,onClick:un(function(l){return t(new d6e(i.avatarUrl))})})(e.cta.linkText)])}))]),size:a})}},bee=function(e){return function(n){return v6e(f6e(_6e(function(){return p6e("Livestream: CTA Popup Link Clicked")({livestream_cta_id:m6e(e.cta.id),livestream_cta_url:n.value0})(),new Jn(yee.value)})))(function(){return Ree(e)})}},Eee=function(e){return function(n){return e.cta.id===n.id}},Iee=function(e){return Ree({cta:e})};var g6e=oo(ie)()(),D6e=ga(on)()(),R6e=Ht(ie),y6e=zs(),Tee=Pe(on),w6e=Iv(ie)()(),b6e=fn(ln),E6e=b6e(da),I6e=nt(qe),T6e=kn(qe),S6e=Yf(Mo)(),C6e=oe(pn),See=x(Bn),F6e=(function(){function e(){}return e.value=new e,e})(),Cee=(function(){function e(){}return e.value=new e,e})(),Fee=function(e){return function(n){var a=function(i){return n(ke.create(i))},t=g6e("btn btn-primary px-4 t--register-new-tab")(vn)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:un(function(i){return a(F6e.value)})})(e.cta.buttonText),r=function(i){return n(Jn.create(i))},u=D6e("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Qr("Close"))({onClick:un(function(i){return r(Cee.value)})})(R6e("fe fe-x")(""));return y6e({id:"general-cta-modal",body:Oe([Tee("row justify-content-end mt-n3")(u),w6e("mt-3")({id:mc})(e.cta.title),Tee("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:WR.value})}},Gee=function(e){return function(n){return E6e(I6e(T6e(function(){return S6e("Livestream: CTA Popup Link Clicked")({livestream_cta_id:C6e(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new Jn(Cee.value)})))(function(){return See(e)})}},Mee=function(e){return function(n){return e.cta.id===n.id}},Aee=function(e){return See({cta:e})};var bN=fn(ln),ql=bN(nn),$l=Ko(gu),pg=x(ka),Lee=Xr(iu(Ot)),Wy=La(hu),i_=x(Bn),M6e=bN(da),A6e=nt(qe),L6e=bN(Na),P6e=x(ba),yN=Pe(Ce),N6e=n0(ie),O6e=vu()(),U6e=ga(on)()(),k6e=Ht(ie),B6e=zs(),wN=Pe(on),H6e=Iv(ie)()(),J6e=jr(ie),q6e=ga(ie)()(),Pee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Nee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Oee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Uee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),kee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Bee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Hee=(function(){function e(){}return e.value=new e,e})(),Jee=(function(){function e(){}return e.value=new e,e})(),qee=function(e){return function(n){return e.cta.id===n.id}},$ee=function(e){return function(n){var a=ql($l(n.cta.requireReferredUserLastName))(function(){return ql($l(n.referredUserLastName===""))(function(){return pg("Please enter the other person\u2019s last name")})}),t=ql($l(n.cta.requireReferredUserFirstName))(function(){return ql($l(n.referredUserFirstName===""))(function(){return pg("Please enter the other person\u2019s first name")})}),r=ql($l(Lee(Ny)(n.referredUserEmail)))(function(){return pg("Please enter a valid email address")}),u=ql($l(yr(e.user)))(function(){return ql($l(n.cta.requireAnonymousUserLastName))(function(){return ql($l(n.anonymousUserLastName===""))(function(){return pg("Please enter your last name")})})}),i=ql($l(yr(e.user)))(function(){return ql($l(n.cta.requireAnonymousUserFirstName))(function(){return ql($l(n.anonymousUserFirstName===""))(function(){return pg("Please enter your first name")})})}),l=ql($l(yr(e.user)))(function(){return ql($l(n.cta.requireAnonymousUserEmail))(function(){return ql($l(Lee(Ny)(n.anonymousUserEmail)))(function(){return pg("Please enter a valid email address")})})});return Wy(i)(Wy(u)(Wy(l)(Wy(t)(Wy(a)(r)))))}},Wee=function(e){return function(n){return function(a){if(a instanceof Pee)return i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserFirstName:a.value0});if(a instanceof Nee)return i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserLastName:a.value0});if(a instanceof Oee)return i_({anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserEmail:a.value0});if(a instanceof Uee)return i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserFirstName:a.value0});if(a instanceof kee)return i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,validationActive:n.validationActive,referredUserLastName:a.value0});if(a instanceof Bee)return i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserEmail:a.value0});if(a instanceof Hee){var t=yr($ee(e)(n));return t?M6e(A6e(L6e(Yq({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return P6e(new Jn(Jee.value))})))(function(){return i_(n)}):i_({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:!0})}throw new Error("Failed pattern match at Livestream.Ctas.Display.Referral (line 142, column 24 - line 171, column 45): "+[a.constructor.name])}}},xee=function(e){return function(n){return function(a){var t=$ee(e)(n),r=function(E){return function(w){return function(I){return function(L){return function(U){return yN(E)([N6e("mb-2")(I),O6e("form-control "+w)({type:"text",value:L,onChange:un(function(V){return a(new ke(U(a_(V))))})})])}}}}},u=Qa(yr(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(Oee.create)),i=Qa(yr(e.user))(Oe([Qa(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(Pee.create)),Qa(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(Nee.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(Bee.create),s=Oe([Qa(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(Uee.create)),Qa(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(kee.create))]),d=function(E){return a(ke.create(E))},p=function(E){return a(Jn.create(E))},R=U6e("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(Qr("Close"))({onClick:un(function(E){return p(Jee.value)})})(k6e("fe fe-x")(""));return B6e({id:"referral-cta-modal",body:Oe([wN("row justify-content-end mt-n3")(R),H6e("mt-3")({id:mc})(n.cta.title),ja(n.cta.description)(J6e("")),yN("row")([i,u,s,l]),yN("row")([wN("col-auto my-auto")(q6e("btn btn-primary t--save")(vn)({onClick:un(function(E){return d(Hee.value)})})("Save")),wN("col my-auto text-danger")(Qa(n.validationActive)(ja(t)(cn)))])]),bodyClass:"t--cta-active",size:C0.value})}}},jee=function(e){return i_({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var W6e=nt(qe),x6e=x(ba),k0=$t(Po(st)),SS=fn(ln)(da),xy=x(Bn),jy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Vy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Qy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),CS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),FS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),GS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),MS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),j6e=(function(){function e(){}return e.value=new e,e})(),zee=function(e){return function(n){return function(a){var t=function(r){return a(ke.create(r))};if(n instanceof jy)return Dee(e)(n.value0)(function(r){return t(CS.create(r))});if(n instanceof zy)return wee(n.value0)(function(r){return t(FS.create(r))});if(n instanceof Vy)return Fee(n.value0)(function(r){return t(GS.create(r))});if(n instanceof Qy)return xee(e)(n.value0)(function(r){return t(MS.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},Vee=function(e){return function(n){return function(a){var t=W6e(x6e(new Jn(j6e.value)));if(n instanceof jy&&a instanceof CS){if(a.value0 instanceof ke)return k0(function(r){return ke.create(CS.create(r))})(jy.create)(dee(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return SS(t)(function(){return xy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 73, column 5 - line 78, column 19): "+[a.value0.constructor.name])}if(n instanceof zy&&a instanceof FS){if(a.value0 instanceof ke)return k0(function(r){return ke.create(FS.create(r))})(zy.create)(bee(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return SS(t)(function(){return xy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 81, column 5 - line 87, column 19): "+[a.value0.constructor.name])}if(n instanceof Vy&&a instanceof GS){if(a.value0 instanceof ke)return k0(function(r){return ke.create(GS.create(r))})(Vy.create)(Gee(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return SS(t)(function(){return xy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 90, column 5 - line 95, column 19): "+[a.value0.constructor.name])}if(n instanceof Qy&&a instanceof MS){if(a.value0 instanceof ke)return k0(function(r){return ke.create(MS.create(r))})(Qy.create)(Wee(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return SS(t)(function(){return xy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return xy(n)}}},Qee=function(e){return function(n){return e instanceof jy&&n instanceof ts?hee(e.value0)(n.value0):e instanceof Vy&&n instanceof rs?Mee(e.value0)(n.value0):e instanceof zy&&n instanceof os?Eee(e.value0)(n.value0):e instanceof Qy&&n instanceof us?qee(e.value0)(n.value0):!1}},Kee=function(e){if(e instanceof ts)return k0(function(n){return ke.create(CS.create(n))})(jy.create)(gee(e.value0));if(e instanceof os)return k0(function(n){return ke.create(FS.create(n))})(zy.create)(Iee(e.value0));if(e instanceof rs)return k0(function(n){return ke.create(GS.create(n))})(Vy.create)(Aee(e.value0));if(e instanceof us)return k0(function(n){return ke.create(MS.create(n))})(Qy.create)(jee(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var Yee=zr(ie),AS=Pe(Ce),V6e=$u(ie),Q6e=Iv(ie)()(),ene=Ts(C_),K6e=n0(Ce),Y6e=vu()(),IN=bi(Je)(Wt),Xee=ga(ie)()(),X6e=Fh(on),Z6e=kn(qe),eUe=Kf(Mo),nUe=Il(),aUe=oe(pn),Um=x(Bn),tUe=M_(Wt),km=fn(ln)(da),rUe=Ar(Xo),EN=x(ba),oUe=ti(ba)(Je),uUe=Cr(ba),Zee=nt(qe),iUe=$t(Po(st)),mg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),TN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),SN=(function(){function e(){}return e.value=new e,e})(),nne=(function(){function e(){}return e.value=new e,e})(),CN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ane=function(e){return function(n){return function(a){var t=Oe([Yee("text-center")("The host just asked a poll question!"),Yee("text-center")("To participate in live polls, please introduce yourself:"),ug({cancelButton:new T({text:"Not now",click:a(new mg({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(CN.create(i))}),AS("small mt-3")([cg(e),AS("mt-2")([cn("After submitting, you\u2019ll be able to answer all "),V6e("")("future"),cn(" poll questions in this stream!")])])]),r=Oe([Q6e("font-weight-bold fw-bold")({id:mc})(n.poll.question),AS("d-flex flex-column ml-4")(ene(function(i){return function(l){return K6e("form-check-label mb-2")([Y6e("form-check-input mt-2 t--option")({checked:IN(i)(n.selected),onChange:un(function(s){return a(new TN(i))}),type:(function(){return n.poll.multiSelect?"checkbox":"radio"})()}),cn(l)])}})(n.poll.options)),AS("d-flex justify-content-start mt-6")([Xee("btn btn-primary px-4 mr-3 t--submit")(vn)({onClick:un(function(i){return a(SN.value)}),disabled:ji(n.selected)})("Submit answer"),Xee("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(vn)({onClick:un(function(i){return a(nne.value)})})("Do it later")])]),u=(function(){if(e.user instanceof T)return"t--poll-active";if(e.user instanceof G)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 18 - line 57, column 45): "+[e.user.constructor.name])})();return X6e(u)({id:"livestream-poll-display-modal"})((function(){if(e.user instanceof T)return r;if(e.user instanceof G)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])})())}}},tne=function(e){return function(n){return function(a){var t=function(r){return Z6e(eUe("Livestream: Poll Response")(Tf(D0(e.conference))(nUe({livestream_poll_id:aUe(n.poll.id),livestream_poll_question:n.poll.question,livestream_poll_skipped:(function(){return r.skipped?"true":""})(),livestream_poll_multiselect:(function(){return n.poll.multiSelect?"true":"false"})(),livestream_poll_response:r.option}))))};if(a instanceof mg)return Um(n);if(a instanceof TN&&n.poll.multiSelect)return Um({poll:n.poll,registration:n.registration,selected:(function(){var r=IN(a.value0)(n.selected);return r?tUe(a.value0)(n.selected):bu(a.value0)(n.selected)})()});if(a instanceof TN)return Um({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof SN&&ji(n.selected))return Um(n);if(a instanceof SN)return km(Ut(rUe(Q2(n.poll)(n.selected))(function(r){return sc(Xc)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return EN(void 0)})})))(function(){return km(Ut(oUe(ene(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return uUe(IN(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return km(Zee(EN(new mg({keepShowingPolls:!0}))))(function(){return Um(n)})})});if(a instanceof nne)return km(Ut(Q2(n.poll)([])))(function(){return km(Ut(t({skipped:!0,option:""})))(function(){return km(Zee(EN(new mg({keepShowingPolls:!0}))))(function(){return Um(n)})})});if(a instanceof CN)return iUe(CN.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(ig(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 109, column 24 - line 156, column 55): "+[a.constructor.name])}}},rne=function(e){return km(Ut(Xq(e)))(function(){return Um({poll:e,selected:[],registration:lg})})};var vne=fn(ln),cUe=vne(Na),sUe=ae(Na),one=kn(qe),vUe=ti(ba)(lu),fUe=Kf(Mo),une=Il(),_Ue=oe(sd),pUe=oe(xs),LS=oe(pn),ms=x(Bn),fne=Po(st),ine=$t(fne),lne=ae(da),cne=br(fne),H0=vne(da),mUe=be(Wt),B0=x(ka),Ky=ah(qe),Yy=B(ue),dUe=B(Bi),Xy=mf(Je),AN=ht(),sne=dc(AN($({reflectSymbol:function(){return"poll_id"}})(Dn)(mn)))(qe),hUe=Mi(qe),gUe=be($r(TR)),DUe=dc(AN($({reflectSymbol:function(){return"conference_id"}})(Dn)(mn)))(qe),FN=be($r(Wt)),GN=dc(AN($({reflectSymbol:function(){return"id"}})(Dn)(mn)))(qe),Zy=(function(){function e(){}return e.value=new e,e})(),dg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ew=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),PS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),NS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),MN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_ne=function(e){return function(n){return function(a){if(n.stage instanceof Zy)return Aa;if(n.stage instanceof dg)return ane(e)(n.stage.value0)(function(t){return a(hg.create(t))});if(n.stage instanceof ew)return zee(e)(n.stage.value0)(function(t){return a(PS.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},RUe=function(e){return function(n){return e instanceof ew?Qee(e.value0)(n):!1}},yUe=function(){return function(e){return function(n){return function(a){return cUe(xr(100))(function(){return sUe(one(GE(mc)))(function(t){return vUe(t)(function(r){return one(function(){var i=HL(MA(r))(),l=rB({x:i.left+1,y:i.top+1})(),s=kL(MA(l))();return fUe(n)(Tf(une(a))(Tf(D0(e.conference))(une({livestream_popup_visible:_Ue(s===mc)}))))()})})})})}}}},pne=yUe(),wUe=function(e){var n=function(){return pne(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof ts)return a({livestream_cta_target_conference_id:pUe(t.value0.conferenceId)});if(t instanceof os)return a({livestream_cta_id:LS(t.value0.id)});if(t instanceof rs)return a({livestream_cta_id:LS(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof us)return a({livestream_cta_id:LS(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 150, column 29 - line 167, column 8): "+[t.constructor.name])}},mne=function(e){return function(n){return function(a){if(a instanceof hg&&a.value0 instanceof mg)return ms({stage:Zy.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof hg)return ms(n);if(a instanceof PS){if(a.value0 instanceof Jn)return ms({showPolls:n.showPolls,stage:Zy.value});var u=function(s){return ms(n)};return a.value0 instanceof ke&&n.stage instanceof ew?ine(PS.create)(function(s){return{showPolls:n.showPolls,stage:new ew(s)}})(Vee(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof NS&&n.showPolls)return lne(cne(hg.create)(rne(a.value0)))(function(p){return H0(Ut(pne(e)("Livestream: Poll Popup Shown")({livestream_poll_id:LS(a.value0.id)})))(function(){return ms({showPolls:n.showPolls,stage:new dg(p)})})});if(a instanceof NS)return ms(n);var s=function(p){if(a instanceof MN||a instanceof gg&&RUe(n.stage)(a.value0))return ms(n);if(a instanceof gg)return H0(Ut(wUe(e)(a.value0)))(function(){return lne(cne(PS.create)(Kee(a.value0)))(function(R){return ms({showPolls:n.showPolls,stage:new ew(R)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof MN){if(n.stage instanceof dg){var d=n.stage.value0.poll.id===a.value0.pollId;return d?ms({showPolls:n.showPolls,stage:Zy.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof NS){if(n.stage instanceof dg){var i=n.stage.value0.poll.id===a.value0.id;return i?ms(n):u(!0)}return u(!0)}return u(!0)};return a instanceof hg&&n.stage instanceof dg?ine(hg.create)(function(r){return{showPolls:n.showPolls,stage:new dg(r)}})(tne(e)(n.stage.value0)(a.value0)):t(!0)}}},dne=function(e){var n=function(u){return u instanceof us?B0(u.value0.id):G.value},a=function(u){return u instanceof os?B0(u.value0.id):G.value},t=function(u){return u instanceof rs?B0(u.value0.id):G.value},r=function(u){return u instanceof ts?B0(u.value0.conferenceId):G.value};return H0(Ky(function(u){return Yy(dUe(NS.create)(function(i){return i.poll}))(Xy((function(){var i=mUe(u.poll_id);return function(l){return i((function(s){return s.poll.id})(l))}})())(e.conference.polls))})(sne(e.pusher.dataChannel)("show-poll")))(function(){return H0(hUe(function(u){return new MN({pollId:u.poll_id})})(sne(e.pusher.dataChannel)("hide-poll")))(function(){return H0(Ky(function(u){return Yy(gg.create)(Xy((function(){var i=gUe(B0(u.conference_id));return function(l){return i(r(l))}})())(e.ctas))})(DUe(e.pusher.dataChannel)("show-event-cta")))(function(){return H0(Ky(function(u){return Yy(gg.create)(Xy((function(){var i=FN(B0(u.id));return function(l){return i(t(l))}})())(e.ctas))})(GN(e.pusher.dataChannel)("show-general-cta")))(function(){return H0(Ky(function(u){return Yy(gg.create)(Xy((function(){var i=FN(B0(u.id));return function(l){return i(a(l))}})())(e.ctas))})(GN(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return H0(Ky(function(u){return Yy(gg.create)(Xy((function(){var i=FN(B0(u.id));return function(l){return i(n(l))}})())(e.ctas))})(GN(e.pusher.dataChannel)("show-referral-cta")))(function(){return ms({stage:Zy.value,showPolls:!0})})})})})})})};var EUe=Vs(),LN=Pe(Ce),IUe=zr(on),TUe=Ft(Ce),SUe=Ht(ie),hne=Ul(),gne=zr(ie),CUe=jr(ie),OS=ga(ie)()(),FUe=fn(ln),Dne=FUe(da),GUe=HK(),PN=x(Bn),Rne=ae(nn),MUe=R_(l6),AUe=Al(jG),LUe=be(PE),PUe=df(Je)(Ot),NUe=be(rv),OUe=Os()(),yne=(function(){function e(){}return e.value=new e,e})(),ON=(function(){function e(){}return e.value=new e,e})(),wne=(function(){function e(){}return e.value=new e,e})(),UN=(function(){function e(){}return e.value=new e,e})(),NN=(function(){function e(){}return e.value=new e,e})(),US=function(e){return function(n){return EUe({id:"network-settings-modal",onDismiss:n(new Jn(NN.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:(function(){if(e.modalView instanceof yne)return LN("text-center")([Qa(e.confirmConferenceRegistration)(IUe("mb-4")(TUe("badge badge-soft-primary bg-primary-soft")([SUe("fe fe-check mr-1")(""),cn("You\u2019re registered!")]))),hne("my-4")({alt:Ol.value,height:"76",src:"/img/network/counselor.svg",width:"91"}),gne("")("Connect with colleges when you attend or register for their livestreams?"),CUe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),LN("mx-md-6 mt-4")([OS("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(vn)({onClick:un(function(a){return function(){return n(new ke(wne.value))(),n(new ke(UN.value))()}})})("Yes, always connect"),OS("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(vn)({onClick:un(function(a){return n(new ke(UN.value))})})("Only connect with "+e.school.name),OS("btn btn-link mt-3")(vn)({onClick:un(function(a){return n(new Jn(NN.value))})})("Close")])]);if(e.modalView instanceof ON)return LN("text-center")([hne("mt-4")({alt:Ol.value,height:"42",src:"/img/livestreams/network-settings-modal/connection-sent.png",width:"42"}),gne("")("Connection request sent!"),OS("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(vn)({onClick:un(function(a){return n(new Jn(NN.value))})})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 74, column 13 - line 119, column 12): "+[e.modalView.constructor.name])})()})}},kS=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof wne)return Dne(Ut(GUe({publishScope:pc.value,publishContext:vP.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return PN({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:ON.value})});if(n.value0 instanceof UN)return Dne(Ut(ux(e.school.id)(e.conference.id)))(function(){return PN({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:ON.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 31 - line 63, column 44): "+[n.value0.constructor.name])}if(n instanceof Jn)return PN(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 50, column 1 - line 50, column 55): "+[e.constructor.name,n.constructor.name])}},BS=function(e){return function(n){var a=ze(!1)(Rne(e.dismissedNetworkSettingsModalAt)(function(r){return new T(MUe(AUe(ME(void 0))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,LUe(r.publishScope)(pc.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return ze(!1)(Rne(e.profile)(function(r){return new T(PUe(NUe(!0))(t(r)))}))}},HS=function(e){return OUe(e)({modalView:yne.value})};var nw=(function(){function e(){}return e.value=new e,e})(),Dg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JS=(function(){function e(){}return e.value=new e,e})();var Ine=fn(ln),Ene=Ine(da),kN=nt(qe),kUe=Ine(Na),BN=x(ba),qS=x(Bn),Tne=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof nw&&t instanceof aw?Ene(kN(kUe(xr(a.delay))(function(){return BN(e(JS.value))})))(function(){return qS(n({delay:a.delay,throttleState:new Dg(t.value0)}))}):a.throttleState instanceof Dg&&t instanceof aw?qS(n({delay:a.delay,throttleState:new Dg(t.value0)})):a.throttleState instanceof Dg&&t instanceof JS?Ene(kN(BN(a.throttleState.value0)))(function(){return qS(n({delay:a.delay,throttleState:nw.value}))}):qS(n(a))}}}},Sne=function(e){return function(n){return kN(BN(e(new aw(n))))}},Cne=function(e){return{throttleState:nw.value,delay:e}};var $S=Pe(ie),WS=Pe(Ce),HUe=zr(ie),l_=oe(pn),JUe=uu(go),Fne=Pe(on),qUe=Vr(ie)()(),$Ue=$u(ie),WUe=Ft(ie),xUe=Of(on),jUe=B1(Ce)()(),Gne=Js(Ca),xS=ga(ie)()(),Nne=bi(Je)(Wt),Mne=Of(Ce),jS=Bs(ie),zUe=Bs(on),VUe=Bs(Ce),QUe=e0(Ce),KUe=Y_(Ce),Rg=X_(ie),YUe=Z_(Ce),zS=ge(Ye),XUe=ri(Ca),tw=fn(ln)(da),$N=nt(qe),ZUe=Ar(Xo),One=x(ba),J0=x(Bn),HN=B(st),e5e=be(UB),Ane=vi(Ca)(Je),n5e=tn(Dr),a5e=cD(Ca),t5e=M_(Wt),r5e=Mi(qe),o5e=RI(qe),VS=(function(){function e(){}return e.value=new e,e})(),Une=(function(){function e(){}return e.value=new e,e})(),kne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Bne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Lne=(function(){function e(){}return e.value=new e,e})(),Hne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jne=(function(){function e(){}return e.value=new e,e})(),WN=(function(){function e(){}return e.value=new e,e})(),Pne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qne=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return Aa;var t=(function(){if(n.stage instanceof VS)return Aa;if(n.stage instanceof Une)return $S("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching...");throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 179, column 24 - line 184, column 25): "+[n.stage.constructor.name])})(),r=WS("d-flex flex-nowrap align-items-baseline")([HUe("")("Polls"),$S("text-muted ml-3 small")("Polls will be shown to viewers "+(l_(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(d){return function(p){var R=function(E){return function(w){var I=(function(){if(d===0)return"0%";if($e)return l_(JUe(100*w|0)(d))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): ")})();return WS("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([$S("col-7 d-flex justify-content-end")(E),Fne("col-4")(Fne("progress")(qUe("progress-bar")({style:Yt({width:I})})(""))),WS("col-1")([$Ue("")(l_(w)),WUe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return xUe("t--poll-responses-"+l_(s.id))(jUe("py-0")({colSpan:6})(Ob(R)(s.options)(p.optionCounts)))}}},i=function(s){var d=ze(s.status)(Gne(s.poll.id)(n.statuses)),p=xS("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(R){return a(new kne(s.poll))})})("Launch poll");if(d instanceof xf)return p;if(d instanceof Uv)return Oe([xS("btn btn-success btn-sm px-4 mr-3")(vn)({disabled:!0})("Poll LIVE"),xS("btn btn-danger btn-sm px-4 t--close")(vn)({onClick:un(function(R){return a(new Bne(s.poll))})})("Close poll")]);if(d instanceof jf)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[d.constructor.name])},l=function(s){var d=Nne(s.poll.id)(n.expandedResponses),p=Gne(s.poll.id)(n.responses),R=Wn(0)(function(I){return I.answered})(p),E=Wn(0)(function(I){return I.seen})(p),w=Wn(0)(function(I){return I.skipped})(p);return Oe([Mne("t--poll t--poll-"+l_(s.poll.id))([jS("pt-3")((function(){var I=Gr(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""})()+s.poll.question),zUe("text-nowrap")(i(s)),jS("t--shown")(l_(E)),VUe("t--answers")([cn(l_(R)),xS("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+(function(){return d?"up":"down t--expand-responses"})()))(Qr((function(){return d?"Collapse responses":"Expand responses"})()))({onClick:un(function(I){return a(new Hne(s.poll.id))})})("")]),jS("t--skipped")(l_(w)),jS("t--pending")(l_((E-R|0)-w|0))]),Qa(d)(ja(p)(u(s.poll)(R)))])};return Oe([r,WS("t--polls position-relative")([ja(n.error)(function(s){return $S("alert alert-danger")(s)}),QUe("table table-sm mb-0")([KUe("")([Mne("")([Rg("")("Question"),Rg("")("Actions"),Rg("")("# saw poll"),Rg("")("# answered"),Rg("")("# skipped"),Rg("")("# not responded")])]),YUe("")(zS(XUe(function(s){return-(function(d){return d.poll.id})(s)|0})(e.conference.polls))(l))]),t])])}}},$ne=function(e){return function(n){var a=function(t){return tw($N(ZUe(t)(function(r){return One(Lne.value)})))(function(){return J0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:Une.value,error:G.value})})};return function(t){if(t instanceof kne)return a(HN(JN.create)(V2(t.value0)(Uv.value)));if(t instanceof Bne)return a(HN(JN.create)(V2(t.value0)(jf.value)));if(t instanceof JN){var r=zS(wu((function(){var u=e5e(Uv.value);return function(i){return u((function(l){return l.status})(i))}})())(t.value0))(function(u){return u.pollId});return J0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:Ane(zS(t.value0)(function(u){return new yn(u.pollId,u.status)})),expandedResponses:n5e(n.expandedResponses)(a5e(r)),stage:VS.value})}if(t instanceof Lne)return J0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:VS.value,error:new T("That didn't work for some reason, try again")});if(t instanceof Hne)return J0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:(function(){var u=Nne(t.value0)(n.expandedResponses);return u?t5e(t.value0)(n.expandedResponses):bu(t.value0)(n.expandedResponses)})()});if(t instanceof Jne)return tw(Sne(qN.create)(WN.value))(function(){return J0(n)});if(t instanceof WN)return tw($N(HN(Pne.create)(l$(e.conference.id))))(function(){return J0(n)});if(t instanceof Pne)return J0({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:Ane(zS(t.value0)(function(u){return new yn(u.pollId,u.responses)}))});if(t instanceof qN)return Tne(qN.create)(function(u){return{error:n.error,expandedResponses:n.expandedResponses,responses:n.responses,stage:n.stage,statuses:n.statuses,responseThrottle:u}})(n.responseThrottle)(t.value0);throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 196, column 22 - line 242, column 98): "+[t.constructor.name])}}},Wne=function(e){return tw(r5e(gn(Jne.value))(o5e(e.pusher.dataChannel)("poll-responses-changed")))(function(){return tw($N(One(WN.value)))(function(){return J0({statuses:lc,responses:lc,expandedResponses:[],responseThrottle:Cne(500),stage:VS.value,error:G.value})})})};var xne=Ul(),jne=Pe(Ce),zne=zr(ie),Vne=fu(ie),Qne=(function(){return xne("img-fluid mb-6")({alt:new HR("CollegeVine"),src:"/img/cv-logo-lilac-on-dark.svg",style:Yt({width:"5em"})})})(),QS=function(e){return jne(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},rw=function(e){return QS("")([zne("text-center")(e)])},xN=QS("t--splashscreen-intro")([Pe(on)("text-center mt-7")(Vne("")("The recording will load in a moment.")),Qne]),KS=(function(){return QS("px-4 px-md-6 t--splashscreen-intro")([xne("img-fluid")({alt:Ol.value,src:"/img/illustrations/livestreams/2022-02-intro.svg"})])})(),Kne=QS("t--splashscreen-complete")([jne("text-center mt-7")([Vne("")("The event is now over."),zne("")("Thank you for attending!"),Qc(ie)("")("A recording will be available to watch shortly.")]),Qne]);var YS=e=>e.play();var q0=ml(Xne(),1);Ct();var Zne=e=>{let[n,a]=vt.useState(),[t,r]=vt.useState(),u=vt.useRef();return u.current=e,Pr(()=>{if(!t)return q0.default.isSupported()?a(l5e(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},l5e=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new q0.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(q0.default.Events.ERROR,function(r,u){a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal&&(u.type===q0.default.ErrorTypes.MEDIA_ERROR?hls.recoverMediaError():(hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type)))}),hls.on(q0.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(q0.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(q0.default.Events.INIT_PTS_FOUND,(r,u)=>a.current.onInitialPts&&a.current.onInitialPts({initPTS:u.initPTS})),hls.attachMedia(t),hls):(a.current.onCriticalFail&&a.current.onCriticalFail("Couldn't find element #"+n),null)};var s5e=Ev();var eae=function(){return function(){return s5e(Zne)}};Ct();var lw=ml(iae(),1),lae=4,q5e=({trackColor:e,background:n})=>({props:a,children:t})=>vt.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${lae}px`,borderRadius:`${lae*2}px`,background:n||e})}),...t),$5e=({horizontal:e})=>({props:n,isDragged:a})=>vt.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),vt.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?au.SECONDARY:au.WHITE,stroke:au.SECONDARY}),vt.createElement("path",{stroke:a?au.WHITE:au.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),vt.createElement("path",{stroke:a?au.WHITE:au.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),cae=e=>vt.createElement("div",{"aria-label":e.ariaLabel},vt.createElement(lw.Range,{step:e.step,min:e.min,max:e.max,values:[e.value],onChange:(([n])=>e.onChange(n)),onFinalChange:(([n])=>e.onFinalChange&&e.onFinalChange(n)),renderTrack:q5e({trackColor:e.trackColor||au.GRAY_300,background:e.fillBefore?(0,lw.getTrackBackground)({values:[e.value],colors:[au.PRIMARY,au.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:$5e({horizontal:!0})}));var x5e=Ev(),sae={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return Ld}};var vae=function(e){return function(){return function(){return x5e(cae)}}};var z5e=Vr(on)()(),V5e=vae(sae)()(),Q5e=Nl(Eh),K5e=ga(on)()(),Y5e=Nl(qv),fae=Pe(Ce),X5e=Ft(ie),nC=nt(qe),KN=x(ba),gae=fn(ln),Z5e=kt(Jd),Yv=x(Bn),e9e=K_(qe),QN=kn(qe),n9e=B(ue),a9e=wv(kd),t9e=gae(Na),$0=gae(da),r9e=Cr(Bn),o9e=ae(Na),u9e=iv(Ml),i9e=Cr(St),YN=(function(){function e(){}return e.value=new e,e})(),XN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),e4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_ae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),pae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),mae=(function(){function e(){}return e.value=new e,e})(),l9e=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Dae=function(e){return function(n){if(e.videoState instanceof G)return Aa;if(e.videoState instanceof T){var a=z5e("")({style:Yt({minWidth:"6rem",width:"6rem"})})(V5e({value:(function(){return e.videoState.value0.muted?0:e.videoState.value0.volume})(),min:0,max:1,step:.05,onChange:Q5e(n)(function(i){return ke.create(XN.create(i))}),ariaLabel:"Volume slider"})),t=(function(){if(e.videoState.value0.muted)return"fe-volume-x";if($e)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): ")})(),r=K5e("btn large px-3 py-1 mr-3 text-white fe "+t)(Qr("Mute the video"))({onClick:Y5e(n)(new ke(YN.value))})(Aa),u=fae("d-flex align-items-center text-white px-3")([cn("LIVE"),X5e("text-danger x-large ml-2 mt-n1")("\u25CF")]);return fae("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+(function(){return e.visible?"":"hidden"})())([Qa(e.config.liveIndicator)(u),Qa(e.config.mute)(r),Qa(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 95, column 1 - line 95, column 50): "+[e.constructor.name,n.constructor.name])}},Rae=function(e){return ke.create(e4.create(e))},dae=function(e){return nC(KN(new Jn(new l9e(function(n){return function(){return e(n)(),new ke(new e4(n))}}))))},aC=(function(){return new ke(new ZN(!0))})(),yae=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:Z5e}},hae=2e3,wae=function(e){return function(n){if(n instanceof Jn)return Yv(e);if(n instanceof ke){var a=e9e(QN(function(){var i=Jl();return n9e(function(l){return ke.create(pae.create(l))})(a9e(hae)(i))})),t=t9e(xr(hae))(function(){return KN(new ke(mae.value))}),r=function(u){if(n.value0 instanceof YN)return Yv(e);var i=function(l){if(n.value0 instanceof XN)return Yv(e);if(n.value0 instanceof e4)return $0(nC(QN(function(){var d=OA(n.value0.value0)(),p=PA(n.value0.value0)();return new ke(new _ae({muted:d,volume:p}))})))(function(){return Yv(e)});if(n.value0 instanceof _ae)return Yv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof ZN)return $0(r9e(n.value0.value0)(a))(function(){return $0(nC(t))(function(){return Yv({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof pae)return Yv({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof mae)return $0(nC(o9e(QN(Jl))(function(s){var d=u9e(s)(e.visibilityExpiration);return d?KN(new ke(new ZN(!1))):t})))(function(){return Yv(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof XN&&e.videoState instanceof T?$0(a)(function(){return $0(dae(function(l){return function(){return i9e(n.value0.value0>0)(em(!1)(l))(),NA(n.value0.value0)(l)()}}))(function(){return Yv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof YN&&e.videoState instanceof T?$0(a)(function(){return $0(dae(em(!e.videoState.value0.muted)))(function(){return Yv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):r(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[e.constructor.name,n.constructor.name])}},bae=function(e){if(e instanceof T)return!1;if(e instanceof G)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var Eae=e=>n=>a=>()=>e.then(a,n),Iae=e=>e instanceof Error,Tae=e=>e===null?"null":typeof e>"u"?"undefined":e.toString();var v9e=x(Zl(Or)),f9e=Ip(Or),_9e=hn(En),Sae=La(dD(DD)(Or)),p9e=bf(Or),m9e=B(Cd(Es)),d9e=Ad(Or),h9e=lb(ca),g9e=Gt(j6);var D9e=function(e){var n=function(a){if(Iae(a))return v9e(a);if($e)return f9e(new Ep(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return wr(function(a){return Vi("Promise failed: "+Tae(e))})(_9e)(om(Sae(n(e))(Sae(p9e("Error")(e))(m9e(Vi)(d9e(e))))))},tC=function(e){return $_(function(n){return h9e(g9e)(Eae(e)(function(a){return n(Me.create(D9e(a)))()})(function(a){return n(Le.create(a))()}))})};var y9e=ae(nn),w9e=Pe(on),cw=ae(io),n4=Wi(St)(lu),Hm=Nl(qv),Cae=Yd(ie)()(),b9e=eae()(),E9e=x(St),Fae=Nl(Eh),Gae=Vr(on)()(),I9e=ga(Ce)()(),T9e=Ht(ie),S9e=Pe(Ce),Oae=fn(ln),C9e=Yf(qe)(),F9e=xi(Je)(Ot),G9e=be($r(Wt)),yg=Oae(Na),M9e=Zs(ba),A9e=wo(jd),Pu=x(ba),Uae=kn(qe),Mae=Ar(Xo),kae=Hg(Na),pu=x(Bn),Lu=Oae(da),vl=nt(qe),Aae=B(st),Lae=K_(qe),Bae=B(ca),L9e=$t(Po(st)),P9e=B(ue),N9e=ge(ue),Pae=tn(u6),Hae=(function(){function e(){}return e.value=new e,e})(),Jae=(function(){function e(){}return e.value=new e,e})(),vw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qae=(function(){function e(){}return e.value=new e,e})(),wg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$ae=(function(){function e(){}return e.value=new e,e})(),Wae=(function(){function e(){}return e.value=new e,e})(),Nae=(function(){function e(){}return e.value=new e,e})(),a4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),t4=(function(){function e(){}return e.value=new e,e})(),oC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),uC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),rC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),xae=(function(){function e(){}return e.value=new e,e})(),r4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),o4=(function(){function e(){}return e.value=new e,e})(),jae=(function(){function e(){}return e.value=new e,e})(),zae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jm=(function(){function e(){}return e.value=new e,e})(),Xv=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),iC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),l4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),c4=function(e){var n=e.Monad0(),a=ae(n.Bind1()),t=kn(e),r=x(n.Applicative0());return function(u){return function(i){return function(l){return a(t(GE(u.videoId)))(function(s){return Wn(r(i.whenNotFound))(l)(y9e(s)(Kk))})}}}},Vae=c4(Mo),u4=c4(qe),Qae=function(e){var n=c4(e);return function(a){return n(a)({whenNotFound:void 0})}},O9e=Qae(Mo),U9e=Qae(qe),lC=function(e){return function(n){return function(a){var t=(function(){var I=w9e("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof qae)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof $ae)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof vw)return I(e.introScreen);if(n.stage instanceof wg)return Aa;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 242, column 20 - line 253, column 16): "+[n.stage.constructor.name])})(),r=(function(){return n.stage instanceof vw?n.stage.value0.reset:!1})(),u=un(function(I){return cw(FE(I))(n4(function(L){return a(new ke(new l4({time:L})))}))}),i=un(function(I){return cw(FE(I))(n4(function(L){return a(new ke(new iC({playing:!0,time:L})))}))}),l=function(I){return a(Jn.create(I))},s=un(function(I){return cw(FE(I))(n4(function(L){return l(new r4(L))}))}),d=Hm(l)(xae.value),p=Oe([Cae("w-100 t--real-video")({id:n.videoId,controls:yr(n.customControls),onVolumeChange:d,onTimeUpdate:u,onPlay:i,onPause:s})(""),Qa(!r)(b9e({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(Wae.value),onError:function(I,L){return void 0},onCriticalFail:Fae(l)(function(I){var L=I==="networkError";return L?t4.value:new oC("HLS player crashed")}),onReady:l(new uC({autoPlay:e.autoPlay})),onInitialPts:Fae(l)(function(I){return new zae(I.initPTS)})}))]),R=(function(){return n.stage instanceof wg&&n.stage.value0.unmuteOverlay?Gae("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:Yt({pointerEvents:"none"})})(I9e("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(vn)({onClick:Hm(l)(jae.value),style:Yt({pointerEvents:"all"})})([cn("click for sound"),T9e("fe fe-volume-2 ml-2")("")])):Aa})(),E=function(I){return Gae("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:Hm(l)(new Xv(aC)),onMouseDown:Hm(l)(new Xv(aC)),onTouchStart:Hm(l)(new Xv(aC))})(Dae(I)(function(L){return l(Xv.create(L))}))},w=Cae("w-100 t--real-video")({id:n.videoId,controls:yr(n.customControls),playsInline:!0,onVolumeChange:d,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:Hm(l)(new uC({autoPlay:e.autoPlay})),onError:Hm(l)(t4.value),src:(function(){return r?"":e.watchUrl})()})("");return S9e("position-relative w-100")([(function(){if(n.support instanceof Hae)return p;if(n.support instanceof Jae)return w;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 163, column 7 - line 165, column 40): "+[n.support.constructor.name])})(),ja(n.customControls)(E),Qa(n.allowSound)(R),t])}}},k9e=function(e){var n=kn(e.MonadEffect0());return function(a){return n(function(){return O9e(a)(em(!1))(),o4.value})}},B9e=k9e(vB),i4=function(e){return C9e("Livestream: Error")({livestream_error_message:e})},Kae=function(e){return Vae(e)({whenNotFound:!1})(LA)},H9e=function(e){return kn(e)(function(){var a=cw(cw(Ai)(JA))(HA)();return F9e(function(t){return G9e(K1(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},Yae=H9e(qe),J9e=function(e){var n=function(t){return yg(M9e(e.allowSound)(A9e(Vi("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return yg(tC(YS(t)))(function(){return Pu(new rC({unmuteOverlay:!1}))})})},a=function(t){return yg(Uae(em(!0)(t)))(function(){return yg(tC(YS(t)))(function(){return Pu(new rC({unmuteOverlay:!0}))})})};return u4(e)({whenNotFound:new oC("