var Purs_EntryPoints_Livestream_Livestream=(()=>{var Aoe=Object.create;var ab=Object.defineProperty;var Loe=Object.getOwnPropertyDescriptor;var Noe=Object.getOwnPropertyNames;var Poe=Object.getPrototypeOf,Ooe=Object.prototype.hasOwnProperty;var Uoe=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ue=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),t8=(e,n)=>{for(var a in n)ab(e,a,{get:n[a],enumerable:!0})},r8=(e,n,a,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Noe(n))!Ooe.call(e,r)&&r!==a&&ab(e,r,{get:()=>n[r],enumerable:!(t=Loe(n,r))||t.enumerable});return e};var fl=(e,n,a)=>(a=e!=null?Aoe(Poe(e)):{},r8(n||!e||!e.__esModule?ab(a,"default",{value:e,enumerable:!0}):a,e)),tb=e=>r8(ab({},"__esModule",{value:!0}),e);var Io={};t8(Io,{Children:()=>Np,Component:()=>Pp,Fragment:()=>aM,PureComponent:()=>$se,Suspense:()=>xse,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Jse,cloneElement:()=>UD,createContext:()=>nM,createElement:()=>Zt,createRef:()=>I1,default:()=>ct,forwardRef:()=>tc,isValidElement:()=>tM,lazy:()=>qse,memo:()=>Wse,useCallback:()=>kD,useContext:()=>jse,useEffect:()=>Gr,useImperativeHandle:()=>If,useLayoutEffect:()=>BD,useMemo:()=>HD,useReducer:()=>zse,useRef:()=>zt,useState:()=>Ss,version:()=>Vse});var ct,Jse,Np,UD,Pp,nM,Zt,I1,tc,aM,tM,qse,Wse,$se,xse,kD,jse,Gr,If,BD,HD,zse,zt,Ss,Vse,Ct=Uoe(()=>{ct=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Jse,Children:Np,cloneElement:UD,Component:Pp,createContext:nM,createElement:Zt,createRef:I1,forwardRef:tc,Fragment:aM,isValidElement:tM,lazy:qse,memo:Wse,PureComponent:$se,Suspense:xse,useCallback:kD,useContext:jse,useEffect:Gr,useImperativeHandle:If,useLayoutEffect:BD,useMemo:HD,useReducer:zse,useRef:zt,useState:Ss,version:Vse}=window.React});var oM=Ue((lQe,cU)=>{"use strict";var lU=Object.getOwnPropertySymbols,dve=Object.prototype.hasOwnProperty,hve=Object.prototype.propertyIsEnumerable;function gve(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Dve(){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}}cU.exports=Dve()?Object.assign:function(e,n){for(var a,t=gve(e),r,u=1;u{"use strict";var iM=oM(),$d=60103,fU=60106;ur.Fragment=60107;ur.StrictMode=60108;ur.Profiler=60114;var _U=60109,pU=60110,mU=60112;ur.Suspense=60113;var dU=60115,hU=60116;typeof Symbol=="function"&&Symbol.for&&($c=Symbol.for,$d=$c("react.element"),fU=$c("react.portal"),ur.Fragment=$c("react.fragment"),ur.StrictMode=$c("react.strict_mode"),ur.Profiler=$c("react.profiler"),_U=$c("react.provider"),pU=$c("react.context"),mU=$c("react.forward_ref"),ur.Suspense=$c("react.suspense"),dU=$c("react.memo"),hU=$c("react.lazy"));var $c,sU=typeof Symbol=="function"&&Symbol.iterator;function Rve(e){return e===null||typeof e!="object"?null:(e=sU&&e[sU]||e["@@iterator"],typeof e=="function"?e:null)}function WD(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";TU.exports=IU()});var KU=Ue(jd=>{"use strict";var Cs=oM(),Sf=SU();function To(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a$D;$D++)ri[$D]=$D+1;var ri,$D;ri[15]=0;var Sve=/^[: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]*$/,CU=Object.prototype.hasOwnProperty,FU={},GU={};function $U(e){return CU.call(GU,e)?!0:CU.call(FU,e)?!1:Sve.test(e)?GU[e]=!0:(FU[e]=!0,!1)}function Cve(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 Fve(e,n,a,t){if(n===null||typeof n>"u"||Cve(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 al(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 oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oi[e]=new al(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];oi[n]=new al(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oi[e]=new al(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oi[e]=new al(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){oi[e]=new al(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oi[e]=new al(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oi[e]=new al(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oi[e]=new al(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oi[e]=new al(e,5,!1,e.toLowerCase(),null,!1,!1)});var bM=/[\-:]([a-z])/g;function EM(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(bM,EM);oi[n]=new al(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(bM,EM);oi[n]=new al(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(bM,EM);oi[n]=new al(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oi[e]=new al(e,1,!1,e.toLowerCase(),null,!1,!1)});oi.xlinkHref=new al("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oi[e]=new al(e,1,!1,e.toLowerCase(),null,!0,!0)});var Gve=/["'&<>]/;function Up(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Gve.exec(e);if(n){var a="",t,r=0;for(t=n.index;tP1))throw Error(To(301));if(e===dv)if(N1=!0,e={action:a,next:null},J_===null&&(J_=new Map),a=J_.get(n),a===void 0)J_.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function fM(){}var Bp=null,Pve={readContext:function(e){var n=Bp.threadID;return VD(e,n),e[n]},useContext:function(e){kp();var n=Bp.threadID;return VD(e,n),e[n]},useMemo:LU,useReducer:AU,useRef:function(e){dv=kp(),ao=IM();var n=ao.memoizedState;return n===null?(e={current:e},ao.memoizedState=e):n},useState:function(e){return AU(zU,e)},useLayoutEffect:function(){},useCallback:function(e,n){return LU(function(){return e},n)},useImperativeHandle:fM,useEffect:fM,useDebugValue:fM,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)}},NU={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function PU(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 VU={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},Ove=Cs({menuitem:!0},VU),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},Uve=["Webkit","ms","Moz","O"];Object.keys(zD).forEach(function(e){Uve.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),zD[n]=zD[e]})});var kve=/([A-Z])/g,Bve=/^ms-/,H_=Sf.Children.toArray,_M=Ive.ReactCurrentDispatcher,Hve={listing:!0,pre:!0,textarea:!0},Jve=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,OU={},pM={};function qve(e){if(e==null)return e;var n="";return Sf.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var Wve=Object.prototype.hasOwnProperty,$ve={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function UU(e,n){if(e===void 0)throw Error(To(152,jD(n)||"Component"))}function xve(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,h=Tve(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,h,E),typeof l.getDerivedStateFromProps=="function"){var w=l.getDerivedStateFromProps.call(null,i.props,s.state);w!=null&&(s.state=Cs({},s.state,w))}}else if(dv={},s=l(i.props,h,E),s=xU(l,i.props,s,h),s==null||s.render==null){e=s,UU(e,l);return}if(s.props=i.props,s.context=h,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(To(304));var s=new Uint16Array(l);for(s.set(i),ri=s,ri[0]=u+1,i=u;i=s.children.length){var h=s.footer;if(h!==""&&(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===A1)this.popProvider(s.type);else if(s.type===L1){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var R=s.fallbackFrame;if(!R)throw Error(To(303));this.stack.push(R),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=h}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(To(294)):I}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=w}}return u[0]}finally{_M.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=xve(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!Sf.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===mM?To(257):To(258,r.toString()));return a=H_(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 qU:case JU:case dM:case hM:case RM:case M1:return a=H_(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case L1:throw Error(To(294));case HU:throw Error(To(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case DM:dv={};var i=u.render(a.props,a.ref);return i=xU(u.render,a.props,i,a.ref),i=H_(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case yM:return a=[Sf.createElement(u.type,Cs({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case A1:return u=H_(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case gM:u=a.type,i=a.props;var l=this.threadID;return VD(u,l),u=H_(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case BU:throw Error(To(338));case wM:return u=a.type,i=u._init,u=i(u._payload),a=[Sf.createElement(u,Cs({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(To(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===NU.html&&PU(u),!OU.hasOwnProperty(u)){if(!Jve.test(u))throw Error(To(65,u));OU[u]=!0}var i=a.props;if(u==="input")i=Cs({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(To(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(To(93));s=s[0]}l=""+s}l==null&&(l="")}i=Cs({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Cs({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var h=qve(i.children);if(s!=null){var p=i.value!=null?i.value+"":h;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=[],Hve.hasOwnProperty(u)&&s.charAt(0)===` `&&(le+=` `),le+=s):i=H_(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?PU(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})();jd.renderToNodeStream=function(){throw Error(To(207))};jd.renderToStaticMarkup=function(e,n){e=new QU(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};jd.renderToStaticNodeStream=function(){throw Error(To(208))};jd.renderToString=function(e,n){e=new QU(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};jd.version="17.0.2"});var XU=Ue((fQe,YU)=>{"use strict";YU.exports=KU()});var OJ=Ue((vI,A2)=>{(function(n,a){typeof vI=="object"&&typeof A2=="object"?A2.exports=a():typeof define=="function"&&define.amd?define([],a):typeof vI=="object"?vI.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,Q){U.__proto__=Q}||function(U,Q){for(var V in Q)Q.hasOwnProperty(V)&&(U[V]=Q[V])},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(Q>>>12&63),L+=this._encodeByte(Q>>>6&63),L+=this._encodeByte(Q>>>0&63)}var V=I.length-U;if(V>0){var Q=I[U]<<16|(V===2?I[U+1]<<8:0);L+=this._encodeByte(Q>>>18&63),L+=this._encodeByte(Q>>>12&63),V===2?L+=this._encodeByte(Q>>>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,Q=new Uint8Array(this.maxDecodedLength(U)),V=0,te=0,le=0,ne=0,Z=0,ee=0,me=0;te>>4,Q[V++]=Z<<4|ee>>>2,Q[V++]=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 h=(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=h;var p=new h;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 h=new Uint8Array(i(s)),p=0,R=0;R>6,h[p++]=128|E&63):E<55296?(h[p++]=224|E>>12,h[p++]=128|E>>6&63,h[p++]=128|E&63):(R++,E=(E&1023)<<10,E|=s.charCodeAt(R)&1023,E+=65536,h[p++]=240|E>>18,h[p++]=128|E>>12&63,h[p++]=128|E>>6&63,h[p++]=128|E&63)}return h}n.encode=u;function i(s){for(var h=0,p=0;p=s.length-1)throw new Error(t);p++,h+=4}else throw new Error(t)}return h}n.encodedLength=i;function l(s){for(var h=[],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,h.push(String.fromCharCode(55296|R>>10)),R=56320|R&1023}}h.push(String.fromCharCode(R))}return h.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 d(m,D){this.lastId=0,this.prefix=m,this.name=D}return d.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}},d.prototype.remove=function(m){delete this[m.number]},d})(),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 d(m){this.options=m,this.receivers=m.receivers||r,this.loading={}}return d.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(In){if(A.receivers.remove(Ge),A.loading[m]){var xa=A.loading[m];delete A.loading[m];for(var sr=function(ju){ju||Y.cleanup()},Zr=0;Zr>>6)+E(128|m&63):E(224|m>>>12&15)+E(128|m>>>6&63)+E(128|m&63)},V=function(d){return d.replace(/[^\x00-\x7F]/g,Q)},te=function(d){var m=[0,2,1][d.length%3],D=d.charCodeAt(0)<<16|(d.length>1?d.charCodeAt(1):0)<<8|(d.length>2?d.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(d){return d.replace(/[\s\S]{1,3}/g,te)},ne=(function(){function d(m,D,M,A){var Y=this;this.clear=D,this.timer=m(function(){Y.timer&&(Y.timer=A(Y.timer))},M)}return d.prototype.isRunning=function(){return this.timer!==null},d.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},d})(),Z=ne,ee=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})();function me(d){window.clearTimeout(d)}function qe(d){window.clearInterval(d)}var ze=(function(d){ee(m,d);function m(D,M){return d.call(this,setTimeout,me,D,function(A){return M(),null})||this}return m})(Z),mn=(function(d){ee(m,d);function m(D,M){return d.call(this,setInterval,qe,D,function(A){return M(),A})||this}return m})(Z),Jn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(d){return new ze(0,d)},method:function(d){for(var m=[],D=1;D0)for(var A=0;A=1002&&d.code<=1004?"backoff":null:d.code===4e3?"tls_only":d.code<4100?"refused":d.code<4200?"backoff":d.code<4300?"retry":"refused"},getCloseError:function(d){return d.code!==1e3&&d.code!==1001?{type:"PusherError",data:{code:d.code,message:d.reason||d.message}}:null}},pe=Vv,fs=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),_s=(function(d){fs(m,d);function m(D,M){var A=d.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),yn.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(In){D.emit("error",{type:"MessageParseError",error:In,data:Y.data})}if(Ge!==void 0){switch(yn.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(){ha(M,function(Y,Ge){D.transport.unbind(Ge,Y)})};ha(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})(Wa),Qv=_s,ps=(function(){function d(m,D){this.transport=m,this.callback=D,this.bindListeners()}return d.prototype.close=function(){this.unbindListeners(),this.transport.close()},d.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 Qv(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)},d.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},d.prototype.finish=function(m,D){this.callback(Gn({transport:this.transport,action:m},D))},d})(),Tc=ps,yg=(function(){function d(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 d.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},d.prototype.authorize=function(m,D){d.authorizers=d.authorizers||Nt.getAuthorizers(),d.authorizers[this.type].call(this,Nt,m,D)},d})(),q0=yg,xm=(function(){function d(m,D){this.timeline=m,this.options=D||{}}return d.prototype.send=function(m,D){this.timeline.isEmpty()||this.timeline.send(Nt.TimelineTransport.getAgent(this,m),D)},d})(),jm=xm,Sc=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),ki=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Kv=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),zm=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),wg=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Vm=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),bw=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),o_=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),xC=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),jC=(function(d){xC(m,d);function m(D,M){var A=d.call(this,function(Y,Ge){yn.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=Va.buildLogSuffix("triggeringClientEvents");yn.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?(yn.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})(Wa),Ew=jC,zC=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),VC=(function(d){zC(m,d);function m(){return d!==null&&d.apply(this,arguments)||this}return m.prototype.authorize=function(D,M){var A=Cc.createAuthorizer(this,this.pusher.config);return A.authorize(D,M)},m})(Ew),bg=VC,Iw=(function(){function d(){this.reset()}return d.prototype.get=function(m){return Object.prototype.hasOwnProperty.call(this.members,m)?{id:m,info:this.members[m]}:null},d.prototype.each=function(m){var D=this;ha(this.members,function(M,A){m(D.get(A))})},d.prototype.setMyID=function(m){this.myID=m},d.prototype.onSubscription=function(m){this.members=m.presence.hash,this.count=m.presence.count,this.me=this.get(this.myID)},d.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)},d.prototype.removeMember=function(m){var D=this.get(m.user_id);return D&&(delete this.members[m.user_id],this.count--),D},d.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},d})(),QC=Iw,KC=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),Tw=(function(d){KC(m,d);function m(D,M){var A=d.call(this,D,M)||this;return A.members=new QC,A}return m.prototype.authorize=function(D,M){var A=this;d.prototype.authorize.call(this,D,function(Y,Ge){if(!Y){if(Ge=Ge,Ge.channel_data===void 0){var In=Va.buildLogSuffix("authenticationEndpoint");yn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+In)),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(),d.prototype.disconnect.call(this)},m})(bg),YC=Tw,Sw=a(1),Eg=a(0),XC=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),ZC=(function(d){XC(m,d);function m(D,M,A){var Y=d.call(this,D,M)||this;return Y.key=null,Y.nacl=A,Y}return m.prototype.authorize=function(D,M){var A=this;d.prototype.authorize.call(this,D,function(Y,Ge){if(Y){M(!0,Ge);return}var In=Ge.shared_secret;if(!In){var xa="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,xa);return}A.key=Object(Eg.decode)(In),delete Ge.shared_secret,M(!1,Ge)})},m.prototype.trigger=function(D,M){throw new Vm("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){d.prototype.handleEvent.call(this,D);return}this.handleEncryptedEvent(M,A)},m.prototype.handleEncryptedEvent=function(D,M){var A=this;if(!this.key){yn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){yn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Y=Object(Eg.decode)(M.ciphertext);if(Y.length0&&this.emit("connecting_in",Math.round(D/1e3)),this.retryTimer=new ze(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 ze(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 ze(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 ze(this.activityTimeout,function(){D.sendActivityCheck()}))},m.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},m.prototype.buildConnectionCallbacks=function(D){var M=this;return Gn({},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 Gn({},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),yn.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})(Wa),Cw=aF,tF=(function(){function d(){this.channels={}}return d.prototype.add=function(m,D){return this.channels[m]||(this.channels[m]=Fw(m,D)),this.channels[m]},d.prototype.all=function(){return Dt(this.channels)},d.prototype.find=function(m){return this.channels[m]},d.prototype.remove=function(m){var D=this.channels[m];return delete this.channels[m],D},d.prototype.disconnect=function(){ha(this.channels,function(m){m.disconnect()})},d})(),rF=tF;function Fw(d,m){if(d.indexOf("private-encrypted-")===0){if(m.config.nacl)return Cc.createEncryptedChannel(d,m,m.config.nacl);var D="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=Va.buildLogSuffix("encryptedChannelSupport");throw new Vm(D+". "+M)}else return d.indexOf("private-")===0?Cc.createPrivateChannel(d,m):d.indexOf("presence-")===0?Cc.createPresenceChannel(d,m):Cc.createChannel(d,m)}var oF={createChannels:function(){return new rF},createConnectionManager:function(d,m){return new Cw(d,m)},createChannel:function(d,m){return new Ew(d,m)},createPrivateChannel:function(d,m){return new bg(d,m)},createPresenceChannel:function(d,m){return new YC(d,m)},createEncryptedChannel:function(d,m,D){return new eF(d,m,D)},createTimelineSender:function(d,m){return new jm(d,m)},createAuthorizer:function(d,m){return m.authorizer?m.authorizer(d,m):new q0(d,m)},createHandshake:function(d,m){return new Tc(d,m)},createAssistantToTheTransportManager:function(d,m,D){return new zs(d,m,D)}},Cc=oF,uF=(function(){function d(m){this.options=m||{},this.livesLeft=this.options.lives||1/0}return d.prototype.getAssistant=function(m){return Cc.createAssistantToTheTransportManager(this,m,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},d.prototype.isAlive=function(){return this.livesLeft>0},d.prototype.reportDeath=function(){this.livesLeft-=1},d})(),Gw=uF,iF=(function(){function d(m,D){this.strategies=m,this.loop=!!D.loop,this.failFast=!!D.failFast,this.timeout=D.timeout,this.timeoutLimit=D.timeoutLimit}return d.prototype.isSupported=function(){return xn(this.strategies,Fn.method("isSupported"))},d.prototype.connect=function(m,D){var M=this,A=this.strategies,Y=0,Ge=this.timeout,In=null,xa=function(sr,Zr){Zr?D(null,Zr):(Y=Y+1,M.loop&&(Y=Y%A.length),Y0&&(Y=new ze(M.timeout,function(){Ge.abort(),A(!0)})),Ge=m.connect(D,function(In,xa){In&&Y&&Y.isRunning()&&!M.failFast||(Y&&Y.ensureAborted(),A(In,xa))}),{abort:function(){Y&&Y.ensureAborted(),Ge.abort()},forceMinPriority:function(In){Ge.forceMinPriority(In)}}},d})(),Yv=iF,lF=(function(){function d(m){this.strategies=m}return d.prototype.isSupported=function(){return xn(this.strategies,Fn.method("isSupported"))},d.prototype.connect=function(m,D){return cF(this.strategies,m,function(M,A){return function(Y,Ge){if(A[M].error=Y,Y){Mw(A)&&D(!0);return}vt(A,function(In){In.forceMinPriority(Ge.transport.priority)}),D(null,Ge)}})},d})(),Ig=lF;function cF(d,m,D){var M=Ha(d,function(A,Y,Ge,In){return A.connect(m,D(Y,In))});return{abort:function(){vt(M,Tg)},forceMinPriority:function(A){vt(M,function(Y){Y.forceMinPriority(A)})}}}function Mw(d){return Nn(d,function(m){return!!m.error})}function Tg(d){!d.error&&!d.aborted&&(d.abort(),d.aborted=!0)}var sF=(function(){function d(m,D,M){this.strategy=m,this.transports=D,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.usingTLS,A=Aw(M),Y=[this.strategy];if(A&&A.timestamp+this.ttl>=Fn.now()){var Ge=this.transports[A.transport];Ge&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Y.push(new Yv([Ge],{timeout:A.latency*2+1e3,failFast:!0})))}var In=Fn.now(),xa=Y.pop().connect(m,function sr(Zr,ju){Zr?(Lw(M),Y.length>0?(In=Fn.now(),xa=Y.pop().connect(m,sr)):D(Zr)):(fF(M,ju.transport.name,Fn.now()-In),D(null,ju))});return{abort:function(){xa.abort()},forceMinPriority:function(sr){m=sr,xa&&xa.forceMinPriority(sr)}}},d})(),vF=sF;function Sg(d){return"pusherTransport"+(d?"TLS":"NonTLS")}function Aw(d){var m=Nt.getLocalStorage();if(m)try{var D=m[Sg(d)];if(D)return JSON.parse(D)}catch{Lw(d)}return null}function fF(d,m,D){var M=Nt.getLocalStorage();if(M)try{M[Sg(d)]=ft({timestamp:Fn.now(),transport:m,latency:D})}catch{}}function Lw(d){var m=Nt.getLocalStorage();if(m)try{delete m[Sg(d)]}catch{}}var _F=(function(){function d(m,D){var M=D.delay;this.strategy=m,this.options={delay:M}}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.strategy,A,Y=new ze(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)}}},d})(),Qm=_F,Nw=(function(){function d(m,D,M){this.test=m,this.trueBranch=D,this.falseBranch=M}return d.prototype.isSupported=function(){var m=this.test()?this.trueBranch:this.falseBranch;return m.isSupported()},d.prototype.connect=function(m,D){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(m,D)},d})(),W0=Nw,pF=(function(){function d(m){this.strategy=m}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.strategy.connect(m,function(A,Y){Y&&M.abort(),D(A,Y)});return M},d})(),mF=pF;function ms(d){return function(){return d.isSupported()}}var Pw=function(d,m,D){var M={};function A($o,Zw,eb,$F,nb){var b=D(d,$o,Zw,eb,$F,nb);return M[$o]=b,b}var Y=Object.assign({},m,{hostNonTLS:d.wsHost+":"+d.wsPort,hostTLS:d.wsHost+":"+d.wssPort,httpPath:d.wsPath}),Ge=Object.assign({},Y,{useTLS:!0}),In=Object.assign({},m,{hostNonTLS:d.httpHost+":"+d.httpPort,hostTLS:d.httpHost+":"+d.httpsPort,httpPath:d.httpPath}),xa={loop:!0,timeout:15e3,timeoutLimit:6e4},sr=new Gw({lives:2,minPingDelay:1e4,maxPingDelay:d.activityTimeout}),Zr=new Gw({lives:2,minPingDelay:1e4,maxPingDelay:d.activityTimeout}),ju=A("ws","ws",3,Y,sr),Wl=A("wss","ws",3,Ge,sr),HF=A("sockjs","sockjs",1,In),jw=A("xhr_streaming","xhr_streaming",1,In,Zr),zw=A("xdr_streaming","xdr_streaming",1,In,Zr),Vw=A("xhr_polling","xhr_polling",1,In),JF=A("xdr_polling","xdr_polling",1,In),Qw=new Yv([ju],xa),qF=new Yv([Wl],xa),WF=new Yv([HF],xa),Kw=new Yv([new W0(ms(jw),jw,zw)],xa),Yw=new Yv([new W0(ms(Vw),Vw,JF)],xa),Xw=new Yv([new W0(ms(Kw),new Ig([Kw,new Qm(Yw,{delay:4e3})]),Yw)],xa),Lg=new W0(ms(Xw),Xw,WF),Ng;return m.useTLS?Ng=new Ig([Qw,new Qm(Lg,{delay:2e3})]):Ng=new Ig([Qw,new Qm(qF,{delay:2e3}),new Qm(Lg,{delay:5e3})]),new vF(new mF(new W0(ms(ju),Ng,Lg)),M,{ttl:18e5,timeline:m.timeline,useTLS:m.useTLS})},dF=Pw,hF=(function(){var d=this;d.timeline.info(d.buildTimelineMessage({transport:d.name+(d.options.useTLS?"s":"")})),d.hooks.isInitialized()?d.changeState("initialized"):d.hooks.file?(d.changeState("initializing"),p.load(d.hooks.file,{useTLS:d.options.useTLS},function(m,D){d.hooks.isInitialized()?(d.changeState("initialized"),D(!0)):(m&&d.onError(m),d.onClose(),D(!1))})):d.onClose()}),Ow={getRequest:function(d){var m=new window.XDomainRequest;return m.ontimeout=function(){d.emit("error",new Kv),d.close()},m.onerror=function(D){d.emit("error",D),d.close()},m.onprogress=function(){m.responseText&&m.responseText.length>0&&d.onChunk(200,m.responseText)},m.onload=function(){m.responseText&&m.responseText.length>0&&d.onChunk(200,m.responseText),d.emit("finished",200),d.close()},m},abortRequest:function(d){d.ontimeout=d.onerror=d.onprogress=d.onload=null,d.abort()}},gF=Ow,Uw=(function(){var d=function(m,D){return d=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])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),DF=256*1024,kw=(function(d){Uw(m,d);function m(D,M,A){var Y=d.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>DF},m})(Wa),Bw=kw,$0;(function(d){d[d.CONNECTING=0]="CONNECTING",d[d.OPEN=1]="OPEN",d[d.CLOSED=3]="CLOSED"})($0||($0={}));var Fc=$0,RF=1,Hw=(function(){function d(m,D){this.hooks=m,this.session=sl(1e3)+"/"+ds(8),this.location=yF(D),this.readyState=Fc.CONNECTING,this.openStream()}return d.prototype.send=function(m){return this.sendRaw(JSON.stringify([m]))},d.prototype.ping=function(){this.hooks.sendHeartbeat(this)},d.prototype.close=function(m,D){this.onClose(m,D,!0)},d.prototype.sendRaw=function(m){if(this.readyState===Fc.OPEN)try{return Nt.createSocketRequest("POST",Cg(wF(this.location,this.session))).start(m),!0}catch{return!1}else return!1},d.prototype.reconnect=function(){this.closeStream(),this.openStream()},d.prototype.onClose=function(m,D,M){this.closeStream(),this.readyState=Fc.CLOSED,this.onclose&&this.onclose({code:m,reason:D,wasClean:M})},d.prototype.onChunk=function(m){if(m.status===200){this.readyState===Fc.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&&d.onChunk(D.status,D.responseText);break;case 4:D.responseText&&D.responseText.length>0&&d.onChunk(D.status,D.responseText),d.emit("finished",D.status),d.close();break}},D},abortRequest:function(d){d.onreadystatechange=null,d.abort()}},Lt=qw,Xv={createStreamingSocket:function(d){return this.createSocket(IF,d)},createPollingSocket:function(d){return this.createSocket(SF,d)},createSocket:function(d,m){return new bF(d,m)},createXHR:function(d,m){return this.createRequest(Lt,d,m)},createRequest:function(d,m,D){return new Bw(d,m,D)}},Fg=Xv;Fg.createXDR=function(d,m){return this.createRequest(gF,d,m)};var CF=Fg,FF={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:h,getDefaultStrategy:dF,Transports:xu,transportConnectionInitializer:hF,HTTPFactory:CF,TimelineTransport:ce,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(d){var m=this;window.Pusher=d;var D=function(){m.onDocumentBody(d.ready)};window.JSON?D():p.load("json2",{},D)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:$,jsonp:k}},onDocumentBody:function(d){var m=this;document.body?d():setTimeout(function(){m.onDocumentBody(d)},0)},createJSONPRequest:function(d,m){return new j(d,m)},createScriptRequest:function(d){return new N(d)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var d=this.getXHRAPI();return new d},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return ql},createWebSocket:function(d){var m=this.getWebSocketAPI();return new m(d)},createSocketRequest:function(d,m){if(this.isXHRSupported())return this.HTTPFactory.createXHR(d,m);if(this.isXDRSupported(m.indexOf("https:")===0))return this.HTTPFactory.createXDR(d,m);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var d=this.getXHRAPI();return!!d&&new d().withCredentials!==void 0},isXDRSupported:function(d){var m=d?"https:":"http:",D=this.getProtocol();return!!window.XDomainRequest&&D===m},addUnloadListener:function(d){window.addEventListener!==void 0?window.addEventListener("unload",d,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",d)},removeUnloadListener:function(d){window.addEventListener!==void 0?window.removeEventListener("unload",d,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",d)}},Nt=FF,Km;(function(d){d[d.ERROR=3]="ERROR",d[d.INFO=6]="INFO",d[d.DEBUG=7]="DEBUG"})(Km||(Km={}));var Ym=Km,GF=(function(){function d(m,D,M){this.key=m,this.session=D,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return d.prototype.log=function(m,D){m<=this.options.level&&(this.events.push(Gn({},D,{timestamp:Fn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},d.prototype.error=function(m){this.log(Ym.ERROR,m)},d.prototype.info=function(m){this.log(Ym.INFO,m)},d.prototype.debug=function(m){this.log(Ym.DEBUG,m)},d.prototype.isEmpty=function(){return this.events.length===0},d.prototype.send=function(m,D){var M=this,A=Gn({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},d.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},d})(),Ww=GF,Gg=(function(){function d(m,D,M,A){this.name=m,this.priority=D,this.transport=M,this.options=A||{}}return d.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},d.prototype.connect=function(m,D){var M=this;if(this.isSupported()){if(this.priority{"use strict";var NTe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";HW.exports=NTe});var xW=Ue((pMn,$W)=>{"use strict";var PTe=JW();function qW(){}function WW(){}WW.resetWarningCache=qW;$W.exports=function(){function e(t,r,u,i,l,s){if(s!==PTe){var h=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 h.name="Invariant Violation",h}}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:WW,resetWarningCache:qW};return a.PropTypes=a,a}});var zW=Ue((hMn,jW)=>{jW.exports=xW()();var mMn,dMn});var RL=Ue(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var QW=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],LI=QW.join(","),KW=typeof Element>"u",fm=KW?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gL=!KW&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},YW=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(LI));return a&&fm.call(n,LI)&&r.unshift(n),r=r.filter(t),r},XW=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,h=e(s,!0,t);t.flatten?r.push.apply(r,h):r.push({scope:i,candidates:h})}else{var p=fm.call(i,LI);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},ZW=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},OTe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},e$=function(n){return n.tagName==="INPUT"},UTe=function(n){return e$(n)&&n.type==="hidden"},kTe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},BTe=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(fm.call(i,"details:not([open]) *"))return!0;var l=gL(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 h=n;n;){var p=n.parentElement,R=gL(n);if(p&&!p.shadowRoot&&r(p)===!0)return VW(n);n.assignedSlot?n=n.assignedSlot:!p&&R!==n.ownerDocument?n=R.host:n=p}n=h}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return VW(n);return!1},$Te=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)},jTe=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=ZW(l,i),h=i?e(r.candidates):l;s===0?i?a.push.apply(a,h):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:h})}),t.sort(OTe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},zTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=XW([n],a.includeContainer,{filter:DL.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:xTe}):t=YW(n,a.includeContainer,DL.bind(null,a)),jTe(t)},VTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=XW([n],a.includeContainer,{filter:NI.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=YW(n,a.includeContainer,NI.bind(null,a)),t},QTe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return fm.call(n,LI)===!1?!1:DL(a,n)},KTe=QW.concat("iframe").join(","),YTe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return fm.call(n,KTe)===!1?!1:NI(a,n)};bh.focusable=VTe;bh.isFocusable=YTe;bh.isTabbable=QTe;bh.tabbable=zTe});var u$=Ue(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});var xf=RL();function n$(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 a$(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()}}})(),ZTe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},eSe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},nSe=function(n){return n.key==="Tab"||n.keyCode===9},r$=function(n){return setTimeout(n,0)},o$=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},qR=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?me-1:0),ze=1;ze=0)Z=t.activeElement;else{var ee=u.tabbableGroups[0],me=ee&&ee.firstTabbableNode;Z=me||h("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=xf.tabbable(Z,r.tabbableOptions),me=xf.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(ze){var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Jn=me.findIndex(function(Fn){return Fn===ze});if(!(Jn<0))return mn?me.slice(Jn+1).find(function(Fn){return xf.isTabbable(Fn,r.tabbableOptions)}):me.slice(0,Jn).reverse().find(function(Fn){return xf.isTabbable(Fn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Z){return Z.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!h("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,ZTe(Z)&&Z.select()}},w=function(Z){var ee=h("setReturnFocus",Z);return ee||(ee===!1?!1:Z)},I=function(Z){var ee=PI(Z);if(!(s(ee)>=0)){if(qR(r.clickOutsideDeactivates,Z)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!xf.isFocusable(ee,r.tabbableOptions)});return}qR(r.allowOutsideClick,Z)||Z.preventDefault()}},L=function(Z){var ee=PI(Z),me=s(ee)>=0;me||ee instanceof Document?me&&(u.mostRecentlyFocusedNode=ee):(Z.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},U=function(Z){var ee=PI(Z);R();var me=null;if(u.tabbableGroups.length>0){var qe=s(ee),ze=qe>=0?u.containerGroups[qe]:void 0;if(qe<0)Z.shiftKey?me=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:me=u.tabbableGroups[0].firstTabbableNode;else if(Z.shiftKey){var mn=o$(u.tabbableGroups,function(ha){var pa=ha.firstTabbableNode;return ee===pa});if(mn<0&&(ze.container===ee||xf.isFocusable(ee,r.tabbableOptions)&&!xf.isTabbable(ee,r.tabbableOptions)&&!ze.nextTabbableNode(ee,!1))&&(mn=qe),mn>=0){var Jn=mn===0?u.tabbableGroups.length-1:mn-1,Fn=u.tabbableGroups[Jn];me=Fn.lastTabbableNode}}else{var Gn=o$(u.tabbableGroups,function(ha){var pa=ha.lastTabbableNode;return ee===pa});if(Gn<0&&(ze.container===ee||xf.isFocusable(ee,r.tabbableOptions)&&!xf.isTabbable(ee,r.tabbableOptions)&&!ze.nextTabbableNode(ee))&&(Gn=qe),Gn>=0){var Bn=Gn===u.tabbableGroups.length-1?0:Gn+1,ba=u.tabbableGroups[Bn];me=ba.firstTabbableNode}}}else me=h("fallbackFocus");me&&(Z.preventDefault(),E(me))},Q=function(Z){if(eSe(Z)&&qR(r.escapeDeactivates,Z)!==!1){Z.preventDefault(),i.deactivate();return}if(nSe(Z)){U(Z);return}},V=function(Z){var ee=PI(Z);s(ee)>=0||qR(r.clickOutsideDeactivates,Z)||qR(r.allowOutsideClick,Z)||(Z.preventDefault(),Z.stopImmediatePropagation())},te=function(){if(u.active)return t$.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?r$(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",V,{capture:!0,passive:!1}),t.addEventListener("keydown",Q,{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",V,!0),t.removeEventListener("keydown",Q,!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"),qe=l(Z,"checkCanFocusTrap");qe||R(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,ee&&ee();var ze=function(){qe&&R(),te(),me&&me()};return qe?(qe(u.containers.concat()).then(ze,ze),this):(ze(),this)},deactivate:function(Z){if(!u.active)return this;var ee=a$({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Z);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,le(),u.active=!1,u.paused=!1,t$.deactivateTrap(i);var me=l(ee,"onDeactivate"),qe=l(ee,"onPostDeactivate"),ze=l(ee,"checkCanReturnFocus"),mn=l(ee,"returnFocus","returnFocusOnDeactivate");me&&me();var Jn=function(){r$(function(){mn&&E(w(u.nodeFocusedBeforeActivation)),qe&&qe()})};return mn&&ze?(ze(w(u.nodeFocusedBeforeActivation)).then(Jn,Jn),this):(Jn(),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};yL.createFocusTrap=aSe});var c$=Ue((RMn,l$)=>{"use strict";function wL(e){"@babel/helpers - typeof";return wL=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},wL(e)}function tSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i$(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 UI(e){return UI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},UI(e)}function cSe(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var OI=(Ct(),tb(Io)),gt=zW(),sSe=u$(),vSe=sSe.createFocusTrap,fSe=RL(),_Se=fSe.isFocusable,EL=(function(e){oSe(a,e);var n=uSe(a);function a(t){var r;tSe(this,a),r=n.call(this,t),cSe($R(r),"getNodeForOption",function(l){var s,h=(s=this.internalOptions[l])!==null&&s!==void 0?s:this.originalOptions[l];if(typeof h=="function"){for(var p=arguments.length,R=new Array(p>1?p-1:0),E=1;E element.");var i=function(h){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(h):u.ref&&(u.ref.current=h)),r.focusTrapElements=p||[h]},l=OI.cloneElement(u,{ref:i});return l}return null}}]),a})(OI.Component),WR=typeof Element>"u"?Function:Element;EL.propTypes={active:gt.bool,paused:gt.bool,focusTrapOptions:gt.shape({document:gt.object,onActivate:gt.func,onPostActivate:gt.func,checkCanFocusTrap:gt.func,onDeactivate:gt.func,onPostDeactivate:gt.func,checkCanReturnFocus:gt.func,initialFocus:gt.oneOfType([gt.instanceOf(WR),gt.string,gt.bool,gt.func]),fallbackFocus:gt.oneOfType([gt.instanceOf(WR),gt.string,gt.func]),escapeDeactivates:gt.oneOfType([gt.bool,gt.func]),clickOutsideDeactivates:gt.oneOfType([gt.bool,gt.func]),returnFocusOnDeactivate:gt.bool,setReturnFocus:gt.oneOfType([gt.instanceOf(WR),gt.string,gt.bool,gt.func]),allowOutsideClick:gt.oneOfType([gt.bool,gt.func]),preventScroll:gt.bool,tabbableOptions:gt.shape({displayCheck:gt.oneOf(["full","non-zero-area","none"]),getShadowRoot:gt.oneOfType([gt.bool,gt.func])})}),containerElements:gt.arrayOf(gt.instanceOf(WR)),children:gt.oneOfType([gt.element,gt.instanceOf(WR)])};EL.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:vSe};l$.exports=EL});var Rx=Ue(Ur=>{"use strict";var Ju=typeof Symbol=="function"&&Symbol.for,u3=Ju?Symbol.for("react.element"):60103,i3=Ju?Symbol.for("react.portal"):60106,KI=Ju?Symbol.for("react.fragment"):60107,YI=Ju?Symbol.for("react.strict_mode"):60108,XI=Ju?Symbol.for("react.profiler"):60114,ZI=Ju?Symbol.for("react.provider"):60109,eT=Ju?Symbol.for("react.context"):60110,l3=Ju?Symbol.for("react.async_mode"):60111,nT=Ju?Symbol.for("react.concurrent_mode"):60111,aT=Ju?Symbol.for("react.forward_ref"):60112,tT=Ju?Symbol.for("react.suspense"):60113,cGe=Ju?Symbol.for("react.suspense_list"):60120,rT=Ju?Symbol.for("react.memo"):60115,oT=Ju?Symbol.for("react.lazy"):60116,sGe=Ju?Symbol.for("react.block"):60121,vGe=Ju?Symbol.for("react.fundamental"):60117,fGe=Ju?Symbol.for("react.responder"):60118,_Ge=Ju?Symbol.for("react.scope"):60119;function hc(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case u3:switch(e=e.type,e){case l3:case nT:case KI:case XI:case YI:case tT:return e;default:switch(e=e&&e.$$typeof,e){case eT:case aT:case oT:case rT:case ZI:return e;default:return n}}case i3:return n}}}function Dx(e){return hc(e)===nT}Ur.AsyncMode=l3;Ur.ConcurrentMode=nT;Ur.ContextConsumer=eT;Ur.ContextProvider=ZI;Ur.Element=u3;Ur.ForwardRef=aT;Ur.Fragment=KI;Ur.Lazy=oT;Ur.Memo=rT;Ur.Portal=i3;Ur.Profiler=XI;Ur.StrictMode=YI;Ur.Suspense=tT;Ur.isAsyncMode=function(e){return Dx(e)||hc(e)===l3};Ur.isConcurrentMode=Dx;Ur.isContextConsumer=function(e){return hc(e)===eT};Ur.isContextProvider=function(e){return hc(e)===ZI};Ur.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===u3};Ur.isForwardRef=function(e){return hc(e)===aT};Ur.isFragment=function(e){return hc(e)===KI};Ur.isLazy=function(e){return hc(e)===oT};Ur.isMemo=function(e){return hc(e)===rT};Ur.isPortal=function(e){return hc(e)===i3};Ur.isProfiler=function(e){return hc(e)===XI};Ur.isStrictMode=function(e){return hc(e)===YI};Ur.isSuspense=function(e){return hc(e)===tT};Ur.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===KI||e===nT||e===XI||e===YI||e===tT||e===cGe||typeof e=="object"&&e!==null&&(e.$$typeof===oT||e.$$typeof===rT||e.$$typeof===ZI||e.$$typeof===eT||e.$$typeof===aT||e.$$typeof===vGe||e.$$typeof===fGe||e.$$typeof===_Ge||e.$$typeof===sGe)};Ur.typeOf=hc});var wx=Ue((hPn,yx)=>{"use strict";yx.exports=Rx()});var Dm=Ue((GPn,lT)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function ZGe(){this.__data__=[],this.size=0}hj.exports=ZGe});var F3=Ue((v8n,Dj)=>{function eMe(e,n){return e===n||e!==e&&n!==n}Dj.exports=eMe});var ay=Ue((f8n,Rj)=>{var nMe=F3();function aMe(e,n){for(var a=e.length;a--;)if(nMe(e[a][0],n))return a;return-1}Rj.exports=aMe});var wj=Ue((_8n,yj)=>{var tMe=ay(),rMe=Array.prototype,oMe=rMe.splice;function uMe(e){var n=this.__data__,a=tMe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():oMe.call(n,a,1),--this.size,!0}yj.exports=uMe});var Ej=Ue((p8n,bj)=>{var iMe=ay();function lMe(e){var n=this.__data__,a=iMe(n,e);return a<0?void 0:n[a][1]}bj.exports=lMe});var Tj=Ue((m8n,Ij)=>{var cMe=ay();function sMe(e){return cMe(this.__data__,e)>-1}Ij.exports=sMe});var Cj=Ue((d8n,Sj)=>{var vMe=ay();function fMe(e,n){var a=this.__data__,t=vMe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}Sj.exports=fMe});var ty=Ue((h8n,Fj)=>{var _Me=gj(),pMe=wj(),mMe=Ej(),dMe=Tj(),hMe=Cj();function Ah(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var gMe=ty();function DMe(){this.__data__=new gMe,this.size=0}Gj.exports=DMe});var Lj=Ue((D8n,Aj)=>{function RMe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}Aj.exports=RMe});var Pj=Ue((R8n,Nj)=>{function yMe(e){return this.__data__.get(e)}Nj.exports=yMe});var Uj=Ue((y8n,Oj)=>{function wMe(e){return this.__data__.has(e)}Oj.exports=wMe});var G3=Ue((w8n,kj)=>{var bMe=typeof global=="object"&&global&&global.Object===Object&&global;kj.exports=bMe});var kv=Ue((b8n,Bj)=>{var EMe=G3(),IMe=typeof self=="object"&&self&&self.Object===Object&&self,TMe=EMe||IMe||Function("return this")();Bj.exports=TMe});var FT=Ue((E8n,Hj)=>{var SMe=kv(),CMe=SMe.Symbol;Hj.exports=CMe});var $j=Ue((I8n,Wj)=>{var Jj=FT(),qj=Object.prototype,FMe=qj.hasOwnProperty,GMe=qj.toString,ry=Jj?Jj.toStringTag:void 0;function MMe(e){var n=FMe.call(e,ry),a=e[ry];try{e[ry]=void 0;var t=!0}catch{}var r=GMe.call(e);return t&&(n?e[ry]=a:delete e[ry]),r}Wj.exports=MMe});var jj=Ue((T8n,xj)=>{var AMe=Object.prototype,LMe=AMe.toString;function NMe(e){return LMe.call(e)}xj.exports=NMe});var oy=Ue((S8n,Qj)=>{var zj=FT(),PMe=$j(),OMe=jj(),UMe="[object Null]",kMe="[object Undefined]",Vj=zj?zj.toStringTag:void 0;function BMe(e){return e==null?e===void 0?kMe:UMe:Vj&&Vj in Object(e)?PMe(e):OMe(e)}Qj.exports=BMe});var M3=Ue((C8n,Kj)=>{function HMe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}Kj.exports=HMe});var A3=Ue((F8n,Yj)=>{var JMe=oy(),qMe=M3(),WMe="[object AsyncFunction]",$Me="[object Function]",xMe="[object GeneratorFunction]",jMe="[object Proxy]";function zMe(e){if(!qMe(e))return!1;var n=JMe(e);return n==$Me||n==xMe||n==WMe||n==jMe}Yj.exports=zMe});var Zj=Ue((G8n,Xj)=>{var VMe=kv(),QMe=VMe["__core-js_shared__"];Xj.exports=QMe});var az=Ue((M8n,nz)=>{var L3=Zj(),ez=(function(){var e=/[^.]+$/.exec(L3&&L3.keys&&L3.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function KMe(e){return!!ez&&ez in e}nz.exports=KMe});var N3=Ue((A8n,tz)=>{var YMe=Function.prototype,XMe=YMe.toString;function ZMe(e){if(e!=null){try{return XMe.call(e)}catch{}try{return e+""}catch{}}return""}tz.exports=ZMe});var oz=Ue((L8n,rz)=>{var eAe=A3(),nAe=az(),aAe=M3(),tAe=N3(),rAe=/[\\^$.*+?()[\]{}|]/g,oAe=/^\[object .+?Constructor\]$/,uAe=Function.prototype,iAe=Object.prototype,lAe=uAe.toString,cAe=iAe.hasOwnProperty,sAe=RegExp("^"+lAe.call(cAe).replace(rAe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vAe(e){if(!aAe(e)||nAe(e))return!1;var n=eAe(e)?sAe:oAe;return n.test(tAe(e))}rz.exports=vAe});var iz=Ue((N8n,uz)=>{function fAe(e,n){return e==null?void 0:e[n]}uz.exports=fAe});var ym=Ue((P8n,lz)=>{var _Ae=oz(),pAe=iz();function mAe(e,n){var a=pAe(e,n);return _Ae(a)?a:void 0}lz.exports=mAe});var GT=Ue((O8n,cz)=>{var dAe=ym(),hAe=kv(),gAe=dAe(hAe,"Map");cz.exports=gAe});var uy=Ue((U8n,sz)=>{var DAe=ym(),RAe=DAe(Object,"create");sz.exports=RAe});var _z=Ue((k8n,fz)=>{var vz=uy();function yAe(){this.__data__=vz?vz(null):{},this.size=0}fz.exports=yAe});var mz=Ue((B8n,pz)=>{function wAe(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}pz.exports=wAe});var hz=Ue((H8n,dz)=>{var bAe=uy(),EAe="__lodash_hash_undefined__",IAe=Object.prototype,TAe=IAe.hasOwnProperty;function SAe(e){var n=this.__data__;if(bAe){var a=n[e];return a===EAe?void 0:a}return TAe.call(n,e)?n[e]:void 0}dz.exports=SAe});var Dz=Ue((J8n,gz)=>{var CAe=uy(),FAe=Object.prototype,GAe=FAe.hasOwnProperty;function MAe(e){var n=this.__data__;return CAe?n[e]!==void 0:GAe.call(n,e)}gz.exports=MAe});var yz=Ue((q8n,Rz)=>{var AAe=uy(),LAe="__lodash_hash_undefined__";function NAe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=AAe&&n===void 0?LAe:n,this}Rz.exports=NAe});var bz=Ue((W8n,wz)=>{var PAe=_z(),OAe=mz(),UAe=hz(),kAe=Dz(),BAe=yz();function Lh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var Ez=bz(),HAe=ty(),JAe=GT();function qAe(){this.size=0,this.__data__={hash:new Ez,map:new(JAe||HAe),string:new Ez}}Iz.exports=qAe});var Cz=Ue((x8n,Sz)=>{function WAe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}Sz.exports=WAe});var iy=Ue((j8n,Fz)=>{var $Ae=Cz();function xAe(e,n){var a=e.__data__;return $Ae(n)?a[typeof n=="string"?"string":"hash"]:a.map}Fz.exports=xAe});var Mz=Ue((z8n,Gz)=>{var jAe=iy();function zAe(e){var n=jAe(this,e).delete(e);return this.size-=n?1:0,n}Gz.exports=zAe});var Lz=Ue((V8n,Az)=>{var VAe=iy();function QAe(e){return VAe(this,e).get(e)}Az.exports=QAe});var Pz=Ue((Q8n,Nz)=>{var KAe=iy();function YAe(e){return KAe(this,e).has(e)}Nz.exports=YAe});var Uz=Ue((K8n,Oz)=>{var XAe=iy();function ZAe(e,n){var a=XAe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}Oz.exports=ZAe});var P3=Ue((Y8n,kz)=>{var e2e=Tz(),n2e=Mz(),a2e=Lz(),t2e=Pz(),r2e=Uz();function Nh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var o2e=ty(),u2e=GT(),i2e=P3(),l2e=200;function c2e(e,n){var a=this.__data__;if(a instanceof o2e){var t=a.__data__;if(!u2e||t.length{var s2e=ty(),v2e=Mj(),f2e=Lj(),_2e=Pj(),p2e=Uj(),m2e=Hz();function Ph(e){var n=this.__data__=new s2e(e);this.size=n.size}Ph.prototype.clear=v2e;Ph.prototype.delete=f2e;Ph.prototype.get=_2e;Ph.prototype.has=p2e;Ph.prototype.set=m2e;Jz.exports=Ph});var $z=Ue((e7n,Wz)=>{var d2e="__lodash_hash_undefined__";function h2e(e){return this.__data__.set(e,d2e),this}Wz.exports=h2e});var jz=Ue((n7n,xz)=>{function g2e(e){return this.__data__.has(e)}xz.exports=g2e});var Vz=Ue((a7n,zz)=>{var D2e=P3(),R2e=$z(),y2e=jz();function MT(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new D2e;++n{function w2e(e,n){for(var a=-1,t=e==null?0:e.length;++a{function b2e(e,n){return e.has(n)}Yz.exports=b2e});var O3=Ue((o7n,Zz)=>{var E2e=Vz(),I2e=Kz(),T2e=Xz(),S2e=1,C2e=2;function F2e(e,n,a,t,r,u){var i=a&S2e,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var h=u.get(e),p=u.get(n);if(h&&p)return h==n&&p==e;var R=-1,E=!0,w=a&C2e?new E2e:void 0;for(u.set(e,n),u.set(n,e);++R{var G2e=kv(),M2e=G2e.Uint8Array;eV.exports=M2e});var tV=Ue((i7n,aV)=>{function A2e(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}aV.exports=A2e});var oV=Ue((l7n,rV)=>{function L2e(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}rV.exports=L2e});var sV=Ue((c7n,cV)=>{var uV=FT(),iV=nV(),N2e=F3(),P2e=O3(),O2e=tV(),U2e=oV(),k2e=1,B2e=2,H2e="[object Boolean]",J2e="[object Date]",q2e="[object Error]",W2e="[object Map]",$2e="[object Number]",x2e="[object RegExp]",j2e="[object Set]",z2e="[object String]",V2e="[object Symbol]",Q2e="[object ArrayBuffer]",K2e="[object DataView]",lV=uV?uV.prototype:void 0,U3=lV?lV.valueOf:void 0;function Y2e(e,n,a,t,r,u,i){switch(a){case K2e:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Q2e:return!(e.byteLength!=n.byteLength||!u(new iV(e),new iV(n)));case H2e:case J2e:case $2e:return N2e(+e,+n);case q2e:return e.name==n.name&&e.message==n.message;case x2e:case z2e:return e==n+"";case W2e:var l=O2e;case j2e:var s=t&k2e;if(l||(l=U2e),e.size!=n.size&&!s)return!1;var h=i.get(e);if(h)return h==n;t|=B2e,i.set(e,n);var p=P2e(l(e),l(n),t,r,u,i);return i.delete(e),p;case V2e:if(U3)return U3.call(e)==U3.call(n)}return!1}cV.exports=Y2e});var fV=Ue((s7n,vV)=>{function X2e(e,n){for(var a=-1,t=n.length,r=e.length;++a{var Z2e=Array.isArray;_V.exports=Z2e});var mV=Ue((f7n,pV)=>{var eLe=fV(),nLe=AT();function aLe(e,n,a){var t=n(e);return nLe(e)?t:eLe(t,a(e))}pV.exports=aLe});var hV=Ue((_7n,dV)=>{function tLe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function rLe(){return[]}gV.exports=rLe});var wV=Ue((m7n,yV)=>{var oLe=hV(),uLe=DV(),iLe=Object.prototype,lLe=iLe.propertyIsEnumerable,RV=Object.getOwnPropertySymbols,cLe=RV?function(e){return e==null?[]:(e=Object(e),oLe(RV(e),function(n){return lLe.call(e,n)}))}:uLe;yV.exports=cLe});var EV=Ue((d7n,bV)=>{function sLe(e,n){for(var a=-1,t=Array(e);++a{function vLe(e){return e!=null&&typeof e=="object"}IV.exports=vLe});var SV=Ue((g7n,TV)=>{var fLe=oy(),_Le=ly(),pLe="[object Arguments]";function mLe(e){return _Le(e)&&fLe(e)==pLe}TV.exports=mLe});var AV=Ue((D7n,MV)=>{var FV=SV(),dLe=ly(),GV=Object.prototype,hLe=GV.hasOwnProperty,gLe=GV.propertyIsEnumerable,DLe=FV((function(){return arguments})())?FV:function(e){return dLe(e)&&hLe.call(e,"callee")&&!gLe.call(e,"callee")};MV.exports=DLe});var NV=Ue((R7n,LV)=>{function RLe(){return!1}LV.exports=RLe});var k3=Ue((cy,Oh)=>{var yLe=kv(),wLe=NV(),UV=typeof cy=="object"&&cy&&!cy.nodeType&&cy,PV=UV&&typeof Oh=="object"&&Oh&&!Oh.nodeType&&Oh,bLe=PV&&PV.exports===UV,OV=bLe?yLe.Buffer:void 0,ELe=OV?OV.isBuffer:void 0,ILe=ELe||wLe;Oh.exports=ILe});var BV=Ue((y7n,kV)=>{var TLe=9007199254740991,SLe=/^(?:0|[1-9]\d*)$/;function CLe(e,n){var a=typeof e;return n=n==null?TLe:n,!!n&&(a=="number"||a!="symbol"&&SLe.test(e))&&e>-1&&e%1==0&&e{var FLe=9007199254740991;function GLe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FLe}HV.exports=GLe});var qV=Ue((b7n,JV)=>{var MLe=oy(),ALe=B3(),LLe=ly(),NLe="[object Arguments]",PLe="[object Array]",OLe="[object Boolean]",ULe="[object Date]",kLe="[object Error]",BLe="[object Function]",HLe="[object Map]",JLe="[object Number]",qLe="[object Object]",WLe="[object RegExp]",$Le="[object Set]",xLe="[object String]",jLe="[object WeakMap]",zLe="[object ArrayBuffer]",VLe="[object DataView]",QLe="[object Float32Array]",KLe="[object Float64Array]",YLe="[object Int8Array]",XLe="[object Int16Array]",ZLe="[object Int32Array]",e3e="[object Uint8Array]",n3e="[object Uint8ClampedArray]",a3e="[object Uint16Array]",t3e="[object Uint32Array]",po={};po[QLe]=po[KLe]=po[YLe]=po[XLe]=po[ZLe]=po[e3e]=po[n3e]=po[a3e]=po[t3e]=!0;po[NLe]=po[PLe]=po[zLe]=po[OLe]=po[VLe]=po[ULe]=po[kLe]=po[BLe]=po[HLe]=po[JLe]=po[qLe]=po[WLe]=po[$Le]=po[xLe]=po[jLe]=!1;function r3e(e){return LLe(e)&&ALe(e.length)&&!!po[MLe(e)]}JV.exports=r3e});var $V=Ue((E7n,WV)=>{function o3e(e){return function(n){return e(n)}}WV.exports=o3e});var jV=Ue((sy,Uh)=>{var u3e=G3(),xV=typeof sy=="object"&&sy&&!sy.nodeType&&sy,vy=xV&&typeof Uh=="object"&&Uh&&!Uh.nodeType&&Uh,i3e=vy&&vy.exports===xV,H3=i3e&&u3e.process,l3e=(function(){try{var e=vy&&vy.require&&vy.require("util").types;return e||H3&&H3.binding&&H3.binding("util")}catch{}})();Uh.exports=l3e});var J3=Ue((I7n,QV)=>{var c3e=qV(),s3e=$V(),zV=jV(),VV=zV&&zV.isTypedArray,v3e=VV?s3e(VV):c3e;QV.exports=v3e});var YV=Ue((T7n,KV)=>{var f3e=EV(),_3e=AV(),p3e=AT(),m3e=k3(),d3e=BV(),h3e=J3(),g3e=Object.prototype,D3e=g3e.hasOwnProperty;function R3e(e,n){var a=p3e(e),t=!a&&_3e(e),r=!a&&!t&&m3e(e),u=!a&&!t&&!r&&h3e(e),i=a||t||r||u,l=i?f3e(e.length,String):[],s=l.length;for(var h in e)(n||D3e.call(e,h))&&!(i&&(h=="length"||r&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||d3e(h,s)))&&l.push(h);return l}KV.exports=R3e});var ZV=Ue((S7n,XV)=>{var y3e=Object.prototype;function w3e(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||y3e;return e===a}XV.exports=w3e});var nQ=Ue((C7n,eQ)=>{function b3e(e,n){return function(a){return e(n(a))}}eQ.exports=b3e});var tQ=Ue((F7n,aQ)=>{var E3e=nQ(),I3e=E3e(Object.keys,Object);aQ.exports=I3e});var oQ=Ue((G7n,rQ)=>{var T3e=ZV(),S3e=tQ(),C3e=Object.prototype,F3e=C3e.hasOwnProperty;function G3e(e){if(!T3e(e))return S3e(e);var n=[];for(var a in Object(e))F3e.call(e,a)&&a!="constructor"&&n.push(a);return n}rQ.exports=G3e});var iQ=Ue((M7n,uQ)=>{var M3e=A3(),A3e=B3();function L3e(e){return e!=null&&A3e(e.length)&&!M3e(e)}uQ.exports=L3e});var cQ=Ue((A7n,lQ)=>{var N3e=YV(),P3e=oQ(),O3e=iQ();function U3e(e){return O3e(e)?N3e(e):P3e(e)}lQ.exports=U3e});var vQ=Ue((L7n,sQ)=>{var k3e=mV(),B3e=wV(),H3e=cQ();function J3e(e){return k3e(e,H3e,B3e)}sQ.exports=J3e});var pQ=Ue((N7n,_Q)=>{var fQ=vQ(),q3e=1,W3e=Object.prototype,$3e=W3e.hasOwnProperty;function x3e(e,n,a,t,r,u){var i=a&q3e,l=fQ(e),s=l.length,h=fQ(n),p=h.length;if(s!=p&&!i)return!1;for(var R=s;R--;){var E=l[R];if(!(i?E in n:$3e.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 j3e=ym(),z3e=kv(),V3e=j3e(z3e,"DataView");mQ.exports=V3e});var gQ=Ue((O7n,hQ)=>{var Q3e=ym(),K3e=kv(),Y3e=Q3e(K3e,"Promise");hQ.exports=Y3e});var RQ=Ue((U7n,DQ)=>{var X3e=ym(),Z3e=kv(),eNe=X3e(Z3e,"Set");DQ.exports=eNe});var wQ=Ue((k7n,yQ)=>{var nNe=ym(),aNe=kv(),tNe=nNe(aNe,"WeakMap");yQ.exports=tNe});var GQ=Ue((B7n,FQ)=>{var q3=dQ(),W3=GT(),$3=gQ(),x3=RQ(),j3=wQ(),CQ=oy(),kh=N3(),bQ="[object Map]",rNe="[object Object]",EQ="[object Promise]",IQ="[object Set]",TQ="[object WeakMap]",SQ="[object DataView]",oNe=kh(q3),uNe=kh(W3),iNe=kh($3),lNe=kh(x3),cNe=kh(j3),wm=CQ;(q3&&wm(new q3(new ArrayBuffer(1)))!=SQ||W3&&wm(new W3)!=bQ||$3&&wm($3.resolve())!=EQ||x3&&wm(new x3)!=IQ||j3&&wm(new j3)!=TQ)&&(wm=function(e){var n=CQ(e),a=n==rNe?e.constructor:void 0,t=a?kh(a):"";if(t)switch(t){case oNe:return SQ;case uNe:return bQ;case iNe:return EQ;case lNe:return IQ;case cNe:return TQ}return n});FQ.exports=wm});var kQ=Ue((H7n,UQ)=>{var z3=qz(),sNe=O3(),vNe=sV(),fNe=pQ(),MQ=GQ(),AQ=AT(),LQ=k3(),_Ne=J3(),pNe=1,NQ="[object Arguments]",PQ="[object Array]",LT="[object Object]",mNe=Object.prototype,OQ=mNe.hasOwnProperty;function dNe(e,n,a,t,r,u){var i=AQ(e),l=AQ(n),s=i?PQ:MQ(e),h=l?PQ:MQ(n);s=s==NQ?LT:s,h=h==NQ?LT:h;var p=s==LT,R=h==LT,E=s==h;if(E&&LQ(e)){if(!LQ(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new z3),i||_Ne(e)?sNe(e,n,a,t,r,u):vNe(e,n,s,a,t,r,u);if(!(a&pNe)){var w=p&&OQ.call(e,"__wrapped__"),I=R&&OQ.call(n,"__wrapped__");if(w||I){var L=w?e.value():e,U=I?n.value():n;return u||(u=new z3),r(L,U,a,t,u)}}return E?(u||(u=new z3),fNe(e,n,a,t,r,u)):!1}UQ.exports=dNe});var qQ=Ue((J7n,JQ)=>{var hNe=kQ(),BQ=ly();function HQ(e,n,a,t,r){return e===n?!0:e==null||n==null||!BQ(e)&&!BQ(n)?e!==e&&n!==n:hNe(e,n,a,t,HQ,r)}JQ.exports=HQ});var $Q=Ue((q7n,WQ)=>{var gNe=qQ();function DNe(e,n){return gNe(e,n)}WQ.exports=DNe});var CK=Ue((z6n,zNe)=>{zNe.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 tae=Ue((nw,$P)=>{typeof window<"u"&&(function(n,a){typeof nw=="object"&&typeof $P=="object"?$P.exports=a():typeof define=="function"&&define.amd?define([],a):typeof nw=="object"?nw.Hls=a():n.Hls=a()})(nw,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 h(){this._events=new u,this._eventsCount=0}h.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},h.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:{}};h(w);)for(var U=Object.keys(w),Q=0;Q>>8^Dt&255^99,te[ba]=Dt,le[Dt]=ba;var vt=Bn[ba],Ha=Bn[vt],wr=Bn[Ha],Ye=Bn[Dt]*257^Dt*16843008;Z[ba]=Ye<<24|Ye>>>8,ee[ba]=Ye<<16|Ye>>>16,me[ba]=Ye<<8|Ye>>>24,qe[ba]=Ye,Ye=wr*16843009^Ha*65537^vt*257^ba*16843008,mn[Dt]=Ye<<24|Ye>>>8,Jn[Dt]=Ye<<16|Ye>>>16,Fn[Dt]=Ye<<8|Ye>>>24,Gn[Dt]=Ye,ba?(ba=vt^Bn[Bn[Bn[wr^vt]]],ha^=Bn[Bn[ha]]):ba=ha=1}},Q.expandKey=function(te){for(var le=this.uint8ArrayToUint32Array_(te),ne=!0,Z=0;Z>>6)+1,O=(X[k+2]&60)>>>2,O>Me.length-1){$.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:"+N+",sampleingIndex:"+O+"["+Me[O]+"Hz],channelConfig:"+K),/firefox/i.test(ce)?O>=6?(N=5,ve=new Array(4),j=O-3):(N=2,ve=new Array(2),j=O):ce.indexOf("android")!==-1?(N=2,ve=new Array(2),j=O):(N=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)&&(N=2,ve=new Array(2)),j=O)),ve[0]=N<<3,ve[0]|=(O&14)>>1,ve[1]|=(O&1)<<7,ve[1]|=K<<3,N===5&&(ve[1]|=(j&14)>>1,ve[2]=(j&1)<<7,ve[2]|=8,ve[3]=0),{config:ve,samplerate:Me[O],channelCount:K,codec:"mp4a.40."+N,manifestCodec:Ie}}function p($,X){return $[X]===255&&($[X+1]&246)===240}function R($,X){return $[X+1]&1?7:9}function E($,X){return($[X+3]&3)<<11|$[X+4]<<3|($[X+5]&224)>>>5}function w($,X){return!!(X+1<$.length&&p($,X))}function I($,X){if(w($,X)){var k=R($,X),S=k;X+5<$.length&&(S=E($,X));var N=X+S;if(N===$.length||N+1<$.length&&p($,N))return!0}return!1}function L($,X,k,S,N){if(!$.samplerate){var O=h(X,k,S,N);$.config=O.config,$.samplerate=O.samplerate,$.channelCount=O.channelCount,$.codec=O.codec,$.manifestCodec=O.manifestCodec,l.logger.log("parsed codec:"+$.codec+",rate:"+O.samplerate+",nb channel:"+O.channelCount)}}function U($){return 1024*9e4/$}function Q($,X,k,S,N){var O,j,K,ve=$.length;if(O=R($,X),j=E($,X),j-=O,j>0&&X+O+j<=ve)return K=k+S*N,{headerLength:O,frameLength:j,stamp:K}}function V($,X,k,S,N){var O=U($.samplerate),j=Q(X,k,S,N,O);if(j){var K=j.stamp,ve=j.headerLength,ce=j.frameLength,Ie={unit:X.subarray(k+ve,k+ve+ce),pts:K,dts:K};return $.samples.push(Ie),{sample:Ie,length:ce+ve}}}var te=a("./src/demux/id3.js"),le=(function(){function $(k,S,N){this.observer=k,this.config=N,this.remuxer=S}var X=$.prototype;return X.resetInitSegment=function(S,N,O,j){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:N,duration:j,inputTimeScale:9e4}},X.resetTimeStamp=function(){},$.probe=function(S){if(!S)return!1;for(var N=te.default.getID3Data(S,0)||[],O=N.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=N+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,N=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-N:N===3?3:4,ce=ee.BitratesMap[ve*14+O-1]*1e3,Ie=S===3?0:S===2?1:2,Me=ee.SamplingRateMap[Ie*3+j],Pe=X[k+3]>>6===3?1:2,Be=ee.SamplesCoefficients[S][N],hn=ee.BytesInSlot[N],An=Be*8*hn,$e=parseInt(Be*ce/Me+K,10)*hn;return{sampleRate:Me,channelCount:Pe,frameLength:$e,samplesPerFrame:An}}},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,N=S>>3,S-=N>>3,this.bytesAvailable-=N,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},X.readBits=function(S){var N=Math.min(this.bitsAvailable,S),O=this.word>>>32-N;return S>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=N,this.bitsAvailable>0?this.word<<=N:this.bytesAvailable>0&&this.loadWord(),N=S-N,N>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 N=8,O=8,j,K;for(j=0;j=S.length){O();return}if(!(S[N].unit.length<32)){var j=this.decrypter.isSync();if(this.decryptAacSample(S,N,O,j),!j)return}}},X.getAvcEncryptedData=function(S){for(var N=Math.floor((S.length-48)/160)*16+16,O=new Int8Array(N),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,N){N=new Uint8Array(N);for(var O=0,j=32;j<=S.length-16;j+=160,O+=16)S.set(N.subarray(O,O+16),j);return S},X.decryptAvcSample=function(S,N,O,j,K,ve){var ce=this.discardEPB(K.data),Ie=this.getAvcEncryptedData(ce),Me=this;this.decryptBuffer(Ie.buffer,function(Pe){K.data=Me.getAvcDecryptedUnit(ce,Pe),ve||Me.decryptAvcSamples(S,N,O+1,j)})},X.decryptAvcSamples=function(S,N,O,j){for(;;N++,O=0){if(N>=S.length){j();return}for(var K=S[N].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,N,O,j,ve,ce),!ce)return}}}},$})(),Jn=mn,Fn={video:1,audio:2,id3:3,text:4},Gn=(function(){function $(k,S,N,O){this.observer=k,this.config=N,this.typeSupported=O,this.remuxer=S,this.sampleAes=null}var X=$.prototype;return X.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new Jn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},$.probe=function(S){var N=$._syncOffset(S);return N<0?!1:(N&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+N+", junk ahead ?"),!0)},$._syncOffset=function(S){for(var N=Math.min(1e3,S.length-564),O=0;O>4,Me>1){if(Pe=K+5+S[K+4],Pe===K+188)continue}else Pe=K+4;switch(Ie){case Wa:ce&&(nr&&(Be=mo(nr))&&qo(Be,!1),nr={data:[],size:0}),nr&&(nr.data.push(S.subarray(Pe,K+188)),nr.size+=K+188-Pe);break;case qt:ce&&(Rt&&(Be=mo(Rt))&&(qn.isAAC?Gu(Be):Go(Be)),Rt={data:[],size:0}),Rt&&(Rt.data.push(S.subarray(Pe,K+188)),Rt.size+=K+188-Pe);break;case Ar:ce&&(Br&&(Be=mo(Br))&&mi(Be),Br={data:[],size:0}),Br&&(Br.data.push(S.subarray(Pe,K+188)),Br.size+=K+188-Pe);break;case 0:ce&&(Pe+=S[Pe]+1),Za=this._pmtId=At(S,Pe);break;case Za:ce&&(Pe+=S[Pe]+1);var oo=dr(S,Pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);Wa=oo.avc,Wa>0&&($e.pid=Wa),qt=oo.audio,qt>0&&(qn.pid=qt,qn.isAAC=oo.isAAC),Ar=oo.id3,Ar>0&&(ga.pid=Ar),hn&&!An&&(l.logger.log("reparse from beginning"),hn=!1,K=Wo-188),An=this.pmtParsed=!0;break;case 17:case 8191:break;default:hn=!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"});nr&&(Be=mo(nr))?(qo(Be,!0),$e.pesData=null):$e.pesData=nr,Rt&&(Be=mo(Rt))?(qn.isAAC?Gu(Be):Go(Be),qn.pesData=null):(Rt&&Rt.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),qn.pesData=Rt),Br&&(Be=mo(Br))?(mi(Be),ga.pesData=null):ga.pesData=Br,this.sampleAes==null?this.remuxer.remux(qn,$e,ga,this._txtTrack,N,O,j):this.decryptAndRemux(qn,$e,ga,this._txtTrack,N,O,j)},X.decryptAndRemux=function(S,N,O,j,K,ve,ce){if(S.samples&&S.isAAC){var Ie=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){Ie.decryptAndRemuxAvc(S,N,O,j,K,ve,ce)})}else this.decryptAndRemuxAvc(S,N,O,j,K,ve,ce)},X.decryptAndRemuxAvc=function(S,N,O,j,K,ve,ce){if(N.samples){var Ie=this;this.sampleAes.decryptAvcSamples(N.samples,0,0,function(){Ie.remuxer.remux(S,N,O,j,K,ve,ce)})}else this.remuxer.remux(S,N,O,j,K,ve,ce)},X.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},X._parsePAT=function(S,N){return(S[N+10]&31)<<8|S[N+11]},X._parsePMT=function(S,N,O,j){var K,ve,ce,Ie,Me={audio:-1,avc:-1,id3:-1,isAAC:!0};for(K=(S[N+1]&15)<<8|S[N+2],ve=N+3+K-4,ce=(S[N+10]&15)<<8|S[N+11],N+=12+ce;N1;){var An=new Uint8Array(hn[0].length+hn[1].length);An.set(hn[0]),An.set(hn[1],hn[0].length),hn[0]=An,hn.splice(1,1)}if(O=hn[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&&(Me=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,Me>4294967295&&(Me-=8589934592),j&64?(Pe=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[18]&254)/2,Pe>4294967295&&(Pe-=8589934592),Me-Pe>60*9e4&&(l.logger.warn(Math.round((Me-Pe)/9e4)+"s delta between PTS and DTS, align them"),Me=Pe)):Pe=Me),ce=O[8],Be=ce+9,S.size<=Be))return null;S.size-=Be,Ie=new Uint8Array(S.size);for(var $e=0,qn=hn.length;$ega){Be-=ga;continue}else O=O.subarray(Be),ga-=Be,Be=0;Ie.set(O,N),N+=ga}return ve&&(ve-=ce+3),{data:Ie,pts:Me,dts:Pe,len:ve}}else return null},X.pushAccesUnit=function(S,N){if(S.units.length&&S.frame){var O=N.samples,j=O.length;if(isNaN(S.pts))if(j){var K=O[j-1];S.pts=K.pts,S.dts=K.dts}else{N.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||N.sps&&(j||this.contiguous)?(S.id=j,O.push(S)):N.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},X._parseAVCPES=function(S,N){var O=this,j=this._avcTrack,K=this._parseAVCNALu(S.data),ve=!1,ce,Ie=this.avcSample,Me,Pe=!1,Be,hn=this.pushAccesUnit.bind(this),An=function(qn,ga,Wa,qt){return{key:qn,pts:ga,dts:Wa,units:[],debug:qt}};S.data=null,Ie&&K.length&&!j.audFound&&(hn(Ie,j),Ie=this.avcSample=An(!1,S.pts,S.dts,"")),K.forEach(function($e){switch($e.type){case 1:Me=!0,Ie||(Ie=O.avcSample=An(!0,S.pts,S.dts,"")),ve&&(Ie.debug+="NDR "),Ie.frame=!0;var qn=$e.data;if(Pe&&qn.length>4){var ga=new ze(qn).readSliceType();(ga===2||ga===4||ga===7||ga===9)&&(Ie.key=!0)}break;case 5:Me=!0,Ie||(Ie=O.avcSample=An(!0,S.pts,S.dts,"")),ve&&(Ie.debug+="IDR "),Ie.key=!0,Ie.frame=!0;break;case 6:Me=!0,ve&&Ie&&(Ie.debug+="SEI "),ce=new ze(O.discardEPB($e.data)),ce.readUByte();for(var Wa=0,qt=0,Ar=!1,Za=0;!Ar&&ce.bytesAvailable>1;){Wa=0;do Za=ce.readUByte(),Wa+=Za;while(Za===255);qt=0;do Za=ce.readUByte(),qt+=Za;while(Za===255);if(Wa===4&&ce.bytesAvailable!==0){Ar=!0;var nr=ce.readUByte();if(nr===181){var Rt=ce.readUShort();if(Rt===49){var Br=ce.readUInt();if(Br===1195456820){var At=ce.readUByte();if(At===3){var dr=ce.readUByte(),mo=ce.readUByte(),qo=31&dr,Gu=[dr,mo];for(Be=0;Be16){var Go=[];for(Be=0;Be<16;Be++)Go.push(ce.readUByte().toString(16)),(Be===3||Be===5||Be===7||Be===9)&&Go.push("-");var mi=qt-16,Wo=new Uint8Array(mi);for(Be=0;Be0){if(N.pts>=S[O-1].pts)S.push(N);else for(var j=O-1;j>=0;j--)if(N.pts=0)Pe={data:S.subarray(hn,N-ce-1),type:An},Me.push(Pe);else{var $e=this._getLastNalUnit();if($e&&(Ie&&N<=4-Ie&&$e.state&&($e.data=$e.data.subarray(0,$e.data.byteLength-Ie)),K=N-ce-1,K>0)){var qn=new Uint8Array($e.data.byteLength+K);qn.set($e.data,0),qn.set(S.subarray(0,K),$e.data.byteLength),$e.data=qn}}N=0&&ce>=0&&(Pe={data:S.subarray(hn,O),type:An,state:ce},Me.push(Pe)),Me.length===0){var ga=this._getLastNalUnit();if(ga){var Wa=new Uint8Array(ga.data.byteLength+S.byteLength);Wa.set(ga.data,0),Wa.set(S,ga.data.byteLength),ga.data=Wa}}return ve.naluState=ce,Me},X.discardEPB=function(S){for(var N=S.byteLength,O=[],j=1,K,ve;j1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((ga-j)/90)),j=ga)}for(;Pe>24&255,K[1]=N>>16&255,K[2]=N>>8&255,K[3]=N&255,K.set(k,4),O=0,N=8;O>24&255,k>>16&255,k>>8&255,k&255,N>>24,N>>16&255,N>>8&255,N&255,O>>24,O>>16&255,O>>8&255,O&255,85,196,0,0]))},$.mdia=function(k){return $.box($.types.mdia,$.mdhd(k.timescale,k.duration),$.hdlr(k.type),$.minf(k))},$.mfhd=function(k){return $.box($.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},$.minf=function(k){return k.type==="audio"?$.box($.types.minf,$.box($.types.smhd,$.SMHD),$.DINF,$.stbl(k)):$.box($.types.minf,$.box($.types.vmhd,$.VMHD),$.DINF,$.stbl(k))},$.moof=function(k,S,N){return $.box($.types.moof,$.mfhd(k),$.traf(N,S))},$.moov=function(k){for(var S=k.length,N=[];S--;)N[S]=$.trak(k[S]);return $.box.apply(null,[$.types.moov,$.mvhd(k[0].timescale,k[0].duration)].concat(N).concat($.mvex(k)))},$.mvex=function(k){for(var S=k.length,N=[];S--;)N[S]=$.trex(k[S]);return $.box.apply(null,[$.types.mvex].concat(N))},$.mvhd=function(k,S){S*=k;var N=Math.floor(S/(vt+1)),O=Math.floor(S%(vt+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,N>>24,N>>16&255,N>>8&255,N&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 $.box($.types.mvhd,j)},$.sdtp=function(k){var S=k.samples||[],N=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),N.push(K&255),N=N.concat(Array.prototype.slice.call(j));var ve=$.box($.types.avcC,new Uint8Array([1,S[3],S[4],S[5],255,224|k.sps.length].concat(S).concat([k.pps.length]).concat(N))),ce=k.width,Ie=k.height,Me=k.pixelRatio[0],Pe=k.pixelRatio[1];return $.box($.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,Ie>>8&255,Ie&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,$.box($.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),$.box($.types.pasp,new Uint8Array([Me>>24,Me>>16&255,Me>>8&255,Me&255,Pe>>24,Pe>>16&255,Pe>>8&255,Pe&255])))},$.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]))},$.mp4a=function(k){var S=k.samplerate;return $.box($.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]),$.box($.types.esds,$.esds(k)))},$.mp3=function(k){var S=k.samplerate;return $.box($.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]))},$.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?$.box($.types.stsd,$.STSD,$.mp3(k)):$.box($.types.stsd,$.STSD,$.mp4a(k)):$.box($.types.stsd,$.STSD,$.avc1(k))},$.tkhd=function(k){var S=k.id,N=k.duration*k.timescale,O=k.width,j=k.height,K=Math.floor(N/(vt+1)),ve=Math.floor(N%(vt+1));return $.box($.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]))},$.traf=function(k,S){var N=$.sdtp(k),O=k.id,j=Math.floor(S/(vt+1)),K=Math.floor(S%(vt+1));return $.box($.types.traf,$.box($.types.tfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255])),$.box($.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])),$.trun(k,N.length+16+20+8+16+8+8),N)},$.trak=function(k){return k.duration=k.duration||4294967295,$.box($.types.trak,$.tkhd(k),$.mdia(k))},$.trex=function(k){var S=k.id;return $.box($.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]))},$.trun=function(k,S){var N=k.samples||[],O=N.length,j=12+16*O,K=new Uint8Array(j),ve,ce,Ie,Me,Pe,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,Ie>>>16&255,Ie>>>8&255,Ie&255,Me>>>24&255,Me>>>16&255,Me>>>8&255,Me&255,Pe.isLeading<<2|Pe.dependsOn,Pe.isDependedOn<<6|Pe.hasRedundancy<<4|Pe.paddingValue<<1|Pe.isNonSync,Pe.degradPrio&61440,Pe.degradPrio&15,Be>>>24&255,Be>>>16&255,Be>>>8&255,Be&255],12+16*ve);return $.box($.types.trun,K)},$.initSegment=function(k){$.types||$.init();var S=$.moov(k),N;return N=new Uint8Array($.FTYP.byteLength+S.byteLength),N.set($.FTYP),N.set(S,$.FTYP.byteLength),N},$})(),wr=Ha,Ye=9e4;function $a($,X,k,S){return k===void 0&&(k=1),S===void 0&&(S=!1),Mt($,X,1/k)}function Mt($,X,k,S){k===void 0&&(k=1),S===void 0&&(S=!1);var N=$*X*k;return S?Math.round(N):N}function xn($,X){return X===void 0&&(X=!1),Mt($,1e3,1/Ye,X)}function Nn($,X){return X===void 0&&(X=1),Mt($,Ye,1/X)}var Xe=Nn(10),Fa=Nn(.2),Ja=(function(){function $(k,S,N,O){this.observer=k,this.config=S,this.typeSupported=N;var j=navigator.userAgent;this.isSafari=O&&O.indexOf("Apple")>-1&&j&&!j.match("CriOS"),this.ISGenerated=!1}var X=$.prototype;return X.destroy=function(){},X.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},X.resetInitSegment=function(){this.ISGenerated=!1},X.remux=function(S,N,O,j,K,ve,ce){if(this.ISGenerated||this.generateIS(S,N,K),this.ISGenerated){var Ie=S.samples.length,Me=N.samples.length,Pe=K,Be=K;if(Ie&&Me){var hn=(S.samples[0].pts-N.samples[0].pts)/N.inputTimeScale;Pe+=Math.max(0,hn),Be+=Math.max(0,-hn)}if(Ie){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,N,K));var An=this.remuxAudio(S,Pe,ve,ce);if(Me){var $e;An&&($e=An.endPTS-An.startPTS),N.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,N,K)),this.remuxVideo(N,Be,ve,$e,ce)}}else if(Me){var qn=this.remuxVideo(N,Be,ve,0,ce);qn&&S.codec&&this.remuxEmptyAudio(S,Pe,ve,qn)}}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,N,O){var j=this.observer,K=S.samples,ve=N.samples,ce=this.typeSupported,Ie="audio/mp4",Me={},Pe={tracks:Me},Be=this._initPTS===void 0,hn,An;if(Be&&(hn=An=1/0),S.config&&K.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ce.mpeg?(Ie="audio/mpeg",S.codec=""):ce.mp3&&(S.codec="mp3")),Me.audio={container:Ie,codec:S.codec,initSegment:!S.isAAC&&ce.mpeg?new Uint8Array:wr.initSegment([S]),metadata:{channelCount:S.channelCount}},Be&&(hn=An=K[0].pts-S.inputTimeScale*O)),N.sps&&N.pps&&ve.length){var $e=N.inputTimeScale;N.timescale=$e,Me.video={container:"video/mp4",codec:N.codec,initSegment:wr.initSegment([N]),metadata:{width:N.width,height:N.height}},Be&&(hn=Math.min(hn,ve[0].pts-$e*O),An=Math.min(An,ve[0].dts-$e*O),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:hn}))}Object.keys(Me).length?(j.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Pe),this.ISGenerated=!0,Be&&(this._initPTS=hn,this._initDTS=An)):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,N,O,j,K){var ve=8,ce,Ie,Me,Pe,Be,hn,An,$e=S.timescale,qn=S.samples,ga=[],Wa=qn.length,qt=this._PTSNormalize,Ar=this._initPTS,Za=this.nextAvcDts,nr=this.isSafari;if(Wa!==0){nr&&(O|=qn.length&&Za&&(K&&Math.abs(N-Za/$e)<.1||Math.abs(qn[0].pts-Za-Ar)<$e/5)),O||(Za=N*$e),qn.forEach(function(ki){ki.pts=qt(ki.pts-Ar,Za),ki.dts=qt(ki.dts-Ar,Za)}),qn.sort(function(ki,Kv){var zm=ki.dts-Kv.dts,wg=ki.pts-Kv.pts;return zm||wg||ki.id-Kv.id});var Rt=qn.reduce(function(ki,Kv){return Math.max(Math.min(ki,Kv.pts-Kv.dts),-1*Fa)},0);if(Rt<0){l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+xn(Rt,!0)+" ms to overcome this issue");for(var Br=0;Br1?l.logger.log("AVC: "+xn(dr,!0)+" ms hole between fragments detected,filling it"):dr<-1&&l.logger.log("AVC: "+xn(-dr,!0)+" ms overlapping between fragments detected"),Be=Za,qn[0].dts=Be,Pe=Math.max(Pe-dr,Za),qn[0].pts=Pe,l.logger.log("Video: PTS/DTS adjusted: "+xn(Pe,!0)+"/"+xn(Be,!0)+", delta: "+xn(dr,!0)+" ms")),At=qn[qn.length-1],An=Math.max(At.dts,0),hn=Math.max(At.pts,0,An),nr&&(ce=Math.round((An-Be)/(qn.length-1)));for(var mo=0,qo=0,Gu=0;Gu0?xu-1:xu].dts;if(Qv.stretchShortVideoTrack){var Tc=Qv.maxBufferHole,yg=Math.floor(Tc*$e),q0=(j?Pe+j*$e:this.nextAudioPts)-lu.pts;q0>yg?(ce=q0-ps,ce<0&&(ce=ps),l.logger.log("It is approximately "+xn(q0,!1)+" ms to the next segment; using duration "+xn(ce,!1)+" ms for the last video frame.")):ce=ps}else ce=ps}Ic=Math.round(lu.pts-lu.dts)}ga.push({size:ql,duration:ce,cts:Ic,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:lu.key?2:1,isNonSync:lu.key?0:1}})}this.nextAvcDts=An+ce;var xm=S.dropped;if(S.nbNalu=0,S.dropped=0,ga.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var jm=ga[0].flags;jm.dependsOn=2,jm.isNonSync=0}S.samples=ga,Me=wr.moof(S.sequenceNumber++,Be,S),S.samples=[];var Sc={data1:Me,data2:Ie,startPTS:Pe/$e,endPTS:(hn+ce)/$e,startDTS:Be/$e,endDTS:this.nextAvcDts/$e,type:"video",hasAudio:!1,hasVideo:!0,nb:ga.length,dropped:xm};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Sc),Sc}},X.remuxAudio=function(S,N,O,j){var K=S.inputTimeScale,ve=S.timescale,ce=K/ve,Ie=S.isAAC?1024:1152,Me=Ie*ce,Pe=this._PTSNormalize,Be=this._initPTS,hn=!S.isAAC&&this.typeSupported.mpeg,An,$e,qn,ga,Wa,qt,Ar=hn?0:8,Za=S.samples,nr=[],Rt=this.nextAudioPts;if(O|=Za.length&&Rt&&(j&&Math.abs(N-Rt/K)<.1||Math.abs(Za[0].pts-Rt-Be)<20*Me),Za.forEach(function(Tc){Tc.pts=Tc.dts=Pe(Tc.pts-Be,N*K)}),Za=Za.filter(function(Tc){return Tc.pts>=0}),Za.length!==0){if(O||(j?Rt=N*K:Rt=Za[0].pts),S.isAAC)for(var Br=this.config.maxAudioFramesDrift,At=0,dr=Rt;At=Br*Me&&qo.1*Me,mo.pts=mo.dts=dr,dr+=Me,At++}for(var oo=Za.length,iu=0;oo--;)iu+=Za[oo].unit.byteLength;for(var Oi=0,Ui=Za.length;Oi0&&ql0&&($e=Dt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),$e||($e=lu.subarray()),iu+=Ic*$e.length);else if(ql<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+xn(Rt,!0)+" ms / "+xn(cl,!0)+" ms / "+xn(-ql,!0)+" ms"),iu-=lu.byteLength;continue}cl=Rt}if(Wa=cl,iu>0){iu+=Ar;try{qn=new Uint8Array(iu)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:iu,reason:"fail allocating audio mdat "+iu});return}if(!hn){var zs=new DataView(qn.buffer);zs.setUint32(0,iu),qn.set(wr.types.mdat,4)}}else return;for(var Vv=0;Vv=2&&(fs=nr[oo-2].duration,An.duration=fs),oo){this.nextAudioPts=Rt=qt+ce*fs,S.samples=nr,hn?ga=new Uint8Array:ga=wr.moof(S.sequenceNumber++,Wa/ce,S),S.samples=[];var _s=Wa/K,Qv=Rt/K,ps={data1:ga,data2:qn,startPTS:_s,endPTS:Qv,startDTS:_s,endDTS:Qv,type:"audio",hasAudio:!0,hasVideo:!1,nb:oo};return this.observer.trigger(t.default.FRAG_PARSING_DATA,ps),ps}return null}},X.remuxEmptyAudio=function(S,N,O,j){var K=S.inputTimeScale,ve=S.samplerate?S.samplerate:K,ce=K/ve,Ie=this.nextAudioPts,Me=(Ie!==void 0?Ie:j.startDTS*K)+this._initDTS,Pe=j.endDTS*K+this._initDTS,Be=1024,hn=ce*Be,An=Math.ceil((Pe-Me)/hn),$e=Dt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!$e){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var qn=[],ga=0;ga4294967296;)S+=O;return S},$})(),ft=Ja,er=(function(){function $(k){this.observer=k}var X=$.prototype;return X.destroy=function(){},X.resetTimeStamp=function(){},X.resetInitSegment=function(){},X.remux=function(S,N,O,j,K,ve,ce,Ie){var Me=this.observer,Pe="";S&&(Pe+="audio"),N&&(Pe+="video"),Me.trigger(t.default.FRAG_PARSING_DATA,{data1:Ie,startPTS:K,startDTS:K,type:Pe,hasAudio:!!S,hasVideo:!!N,nb:1,dropped:0}),Me.trigger(t.default.FRAG_PARSED)},$})(),yn=er,Na=Object(s.getSelfScope)(),mr;try{mr=Na.performance.now.bind(Na.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),mr=Na.Date.now}var Va=(function(){function $(k,S,N,O){this.observer=k,this.typeSupported=S,this.config=N,this.vendor=O}var X=$.prototype;return X.destroy=function(){var S=this.demuxer;S&&S.destroy()},X.push=function(S,N,O,j,K,ve,ce,Ie,Me,Pe,Be,hn){var An=this;if(S.byteLength>0&&N!=null&&N.key!=null&&N.method==="AES-128"){var $e=this.decrypter;$e==null&&($e=this.decrypter=new u.default(this.observer,this.config));var qn=mr();$e.decrypt(S,N.key.buffer,N.iv.buffer,function(ga){var Wa=mr();An.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:qn,tdecrypt:Wa}}),An.pushDecrypted(new Uint8Array(ga),N,new Uint8Array(O),j,K,ve,ce,Ie,Me,Pe,Be,hn)})}else this.pushDecrypted(new Uint8Array(S),N,new Uint8Array(O),j,K,ve,ce,Ie,Me,Pe,Be,hn)},X.pushDecrypted=function(S,N,O,j,K,ve,ce,Ie,Me,Pe,Be,hn){var An=this.demuxer;if(!An||(ce||Ie)&&!this.probe(S)){for(var $e=this.observer,qn=this.typeSupported,ga=this.config,Wa=[{demux:Bn,remux:ft},{demux:Z.default,remux:yn},{demux:ne,remux:ft},{demux:ha,remux:ft}],qt=0,Ar=Wa.length;qt1?L-1:0),Q=1;Q1?L-1:0),Q=1;Q0)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:Q=p[le++],te+=String.fromCharCode((U&31)<<6|Q&63);break;case 14:Q=p[le++],V=p[le++],te+=String.fromCharCode((U&15)<<12|(Q&63)<<6|(V&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(h,p){this.observer=h,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,Q,V,te;if(p.data?(V=p.start,U=p.end,p=p.data):(V=0,U=p.byteLength),!R.length)return null;for(w=V;w1?w+I:U,L===R[0]&&(R.length===1?E.push({data:p,start:w+8,end:te}):(Q=l.findBox({data:p,start:w+8,end:te},R.slice(1)),Q.length&&(E=E.concat(Q)))),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 Q=l.readUint32(I,w);w+=4;var V=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(ze===1){console.warn("SIDX has hierarchical references (not supported)");return}var mn=l.readUint32(I,ee);ee+=4,L.push({referenceSize:qe,subsegmentDuration:mn,info:{duration:mn/Q,start:le,end:le+qe-1}}),le+=qe,ee+=4,w=ee}return{earliestPresentationTime:V,timescale:Q,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,Q=l.readUint32(I,U),V=l.findBox(w,["mdia","mdhd"])[0];if(V){L=V.data[V.start],U=L===0?12:20;var te=l.readUint32(V,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[Q]={timescale:te,type:Z},R[Z]={timescale:te,id:Q}}}}}}),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 Q,V,te;return Q=l.readUint32(U,4),V=p[Q].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/V})})),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(Q){var V=Q.data[Q.start],te=l.readUint32(Q,4);if(V===0)l.writeUint32(Q,4,te-E*U);else{te*=Math.pow(2,32),te+=l.readUint32(Q,8),te-=E*U,te=Math.max(te,0);var le=Math.floor(te/(u+1)),ne=Math.floor(te%(u+1));l.writeUint32(Q,4,le),l.writeUint32(Q,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 Q=l.getStartDTS(I,p);this.initPTS=U=Q-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 wF});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"),h={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 Q(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=qe.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(ze.lastIndex=0;(o=ze.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},b})(),Jn=mn,Fn={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 Gn(b,g){var f=Fn[g];return!!f&&f[b.slice(0,4)]===!0}function Bn(b,g){return MediaSource.isTypeSupported((g||"video")+'/mp4;codecs="'+b+'"')}var ba=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,ha=/#EXT-X-MEDIA:(.*)/g,pa=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Dt=/(?:(?:#(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?/,vt=/\.(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=[];ba.lastIndex=0;function c(P,q){["video","audio"].forEach(function(H){var re=P.filter(function(Ze){return Gn(Ze,H)});if(re.length){var Fe=re.filter(function(Ze){return Ze.lastIndexOf("avc1",0)===0||Ze.lastIndexOf("mp4a",0)===0});q[H+"Codec"]=Fe.length>0?Fe[0]:re[0],P=P.filter(function(Ze){return re.indexOf(Ze)===-1})}}),q.unknownCodecs=P}for(var _;(_=ba.exec(f))!=null;){var y={},C=y.attrs=new Jn(_[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(ha.lastIndex=0;(_=ha.exec(f))!==null;){var F=new Jn(_[1]);if(F.TYPE===o){var P={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&&(P.url=b.resolve(F.URI,v)),c.length){var q=b.findGroup(c,P.groupId);P.audioCodec=q?q.codec:c[0].codec}y.push(P)}}return y},b.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new me(v),P=0,q=null,H=new ne,re,Fe,Ze,En=null;for(pa.lastIndex=0;(re=pa.exec(f))!==null;){var qa=re[1];if(qa){H.duration=parseFloat(qa);var Ta=(" "+re[2]).slice(1);H.title=Ta||null,H.tagList.push(Ta?["INF",qa,Ta]:["INF",qa])}else if(re[3]){if(Object(i.isFiniteNumber)(H.duration)){var Pa=y++;H.type=c,H.start=C,Ze&&(H.levelkey=Ze),H.sn=Pa,H.level=o,H.cc=P,H.urlId=_,H.baseurl=v,H.relurl=(" "+re[3]).slice(1),Ye(H,q),F.fragments.push(H),q=H,C+=H.duration,H=new ne}}else if(re[4]){var Ya=(" "+re[4]).slice(1);q?H.setByteRange(Ya,q):H.setByteRange(Ya)}else if(re[5])H.rawProgramDateTime=(" "+re[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),En===null&&(En=F.fragments.length);else{if(re=re[0].match(Dt),!re){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(Fe=1;Fe=0&&(Ze.method=Kt,Ze.key=null,Ze.iv=yt));break}case"START":{var zu=new Jn(Et),Zm=zu.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(Zm)&&(F.startTimeOffset=Zm);break}case"MAP":{var ed=new Jn(Et);H.relurl=ed.URI,ed.BYTERANGE&&H.setByteRange(ed.BYTERANGE),H.baseurl=v,H.level=o,H.type=c,H.sn="initSegment",F.initSegment=H,H=new ne,H.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+re);break}}}return H=q,H&&!H.relurl&&(F.fragments.pop(),C-=H.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=P,!F.initSegment&&F.fragments.length&&F.fragments.every(function(xF){return vt.test(xF.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new ne,H.relurl=F.fragments[0].relurl,H.baseurl=v,H.level=o,H.type=c,H.sn="initSegment",F.initSegment=H,F.needSidxRanges=!0),En&&wr(F.fragments,En),F},b})();function wr(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 Ye(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 $a(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Mt=window,xn=Mt.performance,Nn=(function(b){$a(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,P,q;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,P=c.manifestLoadingRetryDelay,q=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,q=0,P=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,P=c.levelLoadingRetryDelay,q=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var H={timeout:F,maxRetry:C,retryDelay:P,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,H,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=xn.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,P=g.getResponseUrl(o,_),q=Ha.parseMasterPlaylist(F,P);if(!q.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var H=q.map(function(En){return{id:En.attrs.AUDIO,codec:En.audioCodec}}),re=Ha.parseMasterPlaylistMedia(F,P,"AUDIO",H),Fe=Ha.parseMasterPlaylistMedia(F,P,"SUBTITLES");if(re.length){var Ze=!1;re.forEach(function(En){En.url||(Ze=!0)}),Ze===!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:P,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,P=_.level,q=_.type,H=g.getResponseUrl(o,_),re=Object(i.isFiniteNumber)(F)?F:0,Fe=Object(i.isFiniteNumber)(P)?P:re,Ze=g.mapContextToLevelType(_),En=Ha.parseLevelPlaylist(o.data,H,Fe,Ze,re);if(En.tload=c.tload,q===E.MANIFEST){var qa={url:H,details:En};C.trigger(l.default.MANIFEST_LOADED,{levels:[qa],audioTracks:[],url:H,stats:c,networkDetails:y})}if(c.tparsed=xn.now(),En.needSidxRanges){var Ta=En.initSegment.url;this.load({url:Ta,isSidxRequest:!0,type:q,level:P,levelDetails:En,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=En,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,P){var q=F.info;if(C){var H=C.fragments[P];H.byteRange.length===0&&H.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,P=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}P&&(P.abort(),this.resetInternalLoader(o.type));var q={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:P,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,P=_.id,q=_.levelDetails;if(!q||!q.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var H=g.canHaveQualityLevels(_.type);if(H)this.hls.trigger(l.default.LEVEL_LOADED,{details:q,level:F||0,id:P||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:q,id:P,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:q,id:P,stats:c,networkDetails:y});break}},g})(R),Xe=Nn;function Fa(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Ja=(function(b){Fa(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,P=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 P(C);var H,re,Fe;H={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var Ze=c.byteRangeStartOffset,En=c.byteRangeEndOffset;Object(i.isFiniteNumber)(Ze)&&Object(i.isFiniteNumber)(En)&&(H.rangeStart=Ze,H.rangeEnd=En),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(H,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),ft=Ja;function er(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var yn=(function(b){er(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 P={url:C,frag:c,responseType:"arraybuffer"},q={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},H={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(P,q,H)}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),Na=yn;function mr(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Va={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},$t=(function(b){mr(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 P=_[F];if(P.body.type!==c||!P.buffered)return!1;var q=P.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 P=_.fragments[F];if(P.buffered===!0){var q=P.range[o];if(q){y=q.time;for(var H=0;H=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))}),P=!0;else if(c<=C)break;return{time:y,partial:P}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,P=0;return Object.keys(this.fragments).forEach(function(q){var H=c.fragments[q];c.isPartial(H)&&(y=H.body.startPTS-c.bufferPadding,C=H.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),P<=_&&(F=H.body,P=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=Va.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=Va.PARTIAL:y=Va.OK:y=Va.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),$={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=$,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,P,q=v,H=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 $e(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 P,q,H;for(P=F-b.startSN,q=b.fragments,q[P]=g,H=P;H>0;H--)An(q,H,H-1);for(H=P;Hv.length))for(var c=0;cg?-1:0})}function At(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 iu(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,lu=.05,cl=(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,P=!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((P||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var H=k.bufferInfo(c,y,0),re=H.len>0,Fe=H.nextStart||0;if(!(!re&&!Fe)){if(C){var Ze=H.len>Ui,En=!Fe||Fe-y>Ui;if(Ze||En)return;this.moved=!1}if(!this.moved&&this.stalled){var qa=Math.max(Fe,H.start||0)-y;if(qa>0&&qa<=Ui){this._trySkipBufferHole(null);return}}var Ta=self.performance.now();if(_===null){this.stalled=Ta;return}var Pa=Ta-_;!C&&Pa>=Oi&&this._reportStall(H.len);var Ya=k.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ya,Pa)}}},g._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var P=this._trySkipBufferHole(F);if(P)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 P=_.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 Vv(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"},fs=(function(b){Vv(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===Va.PARTIAL||C===Va.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 P=this.fragCurrent;if(F.len===0&&P){var q=o.maxFragLookUpTolerance,H=P.start-q,re=P.start+P.duration+q;Cre?(P.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),P.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})(zs);function _s(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 P=F.bitrate,q;P?q=Math.max(8*c.maxBufferSize/P,c.maxBufferLength):q=c.maxBufferLength,q=Math.min(q,c.maxMaxBufferLength);var H=k.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),re=H.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(H,Fe)){var Ze={};this.altAudio&&(Ze.type="video"),this.hls.trigger(l.default.BUFFER_EOS,Ze),this.state=pe.ENDED;return}this._fetchPayloadOrEos(y,H,Fe)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,P=F.length;if(P!==0){var q=F[0].start,H=F[P-1].start+F[P-1].duration,re=c.end,Fe;if(_.initSegment&&!_.initSegment.data)Fe=_.initSegment;else if(_.live){var Ze=this.config.initialLiveManifestSize;if(PZe&&Ze>H.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+Ze.toFixed(3)),H.currentTime=Ze),this.nextLoadPosition=Ze}if(o.PTSKnown&&c>y&&H&&H.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=mi(F,C.endProgramDateTime,q.maxFragLookUpTolerance);else{var En=C.sn+1;if(En>=o.startSN&&En<=o.endSN){var qa=F[En-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(Ta){return C.cc-Ta.cc}),re&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+re.sn))}re||(re=F[Math.min(P-1,Math.round(P/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+re.sn))}return re},f._findFragment=function(o,c,_,y,C,F,P){var q=this.hls.config,H;if(CF-q.maxFragLookUpTolerance?0:q.maxFragLookUpTolerance;H=Wo(c,y,C,re)}else H=y[_-1];if(H){var Fe=H.sn-P.startSN,Ze=c&&H.level===c.level,En=y[Fe-1],qa=y[Fe+1];if(c&&H.sn===c.sn)if(Ze&&!H.backtracked)if(H.snq.maxBufferHole&&c.dropped&&Fe?(H=En,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")):(H=qa,s.logger.log("Re-loading fragment with SN: "+H.sn))}else H=null;else H.backtracked&&(qa&&qa.backtracked?(s.logger.warn("Already backtracked from fragment "+qa.sn+", will not backtrack to fragment "+H.sn+". Loading fragment "+qa.sn),H=qa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),H.dropped=0,En?(H=En,H.backtracked=!0):Fe&&(H=null)))}return H},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===Va.NOT_LOADED||c===Va.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===Va.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],P=this.fragLastKbps;P&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*P)+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 cl(_,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,P=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var q=C.details;q&&c.fragments.length>0?(qn(q,c),P=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(P,q),c.PTSKnown&&Object(i.isFiniteNumber)(P)?s.logger.log("live playlist sliding:"+P.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 H=c.startTimeOffset;Object(i.isFiniteNumber)(H)?(H<0&&(s.logger.log("negative start time offset "+H+", count from end of last fragment"),H=P+F+H),s.logger.log("start time offset found in playlist, adjust startPosition to "+H),this.startPosition=H):c.live?(this.startPosition=this.computeLivePosition(P,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 P=o.stats,q=y[c.level],H=q.details;if(this.bitrateTest=!1,this.stats=P,s.logger.log("Loaded "+c.sn+" of ["+H.startSN+" ,"+H.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=pe.IDLE,this.startFragRequested=!1,P.tparsed=P.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=pe.IDLE,P.tparsed=P.tbuffered=window.performance.now(),H.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+H.startSN+" ,"+H.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)&&(H.PTSKnown||!H.live),Fe=H.initSegment?H.initSegment.data:[],Ze=this._getAudioCodec(q),En=this.demuxer=this.demuxer||new Be(this.hls,"main");En.push(o.payload,Fe,Ze,q.videoCodec,c,H.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 P=this.levels[this.level].audioCodec,q=navigator.userAgent.toLowerCase();P&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),P.indexOf("mp4a.40.5")!==-1?P="mp4a.40.2":P="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&q.indexOf("firefox")===-1&&(P="mp4a.40.5"),q.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(P="mp4a.40.2",s.logger.log("Android: force audio codec to "+P)),F.levelCodec=P,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 H=F.initSegment;H&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:H,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 P=C.details;if(P&&F.sn===P.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=$e(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),H=this.hls;H.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,H.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 P=c[F];P.id==="main"?(y=F,_=P,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 : "+nr.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},Qv(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})(fs),q0=yg;function xm(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 H=0;H=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:_})}}},jm(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),Vm=a("./src/demux/id3.js");function bw(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 o_(b){if(b&&b.cues)for(;b.cues.length>0;)b.removeCue(b.cues[0])}function xC(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=P+.25);for(var H=0;H=this.minWeight_},g.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},g.destroy=function(){},b})(),KC=QC;function Tw(b,g){for(var f=0;f500*_.duration/q){var H=o.levels,re=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/P),Fe=H[_.level],Ze=Fe.realBitrate?Math.max(Fe.realBitrate,Fe.bitrate):Fe.bitrate,En=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*Ze/8)),qa=c.currentTime,Ta=(En-F.loaded)/re,Pa=(k.bufferInfo(c,qa,o.config.maxBufferHole).end-qa)/q;if(Pa<2*_.duration/q&&Ta>Pa){var Ya,Et;for(Et=_.level-1;Et>C;Et--){var vl=H[Et].realBitrate?Math.max(H[Et].realBitrate,H[Et].bitrate):H[Et].bitrate,di=_.duration*vl/(8*.8*re);if(di=y;re--){var Fe=H[re];if(Fe){var Ze=Fe.details,En=Ze?Ze.totalduration/Ze.fragments.length:c,qa=Ze?Ze.live:!1,Ta=void 0;re<=o?Ta=P*_:Ta=q*_;var Pa=H[re].realBitrate?Math.max(H[re].realBitrate,H[re].bitrate):H[re].bitrate,Ya=Pa*En/Ta;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+re+"/"+Math.round(Ta)+"/"+Pa+"/"+En+"/"+F+"/"+Ya),Ta>Pa&&(!Ya||qa&&!this.bitrateTestDelay||Ya=0)return En;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,Ta=y.abrBandWidthFactor,Pa=y.abrBandWidthUpFactor;if(Ze===0){var Ya=this.bitrateTestDelay;if(Ya){var Et=q?Math.min(q,y.maxLoadingDelay):y.maxLoadingDelay;qa=Et-Ya,s.logger.trace("bitrate test took "+Math.round(1e3*Ya)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*qa)+" ms"),Ta=Pa=1}}return En=this._findBestLevel(P,q,Fe,C,c,Ze+qa,Ta,Pa,_),Math.max(En,0)}}]),g})(R),nF=eF;function aF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Cw=j(),tF=(function(b){aF(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(H,re){return re.parent===_?H+1:H},0),C={},F=o.sourceBuffer;for(var P in F){var q=F[P];if(!q)throw Error("handling source buffer update end error: source buffer for "+P+" uninitilized and unable to update buffered TimeRanges.");C[P]=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(P){s.logger.warn("can not abort audio buffer: "+P)}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&&Cw){var _=this.mediaSource=new Cw;_.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,P=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+P+")");try{var q=c[y]=_.addSourceBuffer(P);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(H){s.logger.error("error while trying to add sourceBuffer:"+H.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:H,mimeType:P})}}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 P=y[F],q=_[P];if(q){var H=q.buffered;H.length>0&&C>H.start(0)&&this.removeBufferRange(P,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 P={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};q.code===22?(this.segments=[],P.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,P.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],P.fatal=!0)),c.trigger(l.default.ERROR,P)}}}},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+","+H+"], of ["+F+","+P+"], pos:"+re),c.remove(q,H),!0}}}catch(Fe){s.logger.warn("removeBufferRange failed",Fe)}return!1},g})(R),rF=tF;function Fw(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(H,re){return re?H.width!==re.width||H.height!==re.height:!0},C=o.length-1,F=0;F=c||P.height>=_)&&y(P,o[F+1])){C=F;break}}return C},oF(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),Gw=uF;function iF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Yv=window,lF=Yv.performance,Ig=(function(b){iF(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=lF.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,P=c-this.lastDecodedFrames,q=1e3*F/C,H=this.hls;if(H.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:P,totalDroppedFrames:_}),q>0&&F>H.config.fpsDroppedMonitoringThreshold*P){var re=H.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+re),re>0&&(H.autoLevelCapping===-1||H.autoLevelCapping>=re)&&(re=re-1,H.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:re,droppedLevel:H.currentLevel}),H.autoLevelCapping=re,H.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),cF=Ig,Mw=window,Tg=Mw.performance,sF=Mw.XMLHttpRequest,vF=(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:Tg.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},g.loadInternal=function(){var v,o=this.context;v=this.loader=new sF;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(Tg.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Tg.now());var P,q;y.responseType==="arraybuffer"?(P=o.response,q=P.byteLength):(P=o.responseText,q=P.length),_.loaded=_.total=q;var H={url:o.responseURL,data:P};this.callbacks.onSuccess(H,_,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})(),Sg=vF;function Aw(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,P=function(){c.forEach(function(H){F||(!o.audioGroupId||H.groupId===o.audioGroupId)&&(!y||y===H.name)&&(o._setAudioTrack(H.id),F=!0)})};P(),F||(y=null,P()),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,P=0;P0&&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 P=this.mediaBuffer?this.mediaBuffer:this.media,q=this.videoBuffer?this.videoBuffer:this.media,H=k.bufferInfo(P,o,C.maxBufferHole),re=k.bufferInfo(q,o,C.maxBufferHole),Fe=H.len,Ze=H.end,En=this.fragPrevious,qa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Ta=Math.max(qa,re.len),Pa=this.audioSwitch,Ya=this.trackId;if((Fe"u"){this.state=pe.WAITING_TRACK;break}if(!Pa&&this._streamEnded(H,_)){this.hls.trigger(l.default.BUFFER_EOS,{type:"audio"}),this.state=pe.ENDED;return}var Et=_.fragments,vl=Et.length,di=Et[0].start,Gc=Et[vl-1].start+Et[vl-1].duration,Kt;if(Pa){if(_.live&&!_.PTSKnown)s.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),Ze=0;else if(Ze=o,_.PTSKnown&&odi||H.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=di+.05;else return}if(_.initSegment&&!_.initSegment.data)Kt=_.initSegment;else if(Ze<=di){if(Kt=Et[0],this.videoTrackCC!==null&&Kt.cc!==this.videoTrackCC&&(Kt=Br(Et,this.videoTrackCC)),_.live&&Kt.loadIdx&&Kt.loadIdx===this.fragLoadIdx){var ar=H.nextStart?H.nextStart:di;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ar+.05)),this.media.currentTime=ar+.05;return}}else{var yt,zu=C.maxFragLookUpTolerance,Zm=En?Et[En.sn-Et[0].sn+1]:void 0,ed=function(Pg){var a8=Math.min(zu,Pg.duration);return Pg.start+Pg.duration-a8<=Ze?1:Pg.start-a8>Ze&&Pg.start?-1:0};ZeGc-zu&&(zu=0),Zm&&!ed(Zm)?yt=Zm:yt=X.search(Et,ed)):yt=Et[vl-1],yt&&(Kt=yt,di=yt.start,En&&Kt.level===En.level&&Kt.sn===En.sn&&(Kt.sn<_.endSN?(Kt=Et[Kt.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+Kt.sn)):Kt=null))}Kt&&(Kt.encrypted?(s.logger.log("Loading key for "+Kt.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ya),this.state=pe.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:Kt})):(s.logger.log("Loading "+Kt.sn+", cc: "+Kt.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ya+", currentTime:"+o+",bufferEnd:"+Ze.toFixed(3)),this.fragCurrent=Kt,(Pa||this.fragmentTracker.getState(Kt)===Va.NOT_LOADED)&&(Kt.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(Kt.sn)&&(this.nextLoadPosition=Kt.start+Kt.duration),y.trigger(l.default.FRAG_LOADING,{frag:Kt}),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 xF=ms.now(),Z4=this.retryDate;P=this.media;var Moe=P&&P.seeking;(!Z4||xF>=Z4||Moe)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=pe.IDLE);break;case pe.WAITING_INIT_PTS:var jF=this.videoTrackCC;if(this.initPTS[jF]===void 0)break;var e8=this.waitingFragment;if(e8){var n8=e8.frag.cc;jF!==n8?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+n8+") does not match video track CC ("+jF+")"),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(Pw):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 P=y.details;P&&c.fragments.length>0?(qn(P,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,P=c.level,q=c.sn,H=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=ms.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 Ze=this.initPTS[H],En=C.initSegment?C.initSegment.data:[];if(C.initSegment||Ze!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+P);var qa=!1;this.demuxer.push(o.payload,En,re,null,c,F,qa,Ze)}else s.logger.log("unknown video PTS for continuity counter "+H+", waiting for video PTS before demuxing audio frag "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+P),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 P={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[P]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,P))}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],P=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),$e(F.details,_,o.startPTS,o.endPTS);var q=this.audioSwitch,H=this.media,re=!1;if(q)if(H&&H.readyState){var Fe=H.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,P.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),re=!0,this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var Ze=this.pendingData;if(!Ze){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),P.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(En){En&&En.length&&Ze.push({type:o.type,data:En,parent:"audio",content:"data"})}),!re&&Ze.length&&(Ze.forEach(function(En){c.state===pe.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,En))}),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=ms.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=ms.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 : "+nr.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=ms.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 P=this.mediaBuffer,q=this.media.currentTime,H=P&&k.isBuffered(P,q)&&k.isBuffered(P,q+.5);if(H){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())},W0(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})(fs),hF=dF,Ow=(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.");vl=yt,this.hasBeenReset=!0}})),Object.defineProperty(P,"positionAlign",c({},q,{get:function(){return di},set:function(yt){var zu=o(yt);if(!zu)throw new SyntaxError("An invalid or illegal string was specified.");di=zu,this.hasBeenReset=!0}})),Object.defineProperty(P,"size",c({},q,{get:function(){return Gc},set:function(yt){if(yt<0||yt>100)throw new Error("Size must be between 0 and 100.");Gc=yt,this.hasBeenReset=!0}})),Object.defineProperty(P,"align",c({},q,{get:function(){return Kt},set:function(yt){var zu=o(yt);if(!zu)throw new SyntaxError("An invalid or illegal string was specified.");Kt=zu,this.hasBeenReset=!0}})),P.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_})(),gF=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function Uw(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new gF,this.regionList=[]}function DF(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 kw(){this.values=Object.create(null)}kw.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 Bw(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 $0=new Ow(0,0,0),Fc=$0.align==="middle"?"middle":"center";function RF(b,g,f){var v=b;function o(){var y=DF(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 kw;Bw(y,function(H,re){switch(H){case"region":for(var Fe=f.length-1;Fe>=0;Fe--)if(f[Fe].id===re){F.set(H,f[Fe].region);break}break;case"vertical":F.alt(H,re,["rl","lr"]);break;case"line":var Ze=re.split(","),En=Ze[0];F.integer(H,En),F.percent(H,En)&&F.set("snapToLines",!1),F.alt(H,En,["auto"]),Ze.length===2&&F.alt("lineAlign",Ze[1],["start",Fc,"end"]);break;case"position":Ze=re.split(","),F.percent(H,Ze[0]),Ze.length===2&&F.alt("positionAlign",Ze[1],["start",Fc,"end","line-left","line-right","auto"]);break;case"size":F.percent(H,re);break;case"align":F.alt(H,re,["start",Fc,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var P=F.get("line","auto");P==="auto"&&$0.line===-1&&(P=-1),C.line=P,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Fc);var q=F.get("position","auto");q==="auto"&&$0.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 Hw(b){return b.replace(//gi,` `)}Uw.prototype={parse:function(g){var f=this;g&&(f.buffer+=f.decoder.decode(g,{stream:!0}));function v(){var F=f.buffer,P=0;for(F=Hw(F);P")===-1){f.cue.id=c;continue}case"CUE":try{RF(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 yF=Uw;function wF(b,g,f,v){for(var o,c,_,y,C,F=window.VTTCue||TextTrackCue,P=0;P=16?y--:y++,navigator.userAgent.match(/Firefox\//)?c.line=P+1:c.line=P>7?P-2:P+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(y/32))),b.addCue(c)}}var Cg={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},Jw=function(g){var f=g;return Cg.hasOwnProperty(g)&&(f=Cg[g]),String.fromCharCode(f)},sl=15,ds=100,bF={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},EF={17:2,18:4,21:6,22:8,23:10,19:13,20:15},IF={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},TF={25:2,26:4,29:6,30:8,31:10,27:13,28:15},SF=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],qw;(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"})(qw||(qw={}));var Lt={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}},Xv=function(g){for(var f=[],v=0;vds&&(Lt.log("ERROR","Too large cursor position "+this.pos),this.pos=ds)},g.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=Jw(v);if(this.pos>=ds){Lt.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})(),Km=(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[sl-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[sl-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,Lt.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]}Lt.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},g.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Lt.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})(),Ym=(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 Km(1,v),new Km(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,Lt.setTime(v);for(var F=0;F ("+Xv([_,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 P=this.channels[this.currChNr-1];P.insertChars(C)}else Lt.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Lt.log("WARNING","Couldn't parse cleaned data "+Xv([_,y])+" orig: "+Xv([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,Lt.log("DEBUG","Repeated command ("+Xv([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 Lt.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Lt.log("DEBUG","MIDROW ("+Xv([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?bF[v]:IF[v]:_=c===1?EF[v]:TF[v];var F=this.interpretPAC(_,o),P=this.channels[c-1];return P.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,Lt.log("INFO","Special char '"+Jw(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=Xv(_);Lt.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,P=(v===23||v===31)&&o>=45&&o<=47;return F||P?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=SF[_],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})(),Gg=function(g,f,v){return g.substr(v||0,f.length)===f},MF=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},Xm=function(g){for(var f=5381,v=g.length;v;)f=f*33^g.charCodeAt(--v);return(f>>>0).toString()},AF=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},LF={parse:function(g,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(Vm.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(y,` `).split(` `),F="00:00.000",P=0,q=0,H=0,re=[],Fe,Ze=!0,En=!1,qa=new yF;qa.oncue=function(Ta){var Pa=v[o],Ya=v.ccOffset;Pa&&Pa.new&&(q!==void 0?Ya=v.ccOffset=Pa.start:AF(v,o,H)),H&&(Ya=H-v.presentationOffset),En&&(Ta.startTime+=Ya-q,Ta.endTime+=Ya-q),Ta.id=Xm(Ta.startTime.toString())+Xm(Ta.endTime.toString())+Xm(Ta.text),Ta.text=decodeURIComponent(encodeURIComponent(Ta.text)),Ta.endTime>0&&re.push(Ta)},qa.onparsingerror=function(Ta){Fe=Ta},qa.onflush=function(){if(Fe&&_){_(Fe);return}c(re)},C.forEach(function(Ta){if(Ze)if(Gg(Ta,"X-TIMESTAMP-MAP=")){Ze=!1,En=!0,Ta.substr(16).split(",").forEach(function(Pa){Gg(Pa,"LOCAL:")?F=Pa.substr(6):Gg(Pa,"MPEGTS:")&&(P=parseInt(Pa.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),P-=f,q=MF(F)/1e3,H=P/9e4}catch(Pa){En=!1,Fe=Pa}return}else Ta===""&&(Ze=!1);qa.parse(Ta+` `)}),qa.flush()}},NF=LF;function $w(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function PF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var OF=(function(b){PF(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 Ww($w(o),"textTrack1"),_=new Ww($w(o),"textTrack2");o.cea608Parser=new GF(0,c,_)}return o}var f=g.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,P=C.length;P--;){var q=C[P],H=UF(q[0],q[1],c,_);if(H>=0&&(q[0]=Math.min(q[0],c),q[1]=Math.max(q[1],_),F=!0,H/(_-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(P){c.onFragLoaded(P)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!P||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),y.live){var q=Ar(P.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 P=C[o];P&&(P.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[P].start&&F<=y[P].end){C=y[P];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&&ga(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=In.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(P){var q=In.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:P,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,P=o.maxFragLookUpTolerance,q=Math.min(o.maxBufferLength,o.maxMaxBufferLength),H=k.bufferedInfo(this._getBuffered(),y.currentTime,F),re=H.end,Fe=H.len,Ze=C[c].details,En=Ze.fragments,qa=En.length,Ta=En[qa-1].start+En[qa-1].duration;if(Fe>q)return;var Pa,Ya=this.fragPrevious;rezw){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=zw-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){if(o.mediaKeySystemDomain===Zr.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(P){s.logger.error("Failure requesting DRM license: "+P),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(Zr.WIDEVINE,c,_)}},HF(g,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),g})(R),qF=Qw;function WF(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);nb.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 h(w){var I=s.console[w];return I?function(){for(var L=arguments.length,U=new Array(L),Q=0;Q1?I-1:0),U=1;U{"use strict";Object.defineProperty(aw,"__esModule",{value:!0});aw.Direction=void 0;var r5e;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(r5e=aw.Direction||(aw.Direction={}))});var jP=Ue(st=>{"use strict";var tw=st&&st.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(h&&ht)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,")"))}st.checkBoundaries=s5e;function v5e(e,n,a){return ea?a:e}st.checkValuesAgainstBoundaries=v5e;function f5e(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}"))}st.checkInitialOverlap=f5e;function _5e(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)}}st.getMargin=_5e;function p5e(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)}}st.getPaddingAndBorder=p5e;function m5e(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return cae(r,t*n[u].x,n[u].y)})}st.translateThumbs=m5e;function d5e(e,n,a,t){for(var r=0,u=iae(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},w5e=function(e,n,a,t,r,u,i){i===void 0&&(i=function(h){return h});var l=[],s=function(h){var p=uae(a[h],t[h],r,u,i),R=n[h].x;n.forEach(function(E,w){var I=E.x,L=uae(a[w],t[w],r,u,i);h!==w&&(R>=I&&R<=I+L||R+p>=I&&R+p<=I+L)&&(l.includes(w)||(l.push(h),l.push(w),l=tw(tw([],l,!0),[h,w],!1),s(w)))})};return s(e),Array.from(new Set(l.sort()))},b5e=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,st.getStepDecimals)(t),l=(0,xP.useState)({}),s=l[0],h=l[1],p=(0,xP.useState)(u(n[a].toFixed(i))),R=p[0],E=p[1];return(0,xP.useEffect)(function(){if(e){var w=e.getThumbs();if(w.length<1)return;var I={},L=e.getOffsets(),U=w5e(a,L,w,n,r,i,u),Q=u(n[a].toFixed(i));if(U.length){var V=U.reduce(function(ee,me,qe,ze){return ee.length?tw(tw([],ee,!0),[L[ze[qe]].x],!1):[L[ze[qe]].x]},[]);if(Math.min.apply(Math,V)===L[a].x){var te=[];U.forEach(function(ee){te.push(n[ee].toFixed(i))}),Q=Array.from(new Set(te.sort(function(ee,me){return parseFloat(ee)-parseFloat(me)}))).map(u).join(r);var le=Math.min.apply(Math,V),ne=Math.max.apply(Math,V),Z=w[U[V.indexOf(ne)]].getBoundingClientRect().width;I.left="".concat(Math.abs(le-(ne+Z))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(Q),h(I)}},[e,n]),[R,s]};st.useThumbOverlap=b5e;function iae(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return lae(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var vae=Ue(yc=>{"use strict";var E5e=yc&&yc.__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)}})(),I5e=yc&&yc.__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]})),T5e=yc&&yc.__setModuleDefault||(Object.create?(function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}):function(e,n){e.default=n}),S5e=yc&&yc.__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)&&I5e(n,e,a);return T5e(n,e),n},sae=yc&&yc.__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,cr.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,cr.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,cr.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,cr.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,h=u.rtl,p=u.direction,R=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),w=h||p===Su.Direction.Left||p===Su.Direction.Down?-1:1;E!==-1&&(C5e.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,cr.replaceAt)(i,E,t.normalizeValue(i[E]+w*(r.key==="PageUp"?s*10:s),E)))):F5e.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,cr.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,h=t.props,p=h.direction,R=h.min,E=h.max,w=h.onChange,I=h.values,L=h.step,U=h.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var Q=t.trackRef.current;if(!Q)return null;var V=Q.getBoundingClientRect(),te=(0,cr.isVertical)(p)?V.height:V.width;if(s[0]!==-1&&s[1]!==-1){var le=r-s[0],ne=u-s[1],Z=0;switch(p){case Su.Direction.Right:case Su.Direction.Left:Z=le/te*(E-R);break;case Su.Direction.Down:case Su.Direction.Up:Z=ne/te*(E-R);break;default:(0,cr.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,cr.replaceAt)(I,l,t.normalizeValue(ze,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,h=i.step,p=i.allowOverlap,R=i.values;return(0,cr.normalizeValue)(r,u,l,s,h,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,cr.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?cr.voidFn:this.onMouseDownTrack,onTouchStart:E?cr.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:sae(sae([],U.map(function(Q,V,te){return l({props:{style:a.props.direction===Su.Direction.Left||a.props.direction===Su.Direction.Right?{position:"absolute",left:"".concat(Q[0],"px"),marginTop:"".concat(Q[1],"px")}:{position:"absolute",top:"".concat(Q[0],"px"),marginLeft:"".concat(Q[1],"px")},key:"mark".concat(V),ref:a.markRefs[V]},index:V})}),!0),s.map(function(Q,V){var te=a.state.draggedThumbIndex===V;return u({index:V,value:Q,isDragged:te,props:{style:{position:"absolute",zIndex:L[V],cursor:E?"inherit":te?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:V,tabIndex:E?void 0:0,"aria-valuemax":R?p:s[V+1]||p,"aria-valuemin":R?h:s[V-1]||h,"aria-valuenow":Q,draggable:!1,ref:a.thumbRefs[V],role:"slider",onKeyDown:E?cr.voidFn:a.onKeyDown,onKeyUp:E?cr.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:Su.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n})(nC.Component);yc.default=G5e});var fae=Ue(Pi=>{"use strict";var M5e=Pi&&Pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.checkValuesAgainstBoundaries=Pi.relativeValue=Pi.useThumbOverlap=Pi.Direction=Pi.getTrackBackground=Pi.Range=void 0;var A5e=M5e(vae());Pi.Range=A5e.default;var aC=jP();Object.defineProperty(Pi,"getTrackBackground",{enumerable:!0,get:function(){return aC.getTrackBackground}});Object.defineProperty(Pi,"useThumbOverlap",{enumerable:!0,get:function(){return aC.useThumbOverlap}});Object.defineProperty(Pi,"relativeValue",{enumerable:!0,get:function(){return aC.relativeValue}});Object.defineProperty(Pi,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return aC.checkValuesAgainstBoundaries}});var L5e=eC();Object.defineProperty(Pi,"Direction",{enumerable:!0,get:function(){return L5e.Direction}})});var CJe={};t8(CJe,{boot:()=>SJe});var o8=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 f8=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 rd=function(e){return e.slice().reverse()};var p8=function(e,n){return n.filter(e)};var m8=(function(){function e(n,a,t,r,u,i){var l,s,h,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,h=l,p=u;s0?(t[p++]=E,++h):(t[p++]=R,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var gr={show:q8};var W8=function(e){return e.showRecordFields},p_=function(){return function(){return function(e){var n=W8(e);return{show:function(a){return"{"+(n(Tt.value)(a)+"}")}}}}};var Y0={show:H8},fn={show:B8},qg={show:J8},ld={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 m_=function(e){var n=hr(e);return function(a){var t=W8(a);return function(r){var u=oe(r);return{showRecordFields:function(i){return function(l){var s=t(Tt.value)(l),h=n(Tt.value),p=Vu(h)(l);return" "+(h+(": "+(u(p)+(","+s))))}}}}}},d_=function(e){var n=hr(e);return function(a){var t=oe(a);return{showRecordFields:function(r){return function(u){var i=n(Tt.value),l=Vu(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})(),Wg=function(e){return e};var cd=function(e){return e.to};var sd=function(e){return e.from};var fue=wn(Tn),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 $8=function(e){var n=on(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])}}},Dr=Wn(!0)(Dn(!1)),Tr=Wn(!1)(Dn(!0));var ue={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},_ue=B(ue);var We=function(e){return Wn(e)(fue)},vr=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 Qr=function(e){var n=Ee(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}}}},Ji=function(e){var n=Qe(e),a=Qr(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return Je.value;if(t instanceof G)return Re.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 wo={apply:function(e){return function(n){if(e instanceof T)return _ue(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 wo}};var Ua=(function(){return{pure:T.create,Apply0:function(){return wo}}})();var hu={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return ue}},pue=(function(){return{empty:G.value,Alt0:function(){return hu}}})(),gu={Applicative0:function(){return Ua},Plus1:function(){return pue}};var Ae=(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 nv=function(e){return Wn(new Ae(e))(Le.create)};var eo={map:function(e){return function(n){if(n instanceof Ae)return new Ae(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])}}},due=B(eo);var Sr=function(e){return function(n){return function(a){if(a instanceof Ae)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])}}},h_=(function(){return Sr(Dn(G.value))(T.create)})();var $g={apply:function(e){return function(n){if(e instanceof Ae)return new Ae(e.value0);if(e instanceof Le)return due(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 eo}};var gi={bind:Sr(function(e){return function(n){return new Ae(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return $g}};var av=(function(){return{pure:Le.create,Apply0:function(){return $g}}})(),pb={Applicative0:function(){return av},Bind1:function(){return gi}};var jl=function(e){return e};var tv={map:function(e){return function(n){return e(n)}}};var x8={apply:function(e){return function(n){return e(n)}},Functor0:function(){return tv}},hue={bind:function(e){return function(n){return n(e)}},Apply0:function(){return x8}},xg={pure:jl,Apply0:function(){return x8}},Kr={Applicative0:function(){return xg},Bind1:function(){return hue}};var j8=function(e){return Math.min(Math.abs(e),2147483647)},z8=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},V8=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var YF={Ring0:function(){return Xs}};var su=function(e){return e.mod};var uo={degree:j8,div:z8,mod:V8,CommutativeRing0:function(){return YF}},jo=function(e){return e.div};var fr={mempty:"",Semigroup0:function(){return V0}};var Gt=function(e){return e.mempty};var K8=function(e){return function(){return e}},Y8=function(e){return function(n){return function(){return n(e())()}}};var XF=function(e){return function(n){return function(){for(var a=0,t=e.length;a=0;u--)t=e(a[u])(t);return t}}},E7=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 tle=Pr(Ve),tO=Rs(y_),rle=rr(Ve);var gd=function(e){return e.foldrWithIndex};var cD=function(e){return e.foldlWithIndex};var ole=function(e){var n=gd(e);return function(a){var t=on(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)}}},sD={foldrWithIndex:function(e){return function(n){var a=tle(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=tO(Rn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=rle(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=tO(Rn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return ole(sD)(e)},Foldable0:function(){return Ve}};var rO=function(e){var n=cD(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 oO=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},_r=function(e){return e},uO=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 Pb=isFinite;var Ob=Math.abs;var Dd=Math.floor,bG=Math.log;var Ub=function(e){return function(n){return Math.pow(e,n)}};var gp=Math.round;var iO=2.302585092994046;var lO=Lr(Jg),cO=Ut(Jg);var _le=(function(){return uO(T.create)(G.value)})(),uv=_le(10),_f=(function(){return oO(T.create)(G.value)})(),sO=function(e){if(!Pb(e))return 0;if(e>=_r(lO))return lO;if(e<=_r(cO))return cO;if(xe)return We(0)(_f(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},kb=function(e){return sO(gp(e))};var Nu=function(e){return sO(Dd(e))};function Bb(e){return Object.prototype.toString.call(e).slice(8,-1)}function Dp(e){return e===null}function Rp(e){return e===void 0}var Hb=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function vO(e){return e.stack||e.toString()}function $i(e){return new Error(e)}function Rd(e){return e.message}function Jb(e){return function(){throw e}}var _O=function(e){return Jb($i(e))};var pO={show:vO};var Eo=function(e){return e.throwError};var Cr=function(e){return e.catchError};var T_=function(e){var n=Cr(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(Ae.create(i))})}};var Ao={liftEffect:wn(Tn),Monad0:function(){return rv}},On=function(e){return e.liftEffect};var hle=B(eo);var IG=function(e){return e};var $b=function(e){return e};var xb=function(e){return function(n){return e(n)}},_D=function(e){var n=B(e);return{map:function(a){return xb(n(hle(a)))}}};var dO=function(e){return{Applicative0:function(){return Nc(e)},Bind1:function(){return iv(e)}}},iv=function(e){var n=ae(e.Bind1()),a=x(e.Applicative0());return{bind:function(t){return function(r){return n(t)(Sr(function(u){return a(Ae.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return jb(e)}}},jb=function(e){var n=_D(e.Bind1().Apply0().Functor0());return{apply:ml(dO(e)),Functor0:function(){return n}}},Nc=function(e){return{pure:(function(){var n=x(e.Applicative0());return function(a){return IG(n(Le.create(a)))}})(),Apply0:function(){return jb(e)}}};var TG=function(e){var n=dO(e);return{throwError:(function(){var a=x(e.Applicative0());return function(t){return IG(a(Ae.create(t)))}})(),Monad0:function(){return n}}};var zb=function(e){var n=on(e);return function(a){var t=a.Bind1(),r=ae(t),u=x(a.Applicative0()),i=_D(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(h){if(h instanceof Le)return u(new Le(h.value0));if(h instanceof Ae)return r(s)(function(p){if(p instanceof Le)return u(new Le(p.value0));if(p instanceof Ae)return u(new Ae(n(h.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): "+[h.constructor.name])})}},Functor0:function(){return i}}}};var yl=(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 Vb=function(e){var n=Ri(e);return function(a){return new yl(a,n)}};var SG=function(e){var n=B(e);return{map:function(a){return function(t){return new yl(a(t.value0),n(a)(t.value1))}}}};var CG=function(e){var n=Mo(e),a=rr(e),t=Pr(e);return{foldMap:function(r){var u=on(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 qr=(function(){function e(){}return e.value=new e,e})(),Ot=(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})(),Qb=function(e){return e},Tle=function(e){return new Ot(e.value0,e.value1)};var Sle=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,h){if(h instanceof Ot&&h.value1 instanceof Ot&&h.value1.value1 instanceof Ot){r=new Ot(h,s),t=h.value1.value1.value1;return}var p=function(E){return E instanceof Ot&&E.value1 instanceof Ot&&E.value1.value1 instanceof qr?new Ot(e(E.value0),new Ot(e(E.value1.value0),qr.value)):E instanceof Ot&&E.value1 instanceof qr?new Ot(e(E.value0),qr.value):qr.value},R=function(E){return function(w){var I=E,L=!1,U;function Q(V,te){if(V instanceof Ot&&V.value0 instanceof Ot&&V.value0.value1 instanceof Ot&&V.value0.value1.value1 instanceof Ot){I=V.value1,w=new Ot(e(V.value0.value0),new Ot(e(V.value0.value1.value0),new Ot(e(V.value0.value1.value1.value0),te)));return}return L=!0,te}for(;!L;)U=Q(I,w);return U}};return u=!0,R(s)(p(h))}for(;!u;)i=l(r,t);return i}};return n(qr.value)},FG={map:Sle};var GG=SG(FG),Ko={foldr:function(e){return function(n){var a=(function(){var r=function(u){return function(i){var l=u,s=!1,h;function p(R,E){if(E instanceof qr)return s=!0,R;if(E instanceof Ot){l=new Ot(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;)h=p(l,i);return h}};return r(qr.value)})(),t=rr(Ko)(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,h){if(h instanceof qr)return u=!0,s;if(h instanceof Ot){r=e(s)(h.value0),t=h.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[h.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=on(e.Semigroup0()),a=Gt(e);return function(t){return rr(Ko)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var Cle=Pr(Ko);var dD=CG(Ko);var Kb={append:function(e){return function(n){return Cle(Ot.create)(n)(e)}}},RO=on(Kb);var Yb={append:function(e){return function(n){return new yl(e.value0,RO(e.value1)(Tle(n)))}}};var yO={alt:RO,Functor0:function(){return FG}},MG=(function(){return{empty:qr.value,Alt0:function(){return yO}}})();var Ole=Wt(r7);var IO=function(e){return new Ot(e,qr.value)};var AG=(function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof qr)return r=!0,l;if(s instanceof Ot){t=new Ot(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(qr.value)})();var LG=function(e){var n=ae(e.Monad0().Bind1()),a=Ku(e);return function(t){var r=t.Plus1().Alt0(),u=Oa(r),i=B(r.Functor0()),l=x(t.Applicative0());return function(s){var h=function(p){return n(u(i(Yr.create)(s))(l(new Jr(void 0))))(function(R){return l(Ole(function(E){return new Ot(E,p)})(function(E){return AG(p)})(R))})};return a(h)(qr.value)}}};var ni=function(e){return Pr(e)(Ot.create)(qr.value)};var TO=function(e){return e()};var SO=function(e){throw new Error(e)};var CO=function(){return SO};var Hle=CO(),Jle=TO,cv=function(e){return Jle(function(){return Hle(e)})};var Zb=(function(){var e=Vb(MG);return function(n){return Qb(e(n))}})();var MO=function(e){return e.value0};var Ed=function(e){return e.join("")},gD=function(e){return e.split("")},ji=function(e){return e},AO=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 zO(e,n){var a=BG(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=BG(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function VO(e){return function(n){return function(a){return function(t){var r=BG(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 QO=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function KO(e,n,a,t){var r=QO(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function YO(e,n,a){return QO(e,n-1,a).getUTCDay()}function A_(e){return e.charCodeAt(0)}function XO(e){return String.fromCharCode(e)}var Xo=function(e){var n=x(e.Applicative0()),a=Ri(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 ZO=Ut(__),e6=Lr(__);var Ma=function(e){return e.toEnum};var la=function(e){return e.fromEnum},JG=function(e){var n=Ma(e),a=la(e),t=Ut(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=A_(ZO)&&e<=A_(e6)?new T(XO(e)):G.value},mce={succ:Cp(HG)(A_),pred:Fp(HG)(A_),Ord0:function(){return fb}};var Gp=(function(){return{cardinality:A_(e6)-A_(ZO)|0,toEnum:HG,fromEnum:A_,Bounded0:function(){return __},Enum1:function(){return mce}}})();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}},n6=oe(fn);var Zl=(function(){function e(){}return e.value=new e,e})(),Oc=(function(){function e(){}return e.value=new e,e})(),Uc=(function(){function e(){}return e.value=new e,e})(),kc=(function(){function e(){}return e.value=new e,e})(),Bc=(function(){function e(){}return e.value=new e,e})(),Hc=(function(){function e(){}return e.value=new e,e})(),Ts=(function(){function e(){}return e.value=new e,e})(),Ii=(function(){function e(){}return e.value=new e,e})(),zi=(function(){function e(){}return e.value=new e,e})(),Ti=(function(){function e(){}return e.value=new e,e})(),Vi=(function(){function e(){}return e.value=new e,e})(),Qi=(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})(),Ki=(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})(),Zi=(function(){function e(){}return e.value=new e,e})(),El=(function(){function e(){}return e.value=new e,e})();var a6={show:function(e){return"(Year "+(n6(e)+")")}},t6={show:function(e){if(e instanceof Zl)return"Monday";if(e instanceof Oc)return"Tuesday";if(e instanceof Uc)return"Wednesday";if(e instanceof kc)return"Thursday";if(e instanceof Bc)return"Friday";if(e instanceof Hc)return"Saturday";if(e instanceof Ts)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 zi)return"February";if(e instanceof Ti)return"March";if(e instanceof Vi)return"April";if(e instanceof Qi)return"May";if(e instanceof Si)return"June";if(e instanceof Ci)return"July";if(e instanceof Ki)return"August";if(e instanceof Yi)return"September";if(e instanceof Xi)return"October";if(e instanceof Zi)return"November";if(e instanceof El)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},r6={show:function(e){return"(Day "+(n6(e)+")")}},u1=Ga,i1=Ga,o6=jt,dce={eq:function(e){return function(n){return e instanceof Zl&&n instanceof Zl||e instanceof Oc&&n instanceof Oc||e instanceof Uc&&n instanceof Uc||e instanceof kc&&n instanceof kc||e instanceof Bc&&n instanceof Bc||e instanceof Hc&&n instanceof Hc||e instanceof Ts&&n instanceof Ts}}},u6={compare:function(e){return function(n){if(e instanceof Zl&&n instanceof Zl)return Je.value;if(e instanceof Zl)return Re.value;if(n instanceof Zl)return De.value;if(e instanceof Oc&&n instanceof Oc)return Je.value;if(e instanceof Oc)return Re.value;if(n instanceof Oc)return De.value;if(e instanceof Uc&&n instanceof Uc)return Je.value;if(e instanceof Uc)return Re.value;if(n instanceof Uc)return De.value;if(e instanceof kc&&n instanceof kc)return Je.value;if(e instanceof kc)return Re.value;if(n instanceof kc)return De.value;if(e instanceof Bc&&n instanceof Bc)return Je.value;if(e instanceof Bc)return Re.value;if(n instanceof Bc)return De.value;if(e instanceof Hc&&n instanceof Hc)return Je.value;if(e instanceof Hc)return Re.value;if(n instanceof Hc)return De.value;if(e instanceof Ts&&n instanceof Ts)return Je.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 dce}},qG={eq:function(e){return function(n){return e instanceof Ii&&n instanceof Ii||e instanceof zi&&n instanceof zi||e instanceof Ti&&n instanceof Ti||e instanceof Vi&&n instanceof Vi||e instanceof Qi&&n instanceof Qi||e instanceof Si&&n instanceof Si||e instanceof Ci&&n instanceof Ci||e instanceof Ki&&n instanceof Ki||e instanceof Yi&&n instanceof Yi||e instanceof Xi&&n instanceof Xi||e instanceof Zi&&n instanceof Zi||e instanceof El&&n instanceof El}}},Fd={compare:function(e){return function(n){if(e instanceof Ii&&n instanceof Ii)return Je.value;if(e instanceof Ii)return Re.value;if(n instanceof Ii)return De.value;if(e instanceof zi&&n instanceof zi)return Je.value;if(e instanceof zi)return Re.value;if(n instanceof zi)return De.value;if(e instanceof Ti&&n instanceof Ti)return Je.value;if(e instanceof Ti)return Re.value;if(n instanceof Ti)return De.value;if(e instanceof Vi&&n instanceof Vi)return Je.value;if(e instanceof Vi)return Re.value;if(n instanceof Vi)return De.value;if(e instanceof Qi&&n instanceof Qi)return Je.value;if(e instanceof Qi)return Re.value;if(n instanceof Qi)return De.value;if(e instanceof Si&&n instanceof Si)return Je.value;if(e instanceof Si)return Re.value;if(n instanceof Si)return De.value;if(e instanceof Ci&&n instanceof Ci)return Je.value;if(e instanceof Ci)return Re.value;if(n instanceof Ci)return De.value;if(e instanceof Ki&&n instanceof Ki)return Je.value;if(e instanceof Ki)return Re.value;if(n instanceof Ki)return De.value;if(e instanceof Yi&&n instanceof Yi)return Je.value;if(e instanceof Yi)return Re.value;if(n instanceof Yi)return De.value;if(e instanceof Xi&&n instanceof Xi)return Je.value;if(e instanceof Xi)return Re.value;if(n instanceof Xi)return De.value;if(e instanceof Zi&&n instanceof Zi)return Je.value;if(e instanceof Zi)return Re.value;if(n instanceof Zi)return De.value;if(e instanceof El&&n instanceof El)return Je.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 qG}},i6=jt,l1=(function(){return{bottom:-271820,top:275759,Ord0:function(){return u1}}})(),hce=(function(){return{bottom:Zl.value,top:Ts.value,Ord0:function(){return u6}}})(),c1=(function(){return{bottom:Ii.value,top:El.value,Ord0:function(){return Fd}}})(),Zo={cardinality:547580,toEnum:function(e){if(e>=-271820&&e<=275759)return new T(e);if(xe)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 gce(0)}},gce=r1("enumYear","Data.Date.Component",function(){return{succ:(function(){var e=Ma(Zo),n=la(Zo);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(Zo),n=la(Zo);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return u1}}});var L_={cardinality:7,toEnum:function(e){return e===1?new T(Zl.value):e===2?new T(Oc.value):e===3?new T(Uc.value):e===4?new T(kc.value):e===5?new T(Bc.value):e===6?new T(Hc.value):e===7?new T(Ts.value):G.value},fromEnum:function(e){if(e instanceof Zl)return 1;if(e instanceof Oc)return 2;if(e instanceof Uc)return 3;if(e instanceof kc)return 4;if(e instanceof Bc)return 5;if(e instanceof Hc)return 6;if(e instanceof Ts)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 hce},Enum1:function(){return Dce(0)}},Dce=r1("enumWeekday","Data.Date.Component",function(){return{succ:(function(){var e=Ma(L_),n=la(L_);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(L_),n=la(L_);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return u6}}});var vo={cardinality:12,toEnum:function(e){return e===1?new T(Ii.value):e===2?new T(zi.value):e===3?new T(Ti.value):e===4?new T(Vi.value):e===5?new T(Qi.value):e===6?new T(Si.value):e===7?new T(Ci.value):e===8?new T(Ki.value):e===9?new T(Yi.value):e===10?new T(Xi.value):e===11?new T(Zi.value):e===12?new T(El.value):G.value},fromEnum:function(e){if(e instanceof Ii)return 1;if(e instanceof zi)return 2;if(e instanceof Ti)return 3;if(e instanceof Vi)return 4;if(e instanceof Qi)return 5;if(e instanceof Si)return 6;if(e instanceof Ci)return 7;if(e instanceof Ki)return 8;if(e instanceof Yi)return 9;if(e instanceof Xi)return 10;if(e instanceof Zi)return 11;if(e instanceof El)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 Rce(0)}},Rce=r1("enumMonth","Data.Date.Component",function(){return{succ:(function(){var e=Ma(vo),n=la(vo);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(vo),n=la(vo);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return Fd}}});var SD={bottom:1,top:31,Ord0:function(){return i1}},el={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if(xe)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 SD},Enum1:function(){return yce(0)}},yce=r1("enumDay","Data.Date.Component",function(){return{succ:(function(){var e=Ma(el),n=la(el);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(el),n=la(el);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return i1}}});var Gd=wb()();var l6=wn(Tn),s1=function(e){return e},c6=function(e){return e},Md=function(e){return e};var s6=function(e){return e},Ad=function(e){return e.toDuration};var v6={append:function(e){return function(n){return e+n}}};var v1={append:function(e){return function(n){return e+n}}};var f6=Zs;var _6=Zs;var f1=function(e){return e.fromDuration};var Rf={fromDuration:Gd(s1)(function(e){return e*1e3}),toDuration:Gd(Md)(function(e){return e/1e3})},N_={fromDuration:Gd(c6)(function(e){return e*6e4}),toDuration:Gd(Md)(function(e){return e/6e4})},Ld={fromDuration:l6,toDuration:l6};var WG={fromDuration:Gd(s6)(function(e){return e*864e5}),toDuration:Gd(Md)(function(e){return e/864e5})};var h6=la(vo),$G=vr(),p6=Ma(L_),bce=oe(a6),Ece=oe(o1),Ice=oe(r6);var Tce=Ee(o6),Sce=Ee(qG),Cce=Ee(i6),Fce=Qe(u1),Gce=Qe(Fd),Mce=Qe(i1);var Ace=Ma(vo);var _1=(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})(),Tl=function(e){return e.value0},CD=function(e){var n=YO(e.value0,h6(e.value1),e.value2),a=n===0;return $G(p6(a?7:n))},g6={show:function(e){return"(Date "+(bce(e.value0)+(" "+(Ece(e.value1)+(" "+(Ice(e.value2)+")")))))}},Sl=function(e){return e.value1};var p1={eq:function(e){return function(n){return Tce(e.value0)(n.value0)&&Sce(e.value1)(n.value1)&&Cce(e.value2)(n.value2)}}},Lce=Ee(p1),xG={compare:function(e){return function(n){var a=Fce(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof De)return De.value;var t=Gce(e.value1)(n.value1);return t instanceof Re?Re.value:t instanceof De?De.value:Mce(e.value2)(n.value2)}},Eq0:function(){return p1}};var fv=function(e){return e.value2},P_=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new _1(r,$G(Ace(u)),i)}}};return KO(t,e,h6(n),a)}}},m1=function(e){return function(n){return function(a){var t=new _1(e,n,a),r=Lce(P_(e)(n)(a))(t);return r?new T(t):G.value}}},jG=(function(){return{bottom:new _1(Ut(l1),Ut(c1),Ut(SD)),top:new _1(Lr(l1),Lr(c1),Lr(SD)),Ord0:function(){return xG}}})();var d1=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}},h1=oe(fn);var D6={show:function(e){return"(Second "+(h1(e)+")")}},R6={show:function(e){return"(Minute "+(h1(e)+")")}},y6={show:function(e){return"(Millisecond "+(h1(e)+")")}},w6={show:function(e){return"(Hour "+(h1(e)+")")}},g1=Ga,D1=Ga,R1=Ga,y1=Ga,b6=jt,E6=jt,I6=jt,T6=jt,FD={bottom:0,top:59,Ord0:function(){return g1}},GD={bottom:0,top:59,Ord0:function(){return D1}},MD={bottom:0,top:999,Ord0:function(){return R1}},AD={bottom:0,top:23,Ord0:function(){return y1}},ec={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(xe)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 FD},Enum1:function(){return Nce(0)}},Nce=d1("enumSecond","Data.Time.Component",function(){return{succ:(function(){var e=Ma(ec),n=la(ec);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(ec),n=la(ec);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return g1}}});var nc={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(xe)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 GD},Enum1:function(){return Pce(0)}},Pce=d1("enumMinute","Data.Time.Component",function(){return{succ:(function(){var e=Ma(nc),n=la(nc);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(nc),n=la(nc);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return D1}}});var nl={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if(xe)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 MD},Enum1:function(){return Oce(0)}},Oce=d1("enumMillisecond","Data.Time.Component",function(){return{succ:(function(){var e=Ma(nl),n=la(nl);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(nl),n=la(nl);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return R1}}});var ac={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if(xe)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 AD},Enum1:function(){return Uce(0)}},Uce=d1("enumHour","Data.Time.Component",function(){return{succ:(function(){var e=Ma(ac),n=la(ac);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Ma(ac),n=la(ac);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return y1}}});var Hce=oe(w6),Jce=oe(R6),qce=oe(D6),Wce=oe(y6);var $ce=Ee(T6),xce=Ee(E6),jce=Ee(b6),zce=Ee(I6),Vce=Qe(y1),Qce=Qe(D1),Kce=Qe(g1),Yce=Qe(R1);var _v=(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})(),S6={show:function(e){return"(Time "+(Hce(e.value0)+(" "+(Jce(e.value1)+(" "+(qce(e.value2)+(" "+(Wce(e.value3)+")")))))))}};var wf=function(e){return e.value2},bf=function(e){return e.value1},Jc=function(e){return e.value3};var pv=function(e){return e.value0};var zG={eq:function(e){return function(n){return $ce(e.value0)(n.value0)&&xce(e.value1)(n.value1)&&jce(e.value2)(n.value2)&&zce(e.value3)(n.value3)}}},VG={compare:function(e){return function(n){var a=Vce(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof De)return De.value;var t=Qce(e.value1)(n.value1);if(t instanceof Re)return Re.value;if(t instanceof De)return De.value;var r=Kce(e.value2)(n.value2);return r instanceof Re?Re.value:r instanceof De?De.value:Yce(e.value3)(n.value3)}},Eq0:function(){return zG}};var Nd=(function(){return{bottom:new _v(Ut(AD),Ut(GD),Ut(FD),Ut(MD)),top:new _v(Lr(AD),Lr(GD),Lr(FD),Lr(MD)),Ord0:function(){return VG}}})();var Xce=la(Zo),Zce=la(vo),ese=la(el),nse=la(ac),ase=la(nc),tse=la(ec),rse=la(nl),ose=oe(g6),use=oe(S6),ise=Ee(p1),lse=Ee(zG),cse=Qe(xG),sse=Qe(VG),vse=ae(nn),Pd=va(wo),QG=B(ue),fse=Bi(nn),_se=Ma(Zo),pse=Ma(vo),mse=Ma(el),dse=Ma(ac),hse=Ma(nc),gse=Ma(ec),Dse=Ma(nl),qc=(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})(),KG=function(e){return{year:Xce(Tl(e.value0)),month:Zce(Sl(e.value0)),day:ese(fv(e.value0)),hour:nse(pv(e.value1)),minute:ase(bf(e.value1)),second:tse(wf(e.value1)),millisecond:rse(Jc(e.value1))}},w1=function(e){return e.value1},C6={show:function(e){return"(DateTime "+(ose(e.value0)+(" "+(use(e.value1)+")")))}};var Rse={eq:function(e){return function(n){return ise(e.value0)(n.value0)&&lse(e.value1)(n.value1)}}},Cl={compare:function(e){return function(n){var a=cse(e.value0)(n.value0);return a instanceof Re?Re.value:a instanceof De?De.value:sse(e.value1)(n.value1)}},Eq0:function(){return Rse}},Fl=function(e){var n=Ad(e);return function(a){return function(t){return n(zO(KG(a),KG(t)))}}},O_=function(e){return e.value0},Od=(function(){return{bottom:new qc(Ut(jG),Ut(Nd)),top:new qc(Lr(jG),Lr(Nd)),Ord0:function(){return Cl}}})(),mv=function(e){var n=f1(e);return function(a){return function(t){return vse(VO(T.create)(G.value)(n(a))(KG(t)))(function(r){return Pd(QG(qc.create)(fse(Pd(Pd(QG(m1)(_se(r.year)))(pse(r.month)))(mse(r.day)))))(Pd(Pd(Pd(QG(_v.create)(dse(r.hour)))(hse(r.minute)))(gse(r.second)))(Dse(r.millisecond)))})}}};var Fi=(function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",h="Sequential",p="Map",R="Apply",E="Alt",w="Cons",I="Resume",L="Release",U="Finalizer",Q="Finalized",V="Forked",te="Fiber",le="Thunk";function ne(Ye,$a,Mt,xn){this.tag=Ye,this._1=$a,this._2=Mt,this._3=xn}function Z(Ye){var $a=function(Mt,xn,Nn){return new ne(Ye,Mt,xn,Nn)};return $a.tag=Ye,$a}function ee(Ye){return new ne(n,void 0)}function me(Ye){try{Ye()}catch($a){setTimeout(function(){throw $a},0)}}function qe(Ye,$a,Mt){try{return $a(Mt())}catch(xn){return Ye(xn)}}function ze(Ye,$a,Mt){try{return $a(Mt)()}catch(xn){return Mt(Ye(xn))(),ee}}var mn=(function(){var Ye=1024,$a=0,Mt=0,xn=new Array(Ye),Nn=!1;function Xe(){var Fa;for(Nn=!0;$a!==0;)$a--,Fa=xn[Mt],xn[Mt]=void 0,Mt=(Mt+1)%Ye,Fa();Nn=!1}return{isDraining:function(){return Nn},enqueue:function(Fa){var Ja,ft;$a===Ye&&(ft=Nn,Xe(),Nn=ft),xn[(Mt+$a)%Ye]=Fa,$a++,Nn||Xe()}}})();function Jn(Ye){var $a={},Mt=0,xn=0;return{register:function(Nn){var Xe=Mt++;Nn.onComplete({rethrow:!0,handler:function(Fa){return function(){xn--,delete $a[Xe]}}})(),$a[Xe]=Nn,xn++},isEmpty:function(){return xn===0},killAll:function(Nn,Xe){return function(){if(xn===0)return Xe();var Fa=0,Ja={};function ft(yn){Ja[yn]=$a[yn].kill(Nn,function(Na){return function(){delete Ja[yn],Fa--,Ye.isLeft(Na)&&Ye.fromLeft(Na)&&setTimeout(function(){throw Ye.fromLeft(Na)},0),Fa===0&&Xe()}})()}for(var er in $a)$a.hasOwnProperty(er)&&(Fa++,ft(er));return $a={},Mt=0,xn=0,function(yn){return new ne(r,function(){for(var Na in Ja)Ja.hasOwnProperty(Na)&&Ja[Na]()})}}}}}var Fn=0,Gn=1,Bn=2,ba=3,ha=4,pa=5,Dt=6;function vt(Ye,$a,Mt){var xn=0,Nn=Fn,Xe=Mt,Fa=null,Ja=null,ft=null,er=null,yn=null,Na=0,mr=0,Va=null,$t=!0;function $(N){for(var O,j,K;;)switch(O=null,j=null,K=null,Nn){case Bn:Nn=Gn;try{Xe=ft(Xe),er===null?ft=null:(ft=er._1,er=er._2)}catch(ce){Nn=pa,Fa=Ye.left(ce),Xe=null}break;case ba:Ye.isLeft(Xe)?(Nn=pa,Fa=Xe,Xe=null):ft===null?Nn=pa:(Nn=Bn,Xe=Ye.fromRight(Xe));break;case Gn:switch(Xe.tag){case i:ft&&(er=new ne(w,ft,er)),ft=Xe._2,Nn=Gn,Xe=Xe._1;break;case n:ft===null?(Nn=pa,Xe=Ye.right(Xe._1)):(Nn=Bn,Xe=Xe._1);break;case r:Nn=ba,Xe=qe(Ye.left,Ye.right,Xe._1);break;case u:Nn=ha,Xe=ze(Ye.left,Xe._1,function(ce){return function(){xn===N&&(xn++,mn.enqueue(function(){xn===N+1&&(Nn=ba,Xe=ce,$(xn))}))}});return;case a:Nn=pa,Fa=Ye.left(Xe._1),Xe=null;break;case t:ft===null?yn=new ne(w,Xe,yn,Ja):yn=new ne(w,Xe,new ne(w,new ne(I,ft,er),yn,Ja),Ja),ft=null,er=null,Nn=Gn,Xe=Xe._1;break;case l:Na++,ft===null?yn=new ne(w,Xe,yn,Ja):yn=new ne(w,Xe,new ne(w,new ne(I,ft,er),yn,Ja),Ja),ft=null,er=null,Nn=Gn,Xe=Xe._1;break;case s:Nn=ba,O=vt(Ye,$a,Xe._2),$a&&$a.register(O),Xe._1&&O.run(),Xe=Ye.right(O);break;case h:Nn=Gn,Xe=wr(Ye,$a,Xe._1);break}break;case pa:if(ft=null,er=null,yn===null)Nn=Dt,Xe=Ja||Fa||Xe;else switch(O=yn._3,K=yn._1,yn=yn._2,K.tag){case t:Ja&&Ja!==O&&Na===0?Nn=pa:Fa&&(Nn=Gn,Xe=K._2(Ye.fromLeft(Fa)),Fa=null);break;case I:Ja&&Ja!==O&&Na===0||Fa?Nn=pa:(ft=K._1,er=K._2,Nn=Bn,Xe=Ye.fromRight(Xe));break;case l:Na--,Fa===null&&(j=Ye.fromRight(Xe),yn=new ne(w,new ne(L,K._2,j),yn,O),(Ja===O||Na>0)&&(Nn=Gn,Xe=K._3(j)));break;case L:yn=new ne(w,new ne(Q,Xe,Fa),yn,Ja),Nn=Gn,Ja&&Ja!==O&&Na===0?Xe=K._1.killed(Ye.fromLeft(Ja))(K._2):Fa?Xe=K._1.failed(Ye.fromLeft(Fa))(K._2):Xe=K._1.completed(Ye.fromRight(Xe))(K._2),Fa=null,Na++;break;case U:Na++,yn=new ne(w,new ne(Q,Xe,Fa),yn,Ja),Nn=Gn,Xe=K._1;break;case Q:Na--,Nn=pa,Xe=K._1,Fa=K._2;break}break;case Dt:for(var ve in Va)Va.hasOwnProperty(ve)&&($t=$t&&Va[ve].rethrow,me(Va[ve].handler(Xe)));Va=null,Ja&&Fa?setTimeout(function(){throw Ye.fromLeft(Fa)},0):Ye.isLeft(Xe)&&$t&&setTimeout(function(){if($t)throw Ye.fromLeft(Xe)},0);return;case Fn:Nn=Gn;break;case ha:return}}function X(N){return function(){if(Nn===Dt)return $t=$t&&N.rethrow,N.handler(Xe)(),function(){};var O=mr++;return Va=Va||{},Va[O]=N,function(){Va!==null&&delete Va[O]}}}function k(N,O){return function(){if(Nn===Dt)return O(Ye.right(void 0))(),function(){};var j=X({rethrow:!1,handler:function(){return O(Ye.right(void 0))}})();switch(Nn){case Fn:Ja=Ye.left(N),Nn=Dt,Xe=Ja,$(xn);break;case ha:Ja===null&&(Ja=Ye.left(N)),Na===0&&(Nn===ha&&(yn=new ne(w,new ne(U,Xe(N)),yn,Ja)),Nn=pa,Xe=null,Fa=null,$(++xn));break;default:Ja===null&&(Ja=Ye.left(N)),Na===0&&(Nn=pa,Xe=null,Fa=null)}return j}}function S(N){return function(){var O=X({rethrow:!1,handler:N})();return Nn===Fn&&$(xn),O}}return{kill:k,join:S,onComplete:X,isSuspended:function(){return Nn===Fn},run:function(){Nn===Fn&&(mn.isDraining()?$(xn):mn.enqueue(function(){$(xn)}))}}}function Ha(Ye,$a,Mt,xn){var Nn=0,Xe={},Fa=0,Ja={},ft=new Error("[ParAff] Early exit"),er=null,yn=e;function Na(X,k,S){var N=k,O=null,j=null,K=0,ve={},ce,Ie;e:for(;;)switch(ce=null,N.tag){case V:if(N._3===e&&(ce=Xe[N._1],ve[K++]=ce.kill(X,function(Me){return function(){K--,K===0&&S(Me)()}})),O===null)break e;N=O._2,j===null?O=null:(O=j._1,j=j._2);break;case p:N=N._2;break;case R:case E:O&&(j=new ne(w,O,j)),O=N,N=N._1;break}if(K===0)S(Ye.right(void 0))();else for(Ie=0,ce=K;Ie()=>e.props.def;function nU(e){class n extends ct.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 T1=typeof module>"u"?void 0:module.require,KVe=(function(){try{return T1===void 0?void 0:T1("util")}catch{return}})();var YVe=(function(){var e;if(typeof performance<"u")e=performance;else if(T1)try{e=T1("perf_hooks").performance}catch{}return(function(){return(e||Date).now()})})();var aU=(e,n)=>n[e],tU=(e,n,a)=>a[e]=n;var qd=function(n){return function(a){return n(a)()}};var Wd=function(n){return function(a){return function(){return n(a)}}},B_=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 pve=de(ia),qD=(function(){function e(){}return e.value=new e,e})(),uU=function(){return function(e){var n=hr(e);return function(a){return Op(tU)(n(Tt.value))}}},rM=function(e){var n=or(e);return function(a){var t=hr(a);return function(r){return function(u){return pve(function(){return aU(t(Tt.value),u)})(n)}}}};Ct();var rc=window.ReactDOM,{createPortal:iU,findDOMNode:rQe,flushSync:oQe,unstable_batchedUpdates:uQe}=window.ReactDOM;var TM=fl(XU(),1);function ZU(e){return e.state&&e.state.s}function e5(e,n,a){return e.setState({s:n},a)}function n5(e,n){return e.state={s:n}}var a5=rc.render,t5=rc.hydrate,SM=TM.default&&TM.default.renderToString||(e=>""),jve=rc.unmountComponentAtNode,r5=ct.Fragment;function o5(e,n,a){return ct.createElement.apply(null,[e,zve(e,n)].concat(a))}function zve(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 u5(e){return n=>e===n}var O1=function(e){return function(n){return function(a){var t=ge(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(u5(e.value0)(t.value0))return void 0;if(xe)return n(new T(t.value0))()}return n(t)()}}};var ie={asReactChildren:function(e){return[e]}},tn={asReactChildren:function(e){return[e]}},Ce={asReactChildren:wn(Tn)};var un=Ke,CM=Op(e5),i5=B_(a5),l5=B_(t5),c5=Wd(ZU),Aa=!1;var s5=B_(n5),QD=function(e){return e.asReactChildren},oc=function(){return function(e){var n=QD(e);return function(a){return function(t){return function(r){return o5(a,t,n(r))}}}}},v5=oc()(Ce),hv=function(){return function(e){return function(n){return v5(e)(n)([])}}},Oe=v5(r5)({});var FM=B(ia),Yve=x(Yt),f5=function(e){return{initialize:function(n){return s5(n)(e.initialState)},getState:function(n){return function(){var t=FM(ge)(c5(n))();return We(e.initialState)(t)}},setState:CM}},_5=(function(){var e=function(n){return function(a){return{initialize:function(t){return ep(new T(a.initialState))(n)},getState:function(t){return FM(We(a.initialState))(Z0(n))},setState:function(t){return function(r){return function(u){return function(){return ep(new T(r))(n)(),CM(t)(r)(Yve(void 0))(),u()}}}}}}};return FM(e)(vd(G.value))})();var d5=de(en),h5=on(Er);var Zve=x(Yt),g5=uU(),D5={reflectSymbol:function(){return"__unmounted"}},efe=g5(D5),R5={reflectSymbol:function(){return"__subscriptions"}},nfe=g5(R5),U1=de(ia),afe=rM(it)(D5),p5=B(ia),tfe=rM(ht(xO))(R5),rfe=vn(rn),ofe=ot(io),ufe=bb(Yt)(Ve),ife=rfe(La),y5=On(Ao),lfe=ud(rv),cfe=on(i_(eG(ib))),GM=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})(),sfe={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),d5(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},w5={apply:function(e){return function(n){return new q_(e.value0(n.value0),h5(e.value1)(n.value1))}},Functor0:function(){return sfe}},_a={bind:function(e){return function(n){var a=n(e.value0);return new q_(a.value0,h5(e.value1)(a.value1))}},Apply0:function(){return w5}},kn={pure:function(e){return new q_(e,[])},Apply0:function(){return w5}};var b5=function(e){var n=ae(e);return function(a){var t=On(a);return function(r){return function(u){return new q_(r,d5(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])},Pt=function(e){return Hp(Dn(e))},W_=function(e){var n=ae(e.Monad0().Bind1()),a=On(e);return function(t){return Hp(function(r){return n(t)(function(u){return a(Wn(Zve(void 0))(r.dispatch)(u))})})}},at=function(e){var n=b5(e.Monad0().Bind1())(e);return function(a){return n(void 0)([a])}},E5=function(e){return function(n){var a=efe(qD.value),t=nfe(qD.value),r=function(w){return function(I){return function(L){return function(){var Q=U1(JD(w))(function(V){return V.init})();return n({initialState:Q.value0}).setState(w)(I)(L)()}}}},u=(function(){var w=p5(We(!1)),I=afe(qD.value);return function(L){return w(I(L))}})(),i=(function(){var w=p5(We([])),I=tfe(qD.value);return function(L){return w(I(L))}})(),l=function(w){return function(){return ofe(ufe)(i(w))(),t([])(w)()}},s=function(w){return function(){var L=U1(JD(w))(function(U){return U.init})();return n({initialState:L.value0}).getState(w)()}},h=function(w){return function(I){return function(){var U=i(w)();return t(yu(Bd(I))(U))(w)()}}},p=function(w){return function(I){var L=function(U){return Bd(ife(Wr(0))(function(){return U({dispatch:(function(){var Q=R(I);return function(V){return y5(Q(V))}})(),onStop:h(I)})}))};return XF(w)(L)}},R=function(w){return function(I){return lfe(u(w))(function(){var U=s(w)(),Q=U1(JD(w))(function(te){return te.update})(),V=Q(U)(I);return r(w)(V.value0)(p(V.value1)(w))()})}},E=function(w){return function(){var L=s(w)(),U=U1(JD(w))(function(Q){return Q.view})();return U(L)(R(w))}};return function(w){return eU(e,{def:w,init:n({initialState:w.init.value0}).initialize,render:E,componentDidMount:p(w.init.value1),componentWillUnmount:cfe(a(!0))(l)})}}},MM=function(e){return function(){var a=y5(_5)();return Z6(function(t){return E5(t)(a)(e)})}},Cf=function(e){return function(n){return X6(e,function(a){var t=E5(a)(f5);return function(r){return t(n(r))}})}};var I5=x(Yt),T5=yi(),k1=function(e){return{handleMaybe:function(n){return function(a){return qd((function(){var t=Wn(I5(void 0))(n);return function(r){return t(T5(a(r)))}})())}}}},$_=function(e){return{handleMaybe:function(n){return function(a){return function(t){return Wn(I5(void 0))(n)(T5(a))()}}}}},Gl={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},S5={handleEffect:function(e){return qd(e)}};var ja={handle:function(e){return function(n){return function(a){return e(n)()}}}},uc=function(e){return e.handleMaybe},AM=function(e){return e.handleEffect},Ia=function(e){return e.handle};function B1(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 Fs=function(){return function(){return function(e){return function(n){return B1(e,n)}}}};var H1=function(e){var n=hr(e);return function(){return function(){return function(a){return function(t){return ub(n(a))(t)}}}}};var C5=hv(),LM=oc(),F5=Fs()();var KD=Ke;var NM=function(e){var n=LM(e);return function(a){return function(t){return n(KD(a))(t)}}},Gs=function(e){var n=LM(e);return function(a){return function(t){return function(r){return n(KD(a))(F5(r)({className:t}))}}}},YD=function(e){return function(n){return function(a){return C5(KD(e))(F5(a)({className:n}))}}},PM=function(e){return function(n){return C5(KD(e))({className:n})}},au=function(e){return function(n){var a=LM(n);return function(t){return function(r){return a(KD(e))({className:t})(r)}}}};var Vt=Ke;var zd=function(e){var n=Gs(e);return function(){return function(){return n("video")}}},J1=function(e){return au("video")(e)};var q1=function(e){return au("ul")(e)};var Ff=function(e){return au("tr")(e)};var x_=function(e){return au("thead")(e)};var j_=function(e){return au("th")(e)};var Vd=function(){return function(){return YD("textarea")}};var W1=function(e){var n=Gs(e);return function(){return function(){return n("td")}}},Ms=function(e){return au("td")(e)};var z_=function(e){return au("tbody")(e)};var V_=function(e){return au("table")(e)};var Ou=function(e){return au("strong")(e)},Qd=function(e){var n=Gs(e);return function(){return function(){return n("span")}}},Ft=function(e){return au("span")(e)},$1=function(){return function(){return YD("source")}};var x1=function(e){var n=Gs(e);return function(){return function(){return n("select")}}};var Kd=function(e){var n=Gs(e);return function(){return function(){return n("p")}}},$r=function(e){return au("p")(e)};var j1=function(e){var n=Gs(e);return function(){return function(){return n("option")}}};var z1=function(e){return au("li")(e)};var Q_=function(e){return au("label")(e)};var fu=function(){return function(){return YD("input")}};var xc=function(){return function(){return YD("img")}};var Ht=function(e){return au("i")(e)};var As=PM("hr");var Yd=function(e){return au("h6")(e)};var jc=function(e){return au("h4")(e)},V1=function(e){var n=Gs(e);return function(){return function(){return n("h3")}}},_u=function(e){return au("h3")(e)},Dv=function(e){var n=Gs(e);return function(){return function(){return n("h2")}}},xr=function(e){return au("h2")(e)};var K_=function(e){return au("h1")(e)},Y_=function(e){var n=Gs(e);return function(){return function(){return n("form")}}};var jr=function(e){var n=Gs(e);return function(){return function(){return n("div")}}},Ne=function(e){return au("div")(e)};var Q1=PM("br");var G5=Ud(ND);var _fe=x(Yt);var OM={map:function(e){return function(n){return G5(G5(e))(n)}}},M5=de(OM),A5=function(e){var n=ae(e.Monad0().Bind1()),a=On(e);return function(t){return Hp(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},Gi=function(e){var n=A5(e);return function(a){return function(t){return n(M5(t)(a))}}};var L5=function(e){return function(n){return e(Wn(_fe(void 0))(n))}},Xd=function(e){var n=A5(e);return function(a){return function(t){return n(L5(M5(t)(a)))}}};var Kn=(function(){return{"genericTop'":je.value}})();var UM=function(e){return e["genericTop'"]},Yn=function(e){return{"genericTop'":UM(e)}};var Xn=(function(){return{"genericBottom'":je.value}})();var XD=function(e){return e["genericBottom'"]},Zn=function(e){return{"genericBottom'":XD(e)}};var ea=function(e){return{"genericBottom'":new Se(XD(e))}},N5=function(e){var n=cd(e);return function(a){return n(XD(a))}};var X_=B(ue),K1=nt();var kM=function(e){return e["genericToEnum'"]};var Y1=function(e){return e["genericSucc'"]},qM=function(e){var n=cd(e),a=sd(e);return function(t){var r=X_(n),u=Y1(t);return function(i){return r(u(a(i)))}}},BM=function(e){return e["genericPred'"]};var HM=function(e){return e["genericFromEnum'"]};var na=function(e){var n=BM(e),a=Y1(e);return function(t){var r=UM(t);return function(u){var i=BM(u),l=Y1(u);return function(s){var h=XD(s);return{"genericPred'":function(p){if(p instanceof Se)return X_(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(h));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 X_(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 aa={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},ta=function(e){var n=BM(e),a=Y1(e);return{"genericPred'":function(t){return X_(Wg)(n(t))},"genericSucc'":function(t){return X_(Wg)(a(t))}}};var JM=function(e){return e["genericCardinality'"]};var ra=function(e){var n=JM(e),a=kM(e),t=HM(e);return function(r){var u=kM(r),i=HM(r);return{"genericCardinality'":K1(n)+K1(JM(r))|0,"genericToEnum'":function(l){var s=function(h){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 Z1=function(e){return function(n){return new ii(1,1,e,n,Vc.value,Vc.value)}},x5=(function(){var e=function(t){if(t instanceof Vc)return 0;if(t instanceof ii)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,h){return s instanceof ii&&s.value0>e(h)?zc(s.value2,s.value3,zc(t,r,u,s.value4),zc(i,l,s.value5,h)):zc(i,l,zc(t,r,u,s),h)},a=function(t,r,u,i,l,s,h){return s instanceof ii&&e(l)<=s.value0?zc(s.value2,s.value3,zc(u,i,l,s.value4),zc(t,r,s.value5,h)):zc(u,i,l,zc(t,r,s,h))};return function(t,r,u,i){if(u instanceof Vc)return i instanceof Vc?Z1(t)(r):i instanceof ii&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):zc(t,r,u,i);if(u instanceof ii){if(i instanceof ii){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 Vc&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):zc(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 Rv=function(e){var n=Qe(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof Vc)return u=!0,G.value;if(s instanceof ii){var h=n(a)(s.value2);if(h instanceof Re){r=s.value4;return}if(h instanceof De){r=s.value5;return}if(h instanceof Je)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): "+[h.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 eR=function(e){var n=Qe(e);return function(a){return function(t){var r=function(u){if(u instanceof Vc)return Z1(a)(t);if(u instanceof ii){var i=n(a)(u.value2);if(i instanceof Re)return x5(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof De)return x5(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof Je)return new ii(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 ic=(function(){return Vc.value})(),Mi=function(e){var n=eR(e);return function(a){return rr(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(ic)}};var Vfe=typeof Array.from=="function",V5=typeof Symbol<"u"&&Symbol!=null&&typeof Symbol.iterator<"u"&&typeof String.prototype[Symbol.iterator]=="function",Qfe=typeof String.prototype.fromCodePoint=="function",Kfe=typeof String.prototype.codePointAt=="function",Q5=function(e){return Kfe?function(n){return n.codePointAt(0)}:e},K5=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(V5)for(var l=u[Symbol.iterator](),s=r;;--s){var h=l.next();if(h.done)return a;if(s===0)return n(t(h.value))}return e(r)(u)}}}}}};var Y5=function(e){return Qfe?String.fromCodePoint:e},X5=function(e){return function(n){return V5?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=rR(df(1)(e)),r=t9(t);return r?a9(n)(t):n}return n},QM=Q5(l_e),Wp=Z5(i_e)(QM),Uu=function(e){return xo(Wp(e))};var eE=function(e){return function(n){return n9(function(a){return Uu(Id(a)(n))})(e1(e)(n))}},VM=(function(){var e=JG(Gp)(Ut(__))(Lr(__));return function(n){return ji(e(n))}})(),c_e=function(e){if(e<=65535)return VM(e);var n=t_e(e-65536|0)(1024)+55296|0,a=r_e(e-65536|0)(1024)+56320|0;return VM(n)+VM(a)};var eh=Y5(c_e),o9=function(e){return function(n){if(e<1)return"";var a=e0(n);return a instanceof T?eh(a.value0.head)+o9(e-1|0)(a.value0.tail):n}},Ml=X5(o9);var nE={eq:function(e){return function(n){return e===n}}},aE={compare:function(e){return function(n){return o_e(e)(n)}},Eq0:function(){return nE}},n0=function(e){return function(n){return sv(Es(Ml(e)(n)))(n)}};var s_e=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=e0(l);if(s instanceof T){var h=i===0;if(h)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}},nh=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(QM(n)):K5(s_e)(T.create)(G.value)(QM)(e)(n)}},v_e={bottom:0,top:1114111,Ord0:function(){return aE}},wv=(function(){return{cardinality:1114112,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if(xe)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 v_e},Enum1:function(){return f_e(0)}}})(),f_e=n_e("enumCodePoint","Data.String.CodePoints",function(){return{succ:Cp(Ma(wv))(la(wv)),pred:Fp(Ma(wv))(la(wv)),Ord0:function(){return aE}}});var C_e=nt();var d9={show:C_e};var h9=be;var G_e=gf(Ve),M_e=de(en),A_e=fp($M),jn=function(e){return function(n){var a=G_e(M_e(n)(function(t){return new Rn(e(t),t)}));return function(t){return Is(t)(a)}}},g9=function(e){var n=qM(e),a=N5(e);return function(t){var r=n(t);return function(u){return function(i){return A_e(function(l){return new Rn(l,r(l))})(a(i))}}}},zn=function(e){var n=g9(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Mf(u(i))}}}};var L_e={info:"info",warning:"warn",error:"error"},lc=e=>n=>a=>t=>{let r=L_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()},D9=(e,n)=>(n.__sentryFingerprint=e,n);var R9=function(e){return Ql(D9)(e)};var Kc="error";var uE={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Le)return a.value0;if(a instanceof Ae)return lc(Kc)("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])}}},Ca=function(e){return e.parseOrPanic},P_e=Ca(uE),wt=function(e){var n=Ca(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})}}},O_e=wt(uE)(eo),t0=function(e){var n=M_(e);return function(a){return O_e({parse:n,diagnosticName:a})}},ln={parseOrPanic:function(e){return P_e({default:e.default,diagnosticName:e.diagnosticName,parse:(function(){var n=Wn(new Ae(""))(Le.create);return function(a){return n(e.parse(a))}})()})}};var y9=ta(aa),w9=Zn(Xn),b9=ua(oa),Lf=(function(){function e(){}return e.value=new e,e})(),Nf=(function(){function e(){}return e.value=new e,e})(),U_e={to:function(e){if(e instanceof Se)return Lf.value;if(e instanceof fe)return Nf.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 Lf)return new Se(je.value);if(e instanceof Nf)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 k_e=function(e){if(e instanceof Lf)return"school";if(e instanceof Nf)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},iE=(function(){return Ca(ln)({parse:jn(k_e)(zn(U_e)(na(y9)(Yn(Kn))(y9)(w9))(ra(b9)(b9))(ea(w9))),default:Lf.value,diagnosticName:"Sem.Connections.Types.Actor"})})();var S9=ta(aa),E9=na(S9)(Yn(Kn)),C9=Zn(Xn),I9=ea(C9),F9=ua(oa),T9=ra(F9),B_e=Oa(hu),Ls=(function(){function e(){}return e.value=new e,e})(),r0=(function(){function e(){}return e.value=new e,e})(),Pf=(function(){function e(){}return e.value=new e,e})(),H_e={to:function(e){if(e instanceof Se)return Ls.value;if(e instanceof fe&&e.value0 instanceof Se)return r0.value;if(e instanceof fe&&e.value0 instanceof fe)return Pf.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 Ls)return new Se(je.value);if(e instanceof r0)return new fe(new Se(je.value));if(e instanceof Pf)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 J_e=function(e){if(e instanceof Ls)return"pending";if(e instanceof r0)return"connected";if(e instanceof Pf)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},XM=(function(){var e=jn(J_e)(zn(H_e)(E9(E9(S9)(C9))(I9))(T9(T9(F9)))(I9)),n=function(a){return a==="cold"?new T(Pf.value):G.value};return Ca(ln)({parse:function(a){return B_e(e(a))(n(a))},default:Ls.value,diagnosticName:"Sem.Connections.Types.Status"})})();var q_e=md(fr),G9=oe(fn),W_e=bo(Ve)(fr),$_e=Ft(ie);var M9=function(e){return{initiator:iE(e.initiator),status:XM(e.status),introMessage:We("")(ge(e.introMessage))}},A9=25,ZM=function(e){return Uu(e)>=A9},L9=function(e){var n=Uu(e),a=n>0,t=q_e(" ")([(function(){return a?G9(n)+" characters":""})(),W_e(["(",G9(A9),(function(){return a?"":" character"})()," minimum)"])]),r=(function(){var u=ZM(e);return u?"text-success":""})();return $_e(r)(t)};var sE=(function(){function e(){}return e.value=new e,e})(),P9=(function(){function e(){}return e.value=new e,e})();var O9=(function(){var e=Ca(ln)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(P9.value):n instanceof T&&n.value0==="free"?new T(sE.value):n instanceof T&&n.value0==="churned"?new T(sE.value):n instanceof G?new T(sE.value):G.value},default:sE.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(ge(n))}})();var U9=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:ge(e.imageUrl),partnerStatus:O9(e.partnerStatus)}};var z_e=ae(nn),eA=dt(),uR=Bt(be),k9=W({reflectSymbol:function(){return"id"}}),V_e=vn(rn)(nn),Q_e=Xo(gu),K_e=B(ue);var Y_e=(function(){function e(){}return e.value=new e,e})(),X_e=(function(){function e(){}return e.value=new e,e})(),Z_e=(function(){function e(){}return e.value=new e,e})(),nA=(function(){function e(){}return e.value=new e,e})(),e0e=(function(){function e(){}return e.value=new e,e})(),vE=(function(){function e(){}return e.value=new e,e})(),iR=(function(){function e(){}return e.value=new e,e})(),aA=(function(){function e(){}return e.value=new e,e})(),tA=(function(){function e(){}return e.value=new e,e})();var B9={show:nt()};var n0e=be,a0e=t0(eA(W({reflectSymbol:function(){return"avatarUrl"}})(uR)(W({reflectSymbol:function(){return"bio"}})(uR)(W({reflectSymbol:function(){return"connection"}})(Bt(eA(W({reflectSymbol:function(){return"initiator"}})(be)(W({reflectSymbol:function(){return"introMessage"}})(uR)(W({reflectSymbol:function(){return"status"}})(be)(pn))))))(W({reflectSymbol:function(){return"firstName"}})(be)(k9(n0e)(W({reflectSymbol:function(){return"lastName"}})(be)(W({reflectSymbol:function(){return"school"}})(eA(W({reflectSymbol:function(){return"allowedToContact"}})(it)(k9(h9)(W({reflectSymbol:function(){return"imageUrl"}})(uR)(W({reflectSymbol:function(){return"name"}})(be)(W({reflectSymbol:function(){return"partnerStatus"}})(uR)(pn)))))))(W({reflectSymbol:function(){return"title"}})(be)(W({reflectSymbol:function(){return"type"}})(be)(W({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(dn)(pn))))))))))));var H9=function(e){if(e instanceof Y_e)return"sheet-view";if(e instanceof X_e)return"school-details";if(e instanceof Z_e)return"network-gallery";if(e instanceof nA)return"livestream-details";if(e instanceof e0e)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},J9=function(e){return z_e(a0e("SemUser")(e))(function(n){return V_e(Q_e(n.type==="Sem::User"))(function(){return new T({school:U9(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:ge(n.avatarUrl),title:n.title,bio:ge(n.bio),connection:K_e(M9)(ge(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var bv=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Ev=function(e){return e()};var ek=(function(){function e(){}return e.value=new e,e})(),nk=(function(){function e(){}return e.value=new e,e})(),ak=(function(){function e(){}return e.value=new e,e})();var F0e=function(e){if(e instanceof ek)return"disabled";if(e instanceof nk)return"free-consultation";if(e instanceof ak)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 G0e=(function(){return[ek.value,nk.value,ak.value]})(),tk=wt(ln)(ue)({parse:jn(F0e)(G0e),diagnosticName:"InquiryMode"});var A0e=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 rk(e,n,a,t,r,u,i){return A0e(e,n-1,a,t,r,u,i).getTime()}function ok(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 N0e=vr(),P0e=Ma(vo);var O0e=la(vo);var uk=function(e){return e},pE=(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 qc(P_(n)(N0e(P0e(a)))(t),new _v(r,u,i,l))}}}}}}};return ok(e)})();var ik=function(e){return rk(Tl(e.value0),O0e(Sl(e.value0)),fv(e.value0),pv(e.value1),bf(e.value1),wf(e.value1),Jc(e.value1))};var lk=function(e){var n=on(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,h;function p(R,E,w){if(w<1)return s=!0,R;i=n(R)(E),l=E,u=w-1|0}for(;!s;)h=p(i,l,u);return h}}};return a(Gt(e))};var U0e=nt();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})(),sR=(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 ck=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sk=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fA=(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 th={defer:function(e){var n=bv(e);return function(a,t,r,u,i){var l=Ev(n);return l(a,t,r,u,i)}}};var Iv={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,h){return t(function(p){return i(s,e(h))})})})}}}};var Tv={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,h){return t(function(p){return n(s,t,r,u,function(R,E){return t(function(w){return i(R,h(E))})})})})})}}},Functor0:function(){return Iv}};var Sv={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,h){return t(function(p){var R=n(h);return R(s,t,r,u,i)})})})}}},Apply0:function(){return Tv}},k0e=ot(Sv);var Yc={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Tv}};var B0e={Applicative0:function(){return Yc},Bind1:function(){return Sv}};var vk={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return B0e}},H0e=Eo(vk);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,h){return t(function(p){return s.value2?u(s,h):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Iv}},J0e=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var q0e=function(e){var n=e.Monad0(),a=B(n.Bind1().Apply0().Functor0()),t=x(n.Applicative0()),r=Ku(e);return function(u){return function(i){var l=function(s){var h=!1,p;function R(E){var w=E(void 0);if(w instanceof ck){s=w.value0;return}if(w instanceof sk)return h=!0,a(Yr.create)(w.value0);if(w instanceof fA)return h=!0,t(new Jr(new Rn(w.value1,w.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[w.constructor.name])}for(;!h;)p=R(s);return p};return r(l)(function(s){return i(u,ck.create,sk.create,function(h,p){return new fA(h,new Ae(p))},function(h,p){return new fA(h,new Le(p))})})}}};var fk=J0e(function(e){return new Rn(e.value1,e)}),_A=function(e){return e.value1},pA=function(e){return e.value0};var W0e={index:0,line:1,column:1},_k=function(e){var n=B(e.Monad0().Bind1().Apply0().Functor0()),a=q0e(e);return function(t){return function(r){var u=new xp(t,W0e,!1);return n(Vo)(a(u)(r))}}},$0e=_k(jg),pk=function(e){var n=$0e(e);return function(a){return U0e(n(a))}};var x0e=function(e){return function(n){return H0e(new sR(e,n))}},rh=function(e){return k0e(x0e(e))(fk)};var mk={empty:rh("No alternative"),Alt0:function(){return jp}},zp={Applicative0:function(){return Yc},Plus1:function(){return mk}};var npe=Oa(jp);var ape=x(Yc);var tpe=B(Iv);var Cv=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 mE=function(e){return function(n){return npe(n)(ape(e))}},Vp=function(e){return mE(G.value)(tpe(T.create)(e))};var gk=la(wv),upe=su(uo);var ipe=oe(gr);var Dk=function(e){return function(n){return function(a){var t=gk(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=nh(0)(a);return r instanceof T&&gk(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)-upe(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},lpe=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,h,p){var R=e0(h);if(R instanceof G)return u=!0,s;if(R instanceof T){var E=(function(){if(Qc(R.value0.tail))return Dk(s)(R.value0.head)(p);if(xe)return Dk(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 dA=Ib(function(e){return function(n){return function(a){return function(t){return function(r){var u=Qc(e.value0);return u?r(new xp(e.value0,e.value1,!0),void 0):t(e,new sR("Expected EOF",e.value1))}}}}}),yk=function(e){return Ib(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Ae)return r(n,new sR(i.value0,n.value1));if(i instanceof Le)return u(new xp(i.value0.remainder,lpe(n.value1)(i.value0.consumed)(i.value0.remainder),!Qc(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 Fv=function(e){return yk(function(n){var a=wl(e)(n);return a instanceof T?new Le({value:e,consumed:e,remainder:a.value0}):new Ae("Expected "+ipe(e))})};var wk=oe(fn),spe=Nr(Yu),vpe=ad(Tv);var fpe=function(e){return"(line "+(wk(e.line)+(", col "+(wk(e.column)+")")))},_pe=function(e){return pA(e)+(" "+fpe(_A(e)))},hA=function(e){return function(n){return spe(_pe)(pk(n)(vpe(e)(dA)))}};var DE=Ma(Gp);var ci=oe(fn);var Spe=Mo(Ko),Cpe=Spe(fr);var Fpe=_b(Ga)(Xs);var RA=la(Zo),Gpe=oe(o1),Mpe=la(vo),Fk=la(el),Ape=nt(),Lpe=la(L_),Gk=oe(t6),yA=la(ac),Npe=su(uo),Mk=la(nc),Ak=la(ec),wA=la(nl),Lk=jo(uo);var ih=(function(){function e(){}return e.value=new e,e})(),Pk=(function(){function e(){}return e.value=new e,e})(),Ppe=(function(){function e(){}return e.value=new e,e})(),Ns=(function(){function e(){}return e.value=new e,e})(),bA=(function(){function e(){}return e.value=new e,e})(),Ok=(function(){function e(){}return e.value=new e,e})(),Uk=(function(){function e(){}return e.value=new e,e})(),Ps=(function(){function e(){}return e.value=new e,e})(),Ope=(function(){function e(){}return e.value=new e,e})(),Upe=(function(){function e(){}return e.value=new e,e})(),Os=(function(){function e(){}return e.value=new e,e})(),kpe=(function(){function e(){}return e.value=new e,e})(),wE=(function(){function e(){}return e.value=new e,e})(),Us=(function(){function e(){}return e.value=new e,e})(),ks=(function(){function e(){}return e.value=new e,e})(),Bpe=(function(){function e(){}return e.value=new e,e})(),cc=(function(){function e(){}return e.value=new e,e})(),Hpe=(function(){function e(){}return e.value=new e,e})(),bE=(function(){function e(){}return e.value=new e,e})(),Jpe=(function(){function e(){}return e.value=new e,e})(),qpe=(function(){function e(){}return e.value=new e,e})(),Wpe=(function(){function e(){}return e.value=new e,e})(),ir=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var $pe=function(e){if(e instanceof Ii)return"Jan";if(e instanceof zi)return"Feb";if(e instanceof Ti)return"Mar";if(e instanceof Vi)return"Apr";if(e instanceof Qi)return"May";if(e instanceof Si)return"Jun";if(e instanceof Ci)return"Jul";if(e instanceof Ki)return"Aug";if(e instanceof Yi)return"Sep";if(e instanceof Xi)return"Oct";if(e instanceof Zi)return"Nov";if(e instanceof El)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var c0=function(e){if(e<0)return"-"+c0(-e|0);if(e<10)return"0"+ci(e);if(xe)return ci(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},kk=function(e){if(e<0)return"-"+kk(-e|0);if(e<10)return"000"+ci(e);if(e<100)return"00"+ci(e);if(e<1e3)return"0"+ci(e);if(xe)return ci(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},Bk=function(e){if(e<0)return"-"+Bk(-e|0);if(e<10)return"00"+ci(e);if(e<100)return"0"+ci(e);if(xe)return ci(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var xpe=function(e){var n=ci(Fpe(e)),a=Uu(n);return a===1?"0"+n:a===2?n:n0(a-2|0)(n)};var jpe=function(e){var n=e===0;return n?12:e},zpe=function(e){return function(n){if(n instanceof ih)return kk(RA(Tl(e.value0)));if(n instanceof Pk)return xpe(RA(Tl(e.value0)));if(n instanceof Ppe)return ci(RA(Tl(e.value0)));if(n instanceof Ns)return Gpe(Sl(e.value0));if(n instanceof bA)return $pe(Sl(e.value0));if(n instanceof Ok)return c0(Mpe(Sl(e.value0)));if(n instanceof Uk)return c0(Fk(fv(e.value0)));if(n instanceof Ps)return ci(Fk(fv(e.value0)));if(n instanceof Ope)return ci(Nu((function(t){return t/1e3})(Ape(uk(ik(e))))));if(n instanceof Upe)return ci(Lpe(CD(e.value0)));if(n instanceof Os)return Gk(CD(e.value0));if(n instanceof kpe)return Ml(3)(Gk(CD(e.value0)));if(n instanceof wE)return c0(yA(pv(e.value1)));if(n instanceof Us)return c0(jpe(Npe(yA(pv(e.value1)))(12)));if(n instanceof ks){var a=yA(pv(e.value1))>=12;return a?"PM":"AM"}if(n instanceof Bpe)return ci(Mk(bf(e.value1)));if(n instanceof cc)return c0(Mk(bf(e.value1)));if(n instanceof Hpe)return ci(Ak(wf(e.value1)));if(n instanceof bE)return c0(Ak(wf(e.value1)));if(n instanceof Jpe)return Bk(wA(Jc(e.value1)));if(n instanceof qpe)return ci((function(t){return Lk(t)(100)})(wA(Jc(e.value1))));if(n instanceof Wpe)return c0((function(t){return Lk(t)(10)})(wA(Jc(e.value1))));if(n instanceof ir)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},si=function(e){return function(n){return Cpe(zpe(n))(e)}};var Fen=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function EE(e){return Math.round(e).toString()}var lh=ae(Sv);var Qpe=x(Yc),Kpe=hd(zp)(th);var Ype=DG(zp)(th),IE=lk(fr),Xpe=vp(Yc)(rD),Zpe=B(ue);var Hk=hs(Ga),eme=jo(uo),nme=oe(fn),ame=de(eo),tme=oe(Y0),rme=wn(Tn);var ome=lh(Vp(Cv(Fv("+"))))(function(e){return lh(Kpe(Fv("0")))(function(n){return lh(Vp(Cv(Fv(",0"))))(function(a){return lh(Vp(Cv(Fv("."))))(function(t){return lh(Xpe(t)(function(r){return Cv(Ype(Fv("0")))}))(function(r){return lh(Vp(Cv(Fv("a"))))(function(u){return Qpe({sign:Tr(e),before:xo(n),comma:Tr(a),after:We(0)(Zpe(xo)(r)),abbreviations:Tr(u)})})})})})})}),ume=hA(ome);var Jk=function(e){return function(n){var a=Ob(n),t=(function(){if(a>0)return Hk(Nu(bG(a)/iO))(0);if(xe)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=eme(t)(3),u=(function(){var Q=r<1;return Q?n:n/Ub(1e3)(_r(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(xe)return"10e+"+nme(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): ")})();return Jk({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=Ub(10)(_r(Hk(0)(e.after))),h=gp(a*s)/s,p=Dd(h),R=h-p,E=gp(R*s),w=(function(){var Q=EE(E),V=Uu(Q),te=IE("0")(e.after-V|0);return te+Q})(),I=(function(){var Q=e.after<1;return Q?"":"."+((function(){var V=E===0;return V?IE("0")(e.after):""})()+(function(){var V=E>0;return V?w:""})())})(),L=function(Q){return function(V){return function(te){var le=Q,ne=V,Z=!1,ee;function me(qe,ze,mn){var Jn=pp(mn);if(Jn instanceof G)return Z=!0,Ed(qe);if(Jn instanceof T&&ze<3){le=yu(Jn.value0.head)(qe),ne=ze+1|0,te=Jn.value0.tail;return}le=yu(",")(qe),ne=0,te=mn}for(;!Z;)ee=me(le,ne,te);return ee}}},U=(function(){return e.comma?L([])(0)(rd(gD(IE("0")(l)+EE(p)))):IE("0")(l)+EE(p)})();return(function(){var Q=n<0;if(Q)return"-";var V=n>0&&e.sign;return V?"+":""})()+(U+I)}},ime=function(e){return function(n){return ame(ume(e))(It(Jk)(n))}},Kp=function(e){return function(n){return Sr(Dn(tme(n)))(rme)(ime(e)(n))}};var cme=Ke;var qk=function(e){return Rp(e)};var Al=function(e){var n=qk(e);return n?G.value:new T(cme(e))};var et=function(e){return function(n){var a=qk(e);return a?n:e}};var uu=function(){return Ke};var _R=oe(fn),sme=la(Zo),vme=la(vo),fme=uu(),_me=yi(),pme=Fl(N_),EA=jo(uo),mme=ni(Ve);var dme=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 _R(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return _R(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return _R(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return _R(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if(xe)return _R(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])}},TE=function(e){return dme({suffix:" "+e,justNow:"just now"})},Wk=function(){return function(e){var n=function(h){return(sme(Tl(O_(h)))*12|0)+vme(Sl(O_(h)))|0},a=fme(e),t=et(a.format)(TE("ago")),r=kb(_me(pme(a.to)(a.from))),u=EA(r+30|0)(60),i=EA(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=EA(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var $k=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var IA=Kp("0,0");var xk=function(e){return IA(_r(e))},fc=function(e){return function(n){return function(a){return xk(e)+(" "+$k(e)(n)(a))}}};var jk=(function(){return si(mme([Os.value,new ir(", "),Ns.value,new ir(" "),Ps.value,new ir(" at "),Us.value,new ir(":"),cc.value,new ir(" "),ks.value]))})();Ct();var zk=ct.Fragment,TA=()=>document.visibilityState=="visible",Vk=(e,n)=>document.elementFromPoint(e,n);function Qk(e){return function(n){return function(){return n.getElementById(e)}}}var Dme=B(ia),SE=function(e){var n=Dme(ge),a=Qk(e);return function(t){return n(a(t))}};var CE=function(e){return function(n){return function(){return n[e]}}},Rme=CE("children"),yme=CE("firstElementChild"),wme=CE("lastElementChild"),bme=CE("childElementCount");var Ai=function(){return window};function Yk(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 Vn=function(e){return function(n){return Yk(G.value,T.create,e,n)}};var Xk=Ke;var FE=Ke;var Zk=Ke;function eB(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 SA=Ke;var nB=function(e){return eB(G.value,T.create,e)};function FA(e){return function(){return e.seeking}}function pR(e){return function(){return e.currentTime}}function GA(e){return function(){return e.volume}}function MA(e){return function(n){return function(){n.volume=e}}}function AA(e){return function(){return e.muted}}function Xp(e){return function(n){return function(){n.muted=e}}}var tB=Vn("HTMLMediaElement");var rB=Vn("HTMLMediaElement");function NA(e){return function(){return e.hash}}function PA(e){return function(n){return function(){n.hash=e}}}function OA(e){return function(){return e.platform}}function s0(e){return function(){return e.document}}function UA(e){return function(){return e.navigator}}function mR(e){return function(){return e.location}}var uB=Ke;var gde=B(en);var Dde=vp(Yt)(rD),iB=ae(io),cB=de(ia),Rde=ae(nn);var HA=un("\xA0");var za=It(Wn(Aa));var sB=function(e){return function(n){if(e)return Aa;if(xe)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])}},JA=function(e){return function(n){return sB(e)(Dn(n))}};var qA=function(e){return function(n){if(e)return n(void 0);if(xe)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])}},Ka=function(e){return function(n){return qA(e)(Dn(n))}};var yde=oc()(Ce)(zk),wde=function(e){return function(n){return yde({key:e.key})(uD(Q1(""))(gde(un)(li(` `)(n))))}},sh=wde({key:""}),AE=function(e){return Dde(rB(e.target))(pR)};var vB=function(e){return function(){return Vk(e.x,e.y)}},fB=function(e){return iB(cB(iB(Ai)(s0))(FE))(SE(e))},LE=function(e){return cB(fB(e))(function(n){return Rde(n)(nB)})};var dR=dn;var pB=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},WA=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),mB=()=>new Date,dB=(()=>{let e=new Date;return typeof window<"u"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var Zp=(()=>{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:"")})();function $A(){return Date.now()}var Gde=B(ia);var Ll=Gde(pE)($A);var gB={liftAff:wn(Tn),MonadEffect0:function(){return He}};var Yhn=(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 h(p,R){if(!R.draining){var E=R.puts,w=R.takes,I=R.reads,L,U,Q,V,te;for(R.draining=!0;;){if(L=null,U=null,Q=null,V=R.value,te=I.size,R.error!==null){for(V=p.left(R.error);L=l(E);)r(L.cb(V));for(;U=l(I);)r(U(V));for(;Q=l(w);)r(Q(V));break}if(V===t&&(L=l(E))&&(R.value=V=L.value),V!==t){for(Q=l(w);te--&&(U=l(I));)r(U(p.right(V)));Q!==null&&(R.value=t,r(Q(p.right(V))))}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=h,a})();var gR=function(e){return Lp(Z0(e))},DR=function(e){return Lp(vd(e))};var Qde=x(Yt),_0=ae(nn),Kde=Ma(Zo),Yde=Ma(vo),Xde=Ma(el),Zde=Ma(ac),ehe=Ma(nc),nhe=Ma(ec),ahe=Ma(nl),the=x(Ua),wB=ot(io),rhe=de(ue);var ohe=(function(){return DR(G.value)})();var bB=function(e){return _0(Kde(e.year))(function(n){return _0(Yde(e.month+1|0))(function(a){return _0(Xde(e.day))(function(t){return _0(Zde(e.hour))(function(r){return _0(ehe(e.minute))(function(u){return _0(nhe(e.second))(function(i){return _0(ahe(e.millisecond))(function(l){return the(new qc(P_(n)(a)(t),new _v(r,u,i,l)))})})})})})})})},EB=function(e){var n=_O("Failed to obtain current time. This should never happen.");return Wn(n)(Qde)(bB(WA(e)))},p0=wB(EB)(mB),NE=function(e){var n=gR(ohe);if(n instanceof T)return n.value0;if(n instanceof G)return Lp(wB(EB)(dB));throw new Error("Failed pattern match at Utils.DateTime (line 63, column 3 - line 65, column 76): "+[n.constructor.name])},Li=function(e){return _0(rhe(pB({just:T.create,nothing:G.value})(e))(WA))(bB)};var zA=x(Ua),uhe=B(ue),IB=ae(nn);var FB=ta(aa),TB=na(FB)(Yn(Kn)),GB=Zn(Xn),SB=ea(GB),MB=ua(oa),CB=ra(MB);var VA=(function(){function e(){}return e.value=new e,e})(),QA=(function(){function e(){}return e.value=new e,e})(),KA=(function(){function e(){}return e.value=new e,e})();var ihe={to:function(e){if(e instanceof Se)return VA.value;if(e instanceof fe&&e.value0 instanceof Se)return QA.value;if(e instanceof fe&&e.value0 instanceof fe)return KA.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 VA)return new Se(je.value);if(e instanceof QA)return new fe(new Se(je.value));if(e instanceof KA)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 lhe=function(e){if(e instanceof VA)return"stuffed";if(e instanceof QA)return"satisfied";if(e instanceof KA)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 che=wt(ln)(ue)({parse:jn(lhe)(zn(ihe)(TB(TB(FB)(GB))(SB))(CB(CB(MB)))(SB)),diagnosticName:"ClientAppetite"}),AB=function(e){return IB(Wn(zA(G.value))((function(){var n=uhe(zA);return function(a){return n(che(a))}})())(ge(e.clientAppetite)))(function(n){return IB(tk(e.inquiryMode))(function(a){return zA({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:ge(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:ge(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var LB=ae(nn),vh=dt(),YA=Bt(be),NB=W({reflectSymbol:function(){return"description"}})(be),PE=W({reflectSymbol:function(){return"id"}})(dn),ZA=W({reflectSymbol:function(){return"name"}})(be),OB=vh(PE(ZA(W({reflectSymbol:function(){return"slug"}})(be)(pn)))),PB=ht(OB),vhe=t0(vh(W({reflectSymbol:function(){return"advisingConfig"}})(Bt(vh(W({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Bt(it))(W({reflectSymbol:function(){return"clientAppetite"}})(YA)(W({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Bt(dn))(W({reflectSymbol:function(){return"inquiryMode"}})(be)(W({reflectSymbol:function(){return"packages"}})(ht(vh(W({reflectSymbol:function(){return"activeForSale"}})(it)(NB(PE(ZA(W({reflectSymbol:function(){return"numMinutes"}})(dn)(W({reflectSymbol:function(){return"packageCategories"}})(PB)(W({reflectSymbol:function(){return"refundPeriodLengthDays"}})(dn)(W({reflectSymbol:function(){return"totalPriceCents"}})(dR)(pn)))))))))))(W({reflectSymbol:function(){return"pricePerHourCents"}})(dR)(W({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(dn)(W({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(dn)(W({reflectSymbol:function(){return"themes"}})(ht(vh(W({reflectSymbol:function(){return"active"}})(it)(W({reflectSymbol:function(){return"category"}})(OB)(NB(W({reflectSymbol:function(){return"durationMinutes"}})(dn)(PE(W({reflectSymbol:function(){return"priceCents"}})(dR)(W({reflectSymbol:function(){return"title"}})(be)(pn))))))))))(pn))))))))))))(W({reflectSymbol:function(){return"entity"}})(vh(W({reflectSymbol:function(){return"bio"}})(be)(PE(W({reflectSymbol:function(){return"imageUrl"}})(YA)(ZA(W({reflectSymbol:function(){return"organizationId"}})(dn)(W({reflectSymbol:function(){return"organizationName"}})(be)(W({reflectSymbol:function(){return"shortEducation"}})(YA)(W({reflectSymbol:function(){return"tags"}})(PB)(pn))))))))))(pn)))),XA=x(Ua),e2=B(ue),RR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fhe=function(e){return LB(vhe("ServiceProviderPresenter")(e))(function(n){return LB(Wn(XA(G.value))((function(){var a=e2(XA);return function(t){return a(AB(t))}})())(ge(n.advisingConfig)))(function(a){return XA({entity:n.entity,advisingConfig:a})})})},UB=wt(ln)(ue)({parse:function(e){return e.type==="Sem::User"?e2(RR.create)(J9(e.presenter)):e.type==="ServiceProviders::Individual"?e2(yR.create)(fhe(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var JB=ta(aa),kB=na(JB)(Yn(Kn)),qB=Zn(Xn),BB=ea(qB),WB=ua(oa),HB=ra(WB),Uf=(function(){function e(){}return e.value=new e,e})(),Gv=(function(){function e(){}return e.value=new e,e})(),kf=(function(){function e(){}return e.value=new e,e})(),_he={to:function(e){if(e instanceof Se)return Uf.value;if(e instanceof fe&&e.value0 instanceof Se)return Gv.value;if(e instanceof fe&&e.value0 instanceof fe)return kf.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 Uf)return new Se(je.value);if(e instanceof Gv)return new fe(new Se(je.value));if(e instanceof kf)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])}},$B={eq:function(e){return function(n){return e instanceof Uf&&n instanceof Uf||e instanceof Gv&&n instanceof Gv||e instanceof kf&&n instanceof kf}}},OE=function(e){if(e instanceof Uf)return"ready";if(e instanceof Gv)return"live";if(e instanceof kf)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var wR=(function(){return Ca(ln)({parse:jn(OE)(zn(_he)(kB(kB(JB)(qB))(BB))(HB(HB(WB)))(BB)),default:Uf.value,diagnosticName:"livestream poll status"})})(),a2=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:ge(e.autoDisplayMinutesFromStart)}};var xB=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:ge(e.undergrad.college),major:ge(e.undergrad.major),year:ge(e.undergrad.year)},gradCollege:ge(e.gradCollege),workExperience:ge(e.workExperience),admissionsStory:ge(e.admissionsStory),pictureUrl:ge(e.pictureUrl),allStreamsUrl:ge(e.allStreamsUrl)}};var mhe=Qe(Ga),dhe=bl(),YB=de(ue),XB=ta(aa),jB=na(XB)(Yn(Kn)),ZB=Zn(Xn),zB=ea(ZB),eH=ua(oa),VB=ra(eH),nH=Ca(ln),QB=uf(),KB=ot(nn),hhe=de(en),ghe=B(ue),Dhe=ae(nn),tl=(function(){function e(){}return e.value=new e,e})(),pu=(function(){function e(){}return e.value=new e,e})(),ko=(function(){function e(){}return e.value=new e,e})();var Bs=fn,Rhe=oe(Bs);var yhe={to:function(e){if(e instanceof Se)return tl.value;if(e instanceof fe&&e.value0 instanceof Se)return pu.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 tl)return new Se(je.value);if(e instanceof pu)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])}},m0={eq:function(e){return function(n){return e instanceof tl&&n instanceof tl||e instanceof pu&&n instanceof pu||e instanceof ko&&n instanceof ko}}},bR={eq:function(e){return function(n){return e===n}}},aH={compare:function(e){return function(n){return mhe(e)(n)}},Eq0:function(){return bR}};var d0=function(e){return dhe({livestream_conference_id:Rhe(e.id),livestream_conference_presenter_name:We("")(YB(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:We("")(e.partnerType)})},tH=(function(){var e=function(n){if(n instanceof tl)return"waiting_room";if(n instanceof pu)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 jn(e)(zn(yhe)(jB(jB(XB)(ZB))(zB))(VB(VB(eH)))(zB))})(),rH=(function(){return nH({parse:tH,default:tl.value,diagnosticName:"livestream status"})})(),whe=nH({parse:Li,default:Ut(Od),diagnosticName:"livestream scheduled start time"}),ER=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:YB(ge(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:QB(n.id),slug:QB(n.slug)}}),scheduledStartTime:whe(e.scheduledStartTime),onAirTime:KB(Li)(ge(e.onAirTime)),streamStatus:rH(e.streamStatus),watchUrl:ge(e.watchUrl),streamingStartTime:KB(Li)(ge(e.streamingStartTime)),polls:hhe(e.polls)(function(n){return{poll:a2(n.poll),status:wR(n.status)}}),presenter:ghe(xB)(ge(e.presenter)),partnerType:ge(e.partnerType),guestPresenter:Dhe(ge(e.guestPresenter))(UB),zoomJoinUrl:ge(e.zoomJoinUrl),zoomStartUrl:ge(e.zoomStartUrl)}};var oH=ta(aa),uH=Zn(Xn),iH=ua(oa),_c=(function(){function e(){}return e.value=new e,e})(),fh=(function(){function e(){}return e.value=new e,e})(),bhe={to:function(e){if(e instanceof Se)return _c.value;if(e instanceof fe)return fh.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 _c)return new Se(je.value);if(e instanceof fh)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])}},UE={eq:function(e){return function(n){return e instanceof _c&&n instanceof _c||e instanceof fh&&n instanceof fh}}};var IR=function(e){if(e instanceof fh)return"anonymous-all-schools";if(e instanceof _c)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},kE=(function(){return Ca(ln)({parse:jn(IR)(zn(bhe)(na(oH)(Yn(Kn))(oH)(uH))(ra(iH)(iH))(ea(uH))),diagnosticName:"Profile.PublishScope",default:fh.value})})();var Xc=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Zc=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),es=(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})();var r2=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:ge(e.description)}},em=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:Li(e.time)}},lH=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:ge(e.fullName),publishScope:kE(e.publishScope)}},o2=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:ge(e.autoDisplayMinutesFromStart)}},pc="overlay-visibility-test";var cH=ta(aa),BE=na(cH)(Yn(Kn)),sH=Zn(Xn),HE=ea(sH),vH=ua(oa),JE=ra(vH),Bf=(function(){function e(){}return e.value=new e,e})(),h0=(function(){function e(){}return e.value=new e,e})(),nm=(function(){function e(){}return e.value=new e,e})(),g0=(function(){function e(){}return e.value=new e,e})(),D0=(function(){function e(){}return e.value=new e,e})(),Ehe={to:function(e){if(e instanceof Se)return Bf.value;if(e instanceof fe&&e.value0 instanceof Se)return h0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return nm.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return g0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe)return D0.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 Bf)return new Se(je.value);if(e instanceof h0)return new fe(new Se(je.value));if(e instanceof nm)return new fe(new fe(new Se(je.value)));if(e instanceof g0)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof D0)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])}},fH=function(e){if(e instanceof Bf)return"love-this";if(e instanceof h0)return"helpful";if(e instanceof nm)return"not-helpful";if(e instanceof g0)return"writing-down";if(e instanceof D0)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},_H=function(e){return{authorTag:e.authorTag,kind:fH(e.kind)}},Ihe=(function(){return Ca(ln)({parse:jn(fH)(zn(Ehe)(BE(BE(BE(BE(cH)(sH))(HE))(HE))(HE))(JE(JE(JE(JE(vH)))))(HE)),default:Bf.value,diagnosticName:"Livestream Reaction Kind"})})(),pH=function(e){return{authorTag:e.authorTag,kind:Ihe(e.kind)}};var dH=typeof CV<"u"&&CV.pathInfo||typeof global<"u"&&global.CV&&global.CV.pathInfo||(e=>null);function hH(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 gH(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 h=0,p;(p=r.headers[h])!=null;h++)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 qE="application/json",DH="application/x-www-form-urlencoded";var yH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),wH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),EH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),IH=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),u2=(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})(),TH=function(e){return e instanceof u2?new T(DH):e instanceof WE?new T(qE):G.value};var SH=(function(){return WE.create})();var CH=nt();var $E=(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})(),am=(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})(),FH=function(e){if(e instanceof $E||e instanceof xE)return CH(e.value0);if(e instanceof am)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var l2=function(e){if(e instanceof $E)return"Accept";if(e instanceof xE)return"Content-Type";if(e instanceof am)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var MH=wn(Tn),c2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),s2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),v2=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),jE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),VE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),AH=function(e){if(e instanceof c2)return"arraybuffer";if(e instanceof s2)return"blob";if(e instanceof v2)return"document";if(e instanceof jE||e instanceof zE)return"text";if(e instanceof VE)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},LH=function(e){return e instanceof jE?new T(qE):G.value},NH=(function(){return new zE(MH)})();var PH=(function(){return new VE(MH)})();var UH=(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 Mhe=nt();var ph=function(e){return Mhe($b(e))};function kH(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var KE=function(e){return kH(Ae.create,Le.create,e)};function HH(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function JH(e,n,a){try{return n(HH(encodeURIComponent(a)))}catch(t){return e(t)}}function qH(e,n,a){try{return n(HH(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var TR=(function(){return D_(JH)(Dn(G.value))(T.create)})();var YE=(function(){return D_(qH)(Dn(G.value))(T.create)})();var Phe=va(wo),WH=B(ue),Ohe=Du(Dl)(Ua);var Uhe=function(e){return e};var $H=(function(){var e=function(t){if(t.value1 instanceof G)return YE(t.value0);if(t.value1 instanceof T)return Phe(WH(function(r){return function(u){return r+("="+u)}})(YE(t.value0)))(YE(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=WH(_o("&")),a=Ohe(e);return function(t){return n(a(Uhe(t)))}})();var _2=(function(){function e(){}return e.value=new e,e})(),tm=(function(){function e(){}return e.value=new e,e})(),p2=(function(){function e(){}return e.value=new e,e})(),rm=(function(){function e(){}return e.value=new e,e})(),ZE=(function(){function e(){}return e.value=new e,e})(),SR=(function(){function e(){}return e.value=new e,e})(),m2=(function(){function e(){}return e.value=new e,e})(),d2=(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})(),eI=(function(){function e(){}return e.value=new e,e})();var Bhe=function(e){return e},Hhe={show:function(e){if(e instanceof _2)return"OPTIONS";if(e instanceof tm)return"GET";if(e instanceof p2)return"HEAD";if(e instanceof rm)return"POST";if(e instanceof ZE)return"PUT";if(e instanceof SR)return"DELETE";if(e instanceof m2)return"TRACE";if(e instanceof d2)return"CONNECT";if(e instanceof h2)return"PROPFIND";if(e instanceof g2)return"PROPPATCH";if(e instanceof D2)return"MKCOL";if(e instanceof R2)return"COPY";if(e instanceof y2)return"MOVE";if(e instanceof w2)return"LOCK";if(e instanceof b2)return"UNLOCK";if(e instanceof eI)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var xH=Sr(oe(Hhe))(Bhe);var jH={eq:function(e){return function(n){return e instanceof _2&&n instanceof _2||e instanceof tm&&n instanceof tm||e instanceof p2&&n instanceof p2||e instanceof rm&&n instanceof rm||e instanceof ZE&&n instanceof ZE||e instanceof SR&&n instanceof SR||e instanceof m2&&n instanceof m2||e instanceof d2&&n instanceof d2||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 eI&&n instanceof eI}}};var zH=function(e){return U_(function(n){return function(){var t=e(function(r){return n(Ae.create(r))()},function(r){return n(Le.create(r))()});return function(r){return U_(function(u){return function(){return t(r,function(l){return u(Ae.create(l))()},function(l){return u(Le.create(l))()}),eM}})}}})};var I2=x(Nc(Kr)),qhe=Td(Kr),om=hf(Kr),VH=Oa(zb(Yb)(Kr)),Whe=Zv(iv(Kr)),nI=B(ue),$he=qi(Ve)(kt),xhe=Ee(Ir),jhe=ot(nn),zhe=B(en),Vhe=de(lt),Qhe=T_(nu),Khe=x(ya);var aI=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),tI=(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})(),rI=(function(){function e(){}return e.value=new e,e})(),oI=(function(){function e(){}return e.value=new e,e})(),uI=(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===""?I2(O5):Sr(function(R){return qhe(wD.create(R))})(I2)(KE(p))},t=(function(){if(n.responseFormat instanceof c2)return om("ArrayBuffer");if(n.responseFormat instanceof s2)return om("Blob");if(n.responseFormat instanceof v2)return function(p){return VH(om("Document")(p))(VH(om("XMLDocument")(p))(om("HTMLDocument")(p)))};if(n.responseFormat instanceof jE)return Whe(function(p){return n.responseFormat.value0(a(p))})(om("String"));if(n.responseFormat instanceof zE)return om("String");if(n.responseFormat instanceof VE)return Dn(n.responseFormat.value0(I2(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 yH)return new Le(p.value0(No));if(p instanceof wH)return new Le(No(p.value0));if(p instanceof bH)return new Le(No(p.value0));if(p instanceof EH)return new Le(No(p.value0));if(p instanceof IH)return new Le(No(p.value0));if(p instanceof u2)return nv("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(nI(No)($H(p.value0)));if(p instanceof WE)return new Le(No(X1(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&&!$he(u_(xhe)(l2)(p.value0))(R)?mp(R)(p.value0):R}},i=function(p){return u(nI(xE.create)(jhe(TH)(p)))(u(nI($E.create)(LH(n.responseFormat)))(n.headers))},l=function(p){return{method:xH(n.method),url:n.url,headers:zhe(function(R){return{field:l2(R),value:FH(R)}})(i(n.content)),content:p,responseType:AH(n.responseFormat),username:rt(n.username),password:rt(n.password),withCredentials:n.withCredentials,timeout:We(0)(nI(function(R){return R})(n.timeout))}},s=function(p){return Vhe(Qhe(zH(gH(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",UH.create,l(p)))))(function(R){if(R instanceof Le){var E=ph(t(R.value0.body));if(E instanceof Ae)return new Ae(new tI(MO(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 Ae)return new Ae((function(){var w=Rd(R.value0),I=w==="AffjaxTimeoutErrorMessageIdent";if(I)return rI.value;var L=w==="AffjaxRequestFailedMessageIdent";return L?oI.value:new uI(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(rt(G.value));if(n.content instanceof T){var h=r(n.content.value0);if(h instanceof Le)return s(rt(new T(h.value0)));if(h instanceof Ae)return Khe(new Ae(new aI(h.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[h.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var mh=(function(){return{method:new Ae(tm.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:PH,timeout:G.value}})();var YH={eq:function(e){return function(n){return e===n}}};var T2={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var XH=QH(T2);function RJ(e){return Buffer.from(e).toString("base64")}function yJ(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var G2=typeof btoa=="function";function wJ(e){let a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Nv||!Nv.key)return Nv||console.error("Pusher config is missing in global context"),new Kge;let t={auth:{headers:{"X-CSRF-Token":Nv.authToken}},authEndpoint:Nv.authPath,cluster:Nv.cluster};return Nv.dev&&Object.assign(t,{wsHost:Nv.dev.wsHost,wsPort:Nv.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new UJ.default(Nv.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),kJ=e=>{let n=Vge().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),Qge()}};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 Yge(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function Yge(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 fI=function(e){return e};var tDe=function(e){return e},HJ=function(e){var n=Qe(e),a=tDe(e.Eq0());return{compare:function(t){return function(r){return M8(n(t)(r))}},Eq0:function(){return a}}};var pI=function(e){return function(){console.error(e)}};var VJ=function(e){var n=On(e);return function(a){return n(pI(a))}};var RDe=x(Yt),QJ=ae(io),yDe=B(ia),wDe=VJ(Ao),L2=function(e){var n=function(t){var r=e(t);return SM(r.view(r.init.value0)(Dn(RDe(void 0))))},a=function(t){return function(r){return function(u){return function(){var l=QJ(QJ(Ai)((function(){var h=yDe(FE);return function(p){return h(s0(p))}})()))(SE(r))();if(l instanceof G)return wDe("Element #"+(r+" not found"))();if(l instanceof T){var s=MM(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(i5),renderToString:n,hydrate:a(l5)}};var LR="";function YJ(e){var n=e.split(` `);return n.reduce(function(a,t){var r=TDe(t)||CDe(t)||MDe(t)||PDe(t)||LDe(t);return r&&a.push(r),a},[])}var EDe=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,IDe=/\((\S*)(?::(\d+))(?::(\d+))\)/;function TDe(e){var n=EDe.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=IDe.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]||LR,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var SDe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function CDe(e){var n=SDe.exec(e);return n?{file:n[2],methodName:n[1]||LR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var FDe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,GDe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function MDe(e){var n=FDe.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=GDe.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||LR,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var ADe=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function LDe(e){var n=ADe.exec(e);return n?{file:n[3],methodName:n[1]||LR,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var NDe=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function PDe(e){var n=NDe.exec(e);return n?{file:n[2],methodName:n[1]||LR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function ZJ({skipFrames:e,prefix:n}){let a=new Error().stack,r=YJ(a)[e],u=XJ(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=XJ(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var XJ=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var kDe=x(kn),BDe=wn(Tn),mI=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HDe={map:function(e){return function(n){return new mI(function(a){return n.value0(function(t){return a(e(t))})})}}},JDe=B(HDe);var eq=function(e){return GM(ZJ(e))},Hf=function(e){return new mI(function(n){return n(e)})},lm=function(e){return function(n){return new mI(function(a){return Cf(e)(n)(a)})}},nq=function(e){return function(n){return Cf(e)(function(a){return{init:kDe(void 0),update:Dn(ef),view:Dn(Dn(n.value0(BDe)))}})(void 0)}},aq=function(e){var n=eq({skipFrames:3,prefix:"WithHook"});return function(a){return nq(n)(JDe(a)(e))}};var Rh=function(e){var n=eq({skipFrames:3,prefix:"HooksComponent"});return nq(n)(e)},Pv=function(){return function(e){return function(n){return new mI(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},qDe=Pv(),cm=function(e){return function(){return qDe}};Ct();var N2=class extends ct.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},tq=N2;var $De=vr();var rq=function(e){return"ref:"+hr(e)(Tt.value)},oq=function(e){var n=rq(e);return function(a){return $De(Is(n)(a))}},uq=function(e){var n=rq(e);return function(a){return t1(n)(a)}};var jDe=oc(),iq=vn(rn)(_a),lq=x(kn),zDe=uc(k1(Wc)),cq={reflectSymbol:function(){return"deps"}},VDe=oq(cq),QDe=uq(cq),KDe=wn(Tn);var YDe=function(e){var n=jDe(e);return function(){return function(){return n(tq)}}},XDe=YDe(tn)()(),ZDe=function(e){var n=Au(e);return function(a){return function(t){return function(r){return function(u){return lm(a)(function(i){return t({init:iq(Pt(u(r)))(function(){return lq(r)}),update:function(l){return function(s){return iq(Pt(u(s)))(function(){return lq(s)})}},view:function(l){return function(s){return XDe({componentDidUpdate:zDe(s)(function(h){var p=n(VDe(h))(r);return p?new T(r):G.value}),deps:QDe(r)})(i(void 0))}}})})}}}}};var yh=function(e){var n=ZDe(e);return function(a){return function(t){return n("UseEffectPrime")(KDe)(a)(t)}}};var sq=x(kn),eRe=wn(Tn);var nRe=function(e){return function(n){return function(a){return lm(e)(function(t){return n({init:sq(a),update:function(r){return function(u){return sq(u)}},view:op(t)})})}}},rs=function(e){return nRe("UseState")(eRe)(e)};var P2=(function(){return Pv()(rs(G.value))(function(e){return Hf(new Rn(e.value0,O1(e.value0)(e.value1)))})})();var vq=vn(rn)(_a),tRe=Gi(He),rRe=wn(Tn),fq=x(kn),NR=function(e){return function(n){return lm("UseSubscription")(function(a){return{init:vq(tRe(rRe)(e))(function(){return fq(void 0)}),update:function(t){return function(r){return vq(Pt(n(r)))(function(){return fq(void 0)})}},view:function(t){return function(r){return a(void 0)}}}})}};var hI=typeof CV<"u"&&CV.assetsRoot||typeof global<"u"&&global.CV&&global.CV.assetsRoot||"/";var OR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Nl=(function(){function e(){}return e.value=new e,e})();var gq=function(e){if(e instanceof OR)return e.value0;if(e instanceof Nl)return"";throw new Error("Failed pattern match at Utils.HTML.Img.Alt (line 24, column 15 - line 26, column 19): "+[e.constructor.name])};var lRe=(function(){function e(){}return e.value=new e,e})(),cRe=(function(){function e(){}return e.value=new e,e})();var Dq=function(e){if(e instanceof lRe)return"eager";if(e instanceof cRe)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 O2=Ac(vu(kt)),vRe=uu(),fRe=de(ue),_Re=xc()(),gI=function(e){var n=wl(e);return function(a){return Tr(n(a))}},Rq=function(e){if(O2(gI("http://"))(O2(gI("https://"))(O2(gI("//"))(gI("blob:"))))(e))return e;if(xe)return hI+We(e)(wl("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 69, column 1 - line 69, column 30): "+[e.constructor.name])},Pl=function(){return function(e){return function(n){var a=vRe(n),t={alt:gq(a.alt),height:et(a.height)(void 0),loading:We(void 0)(fRe(Al(a.loading))(Dq)),onClick:et(a.onClick)(void 0),src:Rq(a.src),style:et(a.style)(void 0),width:et(a.width)(void 0)};return _Re(e)(t)}}};var wq=x(kn),pRe=Ca(uE),mRe=ae(gi);var dRe={init:wq(void 0),update:function(e){return function(n){return wq(void 0)}},view:function(e){return function(n){return Aa}}},U2=function(e){var n=M_(e);return function(a){return L2(pRe({parse:function(t){return mRe(n(t))(function(r){return Wn(new Ae("Component construction failed"))(Le.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:dRe}))}};var ke=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Hn=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var kRe=bo(Ve)(fr),BRe=Xu(Yt)(gl),HRe=de(OM);var JRe={show:function(e){return e}},qRe=oe(JRe);var yI=be;var WRe=function(e){var n=t0(e);return function(a){return function(t){return function(r){var u=kRe(["Pusher event ",t," over channel ",qRe(a)]),i=function(l){return BRe(n(u)(l))(r)()};return function(){return kJ({channel:a,event:t,handler:i})}}}}},mc=function(e){var n=WRe(e);return function(a){var t=a.Monad0(),r=ae(t.Bind1()),u=On(a),i=x(t.Applicative0());return function(l){return function(s){return function(h){return r(u(n(l)(s)(h)))(function(p){return i(u(p))})}}}}},$Re=mc(Sp),wI=function(e){var n=$Re(e);return function(a){return function(t){return HRe(n(a)(t))(Dn(void 0))}}};var Wq=Lv(Mv),ol=Hs(Wq),Bo=ae(La),kR=Hs(Lv(Wq)),$q=x(ya),xRe=de(ue),UR=dt(),xq=W({reflectSymbol:function(){return"pollId"}})(dn),jRe=W({reflectSymbol:function(){return"status"}})(be)(pn),zRe=or(ht(UR(xq(jRe)))),jq=B(en),zq=B(lt),VRe=W({reflectSymbol:function(){return"id"}}),QRe=VRe(dn),Vq=UR(W({reflectSymbol:function(){return"author"}})(UR(W({reflectSymbol:function(){return"cvid"}})(be)(W({reflectSymbol:function(){return"username"}})(be)(pn))))(QRe(W({reflectSymbol:function(){return"isFromHQ"}})(it)(W({reflectSymbol:function(){return"isPublic"}})(it)(W({reflectSymbol:function(){return"text"}})(be)(W({reflectSymbol:function(){return"time"}})(be)(pn))))))),KRe=Dh(Vq);var YRe=Bt(be);var XRe=Dh(ht(UR(xq(W({reflectSymbol:function(){return"responses"}})(UR(W({reflectSymbol:function(){return"answered"}})(dn)(W({reflectSymbol:function(){return"optionCounts"}})(ht(dn))(W({reflectSymbol:function(){return"seen"}})(dn)(W({reflectSymbol:function(){return"skipped"}})(dn)(pn))))))(pn))))),ZRe=Dh(YRe),eye=Dh(ht(Vq));var W2=kR("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Bo(e({id:n.id,status:OE(a)}))(Av(function(t){return $q(We([])(xRe(zRe(t))(jq(function(r){return{pollId:r.pollId,status:wR(r.status)}}))))}))}}});var $2=kR("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Bo(e({id:n.id,options:a}))(to)}}}),Qq=ol("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Bo(e({conference_id:n}))(to)}}),Kq=ol("livestreams_conferences_status_complete_path")(function(e){return function(n){return Bo(e({conference_id:n}))(to)}}),Yq=ol("livestreams_cta_save_referral_path")(function(e){return function(n){return Bo(e(n))(to)}}),Xq=ol("livestreams_polls_report_shown_path")(function(e){return function(n){return Bo(e({id:n.id}))(to)}}),Zq=kR("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Bo(e({stream_id:n,visible:a.visible}))(to)}}}),eW=kR("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Bo(e({conference_id:n,current_time_minutes:a}))(to)}}}),nW=ol("livestreams_questions_visibility_path")(function(e){return function(n){return Bo(e({question_id:n.questionId,is_public:n.isPublic}))(to)}}),aW=ol("livestreams_questions_post_path")(function(e){return function(n){return Bo(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Av(function(a){return zq(em)(KRe("Livestream question")(a))}))}}),tW=ol("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(to)}}),rW=ol("livestreams_cta_open_path")(function(e){return function(n){return Bo(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(to)}}),oW=ol("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}))(to)}}),uW=ol("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}))(to)}}),bI=ol("livestreams_register_path")(function(e){return function(n){return Bo(e({from_conference_id:rt(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(to)}});var iW=kR("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Bo(e({conference_id:n,reaction:_H(a)}))(to)}}}),lW=ol("livestreams_polls_responses_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Av(XRe("livestream poll responses")))}}),cW=ol("livestreams_conferences_download_url_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Av(function(a){return zq(ge)(ZRe("Livestream download URL")(a))}))}}),EI=Hs(Mv)("livestreams_dismiss_network_settings_modal_path")(function(e){return Bo(e({}))(to)});var sW=ol("livestreams_conferences_ban_user_path")(function(e){return function(n){return Bo(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(to)}}),II=ol("livestreams_questions_all_path")(function(e){return function(n){return Bo(e({conference_id:n}))(Av(function(a){return Bo(eye("Livestream questions")(a))(function(t){return $q(jq(em)(t))})}))}});var z2=(function(){function e(){}return e.value=new e,e})(),V2=(function(){function e(){}return e.value=new e,e})(),Q2=(function(){function e(){}return e.value=new e,e})(),K2=(function(){function e(){}return e.value=new e,e})(),Y2=(function(){function e(){}return e.value=new e,e})(),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})(),Or=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),iL=(function(){function e(){}return e.value=new e,e})();var SI=function(e){if(e instanceof Or&&e.value0 instanceof z2)return"architecture";if(e instanceof Or&&e.value0 instanceof Q2)return"chemistry";if(e instanceof Or&&e.value0 instanceof V2)return"business";if(e instanceof Or&&e.value0 instanceof K2)return"computer-science";if(e instanceof Or&&e.value0 instanceof Y2)return"criminal-justice-and-corrections";if(e instanceof Or&&e.value0 instanceof X2)return"economics";if(e instanceof Or&&e.value0 instanceof Z2)return"engineering";if(e instanceof Or&&e.value0 instanceof eL)return"english";if(e instanceof Or&&e.value0 instanceof nL)return"film";if(e instanceof Or&&e.value0 instanceof aL)return"finance";if(e instanceof Or&&e.value0 instanceof tL)return"history";if(e instanceof Or&&e.value0 instanceof rL)return"political-science";if(e instanceof Or&&e.value0 instanceof oL)return"pre-med";if(e instanceof Or&&e.value0 instanceof uL)return"psychology";if(e instanceof iL)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var CI=(function(){function e(){}return e.value=new e,e})(),cye=(function(){function e(){}return e.value=new e,e})(),sye=(function(){function e(){}return e.value=new e,e})();var _W=function(e){if(e instanceof CI)return G.value;if(e instanceof sye)return new T("open");if(e instanceof cye)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 mW=function(e){var n=NM(e);return function(){return function(){return n("button")}}};var dW=function(e){var n=NM(e);return function(){return function(){return n("a")}}};var x1e=Xr(vu(kt)),j1e=function(e){return e},cn=No(null),z1e=function(e){return x1e(Dp)(e)},hW=function(e){var n=z1e(e);return n?e:""},zr=function(e){return j1e(No(e))};var V1e=AM(S5),gW=Fs()(),So=function(e){return V1e(e)},da=function(e){var n=mW(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(gW(r)({className:a,"aria-label":t}))(u)}}}}}}},DW=function(e){var n=da(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},ro=function(e){var n=dW(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(gW(r)({className:a,"aria-label":t}))(u)}}}}}}};var CW=vr();var MI=function(e){return function(n){var a=(function(){var u=vv("?")(n);return u?"&":"?"})(),t=CW(TR(e.value)),r=CW(TR(e.key));return n+(a+(r+("="+t)))}};var AEe=(function(){function e(){}return e.value=new e,e})(),LEe=(function(){function e(){}return e.value=new e,e})(),NEe=(function(){function e(){}return e.value=new e,e})(),PEe=(function(){function e(){}return e.value=new e,e})(),OEe=(function(){function e(){}return e.value=new e,e})(),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})(),WEe=(function(){function e(){}return e.value=new e,e})(),$Ee=(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})();var Ba=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ul=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var FW=function(e){if(e instanceof Ba&&e.value0 instanceof AEe)return"AcceptanceRate";if(e instanceof Ba&&e.value0 instanceof LEe)return"AcceptanceRateMen";if(e instanceof Ba&&e.value0 instanceof NEe)return"AcceptanceRateWomen";if(e instanceof Ba&&e.value0 instanceof PEe)return"Address";if(e instanceof Ba&&e.value0 instanceof OEe)return"AdmissionChances";if(e instanceof Ba&&e.value0 instanceof UEe)return"AdmissionDifficulty";if(e instanceof Ba&&e.value0 instanceof kEe)return"AdmissionsNotificationDate";if(e instanceof Ba&&e.value0 instanceof BEe)return"AdmissionsWebsite";if(e instanceof Ba&&e.value0 instanceof HEe)return"AppDeadlineIsRolling";if(e instanceof Ba&&e.value0 instanceof JEe)return"ApplicationEffort";if(e instanceof Ba&&e.value0 instanceof qEe)return"ApplicationRound";if(e instanceof Ba&&e.value0 instanceof WEe)return"BasketballConference";if(e instanceof Ba&&e.value0 instanceof $Ee)return"CampusSetting";if(e instanceof Ba&&e.value0 instanceof xEe)return"City";if(e instanceof Ba&&e.value0 instanceof jEe)return"ClassRank";if(e instanceof Ba&&e.value0 instanceof zEe)return"CoEdSingleSex";if(e instanceof Ba&&e.value0 instanceof VEe)return"CollegeType";if(e instanceof Ba&&e.value0 instanceof QEe)return"CommuterCollege";if(e instanceof Ba&&e.value0 instanceof KEe)return"Diversity";if(e instanceof Ba&&e.value0 instanceof YEe)return"DropoutRate";if(e instanceof Ba&&e.value0 instanceof ZEe)return"FinancialAidWebsite";if(e instanceof Ba&&e.value0 instanceof eIe)return"FirstYearEnrollment";if(e instanceof Ba&&e.value0 instanceof nIe)return"FootballConference";if(e instanceof Ba&&e.value0 instanceof aIe)return"FourYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof tIe)return"HasDivisionOneBasketball";if(e instanceof Ba&&e.value0 instanceof rIe)return"HasDivisionOneFootball";if(e instanceof Ba&&e.value0 instanceof oIe)return"HasMedicalSchool";if(e instanceof Ba&&e.value0 instanceof uIe)return"HasStudyAbroad";if(e instanceof Ba&&e.value0 instanceof iIe)return"HBCU";if(e instanceof Ba&&e.value0 instanceof lIe)return"InListStatus";if(e instanceof Ba&&e.value0 instanceof cIe)return"MainWebsite";if(e instanceof Ba&&e.value0 instanceof XEe)return"Majors";if(e instanceof Ba&&e.value0 instanceof sIe)return"Name";if(e instanceof Ba&&e.value0 instanceof vIe)return"NetCostEstimate";if(e instanceof Ba&&e.value0 instanceof fIe)return"Notes";if(e instanceof Ba&&e.value0 instanceof _Ie)return"PercentInternationalStudents";if(e instanceof Ba&&e.value0 instanceof pIe)return"Phone";if(e instanceof Ba&&e.value0 instanceof mIe)return"Photo";if(e instanceof Ba&&e.value0 instanceof dIe)return"Prestige";if(e instanceof Ba&&e.value0 instanceof hIe)return"ProgramLength";if(e instanceof Ba&&e.value0 instanceof gIe)return"PublicPrivate";if(e instanceof Ba&&e.value0 instanceof DIe)return"RecommendationLetters";if(e instanceof Ba&&e.value0 instanceof RIe)return"Region";if(e instanceof Ba&&e.value0 instanceof yIe)return"ReligiousAffiliation";if(e instanceof Ba&&e.value0 instanceof wIe)return"SatActDeadline";if(e instanceof Ba&&e.value0 instanceof bIe)return"SatActTestPolicy";if(e instanceof Ba&&e.value0 instanceof EIe)return"SatSubjectTestDeadline";if(e instanceof Ba&&e.value0 instanceof IIe)return"SixYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof TIe)return"State";if(e instanceof Ba&&e.value0 instanceof SIe)return"StudentFacultyRatio";if(e instanceof Ba&&e.value0 instanceof CIe)return"SubmissionDeadline";if(e instanceof Ba&&e.value0 instanceof FIe)return"TOEFLPolicy";if(e instanceof Ba&&e.value0 instanceof GIe)return"TotalUndergrads";if(e instanceof Ba&&e.value0 instanceof MIe)return"TuitionInState";if(e instanceof Ba&&e.value0 instanceof AIe)return"TuitionOutOfState";if(e instanceof Ba&&e.value0 instanceof LIe)return"YieldRate";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof z2)return"RankingArchitecture";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof V2)return"RankingBusiness";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof Q2)return"RankingChemistry";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof K2)return"RankingComputerScience";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof Y2)return"RankingCriminalJusticeAndCorrections";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof X2)return"RankingEconomics";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof Z2)return"RankingEngineering";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof eL)return"RankingEnglish";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof nL)return"RankingFilm";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof aL)return"RankingFinance";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof tL)return"RankingHistory";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof rL)return"RankingPoliticalScience";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof oL)return"RankingPreMed";if(e instanceof ul&&e.value0 instanceof Or&&e.value0.value0 instanceof uL)return"RankingPsychology";if(e instanceof ul&&e.value0 instanceof iL)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var PIe=(function(){function e(){}return e.value=new e,e})(),OIe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),UIe=(function(){function e(){}return e.value=new e,e})();var GW=function(e){if(e instanceof PIe)return"filters";if(e instanceof OIe)return"filter:"+FW(e.value0);if(e instanceof UIe)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 33, column 26 - line 36, column 39): "+[e.constructor.name])};function MW(e,n){typeof CV<"u"&&CV.tracking&&CV.tracking.event(e,n)}var HIe=bl();var qf=function(e){var n=On(e);return function(a){return function(t){return n(function(){return MW(a,t)})}}},Wf=function(e){var n=qf(e);return function(){return function(a){return function(t){return n(a)(HIe(t))}}}};var HR=(function(){function e(){}return e.value=new e,e})(),E0=(function(){function e(){}return e.value=new e,e})(),JR=(function(){function e(){}return e.value=new e,e})(),LTe=(function(){function e(){}return e.value=new e,e})(),BW=function(e){if(e instanceof HR)return"modal-sm";if(e instanceof E0)return"";if(e instanceof JR)return"modal-lg";if(e instanceof LTe)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 s$=fl(c$(),1),v$=s$.default;var mSe=oc(),f$=function(e){var n=mSe(e);return function(){return function(){return n(v$)}}};function IL(e){return function(){return function(n){return e(n)()}}}function TL(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function SL(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var _$="message";var p$="hashchange";var m$="popstate";var d$="keyup",h$="keydown";var g$="mouseup";var D$="mousemove";var R$=On(He),y$=B(ia),bSe=ot(io),xR=(function(){var e=function(t){return function(r){return function(u){return R$(function(){var l=r(),s=IL(function(h){return u(h)})();return TL(t)(s)(!1)(l)(),R$(SL(t)(s)(!1)(l))})}}},n=function(t){return e(t)(y$(uB)(Ai))},a=function(t){return e(t)(y$(Zk)(bSe(s0)(Ai)))};return{hashchange:n(p$),mousemove:n(D$),mouseup:n(g$),popstate:n(m$),resize:n("resize"),message:n(_$),keydown:a(h$),keyup:a(d$),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}})();var kI=function(){return Ke};var BI=Ne(tn),GL=uu(),ESe=f$(tn)()(),FL=jr(tn)()(),ISe=jr(Ce)()(),TSe=Ne(Ce),SSe=da(ie)()(),CSe=Vr(ya),FSe=On(He),b$=kI(),Js=function(){return function(e){var n=BI("modal-backdrop fade show")(Aa),a=GL(e),t=a.id+"-description",r=Al(a.footer),u=Al(a.header),i=a.id+"-label",l={style:et(a.dialogStyle)(Vt({})),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=et(a.size)(E0.value),h=_o(" ")([(function(){var R=et(a.scrollable)(!0);return R?"modal-dialog-scrollable":""})(),(function(){var R=et(a.centered)(!0);return R?"modal-dialog-centered":""})(),BW(s),et(a.dialogClass)("")]),p=ESe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(BI("modal fade show d-block")(FL("modal-dialog "+h)(l)(ISe("modal-content "+et(a.contentClass)(""))({style:et(a.contentStyle)(Vt({}))})([za(u)(FL("modal-header "+et(a.headerClass)(""))({id:i})),FL("modal-body "+et(a.bodyClass)(""))({id:t})(a.body),za(r)(BI("modal-footer "+et(a.footerClass)("")))]))));return Oe([p,n])}},ML=Js(),qs=function(){return function(e){var n=GL(e),a=TSe("d-flex w-100 justify-content-between align-items-center")([BI("mr-4")(et(n.title)(Aa)),SSe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+et(n.dismissButtonClass)("text-body"))(zr("Close"))({type:"button",onClick:So(function(r){return n.onDismiss})})("")]),t=function(r){return CSe(r.key==="Escape")(FSe(n.onDismiss))};return aq(NR(xR.keyup)(t))(function(r){var u=et(n.bodyScrollable)(!1);return ML(u?(function(){var i=GL(b$(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}})():b$({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])}))})}},Eh=function(e){var n=QD(e);return function(a){return function(t){return function(r){return ML({id:t.id,bodyClass:a,body:Oe(n(r))})}}}};var MSe=uu(),ASe=wn(Tn),LSe=Y_(Ce)()(),NSe=da(tn)()(),PSe=fu()();var HI="login",AL=function(){return function(e){var n=MSe(e),a=(function(){var u=et(n.auth0ActiveTab)(HI);return u})(),t=We({path:"",token:"",impersonationToken:""})(sI("login_path")),r=function(u){return function(i){return Wn(ASe)(function(l){return MI((function(s){return{key:u,value:s}})(l))})(Al(i))}};return LSe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(MI({key:"screen_hint",value:a})(t.path))),target:(function(){var u=et(n.openInNewTab)(!1);return u?"_blank":""})()})([NSe(et(n.className)("btn btn-primary px-4"))(cn)({type:"submit",disabled:et(n.disabled)(!1)})(et(n.content)(un(et(n.text)("Log in")))),PSe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var _m=function(e){return function(n){return function(){return n[e]}}},BSe=_m("URL"),HSe=_m("documentURI"),JSe=_m("origin"),qSe=_m("compatMode"),WSe=_m("characterSet"),$Se=_m("contentType");var xSe=_m("documentElement");var JI=function(e){return function(n){return n[e]}},QSe=JI("namespaceURI"),KSe=JI("prefix"),YSe=JI("localName"),XSe=JI("tagName");function NL(e){return function(){return e.id}}function PL(e){return function(){return e.classList}}function OL(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 UL=Ke;var I$=Vn("Element");var Ws=function(e){return function(n){return function(){return n[e]}}};var tCe=Ws("baseURI"),rCe=Ws("ownerDocument"),T$=Ws("parentNode"),oCe=Ws("parentElement");var uCe=Ws("childNodes"),iCe=Ws("firstChild"),lCe=Ws("lastChild"),cCe=Ws("previousSibling"),sCe=Ws("nextSibling"),vCe=Ws("nodeValue");var fCe=Ws("textContent");function BL(e){return function(n){return function(){return e.isEqualNode(n)}}}var hCe=B(ia);var S$=(function(){var e=hCe(ge);return function(n){return e(T$(n))}})();var mm=(function(){function e(){}return e.value=new e,e})(),F$=(function(){function e(){}return e.value=new e,e})(),G$=(function(){function e(){}return e.value=new e,e})(),jR=(function(){function e(){}return e.value=new e,e})(),M$=(function(){function e(){}return e.value=new e,e})(),A$=(function(){function e(){}return e.value=new e,e})(),L$=(function(){function e(){}return e.value=new e,e})();var qI=function(e){if(e instanceof mm)return G.value;if(e instanceof F$)return new T("for-you");if(e instanceof G$)return new T("chancing");if(e instanceof jR)return new T("finances");if(e instanceof M$)return new T("majors");if(e instanceof A$)return new T("admission-requirements");if(e instanceof L$)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 JL=de(ue);var qL=md(fr),VCe=nt(),QCe=$l(ue),WL=function(e){return"/schools/"+e.slug},$L="/schools/hub";var N$=function(e){return function(n){var a=JL(_W(n.whatificator))(function(l){return"simulator="+l}),t=JL(n.mobileOverlay)(function(l){return"overlay="+GW(l)}),r=_o("&")(ei([t,a])),u=JL(n.focusedSchool)(function(l){return qL("/")(ei([new T(VCe(l.slug)),qI(l.tab)]))}),i=(function(){return e.knownSeoState instanceof T&&n.seoView?qL("/")(ei([new T(WL({slug:e.knownSeoState.value0.slug})),u])):qL("/")(ei([new T($L),new T(Wn(e.basePath)(SI)(n.ranking)),QCe(u)("d"),u]))})();return i+((function(){var l=r==="";return l?"":"?"})()+r)}};var O$="/profile";var ZCe=nt();var xL=function(e){return function(n){return _o("/")(ei([new T("/schools"),new T(ZCe(n)),qI(e)]))}},U$=O$,k$="/livestreams/upcoming";var eFe=function(e){return N$({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:CI.value})};var WI=function(e){return function(n){return eFe(new T({tab:e,slug:n}))}};var B$=(function(){function e(){}return e.value=new e,e})(),H$=(function(){function e(){}return e.value=new e,e})(),$I=(function(){function e(){}return e.value=new e,e})(),xI=(function(){function e(){}return e.value=new e,e})(),J$=(function(){function e(){}return e.value=new e,e})(),q$=(function(){function e(){}return e.value=new e,e})(),W$=(function(){function e(){}return e.value=new e,e})(),$$=function(e){if(e instanceof B$)return"avatar-xxs";if(e instanceof H$)return"avatar-xs";if(e instanceof $I)return"avatar-sm";if(e instanceof xI)return"";if(e instanceof J$)return"avatar-lg";if(e instanceof q$)return"avatar-xl";if(e instanceof W$)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 j$={show:nt()};var lFe=Number.MAX_SAFE_INTEGER;var QL=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if(xe)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 eGe=Ee(UE);var ex={show:function(e){return e}};var nx=function(e){return eGe(e.publishScope)(_c.value)};var Ih=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),KL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZL=(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})();var a3=oe(j$);var nGe=oe(B9),tx=oe(d9),aGe=oe(ex);var tGe="/messages";var rGe=function(e){return function(n){return e+("/"+(function(){if(n instanceof Ih)return"admission-officer/"+nGe(n.value0);if(n instanceof KL)return"school/"+tx(n.value0);if(n instanceof YL)return"student/"+aGe(n.value0);if(n instanceof XL)return"high-school/"+a3(n.value0);if(n instanceof ZL)return"service-provider/"+a3(n.value0);if(n instanceof e3)return"parent/"+a3(n.value0);if(n instanceof n3)return"recruiter/"+tx(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])})())}},t3=rGe(tGe);var uGe=Hs(Lv(Mv)),iGe=ae(La),rx=de(ue),ox=nt(),lGe=xt(lt);var ux=uGe("network_connections_invite_school_path")(function(e){return function(n){return iGe(e({school_id:n.schoolId,message:rt(n.introMessage),sem_user_id:rt(rx(n.semUserId)(ox)),livestream_id:rt(rx(n.livestreamId)(ox))}))(to)}}),ix=function(e){return function(n){return lGe(ux({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var lx=function(e){return function(n){return function(a){return ux({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};Ct();function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;mx+=1;var a=mx;function t(r){if(r===0)gx(a),e();else{var u=dx(function(){t(r-1)});o3.set(a,u)}}return t(n),a}dc.cancel=function(e){var n=o3.get(e);return gx(n),hx(n)};function gm(e,n){return e?e.contains(n):!1}function VR(e){return e instanceof HTMLElement?e:rc.findDOMNode(e)}var bx=fl(wx());Ct();function c3(e,n){typeof e=="function"?e(n):Co(e)==="object"&&e&&"current"in e&&(e.current=n)}function uT(){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 jx=fl(Dm());Ct();Ct();var $x=fl(Dm());function Ax(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 dGe(e,n){var a={animationend:Ax("Animation","AnimationEnd"),transitionend:Ax("Transition","TransitionEnd")};return e&&("AnimationEvent"in n||delete a.animationend.animation,"TransitionEvent"in n||delete a.transitionend.transition),a}var hGe=dGe(Ov(),typeof window<"u"?window:{}),Nx={};Ov()&&(Lx=document.createElement("div"),Nx=Lx.style);var Lx,cT={};function Px(e){if(cT[e])return cT[e];var n=hGe[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=dc(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Gr(function(){return function(){n()}},[]),[a,n]});Ct();var gGe=Ov()?BD:Gr,fT=gGe;var Bx=[os,jf,S0,vT],m3=!1,Hx=!0;function _T(e){return e===S0||e===vT}var Jx=(function(e,n){var a=zf(p3),t=kr(a,2),r=t[0],u=t[1],i=kx(),l=kr(i,2),s=l[0],h=l[1];function p(){u(os,!0)}return fT(function(){if(r!==p3&&r!==vT){var R=Bx.indexOf(r),E=Bx[R+1],w=n(r);w===m3?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}w===!0?L():Promise.resolve(w).then(L)})}},[e,r]),Gr(function(){return function(){h()}},[]),[p,r]});Ct();Ct();var qx=(function(e){var n=zt(),a=zt(e);a.current=e;var t=kD(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(f3,t),i.removeEventListener(v3,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(f3,t),i.addEventListener(v3,t),n.current=i)}return Gr(function(){return function(){r(n.current)}},[]),[u,r]});function d3(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,h=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,Q=t.onLeaveStart,V=t.onAppearActive,te=t.onEnterActive,le=t.onLeaveActive,ne=t.onAppearEnd,Z=t.onEnterEnd,ee=t.onLeaveEnd,me=t.onVisibleChanged,qe=zf(),ze=kr(qe,2),mn=ze[0],Jn=ze[1],Fn=zf(T0),Gn=kr(Fn,2),Bn=Gn[0],ba=Gn[1],ha=zf(null),pa=kr(ha,2),Dt=pa[0],vt=pa[1],Ha=zt(!1),wr=zt(null);function Ye(){return a()}var $a=zt(!1);function Mt($t){var $=Ye();if(!($t&&!$t.deadline&&$t.target!==$)){var X=$a.current,k;Bn===QR&&X?k=ne==null?void 0:ne($,$t):Bn===KR&&X?k=Z==null?void 0:Z($,$t):Bn===YR&&X&&(k=ee==null?void 0:ee($,$t)),Bn!==T0&&X&&k!==!1&&(ba(T0,!0),vt(null,!0))}}var xn=qx(Mt),Nn=kr(xn,1),Xe=Nn[0],Fa=HD(function(){var $t,$,X;switch(Bn){case QR:return $t={},il($t,os,E),il($t,jf,L),il($t,S0,V),$t;case KR:return $={},il($,os,w),il($,jf,U),il($,S0,te),$;case YR:return X={},il(X,os,I),il(X,jf,Q),il(X,S0,le),X;default:return{}}},[Bn]),Ja=Jx(Bn,function($t){if($t===os){var $=Fa[os];return $?$(Ye()):m3}if(yn in Fa){var X;vt(((X=Fa[yn])===null||X===void 0?void 0:X.call(Fa,Ye(),null))||null)}return yn===S0&&(Xe(Ye()),p>0&&(clearTimeout(wr.current),wr.current=setTimeout(function(){Mt({deadline:!0})},p))),Hx}),ft=kr(Ja,2),er=ft[0],yn=ft[1],Na=_T(yn);$a.current=Na,fT(function(){Jn(n);var $t=Ha.current;if(Ha.current=!0,!!e){var $;!$t&&n&&l&&($=QR),$t&&n&&u&&($=KR),($t&&!n&&h||!$t&&R&&!n&&h)&&($=YR),$&&(ba($),er())}},[n]),Gr(function(){(Bn===QR&&!l||Bn===KR&&!u||Bn===YR&&!h)&&ba(T0)},[l,u,h]),Gr(function(){return function(){Ha.current=!1,clearTimeout(wr.current)}},[]);var mr=zt(!1);Gr(function(){mn&&(mr.current=!0),mn!==void 0&&Bn===T0&&((mr.current||mn)&&(me==null||me(mn)),mr.current=!0)},[mn,Bn]);var Va=Dt;return Fa[os]&&yn===jf&&(Va=tt({transition:"none"},Va)),[Bn,yn,Va,mn!=null?mn:n]}Ct();var DGe=(function(e){Ch(a,e);var n=Fh(a);function a(){return Th(this,a),n.apply(this,arguments)}return Sh(a,[{key:"render",value:function(){return this.props.children}}]),a})(Pp),Wx=DGe;function RGe(e){var n=e;Co(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=tc(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,h=s===void 0?!0:s,p=r.forceRender,R=r.children,E=r.motionName,w=r.leavedClassName,I=r.eventProps,L=a(r),U=zt(),Q=zt();function V(){try{return U.current instanceof HTMLElement?U.current:VR(Q.current)}catch{return null}}var te=d3(L,l,V,r),le=kr(te,4),ne=le[0],Z=le[1],ee=le[2],me=le[3],qe=zt(me);me&&(qe.current=!0);var ze=kD(function(ha){U.current=ha,c3(u,ha)},[u]),mn,Jn=tt(tt({},I),{},{visible:l});if(!R)mn=null;else if(ne===T0||!a(r))me?mn=R(tt({},Jn),ze):!h&&qe.current?mn=R(tt(tt({},Jn),{},{className:w}),ze):p?mn=R(tt(tt({},Jn),{},{style:{display:"none"}}),ze):mn=null;else{var Fn,Gn;Z===os?Gn="prepare":_T(Z)?Gn="active":Z===jf&&(Gn="start"),mn=R(tt(tt({},Jn),{},{className:(0,$x.default)(_3(E,ne),(Fn={},il(Fn,_3(E,"".concat(ne,"-").concat(Gn)),Gn),il(Fn,E,typeof E=="string"),Fn)),style:ee}),ze)}if(tM(mn)&&iT(mn)){var Bn=mn,ba=Bn.ref;ba||(mn=UD(mn,{ref:ze}))}return Zt(Wx,{ref:Q},mn)});return t.displayName="CSSMotion",t}var pT=RGe(sT);Ct();var mT="add",dT="keep",hT="remove",DT="removed";function yGe(e){var n;return e&&Co(e)==="object"&&"key"in e?n=e:n={key:e},tt(tt({},n),{},{key:String(n.key)})}function gT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(yGe)}function xx(){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=gT(e),i=gT(n);u.forEach(function(h){for(var p=!1,R=t;R1});return s.forEach(function(h){a=a.filter(function(p){var R=p.key,E=p.status;return R!==h||E!==hT}),a.forEach(function(p){p.key===h&&(p.status=dT)})}),a}var wGe=["component","children","onVisibleChanged","onAllRemoved"],bGe=["status"],EGe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function IGe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pT,a=(function(t){Ch(u,t);var r=Fh(u);function u(){var i;Th(this,u);for(var l=arguments.length,s=new Array(l),h=0;h=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function QGe(e,n,a,t){var r=bt.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)),bt.mix(r,u)}function C3(e){var n,a,t;if(!bt.isWindow(e)&&e.nodeType!==9)n=bt.offset(e),a=bt.outerWidth(e),t=bt.outerHeight(e);else{var r=bt.getWindow(e);n={left:bt.getWindowScrollLeft(r),top:bt.getWindowScrollTop(r)},a=bt.viewportWidth(r),t=bt.viewportHeight(r)}return n.width=a,n.height=t,n}function tj(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 wT(e,n,a,t,r){var u=tj(n,a[1]),i=tj(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 rj(e,n,a){return e.lefta.right}function oj(e,n,a){return e.topa.bottom}function KGe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function CT(e,n,a){var t=a.target||n,r=C3(t),u=!XGe(t,a.overflow&&a.overflow.alwaysByViewport);return mj(e,r,a,u)}CT.__getOffsetParent=E3;CT.__getVisibleRectForElement=S3;function dj(e,n,a){var t,r,u=bt.getDocument(e),i=u.defaultView||u.parentWindow,l=bt.getWindowScrollLeft(i),s=bt.getWindowScrollTop(i),h=bt.viewportWidth(i),p=bt.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+h&&r>=0&&r<=s+p,w=[a.points[0],"cc"];return mj(e,R,Qx(Qx({},a),{},{points:w}),E)}var tK=fl($Q());var jQ=(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(){!V3||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),INe?(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(){!V3||!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=ENe.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})(),zQ=(function(e,n){for(var a=0,t=Object.keys(n);a"u"||!(Element instanceof Object))){if(!(n instanceof Bh(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new NNe(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 Bh(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 PNe(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})(),QQ=typeof WeakMap<"u"?new WeakMap:new jQ,KQ=(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=TNe.getInstance(),t=new ONe(n,a,this);QQ.set(this,t)}return e})();["observe","unobserve","disconnect"].forEach(function(e){KQ.prototype[e]=function(){var n;return(n=QQ.get(this))[e].apply(n,arguments)}});var UNe=(function(){return typeof NT.ResizeObserver<"u"?NT.ResizeObserver:KQ})(),YQ=UNe;function XQ(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 ZQ(e,n){e!==document.activeElement&&gm(n,e)&&typeof e.focus=="function"&&e.focus()}function Q3(e,n){var a=null,t=null;function r(i){var l=kr(i,1),s=l[0].target;if(document.documentElement.contains(s)){var h=s.getBoundingClientRect(),p=h.width,R=h.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 YQ(r);return e&&u.observe(e),function(){u.disconnect()}}Ct();var eK=(function(e,n){var a=ct.useRef(!1),t=ct.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 nK(e){return typeof e!="function"?null:e()}function aK(e){return Co(e)!=="object"||!e?null:e}var kNe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,h=n.monitorBufferTime,p=h===void 0?0:h,R=ct.useRef({}),E=ct.useRef(),w=ct.Children.only(t),I=ct.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=eK(function(){var Z=I.current,ee=Z.disabled,me=Z.target,qe=Z.align,ze=Z.onAlign;if(!ee&&me){var mn=E.current,Jn,Fn=nK(me),Gn=aK(me);R.current.element=Fn,R.current.point=Gn,R.current.align=qe;var Bn=document,ba=Bn.activeElement;return Fn&&zx(Fn)?Jn=CT(mn,Fn,qe):Gn&&(Jn=dj(mn,Gn,qe)),ZQ(ba,mn),ze&&Jn&&ze(mn,Jn),!0}return!1},p),U=kr(L,2),Q=U[0],V=U[1],te=ct.useRef({cancel:function(){}}),le=ct.useRef({cancel:function(){}});ct.useEffect(function(){var Z=nK(u),ee=aK(u);E.current!==le.current.element&&(le.current.cancel(),le.current.element=E.current,le.current.cancel=Q3(E.current,Q)),(R.current.element!==Z||!XQ(R.current.point,ee)||!(0,tK.default)(R.current.align,i))&&(Q(),te.current.element!==Z&&(te.current.cancel(),te.current.element=Z,te.current.cancel=Q3(Z,Q)))}),ct.useEffect(function(){r?V():Q()},[r]);var ne=ct.useRef(null);return ct.useEffect(function(){s?ne.current||(ne.current=I0(window,"resize",Q)):ne.current&&(ne.current.remove(),ne.current=null)},[s]),ct.useEffect(function(){return function(){te.current.cancel(),le.current.cancel(),ne.current&&ne.current.remove(),V()}},[]),ct.useImperativeHandle(a,function(){return{forceAlign:function(){return Q(!0)}}}),ct.isValidElement(w)&&(w=ct.cloneElement(w,{ref:uT(w.ref,E)})),w},rK=ct.forwardRef(kNe);rK.displayName="Align";var oK=rK;var uK=oK;Ct();var BNe=Ov()?BD:Gr,K3=BNe;var pK=fl(Dm());function UT(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,h){function p(R,E){qu(i,R,function(w){return this._invoke(R,E,w)})}l?r?r(i,l,{value:s,enumerable:!h,configurable:!h,writable:!h}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},qu(e,n,a,t)}function fy(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(w,I,L,U){var Q=I&&I.prototype instanceof l?I:l,V=Object.create(Q.prototype);return qu(V,"_invoke",(function(te,le,ne){var Z,ee,me,qe=0,ze=ne||[],mn=!1,Jn={p:0,n:0,v:e,a:Fn,f:Fn.bind(e,4),d:function(Bn,ba){return Z=Bn,ee=0,me=e,Jn.n=ba,i}};function Fn(Gn,Bn){for(ee=Gn,me=Bn,n=0;!mn&&qe&&!ba&&n3?(ba=Dt===Bn)&&(me=ha[(ee=ha[4])?5:(ee=3,3)],ha[4]=ha[5]=e):ha[0]<=pa&&((ba=Gn<2&&paBn||Bn>Dt)&&(ha[4]=Gn,ha[5]=Bn,Jn.n=Dt,ee=0))}if(ba||Gn>1)return i;throw mn=!0,Bn}return function(Gn,Bn,ba){if(qe>1)throw TypeError("Generator is already running");for(mn&&Bn===1&&Fn(Bn,ba),ee=Bn,me=ba;(n=ee<2?e:me)||!mn;){Z||(ee?ee<3?(ee>1&&(Jn.n=-1),Fn(ee,me)):Jn.n=me:Jn.v=me);try{if(qe=2,Z){if(ee||(Gn="next"),n=Z[Gn]){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 '"+Gn+"' method"),ee=1);Z=e}else if((n=(mn=Jn.n<0)?me:te.call(le,Jn))!==i)break}catch(ha){Z=e,ee=1,me=ha}finally{qe=1}}return{value:n,done:mn}}})(w,L,U),!0),V}var i={};function l(){}function s(){}function h(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(qu(n={},t,function(){return this}),n),R=h.prototype=l.prototype=Object.create(p);function E(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,h):(w.__proto__=h,qu(w,r,"GeneratorFunction")),w.prototype=Object.create(R),w}return s.prototype=h,qu(R,"constructor",h),qu(h,"constructor",s),s.displayName="GeneratorFunction",qu(h,r,"GeneratorFunction"),qu(R),qu(R,r,"Generator"),qu(R,t,function(){return this}),qu(R,"toString",function(){return"[object Generator]"}),(fy=function(){return{w:u,m:E}})()}function Hh(e,n){function a(r,u,i,l){try{var s=e[r](u),h=s.value;return h instanceof UT?n.resolve(h.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(h).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(Hh.prototype),qu(Hh.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),qu(this,"_invoke",function(r,u,i){function l(){return new n(function(s,h){a(r,i,s,h)})}return t=t?t.then(l,l):l()},!0)}function kT(e,n,a,t,r){return new Hh(fy().w(e,n,a,t),r||Promise)}function iK(e,n,a,t,r){var u=kT(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function lK(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 Y3(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(Co(e)+" is not iterable")}function _y(){"use strict";var e=fy(),n=e.m(_y),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(h){l||(l={stop:function(){return s(h.a,2)},catch:function(){return h.v},abrupt:function(R,E){return s(h.a,r[R],E)},delegateYield:function(R,E,w){return l.resultName=E,s(h.d,Y3(R),w)},finish:function(R){return s(h.f,R)}},s=function(R,E,w){h.p=l.prev,h.n=l.next;try{return R(E,w)}finally{l.next=h.n}}),l.resultName&&(l[l.resultName]=h.v,l.resultName=void 0),l.sent=h.v,l.next=h.n;try{return i.call(this,l)}finally{h.p=l.prev,h.n=l.next}}}return(_y=function(){return{wrap:function(s,h,p,R){return e.w(u(s),h,p,R&&R.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,h){return new UT(s,h)},AsyncIterator:Hh,async:function(s,h,p,R,E){return(t(h)?kT:iK)(u(s),h,p,R,E)},keys:lK,values:Y3}})()}function cK(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(h){return void a(h)}l.done?n(s):Promise.resolve(s).then(t,r)}function sK(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){cK(u,t,r,i,l,"next",s)}function l(s){cK(u,t,r,i,l,"throw",s)}i(void 0)})}}Ct();var vK=["measure","alignPre","align",null,"motion"],fK=(function(e,n){var a=zf(null),t=kr(a,2),r=t[0],u=t[1],i=zt();function l(p){u(p,!0)}function s(){dc.cancel(i.current)}function h(p){s(),i.current=dc(function(){l(function(R){switch(r){case"align":return"motion";case"motion":return"stable";default:}return R}),p==null||p()})}return Gr(function(){l("measure")},[e]),Gr(function(){r==="measure"&&n(),r&&(i.current=dc(sK(_y().mark(function p(){var R,E;return _y().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:R=vK.indexOf(r),E=vK[R+1],E&&R!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Gr(function(){return function(){s()}},[]),[r,h]});Ct();var _K=(function(e){var n=Ss({width:0,height:0}),a=kr(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=HD(function(){var l={};if(e){var s=t.width,h=t.height;e.indexOf("height")!==-1&&h?l.height=h:e.indexOf("minHeight")!==-1&&h&&(l.minHeight=h),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]});var mK=tc(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,h=e.destroyPopupOnHide,p=e.forceRender,R=e.align,E=e.point,w=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,U=e.onMouseEnter,Q=e.onMouseLeave,V=e.onMouseDown,te=e.onTouchStart,le=e.onClick,ne=zt(),Z=zt(),ee=Ss(),me=kr(ee,2),qe=me[0],ze=me[1],mn=_K(s),Jn=kr(mn,2),Fn=Jn[0],Gn=Jn[1];function Bn(){s&&Gn(w())}var ba=fK(a,Bn),ha=kr(ba,2),pa=ha[0],Dt=ha[1],vt=Ss(0),Ha=kr(vt,2),wr=Ha[0],Ye=Ha[1],$a=zt();K3(function(){pa==="alignPre"&&Ye(0)},[pa]);function Mt(){return E||w}function xn(){var yn;(yn=ne.current)===null||yn===void 0||yn.forceAlign()}function Nn(yn,Na){var mr=I(Na);qe!==mr&&ze(mr),Ye(function(Va){return Va+1}),pa==="align"&&(L==null||L(yn,Na))}K3(function(){pa==="align"&&(wr<2?xn():Dt(function(){var yn;(yn=$a.current)===null||yn===void 0||yn.call($a)}))},[wr]);var Xe=tt({},RT(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(yn){var Na=Xe[yn];Xe[yn]=function(mr,Va){return Dt(),Na==null?void 0:Na(mr,Va)}});function Fa(){return new Promise(function(yn){$a.current=yn})}Gr(function(){!Xe.motionName&&pa==="motion"&&Dt()},[Xe.motionName,pa]),If(n,function(){return{forceAlign:xn,getElement:function(){return Z.current}}});var Ja=tt(tt({},Fn),{},{zIndex:l,opacity:pa==="motion"||pa==="stable"||!a?void 0:0,pointerEvents:!a&&pa!=="stable"?"none":void 0},u),ft=!0;R!=null&&R.points&&(pa==="align"||pa==="stable")&&(ft=!1);var er=i;return Np.count(i)>1&&(er=Zt("div",{className:"".concat(t,"-content")},i)),Zt(Gh,_i({visible:a,ref:Z,leavedClassName:"".concat(t,"-hidden")},Xe,{onAppearPrepare:Fa,onEnterPrepare:Fa,removeOnLeave:h,forceRender:p}),function(yn,Na){var mr=yn.className,Va=yn.style,$t=(0,pK.default)(t,r,qe,mr);return Zt(uK,{target:Mt(),key:"popup",ref:ne,monitorWindowResize:!0,disabled:ft,align:R,onAlign:Nn},Zt("div",{ref:Na,className:$t,onMouseEnter:U,onMouseLeave:Q,onMouseDownCapture:V,onTouchStartCapture:te,onClick:le,style:tt(tt({},Va),Ja)},er))})});mK.displayName="PopupInner";var dK=mK;Ct();var hK=fl(Dm()),gK=tc(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,h=i.popupMotion,p=h===void 0?{}:h,R=i.popupRender,E=e.onClick,w=zt();If(n,function(){return{forceAlign:function(){},getElement:function(){return w.current}}});var I=tt({zIndex:r},s),L=u;return Np.count(u)>1&&(L=Zt("div",{className:"".concat(a,"-content")},u)),R&&(L=R(L)),Zt(Gh,_i({visible:t,ref:w,removeOnLeave:!0},p),function(U,Q){var V=U.className,te=U.style,le=(0,hK.default)(a,l,V);return Zt("div",{ref:Q,className:le,onClick:E,style:tt(tt({},te),I)},L)})});gK.displayName="MobilePopupInner";var DK=gK;var HNe=["visible","mobile"],RK=tc(function(e,n){var a=e.visible,t=e.mobile,r=hm(e,HNe),u=Ss(a),i=kr(u,2),l=i[0],s=i[1],h=Ss(!1),p=kr(h,2),R=p[0],E=p[1],w=tt(tt({},r),{},{visible:l});Gr(function(){s(a),a&&t&&E(Mx())},[a,t]);var I=R?Zt(DK,_i({},w,{mobile:t,ref:n})):Zt(dK,_i({},w,{ref:n}));return Zt("div",null,Zt(h3,w),I)});RK.displayName="Popup";var yK=RK;Ct();var JNe=nM(null),X3=JNe;function Z3(){}function qNe(){return""}function WNe(e){return e?e.ownerDocument:window.document}var $Ne=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function xNe(e){var n=(function(a){Ch(r,a);var t=Fh(r);function r(u){var i;Th(this,r),i=t.call(this,u),i.popupRef=I1(),i.triggerRef=I1(),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 h=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,h,h?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 h;s.relatedTarget&&!s.relatedTarget.setTimeout&&gm((h=i.popupRef.current)===null||h===void 0?void 0:h.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 h;if(i.preClickTime&&i.preTouchTime?h=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?h=i.preClickTime:i.preTouchTime&&(h=i.preTouchTime),Math.abs(h-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 h=s.target,p=i.getRootDomNode(),R=i.getPopupDomNode();(!gm(p,h)||i.isContextMenuOnly())&&!gm(R,h)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var h=VR(i.triggerRef.current);if(h)return h}catch{}return rc.findDOMNode(VI(i))},i.getPopupClassNameFromAlign=function(s){var h=[],p=i.props,R=p.popupPlacement,E=p.builtinPlacements,w=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return R&&E&&h.push(Tx(E,w,s,I)),L&&h.push(L(s)),h.join(" ")},i.getComponent=function(){var s=i.props,h=s.prefixCls,p=s.destroyPopupOnHide,R=s.popupClassName,E=s.onPopupAlign,w=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,U=s.popupStyle,Q=s.mask,V=s.maskAnimation,te=s.maskTransitionName,le=s.maskMotion,ne=s.zIndex,Z=s.popup,ee=s.stretch,me=s.alignPoint,qe=s.mobile,ze=s.forceRender,mn=s.onPopupClick,Jn=i.state,Fn=Jn.popupVisible,Gn=Jn.point,Bn=i.getPopupAlign(),ba={};return i.isMouseEnterToShow()&&(ba.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(ba.onMouseLeave=i.onPopupMouseLeave),ba.onMouseDown=i.onPopupMouseDown,ba.onTouchStart=i.onPopupMouseDown,Zt(yK,_i({prefixCls:h,destroyPopupOnHide:p,visible:Fn,point:me&&Gn,className:R,align:Bn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},ba,{stretch:ee,getRootDomNode:i.getRootDomNode,style:U,mask:Q,zIndex:ne,transitionName:L,maskAnimation:V,maskTransitionName:te,maskMotion:le,ref:i.popupRef,motion:w,mobile:qe,forceRender:ze,onClick:mn}),typeof Z=="function"?Z():Z)},i.attachParent=function(s){dc.cancel(i.attachId);var h=i.props,p=h.getPopupContainer,R=h.getDocument,E=i.getRootDomNode(),w;p?(E||p.length===0)&&(w=p(E)):w=R(i.getRootDomNode()).body,w?w.appendChild(s):i.attachId=dc(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,h=s(i.getRootDomNode()).createElement("div");h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.width="100%",i.portalContainer=h}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var h=i.props.alignPoint;!h||!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},$Ne.forEach(function(s){i["fire".concat(s)]=function(h){i.fireEvents(s,h)}}),i}return Sh(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=I0(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=I0(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=I0(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=I0(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),dc.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,h=i.builtinPlacements;return l&&h?Ix(h,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,h=this.state.popupVisible;this.clearDelayTimer(),h!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:h}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var h=this,p=l*1e3;if(this.clearDelayTimer(),p){var R=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){h.setPopupVisible(i,R),h.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 h=this.props[i];h&&h(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,h=l.forceRender,p=l.alignPoint,R=l.className,E=l.autoDestroy,w=Np.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,wK.default)(w&&w.props&&w.props.className,R);L&&(I.className=L);var U=tt({},I);iT(w)&&(U.ref=uT(this.triggerRef,w.ref));var Q=UD(w,U),V;return(i||this.popupRef.current||h)&&(V=Zt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&(V=null),Zt(X3.Provider,{value:this.triggerContextValue},Q,V)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,h={};return s!==void 0&&l.popupVisible!==s&&(h.popupVisible=s,h.prevPopupVisible=l.popupVisible),h}}]),r})(Pp);return n.contextType=X3,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:qNe,getDocument:WNe,onPopupVisibleChange:Z3,afterPopupVisibleChange:Z3,onPopupAlign:Z3,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 bK=xNe(Ex);var us={adjustX:1,adjustY:1},is=[0,0],EK={left:{points:["cr","cl"],overflow:us,offset:[-4,0],targetOffset:is},right:{points:["cl","cr"],overflow:us,offset:[4,0],targetOffset:is},top:{points:["bc","tc"],overflow:us,offset:[0,-4],targetOffset:is},bottom:{points:["tc","bc"],overflow:us,offset:[0,4],targetOffset:is},topLeft:{points:["bl","tl"],overflow:us,offset:[0,-4],targetOffset:is},leftTop:{points:["tr","tl"],overflow:us,offset:[-4,0],targetOffset:is},topRight:{points:["br","tr"],overflow:us,offset:[0,-4],targetOffset:is},rightTop:{points:["tl","tr"],overflow:us,offset:[4,0],targetOffset:is},bottomRight:{points:["tr","br"],overflow:us,offset:[0,4],targetOffset:is},rightBottom:{points:["bl","br"],overflow:us,offset:[4,0],targetOffset:is},bottomLeft:{points:["tl","bl"],overflow:us,offset:[0,4],targetOffset:is},leftBottom:{points:["br","bl"],overflow:us,offset:[-4,0],targetOffset:is}};Ct();var IK=fl(Dm());function BT(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 Zt("div",{className:(0,IK.default)("".concat(r,"-content"),l),style:s},n!==!1&&Zt("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),Zt("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var jNe=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,h=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,Q=n.animation,V=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,qe=n.defaultVisible,ze=n.getTooltipContainer,mn=n.overlayInnerStyle,Jn=n.arrowContent,Fn=n.overlay,Gn=n.id,Bn=n.showArrow,ba=hm(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),ha=zt(null);If(a,function(){return ha.current});var pa=tt({},ba);"visible"in n&&(pa.popupVisible=n.visible);var Dt=function(){return Zt(BT,{showArrow:Bn,arrowContent:Jn,key:"content",prefixCls:E,id:Gn,overlayInnerStyle:mn},Fn)},vt=!1,Ha=!1;if(typeof me=="boolean")vt=me;else if(me&&Co(me)==="object"){var wr=me.keepParent;vt=wr===!0,Ha=wr===!1}return Zt(bK,_i({popupClassName:t,prefixCls:E,popup:Dt,action:u,builtinPlacements:EK,popupPlacement:le,ref:ha,popupAlign:Z,getPopupContainer:ze,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:U,popupAnimation:Q,popupMotion:V,defaultPopupVisible:qe,destroyPopupOnHide:vt,autoDestroy:Ha,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:l},pa),w)},TK=tc(jNe);var SK=TK;var FK=e=>ct.createElement(SK,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(()=>fl(CK(),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 ZNe=oc();var GK="click";var HT="top",Jh=function(e){var n=ZNe(e);return function(){return function(){return n(FK)}}};var MK="right";var AK=e=>()=>e.preventDefault&&e.preventDefault();var nN=function(){return AK};var aPe=dt();var aN=ae(nn),tN=or(aPe(W({reflectSymbol:function(){return"value"}})(be)(pn))),rN=x(Ua);var JT=function(e){return We("")(aN(tN(No(e.target)))(function(n){return rN(n.value)}))},oN=function(e){return We("")(aN(tN(No(e.target)))(function(n){return rN(n.value)}))},Vf=function(e){return We("")(aN(tN(No(e.target)))(function(n){return rN(n.value)}))};var LK="/network/connections";var NK=15;var iPe=Jh(tn)()(),lPe=Ft(Ce),cPe=(function(){return"You\u2019ve hit the "+(oe(fn)(NK)+`-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. `)})(),sPe=Ou(tn)("text-decoration-underline")(ro(ie)()()("text-dark")(cn)({href:LK})("Manage my connections")),PK=function(e){return function(n){return iPe({placement:e,trigger:GK,overlay:lPe("")([un(cPe),sPe]),overlayStyle:Vt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var OK=ae(nn),qh=function(e){var n=OK(e.guestPresenter)(function(a){if(a instanceof RR)return new T(a.value0);if(a instanceof yR)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return OK(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var fPe=(function(){function e(){}return e.value=new e,e})(),_Pe=(function(){function e(){}return e.value=new e,e})(),iN=(function(){function e(){}return e.value=new e,e})(),pPe=(function(){function e(){}return e.value=new e,e})(),mPe=(function(){function e(){}return e.value=new e,e})(),dPe=(function(){function e(){}return e.value=new e,e})(),UK=function(e){if(e instanceof fPe)return"account_settings_page";if(e instanceof _Pe)return"preference_survey";if(e instanceof iN)return"livestream_registration";if(e instanceof pPe)return"chancing_wizard_network_step";if(e instanceof mPe)return"main_profile_page";if(e instanceof dPe)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 TPe=Lv(Mv),lN=Hs(TPe),cN=ae(La);var SPe=uu(),BK=de(ue);var HK=lN("profile_visibility_path")(function(e){return function(n){return cN(e({visibility:{publish_scope:IR(n)}}))(to)}}),JK=function(){return lN("profile_network_settings_path")(function(e){return function(n){return(function(a){return cN(e({network_settings:{publish_scope:IR(a.publishScope),publish_context:UK(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:rt(BK(Al(a.livestreamConference))(function(t){return{school_name:rt(BK(qh(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(to)})(SPe(n))}})},qK=lN("profile_name_path")(function(e){return function(n){return cN(e({name:n}))(to)}});var CPe=qs(),FPe=_u(ie),GPe=xr(ie),sN=$r(ie),vN=jc(ie),C0=Ne(Ce),Wh=da(ie)()(),MPe=vn(rn),fN=Ia(ja),bm=Ne(tn),$K=Pl(),APe=K_(ie),LPe=bo(Ve)(fr),xK=fu()(),_N=Ia(Gl),NPe=Vd()(),jK=Ne(ie),PPe=q1(Ce),pN=z1(ie),OPe=Ft(ie),UPe=Jh(tn)()(),kPe=$r(Ce),BPe=ro(ie)()(),HPe=Ht(ie),Em=x(kn),zK=MPe(_a),JPe=kI(),my=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),VK=(function(){function e(){}return e.value=new e,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})(),XK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),dy=(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})(),ZK=function(e){return function(n){var a=function(h){return CPe({id:"invite-school-modal",body:h,title:FPe("my-0")((function(){return e.stage instanceof vE?"Join the CollegeVine network":"Connect with "+e.schoolName})()),headerClass:"pb-0",onDismiss:n(new Hn(dy.value)),size:JR.value})},t=H9(e.context),r=Oe([GPe("mt-3")("Review your message before you send it"),sN("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),vN("mt-4")("Your message"),sh(e.message),C0("d-flex mt-4 justify-content-start")([Wh("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(cn)({onClick:So(function(h){return function(){return n(new Hn(new mN({introMessage:e.message})))(),n(new ke(new my(tA.value)))()}})})("Send"),Wh("btn btn-lg btn-outline-primary ml-3 text-nowrap")(cn)({onClick:fN(n)(new ke(new my(iR.value)))})("No, I need to edit something")])]),u=Oe([C0("text-center")([bm("")($K("mt-4")({src:"/img/checkmate-icon.png",alt:Nl.value,height:"80",width:"80"})),APe("mt-4")("Connection request sent!"),sN("mx-md-4")(LPe(["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."])),Wh("btn btn-lg btn-outline-secondary mt-4")(cn)({onClick:fN(n)(new Hn(dy.value))})("Close")])]),i=Wh("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(cn)({onClick:fN(n)(new Hn(dy.value))})("Cancel"),l=(function(){var h=ZM(e.message)&&(function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!Qc(e.firstName)&&!Qc(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([Ka(Dr(e.profile.fullName))(Oe([vN("mt-md-4")("Your preferred name"),C0("form-row mx-1")([xK("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:_N(n)(function(R){return ke.create(YK.create(Vf(R)))}),placeholder:"First name"}),xK("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:_N(n)(function(R){return ke.create(XK.create(Vf(R)))}),placeholder:"Last name"})])])),vN("mt-md-4")("Your message"),NPe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:_N(n)(function(R){return ke.create(KK.create(JT(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! `}),bm("mt-2")(L9(e.message)),jK("mt-3 mt-md-4 small")("The ideal connection message should include:"),PPe("small")([pN("")("Your name, where you\u2019re from, and a bit about who you are"),pN("")("What you\u2019re interested in studying along with one or two insightful questions"),pN("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),C0("d-flex mt-4 justify-content-start")([PK(HT)(bm("")(Wh("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(cn)({onClick:So(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 QK({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 my(aA.value)))()}}),disabled:!h||p,style:Vt({pointerEvents:(function(){return p?"none":"auto"})()})})("Connect"))),i])])})(),s=C0("mx-md-7")([bm("border border-success rounded p-4 my-4")(C0("row align-items-center")([bm("col-12 col-md-auto text-center text-md-left")($K("img-fluid")({src:"/img/network/publish-profile-icon.png",alt:Nl.value,height:"67",width:"143"})),bm("col text-center text-md-left")(OPe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),C0("d-flex flex-nowrap align-items-center")([jK("mr-4")("Publish your profile to join the CollegeVine Network"),UPe({placement:MK,overlay:kPe("")([un(` 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 `),BPe("")(cn)({href:U$})("your profile"),un(".")]),overlayStyle:Vt({width:"15rem"})})(HPe("cursor-default text-secondary fe fe-info large")(""))]),sN("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."),C0("d-flex mt-4 justify-content-start justify-content-md-center")([Wh("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(cn)({onClick:So(function(h){return function(){return n(new ke(VK.value))(),n(new ke(new my(iR.value)))()}})})("Publish profile"),i])]);return bm("t--network-sem-user-modal")((function(){if(e.stage instanceof vE)return a(s);if(e.stage instanceof iR)return a(l);if(e.stage instanceof aA)return a(r);if(e.stage instanceof tA)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])})())}},eY=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof my)return Em({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 VK)return zK(Pt(HK(_c.value)))(function(){return Em({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:_c.value}})});if(n.value0 instanceof QK)return zK(Pt(qK(n.value0.value0)))(function(){return Em({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(QL(n.value0.value0))}})});if(n.value0 instanceof KK)return Em({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 YK)return Em({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 XK)return Em({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 Hn)return Em(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])}},qPe=function(e){var n=nx(e);return n?iR.value:vE.value},nY=function(e){return{firstName:"",lastName:"",message:"",profile:JPe(e.profile),stage:qPe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var qT=Ee(Qr(Ir)),$Pe=uu(),xPe=Ne(tn),jPe=Pl(),dN=Ft(ie),hN=jr(tn)()(),zPe=Ht(ie),VPe=Pv(),QPe=cm(rn)(),KPe=On(He),YPe=da(Ce)()(),XPe=nN(),ZPe=ot(io),$h=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),DN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aY=(function(){function e(){}return e.value=new e,e})(),e4e=(function(){function e(){}return e.value=new e,e})(),n4e={eq:function(e){return function(n){return e instanceof $h&&n instanceof $h?e.value0.url===n.value0.url:e instanceof hy&&n instanceof hy?qT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&qT(e.value0.textColorClass)(n.value0.textColorClass):e instanceof gN&&n instanceof gN?qT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof DN&&n instanceof DN?qT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},a4e=yh(n4e),tY=function(){return function(e){var n=$Pe(e),a=(function(){var r=et(n.shape)(aY.value);if(r instanceof aY)return"rounded-circle";if(r instanceof e4e)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 xPe("avatar "+($$(et(n.size)(xI.value))+(" "+et(n.className)(""))))((function(){if(r instanceof $h)return jPe("avatar-img img-fluid "+(a+(" "+et(n.borderClassName)(""))))({src:r.value0.url,alt:new OR(hW(et(n.ariaLabel)(cn)))});if(r instanceof hy)return dN("avatar-title font-weight-bold fw-bold "+(a+(" "+(We("")(r.value0.backgroundColorClass)+(" "+(We("")(r.value0.textColorClass)+(" "+et(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof gN)return hN("avatar-title "+(a+(" "+(We("")(r.value0.backgroundColorClass)+(" "+et(n.borderClassName)(""))))))({"aria-label":et(n.ariaLabel)(cn)})(zPe(r.value0.iconClass)(""));if(r instanceof DN)return hN("avatar-title "+(a+(" "+(We("")(r.value0.backgroundColorClass)+(" "+et(n.borderClassName)(""))))))({"aria-label":et(n.ariaLabel)(cn)})(dN("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 Rh(VPe(rs(n.source))(function(r){return QPe(a4e(n.source)(function(u){return KPe(r.value1(u))}))(function(){return Hf(Oe([t(r.value0),(function(){return r.value0 instanceof $h?za(Al(n.hideAvatar))(function(u){return hN("hq-only-menu-item")({style:Vt({marginTop:"-50px",marginLeft:"200px"})})(YPe("btn btn-sm btn-warning mb-4 t--hide-avatar")(cn)({onClick:So(function(i){return function(){return XPe(i)(),ZPe(r.value1)(u)()}})})([dN("badge badge-info bg-info text-dark mr-2")("HQ"),un("Hide")]))}):Aa})()]))})}))}};var r4e=tY();var rY=function(e){return function(n){return r4e({source:(function(){if(e.avatarUrl instanceof T)return new $h({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new hy({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 RN=B(ue),u4e=on($8(V0));var oY=function(e){var n=function(a){return We("")(RN(ji)(RD(0)(a)))};return yv((function(){var a=li(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":We("?")(u4e(RN(n)(dp(a)))(RN(n)(dd(a))))})())},uY=function(e){return aR(e.firstName+(" "+e.lastName))};var yN=_u(ie),l4e=ro(ie)()(),c4e=ro(Ce)()(),iY=Ht(ie),s4e=da(Ce)()(),v4e=uc($_(Wc)),f4e=de(ue),_4e=ae(nn),wN=Ne(ie),WT=Ne(Ce),lY=Ne(tn),p4e=Yd(ie),cY=Fs()(),m4e=jc(ie),d4e=$r(ie),xh=x(kn),_Y=vn(rn),h4e=_Y(_a),g4e=at(He),D4e=_Y(La),R4e=x(ya),y4e=Wt(Po(lt)),sY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gy=(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})(),fY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),pY=(function(){var e=function(a){return function(t){return function(r){var u=yN("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=yN("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,l4e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(cn)({href:t3(new Ih(t.semUser.id))})("View Message")],s=uY(t.semUser),h=oY(s),p=yN("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),R=[p,c4e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(cn)({href:t3(new Ih(t.semUser.id))})([iY("fe fe-message-square mr-2 large")(""),un("Send a message to "+t.semUser.firstName)])],E=function(L){return s4e("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(cn)({onClick:v4e(r)(f4e(_4e(a.currentUser)(function(U){return U.profile}))(vY.create)),disabled:L.isDisabled})([iY("fe fe-message-square mr-2 large")(""),un("Connect with "+t.semUser.firstName)])},w=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),wN("mt-4 text-secondary small")("Invitation pending")];return WT("t--livestream-details-guest-presenter-sem-user mb-4")([za(a.currentUser)(function(L){return Ka(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(lY("card")(WT("card-body")((function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof r0)return R;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Ls&&t.semUser.connection.value0.initiator instanceof Nf||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Pf&&t.semUser.connection.value0.initiator instanceof Nf)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Ls&&t.semUser.connection.value0.initiator instanceof Lf)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Pf&&t.semUser.connection.value0.initiator instanceof Lf||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])})())))}),p4e("text-uppercase text-secondary")("Your guest presenter"),WT("row align-items-center mt-4")([lY("col-auto")(rY(cY(t.semUser)({initials:h}))($I.value)),WT("col")([m4e("mb-1")(s),wN("text-secondary small")(t.semUser.school.name),wN("text-secondary small")(t.semUser.title)]),za(t.semUser.bio)(function(L){return d4e("mt-4 mb-2 ml-2")(L)})]),za(t.modal)(function(L){return ZK(L.value0)(function(U){return r(gy.create(U))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof gy&&r.value0 instanceof Hn){if(r.value0.value0 instanceof dy)return xh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof mN)return h4e(g4e(D4e(lx(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return R4e(new fY({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return xh(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 gy&&r.value0 instanceof ke)return y4e(gy.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new sY(u))}})(eY(t.modal.value0.value0)(new ke(r.value0.value0)));if(r instanceof gy&&r.value0 instanceof ke)return xh(t);if(r instanceof vY)return xh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new sY(nY({schoolName:a.semUser.school.name,context:nA.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof fY)return xh({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:Nf.value,introMessage:r.value0.introMessage,status:Ls.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 Cf("Livestream Guest Presenter SEM user")(function(a){return{init:xh(cY(a)({modal:G.value})),view:e(a),update:n(a)}})})();var b4e=Ft(Ce),E4e=Ht(ie),Dy=Ne(Ce),mY=Yd(ie),I4e=B(en),bN=Ne(tn),T4e=xc()(),S4e=_u(ie),dY=function(e){return function(n){var a=function(i){return b4e("badge badge-light bg-light text-dark mr-3")([E4e("fe fe-tag mr-2")(""),un(i.name)])},t=function(i){return function(l){return Dy("mb-3")([mY("text-secondary text-uppercase mb-2")(i),l])}},r=Dy("mt-4")([za(ge(n.entity.shortEducation))(function(i){return t("Education")(un(i))}),t("Bio")(sh(n.entity.bio)),JA(Rl(n.entity.tags))(t("Specialties")(Oe(I4e(a)(n.entity.tags))))]),u=Dy("row")([za(ge(n.entity.imageUrl))(function(i){return bN("p-0 m-0")(bN("col-auto my-auto")(bN("avatar avatar-md")(T4e("avatar-img rounded-circle")({src:i}))))}),Dy("col-auto my-auto")([mY("text-uppercase text-secondary mb-2")("Advisor"),S4e("m-0")(n.entity.name)])]);return Dy("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var Ry=function(e){return function(n){return function(a){return function(t){if(n instanceof RR)return pY({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof yR)return dY(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 F4e=ro(Ce)()(),G4e=Ht(ie),jh=Ne(ie),gc=Ne(tn),Dc=Ne(Ce),DY=_u(ie),RY=xc()(),yY=de(en),M4e=Ft(ie),gY=de(ue),A4e=$r(Ce),wY=Ou(ie),bY=ro(ie)()(),L4e=oe(fn),yy=B(ue),N4e=Kd(Ce)()(),P4e=oe(Bs),wy=function(e){var n=function(a){return function(t){return F4e("mr-3")(cn)({href:t,target:"_blank"})([un(a),G4e("fe fe-external-link ml-1")("")])}};return Oe([jh("text-uppercase text-muted small mb-2")("School information"),gc("card shadow-none")(Dc("card-body")([DY("mb-1")(e.name),jh("text-uppercase small text-secondary")(e.cityState),Dc("mt-3 d-none d-md-block")([n("Stats")(WI(mm.value)(e.slug)),n("Cost")(WI(jR.value)(e.slug)),n("Map")(WI(mm.value)(e.slug))]),Dc("mt-3 d-md-none")([n("Stats")(xL(mm.value)(e.slug)),n("Cost")(xL(jR.value)(e.slug))])]))])},O4e=function(e){var n=function(i){return RY("avatar-img rounded-circle")({src:i})},a=_o(" ")(yY(li(" ")(e.fullName))(Ml(1))),t=M4e("avatar-title rounded-circle text-uppercase")(a),r=function(i){return We("")(gY(i)(function(l){return" '"+l}))},u=function(i){return function(l){return A4e("")([wY("")(i+": "),un(l)])}};return Oe([jh("text-uppercase text-muted small mb-2")("Your host"),Dc("row align-items-center mb-4 pr-4")([gc("col-auto")(gc("avatar")(Wn(t)(n)(e.pictureUrl))),gc("col")(Dc("row align-items-center justify-content-between")([jh("col-12 col-md-auto x-large")(e.fullName),gc("col-12 col-md-auto")(za(e.allStreamsUrl)(function(i){return bY("t--host-streams")(cn)({href:i})("See all "+(L4e(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Oe(ei([yy(u("Undergrad College"))(gY(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),yy(u("Major"))(e.undergrad.major),yy(u("Graduate College"))(e.gradCollege),yy(u("Work Experience"))(e.workExperience),yy(u("My Admissions Story"))(e.admissionsStory)]))])},U4e=function(e){return Oe([jh("text-uppercase text-muted small mb-2")("Description"),Dc("")([gc("col-6 col-md-4 float-right")(RY("img-fluid rounded")({src:e.imageUrl})),Dc("")(yY(li(` `)(e.description))(function(n){return N4e("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},k4e=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+P4e(e.conference.id));return gc("card mt-3")(gc("card-body py-3")(Dc("row align-items-center")([gc("col-12 col-md-auto mb-3 mb-md-0")(jh("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Dc("col-12 col-md mb-3 mb-md-0")([un("This livestream was part of the "),wY("")("\u{1F3AA} Student panel college fair"),un(". Recordings for all 100+ Q&A panels are available.")]),gc("col-12 col-md-auto")(bY("btn btn-sm btn-outline-primary px-3")(cn)({href:n})("See all recordings"))])))},$T=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([Ka(e.conference.collegeFair)(k4e(e)),gc("card")(Dc("card-body")([DY("text-center mb-4")("About this livestream"),Dc("row")([Dc(n)([za(e.conference.school)(function(a){return gc("d-md-none")(wy(a))}),U4e(e.conference)]),Dc(n)([za(e.conference.guestPresenter)(function(a){return Ry(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),za(e.conference.school)(function(a){return gc("d-none d-md-block")(wy(a))}),za(e.conference.presenter)(O4e)])])]))])};var FY=vn(rn),B4e=FY(_a),H4e=at(He),J4e=Cr(nu),IY=x(ya),eS=x(kn),q4e=FY(La),xT=x(Ua),TY=Ne(ie),jT=jc(ie),zT=V_(Ce),VT=x_(Ce),F0=Ff(Ce),ls=j_(ie),QT=z_(Ce),KT=de(en),G0=Ms(ie),YT=Ms(tn),XT=da(ie)()(),ZT=Ia(ja),W4e=xl(_t),$4e=B(en),x4e=on(i_(i_(vb))),j4e=xl(Cl),z4e=xl(aH),V4e=oe(Bs),Q4e=xr(ie),K4e=Ne(Ce),nS=(function(){function e(){}return e.value=new e,e})(),GY=(function(){function e(){}return e.value=new e,e})(),by=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),SY=(function(){function e(){}return e.value=new e,e})(),CY=(function(){function e(){}return e.value=new e,e})(),MY=function(e){return function(n){return function(a){var t=function(u){return B4e(H4e(J4e(u)(function(i){return IY(CY.value)})))(function(){return eS({ctas:n.ctas,stage:GY.value,error:G.value})})},r=function(u){if(u instanceof Xc)return uW({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof Zc)return rW({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof es)return oW({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof ns)return tW({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 by)return t(q4e(r(a.value0))(function(){return IY(SY.value)}));if(a instanceof SY)return eS({ctas:n.ctas,error:n.error,stage:nS.value});if(a instanceof CY)return eS({ctas:n.ctas,stage:nS.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])}}},AY=function(e){return eS({stage:nS.value,error:G.value,ctas:e})},Y4e=(function(){return si(ni(Ve)([Ns.value,new ir(" "),Ps.value,new ir(", "),Us.value,new ir(":"),cc.value,new ir(" "),ks.value]))})(),LY=function(e){return function(n){if(e.ctas.length===0)return Aa;var a=function(L){return L instanceof ns?xT(L.value0):G.value},t=function(L){return L instanceof Zc?xT(L.value0):G.value},r=function(L){return L instanceof es?xT(L.value0):G.value},u=function(L){return L instanceof Xc?xT(L.value0):G.value},i=(function(){if(e.stage instanceof nS)return Aa;if(e.stage instanceof GY)return TY("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([jT("")("Referrals"),zT("table table-sm mb-0")([VT("")([F0("")([ls("")("Title"),ls("")("Actions")])]),QT("")(KT(L)(function(U){return F0("t--cta t--cta-referral")([G0("pt-3")(U.title),YT("text-nowrap")(XT("btn btn-white btn-sm px-4 t--open")(cn)({onClick:ZT(n)(new by(new ns(U)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?Aa:Oe([jT("")("General"),zT("table table-sm mb-0")([VT("")([F0("")([ls("")("Title"),ls("")("URL"),ls("")("Link Text"),ls("")("Actions")])]),QT("")(KT(b_(W4e(function(U){return U.title}))(L))(function(U){return F0("t--cta t--cta-general")([G0("pt-3")((function(){var Q=Tr(U.autoDisplayMinutesFromStart);return Q?"\u23F0 ":""})()+U.title),G0("pt-3")(U.url),G0("pt-3")(U.buttonText),YT("text-nowrap")(XT("btn btn-white btn-sm px-4 t--open")(cn)({onClick:ZT(n)(new by(new Zc(U)))})("Launch CTA"))])}))])])},h=function(L){return L.length===0?Aa:Oe([jT("")("Featured Service Providers"),zT("table table-sm mb-0")([VT("")([F0("")([ls("")("Advisors"),ls("")("Link Text"),ls("")("Actions")])]),QT("")(KT(L)(function(U){return F0("t--cta t--cta-featured-sp")([G0("pt-3")(_o(", ")($4e(function(Q){return Q.name})(U.providers))),G0("pt-3")(U.linkText),YT("text-nowrap")(XT("btn btn-white btn-sm px-4 t--open")(cn)({onClick:ZT(n)(new by(new es(U)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?Aa:Oe([jT("")("Upcoming events"),zT("table table-sm mb-0")([VT("")([F0("")([ls("")("Livestream"),ls("")("Date & Time"),ls("")("Actions")])]),QT("")(KT(b_(x4e(j4e(function(U){return U.startTime}))(z4e(function(U){return U.conferenceId})))(L))(function(U){return F0("t--cta t--cta-stream-"+V4e(U.conferenceId))([G0("pt-3")(U.title),G0("pt-3")(Y4e(U.startTime)+(" "+Zp)),YT("text-nowrap")(XT("btn btn-white btn-sm px-4 t--open")(cn)({onClick:ZT(n)(new by(new Xc(U)))})("Launch CTA"))])}))])])},R=Qo(a)(e.ctas),E=Qo(t)(e.ctas),w=Qo(r)(e.ctas),I=Qo(u)(e.ctas);return Oe([Q4e("")("Calls to action"),K4e("t--ctas position-relative")([za(e.error)(function(L){return TY("alert alert-danger")(L)}),p(I),s(E),h(w),l(R),i])])}};var NY=Hs(Lv(Mv)),PY=ae(La),Z4e=M2(be),zh=(function(){function e(){}return e.value=new e,e})(),Ey=(function(){function e(){}return e.value=new e,e})(),Iy=(function(){function e(){}return e.value=new e,e})(),OY={eq:function(e){return function(n){return e instanceof zh&&n instanceof zh||e instanceof Ey&&n instanceof Ey||e instanceof Iy&&n instanceof Iy}}},UY=NY("profile_validate_username_path")(function(e){return function(n){return PY(e({username:n}))(Av(function(a){return Z4e("username validation result")(a)(function(t){return t==="available"?new T(zh.value):t==="taken"?new T(Ey.value):t==="invalid"?new T(Iy.value):G.value})}))}}),kY=NY("profile_set_username_path")(function(e){return function(n){return PY(e({username:n}))(to)}});var n8e=Ee(Qr(af()(Ys(Ys(nf)()({reflectSymbol:function(){return"username"}})(Ir))()({reflectSymbol:function(){return"result"}})(OY)))),EN=Ne(Ce),BY=Ne(tn),a8e=$r(ie),t8e=Pl(),Ty=Ne(ie),r8e=fu()(),o8e=Ia(Gl),HY=da(ie)()(),u8e=Ia(ja),i8e=uc($_(Wc)),IN=vn(rn)(_a),l8e=Vr(kn),TN=at(He),c8e=$l(lt),Im=x(kn),s8e=B(lt),v8e=ae(La),f8e=T_(nu),JY=x(ya),xY=(function(){function e(){}return e.value=new e,e})(),jY=(function(){function e(){}return e.value=new e,e})(),zY=(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})(),WY=(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})(),VY=(function(){function e(){}return e.value=new e,e})(),$Y=(function(){function e(){}return e.value=new e,e})(),SN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),CN=(function(){function e(){}return e.value=new e,e})(),QY=function(e){return function(n){var a=e.username!==""&&Dr(e.updating)&&n8e(e.validated)(new T({username:e.username,result:zh.value}));return Oe([EN("row")([BY("col col-md-6")(a8e("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),BY("col-6 d-none d-md-block")(t8e("img-fluid")({alt:Nl.value,src:"/img/illustrations/clipboards.svg"}))]),Ty("")("Your username:"),EN("input-group")([r8e("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:o8e(n)(function(t){return ke.create(zY.create(Vf(t)))})})]),EN("d-flex mt-3")([HY("btn btn-light mr-3")(cn)({onClick:u8e(n)(new Hn(CN.value))})("Cancel"),HY("btn btn-primary t--submit-username")(cn)({type:"button",disabled:!a,onClick:i8e(n)((function(){return a?new T(new ke(VY.value)):G.value})())})("Save")]),za(e.validated)(function(t){if(t.result instanceof zh)return Aa;if(t.result instanceof Ey)return Ty("small text-danger")("Sorry, this username is already taken");if(t.result instanceof Iy)return Ty("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])}),za(e.updating)(function(t){if(t instanceof xY)return Ty("text-success")("Updating your username...");if(t instanceof jY)return Ty("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])})])}},KY=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof zY)return IN(l8e(n.value0.value0!=="")(TN(c8e(Wr(100))(new ke(new qY(n.value0.value0))))))(function(){return Im({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof qY){if(n.value0.value0===e.username)return IN(TN(s8e((function(){var a=WY.create(n.value0.value0);return function(t){return ke.create(a(t))}})())(UY(n.value0.value0))))(function(){return Im({username:e.username,validated:G.value,updating:G.value})});if(xe)return Im(e)}if(n.value0 instanceof WY)return Im({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof VY)return IN(TN(v8e(f8e(kY(e.username)))(function(a){if(a instanceof Le)return JY(new Hn(new SN(e.username)));if(a instanceof Ae)return JY(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 Im({username:e.username,validated:G.value,updating:new T(xY.value)})});if(n.value0 instanceof $Y)return Im({username:e.username,validated:e.validated,updating:new T(jY.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 Hn)return Im(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])}},YY=function(e){return{username:e,validated:G.value,updating:G.value}};var p8e=uu(),m8e=Jh(tn)()(),d8e=Ft(Ce),h8e=Ht(ie),g8e=function(e){var n=QD(e);return function(){return function(a){return function(t){var r=p8e(a);return m8e({placement:HT,overlay:Oe(n(t)),overlayStyle:et(r.overlayStyle)(Vt({width:"15rem"}))})(d8e("d-inline-flex align-items-center text-secondary "+r.className)([h8e("d-inline-block fe fe-help-circle "+(function(){var u=r.anchorText==="";return u?"":"mr-2"})())(""),un(r.anchorText)]))}}}},aS=function(e){var n=g8e(e)();return function(a){return n({className:a,anchorText:""})}};var ZY=ta(aa),Sy=na(ZY)(Yn(Kn)),eX=Zn(Xn),Cy=ea(eX),nX=ua(oa),Fy=ra(nX),D8e=B(ue),Vh=(function(){function e(){}return e.value=new e,e})(),Qh=(function(){function e(){}return e.value=new e,e})(),Kh=(function(){function e(){}return e.value=new e,e})(),Yh=(function(){function e(){}return e.value=new e,e})(),Xh=(function(){function e(){}return e.value=new e,e})(),Tm=(function(){function e(){}return e.value=new e,e})(),R8e={to:function(e){if(e instanceof Se)return Vh.value;if(e instanceof fe&&e.value0 instanceof Se)return Qh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return Kh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return Yh.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 Xh.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 Tm.value;throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof Vh)return new Se(je.value);if(e instanceof Qh)return new fe(new Se(je.value));if(e instanceof Kh)return new fe(new fe(new Se(je.value)));if(e instanceof Yh)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof Xh)return new fe(new fe(new fe(new fe(new Se(je.value)))));if(e instanceof Tm)return new fe(new fe(new fe(new fe(new fe(je.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},aX=zn(R8e)(Sy(Sy(Sy(Sy(Sy(ZY)(eX))(Cy))(Cy))(Cy))(Cy))(Fy(Fy(Fy(Fy(Fy(nX))))))(Cy);var y8e={eq:function(e){return function(n){return e instanceof Vh&&n instanceof Vh||e instanceof Qh&&n instanceof Qh||e instanceof Kh&&n instanceof Kh||e instanceof Yh&&n instanceof Yh||e instanceof Xh&&n instanceof Xh||e instanceof Tm&&n instanceof Tm}}},tS=function(e){if(e instanceof Vh)return"student";if(e instanceof Qh)return"transfer_student";if(e instanceof Kh)return"counselor";if(e instanceof Yh)return"iec";if(e instanceof Xh)return"parent";if(e instanceof Tm)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},tX=(function(){var e=jn(tS)(aX);return Ca(ln)({parse:function(n){return n==="unknown"?new T(G.value):D8e(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})})(),rX=function(e){if(e instanceof Vh)return"Student";if(e instanceof Qh)return"Transfer Student";if(e instanceof Kh)return"High School Counselor";if(e instanceof Yh)return"Independent Educational Counselor (IEC)";if(e instanceof Xh)return"Parent";if(e instanceof Tm)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},oX=(function(){return I_(y8e)(Tm.value)(aX)})();function uX(){typeof fbq>"u"||fbq("trackCustom","LivestreamRegistrationComplete")}var E8e=x(Yt),I8e=DR(!1);var rS=function(e){if(gR(I8e))return E8e(void 0);if(xe)return uX;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var GN=B(eo);var FN=ae(gi),T8e=x(av),S8e=Ku(t7);var lX=function(e){return e},cX=function(e){return function(n){return GN(function(a){return a.result})(e({substring:n,position:0}))}};var Bv={map:function(e){return function(n){var a=GN(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},Sm=function(e){return function(n){return new Ae({pos:n.position,error:e})}},Cm={apply:function(e){return function(n){return function(a){return FN(e(a))(function(t){return FN(n(t.suffix))(function(r){return T8e({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return Bv}};var Qf={bind:function(e){return function(n){return function(a){return FN(e(a))(function(t){return lX(n(t.result))(t.suffix)})}}},Apply0:function(){return Cm}};var Kf={pure:function(e){return function(n){return new Le({result:e,suffix:n})}},Apply0:function(){return Cm}};var C8e={Applicative0:function(){return Kf},Bind1:function(){return Qf}},sX={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 Jr)return new Jr({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 S8e(function(r){return GN(a)(lX(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return C8e}};var Fm={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Ae){if(a.position===t.value0.pos)return n(a);if(xe)return new Ae({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return Bv}},F8e={empty:Sm("No alternative"),Alt0:function(){return Fm}},vX={Applicative0:function(){return Kf},Plus1:function(){return F8e}};var fX=Oa(Fm),MN=ae(Qf),AN=x(Kf),M8e=B(Bv);var A8e=Mu(Cm),L8e=va(Cm);var LN=function(e){return function(n){return fX(e)(Sm(n))}},NN=function(e){return function(n){var a=e(n);return a instanceof Ae?new Ae({pos:n.position,error:a.value0.error}):a}},Hv=function(e){return fX(MN(e)(function(n){return AN(void 0)}))(AN(void 0))};var _X=function(e){return function(n){return new yl(e,n)}};var N8e=function(e){return function(n){var a=e(n);if(a instanceof Le){var t=n.position65535;return t?e(n):hX(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])})})(),M0=function(e){return NN(dX(B8e)(function(n){var a=e(n);return a?hX(n):Sm("Character "+(gX(n)+" did not satisfy predicate"))}))},Rc=function(e){return LN(M0(function(n){return n===e}))("Could not match character "+gX(e))};var J8e=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}},q8e=vr(),UN=B(Bv),W8e=bo(dD)(fr),$8e=B(GG),Wu=vn(rn)(Qf),Ni=xt(Bv),Yf=x(Kf),kl=Oa(Fm);var Zh=Mu(Cm),A0=ae(Qf),yX=bo(Ko)(fr);var Ho=function(e){return q8e(DE(e))},kN=function(e){return UN((function(){var n=$8e(ji);return function(a){return W8e(n(a))}})())(pX(M0(e)))},wX=function(e){return Wu(Ni(e))(function(){return Wu(Ni(uS(e)))(function(){return Yf(void 0)})})},uS=function(e){return kl(wX(e))(Yf(void 0))},bX=function(e){return Wu(Ni(M0(e)))(function(){return Wu(Ni(uS(M0(e))))(function(){return Yf(void 0)})})},x8e=Rc(Ho(0));var EX=Rc(` `),IX=function(e){return e===" "||e===" "},j8e=M0(IX),ON=bX(IX),z8e=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},Jv=function(e){return function(n){return function(a){return a>=e&&a<=n}}},V8e=Jv(Ho(33))(Ho(126)),Q8e=M0(V8e),BN=function(e){return function(n){return vv(ji(n))(e)}},iS=function(e){return Jv(Ho(1))(Ho(8))(e)||Jv(Ho(14))(Ho(31))(e)||BN("\v\f\x7F")(e)},K8e=function(e){return Jv(Ho(33))(Ho(39))(e)||Jv(Ho(42))(Ho(91))(e)||Jv(Ho(93))(Ho(126))(e)||iS(e)},Y8e=function(e){return Jv(Ho(33))(Ho(90))(e)||Jv(Ho(94))(Ho(126))(e)||iS(e)},X8e=M0(iS),Z8e=function(e){return BN(ji(Ho(33)))(e)||Jv(Ho(35))(Ho(91))(e)||Jv(Ho(93))(Ho(126))(e)||iS(e)};var TX=Rc("\r"),RX=Ni(Zh(TX)(EX)),eg=(function(){var e=wX(Zh(RX)(ON)),n=Zh(ON)(Hv(Zh(RX)(ON)));return kl(n)(e)})(),SX=(function(){var e=Wu(Ni(Rc("\\")))(function(){return kl(Q8e)(kl(j8e)(kl(EX)(kl(TX)(kl(X8e)(x8e)))))});return A0(e)(function(n){return Yf("\\"+ji(n))})})(),e7e=kl(kN(Z8e))(SX),n7e=(function(){var e=Wu(Ni(Rc('"')))(function(){return A0(Gm(Zh(Hv(eg))(e7e)))(function(n){return Wu(Ni(Hv(eg)))(function(){return Wu(Ni(Rc('"')))(function(){return Yf(n)})})})});return UN(function(n){return'"'+(yX(n)+'"')})(e)})(),CX=J8e("comment","Text.Email.Parser",function(){return Wu(Ni(Rc("(")))(function(){return Wu(uS(kl(bX(K8e))(kl(Ni(SX))(kl(CX(155))(eg)))))(function(){return Wu(Ni(Rc(")")))(function(){return Yf(void 0)})})})}),a7e=CX(152),oS=uS(kl(a7e)(eg)),t7e=Wu(Hv(oS))(function(){return Wu(Ni(Rc("[")))(function(){return A0(Gm(Zh(Hv(eg))(kN(Y8e))))(function(e){return Wu(Hv(eg))(function(){return Wu(Ni(Rc("]")))(function(){return Wu(Hv(oS))(function(){return Yf("["+(yX(e)+"]"))})})})})})}),r7e=(function(){var e=function(n){return z8e(n)||BN("!#$%&'*+/=?^_`{|}~-")(n)};return kN(e)})(),FX=(function(){var e=Wu(Ni(Hv(oS)))(function(){return A0(kl(r7e)(n7e))(function(a){return Wu(Ni(Hv(oS)))(function(){return Yf(a)})})}),n=mX(e)(Rc("."));return UN(gs(dD)(fr)("."))(n)})(),o7e=kl(FX)(t7e),u7e=FX,HN=A0(u7e)(function(e){return A0(Rc("@"))(function(){return A0(o7e)(function(n){return A0(DX)(function(){return Yf({localPart:e,domainPart:n})})})})});var c7e=function(e){return cX(HN)(e)},s7e=(function(){var e=Nr(Yu)(oe(p_()()(m_({reflectSymbol:function(){return"error"}})(d_({reflectSymbol:function(){return"pos"}})(fn))(gr))));return function(n){return e(c7e(n))}})(),My=function(e){var n=s7e(e);if(n instanceof Ae)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 JN=Ou(ie),lS=fu()(),v7e=Ia(Gl),MX=x1(Ce)()(),AX=de(ue),LX=uc(k1(Wc)),NX=B(ue),cS=j1(ie)()(),PX=de(en),Ay=Ne(Ce),f7e=AL(),qN=oe(fn),_7e=Eb(Ve)(kt),p7e=Y_(Ce)()(),Mm=Ne(tn),OX=da(ie)()(),m7e=Ia(ja),d7e=oe(Bs),Ly=x(kn),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})(),JX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ng=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([JN("")(R),lS("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:w,placeholder:E,autoFocus:L.autoFocus,onChange:v7e(t)(function(U){return I(Vf(U))})})])}}}}}},u=[JN("")("I'm a..."),MX("form-control")({name:"livestream_public_registration_form[i_am_a]",value:We("")(AX(a.persona)(tS)),onChange:LX(t)(function(p){return NX(JX.create)(tX(oN(p)))})})([Ka(Dr(a.persona))(cS("")({value:""})("Select one...")),Oe(PX(oX)(function(p){return cS("")({value:tS(p)})(rX(p))}))])],i=Ay("d-flex align-items-center")([un("Already have an account? "),f7e({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:HI,openInNewTab:!1})]),l=[JN("")("Graduation year"),MX("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:We("")(AX(a.gradYear)(qN)),onChange:LX(t)(function(p){return NX(HX.create)(uv(oN(p)))})})([Ka(Dr(a.gradYear))(cS("")({value:""})("Select one...")),Oe(PX(n.allowedGradYears)(function(p){return cS("")({value:qN(p)})(qN(p))}))])],s=We({path:"",token:"",impersonationToken:""})(sI("livestreams_register_path")),h=_7e([My(a.email),a.firstName!=="",a.lastName!=="",Tr(a.gradYear),Tr(a.persona)]);return Oe([i,p7e("")({action:s.path,method:"POST"})([Mm("row")(Mm("col")(r("email")("Email")("Your email")(a.email)(UX.create)({autoFocus:e.autoFocus}))),Mm("row mt-3")(Mm("col")(r("first_name")("First name")("Your first name")(a.firstName)(kX.create)({autoFocus:!1}))),Mm("row mt-3")(Mm("col")(r("last_name")("Last name")("Your last name")(a.lastName)(BX.create)({autoFocus:!1}))),Ay("row mt-3")([Ay("col-6")(l),Ay("col-6")(u)]),Mm("row mt-3")(Ay("col-12")([OX("btn btn-primary w-100 mt-3 t--register")(cn)({type:"submit",disabled:!h,onClick:m7e(rS)(void 0)})("Register"),za(e.cancelButton)(function(p){return OX("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(cn)({type:"button",onClick:So(function(R){return p.click})})(p.text)})])),lS("")({type:"hidden",name:"authenticity_token",value:s.token}),lS("")({type:"hidden",name:"register_for_conference_id",value:d7e(n.conference.id)}),lS("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},ag=function(e){return function(n){if(n instanceof UX)return Ly({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof kX)return Ly({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof BX)return Ly({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof HX)return Ly({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof JX)return Ly({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])}},tg=(function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}})();var qX=Ne(Ce),h7e=aS(ie),g7e=ro(ie)()(),rg=function(e){return Oe([qX("")([un(` 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. `)]),qX("")([un(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),g7e("")(zr("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),un(".")])])};var xN={eq:function(e){return function(n){return e===n}}};var Xf=vn(rn)(_a),R7e=Gi(He),WX=dt(),y7e=mc(WX(W({reflectSymbol:function(){return"author"}})(WX(W({reflectSymbol:function(){return"cvid"}})(be)(W({reflectSymbol:function(){return"username"}})(be)(pn))))(W({reflectSymbol:function(){return"id"}})(dn)(W({reflectSymbol:function(){return"isFromHQ"}})(it)(W({reflectSymbol:function(){return"isPublic"}})(it)(W({reflectSymbol:function(){return"text"}})(be)(W({reflectSymbol:function(){return"time"}})(be)(pn))))))))(He),ig=at(He),vS=x(ya),Jo=x(kn),jN=qs(),w7e=$r(Ce),zN=Ft(ie),VN=Ou(ie),b7e=Ht(ie),Am=Ne(Ce),og=Ne(tn),sS=da(ie)()(),ug=Ia(ja),Ny=Ne(ie),$X=xr(ie),QX=de(en),E7e=jr(Ce)()(),I7e=Ft(Ce),KX=ae(nn),T7e=Vd()(),S7e=Ia(Gl),C7e=uc($_(Wc)),F7e=Q_(Ce),G7e=fu()(),M7e=aS(ie),A7e=Ee(Qr(Ir)),L7e=de(ue),xX=Zu(HJ(Ji(Cl))),N7e=Au(xN),jX=B(lt),P7e=on(Er),O7e=Ds(Ve)(xN),zX=Wt(Po(lt)),YX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XX=(function(){function e(){}return e.value=new e,e})(),ZX=(function(){function e(){}return e.value=new e,e})(),Lm=(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})(),pS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),eZ=(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})(),QN=(function(){function e(){}return e.value=new e,e})(),KN=(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})(),VX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YN=(function(){function e(){}return e.value=new e,e})(),mS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),dS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),tZ=(function(){function e(){}return e.value=new e,e})(),lg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Py=(function(){function e(){}return e.value=new e,e})();var rZ=function(e){return Xf(R7e(function(n){return ke.create(KN.create(em(n)))})(y7e(e.pusher.dataChannel)("question")))(function(){return Xf(ig(vS(new ke(aZ.value))))(function(){return Jo({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:Lm.value})})})},oZ=function(e){if(e.user instanceof G)return new T(new ke(YN.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new ke(tZ.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])},U7e=(function(){return si(ni(Ve)([Us.value,new ir(":"),cc.value,new ir(" "),ks.value]))})(),uZ=function(e){return function(n){return function(a){var t=function(s){return a(ke.create(s))},r=function(s){return jN({id:"question-modal",onDismiss:t(Py.value),body:Oe([w7e("")([zN("")("By: "),VN("")("@"+s.author.username)]),b7e("")(s.text),As(""),Am("row align-items-center mb-3")([og("col-4")(sS("btn w-100 btn-"+(function(){return s.isPublic?"secondary":"success"})())(cn)({onClick:ug(t)(new dS(XX.value))})((function(){return s.isPublic?"Hide from audience":"Show to audience"})())),Ny("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."})())]),Am("row align-items-center")([og("col-4")(sS("btn w-100 btn-danger")(cn)({onClick:ug(t)(new dS(ZX.value))})("Ban this user")),Am("col")([un("This user will not be able to ask any more questions "),VN("")("in this livestream. "),zN("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Oe([sS("btn btn-outline-primary px-4")(cn)({onClick:ug(t)(Py.value)})("Never mind, close this dialog")])})},u=function(s){return jN({id:"questions-registration-form-modal",onDismiss:t(Py.value),title:$X("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Oe([ng({cancelButton:G.value,autoFocus:!0})(e)(s)(function(h){return t(mS.create(h))}),og("small mt-3")(rg(e))])})},i=function(s){return jN({id:"questions-username-modal",onDismiss:t(Py.value),title:$X("")("Please select a user name"),body:QY(s)(function(h){return t(lg.create(h))}),bodyClass:"t--username-modal"})},l=function(s){var h=function(R){return function(E){return function(w){return Oe([Ny("ml-2 badge badge-"+E)(R),za(w)(function(I){return Ny("ml-2 text-secondary")(U7e(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?h("CollegeVine")("success")(s.time):s.isPublic?h("Question")("warning")(G.value):Aa};return Oe([og("position-relative h-100")(og("d-flex flex-column position-absolute-fullsize")(Am("d-flex flex-column flex-grow-1 min-height-0")([Am("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(QX(n.questions)(function(s){return E7e("p-1 t--question"+(function(){return e.isPrivilegedUser?" cursor-pointer":""})())({onClick:ug(t)(new dS(new YX(s)))})([I7e("small d-inline-flex align-items-center")([VN("")("@"+s.author.username),l(s),un(":")]),zN("ml-1")(s.text)])})),Am("")([za(KX(e.user)(function(s){return s.username}))(function(s){return Ny("small text-secondary mt-2")("@"+s)}),T7e("form-control t--question-text")({onChange:S7e(t)(function(s){return eZ.create(JT(s))}),onClick:C7e(a)(oZ(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),Ka(e.isPrivilegedUser)(og("form-check my-2")(F7e("form-check-label d-flex align-items-center t--broadcast-checkbox")([G7e("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:ug(t)(nZ.value)}),Ny("badge badge-info bg-info text-dark mr-2")("HQ"),un("Send to all viewers")]))),Am("d-flex justify-content-end align-items-center")([M7e("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. `),sS("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(cn)({onClick:ug(t)(QN.value),disabled:n.newQuestionText===""})((function(){return n.newQuestionBroadcast?"Send to all":"Send to host"})())])])]))),(function(){if(n.modal instanceof Lm)return Aa;if(n.modal instanceof _S)return u(n.modal.value0);if(n.modal instanceof fS)return r(n.modal.value0);if(n.modal instanceof pS)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])})()])}}},k7e=function(e){return function(n){return A7e(L7e(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},iZ=function(e){return function(n){return function(a){if(a instanceof Hn)return Jo(n);if(a instanceof ke){if(a.value0 instanceof eZ){var t=oZ(e);if(t instanceof T)return Xf(ig(vS(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 nZ)return Jo({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof QN)return Xf(ig(vS(new ke(YN.value))))(function(){return Jo(n)});if(a.value0 instanceof KN)return Jo({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:xX(function(l){return fI((function(s){return s.time})(l))})(Lu(k7e(e))(yu(a.value0.value0)(Lu((function(){var l=N7e(a.value0.value0.id);return function(s){return l((function(h){return h.id})(s))}})())(n.questions))))});if(a.value0 instanceof aZ)return Xf(ig(jX(function(l){return ke.create(VX.create(l))})(II(e.conference.id))))(function(){return Jo(n)});if(a.value0 instanceof VX){var u=QX(a.value0.value0)(function(l){return l.id});return Jo({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:xX(function(l){return fI((function(s){return s.time})(l))})(P7e(a.value0.value0)(Lu(function(l){return O7e(l.id)(u)})(n.questions)))})}if(a.value0 instanceof YN)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new _S(tg)});var i=function(l){if(a.value0 instanceof mS)return Jo(n);if(a.value0 instanceof tZ)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new pS(YY(We("")(KX(e.user)(function(h){return h.username}))))});if(a.value0 instanceof lg&&a.value0.value0 instanceof Hn&&a.value0.value0.value0 instanceof SN)return Xf(ig(vS(new Hn(a.value0.value0.value0.value0))))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})});if(a.value0 instanceof lg&&a.value0.value0 instanceof Hn&&a.value0.value0.value0 instanceof CN)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value});var s=function(h){if(a.value0 instanceof lg&&xe)return Jo(n);if(a.value0 instanceof Py)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value});if(a.value0 instanceof dS){if(e.isPrivilegedUser){if(a.value0.value0 instanceof YX)return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new fS(a.value0.value0.value0)});var p=function(R){var E=function(w){return Jo(n)};return a.value0.value0 instanceof ZX&&n.modal instanceof fS?Xf(Pt(sW({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})}):E(!0)};return a.value0.value0 instanceof XX&&n.modal instanceof fS?Xf(Pt(nW({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Jo({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})}):p(!0)}if(xe)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 lg&&n.modal instanceof pS?zX(function(h){return ke.create(lg.create(h))})(function(h){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new pS(h)}})(KY(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof mS&&n.modal instanceof _S?zX(function(l){return ke.create(mS.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new _S(l)}})(ag(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof QN&&e.user instanceof T?Xf(ig(jX(function(r){return ke.create(KN.create(r))})(aW({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 hS,H7e=new Uint8Array(16);function XN(){if(!hS&&(hS=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!hS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hS(H7e)}var lZ=/^(?:[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 J7e(e){return typeof e=="string"&&lZ.test(e)}var ZN=J7e;var pi=[];for(gS=0;gS<256;++gS)pi.push((gS+256).toString(16).substr(1));var gS;function q7e(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(pi[e[n+0]]+pi[e[n+1]]+pi[e[n+2]]+pi[e[n+3]]+"-"+pi[e[n+4]]+pi[e[n+5]]+"-"+pi[e[n+6]]+pi[e[n+7]]+"-"+pi[e[n+8]]+pi[e[n+9]]+"-"+pi[e[n+10]]+pi[e[n+11]]+pi[e[n+12]]+pi[e[n+13]]+pi[e[n+14]]+pi[e[n+15]]).toLowerCase();if(!ZN(a))throw TypeError("Stringified UUID is invalid");return a}var cZ=q7e;function W7e(e,n,a){e=e||{};var t=e.random||(e.rng||XN)();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 cZ(t)}var eP=W7e;var sZ=eP;var x7e=function(e){return e},nP=function(e){return e};var aP=ae(io)(sZ)((function(){var e=x(Yt);return function(n){return e(x7e(n))}})());var cg=at(He),DZ=vn(rn),j7e=DZ(La),z7e=on(v1),V7e=B(lt),Uy=On(He),Q7e=Ht(ie),K7e=Pl(),RZ=jr(tn)()(),fZ=Hg(Cl),Y7e=su(uo),X7e=la(nl),Z7e=oe(C6),_Z=oe(Y0),eOe=B(en),qv=DZ(_a),nOe=Gi(He),aOe=mc(dt()(W({reflectSymbol:function(){return"authorTag"}})(be)(W({reflectSymbol:function(){return"kind"}})(be)(pn))))(He),RS=B(ia),L0=x(kn),pZ=Ut(Od),mZ=Bg(Cl),tOe=x(ya),tP=mv(Ld),rOe=Ne(Ce),oOe=de(en),uOe=da(Ce)()(),iOe=Ia(ja),lOe=Ft(ie),DS=(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})(),Oy=(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})(),yZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),oP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),rP=function(e){return cg(j7e(Wr(z7e(e)(10)))(function(){return V7e(oP.create)(Uy(Ll))}))},dZ=50,wZ=function(e){var n=function(r){return Q7e("text-white fe fe-"+r)("")},a=(function(){if(e instanceof Bf)return n("heart");if(e instanceof h0)return n("thumbs-up");if(e instanceof nm)return n("thumbs-down");if(e instanceof g0)return n("file-text");if(e instanceof D0)return K7e("")({src:"/img/icons/smile-white.svg",alt:Nl.value,style:Vt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 153, column 12 - line 158, column 133): "+[e.constructor.name])})(),t=(function(){if(e instanceof Bf)return"#F0747B";if(e instanceof h0)return"#008CFD";if(e instanceof nm)return"#6E84A3";if(e instanceof g0)return"#18A668";if(e instanceof D0)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 160, column 23 - line 165, column 34): "+[e.constructor.name])})();return RZ("d-flex justify-content-center align-items-center rounded-circle")({style:Vt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},bZ=6,hZ=(function(){return bZ*1e3})(),EZ=function(e){return function(n){var a=function(t){if(fZ(t.removeAt)(e.currentTime))return Aa;var r=_r(Y7e(X7e(Jc(w1(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=fZ(t.startDecayAt)(e.currentTime),h=bZ+(r-5)/10;return RZ("position-absolute mb-4 mt-2")({key:Z7e(t.startDecayAt),style:Vt({right:_Z(l)+"rem",top:(function(){return s?"0":"90%"})(),opacity:(function(){return s?0:i?1:.6})(),transitionProperty:"top opacity",transitionDuration:_Z(h)+"s",transitionTimingFunction:u})})(wZ(t.reaction.kind))};return Oe(eOe(a)(e.reactions))}},IZ=function(e){return qv(nOe(function(n){return new Oy(pH(n),G.value)})(aOe(e.pusher.dataChannel)("reaction")))(function(){return qv(cg(Uy(RS(function(n){return yZ.create(nP(n))})(aP))))(function(){return qv(cg(Uy(RS(oP.create)(Ll))))(function(){return L0({authorTag:"",currentTime:pZ,coolDownUntil:pZ,reactions:[]})})})})},gZ=800,TZ=function(e){return function(n){return function(a){if(a instanceof DS&&a.value1 instanceof G)return qv(cg(Uy(RS((function(){var t=DS.create(a.value0);return function(r){return t(T.create(r))}})())(Ll))))(function(){return L0(n)});if(a instanceof DS&&a.value1 instanceof T){if(mZ(n.coolDownUntil)(a.value1.value0))return qv(cg(tOe(new Oy({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return L0(n)});if(xe)return qv(Pt(iW(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return qv(rP(gZ))(function(){return L0({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:We(a.value1.value0)(tP(gZ)(a.value1.value0))})})})}if(a instanceof Oy&&a.value1 instanceof G)return qv(cg(Uy(RS((function(){var t=Oy.create(a.value0);return function(r){return t(T.create(r))}})())(Ll))))(function(){return L0(n)});if(a instanceof Oy&&a.value1 instanceof T)return qv(rP(dZ))(function(){return qv(rP(hZ))(function(){var t={reaction:a.value0,startDecayAt:We(a.value1.value0)(tP(dZ)(a.value1.value0)),removeAt:We(a.value1.value0)(tP(hZ)(a.value1.value0))};return L0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:mp(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof yZ)return L0({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof oP)return L0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:Lu(function(t){return mZ(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 171, column 22 - line 214, column 8): "+[a.constructor.name])}}},SZ=function(e){return function(n){var a=function(t){if(t instanceof Bf)return"love this";if(t instanceof h0)return"helpful";if(t instanceof nm)return"not helpful";if(t instanceof g0)return"taking notes";if(t instanceof D0)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 139, column 13 - line 144, column 30): "+[t.constructor.name])};return rOe("d-flex justify-content-end my-2")(oOe([Bf.value,D0.value,h0.value,g0.value])(function(t){return uOe("btn bg-light d-flex align-items-center p-0 ml-3")(zr(a(t)))({onClick:iOe(n)(new DS(t,G.value)),style:Vt({borderRadius:"1em"})})([wZ(t),lOe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var UZ=vn(rn),sOe=ae(La),lP=On(He),yS=x(ya),ES=$r(ie),wS=oe(fn),ky=UZ(_a),By=at(He),cs=x(kn),CZ=Cr(nu),FZ=Mu(OD),GZ=B(lt),vOe=Xu(kn)(gl),fOe=Fl(Rf),MZ=Ne(ie),_Oe=Js(),pOe=xr(ie),AZ=da(ie)()(),uP=Ia(ja),LZ=Ne(tn),mOe=da(Ce)()(),dOe=Ht(ie),hOe=Ne(Ce),kZ=(function(){function e(){}return e.value=new e,e})(),BZ=(function(){function e(){}return e.value=new e,e})(),HZ=(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})(),NZ=(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})(),PZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),WZ=(function(){function e(){}return e.value=new e,e})(),$Z=(function(){function e(){}return e.value=new e,e})(),sP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),iP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bS=(function(){function e(){}return e.value=new e,e})(),xZ=UZ(La)(Wr(1e3))(function(){return sOe(lP(Ll))(function(e){return yS(new sP(e))})}),gOe=function(e){return{header:"Go on-air?",body:Oe([ES("")("Are you sure you want to go on-air?"),ES("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(wS(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:JZ.value}},OZ=function(e){return function(n){return function(a){return function(t){return ky(By(xZ))(function(){return cs({confirmation:n.confirmation,network:kZ.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},jZ=function(e){return function(n){return function(a){if(a instanceof JZ)return ky(By(CZ(FZ(Qq(e.conference.id))(GZ(NZ.create)(lP(Ll))))(function(l){return yS(new iP("Error opening the stream. Please try again."))})))(function(){return cs({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:BZ.value})});if(a instanceof NZ)return OZ(e)(n)(a.value0)(pu.value);if(a instanceof qZ)return ky(By(CZ(FZ(Kq(e.conference.id))(GZ(PZ.create)(lP(Ll))))(function(l){return yS(new iP("Error closing the stream. Please try again."))})))(function(){return cs(n)});if(a instanceof PZ)return OZ(e)(n)(a.value0)(ko.value);if(a instanceof cP)return cs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof WZ)return ky(vOe(n.confirmation)(function(l){return By(yS(l.confirmMsg))}))(function(){return cs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof $Z)return cs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof iP)return cs({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new HZ(a.value0)});var t=function(l){if(a instanceof sP||a instanceof bS)return cs(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 sP){if(n.transition instanceof T){var r=fOe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Nu(r)|0,i=u>0;return i?ky(By(xZ))(function(){return cs({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):cs({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},zZ=function(e){return cs({streamStatus:e.streamStatus,transition:G.value,network:kZ.value,confirmation:G.value})},DOe=(function(){return{header:"End the stream?",body:Oe([ES("")("Are you sure you want to end the stream?"),ES("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:qZ.value}})(),VZ=function(e){return function(n){return function(a){var t=(function(){return n.network instanceof BZ?MZ("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):Aa})(),r=function(h){return _Oe({id:"stream-controls-confirmation-modal",header:pOe("my-0")(h.header),bodyClass:"p-5",body:h.body,footerClass:"p-4",footer:Oe([AZ("btn btn-primary px-4")(cn)({onClick:uP(a)(WZ.value)})(h.confirmText),AZ("btn btn-outline-primary px-4")(cn)({onClick:uP(a)($Z.value)})(h.cancelText)])})},u=function(h){return function(p){return function(R){return function(E){return function(w){return LZ("col-auto pr-0")(mOe("btn btn-"+(h+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(cn)({onClick:uP(a)(w)})([dOe("fe mr-2 fe-"+p)(""),un(R)]))}}}}},i=(function(){if(n.streamStatus instanceof tl)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new cP(gOe(e)));var h=function(p){if(n.streamStatus instanceof pu)return Oe([u("lg")("radio")("ON AIR")("success")(bS.value),u("sm")("x-circle")("End stream")("outline-danger")(new cP(DOe))]);if(n.streamStatus instanceof ko)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(bS.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 pu&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(bS.value):h(!0)})(),l=function(h){return MZ("alert small m-0 flex-grow-1 alert-"+h)},s=(function(){if(n.network instanceof HZ)return l("danger")(n.network.value0);if(n.streamStatus instanceof tl)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var h=function(p){if(n.streamStatus instanceof pu)return l("light")(` We're live. The audience should see your video with a `+(wS(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 "+(wS(n.transition.value0.secondsLeft)+" seconds.")):R(!0)};return n.streamStatus instanceof pu&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(wS(n.transition.value0.secondsLeft)+" seconds...")):h(!0)})();return hOe("position-relative row align-items-center t--stream-controls")([i,LZ("col")(s),t,za(n.confirmation)(r)])}}};var yOe=mv(N_),YZ=Fl(N_),QZ=Wk(),wOe=qs(),bOe=xr(ie),EOe=Ne(ie),KZ=$r(ie),IOe=da(ie)()(),TOe=Ia(ja),XZ=at(He),ZZ=vn(rn),eee=B(lt),nee=On(He),aee=ZZ(_a),SOe=wi(Ve)(jt),vP=x(kn),_P=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fP=(function(){function e(){}return e.value=new e,e})(),COe=[30,15,5,0],tee=function(e){return We(e.conference.scheduledStartTime)(yOe(_r(e.conference.duration))(e.conference.scheduledStartTime))},ree=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=tee(e),r=YZ(t)(n.now.value0),u=(function(){if(r<1)return" ended "+QZ({from:t,to:n.now.value0,format:TE("ago")});if(xe)return" ends "+QZ({from:n.now.value0,to:t,format:TE("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 69, column 7 - line 71, column 105): ")})();return wOe({id:"stream-end-warning-modal",onDismiss:a(fP.value),body:Oe([bOe("mb-0")("Host-only warning"),EOe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),KZ("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),KZ("")(` You have `+(fc(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. `)),IOe("btn btn-primary px-4")(cn)({onClick:TOe(a)(fP.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])}}},FOe=XZ(ZZ(La)(Wr(60100))(function(){return eee(_P.create)(nee(p0))})),oee=function(e){return function(n){return function(a){if(a instanceof _P)return aee(FOe)(function(){var t=YZ(tee(e))(a.value0),r=SOe(Nu(t))(COe);return vP({now:new T(a.value0),modal:n.modal||r})});if(a instanceof fP)return vP({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])}}},uee=(function(){return aee(XZ(eee(_P.create)(nee(p0))))(function(){return vP({modal:!1,now:G.value})})})();var fee=vn(rn),MOe=fee(La),iee=x(ya),AOe=fee(_a),LOe=at(He),NOe=Cr(nu),TS=x(kn),POe=Ee(bR),_ee=ni(Ve),pP=Ne(Ce),IS=Ht(ie),OOe=da(ie)()(),lee=Ia(ja),UOe=ro(ie)()(),kOe=da(tn)()(),BOe=Js(),cee=Ne(tn),HOe=Ou(ie),JOe=Dv(ie)()(),qOe=Ft(ie),pee=(function(){function e(){}return e.value=new e,e})(),mee=(function(){function e(){}return e.value=new e,e})(),mP=(function(){function e(){}return e.value=new e,e})(),dee=(function(){function e(){}return e.value=new e,e})(),hee=(function(){function e(){}return e.value=new e,e})(),see=(function(){function e(){}return e.value=new e,e})(),vee=(function(){function e(){}return e.value=new e,e})(),WOe=(function(){function e(){}return e.value=new e,e})(),gee=function(e){return function(n){return function(a){var t=MOe(bI({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return iee(new ke(see.value))});if(a instanceof hee)return AOe(LOe(NOe(t)(function(r){return iee(new ke(vee.value))})))(function(){return TS({cta:n.cta,stage:mee.value})});if(a instanceof see)return TS({cta:n.cta,stage:dee.value});if(a instanceof vee)return TS({cta:n.cta,stage:mP.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 136, column 24 - line 146, column 44): "+[a.constructor.name])}}},Dee=function(e){return function(n){return POe(e.cta.conferenceId)(n.conferenceId)}},Ree=function(e){return TS({cta:e,stage:pee.value})},$Oe=(function(){return si(_ee([Os.value,new ir(", "),Ns.value,new ir(" "),Ps.value,new ir(" at "),Us.value,new ir(":"),cc.value,new ir(" "),ks.value]))})(),xOe=(function(){return si(_ee([Os.value]))})(),yee=function(e){return function(n){return function(a){var t=(function(){return n.stage instanceof mP?pP("text-danger small mt-2")([IS("fe fe-x-circle mr-2")(""),un("Something went wrong. Please try again.")]):Aa})(),r=function(h){return a(ke.create(h))},u=(function(){if(e.user instanceof T)return OOe("btn btn-primary px-4 t--register-one-click")(zr("Register for this livestream"))({onClick:lee(r)(hee.value)})("Register (one-click)");if(e.user instanceof G)return UOe("btn btn-primary px-4 t--register-new-tab")(zr("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 pee||n.stage instanceof mP)return u;if(n.stage instanceof mee)return pP("text-secondary")([IS("fe fe-refresh-cw mr-2")(""),un("Hold on tight...")]);if(n.stage instanceof dee)return pP("text-success")([IS("fe fe-check-circle mr-2")(""),un("You\u2019ve registered \u2013\xA0see you "+(xOe(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(h){return a(Hn.create(h))},s=kOe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(zr("Close"))({onClick:lee(l)(WOe.value)})(IS("fe fe-x")(""));return BOe({id:"livestream-event-cta-modal",body:Oe([cee("row justify-content-end mt-n3")(s),HOe("")("Join us for our upcoming livestream:"),JOe("mt-3")({id:pc})(n.cta.title),qOe("small")($Oe(n.cta.startTime)+(" "+Zp)),cee("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:HR.value})}}};var zOe=Js(),SS=Ne(Ce),VOe=V1(ie)()(),CS=Ne(tn),QOe=da(tn)()(),wee=Ia(ja),KOe=Ht(ie),YOe=de(en),XOe=xc()(),ZOe=_u(ie),e6e=$r(ie),n6e=ro(ie)()(),a6e=vn(rn),t6e=a6e(_a),r6e=at(He),o6e=On(He),u6e=Wf(Ao)(),i6e=oe(fn),bee=x(kn),l6e=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Eee=(function(){function e(){}return e.value=new e,e})(),Iee=function(e){return function(n){var a=(function(){var i=xo(e.cta.providers);return i===1?E0.value:i===2?E0.value:JR.value})(),t=function(i){return n(ke.create(i))},r=function(i){return n(Hn.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 zOe({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Oe([SS("row no-gutters g-0 mb-4")([SS("col text-center")([VOe("mb-2")({id:pc})("The admissions process is hard - advisors are here to help!"),un("Schedule a free consultation to get your questions answered")]),CS("col-auto text-right")(QOe("btn btn-link p-0 m-0 text-white")(zr("Close"))({onClick:wee(r)(Eee.value)})(KOe("fe fe-x")("")))]),SS("row text-center")(YOe(e.cta.providers)(function(i){return SS(u)([CS("row mb-3")(CS("col-auto mx-auto")(CS("avatar avatar-xl")(XOe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),ZOe("mb-2")(i.name),e6e("mb-3")(i.location),n6e("btn btn-primary btn-sm px-3 py-1")(cn)({target:"_blank",href:i.linkUrl,onClick:wee(t)(new l6e(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},Tee=function(e){return function(n){return t6e(r6e(o6e(function(){return u6e("Livestream: CTA Popup Link Clicked")({livestream_cta_id:i6e(e.cta.id),livestream_cta_url:n.value0})(),new Hn(Eee.value)})))(function(){return bee(e)})}},See=function(e){return function(n){return e.cta.id===n.id}},Cee=function(e){return bee({cta:e})};var s6e=ro(ie)()(),Fee=Ia(ja),v6e=da(tn)()(),f6e=Ht(ie),_6e=Js(),Gee=Ne(tn),p6e=Dv(ie)()(),m6e=vn(rn),d6e=m6e(_a),h6e=at(He),g6e=On(He),D6e=Wf(Ao)(),R6e=oe(fn),Mee=x(kn),y6e=(function(){function e(){}return e.value=new e,e})(),Aee=(function(){function e(){}return e.value=new e,e})(),Lee=function(e){return function(n){var a=function(i){return n(ke.create(i))},t=s6e("btn btn-primary px-4 t--register-new-tab")(cn)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:Fee(a)(y6e.value)})(e.cta.buttonText),r=function(i){return n(Hn.create(i))},u=v6e("btn btn-sm btn-outline-primary d-flex py-1 px-2")(zr("Close"))({onClick:Fee(r)(Aee.value)})(f6e("fe fe-x")(""));return _6e({id:"general-cta-modal",body:Oe([Gee("row justify-content-end mt-n3")(u),p6e("mt-3")({id:pc})(e.cta.title),Gee("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:HR.value})}},Nee=function(e){return function(n){return d6e(h6e(g6e(function(){return D6e("Livestream: CTA Popup Link Clicked")({livestream_cta_id:R6e(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new Hn(Aee.value)})))(function(){return Mee(e)})}},Pee=function(e){return function(n){return e.cta.id===n.id}},Oee=function(e){return Mee({cta:e})};var gP=vn(rn),Bl=gP(nn),Hl=Xo(gu),sg=x(Ua),Uee=Xr(vu(kt)),Hy=Oa(hu),Zf=x(kn),b6e=gP(_a),E6e=at(He),I6e=gP(La),T6e=x(ya),dP=Ne(Ce),S6e=Q_(ie),C6e=fu()(),F6e=Ia(Gl),G6e=da(tn)()(),kee=Ia(ja),M6e=Ht(ie),A6e=Js(),hP=Ne(tn),L6e=Dv(ie)()(),N6e=$r(ie),P6e=da(ie)()(),Bee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Hee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Wee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$ee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),xee=(function(){function e(){}return e.value=new e,e})(),jee=(function(){function e(){}return e.value=new e,e})(),zee=function(e){return function(n){return e.cta.id===n.id}},Vee=function(e){return function(n){var a=Bl(Hl(n.cta.requireReferredUserLastName))(function(){return Bl(Hl(n.referredUserLastName===""))(function(){return sg("Please enter the other person\u2019s last name")})}),t=Bl(Hl(n.cta.requireReferredUserFirstName))(function(){return Bl(Hl(n.referredUserFirstName===""))(function(){return sg("Please enter the other person\u2019s first name")})}),r=Bl(Hl(Uee(My)(n.referredUserEmail)))(function(){return sg("Please enter a valid email address")}),u=Bl(Hl(Dr(e.user)))(function(){return Bl(Hl(n.cta.requireAnonymousUserLastName))(function(){return Bl(Hl(n.anonymousUserLastName===""))(function(){return sg("Please enter your last name")})})}),i=Bl(Hl(Dr(e.user)))(function(){return Bl(Hl(n.cta.requireAnonymousUserFirstName))(function(){return Bl(Hl(n.anonymousUserFirstName===""))(function(){return sg("Please enter your first name")})})}),l=Bl(Hl(Dr(e.user)))(function(){return Bl(Hl(n.cta.requireAnonymousUserEmail))(function(){return Bl(Hl(Uee(My)(n.anonymousUserEmail)))(function(){return sg("Please enter a valid email address")})})});return Hy(i)(Hy(u)(Hy(l)(Hy(t)(Hy(a)(r)))))}},Qee=function(e){return function(n){return function(a){if(a instanceof Bee)return Zf({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 Hee)return Zf({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 Jee)return Zf({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 qee)return Zf({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 Wee)return Zf({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 $ee)return Zf({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 xee){var t=Dr(Vee(e)(n));return t?b6e(E6e(I6e(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 T6e(new Hn(jee.value))})))(function(){return Zf(n)}):Zf({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])}}},Kee=function(e){return function(n){return function(a){var t=Vee(e)(n),r=function(E){return function(w){return function(I){return function(L){return function(U){return dP(E)([S6e("mb-2")(I),C6e("form-control "+w)({type:"text",value:L,onChange:F6e(a)(function(Q){return ke.create(U(Vf(Q)))})})])}}}}},u=Ka(Dr(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(Jee.create)),i=Ka(Dr(e.user))(Oe([Ka(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(Bee.create)),Ka(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(Hee.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)($ee.create),s=Oe([Ka(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(qee.create)),Ka(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(Wee.create))]),h=function(E){return a(ke.create(E))},p=function(E){return a(Hn.create(E))},R=G6e("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(zr("Close"))({onClick:kee(p)(jee.value)})(M6e("fe fe-x")(""));return A6e({id:"referral-cta-modal",body:Oe([hP("row justify-content-end mt-n3")(R),L6e("mt-3")({id:pc})(n.cta.title),za(n.cta.description)(N6e("")),dP("row")([i,u,s,l]),dP("row")([hP("col-auto my-auto")(P6e("btn btn-primary t--save")(cn)({onClick:kee(h)(xee.value)})("Save")),hP("col my-auto text-danger")(Ka(n.validationActive)(za(t)(un)))])]),bodyClass:"t--cta-active",size:E0.value})}}},Yee=function(e){return Zf({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var U6e=at(He),k6e=x(ya),N0=Wt(Po(lt)),FS=vn(rn)(_a),Jy=x(kn),qy=(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})(),$y=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),xy=(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})(),AS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),LS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),B6e=(function(){function e(){}return e.value=new e,e})(),Xee=function(e){return function(n){return function(a){var t=function(r){return a(ke.create(r))};if(n instanceof qy)return yee(e)(n.value0)(function(r){return t(GS.create(r))});if(n instanceof Wy)return Iee(n.value0)(function(r){return t(MS.create(r))});if(n instanceof $y)return Lee(n.value0)(function(r){return t(AS.create(r))});if(n instanceof xy)return Kee(e)(n.value0)(function(r){return t(LS.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},Zee=function(e){return function(n){return function(a){var t=U6e(k6e(new Hn(B6e.value)));if(n instanceof qy&&a instanceof GS){if(a.value0 instanceof ke)return N0(function(r){return ke.create(GS.create(r))})(qy.create)(gee(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Hn)return FS(t)(function(){return Jy(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 Wy&&a instanceof MS){if(a.value0 instanceof ke)return N0(function(r){return ke.create(MS.create(r))})(Wy.create)(Tee(n.value0)(a.value0.value0));if(a.value0 instanceof Hn)return FS(t)(function(){return Jy(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 $y&&a instanceof AS){if(a.value0 instanceof ke)return N0(function(r){return ke.create(AS.create(r))})($y.create)(Nee(n.value0)(a.value0.value0));if(a.value0 instanceof Hn)return FS(t)(function(){return Jy(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 xy&&a instanceof LS){if(a.value0 instanceof ke)return N0(function(r){return ke.create(LS.create(r))})(xy.create)(Qee(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Hn)return FS(t)(function(){return Jy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return Jy(n)}}},ene=function(e){return function(n){return e instanceof qy&&n instanceof Xc?Dee(e.value0)(n.value0):e instanceof $y&&n instanceof Zc?Pee(e.value0)(n.value0):e instanceof Wy&&n instanceof es?See(e.value0)(n.value0):e instanceof xy&&n instanceof ns?zee(e.value0)(n.value0):!1}},nne=function(e){if(e instanceof Xc)return N0(function(n){return ke.create(GS.create(n))})(qy.create)(Ree(e.value0));if(e instanceof es)return N0(function(n){return ke.create(MS.create(n))})(Wy.create)(Cee(e.value0));if(e instanceof Zc)return N0(function(n){return ke.create(AS.create(n))})($y.create)(Oee(e.value0));if(e instanceof ns)return N0(function(n){return ke.create(LS.create(n))})(xy.create)(Yee(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var ane=xr(ie),NS=Ne(Ce),J6e=Ou(ie),q6e=Dv(ie)()(),one=Rs(y_),W6e=Q_(Ce),$6e=fu()(),yP=wi(Ve)(jt),DP=Ia(ja),tne=da(ie)()(),x6e=Eh(tn),j6e=On(He),z6e=qf(Ao),V6e=bl(),Q6e=oe(fn),Nm=x(kn),K6e=I_(jt),Pm=vn(rn)(_a),Y6e=Cr(nu),RP=x(ya),X6e=Xu(ya)(Ve),Z6e=Vr(ya),rne=at(He),eUe=Wt(Po(lt)),vg=(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(){}return e.value=new e,e})(),une=(function(){function e(){}return e.value=new e,e})(),EP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ine=function(e){return function(n){return function(a){var t=Oe([ane("text-center")("The host just asked a poll question!"),ane("text-center")("To participate in live polls, please introduce yourself:"),ng({cancelButton:new T({text:"Not now",click:a(new vg({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(EP.create(i))}),NS("small mt-3")([rg(e),NS("mt-2")([un("After submitting, you\u2019ll be able to answer all "),J6e("")("future"),un(" poll questions in this stream!")])])]),r=Oe([q6e("font-weight-bold fw-bold")({id:pc})(n.poll.question),NS("d-flex flex-column ml-4")(one(function(i){return function(l){return W6e("form-check-label mb-2")([$6e("form-check-input mt-2 t--option")({checked:yP(i)(n.selected),onChange:DP(a)(new wP(i)),type:(function(){return n.poll.multiSelect?"checkbox":"radio"})()}),un(l)])}})(n.poll.options)),NS("d-flex justify-content-start mt-6")([tne("btn btn-primary px-4 mr-3 t--submit")(cn)({onClick:DP(a)(bP.value),disabled:Rl(n.selected)})("Submit answer"),tne("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(cn)({onClick:DP(a)(une.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])})())}}},lne=function(e){return function(n){return function(a){var t=function(r){return j6e(z6e("Livestream: Poll Response")(Df(d0(e.conference))(V6e({livestream_poll_id:Q6e(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 vg)return Nm(n);if(a instanceof wP&&n.poll.multiSelect)return Nm({poll:n.poll,registration:n.registration,selected:(function(){var r=yP(a.value0)(n.selected);return r?K6e(a.value0)(n.selected):yu(a.value0)(n.selected)})()});if(a instanceof wP)return Nm({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof bP&&Rl(n.selected))return Nm(n);if(a instanceof bP)return Pm(Pt(Y6e($2(n.poll)(n.selected))(function(r){return lc(Kc)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return RP(void 0)})})))(function(){return Pm(Pt(X6e(one(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return Z6e(yP(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return Pm(rne(RP(new vg({keepShowingPolls:!0}))))(function(){return Nm(n)})})});if(a instanceof une)return Pm(Pt($2(n.poll)([])))(function(){return Pm(Pt(t({skipped:!0,option:""})))(function(){return Pm(rne(RP(new vg({keepShowingPolls:!0}))))(function(){return Nm(n)})})});if(a instanceof EP)return eUe(EP.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(ag(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])}}},cne=function(e){return Pm(Pt(Xq(e)))(function(){return Nm({poll:e,selected:[],registration:tg})})};var dne=vn(rn),aUe=dne(La),tUe=ae(La),sne=On(He),rUe=Xu(ya)(gl),oUe=qf(Ao),vne=bl(),uUe=oe(ld),iUe=oe(Bs),PS=oe(fn),ss=x(kn),hne=Po(lt),fne=Wt(hne),_ne=ae(_a),pne=Nr(hne),O0=dne(_a),lUe=Ee(jt),P0=x(Ua),jy=Xd(He),zy=B(ue),cUe=B(_l),Vy=cf(Ve),CP=dt(),mne=mc(CP(W({reflectSymbol:function(){return"poll_id"}})(dn)(pn)))(He),sUe=Gi(He),vUe=Ee(Qr(bR)),fUe=mc(CP(W({reflectSymbol:function(){return"conference_id"}})(dn)(pn)))(He),IP=Ee(Qr(jt)),TP=mc(CP(W({reflectSymbol:function(){return"id"}})(dn)(pn)))(He),Qy=(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})(),Ky=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_g=(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})(),SP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),pg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gne=function(e){return function(n){return function(a){if(n.stage instanceof Qy)return Aa;if(n.stage instanceof fg)return ine(e)(n.stage.value0)(function(t){return a(_g.create(t))});if(n.stage instanceof Ky)return Xee(e)(n.stage.value0)(function(t){return a(OS.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},_Ue=function(e){return function(n){return e instanceof Ky?ene(e.value0)(n):!1}},pUe=function(){return function(e){return function(n){return function(a){return aUe(Wr(100))(function(){return tUe(sne(LE(pc)))(function(t){return rUe(t)(function(r){return sne(function(){var i=OL(SA(r))(),l=vB({x:i.left+1,y:i.top+1})(),s=NL(SA(l))();return oUe(n)(Df(vne(a))(Df(d0(e.conference))(vne({livestream_popup_visible:uUe(s===pc)}))))()})})})})}}}},Dne=pUe(),mUe=function(e){var n=function(){return Dne(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof Xc)return a({livestream_cta_target_conference_id:iUe(t.value0.conferenceId)});if(t instanceof es)return a({livestream_cta_id:PS(t.value0.id)});if(t instanceof Zc)return a({livestream_cta_id:PS(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof ns)return a({livestream_cta_id:PS(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])}},Rne=function(e){return function(n){return function(a){if(a instanceof _g&&a.value0 instanceof vg)return ss({stage:Qy.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof _g)return ss(n);if(a instanceof OS){if(a.value0 instanceof Hn)return ss({showPolls:n.showPolls,stage:Qy.value});var u=function(s){return ss(n)};return a.value0 instanceof ke&&n.stage instanceof Ky?fne(OS.create)(function(s){return{showPolls:n.showPolls,stage:new Ky(s)}})(Zee(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof US&&n.showPolls)return _ne(pne(_g.create)(cne(a.value0)))(function(p){return O0(Pt(Dne(e)("Livestream: Poll Popup Shown")({livestream_poll_id:PS(a.value0.id)})))(function(){return ss({showPolls:n.showPolls,stage:new fg(p)})})});if(a instanceof US)return ss(n);var s=function(p){if(a instanceof SP||a instanceof pg&&_Ue(n.stage)(a.value0))return ss(n);if(a instanceof pg)return O0(Pt(mUe(e)(a.value0)))(function(){return _ne(pne(OS.create)(nne(a.value0)))(function(R){return ss({showPolls:n.showPolls,stage:new Ky(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 SP){if(n.stage instanceof fg){var h=n.stage.value0.poll.id===a.value0.pollId;return h?ss({showPolls:n.showPolls,stage:Qy.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof US){if(n.stage instanceof fg){var i=n.stage.value0.poll.id===a.value0.id;return i?ss(n):u(!0)}return u(!0)}return u(!0)};return a instanceof _g&&n.stage instanceof fg?fne(_g.create)(function(r){return{showPolls:n.showPolls,stage:new fg(r)}})(lne(e)(n.stage.value0)(a.value0)):t(!0)}}},yne=function(e){var n=function(u){return u instanceof ns?P0(u.value0.id):G.value},a=function(u){return u instanceof es?P0(u.value0.id):G.value},t=function(u){return u instanceof Zc?P0(u.value0.id):G.value},r=function(u){return u instanceof Xc?P0(u.value0.conferenceId):G.value};return O0(jy(function(u){return zy(cUe(US.create)(function(i){return i.poll}))(Vy((function(){var i=lUe(u.poll_id);return function(l){return i((function(s){return s.poll.id})(l))}})())(e.conference.polls))})(mne(e.pusher.dataChannel)("show-poll")))(function(){return O0(sUe(function(u){return new SP({pollId:u.poll_id})})(mne(e.pusher.dataChannel)("hide-poll")))(function(){return O0(jy(function(u){return zy(pg.create)(Vy((function(){var i=vUe(P0(u.conference_id));return function(l){return i(r(l))}})())(e.ctas))})(fUe(e.pusher.dataChannel)("show-event-cta")))(function(){return O0(jy(function(u){return zy(pg.create)(Vy((function(){var i=IP(P0(u.id));return function(l){return i(t(l))}})())(e.ctas))})(TP(e.pusher.dataChannel)("show-general-cta")))(function(){return O0(jy(function(u){return zy(pg.create)(Vy((function(){var i=IP(P0(u.id));return function(l){return i(a(l))}})())(e.ctas))})(TP(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return O0(jy(function(u){return zy(pg.create)(Vy((function(){var i=IP(P0(u.id));return function(l){return i(n(l))}})())(e.ctas))})(TP(e.pusher.dataChannel)("show-referral-cta")))(function(){return ss({stage:Qy.value,showPolls:!0})})})})})})})};var hUe=qs(),FP=Ne(Ce),gUe=xr(tn),DUe=Ft(Ce),RUe=Ht(ie),wne=Pl(),bne=xr(ie),yUe=$r(ie),kS=da(ie)()(),wUe=vn(rn),GP=Ia(ja),Ene=wUe(_a),bUe=JK(),MP=x(kn),Ine=ae(nn),EUe=f_(_6),IUe=Fl(WG),TUe=Ee(UE),SUe=Ee(Ks),CUe=Fs()(),Tne=(function(){function e(){}return e.value=new e,e})(),LP=(function(){function e(){}return e.value=new e,e})(),Sne=(function(){function e(){}return e.value=new e,e})(),NP=(function(){function e(){}return e.value=new e,e})(),AP=(function(){function e(){}return e.value=new e,e})(),BS=function(e){return function(n){return hUe({id:"network-settings-modal",onDismiss:n(new Hn(AP.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:(function(){if(e.modalView instanceof Tne)return FP("text-center")([Ka(e.confirmConferenceRegistration)(gUe("mb-4")(DUe("badge badge-soft-primary bg-primary-soft")([RUe("fe fe-check mr-1")(""),un("You\u2019re registered!")]))),wne("my-4")({alt:Nl.value,height:"76",src:"/img/network/counselor.svg",width:"91"}),bne("")("Connect with colleges when you attend or register for their livestreams?"),yUe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),FP("mx-md-6 mt-4")([kS("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(cn)({onClick:So(function(a){return function(){return n(new ke(Sne.value))(),n(new ke(NP.value))()}})})("Yes, always connect"),kS("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(cn)({onClick:GP(n)(new ke(NP.value))})("Only connect with "+e.school.name),kS("btn btn-link mt-3")(cn)({onClick:GP(n)(new Hn(AP.value))})("Close")])]);if(e.modalView instanceof LP)return FP("text-center")([wne("mt-4")({alt:Nl.value,height:"42",src:"/img/livestreams/network-settings-modal/connection-sent.png",width:"42"}),bne("")("Connection request sent!"),kS("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(cn)({onClick:GP(n)(new Hn(AP.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 75, column 13 - line 120, column 12): "+[e.modalView.constructor.name])})()})}},HS=function(e){return function(n){if(n instanceof ke){if(n.value0 instanceof Sne)return Ene(Pt(bUe({publishScope:_c.value,publishContext:iN.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return MP({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:LP.value})});if(n.value0 instanceof NP)return Ene(Pt(ix(e.school.id)(e.conference.id)))(function(){return MP({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:LP.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 52, column 31 - line 64, column 44): "+[n.value0.constructor.name])}if(n instanceof Hn)return MP(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 1 - line 51, column 55): "+[e.constructor.name,n.constructor.name])}},JS=function(e){return function(n){var a=We(!1)(Ine(e.dismissedNetworkSettingsModalAt)(function(r){return new T(EUe(IUe(NE(void 0))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,TUe(r.publishScope)(_c.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return We(!1)(Ine(e.profile)(function(r){return new T(yG(SUe(!0))(t(r)))}))}},qS=function(e){return CUe(e)({modalView:Tne.value})};var Yy=(function(){function e(){}return e.value=new e,e})(),mg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Xy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),WS=(function(){function e(){}return e.value=new e,e})();var Gne=vn(rn),Fne=Gne(_a),PP=at(He),GUe=Gne(La),OP=x(ya),$S=x(kn),Mne=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof Yy&&t instanceof Xy?Fne(PP(GUe(Wr(a.delay))(function(){return OP(e(WS.value))})))(function(){return $S(n({delay:a.delay,throttleState:new mg(t.value0)}))}):a.throttleState instanceof mg&&t instanceof Xy?$S(n({delay:a.delay,throttleState:new mg(t.value0)})):a.throttleState instanceof mg&&t instanceof WS?Fne(PP(OP(a.throttleState.value0)))(function(){return $S(n({delay:a.delay,throttleState:Yy.value}))}):$S(n(a))}}}},Ane=function(e){return function(n){return PP(OP(e(new Xy(n))))}},Lne=function(e){return{throttleState:Yy.value,delay:e}};var xS=Ne(ie),jS=Ne(Ce),AUe=xr(ie),e_=oe(fn),LUe=jo(uo),Nne=Ne(tn),NUe=jr(ie)()(),PUe=Ou(ie),OUe=Ft(ie),UUe=Ff(tn),kUe=W1(Ce)()(),Pne=Rv(Ga),zS=da(ie)()(),UP=Ia(ja),Hne=wi(Ve)(jt),One=Ff(Ce),VS=Ms(ie),BUe=Ms(tn),HUe=Ms(Ce),JUe=V_(Ce),qUe=x_(Ce),dg=j_(ie),WUe=z_(Ce),QS=de(en),$Ue=Zu(Ga),Zy=vn(rn)(_a),JP=at(He),xUe=Cr(nu),Jne=x(ya),U0=x(kn),kP=B(lt),jUe=Ee($B),Une=Mi(Ga)(Ve),zUe=on(Er),VUe=iD(Ga),QUe=I_(jt),KUe=Gi(He),YUe=wI(He),KS=(function(){function e(){}return e.value=new e,e})(),qne=(function(){function e(){}return e.value=new e,e})(),Wne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$ne=(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})(),kne=(function(){function e(){}return e.value=new e,e})(),xne=(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})(),qP=(function(){function e(){}return e.value=new e,e})(),Bne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zne=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return Aa;var t=(function(){if(n.stage instanceof KS)return Aa;if(n.stage instanceof qne)return xS("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=jS("d-flex flex-nowrap align-items-baseline")([AUe("")("Polls"),xS("text-muted ml-3 small")("Polls will be shown to viewers "+(e_(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(h){return function(p){var R=function(E){return function(w){var I=(function(){if(h===0)return"0%";if(xe)return e_(LUe(100*w|0)(h))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): ")})();return jS("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([xS("col-7 d-flex justify-content-end")(E),Nne("col-4")(Nne("progress")(NUe("progress-bar")({style:Vt({width:I})})(""))),jS("col-1")([PUe("")(e_(w)),OUe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return UUe("t--poll-responses-"+e_(s.id))(kUe("py-0")({colSpan:6})(Ab(R)(s.options)(p.optionCounts)))}}},i=function(s){var h=We(s.status)(Pne(s.poll.id)(n.statuses)),p=zS("btn btn-white btn-sm px-4 t--open")(cn)({onClick:UP(a)(new Wne(s.poll))})("Launch poll");if(h instanceof Uf)return p;if(h instanceof Gv)return Oe([zS("btn btn-success btn-sm px-4 mr-3")(cn)({disabled:!0})("Poll LIVE"),zS("btn btn-danger btn-sm px-4 t--close")(cn)({onClick:UP(a)(new $ne(s.poll))})("Close poll")]);if(h instanceof kf)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[h.constructor.name])},l=function(s){var h=Hne(s.poll.id)(n.expandedResponses),p=Pne(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([One("t--poll t--poll-"+e_(s.poll.id))([VS("pt-3")((function(){var I=Tr(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""})()+s.poll.question),BUe("text-nowrap")(i(s)),VS("t--shown")(e_(E)),HUe("t--answers")([un(e_(R)),zS("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+(function(){return h?"up":"down t--expand-responses"})()))(zr((function(){return h?"Collapse responses":"Expand responses"})()))({onClick:UP(a)(new xne(s.poll.id))})("")]),VS("t--skipped")(e_(w)),VS("t--pending")(e_((E-R|0)-w|0))]),Ka(h)(za(p)(u(s.poll)(R)))])};return Oe([r,jS("t--polls position-relative")([za(n.error)(function(s){return xS("alert alert-danger")(s)}),JUe("table table-sm mb-0")([qUe("")([One("")([dg("")("Question"),dg("")("Actions"),dg("")("# saw poll"),dg("")("# answered"),dg("")("# skipped"),dg("")("# not responded")])]),WUe("")(QS($Ue(function(s){return-(function(h){return h.poll.id})(s)|0})(e.conference.polls))(l))]),t])])}}},Vne=function(e){return function(n){var a=function(t){return Zy(JP(xUe(t)(function(r){return Jne(kne.value)})))(function(){return U0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:qne.value,error:G.value})})};return function(t){if(t instanceof Wne)return a(kP(BP.create)(W2(t.value0)(Gv.value)));if(t instanceof $ne)return a(kP(BP.create)(W2(t.value0)(kf.value)));if(t instanceof BP){var r=QS(Lu((function(){var u=jUe(Gv.value);return function(i){return u((function(l){return l.status})(i))}})())(t.value0))(function(u){return u.pollId});return U0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:Une(QS(t.value0)(function(u){return new Rn(u.pollId,u.status)})),expandedResponses:zUe(n.expandedResponses)(VUe(r)),stage:KS.value})}if(t instanceof kne)return U0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:KS.value,error:new T("That didn't work for some reason, try again")});if(t instanceof xne)return U0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:(function(){var u=Hne(t.value0)(n.expandedResponses);return u?QUe(t.value0)(n.expandedResponses):yu(t.value0)(n.expandedResponses)})()});if(t instanceof jne)return Zy(Ane(HP.create)(qP.value))(function(){return U0(n)});if(t instanceof qP)return Zy(JP(kP(Bne.create)(lW(e.conference.id))))(function(){return U0(n)});if(t instanceof Bne)return U0({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:Une(QS(t.value0)(function(u){return new Rn(u.pollId,u.responses)}))});if(t instanceof HP)return Mne(HP.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])}}},Qne=function(e){return Zy(KUe(Dn(jne.value))(YUe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return Zy(JP(Jne(qP.value)))(function(){return U0({statuses:ic,responses:ic,expandedResponses:[],responseThrottle:Lne(500),stage:KS.value,error:G.value})})})};var Kne=Pl(),Yne=Ne(Ce),Xne=xr(ie),Zne=_u(ie),eae=(function(){return Kne("img-fluid mb-6")({alt:new OR("CollegeVine"),src:"/img/cv-logo-lilac-on-dark.svg",style:Vt({width:"5em"})})})(),YS=function(e){return Yne(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},ew=function(e){return YS("")([Xne("text-center")(e)])},WP=YS("t--splashscreen-intro")([Ne(tn)("text-center mt-7")(Zne("")("The recording will load in a moment.")),eae]),XS=(function(){return YS("px-4 px-md-6 t--splashscreen-intro")([Kne("img-fluid")({alt:Nl.value,src:"/img/illustrations/livestreams/2022-02-intro.svg"})])})(),nae=YS("t--splashscreen-complete")([Yne("text-center mt-7")([Zne("")("The event is now over."),Xne("")("Thank you for attending!"),jc(ie)("")("A recording will be available to watch shortly.")]),eae]);var ZS=e=>e.play();var k0=fl(tae(),1);Ct();var rae=e=>{let[n,a]=ct.useState(),[t,r]=ct.useState(),u=ct.useRef();return u.current=e,Gr(()=>{if(!t)return k0.default.isSupported()?a(e5e(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},e5e=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new k0.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(k0.default.Events.ERROR,function(r,u){a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal&&(u.type===k0.default.ErrorTypes.MEDIA_ERROR?hls.recoverMediaError():(hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type)))}),hls.on(k0.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(k0.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(k0.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 a5e=hv();var oae=function(){return function(){return a5e(rae)}};Ct();var $s={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var rw=fl(fae(),1),_ae=4,N5e=({trackColor:e,background:n})=>({props:a,children:t})=>ct.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${_ae}px`,borderRadius:`${_ae*2}px`,background:n||e})}),...t),P5e=({horizontal:e})=>({props:n,isDragged:a})=>ct.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),ct.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?$s.SECONDARY:$s.WHITE,stroke:$s.SECONDARY}),ct.createElement("path",{stroke:a?$s.WHITE:$s.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),ct.createElement("path",{stroke:a?$s.WHITE:$s.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),pae=e=>ct.createElement("div",{"aria-label":e.ariaLabel},ct.createElement(rw.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:N5e({trackColor:e.trackColor||$s.GRAY_300,background:e.fillBefore?(0,rw.getTrackBackground)({values:[e.value],colors:[$s.PRIMARY,$s.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:P5e({horizontal:!0})}));var U5e=hv(),mae={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return Sd}};var dae=function(e){return function(){return function(){return U5e(pae)}}};var B5e=jr(tn)()(),H5e=dae(mae)()(),J5e=Ia(Gl),q5e=da(tn)()(),W5e=Ia(ja),hae=Ne(Ce),$5e=Ft(ie),tC=at(He),VP=x(ya),bae=vn(rn),x5e=Ut(Od),Wv=x(kn),j5e=W_(He),zP=On(He),z5e=B(ue),V5e=mv(Ld),Q5e=bae(La),B0=bae(_a),K5e=Vr(kn),Y5e=ae(La),X5e=ev(Cl),Z5e=Vr(Yt),QP=(function(){function e(){}return e.value=new e,e})(),KP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Dae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Rae=(function(){function e(){}return e.value=new e,e})(),e9e=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Eae=function(e){return function(n){if(e.videoState instanceof G)return Aa;if(e.videoState instanceof T){var a=B5e("")({style:Vt({minWidth:"6rem",width:"6rem"})})(H5e({value:(function(){return e.videoState.value0.muted?0:e.videoState.value0.volume})(),min:0,max:1,step:.05,onChange:J5e(n)(function(i){return ke.create(KP.create(i))}),ariaLabel:"Volume slider"})),t=(function(){if(e.videoState.value0.muted)return"fe-volume-x";if(xe)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): ")})(),r=q5e("btn large px-3 py-1 mr-3 text-white fe "+t)(zr("Mute the video"))({onClick:W5e(n)(new ke(QP.value))})(Aa),u=hae("d-flex align-items-center text-white px-3")([un("LIVE"),$5e("text-danger x-large ml-2 mt-n1")("\u25CF")]);return hae("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+(function(){return e.visible?"":"hidden"})())([Ka(e.config.liveIndicator)(u),Ka(e.config.mute)(r),Ka(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])}},Iae=function(e){return ke.create(XP.create(e))},yae=function(e){return tC(VP(new Hn(new e9e(function(n){return function(){return e(n)(),new ke(new XP(n))}}))))},rC=(function(){return new ke(new YP(!0))})(),Tae=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:x5e}},wae=2e3,Sae=function(e){return function(n){if(n instanceof Hn)return Wv(e);if(n instanceof ke){var a=j5e(zP(function(){var i=Ll();return z5e(function(l){return ke.create(Dae.create(l))})(V5e(wae)(i))})),t=Q5e(Wr(wae))(function(){return VP(new ke(Rae.value))}),r=function(u){if(n.value0 instanceof QP)return Wv(e);var i=function(l){if(n.value0 instanceof KP)return Wv(e);if(n.value0 instanceof XP)return B0(tC(zP(function(){var h=AA(n.value0.value0)(),p=GA(n.value0.value0)();return new ke(new gae({muted:h,volume:p}))})))(function(){return Wv(e)});if(n.value0 instanceof gae)return Wv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof YP)return B0(K5e(n.value0.value0)(a))(function(){return B0(tC(t))(function(){return Wv({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof Dae)return Wv({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof Rae)return B0(tC(Y5e(zP(Ll))(function(s){var h=X5e(s)(e.visibilityExpiration);return h?VP(new ke(new YP(!1))):t})))(function(){return Wv(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 KP&&e.videoState instanceof T?B0(a)(function(){return B0(yae(function(l){return function(){return Z5e(n.value0.value0>0)(Xp(!1)(l))(),MA(n.value0.value0)(l)()}}))(function(){return Wv({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 QP&&e.videoState instanceof T?B0(a)(function(){return B0(yae(Xp(!e.videoState.value0.muted)))(function(){return Wv({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])}},Cae=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 Fae=e=>n=>a=>()=>e.then(a,n),Gae=e=>e instanceof Error,Mae=e=>e===null?"null":typeof e>"u"?"undefined":e.toString();var t9e=x(Nc(Kr)),r9e=Td(Kr),o9e=wn(Tn),Aae=Oa(zb(Yb)(Kr)),u9e=hf(Kr),i9e=B(_D(tv)),l9e=bD(Kr),c9e=rb(ia),s9e=Gt(Y6);var v9e=function(e){var n=function(a){if(Gae(a))return t9e(a);if(xe)return r9e(new wD(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return Sr(function(a){return $i("Promise failed: "+Mae(e))})(o9e)(ph(Aae(n(e))(Aae(u9e("Error")(e))(i9e($i)(l9e(e))))))},oC=function(e){return U_(function(n){return c9e(s9e)(Fae(e)(function(a){return n(Ae.create(v9e(a)))()})(function(a){return n(Le.create(a))()}))})};var _9e=ae(nn),p9e=Ne(tn),ow=ae(io),ZP=lf(Yt)(gl),Um=Ia(ja),Lae=zd(ie)()(),m9e=oae()(),d9e=x(Yt),Nae=Ia(Gl),Pae=jr(tn)()(),h9e=da(Ce)()(),g9e=Ht(ie),D9e=Ne(Ce),Jae=vn(rn),R9e=Wf(He)(),y9e=qi(Ve)(kt),w9e=Ee(Qr(jt)),hg=Jae(La),b9e=Vs(ya),E9e=Eo(Jd),Fu=x(ya),qae=On(He),Oae=Cr(nu),Wae=Og(La),mu=x(kn),Cu=Jae(_a),ll=at(He),Uae=B(lt),kae=W_(He),$ae=B(ia),I9e=Wt(Po(lt)),T9e=B(ue),S9e=de(ue),Bae=on(v6),xae=(function(){function e(){}return e.value=new e,e})(),jae=(function(){function e(){}return e.value=new e,e})(),iw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zae=(function(){function e(){}return e.value=new e,e})(),gg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Vae=(function(){function e(){}return e.value=new e,e})(),Qae=(function(){function e(){}return e.value=new e,e})(),Hae=(function(){function e(){}return e.value=new e,e})(),e4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),n4=(function(){function e(){}return e.value=new e,e})(),iC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),lC=(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})(),Kae=(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})(),Yae=(function(){function e(){}return e.value=new e,e})(),Xae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),km=(function(){function e(){}return e.value=new e,e})(),$v=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cC=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),u4=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),uw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),i4=function(e){var n=e.Monad0(),a=ae(n.Bind1()),t=On(e),r=x(n.Applicative0());return function(u){return function(i){return function(l){return a(t(LE(u.videoId)))(function(s){return Wn(r(i.whenNotFound))(l)(_9e(s)(tB))})}}}},Zae=i4(Ao),r4=i4(He),ete=function(e){var n=i4(e);return function(a){return n(a)({whenNotFound:void 0})}},C9e=ete(Ao),F9e=ete(He),sC=function(e){return function(n){return function(a){var t=(function(){var I=p9e("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof zae)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof Vae)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof iw)return I(e.introScreen);if(n.stage instanceof gg)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 iw?n.stage.value0.reset:!1})(),u=So(function(I){return ow(AE(I))(ZP(function(L){return a(new ke(new u4({time:L})))}))}),i=So(function(I){return ow(AE(I))(ZP(function(L){return a(new ke(new cC({playing:!0,time:L})))}))}),l=function(I){return a(Hn.create(I))},s=So(function(I){return ow(AE(I))(ZP(function(L){return l(new a4(L))}))}),h=Um(l)(Kae.value),p=Oe([Lae("w-100 t--real-video")({id:n.videoId,controls:Dr(n.customControls),onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s})(""),Ka(!r)(m9e({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(Qae.value),onError:function(I,L){return void 0},onCriticalFail:Nae(l)(function(I){var L=I==="networkError";return L?n4.value:new iC("HLS player crashed")}),onReady:l(new lC({autoPlay:e.autoPlay})),onInitialPts:Nae(l)(function(I){return new Xae(I.initPTS)})}))]),R=(function(){return n.stage instanceof gg&&n.stage.value0.unmuteOverlay?Pae("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:Vt({pointerEvents:"none"})})(h9e("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(cn)({onClick:Um(l)(Yae.value),style:Vt({pointerEvents:"all"})})([un("click for sound"),g9e("fe fe-volume-2 ml-2")("")])):Aa})(),E=function(I){return Pae("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:Um(l)(new $v(rC)),onMouseDown:Um(l)(new $v(rC)),onTouchStart:Um(l)(new $v(rC))})(Eae(I)(function(L){return l($v.create(L))}))},w=Lae("w-100 t--real-video")({id:n.videoId,controls:Dr(n.customControls),playsInline:!0,onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:Um(l)(new lC({autoPlay:e.autoPlay})),onError:Um(l)(n4.value),src:(function(){return r?"":e.watchUrl})()})("");return D9e("position-relative w-100")([(function(){if(n.support instanceof xae)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])})(),za(n.customControls)(E),Ka(n.allowSound)(R),t])}}},G9e=function(e){var n=On(e.MonadEffect0());return function(a){return n(function(){return C9e(a)(Xp(!1))(),t4.value})}},M9e=G9e(gB),o4=function(e){return R9e("Livestream: Error")({livestream_error_message:e})},nte=function(e){return Zae(e)({whenNotFound:!1})(FA)},A9e=function(e){return On(e)(function(){var a=ow(ow(Ai)(UA))(OA)();return y9e(function(t){return w9e(eE(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},ate=A9e(He),L9e=function(e){var n=function(t){return hg(b9e(e.allowSound)(E9e($i("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return hg(oC(ZS(t)))(function(){return Fu(new uC({unmuteOverlay:!1}))})})},a=function(t){return hg(qae(Xp(!0)(t)))(function(){return hg(oC(ZS(t)))(function(){return Fu(new uC({unmuteOverlay:!0}))})})};return r4(e)({whenNotFound:new iC("