var Purs_EntryPoints_Livestream_Livestream=(()=>{var YZ=Object.create;var nR=Object.defineProperty;var XZ=Object.getOwnPropertyDescriptor;var ZZ=Object.getOwnPropertyNames;var eee=Object.getPrototypeOf,nee=Object.prototype.hasOwnProperty;var U2=e=>nR(e,"__esModule",{value:!0});var aee=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ge=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),k2=(e,n)=>{U2(e);for(var a in n)nR(e,a,{get:n[a],enumerable:!0})},tee=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of ZZ(n))!nee.call(e,t)&&t!=="default"&&nR(e,t,{get:()=>n[t],enumerable:!(a=XZ(n,t))||a.enumerable});return e},Wu=e=>tee(U2(nR(e!=null?YZ(eee(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var hy={};k2(hy,{Children:()=>m_,Component:()=>h_,Fragment:()=>wS,PureComponent:()=>fre,Suspense:()=>_re,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>cre,cloneElement:()=>Ym,createContext:()=>bS,createElement:()=>pt,createRef:()=>my,default:()=>Fa,forwardRef:()=>Si,isValidElement:()=>ES,lazy:()=>sre,memo:()=>vre,useCallback:()=>Xm,useContext:()=>pre,useEffect:()=>Ot,useImperativeHandle:()=>As,useLayoutEffect:()=>Zm,useMemo:()=>eh,useReducer:()=>dre,useRef:()=>st,useState:()=>ql,version:()=>mre});var Fa,cre,m_,Ym,h_,bS,pt,my,Si,wS,ES,sre,vre,fre,_re,Xm,pre,Ot,As,Zm,eh,dre,st,ql,mre,$a=aee(()=>{Fa=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:cre,Children:m_,cloneElement:Ym,Component:h_,createContext:bS,createElement:pt,createRef:my,forwardRef:Si,Fragment:wS,isValidElement:ES,lazy:sre,memo:vre,PureComponent:fre,Suspense:_re,useCallback:Xm,useContext:pre,useEffect:Ot,useImperativeHandle:As,useLayoutEffect:Zm,useMemo:eh,useReducer:dre,useRef:st,useState:ql,version:mre}=window.React});var TS=Ge((Knn,UN)=>{"use strict";var ON=Object.getOwnPropertySymbols,Are=Object.prototype.hasOwnProperty,Lre=Object.prototype.propertyIsEnumerable;function xre(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Pre(){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}}UN.exports=Pre()?Object.assign:function(e,n){for(var a,t=xre(e),r,u=1;u{"use strict";var SS=TS(),mp=60103,kN=60106;Rt.Fragment=60107;Rt.StrictMode=60108;Rt.Profiler=60114;var BN=60109,HN=60110,JN=60112;Rt.Suspense=60113;var qN=60115,WN=60116;typeof Symbol=="function"&&Symbol.for&&(vl=Symbol.for,mp=vl("react.element"),kN=vl("react.portal"),Rt.Fragment=vl("react.fragment"),Rt.StrictMode=vl("react.strict_mode"),Rt.Profiler=vl("react.profiler"),BN=vl("react.provider"),HN=vl("react.context"),JN=vl("react.forward_ref"),Rt.Suspense=vl("react.suspense"),qN=vl("react.memo"),WN=vl("react.lazy"));var vl,$N=typeof Symbol=="function"&&Symbol.iterator;function jre(e){return e===null||typeof e!="object"?null:(e=$N&&e[$N]||e["@@iterator"],typeof e=="function"?e:null)}function th(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";a3.exports=n3()});var T3=Ge(Dp=>{"use strict";var Wl=TS(),xs=t3();function yr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;auh;uh++)$o[uh]=uh+1;var $o,uh;$o[15]=0;var Jre=/^[: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]*$/,s3=Object.prototype.hasOwnProperty,v3={},f3={};function _3(e){return s3.call(f3,e)?!0:s3.call(v3,e)?!1:Jre.test(e)?f3[e]=!0:(v3[e]=!0,!1)}function qre(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 Wre(e,n,a,t){if(n===null||typeof n=="undefined"||qre(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 ju(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 zo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zo[e]=new ju(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];zo[n]=new ju(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zo[e]=new ju(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zo[e]=new ju(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){zo[e]=new ju(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zo[e]=new ju(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zo[e]=new ju(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zo[e]=new ju(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zo[e]=new ju(e,5,!1,e.toLowerCase(),null,!1,!1)});var BS=/[\-:]([a-z])/g;function HS(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(BS,HS);zo[n]=new ju(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(BS,HS);zo[n]=new ju(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(BS,HS);zo[n]=new ju(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!1,!1)});zo.xlinkHref=new ju("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!0,!0)});var $re=/["'&<>]/;function g_(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=$re.exec(e);if(n){var a="",t,r=0;for(t=n.index;tTy))throw Error(yr(301));if(e===Ac)if(Iy=!0,e={action:a,next:null},Bv===null&&(Bv=new Map),a=Bv.get(n),a===void 0)Bv.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function qS(){}var y_=null,Yre={readContext:function(e){var n=y_.threadID;return oh(e,n),e[n]},useContext:function(e){R_();var n=y_.threadID;return oh(e,n),e[n]},useMemo:g3,useReducer:D3,useRef:function(e){Ac=R_(),ir=JS();var n=ir.memoizedState;return n===null?(e={current:e},ir.memoizedState=e):n},useState:function(e){return D3(h3,e)},useLayoutEffect:function(){},useCallback:function(e,n){return g3(function(){return e},n)},useImperativeHandle:qS,useEffect:qS,useDebugValue:qS,useDeferredValue:function(e){return R_(),e},useTransition:function(){return R_(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(y_.identifierPrefix||"")+"R:"+(y_.uniqueID++).toString(36)},useMutableSource:function(e,n){return R_(),n(e._source)}},R3={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function y3(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 b3={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},Xre=Wl({menuitem:!0},b3),lh={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},Zre=["Webkit","ms","Moz","O"];Object.keys(lh).forEach(function(e){Zre.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),lh[n]=lh[e]})});var eoe=/([A-Z])/g,noe=/^ms-/,Hv=xs.Children.toArray,WS=Bre.ReactCurrentDispatcher,aoe={listing:!0,pre:!0,textarea:!0},toe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,w3={},$S={};function roe(e){if(e==null)return e;var n="";return xs.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var ooe=Object.prototype.hasOwnProperty,uoe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function E3(e,n){if(e===void 0)throw Error(yr(152,rh(n)||"Component"))}function ioe(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,m=Hre(l,n,a,s),p=[],g=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(ne,ue){g=!0,p=[ue]},enqueueSetState:function(ne,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,m,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=Wl({},s.state,b))}}else if(Ac={},s=l(i.props,m,E),s=d3(l,i.props,s,m),s==null||s.render==null){e=s,E3(e,l);return}if(s.props=i.props,s.context=m,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=g;if(p=null,g=!1,I&&E.length===1)s.state=E[0];else{b=I?E[0]:s.state;var L=!0;for(I=I?1:0;I=l))throw Error(yr(304));var s=new Uint16Array(l);for(s.set(i),$o=s,$o[0]=u+1,i=u;i=s.children.length){var m=s.footer;if(m!==""&&(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===by)this.popProvider(s.type);else if(s.type===wy){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var g=s.fallbackFrame;if(!g)throw Error(yr(303));this.stack.push(g),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=m}else{var E=s.children[s.childIndex++],b="";try{b+=this.render(E,s.context,s.domNamespace)}catch(I){throw I!=null&&typeof I.then=="function"?Error(yr(294)):I}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{WS.current=r,y_=t,m3()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?g_(r):this.previousWasTextNode?""+g_(r):(this.previousWasTextNode=!0,g_(r));if(t=ioe(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!xs.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===LS?yr(257):yr(258,r.toString()));return a=Hv(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 l3:case i3:case xS:case PS:case OS:case yy:return a=Hv(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case wy:throw Error(yr(294));case u3:throw Error(yr(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case NS:Ac={};var i=u.render(a.props,a.ref);return i=d3(u.render,a.props,i,a.ref),i=Hv(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case US:return a=[xs.createElement(u.type,Wl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case by:return u=Hv(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case jS:u=a.type,i=a.props;var l=this.threadID;return oh(u,l),u=Hv(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case o3:throw Error(yr(338));case kS:return u=a.type,i=u._init,u=i(u._payload),a=[xs.createElement(u,Wl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(yr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===R3.html&&y3(u),!w3.hasOwnProperty(u)){if(!toe.test(u))throw Error(yr(65,u));w3[u]=!0}var i=a.props;if(u==="input")i=Wl({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(yr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(yr(93));s=s[0]}l=""+s}l==null&&(l="")}i=Wl({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Wl({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var m=roe(i.children);if(s!=null){var p=i.value!=null?i.value+"":m;if(l=!1,Array.isArray(s)){for(var g=0;g":(ue+=">",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=g_(s);break e}s=null}return s!=null?(i=[],aoe.hasOwnProperty(u)&&s.charAt(0)===` `&&(ue+=` `),ue+=s):i=Hv(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?y3(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,ue},e}();Dp.renderToNodeStream=function(){throw Error(yr(207))};Dp.renderToStaticMarkup=function(e,n){e=new I3(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};Dp.renderToStaticNodeStream=function(){throw Error(yr(208))};Dp.renderToString=function(e,n){e=new I3(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};Dp.version="17.0.2"});var C3=Ge((ean,S3)=>{"use strict";S3.exports=T3()});var z7=Ge((Wb,UF)=>{(function(n,a){typeof Wb=="object"&&typeof UF=="object"?UF.exports=a():typeof define=="function"&&define.amd?define([],a):typeof Wb=="object"?Wb.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!="undefined"&&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 b=function(I,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var $ in z)z.hasOwnProperty($)&&(N[$]=z[$])},b(I,L)};return function(I,L){b(I,L);function N(){this.constructor=I}I.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(I){I===void 0&&(I="="),this._paddingCharacter=I}return b.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},b.prototype.encode=function(I){for(var L="",N=0;N>>3*6&63),L+=this._encodeByte(z>>>2*6&63),L+=this._encodeByte(z>>>1*6&63),L+=this._encodeByte(z>>>0*6&63)}var $=I.length-N;if($>0){var z=I[N]<<16|($===2?I[N+1]<<8:0);L+=this._encodeByte(z>>>3*6&63),L+=this._encodeByte(z>>>2*6&63),$===2?L+=this._encodeByte(z>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},b.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},b.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),N=I.length-L,z=new Uint8Array(this.maxDecodedLength(N)),$=0,ne=0,ue=0,Z=0,Y=0,X=0,ve=0;ne>>4,z[$++]=Y<<4|X>>>2,z[$++]=X<<6|ve,ue|=Z&r,ue|=Y&r,ue|=X&r,ue|=ve&r;if(ne>>4,ue|=Z&r,ue|=Y&r),ne>>2,ue|=X&r),ne>>8&0-65-26+97,L+=51-I>>>8&26-97-52+48,L+=61-I>>>8&52-48-62+43,L+=62-I>>>8&62-43-63+47,String.fromCharCode(L)},b.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},b.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var N=I.length-1;N>=0&&I[N]===this._paddingCharacter;N--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var m=function(b){t(I,b);function I(){return b!==null&&b.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var N=L;return N+=65,N+=25-L>>>8&0-65-26+97,N+=51-L>>>8&26-97-52+48,N+=61-L>>>8&52-48-62+45,N+=62-L>>>8&62-45-63+95,String.fromCharCode(N)},I.prototype._decodeChar=function(L){var N=r;return N+=(44-L&L-46)>>>8&-r+L-45+62,N+=(94-L&L-96)>>>8&-r+L-95+63,N+=(47-L&L-58)>>>8&-r+L-48+52,N+=(64-L&L-91)>>>8&-r+L-65+0,N+=(96-L&L-123)>>>8&-r+L-97+26,N},I}(u);n.URLSafeCoder=m;var p=new m;function g(b){return p.encode(b)}n.encodeURLSafe=g;function E(b){return p.decode(b)}n.decodeURLSafe=E,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},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 m=new Uint8Array(i(s)),p=0,g=0;g>6,m[p++]=128|E&63):E<55296?(m[p++]=224|E>>12,m[p++]=128|E>>6&63,m[p++]=128|E&63):(g++,E=(E&1023)<<10,E|=s.charCodeAt(g)&1023,E+=65536,m[p++]=240|E>>18,m[p++]=128|E>>12&63,m[p++]=128|E>>6&63,m[p++]=128|E&63)}return m}n.encode=u;function i(s){for(var m=0,p=0;p=s.length-1)throw new Error(t);p++,m+=4}else throw new Error(t)}return m}n.encodedLength=i;function l(s){for(var m=[],p=0;p=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);g=(g&31)<<6|b&63,E=128}else if(g<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],I=s[++p];if((b&192)!=128||(I&192)!=128)throw new Error(r);g=(g&15)<<12|(b&63)<<6|I&63,E=2048}else if(g<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],I=s[++p],L=s[++p];if((b&192)!=128||(I&192)!=128||(L&192)!=128)throw new Error(r);g=(g&15)<<18|(b&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(g=55296&&g<=57343)throw new Error(r);if(g>=65536){if(g>1114111)throw new Error(r);g-=65536,m.push(String.fromCharCode(55296|g>>10)),g=56320|g&1023}}m.push(String.fromCharCode(g))}return m.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function h(d,R){this.lastId=0,this.prefix=d,this.name=R}return h.prototype.create=function(d){this.lastId++;var R=this.lastId,M=this.prefix+R,A=this.name+"["+R+"]",Q=!1,we=function(){Q||(d.apply(null,arguments),Q=!0)};return this[R]=we,{number:R,id:M,name:A,callback:we}},h.prototype.remove=function(d){delete this[d.number]},h}(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function h(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return h.prototype.load=function(d,R,M){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(M);else{A.loading[d]=[M];var Q=Xa.createScriptRequest(A.getPath(d,R)),we=A.receivers.create(function(pn){if(A.receivers.remove(we),A.loading[d]){var da=A.loading[d];delete A.loading[d];for(var wt=function(Po){Po||Q.cleanup()},or=0;or>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},$=function(h){return h.replace(/[^\x00-\x7F]/g,z)},ne=function(h){var d=[0,2,1][h.length%3],R=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),M=[b.charAt(R>>>18),b.charAt(R>>>12&63),d>=2?"=":b.charAt(R>>>6&63),d>=1?"=":b.charAt(R&63)];return M.join("")},ue=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,ne)},Z=function(){function h(d,R,M,A){var Q=this;this.clear=R,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},M)}return h.prototype.isRunning=function(){return this.timer!==null},h.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},h}(),Y=Z,X=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}();function ve(h){window.clearTimeout(h)}function xe(h){window.clearInterval(h)}var ke=function(h){X(d,h);function d(R,M){return h.call(this,setTimeout,ve,R,function(A){return M(),null})||this}return d}(Y),rn=function(h){X(d,h);function d(R,M){return h.call(this,setInterval,xe,R,function(A){return M(),A})||this}return d}(Y),wn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(h){return new ke(0,h)},method:function(h){for(var d=[],R=1;R0)for(var A=0;A=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}},se=cs,Al=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ll=function(h){Al(d,h);function d(R,M){var A=h.call(this)||this;return A.id=R,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(R){return this.transport.send(R)},d.prototype.send_event=function(R,M,A){var Q={event:R,data:M};return A&&(Q.channel=A),vn.debug("Event sent",Q),this.send(se.encodeMessage(Q))},d.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},d.prototype.close=function(){this.transport.close()},d.prototype.bindListeners=function(){var R=this,M={message:function(Q){var we;try{we=se.decodeMessage(Q)}catch(pn){R.emit("error",{type:"MessageParseError",error:pn,data:Q.data})}if(we!==void 0){switch(vn.debug("Event recd",we),we.event){case"pusher:error":R.emit("error",{type:"PusherError",data:we.data});break;case"pusher:ping":R.emit("ping");break;case"pusher:pong":R.emit("pong");break}R.emit("message",we)}},activity:function(){R.emit("activity")},error:function(Q){R.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&R.handleCloseEvent(Q),R.transport=null,R.emit("closed")}},A=function(){zn(M,function(Q,we){R.transport.unbind(we,Q)})};zn(M,function(Q,we){R.transport.bind(we,Q)})},d.prototype.handleCloseEvent=function(R){var M=se.getCloseAction(R),A=se.getCloseError(R);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},d}(_a),ss=Ll,xl=function(){function h(d,R){this.transport=d,this.callback=R,this.bindListeners()}return h.prototype.close=function(){this.unbindListeners(),this.transport.close()},h.prototype.bindListeners=function(){var d=this;this.onMessage=function(R){d.unbindListeners();var M;try{M=se.processHandshake(R)}catch(A){d.finish("error",{error:A}),d.transport.close();return}M.action==="connected"?d.finish("connected",{connection:new ss(M.id,d.transport),activityTimeout:M.activityTimeout}):(d.finish(M.action,{error:M.error}),d.transport.close())},this.onClosed=function(R){d.unbindListeners();var M=se.getCloseAction(R)||"backoff",A=se.getCloseError(R);d.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},h.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},h.prototype.finish=function(d,R){this.callback(mn({transport:this.transport,action:d},R))},h}(),Vi=xl,Hd=function(){function h(d,R){this.channel=d;var M=R.authTransport;if(typeof Xa.getAuthorizers()[M]=="undefined")throw"'"+M+"' is not a recognized auth transport";this.type=M,this.options=R,this.authOptions=R.auth||{}}return h.prototype.composeQuery=function(d){var R="socket_id="+encodeURIComponent(d)+"&channel_name="+encodeURIComponent(this.channel.name);for(var M in this.authOptions.params)R+="&"+encodeURIComponent(M)+"="+encodeURIComponent(this.authOptions.params[M]);return R},h.prototype.authorize=function(d,R){h.authorizers=h.authorizers||Xa.getAuthorizers(),h.authorizers[this.type].call(this,Xa,d,R)},h}(),xf=Hd,D0=function(){function h(d,R){this.timeline=d,this.options=R||{}}return h.prototype.send=function(d,R){this.timeline.isEmpty()||this.timeline.send(Xa.TimelineTransport.getAgent(this,d),R)},h}(),g0=D0,Qi=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ru=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),vs=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),R0=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),Jd=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),y0=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),bg=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),lv=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),gI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),RI=function(h){gI(d,h);function d(R,M){var A=h.call(this,function(Q,we){vn.debug("No callbacks on "+R+" for "+Q)})||this;return A.name=R,A.pusher=M,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return d.prototype.authorize=function(R,M){return M(!1,{auth:""})},d.prototype.trigger=function(R,M){if(R.indexOf("client-")!==0)throw new Ru("Event '"+R+"' does not start with 'client-'");if(!this.subscribed){var A=Da.buildLogSuffix("triggeringClientEvents");vn.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(R,M,this.name)},d.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(R);else if(M.indexOf("pusher_internal:")!==0){var Q={};this.emit(M,A,Q)}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",R.data)},d.prototype.subscribe=function(){var R=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(M,A){M?(vn.error(A),R.emit("pusher:subscription_error",A)):(A=A,R.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:R.name}))}))},d.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},d.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},d.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},d}(_a),wg=RI,yI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),bI=function(h){yI(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.authorize=function(R,M){var A=Ki.createAuthorizer(this,this.pusher.config);return A.authorize(R,M)},d}(wg),qd=bI,Eg=function(){function h(){this.reset()}return h.prototype.get=function(d){return Object.prototype.hasOwnProperty.call(this.members,d)?{id:d,info:this.members[d]}:null},h.prototype.each=function(d){var R=this;zn(this.members,function(M,A){d(R.get(A))})},h.prototype.setMyID=function(d){this.myID=d},h.prototype.onSubscription=function(d){this.members=d.presence.hash,this.count=d.presence.count,this.me=this.get(this.myID)},h.prototype.addMember=function(d){return this.get(d.user_id)===null&&this.count++,this.members[d.user_id]=d.user_info,this.get(d.user_id)},h.prototype.removeMember=function(d){var R=this.get(d.user_id);return R&&(delete this.members[d.user_id],this.count--),R},h.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},h}(),wI=Eg,EI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ig=function(h){EI(d,h);function d(R,M){var A=h.call(this,R,M)||this;return A.members=new wI,A}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(!Q){if(we=we,we.channel_data===void 0){var pn=Da.buildLogSuffix("authenticationEndpoint");vn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+pn)),M("Invalid auth response");return}var da=JSON.parse(we.channel_data);A.members.setMyID(da.user_id)}M(Q,we)})},d.prototype.handleEvent=function(R){var M=R.event;if(M.indexOf("pusher_internal:")===0)this.handleInternalEvent(R);else{var A=R.data,Q={};R.user_id&&(Q.user_id=R.user_id),this.emit(M,A,Q)}},d.prototype.handleInternalEvent=function(R){var M=R.event,A=R.data;switch(M){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(R);break;case"pusher_internal:member_added":var Q=this.members.addMember(A);this.emit("pusher:member_added",Q);break;case"pusher_internal:member_removed":var we=this.members.removeMember(A);we&&this.emit("pusher:member_removed",we);break}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(R.data),this.emit("pusher:subscription_succeeded",this.members))},d.prototype.disconnect=function(){this.members.reset(),h.prototype.disconnect.call(this)},d}(qd),II=Ig,Tg=a(1),Wd=a(0),TI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),SI=function(h){TI(d,h);function d(R,M,A){var Q=h.call(this,R,M)||this;return Q.key=null,Q.nacl=A,Q}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(Q){M(!0,we);return}var pn=we.shared_secret;if(!pn){var da="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,da);return}A.key=Object(Wd.decode)(pn),delete we.shared_secret,M(!1,we)})},d.prototype.trigger=function(R,M){throw new y0("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){h.prototype.handleEvent.call(this,R);return}this.handleEncryptedEvent(M,A)},d.prototype.handleEncryptedEvent=function(R,M){var A=this;if(!this.key){vn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){vn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Q=Object(Wd.decode)(M.ciphertext);if(Q.length0&&this.emit("connecting_in",Math.round(R/1e3)),this.retryTimer=new ke(R||0,function(){M.disconnectInternally(),M.connect()})},d.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},d.prototype.setUnavailableTimer=function(){var R=this;this.unavailableTimer=new ke(this.options.unavailableTimeout,function(){R.updateState("unavailable")})},d.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},d.prototype.sendActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ke(this.options.pongTimeout,function(){R.timeline.error({pong_timed_out:R.options.pongTimeout}),R.retryIn(0)})},d.prototype.resetActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ke(this.activityTimeout,function(){R.sendActivityCheck()}))},d.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},d.prototype.buildConnectionCallbacks=function(R){var M=this;return mn({},R,{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)}})},d.prototype.buildHandshakeCallbacks=function(R){var M=this;return mn({},R,{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})}})},d.prototype.buildErrorCallbacks=function(){var R=this,M=function(A){return function(Q){Q.error&&R.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:M(function(){R.usingTLS=!0,R.updateStrategy(),R.retryIn(0)}),refused:M(function(){R.disconnect()}),backoff:M(function(){R.retryIn(1e3)}),retry:M(function(){R.retryIn(0)})}},d.prototype.setConnection=function(R){this.connection=R;for(var M in this.connectionCallbacks)this.connection.bind(M,this.connectionCallbacks[M]);this.resetActivityCheck()},d.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var R in this.connectionCallbacks)this.connection.unbind(R,this.connectionCallbacks[R]);var M=this.connection;return this.connection=null,M}},d.prototype.updateState=function(R,M){var A=this.state;if(this.state=R,A!==R){var Q=R;Q==="connected"&&(Q+=" with new socket ID "+M.socket_id),vn.debug("State changed",A+" -> "+Q),this.timeline.info({state:R,params:M}),this.emit("state_change",{previous:A,current:R}),this.emit(R,M)}},d.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},d}(_a),Sg=GI,MI=function(){function h(){this.channels={}}return h.prototype.add=function(d,R){return this.channels[d]||(this.channels[d]=Cg(d,R)),this.channels[d]},h.prototype.all=function(){return ja(this.channels)},h.prototype.find=function(d){return this.channels[d]},h.prototype.remove=function(d){var R=this.channels[d];return delete this.channels[d],R},h.prototype.disconnect=function(){zn(this.channels,function(d){d.disconnect()})},h}(),AI=MI;function Cg(h,d){if(h.indexOf("private-encrypted-")===0){if(d.config.nacl)return Ki.createEncryptedChannel(h,d,d.config.nacl);var R="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=Da.buildLogSuffix("encryptedChannelSupport");throw new y0(R+". "+M)}else return h.indexOf("private-")===0?Ki.createPrivateChannel(h,d):h.indexOf("presence-")===0?Ki.createPresenceChannel(h,d):Ki.createChannel(h,d)}var LI={createChannels:function(){return new AI},createConnectionManager:function(h,d){return new Sg(h,d)},createChannel:function(h,d){return new wg(h,d)},createPrivateChannel:function(h,d){return new qd(h,d)},createPresenceChannel:function(h,d){return new II(h,d)},createEncryptedChannel:function(h,d,R){return new CI(h,d,R)},createTimelineSender:function(h,d){return new g0(h,d)},createAuthorizer:function(h,d){return d.authorizer?d.authorizer(h,d):new xf(h,d)},createHandshake:function(h,d){return new Vi(h,d)},createAssistantToTheTransportManager:function(h,d,R){return new sc(h,d,R)}},Ki=LI,xI=function(){function h(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return h.prototype.getAssistant=function(d){return Ki.createAssistantToTheTransportManager(this,d,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},h.prototype.isAlive=function(){return this.livesLeft>0},h.prototype.reportDeath=function(){this.livesLeft-=1},h}(),Fg=xI,PI=function(){function h(d,R){this.strategies=d,this.loop=Boolean(R.loop),this.failFast=Boolean(R.failFast),this.timeout=R.timeout,this.timeoutLimit=R.timeoutLimit}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){var M=this,A=this.strategies,Q=0,we=this.timeout,pn=null,da=function(wt,or){or?R(null,or):(Q=Q+1,M.loop&&(Q=Q%A.length),Q0&&(Q=new ke(M.timeout,function(){we.abort(),A(!0)})),we=d.connect(R,function(pn,da){pn&&Q&&Q.isRunning()&&!M.failFast||(Q&&Q.ensureAborted(),A(pn,da))}),{abort:function(){Q&&Q.ensureAborted(),we.abort()},forceMinPriority:function(pn){we.forceMinPriority(pn)}}},h}(),fs=PI,jI=function(){function h(d){this.strategies=d}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){return NI(this.strategies,d,function(M,A){return function(Q,we){if(A[M].error=Q,Q){Gg(A)&&R(!0);return}Ma(A,function(pn){pn.forceMinPriority(we.transport.priority)}),R(null,we)}})},h}(),$d=jI;function NI(h,d,R){var M=sa(h,function(A,Q,we,pn){return A.connect(d,R(Q,pn))});return{abort:function(){Ma(M,zd)},forceMinPriority:function(A){Ma(M,function(Q){Q.forceMinPriority(A)})}}}function Gg(h){return Dn(h,function(d){return Boolean(d.error)})}function zd(h){!h.error&&!h.aborted&&(h.abort(),h.aborted=!0)}var OI=function(){function h(d,R,M){this.strategy=d,this.transports=R,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.usingTLS,A=Mg(M),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=dn.now()){var we=this.transports[A.transport];we&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new fs([we],{timeout:A.latency*2+1e3,failFast:!0})))}var pn=dn.now(),da=Q.pop().connect(d,function wt(or,Po){or?(Ag(M),Q.length>0?(pn=dn.now(),da=Q.pop().connect(d,wt)):R(or)):(kI(M,Po.transport.name,dn.now()-pn),R(null,Po))});return{abort:function(){da.abort()},forceMinPriority:function(wt){d=wt,da&&da.forceMinPriority(wt)}}},h}(),UI=OI;function Vd(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function Mg(h){var d=Xa.getLocalStorage();if(d)try{var R=d[Vd(h)];if(R)return JSON.parse(R)}catch{Ag(h)}return null}function kI(h,d,R){var M=Xa.getLocalStorage();if(M)try{M[Vd(h)]=Aa({timestamp:dn.now(),transport:d,latency:R})}catch{}}function Ag(h){var d=Xa.getLocalStorage();if(d)try{delete d[Vd(h)]}catch{}}var BI=function(){function h(d,R){var M=R.delay;this.strategy=d,this.options={delay:M}}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy,A,Q=new ke(this.options.delay,function(){A=M.connect(d,R)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(we){d=we,A&&A.forceMinPriority(we)}}},h}(),b0=BI,Lg=function(){function h(d,R,M){this.test=d,this.trueBranch=R,this.falseBranch=M}return h.prototype.isSupported=function(){var d=this.test()?this.trueBranch:this.falseBranch;return d.isSupported()},h.prototype.connect=function(d,R){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(d,R)},h}(),Pf=Lg,HI=function(){function h(d){this.strategy=d}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy.connect(d,function(A,Q){Q&&M.abort(),R(A,Q)});return M},h}(),JI=HI;function Pl(h){return function(){return h.isSupported()}}var xg=function(h,d,R){var M={};function A(Or,Xg,Zg,DT,eR){var w=R(h,Or,Xg,Zg,DT,eR);return M[Or]=w,w}var Q=Object.assign({},d,{hostNonTLS:h.wsHost+":"+h.wsPort,hostTLS:h.wsHost+":"+h.wssPort,httpPath:h.wsPath}),we=Object.assign({},Q,{useTLS:!0}),pn=Object.assign({},d,{hostNonTLS:h.httpHost+":"+h.httpPort,hostTLS:h.httpHost+":"+h.httpsPort,httpPath:h.httpPath}),da={loop:!0,timeout:15e3,timeoutLimit:6e4},wt=new Fg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),or=new Fg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Po=A("ws","ws",3,Q,wt),mi=A("wss","ws",3,we,wt),pT=A("sockjs","sockjs",1,pn),Wg=A("xhr_streaming","xhr_streaming",1,pn,or),$g=A("xdr_streaming","xdr_streaming",1,pn,or),zg=A("xhr_polling","xhr_polling",1,pn),dT=A("xdr_polling","xdr_polling",1,pn),Vg=new fs([Po],da),mT=new fs([mi],da),hT=new fs([pT],da),Qg=new fs([new Pf(Pl(Wg),Wg,$g)],da),Kg=new fs([new Pf(Pl(zg),zg,dT)],da),Yg=new fs([new Pf(Pl(Qg),new $d([Qg,new b0(Kg,{delay:4e3})]),Kg)],da),em=new Pf(Pl(Yg),Yg,hT),nm;return d.useTLS?nm=new $d([Vg,new b0(em,{delay:2e3})]):nm=new $d([Vg,new b0(mT,{delay:2e3}),new b0(em,{delay:5e3})]),new UI(new JI(new Pf(Pl(Po),nm,em)),M,{ttl:18e5,timeline:d.timeline,useTLS:d.useTLS})},qI=xg,WI=function(){var h=this;h.timeline.info(h.buildTimelineMessage({transport:h.name+(h.options.useTLS?"s":"")})),h.hooks.isInitialized()?h.changeState("initialized"):h.hooks.file?(h.changeState("initializing"),p.load(h.hooks.file,{useTLS:h.options.useTLS},function(d,R){h.hooks.isInitialized()?(h.changeState("initialized"),R(!0)):(d&&h.onError(d),h.onClose(),R(!1))})):h.onClose()},Pg={getRequest:function(h){var d=new window.XDomainRequest;return d.ontimeout=function(){h.emit("error",new vs),h.close()},d.onerror=function(R){h.emit("error",R),h.close()},d.onprogress=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText)},d.onload=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText),h.emit("finished",200),h.close()},d},abortRequest:function(h){h.ontimeout=h.onerror=h.onprogress=h.onload=null,h.abort()}},$I=Pg,jg=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),zI=256*1024,Ng=function(h){jg(d,h);function d(R,M,A){var Q=h.call(this)||this;return Q.hooks=R,Q.method=M,Q.url=A,Q}return d.prototype.start=function(R){var M=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){M.close()},Xa.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(R)},d.prototype.close=function(){this.unloader&&(Xa.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},d.prototype.onChunk=function(R,M){for(;;){var A=this.advanceBuffer(M);if(A)this.emit("chunk",{status:R,data:A});else break}this.isBufferTooLong(M)&&this.emit("buffer_too_long")},d.prototype.advanceBuffer=function(R){var M=R.slice(this.position),A=M.indexOf(` `);return A!==-1?(this.position+=A+1,M.slice(0,A)):null},d.prototype.isBufferTooLong=function(R){return this.position===R.length&&R.length>zI},d}(_a),Og=Ng,jf;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(jf||(jf={}));var Yi=jf,VI=1,Ug=function(){function h(d,R){this.hooks=d,this.session=Ju(1e3)+"/"+jl(8),this.location=QI(R),this.readyState=Yi.CONNECTING,this.openStream()}return h.prototype.send=function(d){return this.sendRaw(JSON.stringify([d]))},h.prototype.ping=function(){this.hooks.sendHeartbeat(this)},h.prototype.close=function(d,R){this.onClose(d,R,!0)},h.prototype.sendRaw=function(d){if(this.readyState===Yi.OPEN)try{return Xa.createSocketRequest("POST",Qd(KI(this.location,this.session))).start(d),!0}catch{return!1}else return!1},h.prototype.reconnect=function(){this.closeStream(),this.openStream()},h.prototype.onClose=function(d,R,M){this.closeStream(),this.readyState=Yi.CLOSED,this.onclose&&this.onclose({code:d,reason:R,wasClean:M})},h.prototype.onChunk=function(d){if(d.status===200){this.readyState===Yi.OPEN&&this.onActivity();var R,M=d.data.slice(0,1);switch(M){case"o":R=JSON.parse(d.data.slice(1)||"{}"),this.onOpen(R);break;case"a":R=JSON.parse(d.data.slice(1)||"[]");for(var A=0;A0&&h.onChunk(R.status,R.responseText);break;case 4:R.responseText&&R.responseText.length>0&&h.onChunk(R.status,R.responseText),h.emit("finished",R.status),h.close();break}},R},abortRequest:function(h){h.onreadystatechange=null,h.abort()}},Ya=Bg,_s={createStreamingSocket:function(h){return this.createSocket(ZI,h)},createPollingSocket:function(h){return this.createSocket(nT,h)},createSocket:function(h,d){return new YI(h,d)},createXHR:function(h,d){return this.createRequest(Ya,h,d)},createRequest:function(h,d,R){return new Og(h,d,R)}},Kd=_s;Kd.createXDR=function(h,d){return this.createRequest($I,h,d)};var aT=Kd,tT={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:m,getDefaultStrategy:qI,Transports:xo,transportConnectionInitializer:WI,HTTPFactory:aT,TimelineTransport:ie,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(h){var d=this;window.Pusher=h;var R=function(){d.onDocumentBody(h.ready)};window.JSON?R():p.load("json2",{},R)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:J,jsonp:O}},onDocumentBody:function(h){var d=this;document.body?h():setTimeout(function(){d.onDocumentBody(h)},0)},createJSONPRequest:function(h,d){return new W(h,d)},createScriptRequest:function(h){return new x(h)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var h=this.getXHRAPI();return new h},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return di},createWebSocket:function(h){var d=this.getWebSocketAPI();return new d(h)},createSocketRequest:function(h,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var h=this.getXHRAPI();return Boolean(h)&&new h().withCredentials!==void 0},isXDRSupported:function(h){var d=h?"https:":"http:",R=this.getProtocol();return Boolean(window.XDomainRequest)&&R===d},addUnloadListener:function(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener:function(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)}},Xa=tT,w0;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(w0||(w0={}));var E0=w0,rT=function(){function h(d,R,M){this.key=d,this.session=R,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return h.prototype.log=function(d,R){d<=this.options.level&&(this.events.push(mn({},R,{timestamp:dn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},h.prototype.error=function(d){this.log(E0.ERROR,d)},h.prototype.info=function(d){this.log(E0.INFO,d)},h.prototype.debug=function(d){this.log(E0.DEBUG,d)},h.prototype.isEmpty=function(){return this.events.length===0},h.prototype.send=function(d,R){var M=this,A=mn({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=[],d(A,function(Q,we){Q||M.sent++,R&&R(Q,we)}),!0},h.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},h}(),Hg=rT,Yd=function(){function h(d,R,M,A){this.name=d,this.priority=R,this.transport=M,this.options=A||{}}return h.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},h.prototype.connect=function(d,R){var M=this;if(this.isSupported()){if(this.priority{"use strict";var Bhe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";A5.exports=Bhe});var N5=Ge((XTa,j5)=>{"use strict";var Hhe=L5();function x5(){}function P5(){}P5.resetWarningCache=x5;j5.exports=function(){function e(t,r,u,i,l,s){if(s!==Hhe){var m=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 m.name="Invariant Violation",m}}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:P5,resetWarningCache:x5};return a.PropTypes=a,a}});var U5=Ge((nSa,O5)=>{O5.exports=N5()();var ZTa,eSa});var pG=Ge(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var k5=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],cw=k5.join(","),B5=typeof Element=="undefined",k_=B5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fG=!B5&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},H5=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(cw));return a&&k_.call(n,cw)&&r.unshift(n),r=r.filter(t),r},J5=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,m=e(s,!0,t);t.flatten?r.push.apply(r,m):r.push({scope:i,candidates:m})}else{var p=k_.call(i,cw);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var g=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(g&&E){var b=e(g===!0?i.children:g.children,!0,t);t.flatten?r.push.apply(r,b):r.push({scope:i,candidates:b})}else u.unshift.apply(u,i.children)}}return r},q5=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},Jhe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},W5=function(n){return n.tagName==="INPUT"},qhe=function(n){return W5(n)&&n.type==="hidden"},Whe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},$he=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(k_.call(i,"details:not([open]) *"))return!0;var l=fG(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 m=n;n;){var p=n.parentElement,g=fG(n);if(p&&!p.shadowRoot&&r(p)===!0)return $5(n);n.assignedSlot?n=n.assignedSlot:!p&&g!==n.ownerDocument?n=g.host:n=p}n=m}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return $5(n);return!1},Yhe=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)},Zhe=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=q5(l,i),m=i?e(r.candidates):l;s===0?i?a.push.apply(a,m):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:m})}),t.sort(Jhe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},eDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=J5([n],a.includeContainer,{filter:_G.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:Xhe}):t=H5(n,a.includeContainer,_G.bind(null,a)),Zhe(t)},nDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=J5([n],a.includeContainer,{filter:sw.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=H5(n,a.includeContainer,sw.bind(null,a)),t},aDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return k_.call(n,cw)===!1?!1:_G(a,n)},tDe=k5.concat("iframe").join(","),rDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return k_.call(n,tDe)===!1?!1:sw(a,n)};qp.focusable=nDe;qp.isFocusable=rDe;qp.isTabbable=aDe;qp.tabbable=eDe});var X5=Ge(dG=>{"use strict";Object.defineProperty(dG,"__esModule",{value:!0});var Vs=pG();function z5(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 V5(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()}}}(),uDe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},iDe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},lDe=function(n){return n.key==="Tab"||n.keyCode===9},K5=function(n){return setTimeout(n,0)},Y5=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},Jh=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?ve-1:0),ke=1;ke=0)Y=t.activeElement;else{var X=u.tabbableGroups[0],ve=X&&X.firstTabbableNode;Y=ve||m("fallbackFocus")}if(!Y)throw new Error("Your focus-trap needs to have at least one focusable element");return Y},g=function(){if(u.containerGroups=u.containers.map(function(Y){var X=Vs.tabbable(Y,r.tabbableOptions),ve=Vs.focusable(Y,r.tabbableOptions);return{container:Y,tabbableNodes:X,focusableNodes:ve,firstTabbableNode:X.length>0?X[0]:null,lastTabbableNode:X.length>0?X[X.length-1]:null,nextTabbableNode:function(ke){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,wn=ve.findIndex(function(dn){return dn===ke});if(!(wn<0))return rn?ve.slice(wn+1).find(function(dn){return Vs.isTabbable(dn,r.tabbableOptions)}):ve.slice(0,wn).reverse().find(function(dn){return Vs.isTabbable(dn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Y){return Y.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!m("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 Z(Y){if(Y!==!1&&Y!==t.activeElement){if(!Y||!Y.focus){Z(p());return}Y.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Y,uDe(Y)&&Y.select()}},b=function(Y){var X=m("setReturnFocus",Y);return X||(X===!1?!1:Y)},I=function(Y){var X=vw(Y);if(!(s(X)>=0)){if(Jh(r.clickOutsideDeactivates,Y)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Vs.isFocusable(X,r.tabbableOptions)});return}Jh(r.allowOutsideClick,Y)||Y.preventDefault()}},L=function(Y){var X=vw(Y),ve=s(X)>=0;ve||X instanceof Document?ve&&(u.mostRecentlyFocusedNode=X):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},N=function(Y){var X=vw(Y);g();var ve=null;if(u.tabbableGroups.length>0){var xe=s(X),ke=xe>=0?u.containerGroups[xe]:void 0;if(xe<0)Y.shiftKey?ve=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:ve=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var rn=Y5(u.tabbableGroups,function(zn){var Wn=zn.firstTabbableNode;return X===Wn});if(rn<0&&(ke.container===X||Vs.isFocusable(X,r.tabbableOptions)&&!Vs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X,!1))&&(rn=xe),rn>=0){var wn=rn===0?u.tabbableGroups.length-1:rn-1,dn=u.tabbableGroups[wn];ve=dn.lastTabbableNode}}else{var mn=Y5(u.tabbableGroups,function(zn){var Wn=zn.lastTabbableNode;return X===Wn});if(mn<0&&(ke.container===X||Vs.isFocusable(X,r.tabbableOptions)&&!Vs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X))&&(mn=xe),mn>=0){var yn=mn===u.tabbableGroups.length-1?0:mn+1,Kn=u.tabbableGroups[yn];ve=Kn.firstTabbableNode}}}else ve=m("fallbackFocus");ve&&(Y.preventDefault(),E(ve))},z=function(Y){if(iDe(Y)&&Jh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(lDe(Y)){N(Y);return}},$=function(Y){var X=vw(Y);s(X)>=0||Jh(r.clickOutsideDeactivates,Y)||Jh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},ne=function(){if(!!u.active)return Q5.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?K5(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",$,{capture:!0,passive:!1}),t.addEventListener("keydown",z,{capture:!0,passive:!1}),i},ue=function(){if(!!u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchstart",I,!0),t.removeEventListener("click",$,!0),t.removeEventListener("keydown",z,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Y){if(u.active)return this;var X=l(Y,"onActivate"),ve=l(Y,"onPostActivate"),xe=l(Y,"checkCanFocusTrap");xe||g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,X&&X();var ke=function(){xe&&g(),ne(),ve&&ve()};return xe?(xe(u.containers.concat()).then(ke,ke),this):(ke(),this)},deactivate:function(Y){if(!u.active)return this;var X=V5({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,Q5.deactivateTrap(i);var ve=l(X,"onDeactivate"),xe=l(X,"onPostDeactivate"),ke=l(X,"checkCanReturnFocus"),rn=l(X,"returnFocus","returnFocusOnDeactivate");ve&&ve();var wn=function(){K5(function(){rn&&E(b(u.nodeFocusedBeforeActivation)),xe&&xe()})};return rn&&ke?(ke(b(u.nodeFocusedBeforeActivation)).then(wn,wn),this):(wn(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,ue(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,g(),ne(),this)},updateContainerElements:function(Y){var X=[].concat(Y).filter(Boolean);return u.containers=X.map(function(ve){return typeof ve=="string"?t.querySelector(ve):ve}),u.active&&g(),this}},i.updateContainerElements(n),i};dG.createFocusTrap=cDe});var n9=Ge((rSa,e9)=>{"use strict";function mG(e){return mG=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},mG(e)}function sDe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Z5(e,n){for(var a=0;a1?p-1:0),E=1;E element.");var i=function(m){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(m):u.ref&&(u.ref.current=m)),r.focusTrapElements=p||[m]},l=_w.cloneElement(u,{ref:i});return l}return null}}]),a}(_w.Component),Wh=typeof Element=="undefined"?Function:Element;DG.propTypes={active:Pa.bool,paused:Pa.bool,focusTrapOptions:Pa.shape({document:Pa.object,onActivate:Pa.func,onPostActivate:Pa.func,checkCanFocusTrap:Pa.func,onDeactivate:Pa.func,onPostDeactivate:Pa.func,checkCanReturnFocus:Pa.func,initialFocus:Pa.oneOfType([Pa.instanceOf(Wh),Pa.string,Pa.bool,Pa.func]),fallbackFocus:Pa.oneOfType([Pa.instanceOf(Wh),Pa.string,Pa.func]),escapeDeactivates:Pa.oneOfType([Pa.bool,Pa.func]),clickOutsideDeactivates:Pa.oneOfType([Pa.bool,Pa.func]),returnFocusOnDeactivate:Pa.bool,setReturnFocus:Pa.oneOfType([Pa.instanceOf(Wh),Pa.string,Pa.bool,Pa.func]),allowOutsideClick:Pa.oneOfType([Pa.bool,Pa.func]),preventScroll:Pa.bool,tabbableOptions:Pa.shape({displayCheck:Pa.oneOf(["full","non-zero-area","none"]),getShadowRoot:Pa.oneOfType([Pa.bool,Pa.func])})}),containerElements:Pa.arrayOf(Pa.instanceOf(Wh)),children:Pa.oneOfType([Pa.element,Pa.instanceOf(Wh)])};DG.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:DDe};e9.exports=DG});var ek=Ge(qt=>{"use strict";var Go=typeof Symbol=="function"&&Symbol.for,VG=Go?Symbol.for("react.element"):60103,QG=Go?Symbol.for("react.portal"):60106,Iw=Go?Symbol.for("react.fragment"):60107,Tw=Go?Symbol.for("react.strict_mode"):60108,Sw=Go?Symbol.for("react.profiler"):60114,Cw=Go?Symbol.for("react.provider"):60109,Fw=Go?Symbol.for("react.context"):60110,KG=Go?Symbol.for("react.async_mode"):60111,Gw=Go?Symbol.for("react.concurrent_mode"):60111,Mw=Go?Symbol.for("react.forward_ref"):60112,Aw=Go?Symbol.for("react.suspense"):60113,Nge=Go?Symbol.for("react.suspense_list"):60120,Lw=Go?Symbol.for("react.memo"):60115,xw=Go?Symbol.for("react.lazy"):60116,Oge=Go?Symbol.for("react.block"):60121,Uge=Go?Symbol.for("react.fundamental"):60117,kge=Go?Symbol.for("react.responder"):60118,Bge=Go?Symbol.for("react.scope"):60119;function Ui(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case VG:switch(e=e.type,e){case KG:case Gw:case Iw:case Sw:case Tw:case Aw:return e;default:switch(e=e&&e.$$typeof,e){case Fw:case Mw:case xw:case Lw:case Cw:return e;default:return n}}case QG:return n}}}function Z9(e){return Ui(e)===Gw}qt.AsyncMode=KG;qt.ConcurrentMode=Gw;qt.ContextConsumer=Fw;qt.ContextProvider=Cw;qt.Element=VG;qt.ForwardRef=Mw;qt.Fragment=Iw;qt.Lazy=xw;qt.Memo=Lw;qt.Portal=QG;qt.Profiler=Sw;qt.StrictMode=Tw;qt.Suspense=Aw;qt.isAsyncMode=function(e){return Z9(e)||Ui(e)===KG};qt.isConcurrentMode=Z9;qt.isContextConsumer=function(e){return Ui(e)===Fw};qt.isContextProvider=function(e){return Ui(e)===Cw};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VG};qt.isForwardRef=function(e){return Ui(e)===Mw};qt.isFragment=function(e){return Ui(e)===Iw};qt.isLazy=function(e){return Ui(e)===xw};qt.isMemo=function(e){return Ui(e)===Lw};qt.isPortal=function(e){return Ui(e)===QG};qt.isProfiler=function(e){return Ui(e)===Sw};qt.isStrictMode=function(e){return Ui(e)===Tw};qt.isSuspense=function(e){return Ui(e)===Aw};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Iw||e===Gw||e===Sw||e===Tw||e===Aw||e===Nge||typeof e=="object"&&e!==null&&(e.$$typeof===xw||e.$$typeof===Lw||e.$$typeof===Cw||e.$$typeof===Fw||e.$$typeof===Mw||e.$$typeof===Uge||e.$$typeof===kge||e.$$typeof===Bge||e.$$typeof===Oge)};qt.typeOf=Ui});var ak=Ge(($Ha,nk)=>{"use strict";nk.exports=ek()});var $_=Ge((uJa,Nw)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function SRe(){this.__data__=[],this.size=0}Yk.exports=SRe});var hM=Ge((Kqa,Zk)=>{function CRe(e,n){return e===n||e!==e&&n!==n}Zk.exports=CRe});var tD=Ge((Yqa,eB)=>{var FRe=hM();function GRe(e,n){for(var a=e.length;a--;)if(FRe(e[a][0],n))return a;return-1}eB.exports=GRe});var aB=Ge((Xqa,nB)=>{var MRe=tD(),ARe=Array.prototype,LRe=ARe.splice;function xRe(e){var n=this.__data__,a=MRe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():LRe.call(n,a,1),--this.size,!0}nB.exports=xRe});var rB=Ge((Zqa,tB)=>{var PRe=tD();function jRe(e){var n=this.__data__,a=PRe(n,e);return a<0?void 0:n[a][1]}tB.exports=jRe});var uB=Ge((eWa,oB)=>{var NRe=tD();function ORe(e){return NRe(this.__data__,e)>-1}oB.exports=ORe});var lB=Ge((nWa,iB)=>{var URe=tD();function kRe(e,n){var a=this.__data__,t=URe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}iB.exports=kRe});var rD=Ge((aWa,cB)=>{var BRe=Xk(),HRe=aB(),JRe=rB(),qRe=uB(),WRe=lB();function Zp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var $Re=rD();function zRe(){this.__data__=new $Re,this.size=0}sB.exports=zRe});var _B=Ge((rWa,fB)=>{function VRe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}fB.exports=VRe});var dB=Ge((oWa,pB)=>{function QRe(e){return this.__data__.get(e)}pB.exports=QRe});var hB=Ge((uWa,mB)=>{function KRe(e){return this.__data__.has(e)}mB.exports=KRe});var DM=Ge((iWa,DB)=>{var YRe=typeof global=="object"&&global&&global.Object===Object&&global;DB.exports=YRe});var Zc=Ge((lWa,gB)=>{var XRe=DM(),ZRe=typeof self=="object"&&self&&self.Object===Object&&self,eye=XRe||ZRe||Function("return this")();gB.exports=eye});var r1=Ge((cWa,RB)=>{var nye=Zc(),aye=nye.Symbol;RB.exports=aye});var EB=Ge((sWa,wB)=>{var yB=r1(),bB=Object.prototype,tye=bB.hasOwnProperty,rye=bB.toString,oD=yB?yB.toStringTag:void 0;function oye(e){var n=tye.call(e,oD),a=e[oD];try{e[oD]=void 0;var t=!0}catch{}var r=rye.call(e);return t&&(n?e[oD]=a:delete e[oD]),r}wB.exports=oye});var TB=Ge((vWa,IB)=>{var uye=Object.prototype,iye=uye.toString;function lye(e){return iye.call(e)}IB.exports=lye});var uD=Ge((fWa,FB)=>{var SB=r1(),cye=EB(),sye=TB(),vye="[object Null]",fye="[object Undefined]",CB=SB?SB.toStringTag:void 0;function _ye(e){return e==null?e===void 0?fye:vye:CB&&CB in Object(e)?cye(e):sye(e)}FB.exports=_ye});var gM=Ge((_Wa,GB)=>{function pye(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}GB.exports=pye});var RM=Ge((pWa,MB)=>{var dye=uD(),mye=gM(),hye="[object AsyncFunction]",Dye="[object Function]",gye="[object GeneratorFunction]",Rye="[object Proxy]";function yye(e){if(!mye(e))return!1;var n=dye(e);return n==Dye||n==gye||n==hye||n==Rye}MB.exports=yye});var LB=Ge((dWa,AB)=>{var bye=Zc(),wye=bye["__core-js_shared__"];AB.exports=wye});var jB=Ge((mWa,PB)=>{var yM=LB(),xB=function(){var e=/[^.]+$/.exec(yM&&yM.keys&&yM.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Eye(e){return!!xB&&xB in e}PB.exports=Eye});var bM=Ge((hWa,NB)=>{var Iye=Function.prototype,Tye=Iye.toString;function Sye(e){if(e!=null){try{return Tye.call(e)}catch{}try{return e+""}catch{}}return""}NB.exports=Sye});var UB=Ge((DWa,OB)=>{var Cye=RM(),Fye=jB(),Gye=gM(),Mye=bM(),Aye=/[\\^$.*+?()[\]{}|]/g,Lye=/^\[object .+?Constructor\]$/,xye=Function.prototype,Pye=Object.prototype,jye=xye.toString,Nye=Pye.hasOwnProperty,Oye=RegExp("^"+jye.call(Nye).replace(Aye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Uye(e){if(!Gye(e)||Fye(e))return!1;var n=Cye(e)?Oye:Lye;return n.test(Mye(e))}OB.exports=Uye});var BB=Ge((gWa,kB)=>{function kye(e,n){return e==null?void 0:e[n]}kB.exports=kye});var V_=Ge((RWa,HB)=>{var Bye=UB(),Hye=BB();function Jye(e,n){var a=Hye(e,n);return Bye(a)?a:void 0}HB.exports=Jye});var o1=Ge((yWa,JB)=>{var qye=V_(),Wye=Zc(),$ye=qye(Wye,"Map");JB.exports=$ye});var iD=Ge((bWa,qB)=>{var zye=V_(),Vye=zye(Object,"create");qB.exports=Vye});var zB=Ge((wWa,$B)=>{var WB=iD();function Qye(){this.__data__=WB?WB(null):{},this.size=0}$B.exports=Qye});var QB=Ge((EWa,VB)=>{function Kye(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}VB.exports=Kye});var YB=Ge((IWa,KB)=>{var Yye=iD(),Xye="__lodash_hash_undefined__",Zye=Object.prototype,ebe=Zye.hasOwnProperty;function nbe(e){var n=this.__data__;if(Yye){var a=n[e];return a===Xye?void 0:a}return ebe.call(n,e)?n[e]:void 0}KB.exports=nbe});var ZB=Ge((TWa,XB)=>{var abe=iD(),tbe=Object.prototype,rbe=tbe.hasOwnProperty;function obe(e){var n=this.__data__;return abe?n[e]!==void 0:rbe.call(n,e)}XB.exports=obe});var nH=Ge((SWa,eH)=>{var ube=iD(),ibe="__lodash_hash_undefined__";function lbe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=ube&&n===void 0?ibe:n,this}eH.exports=lbe});var tH=Ge((CWa,aH)=>{var cbe=zB(),sbe=QB(),vbe=YB(),fbe=ZB(),_be=nH();function ed(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var rH=tH(),pbe=rD(),dbe=o1();function mbe(){this.size=0,this.__data__={hash:new rH,map:new(dbe||pbe),string:new rH}}oH.exports=mbe});var lH=Ge((GWa,iH)=>{function hbe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}iH.exports=hbe});var lD=Ge((MWa,cH)=>{var Dbe=lH();function gbe(e,n){var a=e.__data__;return Dbe(n)?a[typeof n=="string"?"string":"hash"]:a.map}cH.exports=gbe});var vH=Ge((AWa,sH)=>{var Rbe=lD();function ybe(e){var n=Rbe(this,e).delete(e);return this.size-=n?1:0,n}sH.exports=ybe});var _H=Ge((LWa,fH)=>{var bbe=lD();function wbe(e){return bbe(this,e).get(e)}fH.exports=wbe});var dH=Ge((xWa,pH)=>{var Ebe=lD();function Ibe(e){return Ebe(this,e).has(e)}pH.exports=Ibe});var hH=Ge((PWa,mH)=>{var Tbe=lD();function Sbe(e,n){var a=Tbe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}mH.exports=Sbe});var wM=Ge((jWa,DH)=>{var Cbe=uH(),Fbe=vH(),Gbe=_H(),Mbe=dH(),Abe=hH();function nd(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var Lbe=rD(),xbe=o1(),Pbe=wM(),jbe=200;function Nbe(e,n){var a=this.__data__;if(a instanceof Lbe){var t=a.__data__;if(!xbe||t.length{var Obe=rD(),Ube=vB(),kbe=_B(),Bbe=dB(),Hbe=hB(),Jbe=RH();function ad(e){var n=this.__data__=new Obe(e);this.size=n.size}ad.prototype.clear=Ube;ad.prototype.delete=kbe;ad.prototype.get=Bbe;ad.prototype.has=Hbe;ad.prototype.set=Jbe;yH.exports=ad});var EH=Ge((UWa,wH)=>{var qbe="__lodash_hash_undefined__";function Wbe(e){return this.__data__.set(e,qbe),this}wH.exports=Wbe});var TH=Ge((kWa,IH)=>{function $be(e){return this.__data__.has(e)}IH.exports=$be});var CH=Ge((BWa,SH)=>{var zbe=wM(),Vbe=EH(),Qbe=TH();function u1(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new zbe;++n{function Kbe(e,n){for(var a=-1,t=e==null?0:e.length;++a{function Ybe(e,n){return e.has(n)}MH.exports=Ybe});var EM=Ge((qWa,LH)=>{var Xbe=CH(),Zbe=GH(),ewe=AH(),nwe=1,awe=2;function twe(e,n,a,t,r,u){var i=a&nwe,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var m=u.get(e),p=u.get(n);if(m&&p)return m==n&&p==e;var g=-1,E=!0,b=a&awe?new Xbe:void 0;for(u.set(e,n),u.set(n,e);++g{var rwe=Zc(),owe=rwe.Uint8Array;xH.exports=owe});var NH=Ge(($Wa,jH)=>{function uwe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}jH.exports=uwe});var UH=Ge((zWa,OH)=>{function iwe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}OH.exports=iwe});var qH=Ge((VWa,JH)=>{var kH=r1(),BH=PH(),lwe=hM(),cwe=EM(),swe=NH(),vwe=UH(),fwe=1,_we=2,pwe="[object Boolean]",dwe="[object Date]",mwe="[object Error]",hwe="[object Map]",Dwe="[object Number]",gwe="[object RegExp]",Rwe="[object Set]",ywe="[object String]",bwe="[object Symbol]",wwe="[object ArrayBuffer]",Ewe="[object DataView]",HH=kH?kH.prototype:void 0,IM=HH?HH.valueOf:void 0;function Iwe(e,n,a,t,r,u,i){switch(a){case Ewe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case wwe:return!(e.byteLength!=n.byteLength||!u(new BH(e),new BH(n)));case pwe:case dwe:case Dwe:return lwe(+e,+n);case mwe:return e.name==n.name&&e.message==n.message;case gwe:case ywe:return e==n+"";case hwe:var l=swe;case Rwe:var s=t&fwe;if(l||(l=vwe),e.size!=n.size&&!s)return!1;var m=i.get(e);if(m)return m==n;t|=_we,i.set(e,n);var p=cwe(l(e),l(n),t,r,u,i);return i.delete(e),p;case bwe:if(IM)return IM.call(e)==IM.call(n)}return!1}JH.exports=Iwe});var $H=Ge((QWa,WH)=>{function Twe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var Swe=Array.isArray;zH.exports=Swe});var QH=Ge((YWa,VH)=>{var Cwe=$H(),Fwe=i1();function Gwe(e,n,a){var t=n(e);return Fwe(e)?t:Cwe(t,a(e))}VH.exports=Gwe});var YH=Ge((XWa,KH)=>{function Mwe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function Awe(){return[]}XH.exports=Awe});var aJ=Ge((e$a,nJ)=>{var Lwe=YH(),xwe=ZH(),Pwe=Object.prototype,jwe=Pwe.propertyIsEnumerable,eJ=Object.getOwnPropertySymbols,Nwe=eJ?function(e){return e==null?[]:(e=Object(e),Lwe(eJ(e),function(n){return jwe.call(e,n)}))}:xwe;nJ.exports=Nwe});var rJ=Ge((n$a,tJ)=>{function Owe(e,n){for(var a=-1,t=Array(e);++a{function Uwe(e){return e!=null&&typeof e=="object"}oJ.exports=Uwe});var iJ=Ge((t$a,uJ)=>{var kwe=uD(),Bwe=cD(),Hwe="[object Arguments]";function Jwe(e){return Bwe(e)&&kwe(e)==Hwe}uJ.exports=Jwe});var vJ=Ge((r$a,sJ)=>{var lJ=iJ(),qwe=cD(),cJ=Object.prototype,Wwe=cJ.hasOwnProperty,$we=cJ.propertyIsEnumerable,zwe=lJ(function(){return arguments}())?lJ:function(e){return qwe(e)&&Wwe.call(e,"callee")&&!$we.call(e,"callee")};sJ.exports=zwe});var _J=Ge((o$a,fJ)=>{function Vwe(){return!1}fJ.exports=Vwe});var TM=Ge((sD,td)=>{var Qwe=Zc(),Kwe=_J(),pJ=typeof sD=="object"&&sD&&!sD.nodeType&&sD,dJ=pJ&&typeof td=="object"&&td&&!td.nodeType&&td,Ywe=dJ&&dJ.exports===pJ,mJ=Ywe?Qwe.Buffer:void 0,Xwe=mJ?mJ.isBuffer:void 0,Zwe=Xwe||Kwe;td.exports=Zwe});var DJ=Ge((u$a,hJ)=>{var e1e=9007199254740991,n1e=/^(?:0|[1-9]\d*)$/;function a1e(e,n){var a=typeof e;return n=n==null?e1e:n,!!n&&(a=="number"||a!="symbol"&&n1e.test(e))&&e>-1&&e%1==0&&e{var t1e=9007199254740991;function r1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t1e}gJ.exports=r1e});var yJ=Ge((l$a,RJ)=>{var o1e=uD(),u1e=SM(),i1e=cD(),l1e="[object Arguments]",c1e="[object Array]",s1e="[object Boolean]",v1e="[object Date]",f1e="[object Error]",_1e="[object Function]",p1e="[object Map]",d1e="[object Number]",m1e="[object Object]",h1e="[object RegExp]",D1e="[object Set]",g1e="[object String]",R1e="[object WeakMap]",y1e="[object ArrayBuffer]",b1e="[object DataView]",w1e="[object Float32Array]",E1e="[object Float64Array]",I1e="[object Int8Array]",T1e="[object Int16Array]",S1e="[object Int32Array]",C1e="[object Uint8Array]",F1e="[object Uint8ClampedArray]",G1e="[object Uint16Array]",M1e="[object Uint32Array]",dr={};dr[w1e]=dr[E1e]=dr[I1e]=dr[T1e]=dr[S1e]=dr[C1e]=dr[F1e]=dr[G1e]=dr[M1e]=!0;dr[l1e]=dr[c1e]=dr[y1e]=dr[s1e]=dr[b1e]=dr[v1e]=dr[f1e]=dr[_1e]=dr[p1e]=dr[d1e]=dr[m1e]=dr[h1e]=dr[D1e]=dr[g1e]=dr[R1e]=!1;function A1e(e){return i1e(e)&&u1e(e.length)&&!!dr[o1e(e)]}RJ.exports=A1e});var wJ=Ge((c$a,bJ)=>{function L1e(e){return function(n){return e(n)}}bJ.exports=L1e});var IJ=Ge((fD,rd)=>{var x1e=DM(),EJ=typeof fD=="object"&&fD&&!fD.nodeType&&fD,vD=EJ&&typeof rd=="object"&&rd&&!rd.nodeType&&rd,P1e=vD&&vD.exports===EJ,CM=P1e&&x1e.process,j1e=function(){try{var e=vD&&vD.require&&vD.require("util").types;return e||CM&&CM.binding&&CM.binding("util")}catch{}}();rd.exports=j1e});var FM=Ge((s$a,CJ)=>{var N1e=yJ(),O1e=wJ(),TJ=IJ(),SJ=TJ&&TJ.isTypedArray,U1e=SJ?O1e(SJ):N1e;CJ.exports=U1e});var GJ=Ge((v$a,FJ)=>{var k1e=rJ(),B1e=vJ(),H1e=i1(),J1e=TM(),q1e=DJ(),W1e=FM(),$1e=Object.prototype,z1e=$1e.hasOwnProperty;function V1e(e,n){var a=H1e(e),t=!a&&B1e(e),r=!a&&!t&&J1e(e),u=!a&&!t&&!r&&W1e(e),i=a||t||r||u,l=i?k1e(e.length,String):[],s=l.length;for(var m in e)(n||z1e.call(e,m))&&!(i&&(m=="length"||r&&(m=="offset"||m=="parent")||u&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||q1e(m,s)))&&l.push(m);return l}FJ.exports=V1e});var AJ=Ge((f$a,MJ)=>{var Q1e=Object.prototype;function K1e(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||Q1e;return e===a}MJ.exports=K1e});var xJ=Ge((_$a,LJ)=>{function Y1e(e,n){return function(a){return e(n(a))}}LJ.exports=Y1e});var jJ=Ge((p$a,PJ)=>{var X1e=xJ(),Z1e=X1e(Object.keys,Object);PJ.exports=Z1e});var OJ=Ge((d$a,NJ)=>{var eEe=AJ(),nEe=jJ(),aEe=Object.prototype,tEe=aEe.hasOwnProperty;function rEe(e){if(!eEe(e))return nEe(e);var n=[];for(var a in Object(e))tEe.call(e,a)&&a!="constructor"&&n.push(a);return n}NJ.exports=rEe});var kJ=Ge((m$a,UJ)=>{var oEe=RM(),uEe=SM();function iEe(e){return e!=null&&uEe(e.length)&&!oEe(e)}UJ.exports=iEe});var HJ=Ge((h$a,BJ)=>{var lEe=GJ(),cEe=OJ(),sEe=kJ();function vEe(e){return sEe(e)?lEe(e):cEe(e)}BJ.exports=vEe});var qJ=Ge((D$a,JJ)=>{var fEe=QH(),_Ee=aJ(),pEe=HJ();function dEe(e){return fEe(e,pEe,_Ee)}JJ.exports=dEe});var zJ=Ge((g$a,$J)=>{var WJ=qJ(),mEe=1,hEe=Object.prototype,DEe=hEe.hasOwnProperty;function gEe(e,n,a,t,r,u){var i=a&mEe,l=WJ(e),s=l.length,m=WJ(n),p=m.length;if(s!=p&&!i)return!1;for(var g=s;g--;){var E=l[g];if(!(i?E in n:DEe.call(n,E)))return!1}var b=u.get(e),I=u.get(n);if(b&&I)return b==n&&I==e;var L=!0;u.set(e,n),u.set(n,e);for(var N=i;++g{var REe=V_(),yEe=Zc(),bEe=REe(yEe,"DataView");VJ.exports=bEe});var YJ=Ge((y$a,KJ)=>{var wEe=V_(),EEe=Zc(),IEe=wEe(EEe,"Promise");KJ.exports=IEe});var ZJ=Ge((b$a,XJ)=>{var TEe=V_(),SEe=Zc(),CEe=TEe(SEe,"Set");XJ.exports=CEe});var nq=Ge((w$a,eq)=>{var FEe=V_(),GEe=Zc(),MEe=FEe(GEe,"WeakMap");eq.exports=MEe});var cq=Ge((E$a,lq)=>{var GM=QJ(),MM=o1(),AM=YJ(),LM=ZJ(),xM=nq(),aq=uD(),od=bM(),tq="[object Map]",AEe="[object Object]",rq="[object Promise]",oq="[object Set]",uq="[object WeakMap]",iq="[object DataView]",LEe=od(GM),xEe=od(MM),PEe=od(AM),jEe=od(LM),NEe=od(xM),Q_=aq;(GM&&Q_(new GM(new ArrayBuffer(1)))!=iq||MM&&Q_(new MM)!=tq||AM&&Q_(AM.resolve())!=rq||LM&&Q_(new LM)!=oq||xM&&Q_(new xM)!=uq)&&(Q_=function(e){var n=aq(e),a=n==AEe?e.constructor:void 0,t=a?od(a):"";if(t)switch(t){case LEe:return iq;case xEe:return tq;case PEe:return rq;case jEe:return oq;case NEe:return uq}return n});lq.exports=Q_});var hq=Ge((I$a,mq)=>{var PM=bH(),OEe=EM(),UEe=qH(),kEe=zJ(),sq=cq(),vq=i1(),fq=TM(),BEe=FM(),HEe=1,_q="[object Arguments]",pq="[object Array]",l1="[object Object]",JEe=Object.prototype,dq=JEe.hasOwnProperty;function qEe(e,n,a,t,r,u){var i=vq(e),l=vq(n),s=i?pq:sq(e),m=l?pq:sq(n);s=s==_q?l1:s,m=m==_q?l1:m;var p=s==l1,g=m==l1,E=s==m;if(E&&fq(e)){if(!fq(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new PM),i||BEe(e)?OEe(e,n,a,t,r,u):UEe(e,n,s,a,t,r,u);if(!(a&HEe)){var b=p&&dq.call(e,"__wrapped__"),I=g&&dq.call(n,"__wrapped__");if(b||I){var L=b?e.value():e,N=I?n.value():n;return u||(u=new PM),r(L,N,a,t,u)}}return E?(u||(u=new PM),kEe(e,n,a,t,r,u)):!1}mq.exports=qEe});var yq=Ge((T$a,Rq)=>{var WEe=hq(),Dq=cD();function gq(e,n,a,t,r){return e===n?!0:e==null||n==null||!Dq(e)&&!Dq(n)?e!==e&&n!==n:WEe(e,n,a,t,gq,r)}Rq.exports=gq});var wq=Ge((S$a,bq)=>{var $Ee=yq();function zEe(e,n){return $Ee(e,n)}bq.exports=zEe});var iW=Ge((BVa,yIe)=>{yIe.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 SK=Ge((eg,SL)=>{typeof window!="undefined"&&function(n,a){typeof eg=="object"&&typeof SL=="object"?SL.exports=a():typeof define=="function"&&define.amd?define([],a):typeof eg=="object"?eg.Hls=a():n.Hls=a()}(eg,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!="undefined"&&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,g,E){this.fn=p,this.context=g,this.once=E||!1}function l(p,g,E,b,I){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,b||p,I),N=r?r+g:g;return p._events[N]?p._events[N].fn?p._events[N]=[p._events[N],L]:p._events[N].push(L):(p._events[N]=L,p._eventsCount++),p}function s(p,g){--p._eventsCount==0?p._events=new u:delete p._events[g]}function m(){this._events=new u,this._eventsCount=0}m.prototype.eventNames=function(){var g=[],E,b;if(this._eventsCount===0)return g;for(b in E=this._events)t.call(E,b)&&g.push(r?b.slice(1):b);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(E)):g},m.prototype.listeners=function(g){var E=r?r+g:g,b=this._events[E];if(!b)return[];if(b.fn)return[b.fn];for(var I=0,L=b.length,N=new Array(L);I0},!1)}function p(g,E){for(var b={main:[E]},I={main:[]},L={main:{}};m(b);)for(var N=Object.keys(b),z=0;z>>8^ja&255^99,ne[Kn]=ja,ue[ja]=Kn;var Ma=yn[Kn],sa=yn[Ma],At=yn[sa],qe=yn[ja]*257^ja*16843008;Y[Kn]=qe<<24|qe>>>8,X[Kn]=qe<<16|qe>>>16,ve[Kn]=qe<<8|qe>>>24,xe[Kn]=qe,qe=At*16843009^sa*65537^Ma*257^Kn*16843008,rn[ja]=qe<<24|qe>>>8,wn[ja]=qe<<16|qe>>>16,dn[ja]=qe<<8|qe>>>24,mn[ja]=qe,Kn?(Kn=Ma^yn[yn[yn[At^Ma]]],zn^=yn[yn[zn]]):Kn=zn=1}},z.expandKey=function(ne){for(var ue=this.uint8ArrayToUint32Array_(ne),Z=!0,Y=0;Y>>6)+1,j=(K[O+2]&60)>>>2,j>Ee.length-1){J.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+j});return}return V=(K[O+2]&1)<<2,V|=(K[O+3]&192)>>>6,l.logger.log("manifest codec:"+S+",ADTS data:type:"+x+",sampleingIndex:"+j+"["+Ee[j]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?j>=6?(x=5,le=new Array(4),W=j-3):(x=2,le=new Array(2),W=j):ie.indexOf("android")!==-1?(x=2,le=new Array(2),W=j):(x=5,le=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&j>=6?W=j-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(j>=6&&V===1||/vivaldi/i.test(ie))||!S&&V===1)&&(x=2,le=new Array(2)),W=j)),le[0]=x<<3,le[0]|=(j&14)>>1,le[1]|=(j&1)<<7,le[1]|=V<<3,x===5&&(le[1]|=(W&14)>>1,le[2]=(W&1)<<7,le[2]|=2<<2,le[3]=0),{config:le,samplerate:Ee[j],channelCount:V,codec:"mp4a.40."+x,manifestCodec:ge}}function p(J,K){return J[K]===255&&(J[K+1]&246)==240}function g(J,K){return J[K+1]&1?7:9}function E(J,K){return(J[K+3]&3)<<11|J[K+4]<<3|(J[K+5]&224)>>>5}function b(J,K){return!!(K+10&&K+j+W<=le)return V=O+S*x,{headerLength:j,frameLength:W,stamp:V}}function $(J,K,O,S,x){var j=N(J.samplerate),W=z(K,O,S,x,j);if(W){var V=W.stamp,le=W.headerLength,ie=W.frameLength,ge={unit:K.subarray(O+le,O+le+ie),pts:V,dts:V};return J.samples.push(ge),{sample:ge,length:ie+le}}}var ne=a("./src/demux/id3.js"),ue=function(){function J(O,S,x){this.observer=O,this.config=x,this.remuxer=S}var K=J.prototype;return K.resetInitSegment=function(S,x,j,W){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:x,duration:W,inputTimeScale:9e4}},K.resetTimeStamp=function(){},J.probe=function(S){if(!S)return!1;for(var x=ne.default.getID3Data(S,0)||[],j=x.length,W=S.length;jO.length)){var W=this.parseHeader(O,S);if(W&&S+W.frameLength<=O.length){var V=W.samplesPerFrame*9e4/W.sampleRate,le=x+j*V,ie={unit:O.subarray(S,S+W.frameLength),pts:le,dts:le};return K.config=[],K.channelCount=W.channelCount,K.samplerate=W.sampleRate,K.samples.push(ie),{sample:ie,length:W.frameLength}}}},parseHeader:function(K,O){var S=K[O+1]>>3&3,x=K[O+1]>>1&3,j=K[O+2]>>4&15,W=K[O+2]>>2&3,V=K[O+2]>>1&1;if(S!==1&&j!==0&&j!==15&&W!==3){var le=S===3?3-x:x===3?3:4,ie=X.BitratesMap[le*14+j-1]*1e3,ge=S===3?0:S===2?1:2,Ee=X.SamplingRateMap[ge*3+W],Ce=K[O+3]>>6==3?1:2,Ae=X.SamplesCoefficients[S][x],un=X.BytesInSlot[x],hn=Ae*8*un,Pe=parseInt(Ae*ie/Ee+V,10)*un;return{sampleRate:Ee,channelCount:Ce,frameLength:Pe,samplesPerFrame:hn}}},isHeaderPattern:function(K,O){return K[O]===255&&(K[O+1]&224)==224&&(K[O+1]&6)!=0},isHeader:function(K,O){return!!(O+1S?(this.word<<=S,this.bitsAvailable-=S):(S-=this.bitsAvailable,x=S>>3,S-=x>>3,this.bytesAvailable-=x,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},K.readBits=function(S){var x=Math.min(this.bitsAvailable,S),j=this.word>>>32-x;return S>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=x,this.bitsAvailable>0?this.word<<=x:this.bytesAvailable>0&&this.loadWord(),x=S-x,x>0&&this.bitsAvailable?j<>>S)!=0)return this.word<<=S,this.bitsAvailable-=S,S;return this.loadWord(),S+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var S=this.skipLZ();return this.readBits(S+1)-1},K.readEG=function(){var S=this.readUEG();return 1&S?1+S>>>1:-1*(S>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(S){var x=8,j=8,W,V;for(W=0;W=S.length){j();return}if(!(S[x].unit.length<32)){var W=this.decrypter.isSync();if(this.decryptAacSample(S,x,j,W),!W)return}}},K.getAvcEncryptedData=function(S){for(var x=Math.floor((S.length-48)/160)*16+16,j=new Int8Array(x),W=0,V=32;V<=S.length-16;V+=160,W+=16)j.set(S.subarray(V,V+16),W);return j},K.getAvcDecryptedUnit=function(S,x){x=new Uint8Array(x);for(var j=0,W=32;W<=S.length-16;W+=160,j+=16)S.set(x.subarray(j,j+16),W);return S},K.decryptAvcSample=function(S,x,j,W,V,le){var ie=this.discardEPB(V.data),ge=this.getAvcEncryptedData(ie),Ee=this;this.decryptBuffer(ge.buffer,function(Ce){V.data=Ee.getAvcDecryptedUnit(ie,Ce),le||Ee.decryptAvcSamples(S,x,j+1,W)})},K.decryptAvcSamples=function(S,x,j,W){for(;;x++,j=0){if(x>=S.length){W();return}for(var V=S[x].units;!(j>=V.length);j++){var le=V[j];if(!(le.length<=48||le.type!==1&&le.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(S,x,j,W,le,ie),!ie)return}}}},J}(),wn=rn,dn={video:1,audio:2,id3:3,text:4},mn=function(){function J(O,S,x,j){this.observer=O,this.config=x,this.typeSupported=j,this.remuxer=S,this.sampleAes=null}var K=J.prototype;return K.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new wn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},J.probe=function(S){var x=J._syncOffset(S);return x<0?!1:(x&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},J._syncOffset=function(S){for(var x=Math.min(1e3,S.length-3*188),j=0;j>4,Ee>1){if(Ce=V+5+S[V+4],Ce===V+188)continue}else Ce=V+4;switch(ge){case _a:ie&&(mt&&(Ae=mr(mt))&&jr(Ae,!1),mt={data:[],size:0}),mt&&(mt.data.push(S.subarray(Ce,V+188)),mt.size+=V+188-Ce);break;case ot:ie&&(Na&&(Ae=mr(Na))&&(En.isAAC?go(Ae):Tr(Ae)),Na={data:[],size:0}),Na&&(Na.data.push(S.subarray(Ce,V+188)),Na.size+=V+188-Ce);break;case Ut:ie&&($t&&(Ae=mr($t))&&eu(Ae),$t={data:[],size:0}),$t&&($t.data.push(S.subarray(Ce,V+188)),$t.size+=V+188-Ce);break;case 0:ie&&(Ce+=S[Ce]+1),ya=this._pmtId=Ka(S,Ce);break;case ya:ie&&(Ce+=S[Ce]+1);var sr=Ct(S,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);_a=sr.avc,_a>0&&(Pe.pid=_a),ot=sr.audio,ot>0&&(En.pid=ot,En.isAAC=sr.isAAC),Ut=sr.id3,Ut>0&&(Vn.pid=Ut),un&&!hn&&(l.logger.log("reparse from beginning"),un=!1,V=Nr-188),hn=this.pmtParsed=!0;break;case 17:case 8191:break;default:un=!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"});mt&&(Ae=mr(mt))?(jr(Ae,!0),Pe.pesData=null):Pe.pesData=mt,Na&&(Ae=mr(Na))?(En.isAAC?go(Ae):Tr(Ae),En.pesData=null):(Na&&Na.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),En.pesData=Na),$t&&(Ae=mr($t))?(eu(Ae),Vn.pesData=null):Vn.pesData=$t,this.sampleAes==null?this.remuxer.remux(En,Pe,Vn,this._txtTrack,x,j,W):this.decryptAndRemux(En,Pe,Vn,this._txtTrack,x,j,W)},K.decryptAndRemux=function(S,x,j,W,V,le,ie){if(S.samples&&S.isAAC){var ge=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){ge.decryptAndRemuxAvc(S,x,j,W,V,le,ie)})}else this.decryptAndRemuxAvc(S,x,j,W,V,le,ie)},K.decryptAndRemuxAvc=function(S,x,j,W,V,le,ie){if(x.samples){var ge=this;this.sampleAes.decryptAvcSamples(x.samples,0,0,function(){ge.remuxer.remux(S,x,j,W,V,le,ie)})}else this.remuxer.remux(S,x,j,W,V,le,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(S,x){return(S[x+10]&31)<<8|S[x+11]},K._parsePMT=function(S,x,j,W){var V,le,ie,ge,Ee={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(S[x+1]&15)<<8|S[x+2],le=x+3+V-4,ie=(S[x+10]&15)<<8|S[x+11],x+=12+ie;x1;){var hn=new Uint8Array(un[0].length+un[1].length);hn.set(un[0]),hn.set(un[1],un[0].length),un[0]=hn,un.splice(1,1)}if(j=un[0],V=(j[0]<<16)+(j[1]<<8)+j[2],V===1){if(le=(j[4]<<8)+j[5],le&&le>S.size-6||(W=j[7],W&192&&(Ee=(j[9]&14)*536870912+(j[10]&255)*4194304+(j[11]&254)*16384+(j[12]&255)*128+(j[13]&254)/2,Ee>4294967295&&(Ee-=8589934592),W&64?(Ce=(j[14]&14)*536870912+(j[15]&255)*4194304+(j[16]&254)*16384+(j[17]&255)*128+(j[18]&254)/2,Ce>4294967295&&(Ce-=8589934592),Ee-Ce>60*9e4&&(l.logger.warn(Math.round((Ee-Ce)/9e4)+"s delta between PTS and DTS, align them"),Ee=Ce)):Ce=Ee),ie=j[8],Ae=ie+9,S.size<=Ae))return null;S.size-=Ae,ge=new Uint8Array(S.size);for(var Pe=0,En=un.length;PeVn){Ae-=Vn;continue}else j=j.subarray(Ae),Vn-=Ae,Ae=0;ge.set(j,x),x+=Vn}return le&&(le-=ie+3),{data:ge,pts:Ee,dts:Ce,len:le}}else return null},K.pushAccesUnit=function(S,x){if(S.units.length&&S.frame){var j=x.samples,W=j.length;if(isNaN(S.pts))if(W){var V=j[W-1];S.pts=V.pts,S.dts=V.dts}else{x.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||x.sps&&(W||this.contiguous)?(S.id=W,j.push(S)):x.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},K._parseAVCPES=function(S,x){var j=this,W=this._avcTrack,V=this._parseAVCNALu(S.data),le=!1,ie,ge=this.avcSample,Ee,Ce=!1,Ae,un=this.pushAccesUnit.bind(this),hn=function(En,Vn,_a,ot){return{key:En,pts:Vn,dts:_a,units:[],debug:ot}};S.data=null,ge&&V.length&&!W.audFound&&(un(ge,W),ge=this.avcSample=hn(!1,S.pts,S.dts,"")),V.forEach(function(Pe){switch(Pe.type){case 1:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="NDR "),ge.frame=!0;var En=Pe.data;if(Ce&&En.length>4){var Vn=new ke(En).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(ge.key=!0)}break;case 5:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="IDR "),ge.key=!0,ge.frame=!0;break;case 6:Ee=!0,le&&ge&&(ge.debug+="SEI "),ie=new ke(j.discardEPB(Pe.data)),ie.readUByte();for(var _a=0,ot=0,Ut=!1,ya=0;!Ut&&ie.bytesAvailable>1;){_a=0;do ya=ie.readUByte(),_a+=ya;while(ya===255);ot=0;do ya=ie.readUByte(),ot+=ya;while(ya===255);if(_a===4&&ie.bytesAvailable!==0){Ut=!0;var mt=ie.readUByte();if(mt===181){var Na=ie.readUShort();if(Na===49){var $t=ie.readUInt();if($t===1195456820){var Ka=ie.readUByte();if(Ka===3){var Ct=ie.readUByte(),mr=ie.readUByte(),jr=31&Ct,go=[Ct,mr];for(Ae=0;Ae16){var Tr=[];for(Ae=0;Ae<16;Ae++)Tr.push(ie.readUByte().toString(16)),(Ae===3||Ae===5||Ae===7||Ae===9)&&Tr.push("-");var eu=ot-16,Nr=new Uint8Array(eu);for(Ae=0;Ae0){if(x.pts>=S[j-1].pts)S.push(x);else for(var W=j-1;W>=0;W--)if(x.pts=0)Ce={data:S.subarray(un,x-ie-1),type:hn},Ee.push(Ce);else{var Pe=this._getLastNalUnit();if(Pe&&(ge&&x<=4-ge&&Pe.state&&(Pe.data=Pe.data.subarray(0,Pe.data.byteLength-ge)),V=x-ie-1,V>0)){var En=new Uint8Array(Pe.data.byteLength+V);En.set(Pe.data,0),En.set(S.subarray(0,V),Pe.data.byteLength),Pe.data=En}}x=0&&ie>=0&&(Ce={data:S.subarray(un,j),type:hn,state:ie},Ee.push(Ce)),Ee.length===0){var Vn=this._getLastNalUnit();if(Vn){var _a=new Uint8Array(Vn.data.byteLength+S.byteLength);_a.set(Vn.data,0),_a.set(S,Vn.data.byteLength),Vn.data=_a}}return le.naluState=ie,Ee},K.discardEPB=function(S){for(var x=S.byteLength,j=[],W=1,V,le;W1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-W)/90)),W=Vn)}for(;Ce>24&255,V[1]=x>>16&255,V[2]=x>>8&255,V[3]=x&255,V.set(O,4),j=0,x=8;j>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,85,196,0,0]))},J.mdia=function(O){return J.box(J.types.mdia,J.mdhd(O.timescale,O.duration),J.hdlr(O.type),J.minf(O))},J.mfhd=function(O){return J.box(J.types.mfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255]))},J.minf=function(O){return O.type==="audio"?J.box(J.types.minf,J.box(J.types.smhd,J.SMHD),J.DINF,J.stbl(O)):J.box(J.types.minf,J.box(J.types.vmhd,J.VMHD),J.DINF,J.stbl(O))},J.moof=function(O,S,x){return J.box(J.types.moof,J.mfhd(O),J.traf(x,S))},J.moov=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trak(O[S]);return J.box.apply(null,[J.types.moov,J.mvhd(O[0].timescale,O[0].duration)].concat(x).concat(J.mvex(O)))},J.mvex=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trex(O[S]);return J.box.apply(null,[J.types.mvex].concat(x))},J.mvhd=function(O,S){S*=O;var x=Math.floor(S/(Ma+1)),j=Math.floor(S%(Ma+1)),W=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,O>>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&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 J.box(J.types.mvhd,W)},J.sdtp=function(O){var S=O.samples||[],x=new Uint8Array(4+S.length),j,W;for(W=0;W>>8&255),S.push(V&255),S=S.concat(Array.prototype.slice.call(W));for(j=0;j>>8&255),x.push(V&255),x=x.concat(Array.prototype.slice.call(W));var le=J.box(J.types.avcC,new Uint8Array([1,S[3],S[4],S[5],252|3,224|O.sps.length].concat(S).concat([O.pps.length]).concat(x))),ie=O.width,ge=O.height,Ee=O.pixelRatio[0],Ce=O.pixelRatio[1];return J.box(J.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,ie>>8&255,ie&255,ge>>8&255,ge&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]),le,J.box(J.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),J.box(J.types.pasp,new Uint8Array([Ee>>24,Ee>>16&255,Ee>>8&255,Ee&255,Ce>>24,Ce>>16&255,Ce>>8&255,Ce&255])))},J.esds=function(O){var S=O.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(O.config).concat([6,1,2]))},J.mp4a=function(O){var S=O.samplerate;return J.box(J.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]),J.box(J.types.esds,J.esds(O)))},J.mp3=function(O){var S=O.samplerate;return J.box(J.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]))},J.stsd=function(O){return O.type==="audio"?!O.isAAC&&O.codec==="mp3"?J.box(J.types.stsd,J.STSD,J.mp3(O)):J.box(J.types.stsd,J.STSD,J.mp4a(O)):J.box(J.types.stsd,J.STSD,J.avc1(O))},J.tkhd=function(O){var S=O.id,x=O.duration*O.timescale,j=O.width,W=O.height,V=Math.floor(x/(Ma+1)),le=Math.floor(x%(Ma+1));return J.box(J.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,V>>24,V>>16&255,V>>8&255,V&255,le>>24,le>>16&255,le>>8&255,le&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,j>>8&255,j&255,0,0,W>>8&255,W&255,0,0]))},J.traf=function(O,S){var x=J.sdtp(O),j=O.id,W=Math.floor(S/(Ma+1)),V=Math.floor(S%(Ma+1));return J.box(J.types.traf,J.box(J.types.tfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255])),J.box(J.types.tfdt,new Uint8Array([1,0,0,0,W>>24,W>>16&255,W>>8&255,W&255,V>>24,V>>16&255,V>>8&255,V&255])),J.trun(O,x.length+16+20+8+16+8+8),x)},J.trak=function(O){return O.duration=O.duration||4294967295,J.box(J.types.trak,J.tkhd(O),J.mdia(O))},J.trex=function(O){var S=O.id;return J.box(J.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]))},J.trun=function(O,S){var x=O.samples||[],j=x.length,W=12+16*j,V=new Uint8Array(W),le,ie,ge,Ee,Ce,Ae;for(S+=8+W,V.set([0,0,15,1,j>>>24&255,j>>>16&255,j>>>8&255,j&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255],0),le=0;le>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255,Ce.isLeading<<2|Ce.dependsOn,Ce.isDependedOn<<6|Ce.hasRedundancy<<4|Ce.paddingValue<<1|Ce.isNonSync,Ce.degradPrio&240<<8,Ce.degradPrio&15,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255],12+16*le);return J.box(J.types.trun,V)},J.initSegment=function(O){J.types||J.init();var S=J.moov(O),x;return x=new Uint8Array(J.FTYP.byteLength+S.byteLength),x.set(J.FTYP),x.set(S,J.FTYP.byteLength),x},J}(),At=sa,qe=9e4;function pa(J,K,O,S){return O===void 0&&(O=1),S===void 0&&(S=!1),Qa(J,K,1/O)}function Qa(J,K,O,S){O===void 0&&(O=1),S===void 0&&(S=!1);var x=J*K*O;return S?Math.round(x):x}function Tn(J,K){return K===void 0&&(K=!1),Qa(J,1e3,1/qe,K)}function Dn(J,K){return K===void 0&&(K=1),Qa(J,qe,1/K)}var We=Dn(10),ea=Dn(.2),va=function(){function J(O,S,x,j){this.observer=O,this.config=S,this.typeSupported=x;var W=navigator.userAgent;this.isSafari=j&&j.indexOf("Apple")>-1&&W&&!W.match("CriOS"),this.ISGenerated=!1}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(S,x,j,W,V,le,ie){if(this.ISGenerated||this.generateIS(S,x,V),this.ISGenerated){var ge=S.samples.length,Ee=x.samples.length,Ce=V,Ae=V;if(ge&&Ee){var un=(S.samples[0].pts-x.samples[0].pts)/x.inputTimeScale;Ce+=Math.max(0,un),Ae+=Math.max(0,-un)}if(ge){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,x,V));var hn=this.remuxAudio(S,Ce,le,ie);if(Ee){var Pe;hn&&(Pe=hn.endPTS-hn.startPTS),x.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,x,V)),this.remuxVideo(x,Ae,le,Pe,ie)}}else if(Ee){var En=this.remuxVideo(x,Ae,le,0,ie);En&&S.codec&&this.remuxEmptyAudio(S,Ce,le,En)}}j.samples.length&&this.remuxID3(j,V),W.samples.length&&this.remuxText(W,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(S,x,j){var W=this.observer,V=S.samples,le=x.samples,ie=this.typeSupported,ge="audio/mp4",Ee={},Ce={tracks:Ee},Ae=this._initPTS===void 0,un,hn;if(Ae&&(un=hn=1/0),S.config&&V.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ie.mpeg?(ge="audio/mpeg",S.codec=""):ie.mp3&&(S.codec="mp3")),Ee.audio={container:ge,codec:S.codec,initSegment:!S.isAAC&&ie.mpeg?new Uint8Array:At.initSegment([S]),metadata:{channelCount:S.channelCount}},Ae&&(un=hn=V[0].pts-S.inputTimeScale*j)),x.sps&&x.pps&&le.length){var Pe=x.inputTimeScale;x.timescale=Pe,Ee.video={container:"video/mp4",codec:x.codec,initSegment:At.initSegment([x]),metadata:{width:x.width,height:x.height}},Ae&&(un=Math.min(un,le[0].pts-Pe*j),hn=Math.min(hn,le[0].dts-Pe*j),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:un}))}Object.keys(Ee).length?(W.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Ce),this.ISGenerated=!0,Ae&&(this._initPTS=un,this._initDTS=hn)):W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(S,x,j,W,V){var le=8,ie,ge,Ee,Ce,Ae,un,hn,Pe=S.timescale,En=S.samples,Vn=[],_a=En.length,ot=this._PTSNormalize,Ut=this._initPTS,ya=this.nextAvcDts,mt=this.isSafari;if(_a!==0){mt&&(j|=En.length&&ya&&(V&&Math.abs(x-ya/Pe)<.1||Math.abs(En[0].pts-ya-Ut)1?l.logger.log("AVC: "+Tn(Ct,!0)+" ms hole between fragments detected,filling it"):Ct<-1&&l.logger.log("AVC: "+Tn(-Ct,!0)+" ms overlapping between fragments detected"),Ae=ya,En[0].dts=Ae,Ce=Math.max(Ce-Ct,ya),En[0].pts=Ce,l.logger.log("Video: PTS/DTS adjusted: "+Tn(Ce,!0)+"/"+Tn(Ae,!0)+", delta: "+Tn(Ct,!0)+" ms")),Ka=En[En.length-1],hn=Math.max(Ka.dts,0),un=Math.max(Ka.pts,0,hn),mt&&(ie=Math.round((hn-Ae)/(En.length-1)));for(var mr=0,jr=0,go=0;go<_a;go++){for(var Tr=En[go],eu=Tr.units,Nr=eu.length,sr=0,Kr=0;Kr0?xo-1:xo].dts;if(ss.stretchShortVideoTrack){var Vi=ss.maxBufferHole,Hd=Math.floor(Vi*Pe),xf=(W?Ce+W*Pe:this.nextAudioPts)-Yr.pts;xf>Hd?(ie=xf-xl,ie<0&&(ie=xl),l.logger.log("It is approximately "+Tn(xf,!1)+" ms to the next segment; using duration "+Tn(ie,!1)+" ms for the last video frame.")):ie=xl}else ie=xl}zi=Math.round(Yr.pts-Yr.dts)}Vn.push({size:di,duration:ie,cts:zi,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:Yr.key?2:1,isNonSync:Yr.key?0:1}})}this.nextAvcDts=hn+ie;var D0=S.dropped;if(S.nbNalu=0,S.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var g0=Vn[0].flags;g0.dependsOn=2,g0.isNonSync=0}S.samples=Vn,Ee=At.moof(S.sequenceNumber++,Ae,S),S.samples=[];var Qi={data1:Ee,data2:ge,startPTS:Ce/Pe,endPTS:(un+ie)/Pe,startDTS:Ae/Pe,endDTS:this.nextAvcDts/Pe,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:D0};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Qi),Qi}},K.remuxAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.timescale,ie=V/le,ge=S.isAAC?1024:1152,Ee=ge*ie,Ce=this._PTSNormalize,Ae=this._initPTS,un=!S.isAAC&&this.typeSupported.mpeg,hn,Pe,En,Vn,_a,ot,Ut=un?0:8,ya=S.samples,mt=[],Na=this.nextAudioPts;if(j|=ya.length&&Na&&(W&&Math.abs(x-Na/V)<.1||Math.abs(ya[0].pts-Na-Ae)<20*Ee),ya.forEach(function(Vi){Vi.pts=Vi.dts=Ce(Vi.pts-Ae,x*V)}),ya=ya.filter(function(Vi){return Vi.pts>=0}),ya.length!==0){if(j||(W?Na=x*V:Na=ya[0].pts),S.isAAC)for(var $t=this.config.maxAudioFramesDrift,Ka=0,Ct=Na;Ka=$t*Ee&&jr.1*Ee,mr.pts=mr.dts=Ct,Ct+=Ee,Ka++}for(var sr=ya.length,Kr=0;sr--;)Kr+=ya[sr].unit.byteLength;for(var Du=0,gu=ya.length;Du0&&di0&&(Pe=ja.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),Pe||(Pe=Yr.subarray()),Kr+=zi*Pe.length);else if(di<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Tn(Na,!0)+" ms / "+Tn(Hu,!0)+" ms / "+Tn(-di,!0)+" ms"),Kr-=Yr.byteLength;continue}Hu=Na}if(_a=Hu,Kr>0){Kr+=Ut;try{En=new Uint8Array(Kr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Kr,reason:"fail allocating audio mdat "+Kr});return}if(!un){var sc=new DataView(En.buffer);sc.setUint32(0,Kr),En.set(At.types.mdat,4)}}else return;for(var cs=0;cs=2&&(Al=mt[sr-2].duration,hn.duration=Al),sr){this.nextAudioPts=Na=ot+ie*Al,S.samples=mt,un?Vn=new Uint8Array:Vn=At.moof(S.sequenceNumber++,_a/ie,S),S.samples=[];var Ll=_a/V,ss=Na/V,xl={data1:Vn,data2:En,startPTS:Ll,endPTS:ss,startDTS:Ll,endDTS:ss,type:"audio",hasAudio:!0,hasVideo:!1,nb:sr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,xl),xl}return null}},K.remuxEmptyAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.samplerate?S.samplerate:V,ie=V/le,ge=this.nextAudioPts,Ee=(ge!==void 0?ge:W.startDTS*V)+this._initDTS,Ce=W.endDTS*V+this._initDTS,Ae=1024,un=ie*Ae,hn=Math.ceil((Ce-Ee)/un),Pe=ja.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!Pe){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var En=[],Vn=0;Vn4294967296;)S+=j;return S},J}(),Aa=va,dt=function(){function J(O){this.observer=O}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(S,x,j,W,V,le,ie,ge){var Ee=this.observer,Ce="";S&&(Ce+="audio"),x&&(Ce+="video"),Ee.trigger(t.default.FRAG_PARSING_DATA,{data1:ge,startPTS:V,startDTS:V,type:Ce,hasAudio:!!S,hasVideo:!!x,nb:1,dropped:0}),Ee.trigger(t.default.FRAG_PARSED)},J}(),vn=dt,oa=Object(s.getSelfScope)(),St;try{St=oa.performance.now.bind(oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),St=oa.Date.now}var Da=function(){function J(O,S,x,j){this.observer=O,this.typeSupported=S,this.config=x,this.vendor=j}var K=J.prototype;return K.destroy=function(){var S=this.demuxer;S&&S.destroy()},K.push=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this;if(S.byteLength>0&&x!=null&&x.key!=null&&x.method==="AES-128"){var Pe=this.decrypter;Pe==null&&(Pe=this.decrypter=new u.default(this.observer,this.config));var En=St();Pe.decrypt(S,x.key.buffer,x.iv.buffer,function(Vn){var _a=St();hn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:En,tdecrypt:_a}}),hn.pushDecrypted(new Uint8Array(Vn),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)})}else this.pushDecrypted(new Uint8Array(S),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)},K.pushDecrypted=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this.demuxer;if(!hn||(ie||ge)&&!this.probe(S)){for(var Pe=this.observer,En=this.typeSupported,Vn=this.config,_a=[{demux:yn,remux:Aa},{demux:Y.default,remux:vn},{demux:Z,remux:Aa},{demux:zn,remux:Aa}],ot=0,Ut=_a.length;ot1?L-1:0),z=1;z1?L-1:0),z=1;z0)return p.subarray(E,E+b)},s._readSize=function(p,g){var E=0;return E=(p[g]&127)<<21,E|=(p[g+1]&127)<<14,E|=(p[g+2]&127)<<7,E|=p[g+3]&127,E},s.getTimeStamp=function(p){for(var g=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ne+=String.fromCharCode(N);break;case 12:case 13:z=p[ue++],ne+=String.fromCharCode((N&31)<<6|z&63);break;case 14:z=p[ue++],$=p[ue++],ne+=String.fromCharCode((N&15)<<12|(z&63)<<6|($&63)<<0);break;default:}}return ne},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(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(m,p){this.observer=m,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,g,E,b){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);g==null&&(g="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:g+","+E,initSegment:b?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:g,initSegment:b?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else g&&(this.audioCodec=g),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,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<8|p[g+1];return E<0?65536+E:E},l.readUint32=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3];return E<0?4294967296+E:E},l.writeUint32=function(p,g,E){p.data&&(g+=p.start,p=p.data),p[g]=E>>24,p[g+1]=E>>16&255,p[g+2]=E>>8&255,p[g+3]=E&255},l.findBox=function(p,g){var E=[],b,I,L,N,z,$,ne;if(p.data?($=p.start,N=p.end,p=p.data):($=0,N=p.byteLength),!g.length)return null;for(b=$;b1?b+I:N,L===g[0]&&(g.length===1?E.push({data:p,start:b+8,end:ne}):(z=l.findBox({data:p,start:b+8,end:ne},g.slice(1)),z.length&&(E=E.concat(z)))),b=ne;return E},l.parseSegmentIndex=function(p){var g=l.findBox(p,["moov"])[0],E=g?g.end:null,b=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var N=I.data[0];b=N===0?8:16;var z=l.readUint32(I,b);b+=4;var $=0,ne=0;N===0?b+=8:b+=16,b+=2;var ue=I.end+ne,Z=l.readUint16(I,b);b+=2;for(var Y=0;Y>>31;if(ke===1){console.warn("SIDX has hierarchical references (not supported)");return}var rn=l.readUint32(I,X);X+=4,L.push({referenceSize:xe,subsegmentDuration:rn,info:{duration:rn/z,start:ue,end:ue+xe-1}}),ue+=xe,X+=4,b=X}return{earliestPresentationTime:$,timescale:z,version:N,referencesCount:Z,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var g=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(b){var I=l.findBox(b,["tkhd"])[0];if(I){var L=I.data[I.start],N=L===0?12:20,z=l.readUint32(I,N),$=l.findBox(b,["mdia","mdhd"])[0];if($){L=$.data[$.start],N=L===0?12:20;var ne=l.readUint32($,N),ue=l.findBox(b,["mdia","hdlr"])[0];if(ue){var Z=l.bin2str(ue.data.subarray(ue.start+8,ue.start+12)),Y={soun:"audio",vide:"video"}[Z];if(Y){var X=l.findBox(b,["mdia","minf","stbl","stsd"]);if(X.length){X=X[0];var ve=l.bin2str(X.data.subarray(X.start+12,X.start+16));t.logger.log("MP4Demuxer:"+Y+":"+ve+" found")}g[z]={timescale:ne,type:Y},g[Y]={timescale:ne,id:z}}}}}}),g},l.getStartDTS=function(p,g){var E,b,I;return E=l.findBox(g,["moof","traf"]),b=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(N){var z,$,ne;return z=l.readUint32(N,4),$=p[z].timescale||9e4,ne=l.findBox(L,["tfdt"]).map(function(ue){var Z,Y;return Z=ue.data[ue.start],Y=l.readUint32(ue,4),Z===1&&(Y*=Math.pow(2,32),Y+=l.readUint32(ue,8)),Y})[0],ne/$})})),I=Math.min.apply(null,b),isFinite(I)?I:0},l.offsetStartDTS=function(p,g,E){l.findBox(g,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(I){var L=l.readUint32(I,4),N=p[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function(z){var $=z.data[z.start],ne=l.readUint32(z,4);if($===0)l.writeUint32(z,4,ne-E*N);else{ne*=Math.pow(2,32),ne+=l.readUint32(z,8),ne-=E*N,ne=Math.max(ne,0);var ue=Math.floor(ne/(u+1)),Z=Math.floor(ne%(u+1));l.writeUint32(z,4,ue),l.writeUint32(z,8,Z)}})})})},s.append=function(p,g,E,b){var I=this.initData;I||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),I=this.initData);var L,N=this.initPTS;if(N===void 0){var z=l.getStartDTS(I,p);this.initPTS=N=z-g,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:N})}l.offsetStartDTS(I,p,N),L=l.getStartDTS(I,p),this.remuxer.remux(I.audio,I.video,null,null,L,E,b,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 KI});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"),m={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},p=function(){function w(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},D.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new z(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},ne(w,[{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)}}]),w}();function Y(w,D){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:o},D.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},D.decimalFloatingPoint=function(v){return parseFloat(this[v])},D.enumeratedString=function(v){return this[v]},D.decimalResolution=function(v){var o=xe.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},w.parseAttrList=function(v){var o,c={};for(ke.lastIndex=0;(o=ke.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},w}(),wn=rn,dn={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 mn(w,D){var f=dn[D];return!!f&&f[w.slice(0,4)]===!0}function yn(w,D){return MediaSource.isTypeSupported((D||"video")+'/mp4;codecs="'+w+'"')}var Kn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,zn=/#EXT-X-MEDIA:(.*)/g,Wn=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),ja=/(?:(?:#(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?/,Ma=/\.(mp4|m4s|m4v|m4a)$/i,sa=function(){function w(){}return w.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},w.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var o=[];Kn.lastIndex=0;function c(P,B){["video","audio"].forEach(function(k){var ae=P.filter(function($e){return mn($e,k)});if(ae.length){var be=ae.filter(function($e){return $e.lastIndexOf("avc1",0)===0||$e.lastIndexOf("mp4a",0)===0});B[k+"Codec"]=be.length>0?be[0]:ae[0],P=P.filter(function($e){return ae.indexOf($e)===-1})}}),B.unknownCodecs=P}for(var _;(_=Kn.exec(f))!=null;){var y={},C=y.attrs=new wn(_[1]);y.url=w.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=w.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(zn.lastIndex=0;(_=zn.exec(f))!==null;){var F=new wn(_[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=w.resolve(F.URI,v)),c.length){var B=w.findGroup(c,P.groupId);P.audioCodec=B?B.codec:c[0].codec}y.push(P)}}return y},w.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new ve(v),P=0,B=null,k=new Z,ae,be,$e,fn=null;for(Wn.lastIndex=0;(ae=Wn.exec(f))!==null;){var fa=ae[1];if(fa){k.duration=parseFloat(fa);var Xn=(" "+ae[2]).slice(1);k.title=Xn||null,k.tagList.push(Xn?["INF",fa,Xn]:["INF",fa])}else if(ae[3]){if(Object(i.isFiniteNumber)(k.duration)){var ua=y++;k.type=c,k.start=C,$e&&(k.levelkey=$e),k.sn=ua,k.level=o,k.cc=P,k.urlId=_,k.baseurl=v,k.relurl=(" "+ae[3]).slice(1),qe(k,B),F.fragments.push(k),B=k,C+=k.duration,k=new Z}}else if(ae[4]){var Ra=(" "+ae[4]).slice(1);B?k.setByteRange(Ra,B):k.setByteRange(Ra)}else if(ae[5])k.rawProgramDateTime=(" "+ae[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),fn===null&&(fn=F.fragments.length);else{if(ae=ae[0].match(ja),!ae){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(be=1;be=0&&($e.method=ft,$e.key=null,$e.iv=Oa));break}case"START":{var jo=new wn(Ja),T0=jo.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(T0)&&(F.startTimeOffset=T0);break}case"MAP":{var S0=new wn(Ja);k.relurl=S0.URI,S0.BYTERANGE&&k.setByteRange(S0.BYTERANGE),k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,k=new Z,k.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ae);break}}}return k=B,k&&!k.relurl&&(F.fragments.pop(),C-=k.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(gT){return Ma.test(gT.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),k=new Z,k.relurl=F.fragments[0].relurl,k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,F.needSidxRanges=!0),fn&&At(F.fragments,fn),F},w}();function At(w,D){for(var f=w[D],v=D-1;v>=0;v--){var o=w[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function qe(w,D){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):D&&D.programDateTime&&(w.programDateTime=D.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function pa(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Qa=window,Tn=Qa.performance,Dn=function(w){pa(D,w);function D(v){var o;return o=w.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}D.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},D.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return b.AUDIO;case E.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},D.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=D.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(),w.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,B;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,P=c.manifestLoadingRetryDelay,B=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,B=0,P=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,P=c.levelLoadingRetryDelay,B=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var k={timeout:F,maxRetry:C,retryDelay:P,maxRetryDelay:B},ae={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,k,ae),!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=Tn.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=D.getResponseUrl(o,_),B=sa.parseMasterPlaylist(F,P);if(!B.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var k=B.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ae=sa.parseMasterPlaylistMedia(F,P,"AUDIO",k),be=sa.parseMasterPlaylistMedia(F,P,"SUBTITLES");if(ae.length){var $e=!1;ae.forEach(function(fn){fn.url||($e=!0)}),$e===!1&&B[0].audioCodec&&!B[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),ae.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:B,audioTracks:ae,subtitles:be,url:P,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,P=_.level,B=_.type,k=D.getResponseUrl(o,_),ae=Object(i.isFiniteNumber)(F)?F:0,be=Object(i.isFiniteNumber)(P)?P:ae,$e=D.mapContextToLevelType(_),fn=sa.parseLevelPlaylist(o.data,k,be,$e,ae);if(fn.tload=c.tload,B===E.MANIFEST){var fa={url:k,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:k,stats:c,networkDetails:y})}if(c.tparsed=Tn.now(),fn.needSidxRanges){var Xn=fn.initSegment.url;this.load({url:Xn,isSidxRequest:!0,type:B,level:P,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,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 B=F.info;if(!!C){var k=C.fragments[P];k.byteRange.length===0&&k.setByteRange(String(1+B.end-B.start)+"@"+String(B.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 B={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:P,context:o,networkDetails:c};y&&(B.response=y),this.hls.trigger(l.default.ERROR,B)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,P=_.id,B=_.levelDetails;if(!B||!B.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var k=D.canHaveQualityLevels(_.type);if(k)this.hls.trigger(l.default.LEVEL_LOADED,{details:B,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:B,id:P,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break}},D}(g),We=Dn;function ea(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var va=function(w){ea(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=D.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},w.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 B=y[_];B&&(s.logger.warn("abort previous fragment loader for type: "+_),B.abort()),B=y[_]=c.loader=C.fLoader?new F(C):new P(C);var k,ae,be;k={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var $e=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)($e)&&Object(i.isFiniteNumber)(fn)&&(k.rangeStart=$e,k.rangeEnd=fn),ae={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},be={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},B.load(k,ae,be)},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})},D}(g),Aa=va;function dt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var vn=function(w){dt(D,w);function D(v){var o;return o=w.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=D.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},w.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"},B={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},k={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(P,B,k)}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:_})},D}(g),oa=vn;function St(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},it=function(w){St(D,w);function D(v){var o;return o=w.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=D.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,g.prototype.destroy.call(this),w.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 B=P.body;return B.startPTS<=o&&o<=B.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 B=P.range[o];if(B){y=B.time;for(var k=0;k=C&&c<=F){y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))}),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(B){var k=c.fragments[B];c.isPartial(k)&&(y=k.body.startPTS-c.bufferPadding,C=k.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),P<=_&&(F=k.body,P=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=Da.PARTIAL:y=Da.OK:y=Da.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)},D}(g),J={search:function(D,f){for(var v=0,o=D.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=D[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},K=J,O=function(){function w(){}return w.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},w.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,B=v,k=v,ae=0;ae=be&&v<$e)B=be,k=$e,F=k-v;else if(v+o1?c-1:0),y=1;yD?(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>D?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Pe(w,D,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(D.startPTS)){var y=Math.abs(D.startPTS-f);Object(i.isFiniteNumber)(D.deltaPTS)?D.deltaPTS=Math.max(y,D.deltaPTS):D.deltaPTS=y,_=Math.max(f,D.startPTS),f=Math.min(f,D.startPTS),v=Math.max(v,D.endPTS),o=Math.min(o,D.startDTS),c=Math.max(c,D.endDTS)}var C=f-D.start;D.start=D.startPTS=f,D.maxStartPTS=_,D.endPTS=v,D.startDTS=o,D.endDTS=c,D.duration=v-f;var F=D.sn;if(!w||Fw.endSN)return 0;var P,B,k;for(P=F-w.startSN,B=w.fragments,B[P]=D,k=P;k>0;k--)hn(B,k,k-1);for(k=P;kv.length))for(var c=0;cD?-1:0})}function Ka(w,D,f){var v=!1;return D&&D.details&&f&&(f.endCC>f.startCC||w&&w.cc=(o||0))return null;f=f||0;for(var c=0;cw&&f.start?-1:0}function Kr(w,D,f){var v=Math.min(D,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>w}var Du=250,gu=2,xo=.1,Yr=.05,Hu=function(){function w(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 D=w.prototype;return D.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 B=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(B)+"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 k=O.bufferInfo(c,y,0),ae=k.len>0,be=k.nextStart||0;if(!(!ae&&!be)){if(C){var $e=k.len>gu,fn=!be||be-y>gu;if($e||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(be,k.start||0)-y;if(fa>0&&fa<=gu){this._trySkipBufferHole(null);return}}var Xn=self.performance.now();if(_===null){this.stalled=Xn;return}var ua=Xn-_;!C&&ua>=Du&&this._reportStall(k.len);var Ra=O.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ra,ua)}}},D._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())},D._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}))},D._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(){},D}(g);function cs(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var se={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"},Al=function(w){cs(D,w);function D(){return w.apply(this,arguments)||this}var f=D.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=se.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===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=O.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===se.FRAG_LOADING){var P=this.fragCurrent;if(F.len===0&&P){var B=o.maxFragLookUpTolerance,k=P.start-B,ae=P.start+P.duration+B;Cae?(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=se.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===se.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=se.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(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=se.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-_)},D}(sc);function Ll(w,D){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=se.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=se.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case se.BUFFER_FLUSHING:this.fragLoadError=0;break;case se.IDLE:this._doTickIdle();break;case se.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=se.IDLE);break;case se.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=se.IDLE);break;case se.ERROR:case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.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,B;P?B=Math.max(8*c.maxBufferSize/P,c.maxBufferLength):B=c.maxBufferLength,B=Math.min(B,c.maxMaxBufferLength);var k=O.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),ae=k.len;if(!(ae>=B)){s.logger.trace("buffer length of "+ae.toFixed(3)+" is below max of "+B.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var be=F.details;if(!be||be.live&&this.levelLastLoaded!==C){this.state=se.WAITING_LEVEL;return}if(this._streamEnded(k,be)){var $e={};this.altAudio&&($e.type="video"),this.hls.trigger(l.default.BUFFER_EOS,$e),this.state=se.ENDED;return}this._fetchPayloadOrEos(y,k,be)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,P=F.length;if(P!==0){var B=F[0].start,k=F[P-1].start+F[P-1].duration,ae=c.end,be;if(_.initSegment&&!_.initSegment.data)be=_.initSegment;else if(_.live){var $e=this.config.initialLiveManifestSize;if(P<$e){s.logger.warn("Can not start playback of a level, reason: not enough fragments "+P+" < "+$e);return}if(be=this._ensureFragmentAtLivePoint(_,ae,B,k,y,F,P),be===null)return}else ae$e&&$e>k.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+$e.toFixed(3)),k.currentTime=$e),this.nextLoadPosition=$e}if(o.PTSKnown&&c>y&&k&&k.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),ae=eu(F,C.endProgramDateTime,B.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var fa=F[fn-o.startSN];C.cc===fa.cc&&(ae=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ae.sn))}ae||(ae=K.search(F,function(Xn){return C.cc-Xn.cc}),ae&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ae.sn))}ae||(ae=F[Math.min(P-1,Math.round(P/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ae.sn))}return ae},f._findFragment=function(o,c,_,y,C,F,P){var B=this.hls.config,k;if(CF-B.maxFragLookUpTolerance?0:B.maxFragLookUpTolerance;k=Nr(c,y,C,ae)}else k=y[_-1];if(k){var be=k.sn-P.startSN,$e=c&&k.level===c.level,fn=y[be-1],fa=y[be+1];if(c&&k.sn===c.sn)if($e&&!k.backtracked)if(k.snB.maxBufferHole&&c.dropped&&be?(k=fn,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")):(k=fa,s.logger.log("Re-loading fragment with SN: "+k.sn))}else k=null;else k.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+k.sn+". Loading fragment "+fa.sn),k=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),k.dropped=0,fn?(k=fn,k.backtracked=!0):be&&(k=null)))}return k},f._loadKey=function(o){this.state=se.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===Da.NOT_LOADED||c===Da.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Ae(this.hls,"main")),this.state=se.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,b.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),O.isBuffered(_,c)?o=this.getBufferedFrag(c):O.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,O.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 B=this.fragCurrent;B&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=se.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 Hu(_,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 B=C.details;B&&c.fragments.length>0?(En(B,c),P=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(P,B),c.PTSKnown&&Object(i.isFiniteNumber)(P)?s.logger.log("live playlist sliding:"+P.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),jr(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,jr(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 k=c.startTimeOffset;Object(i.isFiniteNumber)(k)?(k<0&&(s.logger.log("negative start time offset "+k+", count from end of last fragment"),k=P+F+k),s.logger.log("start time offset found in playlist, adjust startPosition to "+k),this.startPosition=k):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===se.WAITING_LEVEL&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.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===se.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var P=o.stats,B=y[c.level],k=B.details;if(this.bitrateTest=!1,this.stats=P,s.logger.log("Loaded "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=se.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=se.IDLE,P.tparsed=P.tbuffered=window.performance.now(),k.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 ["+k.startSN+" ,"+k.endSN+"],level "+c.level+", cc "+c.cc),this.state=se.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var ae=!(C&&C.seeking)&&(k.PTSKnown||!k.live),be=k.initSegment?k.initSegment.data:[],$e=this._getAudioCodec(B),fn=this.demuxer=this.demuxer||new Ae(this.hls,"main");fn.push(o.payload,be,$e,B.videoCodec,c,k.totalduration,ae)}}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===se.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,B=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&&B.indexOf("firefox")===-1&&(P="mp4a.40.5"),B.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 k=F.initSegment;k&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:k,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===se.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(ue.AUDIO),o.hasVideo===!0&&F.addElementaryStream(ue.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=se.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var B=Pe(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),k=this.hls;k.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:B,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ae){ae&&ae.length&&c.state===se.PARSING&&(c.appended=!0,c.pendingBuffering=!0,k.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:ae,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===se.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=se.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=se.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===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+mt.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=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&O.isBuffered(this.media,this.media.currentTime)&&O.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=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==se.ERROR&&(o.fatal?(this.state=se.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===se.WAITING_LEVEL&&(this.state=se.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===se.PARSING||this.state===se.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=se.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=se.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(ue.VIDEO,o.buffered),this.state=se.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},ss(D,[{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}}]),D}(Al),xf=Hd;function D0(w,D){for(var f=0;f0){y=c[0].bitrate,c.sort(function(ae,be){return ae.bitrate-be.bitrate}),this._levels=c;for(var k=0;k=0&&o1&&B.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:_})}}},g0(D,[{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)}}]),D}(g),y0=a("./src/demux/id3.js");function bg(w,D){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=w,D.dispatchEvent(f)}function lv(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function gI(w,D){if(Dw[w.length-1].endTime)return w[w.length-1];for(var f=0,v=w.length-1;f<=v;){var o=Math.floor((v+f)/2);if(Dw[o].endTime)f=o+1;else return w[o]}return w[f].endTime-DB&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),B=P+.25);for(var k=0;k=this.minWeight_},D.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},D.destroy=function(){},w}(),EI=wI;function Ig(w,D){for(var f=0;f500*_.duration/B){var k=o.levels,ae=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/P),be=k[_.level],$e=be.realBitrate?Math.max(be.realBitrate,be.bitrate):be.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*$e/8)),fa=c.currentTime,Xn=(fn-F.loaded)/ae,ua=(O.bufferInfo(c,fa,o.config.maxBufferHole).end-fa)/B;if(ua<2*_.duration/B&&Xn>ua){var Ra,Ja;for(Ja=_.level-1;Ja>C;Ja--){var qu=k[Ja].realBitrate?Math.max(k[Ja].realBitrate,k[Ja].bitrate):k[Ja].bitrate,nu=_.duration*qu/(8*.8*ae);if(nu=y;ae--){var be=k[ae];if(!!be){var $e=be.details,fn=$e?$e.totalduration/$e.fragments.length:c,fa=$e?$e.live:!1,Xn=void 0;ae<=o?Xn=P*_:Xn=B*_;var ua=k[ae].realBitrate?Math.max(k[ae].realBitrate,k[ae].bitrate):k[ae].bitrate,Ra=ua*fn/Xn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ae+"/"+Math.round(Xn)+"/"+ua+"/"+fn+"/"+F+"/"+Ra),Xn>ua&&(!Ra||fa&&!this.bitrateTestDelay||Ra=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=B?Math.min(B,y.maxStarvationDelay):y.maxStarvationDelay,Xn=y.abrBandWidthFactor,ua=y.abrBandWidthUpFactor;if($e===0){var Ra=this.bitrateTestDelay;if(Ra){var Ja=B?Math.min(B,y.maxLoadingDelay):y.maxLoadingDelay;fa=Ja-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Xn=ua=1}}return fn=this._findBestLevel(P,B,be,C,c,$e+fa,Xn,ua,_),Math.max(fn,0)}}]),D}(g),FI=CI;function GI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Sg=W(),MI=function(w){GI(D,w);function D(v){var o;return o=w.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(k,ae){return ae.parent===_?k+1:k},0),C={},F=o.sourceBuffer;for(var P in F){var B=F[P];if(!B)throw Error("handling source buffer update end error: source buffer for "+P+" uninitilized and unable to update buffered TimeRanges.");C[P]=B.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=D.prototype;return f.destroy=function(){g.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&&Sg){var _=this.mediaSource=new Sg;_.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 B=c[y]=_.addSourceBuffer(P);B.addEventListener("updateend",this._onSBUpdateEnd),B.addEventListener("error",this._onSBUpdateError),this.tracks[y]={buffer:B,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(k){s.logger.error("error while trying to add sourceBuffer:"+k.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:k,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],B=_[P];if(B){var k=B.buffered;k.length>0&&C>k.start(0)&&this.removeBufferRange(P,B,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(B){s.logger.error("error while trying to append buffer:"+B.message),_.unshift(C);var P={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};B.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 ae="null";return this.media&&(ae=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+B+","+k+"], of ["+F+","+P+"], pos:"+ae),c.remove(B,k),!0}}}catch(be){s.logger.warn("removeBufferRange failed",be)}return!1},D}(g),AI=MI;function Cg(w,D){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 D.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return D.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)},D.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},D.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var y=function(k,ae){return ae?k.width!==ae.width||k.height!==ae.height:!0},C=o.length-1,F=0;F=c||P.height>=_)&&y(P,o[F+1])){C=F;break}}return C},LI(D,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=D.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=D.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),D}(g),Fg=xI;function PI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fs=window,jI=fs.performance,$d=function(w){PI(D,w);function D(v){return w.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=D.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=jI.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,P=c-this.lastDecodedFrames,B=1e3*F/C,k=this.hls;if(k.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:P,totalDroppedFrames:_}),B>0&&F>k.config.fpsDroppedMonitoringThreshold*P){var ae=k.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+ae),ae>0&&(k.autoLevelCapping===-1||k.autoLevelCapping>=ae)&&(ae=ae-1,k.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:ae,droppedLevel:k.currentLevel}),k.autoLevelCapping=ae,k.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)},D}(g),NI=$d,Gg=window,zd=Gg.performance,OI=Gg.XMLHttpRequest,UI=function(){function w(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var D=w.prototype;return D.destroy=function(){this.abort(),this.loader=null},D.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},D.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:zd.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},D.loadInternal=function(){var v,o=this.context;v=this.loader=new OI;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()},D.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(zd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,zd.now());var P,B;y.responseType==="arraybuffer"?(P=o.response,B=P.byteLength):(P=o.responseText,B=P.length),_.loaded=_.total=B;var k={url:o.responseURL,data:P};this.callbacks.onSuccess(k,_,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)},D.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},D.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)},w}(),Vd=UI;function Mg(w,D){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(B){return B.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,P=function(){c.forEach(function(k){F||(!o.audioGroupId||k.groupId===o.audioGroupId)&&(!y||y===k.name)&&(o._setAudioTrack(k.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=se.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=se.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=se.STOPPED},f.doTick=function(){var o,c,_,y=this.hls,C=y.config;switch(this.state){case se.ERROR:case se.PAUSED:case se.BUFFER_FLUSHING:break;case se.STARTING:this.state=se.WAITING_TRACK,this.loadedmetadata=!1;break;case se.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,B=this.videoBuffer?this.videoBuffer:this.media,k=O.bufferInfo(P,o,C.maxBufferHole),ae=O.bufferInfo(B,o,C.maxBufferHole),be=k.len,$e=k.end,fn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Xn=Math.max(fa,ae.len),ua=this.audioSwitch,Ra=this.trackId;if((benu||k.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=nu+.05;else return}if(_.initSegment&&!_.initSegment.data)ft=_.initSegment;else if($e<=nu){if(ft=Ja[0],this.videoTrackCC!==null&&ft.cc!==this.videoTrackCC&&(ft=$t(Ja,this.videoTrackCC)),_.live&&ft.loadIdx&&ft.loadIdx===this.fragLoadIdx){var ht=k.nextStart?k.nextStart:nu;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ht+.05)),this.media.currentTime=ht+.05;return}}else{var Oa,jo=C.maxFragLookUpTolerance,T0=fn?Ja[fn.sn-Ja[0].sn+1]:void 0,S0=function(am){var O2=Math.min(jo,am.duration);return am.start+am.duration-O2<=$e?1:am.start-O2>$e&&am.start?-1:0};$eXi-jo&&(jo=0),T0&&!S0(T0)?Oa=T0:Oa=K.search(Ja,S0)):Oa=Ja[qu-1],Oa&&(ft=Oa,nu=Oa.start,fn&&ft.level===fn.level&&ft.sn===fn.sn&&(ft.sn<_.endSN?(ft=Ja[ft.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+ft.sn)):ft=null))}ft&&(ft.encrypted?(s.logger.log("Loading key for "+ft.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=se.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:ft})):(s.logger.log("Loading "+ft.sn+", cc: "+ft.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+$e.toFixed(3)),this.fragCurrent=ft,(ua||this.fragmentTracker.getState(ft)===Da.NOT_LOADED)&&(ft.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(ft.sn)&&(this.nextLoadPosition=ft.start+ft.duration),y.trigger(l.default.FRAG_LOADING,{frag:ft}),this.state=se.FRAG_LOADING)))}break;case se.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var gT=Pl.now(),P2=this.retryDate;P=this.media;var KZ=P&&P.seeking;(!P2||gT>=P2||KZ)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.WAITING_INIT_PTS:var RT=this.videoTrackCC;if(this.initPTS[RT]===void 0)break;var j2=this.waitingFragment;if(j2){var N2=j2.frag.cc;RT!==N2?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+N2+") does not match video track CC ("+RT+")"),this.waitingFragment=null,this.state=se.IDLE)):(this.state=se.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=se.IDLE;break;case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.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=se.PAUSED,this.waitingFragment=null,c?this.setInterval(xg):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=se.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?(En(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 B=c.startTimeOffset;Object(i.isFiniteNumber)(B)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+B),this.startPosition=B):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===se.WAITING_TRACK&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===se.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,B=c.sn,k=c.cc,ae=this.config.defaultAudioCodec||y.audioCodec||"mp4a.40.2",be=this.stats=o.stats;if(B==="initSegment")this.state=se.IDLE,be.tparsed=be.tbuffered=Pl.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:be,frag:c,id:"audio"}),this.tick();else{this.state=se.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Ae(this.hls,"audio"));var $e=this.initPTS[k],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||$e!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P);var fa=!1;this.demuxer.push(o.payload,fn,ae,null,c,F,fa,$e)}else s.logger.log("unknown video PTS for continuity counter "+k+", waiting for video PTS before demuxing audio frag "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P),this.waitingFragment=o,this.state=se.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===se.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===se.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(ue.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),Pe(F.details,_,o.startPTS,o.endPTS);var B=this.audioSwitch,k=this.media,ae=!1;if(B)if(k&&k.readyState){var be=k.currentTime;s.logger.log("switching audio track : currentTime:"+be),be>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=se.BUFFER_FLUSHING,P.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ae=!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 $e=this.pendingData;if(!$e){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(fn){fn&&fn.length&&$e.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ae&&$e.length&&($e.forEach(function(fn){c.state===se.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,fn))}),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===se.PARSING&&(this.stats.tparsed=Pl.now(),this.state=se.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===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=Pl.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 : "+mt.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=se.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=Pl.now()+F,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.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!==se.ERROR&&(this.state=o.fatal?se.ERROR:se.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===se.PARSING||this.state===se.PARSED)){var P=this.mediaBuffer,B=this.media.currentTime,k=P&&O.isBuffered(P,B)&&O.isBuffered(P,B+.5);if(k){var ae=this.config;ae.maxMaxBufferLength>=ae.maxBufferLength&&(ae.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+ae.maxMaxBufferLength+"s")),this.state=se.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=se.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=se.PARSED):(this.state=se.IDLE,this.fragPrevious=null,this.tick())},Pf(D,[{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}}]),D}(Al),WI=qI,Pg=function(){if(typeof window!="undefined"&&window.VTTCue)return window.VTTCue;var w="auto",D={"":!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=D[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.");qu=Oa,this.hasBeenReset=!0}})),Object.defineProperty(P,"positionAlign",c({},B,{get:function(){return nu},set:function(Oa){var jo=o(Oa);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");nu=jo,this.hasBeenReset=!0}})),Object.defineProperty(P,"size",c({},B,{get:function(){return Xi},set:function(Oa){if(Oa<0||Oa>100)throw new Error("Size must be between 0 and 100.");Xi=Oa,this.hasBeenReset=!0}})),Object.defineProperty(P,"align",c({},B,{get:function(){return ft},set:function(Oa){var jo=o(Oa);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");ft=jo,this.hasBeenReset=!0}})),P.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_}(),$I=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function jg(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new $I,this.regionList=[]}function zI(w){function D(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=w.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?D(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?D(f[1],f[2],0,f[4]):D(0,f[1],f[2],f[4]):null}function Ng(){this.values=Object.create(null)}Ng.prototype={set:function(D,f){!this.get(D)&&f!==""&&(this.values[D]=f)},get:function(D,f,v){return v?this.has(D)?this.values[D]:f[v]:this.has(D)?this.values[D]:f},has:function(D){return D in this.values},alt:function(D,f,v){for(var o=0;o=0&&f<=100)?(this.set(D,f),!0):!1}};function Og(w,D,f,v){var o=v?w.split(v):[w];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var y=_[0],C=_[1];D(y,C)}}}var jf=new Pg(0,0,0),Yi=jf.align==="middle"?"middle":"center";function VI(w,D,f){var v=w;function o(){var y=zI(w);if(y===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),y}function c(y,C){var F=new Ng;Og(y,function(k,ae){switch(k){case"region":for(var be=f.length-1;be>=0;be--)if(f[be].id===ae){F.set(k,f[be].region);break}break;case"vertical":F.alt(k,ae,["rl","lr"]);break;case"line":var $e=ae.split(","),fn=$e[0];F.integer(k,fn),F.percent(k,fn)&&F.set("snapToLines",!1),F.alt(k,fn,["auto"]),$e.length===2&&F.alt("lineAlign",$e[1],["start",Yi,"end"]);break;case"position":$e=ae.split(","),F.percent(k,$e[0]),$e.length===2&&F.alt("positionAlign",$e[1],["start",Yi,"end","line-left","line-right","auto"]);break;case"size":F.percent(k,ae);break;case"align":F.alt(k,ae,["start",Yi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var P=F.get("line","auto");P==="auto"&&jf.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",Yi);var B=F.get("position","auto");B==="auto"&&jf.position===50&&(B=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=B}function _(){w=w.replace(/^\s+/,"")}if(_(),D.startTime=o(),_(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);w=w.substr(3),_(),D.endTime=o(),_(),c(w,D)}function Ug(w){return w.replace(//gi,` `)}jg.prototype={parse:function(D){var f=this;D&&(f.buffer+=f.decoder.decode(D,{stream:!0}));function v(){var F=f.buffer,P=0;for(F=Ug(F);P")===-1){f.cue.id=c;continue}case"CUE":try{VI(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 D=this;try{if(D.buffer+=D.decoder.decode(),(D.cue||D.state==="HEADER")&&(D.buffer+=` `,D.parse()),D.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return D.onflush&&D.onflush(),this}};var QI=jg;function KI(w,D,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))),w.addCue(c)}}var Qd={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},kg=function(D){var f=D;return Qd.hasOwnProperty(D)&&(f=Qd[D]),String.fromCharCode(f)},Ju=15,jl=100,YI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},XI={17:2,18:4,21:6,22:8,23:10,19:13,20:15},ZI={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},eT={25:2,26:4,29:6,30:8,31:10,27:13,28:15},nT=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Bg;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(Bg||(Bg={}));var Ya={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(D){this.time=D},log:function(D,f){var v=this.verboseFilter[D];this.verboseLevel>=v}},_s=function(D){for(var f=[],v=0;vjl&&(Ya.log("ERROR","Too large cursor position "+this.pos),this.pos=jl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=kg(v);if(this.pos>=jl){Ya.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)},D.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},D.getTextAndFormat=function(){return this.rows},w}(),w0=function(){function w(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 Xa,this.nonDisplayedMemory=new Xa,this.lastOutputScreen=new Xa,this.currRollUpRow=this.displayedMemory.rows[Ju-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var D=w.prototype;return D.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[Ju-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},D.getHandler=function(){return this.outputFilter},D.setHandler=function(v){this.outputFilter=v},D.setPAC=function(v){this.writeScreen.setPAC(v)},D.setBkgData=function(v){this.writeScreen.setBkgData(v)},D.setMode=function(v){v!==this.mode&&(this.mode=v,Ya.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)},D.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]}Ya.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Ya.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))},D.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),E0=function(){function w(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 w0(1,v),new w0(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 D=w.prototype;return D.getHandler=function(v){return this.channels[v].getHandler()},D.setHandler=function(v,o){this.channels[v].setHandler(o)},D.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Ya.setTime(v);for(var F=0;F ("+_s([_,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 Ya.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ya.log("WARNING","Couldn't parse cleaned data "+_s([_,y])+" orig: "+_s([o[F],o[F+1]])))}},D.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,Ya.log("DEBUG","Repeated command ("+_s([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},D.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 Ya.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Ya.log("DEBUG","MIDROW ("+_s([v,o])+")"),!0}return!1},D.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?YI[v]:ZI[v]:_=c===1?XI[v]:eT[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},D.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,_},D.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,Ya.log("INFO","Special char '"+kg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=_s(_);Ya.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},D.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=nT[_],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},D.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},w}(),Yd=function(D,f,v){return D.substr(v||0,f.length)===f},oT=function(D){var f=parseInt(D.substr(-3)),v=parseInt(D.substr(-6,2)),o=parseInt(D.substr(-9,2)),c=D.length>9?parseInt(D.substr(0,D.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:"+D);return f+=1e3*v,f+=60*1e3*o,f+=60*60*1e3*c,f},I0=function(D){for(var f=5381,v=D.length;v;)f=f*33^D.charCodeAt(--v);return(f>>>0).toString()},uT=function(D,f,v){var o=D[f],c=D[o.prevCC];if(!c||!c.new&&o.new){D.ccOffset=D.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)D.ccOffset+=o.start-c.start,o.new=!1,o=c,c=D[o.prevCC];D.presentationOffset=v},iT={parse:function(D,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(y0.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(y,` `).split(` `),F="00:00.000",P=0,B=0,k=0,ae=[],be,$e=!0,fn=!1,fa=new QI;fa.oncue=function(Xn){var ua=v[o],Ra=v.ccOffset;ua&&ua.new&&(B!==void 0?Ra=v.ccOffset=ua.start:uT(v,o,k)),k&&(Ra=k-v.presentationOffset),fn&&(Xn.startTime+=Ra-B,Xn.endTime+=Ra-B),Xn.id=I0(Xn.startTime.toString())+I0(Xn.endTime.toString())+I0(Xn.text),Xn.text=decodeURIComponent(encodeURIComponent(Xn.text)),Xn.endTime>0&&ae.push(Xn)},fa.onparsingerror=function(Xn){be=Xn},fa.onflush=function(){if(be&&_){_(be);return}c(ae)},C.forEach(function(Xn){if($e)if(Yd(Xn,"X-TIMESTAMP-MAP=")){$e=!1,fn=!0,Xn.substr(16).split(",").forEach(function(ua){Yd(ua,"LOCAL:")?F=ua.substr(6):Yd(ua,"MPEGTS:")&&(P=parseInt(ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),P-=f,B=oT(F)/1e3,k=P/9e4}catch(ua){fn=!1,be=ua}return}else Xn===""&&($e=!1);fa.parse(Xn+` `)}),fa.flush()}},lT=iT;function Jg(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function cT(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var sT=function(w){cT(D,w);function D(v){var o;if(o=w.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 Hg(Jg(o),"textTrack1"),_=new Hg(Jg(o),"textTrack2");o.cea608Parser=new rT(0,c,_)}return o}var f=D.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,P=C.length;P--;){var B=C[P],k=vT(B[0],B[1],c,_);if(k>=0&&(B[0]=Math.min(B[0],c),B[1]=Math.max(B[1],_),F=!0,k/(_-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 B=Ut(P.details,y,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+B+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},B)}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=d(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(B){B.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=d(this.media.textTracks),_=0;_=y[P].start&&F<=y[P].end){C=y[P];break}var B=c.start+c.duration;C?C.end=B:(C={start:F,end:B},y.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=se.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=se.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=se.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(da)},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&&Vn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(da))},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,y=o.frag,C=this.hls;if(this.state===se.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=pn.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(P){var B=pn.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:P,stats:{tstart:F,tdecrypt:B}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=se.IDLE;return}switch(this.state){case se.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,B=Math.min(o.maxBufferLength,o.maxMaxBufferLength),k=O.bufferedInfo(this._getBuffered(),y.currentTime,F),ae=k.end,be=k.len,$e=C[c].details,fn=$e.fragments,fa=fn.length,Xn=fn[fa-1].start+fn[fa-1].duration;if(be>B)return;var ua,Ra=this.fragPrevious;ae$g){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=$g-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){switch(o.mediaKeySystemDomain){case or.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(or.WIDEVINE,c,_)}},pT(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(g),mT=Vg;function hT(w){for(var D=1;Dc)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)}}]),D}(ie);eR.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=="undefined"?self:window}},"./src/utils/logger.js":function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return g}),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(b,I){return I="["+b+"] > "+I,I}var s=Object(t.getSelfScope)();function m(b){var I=s.console[b];return I?function(){for(var L=arguments.length,N=new Array(L),z=0;z1?I-1:0),N=1;N{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.Direction=void 0;var PMe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(PMe=ng.Direction||(ng.Direction={}))});var FL=Ge(Ga=>{"use strict";var ag=Ga&&Ga.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(m&&mt)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,")"))}Ga.checkBoundaries=BMe;function HMe(e,n,a){return ea?a:e}Ga.checkValuesAgainstBoundaries=HMe;function JMe(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}"))}Ga.checkInitialOverlap=JMe;function qMe(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)}}Ga.getMargin=qMe;function WMe(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)}}Ga.getPaddingAndBorder=WMe;function $Me(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return MK(r,t*n[u].x,n[u].y)})}Ga.translateThumbs=$Me;function zMe(e,n,a,t){for(var r=0,u=LK(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},ZMe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(m){return m});var l=[],s=function(m){var p=AK(a[m],t[m],r,u,i),g=n[m].x;n.forEach(function(E,b){var I=E.x,L=AK(a[b],t[b],r,u,i);m!==b&&(g>=I&&g<=I+L||g+p>=I&&g+p<=I+L)&&(l.includes(b)||(l.push(m),l.push(b),l=ag(ag([],l,!0),[m,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},eAe=function(e,n,a,t,r,u){t===void 0&&(t=.1),r===void 0&&(r=" - "),u===void 0&&(u=function(b){return b});var i=(0,Ga.getStepDecimals)(t),l=(0,CL.useState)({}),s=l[0],m=l[1],p=(0,CL.useState)(u(n[a].toFixed(i))),g=p[0],E=p[1];return(0,CL.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var I={},L=e.getOffsets(),N=ZMe(a,L,b,n,r,i,u),z=u(n[a].toFixed(i));if(N.length){var $=N.reduce(function(X,ve,xe,ke){return X.length?ag(ag([],X,!0),[L[ke[xe]].x],!1):[L[ke[xe]].x]},[]);if(Math.min.apply(Math,$)===L[a].x){var ne=[];N.forEach(function(X){ne.push(n[X].toFixed(i))}),z=Array.from(new Set(ne.sort(function(X,ve){return parseFloat(X)-parseFloat(ve)}))).map(u).join(r);var ue=Math.min.apply(Math,$),Z=Math.max.apply(Math,$),Y=b[N[$.indexOf(Z)]].getBoundingClientRect().width;I.left="".concat(Math.abs(ue-(Z+Y))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(z),m(I)}},[e,n]),[g,s]};Ga.useThumbOverlap=eAe;function LK(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return GK(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var PK=Ge(Ji=>{"use strict";var nAe=Ji&&Ji.__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)}}(),aAe=Ji&&Ji.__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]}),tAe=Ji&&Ji.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),rAe=Ji&&Ji.__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)&&aAe(n,e,a);return tAe(n,e),n},xK=Ji&&Ji.__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,bt.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,bt.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,bt.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,bt.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,m=u.rtl,p=u.direction,g=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=m||p===mo.Direction.Left||p===mo.Direction.Down?-1:1;E!==-1&&(oAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]+b*(r.key==="PageUp"?s*10:s),E)))):uAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){g&&t.fireOnFinalChange()}):g&&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,m=t.props,p=m.direction,g=m.min,E=m.max,b=m.onChange,I=m.values,L=m.step,N=m.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var z=t.trackRef.current;if(!z)return null;var $=z.getBoundingClientRect(),ne=(0,bt.isVertical)(p)?$.height:$.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],Z=u-s[1],Y=0;switch(p){case mo.Direction.Right:case mo.Direction.Left:Y=ue/ne*(E-g);break;case mo.Direction.Down:case mo.Direction.Up:Y=Z/ne*(E-g);break;default:(0,bt.assertUnreachable)(p)}if(N&&(Y*=-1),Math.abs(Y)>=L/2){for(var X=0;XE?Y=E-I[X]:ve=L/2&&b((0,bt.replaceAt)(I,l,t.normalizeValue(ke,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,m=i.step,p=i.allowOverlap,g=i.values;return(0,bt.normalizeValue)(r,u,l,s,m,p,g)},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,bt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?bt.voidFn:this.onMouseDownTrack,onTouchStart:E?bt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:xK(xK([],N.map(function(z,$,ne){return l({props:{style:a.props.direction===mo.Direction.Left||a.props.direction===mo.Direction.Right?{position:"absolute",left:"".concat(z[0],"px"),marginTop:"".concat(z[1],"px")}:{position:"absolute",top:"".concat(z[0],"px"),marginLeft:"".concat(z[1],"px")},key:"mark".concat($),ref:a.markRefs[$]},index:$})}),!0),s.map(function(z,$){var ne=a.state.draggedThumbIndex===$;return u({index:$,value:z,isDragged:ne,props:{style:{position:"absolute",zIndex:L[$],cursor:E?"inherit":ne?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:E?void 0:0,"aria-valuemax":g?p:s[$+1]||p,"aria-valuemin":g?m:s[$-1]||m,"aria-valuenow":z,draggable:!1,ref:a.thumbRefs[$],role:"slider",onKeyDown:E?bt.voidFn:a.onKeyDown,onKeyUp:E?bt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:mo.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(GE.Component);Ji.default=iAe});var jK=Ge(hu=>{"use strict";var lAe=hu&&hu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});hu.checkValuesAgainstBoundaries=hu.relativeValue=hu.useThumbOverlap=hu.Direction=hu.getTrackBackground=hu.Range=void 0;var cAe=lAe(PK());hu.Range=cAe.default;var ME=FL();Object.defineProperty(hu,"getTrackBackground",{enumerable:!0,get:function(){return ME.getTrackBackground}});Object.defineProperty(hu,"useThumbOverlap",{enumerable:!0,get:function(){return ME.useThumbOverlap}});Object.defineProperty(hu,"relativeValue",{enumerable:!0,get:function(){return ME.relativeValue}});Object.defineProperty(hu,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return ME.checkValuesAgainstBoundaries}});var sAe=FE();Object.defineProperty(hu,"Direction",{enumerable:!0,get:function(){return sAe.Direction}})});var CPe={};k2(CPe,{boot:()=>SPe});var B2=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 V2=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 M0=function(e){return e.slice().reverse()};var K2=function(e,n){return n.filter(e)};var Y2=function(){function e(n,a,t,r,u,i){var l,s,m,p,g,E,b;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,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Gt={show:Cx};var Fx=function(e){return e.showRecordFields},hv=function(){return function(){return function(e){var n=Fx(e);return{show:function(a){return"{"+(n(Wa.value)(a)+"}")}}}}};var Bf={show:Tx},an={show:Ix},cm={show:Sx},x0={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])}},te=function(e){return e.show};var Dv=function(e){var n=Ft(e);return function(a){var t=Fx(a);return function(r){var u=te(r);return{showRecordFields:function(i){return function(l){var s=t(Wa.value)(l),m=n(Wa.value),p=No(m)(l);return" "+(m+(": "+(u(p)+(","+s))))}}}}}},gv=function(e){var n=Ft(e);return function(a){var t=te(a);return{showRecordFields:function(r){return function(u){var i=n(Wa.value),l=No(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Re=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ce=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Oe=function(){function e(){}return e.value=new e,e}(),sm=function(e){return e};var P0=function(e){return e.to};var j0=function(e){return e.from};var mee=ln(_n),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 Gx=function(e){var n=Ye(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 In=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])}}},Mt=In(!0)(cn(!1)),Pt=In(!1)(cn(!0));var oe={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},hee=U(oe);var Ue=function(e){return In(e)(mee)},Et=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 nr=function(e){var n=De(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}}}},bu=function(e){var n=He(e),a=nr(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return Ne.value;if(t instanceof G)return me.value;if(r instanceof G)return pe.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 Dr={apply:function(e){return function(n){if(e instanceof T)return hee(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 oe}};var Ve={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 Dr}};var la=function(){return{pure:T.create,Apply0:function(){return Dr}}}();var oo={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return oe}},Dee=function(){return{empty:G.value,Alt0:function(){return oo}}}(),uo={Applicative0:function(){return la},Plus1:function(){return Dee}};var Ie=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Te=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Dc=function(e){return In(new Ie(e))(Te.create)};var ur={map:function(e){return function(n){if(n instanceof Ie)return new Ie(n.value0);if(n instanceof Te)return new Te(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},Ree=U(ur);var jt=function(e){return function(n){return function(a){if(a instanceof Ie)return e(a.value0);if(a instanceof Te)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])}}},Rv=function(){return jt(cn(G.value))(T.create)}();var vm={apply:function(e){return function(n){if(e instanceof Ie)return new Ie(e.value0);if(e instanceof Te)return Ree(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 ur}};var tu={bind:jt(function(e){return function(n){return new Ie(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return vm}};var gc=function(){return{pure:Te.create,Apply0:function(){return vm}}}(),fR={Applicative0:function(){return gc},Bind1:function(){return tu}};var gi=function(e){return e};var Rc={map:function(e){return function(n){return e(n)}}};var Mx={apply:function(e){return function(n){return e(n)}},Functor0:function(){return Rc}},yee={bind:function(e){return function(n){return n(e)}},Apply0:function(){return Mx}},fm={pure:gi,Apply0:function(){return Mx}},ar={Applicative0:function(){return fm},Bind1:function(){return yee}};var Ax=function(e){return Math.min(Math.abs(e),2147483647)},Lx=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},xx=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var IT={Ring0:function(){return dc}};var Xr=function(e){return e.mod};var vr={degree:Ax,div:Lx,mod:xx,CommutativeRing0:function(){return IT}},kr=function(e){return e.div};var It={mempty:"",Semigroup0:function(){return Uf}};var Va=function(e){return e.mempty};var Px=function(e){return function(){return e}},jx=function(e){return function(n){return function(){return n(e())()}}};var TT=function(e){return function(n){return function(){for(var a=0,t=e.length;a>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},lP=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!="undefined"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var Wne=Ht(Be),NP=kl(Ev),$ne=Dt(Be);var J0=function(e){return e.foldrWithIndex};var Tm=function(e){return e.foldlWithIndex};var zne=function(e){var n=J0(e);return function(a){var t=Ye(a.Semigroup0()),r=Va(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},Sm={foldrWithIndex:function(e){return function(n){var a=Wne(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=NP(sn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=$ne(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=NP(sn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return zne(Sm)(e)},Foldable0:function(){return Be}};var OP=function(e){var n=Tm(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 UP=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Tt=function(e){return e},kP=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 SR=isFinite;var CR=Math.abs;var q0=Math.floor,zT=Math.log;var FR=function(e){return function(n){return Math.pow(e,n)}};var u_=Math.round;var BP=2.302585092994046;var HP=kt(lm),JP=nt(lm);var Zne=function(){return kP(T.create)(G.value)}(),bc=Zne(10),Es=function(){return UP(T.create)(G.value)}(),qP=function(e){if(!SR(e))return 0;if(e>=Tt(HP))return HP;if(e<=Tt(JP))return JP;if(je)return Ue(0)(Es(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},GR=function(e){return qP(u_(e))};var Eo=function(e){return qP(q0(e))};function MR(e){return Object.prototype.toString.call(e).slice(8,-1)}function i_(e){return e===null}function l_(e){return e===void 0}var AR=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function WP(e){return e.stack||e.toString()}function Iu(e){return new Error(e)}function W0(e){return e.message}function LR(e){return function(){throw e}}var zP=function(e){return LR(Iu(e))};var VP={show:WP};var Rr=function(e){return e.throwError};var Nt=function(e){return e.catchError};var Cv=function(e){var n=Nt(e),a=e.MonadThrow0().Monad0(),t=U(a.Bind1().Apply0().Functor0()),r=q(a.Applicative0());return function(u){return n(t(Te.create)(u))(function(i){return r(Ie.create(i))})}};var Cr={liftEffect:ln(_n),Monad0:function(){return yc}},gn=function(e){return e.liftEffect};var eae=U(ur);var QT=function(e){return e};var jR=function(e){return e};var NR=function(e){return function(n){return e(n)}},Fm=function(e){var n=U(e);return{map:function(a){return NR(n(eae(a)))}}};var KP=function(e){return{Applicative0:function(){return nl(e)},Bind1:function(){return wc(e)}}},wc=function(e){var n=ee(e.Bind1()),a=q(e.Applicative0());return{bind:function(t){return function(r){return n(t)(jt(function(u){return a(Ie.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return OR(e)}}},OR=function(e){var n=Fm(e.Bind1().Apply0().Functor0());return{apply:Vu(KP(e)),Functor0:function(){return n}}},nl=function(e){return{pure:function(){var n=q(e.Applicative0());return function(a){return QT(n(Te.create(a)))}}(),Apply0:function(){return OR(e)}}};var KT=function(e){var n=KP(e);return{throwError:function(){var a=q(e.Applicative0());return function(t){return QT(a(Ie.create(t)))}}(),Monad0:function(){return n}}};var UR=function(e){var n=Ye(e);return function(a){var t=a.Bind1(),r=ee(t),u=q(a.Applicative0()),i=Fm(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(m){if(m instanceof Te)return u(new Te(m.value0));if(m instanceof Ie)return r(s)(function(p){if(p instanceof Te)return u(new Te(p.value0));if(p instanceof Ie)return u(new Ie(n(m.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): "+[m.constructor.name])})}},Functor0:function(){return i}}}};var Zu=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 kR=function(e){var n=ru(e);return function(a){return new Zu(a,n)}};var YT=function(e){var n=U(e);return{map:function(a){return function(t){return new Zu(a(t.value0),n(a)(t.value1))}}}};var XT=function(e){var n=Sr(e),a=Dt(e),t=Ht(e);return{foldMap:function(r){var u=Ye(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 Vt=function(){function e(){}return e.value=new e,e}(),et=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}(),BR=function(e){return e},cae=function(e){return new et(e.value0,e.value1)};var sae=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof et&&m.value1 instanceof et&&m.value1.value1 instanceof et){r=new et(m,s),t=m.value1.value1.value1;return}var p=function(E){return E instanceof et&&E.value1 instanceof et&&E.value1.value1 instanceof Vt?new et(e(E.value0),new et(e(E.value1.value0),Vt.value)):E instanceof et&&E.value1 instanceof Vt?new et(e(E.value0),Vt.value):Vt.value},g=function(E){return function(b){var I=E,L=!1,N;function z($,ne){if($ instanceof et&&$.value0 instanceof et&&$.value0.value1 instanceof et&&$.value0.value1.value1 instanceof et){I=$.value1,b=new et(e($.value0.value0),new et(e($.value0.value1.value0),new et(e($.value0.value1.value1.value0),ne)));return}return L=!0,ne}for(;!L;)N=z(I,b);return N}};return u=!0,g(s)(p(m))}for(;!u;)i=l(r,t);return i}};return n(Vt.value)},ZT={map:sae};var eS=YT(ZT),Jr={foldr:function(e){return function(n){var a=function(){var r=function(u){return function(i){var l=u,s=!1,m;function p(g,E){if(E instanceof Vt)return s=!0,g;if(E instanceof et){l=new et(E.value0,g),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[g.constructor.name,E.constructor.name])}for(;!s;)m=p(l,i);return m}};return r(Vt.value)}(),t=Dt(Jr)(qa(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,m){if(m instanceof Vt)return u=!0,s;if(m instanceof et){r=e(s)(m.value0),t=m.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[m.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=Ye(e.Semigroup0()),a=Va(e);return function(t){return Dt(Jr)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var vae=Ht(Jr);var Am=XT(Jr);var HR={append:function(e){return function(n){return vae(et.create)(n)(e)}}},ej=Ye(HR);var JR={append:function(e){return function(n){return new Zu(e.value0,ej(e.value1)(cae(n)))}}};var nj={alt:ej,Functor0:function(){return ZT}},nS=function(){return{empty:Vt.value,Alt0:function(){return nj}}}();var gae=ut(Jx);var rj=function(e){return new et(e,Vt.value)};var aS=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Vt)return r=!0,l;if(s instanceof et){t=new et(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(Vt.value)}();var tS=function(e){var n=ee(e.Monad0().Bind1()),a=Uo(e);return function(t){var r=t.Plus1().Alt0(),u=ia(r),i=U(r.Functor0()),l=q(t.Applicative0());return function(s){var m=function(p){return n(u(i(tr.create)(s))(l(new zt(de))))(function(g){return l(gae(function(E){return new et(E,p)})(function(E){return aS(p)})(g))})};return a(m)(Vt.value)}}};var qo=function(e){return Ht(e)(et.create)(Vt.value)};var oj=function(e){return e()};var uj=function(e){throw new Error(e)};var ij=function(){return uj};var Rae=ij(),yae=oj,Ec=function(e){return yae(function(){return Rae(e)})};var WR=function(){var e=kR(nS);return function(n){return BR(e(n))}}();var sj=function(e){return e.value0};var V0=function(e){return e.join("")},xm=function(e){return e.split("")},Tu=function(e){return e},vj=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 Sj(e,n){var a=lS(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=lS(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function Cj(e){return function(n){return function(a){return function(t){var r=lS(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 Fj=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function Gj(e,n,a,t){var r=Fj(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function Mj(e,n,a){return Fj(e,n-1,a).getUTCDay()}function xv(e){return e.charCodeAt(0)}function Aj(e){return String.fromCharCode(e)}var qr=function(e){var n=q(e.Applicative0()),a=ru(e.Plus1());return function(t){if(t)return n(de);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 Lj=nt(mv),xj=kt(mv);var aa=function(e){return e.toEnum};var Hn=function(e){return e.fromEnum},cS=function(e){var n=aa(e),a=Hn(e),t=nt(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=xv(Lj)&&e<=xv(xj)?new T(Aj(e)):G.value},Bae={succ:f_(sS)(xv),pred:__(sS)(xv),Ord0:function(){return sR}};var p_=function(){return{cardinality:xv(xj)-xv(Lj)|0,toEnum:sS,fromEnum:xv,Bounded0:function(){return mv},Enum1:function(){return Bae}}}();var KR=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}},Pj=te(an);var wi=function(){function e(){}return e.value=new e,e}(),tl=function(){function e(){}return e.value=new e,e}(),rl=function(){function e(){}return e.value=new e,e}(),ol=function(){function e(){}return e.value=new e,e}(),ul=function(){function e(){}return e.value=new e,e}(),il=function(){function e(){}return e.value=new e,e}(),Jl=function(){function e(){}return e.value=new e,e}(),iu=function(){function e(){}return e.value=new e,e}(),Su=function(){function e(){}return e.value=new e,e}(),lu=function(){function e(){}return e.value=new e,e}(),Cu=function(){function e(){}return e.value=new e,e}(),Fu=function(){function e(){}return e.value=new e,e}(),cu=function(){function e(){}return e.value=new e,e}(),su=function(){function e(){}return e.value=new e,e}(),Gu=function(){function e(){}return e.value=new e,e}(),Mu=function(){function e(){}return e.value=new e,e}(),Au=function(){function e(){}return e.value=new e,e}(),Lu=function(){function e(){}return e.value=new e,e}(),ai=function(){function e(){}return e.value=new e,e}();var jj={show:function(e){return"(Year "+(Pj(e)+")")}},Nj={show:function(e){if(e instanceof wi)return"Monday";if(e instanceof tl)return"Tuesday";if(e instanceof rl)return"Wednesday";if(e instanceof ol)return"Thursday";if(e instanceof ul)return"Friday";if(e instanceof il)return"Saturday";if(e instanceof Jl)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},YR={show:function(e){if(e instanceof iu)return"January";if(e instanceof Su)return"February";if(e instanceof lu)return"March";if(e instanceof Cu)return"April";if(e instanceof Fu)return"May";if(e instanceof cu)return"June";if(e instanceof su)return"July";if(e instanceof Gu)return"August";if(e instanceof Mu)return"September";if(e instanceof Au)return"October";if(e instanceof Lu)return"November";if(e instanceof ai)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},Oj={show:function(e){return"(Day "+(Pj(e)+")")}},XR=na,ZR=na,Uj=ct,Hae={eq:function(e){return function(n){return e instanceof wi&&n instanceof wi||e instanceof tl&&n instanceof tl||e instanceof rl&&n instanceof rl||e instanceof ol&&n instanceof ol||e instanceof ul&&n instanceof ul||e instanceof il&&n instanceof il||e instanceof Jl&&n instanceof Jl}}},kj={compare:function(e){return function(n){if(e instanceof wi&&n instanceof wi)return Ne.value;if(e instanceof wi)return me.value;if(n instanceof wi)return pe.value;if(e instanceof tl&&n instanceof tl)return Ne.value;if(e instanceof tl)return me.value;if(n instanceof tl)return pe.value;if(e instanceof rl&&n instanceof rl)return Ne.value;if(e instanceof rl)return me.value;if(n instanceof rl)return pe.value;if(e instanceof ol&&n instanceof ol)return Ne.value;if(e instanceof ol)return me.value;if(n instanceof ol)return pe.value;if(e instanceof ul&&n instanceof ul)return Ne.value;if(e instanceof ul)return me.value;if(n instanceof ul)return pe.value;if(e instanceof il&&n instanceof il)return Ne.value;if(e instanceof il)return me.value;if(n instanceof il)return pe.value;if(e instanceof Jl&&n instanceof Jl)return Ne.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 Hae}},vS={eq:function(e){return function(n){return e instanceof iu&&n instanceof iu||e instanceof Su&&n instanceof Su||e instanceof lu&&n instanceof lu||e instanceof Cu&&n instanceof Cu||e instanceof Fu&&n instanceof Fu||e instanceof cu&&n instanceof cu||e instanceof su&&n instanceof su||e instanceof Gu&&n instanceof Gu||e instanceof Mu&&n instanceof Mu||e instanceof Au&&n instanceof Au||e instanceof Lu&&n instanceof Lu||e instanceof ai&&n instanceof ai}}},np={compare:function(e){return function(n){if(e instanceof iu&&n instanceof iu)return Ne.value;if(e instanceof iu)return me.value;if(n instanceof iu)return pe.value;if(e instanceof Su&&n instanceof Su)return Ne.value;if(e instanceof Su)return me.value;if(n instanceof Su)return pe.value;if(e instanceof lu&&n instanceof lu)return Ne.value;if(e instanceof lu)return me.value;if(n instanceof lu)return pe.value;if(e instanceof Cu&&n instanceof Cu)return Ne.value;if(e instanceof Cu)return me.value;if(n instanceof Cu)return pe.value;if(e instanceof Fu&&n instanceof Fu)return Ne.value;if(e instanceof Fu)return me.value;if(n instanceof Fu)return pe.value;if(e instanceof cu&&n instanceof cu)return Ne.value;if(e instanceof cu)return me.value;if(n instanceof cu)return pe.value;if(e instanceof su&&n instanceof su)return Ne.value;if(e instanceof su)return me.value;if(n instanceof su)return pe.value;if(e instanceof Gu&&n instanceof Gu)return Ne.value;if(e instanceof Gu)return me.value;if(n instanceof Gu)return pe.value;if(e instanceof Mu&&n instanceof Mu)return Ne.value;if(e instanceof Mu)return me.value;if(n instanceof Mu)return pe.value;if(e instanceof Au&&n instanceof Au)return Ne.value;if(e instanceof Au)return me.value;if(n instanceof Au)return pe.value;if(e instanceof Lu&&n instanceof Lu)return Ne.value;if(e instanceof Lu)return me.value;if(n instanceof Lu)return pe.value;if(e instanceof ai&&n instanceof ai)return Ne.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 vS}},Bj=ct,ey=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return XR}}}(),Jae=function(){return{bottom:wi.value,top:Jl.value,Ord0:function(){return kj}}}(),ny=function(){return{bottom:iu.value,top:ai.value,Ord0:function(){return np}}}(),Wr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new T(e);if(je)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 ey},Enum1:function(){return qae(0)}},qae=KR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=aa(Wr),n=Hn(Wr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Wr),n=Hn(Wr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return XR}}});var Pv={cardinality:7,toEnum:function(e){return e===1?new T(wi.value):e===2?new T(tl.value):e===3?new T(rl.value):e===4?new T(ol.value):e===5?new T(ul.value):e===6?new T(il.value):e===7?new T(Jl.value):G.value},fromEnum:function(e){if(e instanceof wi)return 1;if(e instanceof tl)return 2;if(e instanceof rl)return 3;if(e instanceof ol)return 4;if(e instanceof ul)return 5;if(e instanceof il)return 6;if(e instanceof Jl)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 Jae},Enum1:function(){return Wae(0)}},Wae=KR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=aa(Pv),n=Hn(Pv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Pv),n=Hn(Pv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return kj}}});var pr={cardinality:12,toEnum:function(e){return e===1?new T(iu.value):e===2?new T(Su.value):e===3?new T(lu.value):e===4?new T(Cu.value):e===5?new T(Fu.value):e===6?new T(cu.value):e===7?new T(su.value):e===8?new T(Gu.value):e===9?new T(Mu.value):e===10?new T(Au.value):e===11?new T(Lu.value):e===12?new T(ai.value):G.value},fromEnum:function(e){if(e instanceof iu)return 1;if(e instanceof Su)return 2;if(e instanceof lu)return 3;if(e instanceof Cu)return 4;if(e instanceof Fu)return 5;if(e instanceof cu)return 6;if(e instanceof su)return 7;if(e instanceof Gu)return 8;if(e instanceof Mu)return 9;if(e instanceof Au)return 10;if(e instanceof Lu)return 11;if(e instanceof ai)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 ny},Enum1:function(){return $ae(0)}},$ae=KR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return np}}});var Hm={bottom:1,top:31,Ord0:function(){return ZR}},xu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if(je)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 Hm},Enum1:function(){return zae(0)}},zae=KR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ZR}}});var ap=DR()();var Hj=ln(_n),ay=function(e){return e},Jj=function(e){return e},tp=function(e){return e};var qj=function(e){return e},rp=function(e){return e.toDuration};var Wj={append:function(e){return function(n){return e+n}}};var ty={append:function(e){return function(n){return e+n}}};var $j=mc;var zj=mc;var ry=function(e){return e.fromDuration};var Fs={fromDuration:ap(ay)(function(e){return e*1e3}),toDuration:ap(tp)(function(e){return e/1e3})},jv={fromDuration:ap(Jj)(function(e){return e*6e4}),toDuration:ap(tp)(function(e){return e/6e4})},op={fromDuration:Hj,toDuration:Hj};var fS={fromDuration:ap(qj)(function(e){return e*864e5}),toDuration:ap(tp)(function(e){return e/864e5})};var Kj=Hn(pr),_S=Et(),Yj=aa(Pv),Qae=te(jj),Kae=te(YR),Yae=te(Oj);var Xae=De(Uj),Zae=De(vS),ete=De(Bj),nte=He(XR),ate=He(np),tte=He(ZR);var rte=aa(pr);var oy=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}(),ti=function(e){return e.value0},Jm=function(e){var n=Mj(e.value0,Kj(e.value1),e.value2),a=n===0;return _S(Yj(a?7:n))},Xj={show:function(e){return"(Date "+(Qae(e.value0)+(" "+(Kae(e.value1)+(" "+(Yae(e.value2)+")")))))}},ri=function(e){return e.value1};var uy={eq:function(e){return function(n){return Xae(e.value0)(n.value0)&&Zae(e.value1)(n.value1)&&ete(e.value2)(n.value2)}}},ote=De(uy),pS={compare:function(e){return function(n){var a=nte(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=ate(e.value1)(n.value1);return t instanceof me?me.value:t instanceof pe?pe.value:tte(e.value2)(n.value2)}},Eq0:function(){return uy}};var Cc=function(e){return e.value2},Nv=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new oy(r,_S(rte(u)),i)}}};return Gj(t,e,Kj(n),a)}}},iy=function(e){return function(n){return function(a){var t=new oy(e,n,a),r=ote(Nv(e)(n)(a))(t);return r?new T(t):G.value}}},dS=function(){return{bottom:new oy(nt(ey),nt(ny),nt(Hm)),top:new oy(kt(ey),kt(ny),kt(Hm)),Ord0:function(){return pS}}}();var ly=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}},cy=te(an);var Zj={show:function(e){return"(Second "+(cy(e)+")")}},eN={show:function(e){return"(Minute "+(cy(e)+")")}},nN={show:function(e){return"(Millisecond "+(cy(e)+")")}},aN={show:function(e){return"(Hour "+(cy(e)+")")}},sy=na,vy=na,fy=na,_y=na,tN=ct,rN=ct,oN=ct,uN=ct,qm={bottom:0,top:59,Ord0:function(){return sy}},Wm={bottom:0,top:59,Ord0:function(){return vy}},$m={bottom:0,top:999,Ord0:function(){return fy}},zm={bottom:0,top:23,Ord0:function(){return _y}},Ei={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(je)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 qm},Enum1:function(){return ute(0)}},ute=ly("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Ei),n=Hn(Ei);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ei),n=Hn(Ei);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return sy}}});var Ii={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(je)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 Wm},Enum1:function(){return ite(0)}},ite=ly("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return vy}}});var Pu={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if(je)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 $m},Enum1:function(){return lte(0)}},lte=ly("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return fy}}});var Ti={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if(je)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 zm},Enum1:function(){return cte(0)}},cte=ly("enumHour","Data.Time.Component",function(){return{succ:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return _y}}});var fte=te(aN),_te=te(eN),pte=te(Zj),dte=te(nN);var mte=De(uN),hte=De(rN),Dte=De(tN),gte=De(oN),Rte=He(_y),yte=He(vy),bte=He(sy),wte=He(fy);var Fc=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}(),iN={show:function(e){return"(Time "+(fte(e.value0)+(" "+(_te(e.value1)+(" "+(pte(e.value2)+(" "+(dte(e.value3)+")")))))))}};var Gs=function(e){return e.value2},Ms=function(e){return e.value1},ll=function(e){return e.value3};var Gc=function(e){return e.value0};var mS={eq:function(e){return function(n){return mte(e.value0)(n.value0)&&hte(e.value1)(n.value1)&&Dte(e.value2)(n.value2)&>e(e.value3)(n.value3)}}},hS={compare:function(e){return function(n){var a=Rte(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=yte(e.value1)(n.value1);if(t instanceof me)return me.value;if(t instanceof pe)return pe.value;var r=bte(e.value2)(n.value2);return r instanceof me?me.value:r instanceof pe?pe.value:wte(e.value3)(n.value3)}},Eq0:function(){return mS}};var up=function(){return{bottom:new Fc(nt(zm),nt(Wm),nt(qm),nt($m)),top:new Fc(kt(zm),kt(Wm),kt(qm),kt($m)),Ord0:function(){return hS}}}();var Ete=Hn(Wr),Ite=Hn(pr),Tte=Hn(xu),Ste=Hn(Ti),Cte=Hn(Ii),Fte=Hn(Ei),Gte=Hn(Pu),Mte=te(Xj),Ate=te(iN),Lte=De(uy),xte=De(mS),Pte=He(pS),jte=He(hS),Nte=ee(Ve),ip=Jn(Dr),DS=U(oe),Ote=zu(Ve),Ute=aa(Wr),kte=aa(pr),Bte=aa(xu),Hte=aa(Ti),Jte=aa(Ii),qte=aa(Ei),Wte=aa(Pu),cl=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}(),gS=function(e){return{year:Ete(ti(e.value0)),month:Ite(ri(e.value0)),day:Tte(Cc(e.value0)),hour:Ste(Gc(e.value1)),minute:Cte(Ms(e.value1)),second:Fte(Gs(e.value1)),millisecond:Gte(ll(e.value1))}},py=function(e){return e.value1},lN={show:function(e){return"(DateTime "+(Mte(e.value0)+(" "+(Ate(e.value1)+")")))}};var $te={eq:function(e){return function(n){return Lte(e.value0)(n.value0)&&xte(e.value1)(n.value1)}}},oi={compare:function(e){return function(n){var a=Pte(e.value0)(n.value0);return a instanceof me?me.value:a instanceof pe?pe.value:jte(e.value1)(n.value1)}},Eq0:function(){return $te}},ui=function(e){var n=rp(e);return function(a){return function(t){return n(Sj(gS(a),gS(t)))}}},Ov=function(e){return e.value0},lp=function(){return{bottom:new cl(nt(dS),nt(up)),top:new cl(kt(dS),kt(up)),Ord0:function(){return oi}}}(),Mc=function(e){var n=ry(e);return function(a){return function(t){return Nte(Cj(T.create)(G.value)(n(a))(gS(t)))(function(r){return ip(DS(cl.create)(Ote(ip(ip(DS(iy)(Ute(r.year)))(kte(r.month)))(Bte(r.day)))))(ip(ip(ip(DS(Fc.create)(Hte(r.hour)))(Jte(r.minute)))(qte(r.second)))(Wte(r.millisecond)))})}}};var vu=function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",m="Sequential",p="Map",g="Apply",E="Alt",b="Cons",I="Resume",L="Release",N="Finalizer",z="Finalized",$="Forked",ne="Fiber",ue="Thunk";function Z(qe,pa,Qa,Tn){this.tag=qe,this._1=pa,this._2=Qa,this._3=Tn}function Y(qe){var pa=function(Qa,Tn,Dn){return new Z(qe,Qa,Tn,Dn)};return pa.tag=qe,pa}function X(qe){return new Z(n,void 0)}function ve(qe){try{qe()}catch(pa){setTimeout(function(){throw pa},0)}}function xe(qe,pa,Qa){try{return pa(Qa())}catch(Tn){return qe(Tn)}}function ke(qe,pa,Qa){try{return pa(Qa)()}catch(Tn){return Qa(qe(Tn))(),X}}var rn=function(){var qe=1024,pa=0,Qa=0,Tn=new Array(qe),Dn=!1;function We(){var ea;for(Dn=!0;pa!==0;)pa--,ea=Tn[Qa],Tn[Qa]=void 0,Qa=(Qa+1)%qe,ea();Dn=!1}return{isDraining:function(){return Dn},enqueue:function(ea){var va,Aa;pa===qe&&(Aa=Dn,We(),Dn=Aa),Tn[(Qa+pa)%qe]=ea,pa++,Dn||We()}}}();function wn(qe){var pa={},Qa=0,Tn=0;return{register:function(Dn){var We=Qa++;Dn.onComplete({rethrow:!0,handler:function(ea){return function(){Tn--,delete pa[We]}}})(),pa[We]=Dn,Tn++},isEmpty:function(){return Tn===0},killAll:function(Dn,We){return function(){if(Tn===0)return We();var ea=0,va={};function Aa(vn){va[vn]=pa[vn].kill(Dn,function(oa){return function(){delete va[vn],ea--,qe.isLeft(oa)&&qe.fromLeft(oa)&&setTimeout(function(){throw qe.fromLeft(oa)},0),ea===0&&We()}})()}for(var dt in pa)pa.hasOwnProperty(dt)&&(ea++,Aa(dt));return pa={},Qa=0,Tn=0,function(vn){return new Z(r,function(){for(var oa in va)va.hasOwnProperty(oa)&&va[oa]()})}}}}}var dn=0,mn=1,yn=2,Kn=3,zn=4,Wn=5,ja=6;function Ma(qe,pa,Qa){var Tn=0,Dn=dn,We=Qa,ea=null,va=null,Aa=null,dt=null,vn=null,oa=0,St=0,Da=null,it=!0;function J(x){for(var j,W,V;;)switch(j=null,W=null,V=null,Dn){case yn:Dn=mn;try{We=Aa(We),dt===null?Aa=null:(Aa=dt._1,dt=dt._2)}catch(ie){Dn=Wn,ea=qe.left(ie),We=null}break;case Kn:qe.isLeft(We)?(Dn=Wn,ea=We,We=null):Aa===null?Dn=Wn:(Dn=yn,We=qe.fromRight(We));break;case mn:switch(We.tag){case i:Aa&&(dt=new Z(b,Aa,dt)),Aa=We._2,Dn=mn,We=We._1;break;case n:Aa===null?(Dn=Wn,We=qe.right(We._1)):(Dn=yn,We=We._1);break;case r:Dn=Kn,We=xe(qe.left,qe.right,We._1);break;case u:Dn=zn,We=ke(qe.left,We._1,function(ie){return function(){Tn===x&&(Tn++,rn.enqueue(function(){Tn===x+1&&(Dn=Kn,We=ie,J(Tn))}))}});return;case a:Dn=Wn,ea=qe.left(We._1),We=null;break;case t:Aa===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Aa,dt),vn,va),va),Aa=null,dt=null,Dn=mn,We=We._1;break;case l:oa++,Aa===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Aa,dt),vn,va),va),Aa=null,dt=null,Dn=mn,We=We._1;break;case s:Dn=Kn,j=Ma(qe,pa,We._2),pa&&pa.register(j),We._1&&j.run(),We=qe.right(j);break;case m:Dn=mn,We=At(qe,pa,We._1);break}break;case Wn:if(Aa=null,dt=null,vn===null)Dn=ja,We=va||ea||We;else switch(j=vn._3,V=vn._1,vn=vn._2,V.tag){case t:va&&va!==j&&oa===0?Dn=Wn:ea&&(Dn=mn,We=V._2(qe.fromLeft(ea)),ea=null);break;case I:va&&va!==j&&oa===0||ea?Dn=Wn:(Aa=V._1,dt=V._2,Dn=yn,We=qe.fromRight(We));break;case l:oa--,ea===null&&(W=qe.fromRight(We),vn=new Z(b,new Z(L,V._2,W),vn,j),(va===j||oa>0)&&(Dn=mn,We=V._3(W)));break;case L:vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,va&&va!==j&&oa===0?We=V._1.killed(qe.fromLeft(va))(V._2):ea?We=V._1.failed(qe.fromLeft(ea))(V._2):We=V._1.completed(qe.fromRight(We))(V._2),ea=null,oa++;break;case N:oa++,vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,We=V._1;break;case z:oa--,Dn=Wn,We=V._1,ea=V._2;break}break;case ja:for(var le in Da)Da.hasOwnProperty(le)&&(it=it&&Da[le].rethrow,ve(Da[le].handler(We)));Da=null,va&&ea?setTimeout(function(){throw qe.fromLeft(ea)},0):qe.isLeft(We)&&it&&setTimeout(function(){if(it)throw qe.fromLeft(We)},0);return;case dn:Dn=mn;break;case zn:return}}function K(x){return function(){if(Dn===ja)return it=it&&x.rethrow,x.handler(We)(),function(){};var j=St++;return Da=Da||{},Da[j]=x,function(){Da!==null&&delete Da[j]}}}function O(x,j){return function(){if(Dn===ja)return j(qe.right(void 0))(),function(){};var W=K({rethrow:!1,handler:function(){return j(qe.right(void 0))}})();switch(Dn){case dn:va=qe.left(x),Dn=ja,We=va,J(Tn);break;case zn:va===null&&(va=qe.left(x)),oa===0&&(Dn===zn&&(vn=new Z(b,new Z(N,We(x)),vn,va)),Dn=Wn,We=null,ea=null,J(++Tn));break;default:va===null&&(va=qe.left(x)),oa===0&&(Dn=Wn,We=null,ea=null)}return W}}function S(x){return function(){var j=K({rethrow:!1,handler:x})();return Dn===dn&&J(Tn),j}}return{kill:O,join:S,onComplete:K,isSuspended:function(){return Dn===dn},run:function(){Dn===dn&&(rn.isDraining()?J(Tn):rn.enqueue(function(){J(Tn)}))}}}function sa(qe,pa,Qa,Tn){var Dn=0,We={},ea=0,va={},Aa=new Error("[ParAff] Early exit"),dt=null,vn=e;function oa(K,O,S){var x=O,j=null,W=null,V=0,le={},ie,ge;e:for(;;)switch(ie=null,x.tag){case $:if(x._3===e&&(ie=We[x._1],le[V++]=ie.kill(K,function(Ee){return function(){V--,V===0&&S(Ee)()}})),j===null)break e;x=j._2,W===null?j=null:(j=W._1,W=W._2);break;case p:x=x._2;break;case g:case E:j&&(W=new Z(b,j,W)),j=x,x=x._1;break}if(V===0)S(qe.right(void 0))();else for(ge=0,ie=V;ge()=>e.props.def;function MN(e){class n extends Fa.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 Dy=typeof module=="undefined"?void 0:module.require,dnn=function(){try{return Dy===void 0?void 0:Dy("util")}catch{return}}();var mnn=function(){var e;if(typeof performance!="undefined")e=performance;else if(Dy)try{e=Dy("perf_hooks").performance}catch{}return function(){return(e||Date).now()}}();var AN=(e,n)=>n[e],LN=(e,n,a)=>a[e]=n;var pp=function(n){return function(a){return n(a)()}};var dp=function(n){return function(a){return function(){return n(a)}}},kv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},D_=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var Mre=_e(Bn),ah=function(){function e(){}return e.value=new e,e}(),jN=function(){return function(e){var n=Ft(e);return function(a){return D_(LN)(n(Wa.value))}}},IS=function(e){var n=gt(e);return function(a){var t=Ft(a);return function(r){return function(u){return Mre(function(){return AN(t(Wa.value),u)})(n)}}}};$a();var Ci=window.ReactDOM,{createPortal:NN,findDOMNode:$nn,flushSync:znn,unstable_batchedUpdates:Vnn}=window.ReactDOM;var zS=Wu(C3());function F3(e){return e.state&&e.state.s}function G3(e,n,a){return e.setState({s:n},a)}function M3(e,n){return e.state={s:n}}var A3=Ci.render,L3=Ci.hydrate,VS=zS.default&&zS.default.renderToString||(e=>""),loe=Ci.unmountComponentAtNode,x3=Fa.Fragment;function P3(e,n,a){return Fa.createElement.apply(null,[e,coe(e,n)].concat(a))}function coe(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 j3(e){return n=>e===n}var Sy=function(e){return function(n){return function(a){var t=fe(a);if(e instanceof G&&t instanceof G)return de;if(e instanceof T&&t instanceof G)return de;if(e instanceof T&&t instanceof T){if(j3(e.value0)(t.value0))return de;if(je)return n(new T(t.value0))()}return n(t)()}}};var re={asReactChildren:function(e){return[e]}},Qe={asReactChildren:function(e){return[e]}},ye={asReactChildren:ln(_n)};var Xe=Je,QS=D_(G3),N3=kv(A3),O3=kv(L3),U3=dp(F3),ta=!1;var k3=kv(M3),ch=function(e){return e.asReactChildren},Fi=function(){return function(e){var n=ch(e);return function(a){return function(t){return function(r){return P3(a,t,n(r))}}}}},B3=Fi()(ye),Lc=function(){return function(e){return function(n){return B3(e)(n)([])}}},Fe=B3(x3)({});var KS=U(Bn),soe=q(_t),H3=function(e){return{initialize:function(n){return k3(n)(e.initialState)},getState:function(n){return function(){var t=KS(fe)(U3(n))();return Ue(e.initialState)(t)}},setState:QS}},J3=function(){var e=function(n){return function(a){return{initialize:function(t){return qf(new T(a.initialState))(n)},getState:function(t){return KS(Ue(a.initialState))(Jf(n))},setState:function(t){return function(r){return function(u){return function(){return qf(new T(r))(n)(),QS(t)(r)(soe(de))(),u()}}}}}}};return KS(e)(N0(G.value))}();var W3=_e(ze),$3=Ye(Lt);var voe=q(_t),z3=jN(),V3={reflectSymbol:function(){return"__unmounted"}},foe=z3(V3),Q3={reflectSymbol:function(){return"__subscriptions"}},_oe=z3(Q3),Cy=_e(Bn),poe=IS(Sa)(V3),K3=U(Bn),doe=IS(xa(Ij))(Q3),moe=nn(Ke),hoe=Ta(fr),Doe=gR(_t)(Be),goe=moe(ra),Y3=gn(Cr),Roe=A0(yc),yoe=Ye(sv(CT(oR))),YS=function(e){return e},Jv=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}(),boe={map:function(e){return function(n){return new Jv(e(n.value0),n.value1)}}},Mr=function(e){return{bimap:function(n){return function(a){return function(t){return new Jv(a(t.value0),W3(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},X3={apply:function(e){return function(n){return new Jv(e.value0(n.value0),$3(e.value1)(n.value1))}},Functor0:function(){return boe}},qn={bind:function(e){return function(n){var a=n(e.value0);return new Jv(a.value0,$3(e.value1)(a.value1))}},Apply0:function(){return X3}},Rn={pure:function(e){return new Jv(e,[])},Apply0:function(){return X3}};var Z3=function(e){var n=ee(e);return function(a){var t=gn(a);return function(r){return function(u){return new Jv(r,W3(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var b_=function(e){return new Jv(de,[e])},Za=function(e){return b_(cn(e))},qv=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return b_(function(r){return n(t)(function(u){return a(In(voe(de))(r.dispatch)(u))})})}},wa=function(e){var n=Z3(e.Monad0().Bind1())(e);return function(a){return n(de)([a])}},e4=function(e){return function(n){var a=foe(ah.value),t=_oe(ah.value),r=function(b){return function(I){return function(L){return function(){var z=Cy(nh(b))(function($){return $.init})();return n({initialState:z.value0}).setState(b)(I)(L)()}}}},u=function(){var b=K3(Ue(!1)),I=poe(ah.value);return function(L){return b(I(L))}}(),i=function(){var b=K3(Ue([])),I=doe(ah.value);return function(L){return b(I(L))}}(),l=function(b){return function(){return hoe(Doe)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=Cy(nh(b))(function(N){return N.init})();return n({initialState:L.value0}).getState(b)()}},m=function(b){return function(I){return function(){var N=i(b)();return t(lo(vp(I))(N))(b)()}}},p=function(b){return function(I){var L=function(N){return vp(goe(Qt(0))(function(){return N({dispatch:function(){var z=g(I);return function($){return Y3(z($))}}(),onStop:m(I)})}))};return TT(b)(L)}},g=function(b){return function(I){return Roe(u(b))(function(){var N=s(b)(),z=Cy(nh(b))(function(ne){return ne.update})(),$=z(N)(I);return r(b)($.value0)(p($.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),N=Cy(nh(b))(function(z){return z.view})();return N(L)(g(b))}};return function(b){return GN(e,{def:b,init:n({initialState:b.init.value0}).initialize,render:E,componentDidMount:p(b.init.value1),componentWillUnmount:yoe(a(!0))(l)})}}},XS=function(e){return function(){var a=Y3(J3)();return FN(function(t){return e4(t)(a)(e)})}},Ps=function(e){return function(n){return CN(e,function(a){var t=e4(a)(H3);return function(r){return t(n(r))}})}};var n4=q(_t),a4=ou(),Fy=function(e){return{handleMaybe:function(n){return function(a){return pp(function(){var t=In(n4(de))(n);return function(r){return t(a4(a(r)))}}())}}}},Wv=function(e){return{handleMaybe:function(n){return function(a){return function(t){return In(n4(de))(n)(a4(a))()}}}}},ii={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},t4={handleEffect:function(e){return pp(e)}};var ma={handle:function(e){return function(n){return function(a){return e(n)()}}}},Gi=function(e){return e.handleMaybe},ZS=function(e){return e.handleEffect},Yn=function(e){return e.handle};function Gy(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 $l=function(){return function(){return function(e){return function(n){return Gy(e,n)}}}};var My=function(e){var n=Ft(e);return function(){return function(){return function(a){return function(t){return rR(n(a))(t)}}}}};var eC=Lc(),nC=Fi(),r4=$l()();var gp=Je,o4=function(e){return function(n){return eC(gp(e))(n)}},aC=function(e){var n=nC(e);return function(a){return function(t){return n(gp(a))(t)}}},zl=function(e){var n=nC(e);return function(a){return function(t){return function(r){return n(gp(a))(r4(r)({className:t}))}}}},sh=function(e){return function(n){return function(a){return eC(gp(e))(r4(a)({className:n}))}}},u4=function(e){return function(n){return eC(gp(e))({className:n})}},zr=function(e){return function(n){var a=nC(n);return function(t){return function(r){return a(gp(e))({className:t})(r)}}}};var vt=Je;var Rp=function(e){var n=zl(e);return function(){return function(){return n("video")}}},Ay=function(e){return zr("video")(e)};var Ly=function(e){return zr("ul")(e)};var js=function(e){return zr("tr")(e)};var $v=function(e){return zr("thead")(e)};var zv=function(e){return zr("th")(e)};var yp=function(){return function(){return sh("textarea")}};var xy=function(e){var n=zl(e);return function(){return function(){return n("td")}}},Vl=function(e){return zr("td")(e)};var Vv=function(e){return zr("tbody")(e)};var Qv=function(e){return zr("table")(e)};var Io=function(e){return zr("strong")(e)},bp=function(e){var n=zl(e);return function(){return function(){return n("span")}}},za=function(e){return zr("span")(e)},Py=function(){return function(){return sh("source")}};var jy=function(e){var n=zl(e);return function(){return function(){return n("select")}}};var wp=function(e){var n=zl(e);return function(){return function(){return n("p")}}},Kt=function(e){return zr("p")(e)};var Ny=function(e){var n=zl(e);return function(){return function(){return n("option")}}};var Oy=function(e){return zr("li")(e)};var Kv=function(e){return zr("label")(e)};var eo=function(){return function(){return sh("input")}};var fl=function(){return function(){return sh("img")}};var rt=function(e){return zr("i")(e)};var Ql=u4("hr");var Ep=function(e){return zr("h6")(e)};var _l=function(e){return zr("h4")(e)},Uy=function(e){var n=zl(e);return function(){return function(){return n("h3")}}},no=function(e){return zr("h3")(e)},xc=function(e){var n=zl(e);return function(){return function(){return n("h2")}}},Yt=function(e){return zr("h2")(e)};var Yv=function(e){return zr("h1")(e)},Xv=function(e){var n=zl(e);return function(){return function(){return n("form")}}};var Xt=function(e){var n=zl(e);return function(){return function(){return n("div")}}},Se=function(e){return zr("div")(e)};var i4=cp(Vm);var woe=q(_t);var tC={map:function(e){return function(n){return i4(i4(e))(n)}}},l4=_e(tC),c4=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return b_(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},fu=function(e){var n=c4(e);return function(a){return function(t){return n(l4(t)(a))}}};var s4=function(e){return function(n){return e(In(woe(de))(n))}},Ip=function(e){var n=c4(e);return function(a){return function(t){return n(s4(l4(t)(a)))}}};var Gn=function(){return{"genericTop'":Oe.value}}();var rC=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":rC(e)}};var An=function(){return{"genericBottom'":Oe.value}}();var vh=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":vh(e)}};var xn=function(e){return{"genericBottom'":new Re(vh(e))}},v4=function(e){var n=P0(e);return function(a){return n(vh(a))}};var Zv=U(oe),ky=ba();var oC=function(e){return e["genericToEnum'"]};var By=function(e){return e["genericSucc'"]},uC=function(e){var n=P0(e),a=j0(e);return function(t){var r=Zv(n),u=By(t);return function(i){return r(u(a(i)))}}},iC=function(e){return e["genericPred'"]};var lC=function(e){return e["genericFromEnum'"]};var Pn=function(e){var n=iC(e),a=By(e);return function(t){var r=rC(t);return function(u){var i=iC(u),l=By(u);return function(s){var m=vh(s);return{"genericPred'":function(p){if(p instanceof Re)return Zv(Re.create)(n(p.value0));if(p instanceof ce){var g=i(p.value0);if(g instanceof G)return new T(new Re(r));if(g instanceof T)return new T(new ce(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[g.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 Re){var g=a(p.value0);if(g instanceof G)return new T(new ce(m));if(g instanceof T)return new T(new Re(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[g.constructor.name])}if(p instanceof ce)return Zv(ce.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 jn={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},Nn=function(e){var n=iC(e),a=By(e);return{"genericPred'":function(t){return Zv(sm)(n(t))},"genericSucc'":function(t){return Zv(sm)(a(t))}}};var cC=function(e){return e["genericCardinality'"]};var On=function(e){var n=cC(e),a=oC(e),t=lC(e);return function(r){var u=oC(r),i=lC(r);return{"genericCardinality'":ky(n)+ky(cC(r))|0,"genericToEnum'":function(l){var s=function(m){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 Jy=function(e){return function(n){return new Vo(1,1,e,n,pl.value,pl.value)}},b4=function(){var e=function(t){if(t instanceof pl)return 0;if(t instanceof Vo)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,m){return s instanceof Vo&&s.value0>e(m)?dl(s.value2,s.value3,dl(t,r,u,s.value4),dl(i,l,s.value5,m)):dl(i,l,dl(t,r,u,s),m)},a=function(t,r,u,i,l,s,m){return s instanceof Vo&&e(l)<=s.value0?dl(s.value2,s.value3,dl(u,i,l,s.value4),dl(t,r,s.value5,m)):dl(u,i,l,dl(t,r,s,m))};return function(t,r,u,i){if(u instanceof pl)return i instanceof pl?Jy(t)(r):i instanceof Vo&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):dl(t,r,u,i);if(u instanceof Vo){if(i instanceof Vo){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 pl&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):dl(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 Pc=function(e){var n=He(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof pl)return u=!0,G.value;if(s instanceof Vo){var m=n(a)(s.value2);if(m instanceof me){r=s.value4;return}if(m instanceof pe){r=s.value5;return}if(m instanceof Ne)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): "+[m.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 _h=function(e){var n=He(e);return function(a){return function(t){var r=function(u){if(u instanceof pl)return Jy(a)(t);if(u instanceof Vo){var i=n(a)(u.value2);if(i instanceof me)return b4(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof pe)return b4(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof Ne)return new Vo(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 Mi=function(){return pl.value}(),_u=function(e){var n=_h(e);return function(a){return Dt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(Mi)}};var tue=typeof Array.from=="function",I4=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",rue=typeof String.prototype.fromCodePoint=="function",oue=typeof String.prototype.codePointAt=="function",T4=function(e){return oue?function(n){return n.codePointAt(0)}:e},S4=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(I4)for(var l=u[Symbol.iterator](),s=r;;--s){var m=l.next();if(m.done)return a;if(s===0)return n(t(m.value))}return e(r)(u)}}}}}};var C4=function(e){return rue?String.fromCodePoint:e},F4=function(e){return function(n){return I4?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=hh(Is(1)(e)),r=x4(t);return r?L4(n)(t):n}return n},dC=T4(due),w_=G4(pue)(dC),To=function(e){return Ur(w_(e))};var qy=function(e){return function(n){return A4(function(a){return To(Q0(a)(n))})($R(e)(n))}},mC=function(){var e=cS(p_)(nt(mv))(kt(mv));return function(n){return Tu(e(n))}}(),mue=function(e){if(e<=65535)return mC(e);var n=sue(e-65536|0)(1024)+55296|0,a=vue(e-65536|0)(1024)+56320|0;return mC(n)+mC(a)};var Sp=C4(mue),j4=function(e){return function(n){if(e<1)return"";var a=ef(n);return a instanceof T?Sp(a.value0.head)+j4(e-1|0)(a.value0.tail):n}},li=F4(j4);var Wy={eq:function(e){return function(n){return e===n}}},$y={compare:function(e){return function(n){return fue(e)(n)}},Eq0:function(){return Wy}},nf=function(e){return function(n){return Ic(Hl(li(e)(n)))(n)}};var hue=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=ef(l);if(s instanceof T){var m=i===0;if(m)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}},Cp=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(dC(n)):S4(hue)(T.create)(G.value)(dC)(e)(n)}},Due={bottom:0,top:1114111,Ord0:function(){return $y}},Nc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if(je)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 Due},Enum1:function(){return gue(0)}}}(),gue=lue("enumCodePoint","Data.String.CodePoints",function(){return{succ:f_(aa(Nc))(Hn(Nc)),pred:__(aa(Nc))(Hn(Nc)),Ord0:function(){return $y}}});var Mue=ba();var q4={show:Mue};var W4=he;var Aue=Ss(Be),Lue=_e(ze),xue=n_(sC),Sn=function(e){return function(n){var a=Aue(Lue(n)(function(t){return new sn(e(t),t)}));return function(t){return Sc(t)(a)}}},$4=function(e){var n=uC(e),a=v4(e);return function(t){var r=n(t);return function(u){return function(i){return xue(function(l){return new sn(l,r(l))})(a(i))}}}},Cn=function(e){var n=$4(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Ns(u(i))}}}};var Pue={info:"info",warning:"warn",error:"error"},Ai=e=>n=>a=>t=>{let r=Pue[e];if(typeof console!="undefined"&&console[r]&&console[r](n,a),typeof window!="undefined"){let u=new Error(n);typeof window.Sentry!="undefined"&&window.Sentry.captureException(u,{extra:a})}return t()},z4=(e,n)=>(n.__sentryFingerprint=e,n);var V4=function(e){return yi(z4)(e)};var hl="error";var Qy={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Te)return a.value0;if(a instanceof Ie)return Ai(hl)("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])}}},Zn=function(e){return e.parseOrPanic},jue=Zn(Qy),ka=function(e){var n=Zn(e);return function(a){var t=U(a);return function(r){return n({parse:function(u){return t(T.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},Nue=ka(Qy)(ur),af=function(e){var n=Lv(e);return function(a){return Nue({parse:n,diagnosticName:a})}},Ze={parseOrPanic:function(e){return jue({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=In(new Ie(""))(Te.create);return function(a){return n(e.parse(a))}}()})}};var Q4=Nn(jn),K4=Ln(An),Y4=kn(Un),Us=function(){function e(){}return e.value=new e,e}(),ks=function(){function e(){}return e.value=new e,e}(),Oue={to:function(e){if(e instanceof Re)return Us.value;if(e instanceof ce)return ks.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 Us)return new Re(Oe.value);if(e instanceof ks)return new ce(Oe.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var Uue=function(e){if(e instanceof Us)return"school";if(e instanceof ks)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},Ky=function(){return Zn(Ze)({parse:Sn(Uue)(Cn(Oue)(Pn(Q4)(Mn(Gn))(Q4)(K4))(On(Y4)(Y4))(xn(K4))),default:Us.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var X4=Nn(jn),Z4=Pn(X4)(Mn(Gn)),e8=Ln(An),n8=xn(e8),a8=kn(Un),t8=On(a8),kue=ia(oo),Kl=function(){function e(){}return e.value=new e,e}(),tf=function(){function e(){}return e.value=new e,e}(),Bs=function(){function e(){}return e.value=new e,e}(),Bue={to:function(e){if(e instanceof Re)return Kl.value;if(e instanceof ce&&e.value0 instanceof Re)return tf.value;if(e instanceof ce&&e.value0 instanceof ce)return Bs.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 Kl)return new Re(Oe.value);if(e instanceof tf)return new ce(new Re(Oe.value));if(e instanceof Bs)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var Hue=function(e){if(e instanceof Kl)return"pending";if(e instanceof tf)return"connected";if(e instanceof Bs)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},DC=function(){var e=Sn(Hue)(Cn(Bue)(Z4(Z4(X4)(e8))(n8))(t8(t8(a8)))(n8)),n=function(a){return a==="cold"?new T(Bs.value):G.value};return Zn(Ze)({parse:function(a){return kue(e(a))(n(a))},default:Kl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var Jue=k0(It),r8=te(an),que=gr(Be)(It),Wue=za(re);var o8=function(e){return{initiator:Ky(e.initiator),status:DC(e.status),introMessage:Ue("")(fe(e.introMessage))}},u8=25,gC=function(e){return To(e)>=u8},i8=function(e){var n=To(e),a=n>0,t=Jue(" ")([function(){return a?r8(n)+" characters":""}(),que(["(",r8(u8),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=gC(e);return u?"text-success":""}();return Wue(r)(t)};var Yy=function(){function e(){}return e.value=new e,e}(),l8=function(){function e(){}return e.value=new e,e}();var c8=function(){var e=Zn(Ze)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(l8.value):n instanceof T&&n.value0==="free"?new T(Yy.value):n instanceof T&&n.value0==="churned"?new T(Yy.value):n instanceof G?new T(Yy.value):G.value},default:Yy.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(fe(n))}}();var s8=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:fe(e.imageUrl),partnerStatus:c8(e.partnerStatus)}};var $ue=ee(Ve),RC=La(),Dh=tt(he),v8=H({reflectSymbol:function(){return"id"}}),zue=nn(Ke)(Ve),Vue=qr(uo),Que=U(oe);var Kue=function(){function e(){}return e.value=new e,e}(),Yue=function(){function e(){}return e.value=new e,e}(),Xue=function(){function e(){}return e.value=new e,e}(),yC=function(){function e(){}return e.value=new e,e}(),Zue=function(){function e(){}return e.value=new e,e}(),Xy=function(){function e(){}return e.value=new e,e}(),gh=function(){function e(){}return e.value=new e,e}(),bC=function(){function e(){}return e.value=new e,e}(),wC=function(){function e(){}return e.value=new e,e}();var f8={show:ba()};var eie=he,nie=af(RC(H({reflectSymbol:function(){return"avatarUrl"}})(Dh)(H({reflectSymbol:function(){return"bio"}})(Dh)(H({reflectSymbol:function(){return"connection"}})(tt(RC(H({reflectSymbol:function(){return"initiator"}})(he)(H({reflectSymbol:function(){return"introMessage"}})(Dh)(H({reflectSymbol:function(){return"status"}})(he)(tn))))))(H({reflectSymbol:function(){return"firstName"}})(he)(v8(eie)(H({reflectSymbol:function(){return"lastName"}})(he)(H({reflectSymbol:function(){return"school"}})(RC(H({reflectSymbol:function(){return"allowedToContact"}})(Sa)(v8(W4)(H({reflectSymbol:function(){return"imageUrl"}})(Dh)(H({reflectSymbol:function(){return"name"}})(he)(H({reflectSymbol:function(){return"partnerStatus"}})(Dh)(tn)))))))(H({reflectSymbol:function(){return"title"}})(he)(H({reflectSymbol:function(){return"type"}})(he)(H({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(on)(tn))))))))))));var _8=function(e){if(e instanceof Kue)return"sheet-view";if(e instanceof Yue)return"school-details";if(e instanceof Xue)return"network-gallery";if(e instanceof yC)return"livestream-details";if(e instanceof Zue)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},p8=function(e){return $ue(nie("SemUser")(e))(function(n){return zue(Vue(n.type==="Sem::User"))(function(){return new T({school:s8(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:fe(n.avatarUrl),title:n.title,bio:fe(n.bio),connection:Que(o8)(fe(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Oc=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Uc=function(e){return e()};var w8=function(){function e(){}return e.value=new e,e}(),E8=function(){function e(){}return e.value=new e,e}(),I8=function(){function e(){}return e.value=new e,e}();var gie=function(e){if(e instanceof w8)return"disabled";if(e instanceof E8)return"free-consultation";if(e instanceof I8)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 Rie=function(){return[w8.value,E8.value,I8.value]}(),T8=ka(Ze)(oe)({parse:Sn(gie)(Rie),diagnosticName:"InquiryMode"});var yie=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 S8(e,n,a,t,r,u,i){return yie(e,n-1,a,t,r,u,i).getTime()}function C8(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 bie=Et(),wie=aa(pr);var Eie=Hn(pr);var F8=function(e){return e},nb=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 cl(Nv(n)(bie(wie(a)))(t),new Fc(r,u,i,l))}}}}}}};return C8(e)}();var G8=function(e){return S8(ti(e.value0),Eie(ri(e.value0)),Cc(e.value0),Gc(e.value1),Ms(e.value1),Gs(e.value1),ll(e.value1))};var M8=function(e){var n=Ye(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,m;function p(g,E,b){if(b<1)return s=!0,g;i=n(g)(E),l=E,u=b-1|0}for(;!s;)m=p(i,l,u);return m}}};return a(Va(e))};var Iie=ba();var E_=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}(),Rh=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 A8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),L8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FC=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 Fp={defer:function(e){var n=Oc(e);return function(a,t,r,u,i){var l=Uc(n);return l(a,t,r,u,i)}}};var kc={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,m){return t(function(p){return i(s,e(m))})})})}}}};var Bc={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,m){return t(function(p){return n(s,t,r,u,function(g,E){return t(function(b){return i(g,m(E))})})})})})}}},Functor0:function(){return kc}};var Hc={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,m){return t(function(p){var g=n(m);return g(s,t,r,u,i)})})})}}},Apply0:function(){return Bc}},Tie=Ta(Hc);var Dl={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Bc}};var Sie={Applicative0:function(){return Dl},Bind1:function(){return Hc}};var x8={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return Sie}},Cie=Rr(x8);var I_={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new E_(a.value0,a.value1,!1),t,r,function(s,m){return t(function(p){return s.value2?u(s,m):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return kc}},Fie=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var Gie=function(e){var n=e.Monad0(),a=U(n.Bind1().Apply0().Functor0()),t=q(n.Applicative0()),r=Uo(e);return function(u){return function(i){var l=function(s){var m=!1,p;function g(E){var b=E(de);if(b instanceof A8){s=b.value0;return}if(b instanceof L8)return m=!0,a(tr.create)(b.value0);if(b instanceof FC)return m=!0,t(new zt(new sn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!m;)p=g(s);return p};return r(l)(function(s){return i(u,A8.create,L8.create,function(m,p){return new FC(m,new Ie(p))},function(m,p){return new FC(m,new Te(p))})})}}};var P8=Fie(function(e){return new sn(e.value1,e)}),GC=function(e){return e.value1},MC=function(e){return e.value0};var Mie={index:0,line:1,column:1},j8=function(e){var n=U(e.Monad0().Bind1().Apply0().Functor0()),a=Gie(e);return function(t){return function(r){var u=new E_(t,Mie,!1);return n(Br)(a(u)(r))}}},Aie=j8(_m),N8=function(e){var n=Aie(e);return function(a){return Iie(n(a))}};var Lie=function(e){return function(n){return Cie(new Rh(e,n))}},Gp=function(e){return Tie(Lie(e))(P8)};var O8={empty:Gp("No alternative"),Alt0:function(){return I_}},T_={Applicative0:function(){return Dl},Plus1:function(){return O8}};var Hie=ia(I_);var Jie=q(Dl);var qie=U(kc);var Jc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new E_(i.value0,i.value1,n.value2),l)},u)}};var ab=function(e){return function(n){return Hie(n)(Jie(e))}},S_=function(e){return ab(G.value)(qie(T.create)(e))};var H8=Hn(Nc),$ie=Xr(vr);var zie=te(Gt);var J8=function(e){return function(n){return function(a){var t=H8(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=Cp(0)(a);return r instanceof T&&H8(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)-$ie(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},Vie=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,m,p){var g=ef(m);if(g instanceof G)return u=!0,s;if(g instanceof T){var E=function(){if(ml(g.value0.tail))return J8(s)(g.value0.head)(p);if(je)return J8(s)(g.value0.head)(g.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=g.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[g.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var LC=yR(function(e){return function(n){return function(a){return function(t){return function(r){var u=ml(e.value0);return u?r(new E_(e.value0,e.value1,!0),de):t(e,new Rh("Expected EOF",e.value1))}}}}}),q8=function(e){return yR(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Ie)return r(n,new Rh(i.value0,n.value1));if(i instanceof Te)return u(new E_(i.value0.remainder,Vie(n.value1)(i.value0.consumed)(i.value0.remainder),!ml(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 qc=function(e){return q8(function(n){var a=ei(e)(n);return a instanceof T?new Te({value:e,consumed:e,remainder:a.value0}):new Ie("Expected "+zie(e))})};var W8=te(an),Kie=Bt(ko),Yie=F0(Bc);var Xie=function(e){return"(line "+(W8(e.line)+(", col "+(W8(e.column)+")")))},Zie=function(e){return MC(e)+(" "+Xie(GC(e)))},xC=function(e){return function(n){return Kie(Zie)(N8(n)(Yie(e)(LC)))}};var ub=aa(p_);var Ko=te(an);var fle=Sr(Jr),_le=fle(It);var ple=vR(na)(dc);var PC=Hn(Wr),dle=te(YR),mle=Hn(pr),Y8=Hn(xu),hle=ba(),Dle=Hn(Pv),X8=te(Nj),jC=Hn(Ti),gle=Xr(vr),Z8=Hn(Ii),eO=Hn(Ei),NC=Hn(Pu),nO=kr(vr);var Mp=function(){function e(){}return e.value=new e,e}(),aO=function(){function e(){}return e.value=new e,e}(),Rle=function(){function e(){}return e.value=new e,e}(),Yl=function(){function e(){}return e.value=new e,e}(),OC=function(){function e(){}return e.value=new e,e}(),tO=function(){function e(){}return e.value=new e,e}(),rO=function(){function e(){}return e.value=new e,e}(),Xl=function(){function e(){}return e.value=new e,e}(),yle=function(){function e(){}return e.value=new e,e}(),ble=function(){function e(){}return e.value=new e,e}(),Zl=function(){function e(){}return e.value=new e,e}(),wle=function(){function e(){}return e.value=new e,e}(),ib=function(){function e(){}return e.value=new e,e}(),ec=function(){function e(){}return e.value=new e,e}(),nc=function(){function e(){}return e.value=new e,e}(),Ele=function(){function e(){}return e.value=new e,e}(),Li=function(){function e(){}return e.value=new e,e}(),Ile=function(){function e(){}return e.value=new e,e}(),lb=function(){function e(){}return e.value=new e,e}(),Tle=function(){function e(){}return e.value=new e,e}(),Sle=function(){function e(){}return e.value=new e,e}(),Cle=function(){function e(){}return e.value=new e,e}(),yt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Fle=function(e){if(e instanceof iu)return"Jan";if(e instanceof Su)return"Feb";if(e instanceof lu)return"Mar";if(e instanceof Cu)return"Apr";if(e instanceof Fu)return"May";if(e instanceof cu)return"Jun";if(e instanceof su)return"Jul";if(e instanceof Gu)return"Aug";if(e instanceof Mu)return"Sep";if(e instanceof Au)return"Oct";if(e instanceof Lu)return"Nov";if(e instanceof ai)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var uf=function(e){if(e<0)return"-"+uf(-e|0);if(e<10)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},oO=function(e){if(e<0)return"-"+oO(-e|0);if(e<10)return"000"+Ko(e);if(e<100)return"00"+Ko(e);if(e<1e3)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},uO=function(e){if(e<0)return"-"+uO(-e|0);if(e<10)return"00"+Ko(e);if(e<100)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var Gle=function(e){var n=Ko(ple(e)),a=To(n);return a===1?"0"+n:a===2?n:nf(a-2|0)(n)};var Mle=function(e){var n=e===0;return n?12:e},Ale=function(e){return function(n){if(n instanceof Mp)return oO(PC(ti(e.value0)));if(n instanceof aO)return Gle(PC(ti(e.value0)));if(n instanceof Rle)return Ko(PC(ti(e.value0)));if(n instanceof Yl)return dle(ri(e.value0));if(n instanceof OC)return Fle(ri(e.value0));if(n instanceof tO)return uf(mle(ri(e.value0)));if(n instanceof rO)return uf(Y8(Cc(e.value0)));if(n instanceof Xl)return Ko(Y8(Cc(e.value0)));if(n instanceof yle)return Ko(Eo(function(t){return t/1e3}(hle(F8(G8(e))))));if(n instanceof ble)return Ko(Dle(Jm(e.value0)));if(n instanceof Zl)return X8(Jm(e.value0));if(n instanceof wle)return li(3)(X8(Jm(e.value0)));if(n instanceof ib)return uf(jC(Gc(e.value1)));if(n instanceof ec)return uf(Mle(gle(jC(Gc(e.value1)))(12)));if(n instanceof nc){var a=jC(Gc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof Ele)return Ko(Z8(Ms(e.value1)));if(n instanceof Li)return uf(Z8(Ms(e.value1)));if(n instanceof Ile)return Ko(eO(Gs(e.value1)));if(n instanceof lb)return uf(eO(Gs(e.value1)));if(n instanceof Tle)return uO(NC(ll(e.value1)));if(n instanceof Sle)return Ko(function(t){return nO(t)(100)}(NC(ll(e.value1))));if(n instanceof Cle)return uf(function(t){return nO(t)(10)}(NC(ll(e.value1))));if(n instanceof yt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},Yo=function(e){return function(n){return _le(Ale(n))(e)}};var Qbn=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function cb(e){return Math.round(e).toString()}var Ap=ee(Hc);var Lle=q(Dl),xle=H0(T_)(Fp);var Ple=JT(T_)(Fp),sb=M8(It),jle=e_(Dl)(ym),Nle=U(oe);var iO=Nl(na),Ole=kr(vr),Ule=te(an),kle=_e(ur),Ble=te(Bf),Hle=ln(_n);var Jle=Ap(S_(Jc(qc("+"))))(function(e){return Ap(xle(qc("0")))(function(n){return Ap(S_(Jc(qc(",0"))))(function(a){return Ap(S_(Jc(qc("."))))(function(t){return Ap(jle(t)(function(r){return Jc(Ple(qc("0")))}))(function(r){return Ap(S_(Jc(qc("a"))))(function(u){return Lle({sign:Pt(e),before:Ur(n),comma:Pt(a),after:Ue(0)(Nle(Ur)(r)),abbreviations:Pt(u)})})})})})})}),qle=xC(Jle);var lO=function(e){return function(n){var a=CR(n),t=function(){if(a>0)return iO(Eo(zT(a)/BP))(0);if(je)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=Ole(t)(3),u=function(){var z=r<1;return z?n:n/FR(1e3)(Tt(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(je)return"10e+"+Ule(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return lO({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=FR(10)(Tt(iO(0)(e.after))),m=u_(a*s)/s,p=q0(m),g=m-p,E=u_(g*s),b=function(){var z=cb(E),$=To(z),ne=sb("0")(e.after-$|0);return ne+z}(),I=function(){var z=e.after<1;return z?"":"."+(function(){var $=E===0;return $?sb("0")(e.after):""}()+function(){var $=E>0;return $?b:""}())}(),L=function(z){return function($){return function(ne){var ue=z,Z=$,Y=!1,X;function ve(xe,ke,rn){var wn=a_(rn);if(wn instanceof G)return Y=!0,V0(xe);if(wn instanceof T&&ke<3){ue=lo(wn.value0.head)(xe),Z=ke+1|0,ne=wn.value0.tail;return}ue=lo(",")(xe),Z=0,ne=rn}for(;!Y;)X=ve(ue,Z,ne);return X}}},N=function(){return e.comma?L([])(0)(M0(xm(sb("0")(l)+cb(p)))):sb("0")(l)+cb(p)}();return function(){var z=n<0;if(z)return"-";var $=n>0&&e.sign;return $?"+":""}()+(N+I)}},Wle=function(e){return function(n){return kle(qle(e))(qa(lO)(n))}},C_=function(e){return function(n){return jt(cn(Ble(n)))(Hle)(Wle(e)(n))}};var zle=Je;var cO=function(e){return l_(e)};var gl=function(e){var n=cO(e);return n?G.value:new T(zle(e))};var Ba=function(e){return function(n){var a=cO(e);return a?n:e}};var co=function(){return Je};var yh=te(an),Vle=Hn(Wr),Qle=Hn(pr),Kle=co(),Yle=ou(),Xle=ui(jv),UC=kr(vr),Zle=qo(Be);var ece=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 yh(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return yh(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return yh(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return yh(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if(je)return yh(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])}},vb=function(e){return ece({suffix:" "+e,justNow:"just now"})},sO=function(){return function(e){var n=function(m){return(Vle(ti(Ov(m)))*12|0)+Qle(ri(Ov(m)))|0},a=Kle(e),t=Ba(a.format)(vb("ago")),r=GR(Yle(Xle(a.to)(a.from))),u=UC(r+30|0)(60),i=UC(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=UC(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var vO=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var kC=C_("0,0");var fO=function(e){return kC(Tt(e))},xi=function(e){return function(n){return function(a){return fO(e)+(" "+vO(e)(n)(a))}}};var _O=function(){return Yo(Zle([Zl.value,new yt(", "),Yl.value,new yt(" "),Xl.value,new yt(" at "),ec.value,new yt(":"),Li.value,new yt(" "),nc.value]))}();$a();var pO=Fa.Fragment,BC=()=>document.visibilityState=="visible",dO=(e,n)=>document.elementFromPoint(e,n);var mO=function(e){var n=aC(e);return function(){return function(){return n("button")}}},hO=function(){return function(){return o4("br")}};var DO=function(e){var n=aC(e);return function(){return function(){return n("a")}}};function gO(e){return function(n){return function(){return n.getElementById(e)}}}var nce=U(Bn),fb=function(e){var n=nce(fe),a=gO(e);return function(t){return n(a(t))}};var _b=function(e){return function(n){return function(){return n[e]}}},ace=_b("children"),tce=_b("firstElementChild"),rce=_b("lastElementChild"),oce=_b("childElementCount");var pu=function(){return window};function RO(e,n,a,t){if(typeof window!="undefined"){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 Fn=function(e){return function(n){return RO(G.value,T.create,e,n)}};var yO=Je;var pb=Je;var bO=Je;function wO(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 HC=Je;var EO=function(e){return wO(G.value,T.create,e)};function JC(e){return function(){return e.seeking}}function bh(e){return function(){return e.currentTime}}function qC(e){return function(){return e.volume}}function WC(e){return function(n){return function(){n.volume=e}}}function $C(e){return function(){return e.muted}}function F_(e){return function(n){return function(){n.muted=e}}}var IO=Fn("HTMLMediaElement");var TO=Fn("HTMLMediaElement");function zC(e){return function(){return e.hash}}function VC(e){return function(n){return function(){n.hash=e}}}function QC(e){return function(){return e.platform}}function lf(e){return function(){return e.document}}function KC(e){return function(){return e.navigator}}function wh(e){return function(){return e.location}}var SO=Je;var mce=U(ze);var hce=hO()(),Dce=e_(_t)(ym),CO=ee(fr),FO=_e(Bn),gce=ee(Ve);var ZC=Xe("\xA0");var ha=qa(In(ta));var GO=function(e){return function(n){if(e)return ta;if(je)return n(de);throw new Error("Failed pattern match at Utils.HTML (line 113, column 1 - line 113, column 65): "+[e.constructor.name,n.constructor.name])}},eF=function(e){return function(n){return GO(e)(cn(n))}};var nF=function(e){return function(n){if(e)return n(de);if(je)return ta;throw new Error("Failed pattern match at Utils.HTML (line 100, column 1 - line 100, column 61): "+[e.constructor.name,n.constructor.name])}},ga=function(e){return function(n){return nF(e)(cn(n))}};var Rce=Fi()(ye)(pO),yce=function(e){return function(n){return Rce({key:e.key})(wm(hce({}))(mce(Xe)(Qo(` `)(n))))}},Lp=yce({key:""}),mb=function(e){return Dce(TO(e.target))(bh)};var MO=function(e){return function(){return dO(e.x,e.y)}},AO=function(e){return CO(FO(CO(pu)(lf))(pb))(fb(e))},hb=function(e){return FO(AO(e))(function(n){return gce(n)(EO)})};var Eh=on;var LO=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},aF=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),xO=()=>new Date,PO=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var G_=(()=>{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 tF(){return Date.now()}var Ice=U(Bn);var ci=Ice(nb)(tF);var NO={liftAff:ln(_n),MonadEffect0:function(){return Le}};var OBn=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,g){this.queue=p,this.value=g,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(g){setTimeout(function(){throw g},0)}}function u(p,g){var E=new n(p,g);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 g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.last,p.head.next=null,p.last=null;break;default:g=p.last,p.last=g.prev,p.last.next=null}return g.prev=null,g.queue=null,p.size--,g.value}function l(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:g=p.head,p.head=g.next,p.head.prev=null}return g.next=null,g.queue=null,p.size--,g.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 m(p,g){if(!g.draining){var E=g.puts,b=g.takes,I=g.reads,L,N,z,$,ne;for(g.draining=!0;;){if(L=null,N=null,z=null,$=g.value,ne=I.size,g.error!==null){for($=p.left(g.error);L=l(E);)r(L.cb($));for(;N=l(I);)r(N($));for(;z=l(b);)r(z($));break}if($===t&&(L=l(E))&&(g.value=$=L.value),$!==t){for(z=l(b);ne--&&(N=l(I));)r(N(p.right($)));z!==null&&(g.value=t,r(z(p.right($))))}if(L!==null&&r(L.cb(p.right(void 0))),g.value===t&&E.size===0||g.value!==t&&b.size===0)break}g.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=m,a}();var Ih=function(e){return d_(Jf(e))},Th=function(e){return d_(N0(e))};var Pce=q(_t),cf=ee(Ve),jce=aa(Wr),Nce=aa(pr),Oce=aa(xu),Uce=aa(Ti),kce=aa(Ii),Bce=aa(Ei),Hce=aa(Pu),Jce=q(la),kO=Ta(fr),qce=_e(oe);var Wce=function(){return Th(G.value)}();var BO=function(e){return cf(jce(e.year))(function(n){return cf(Nce(e.month+1|0))(function(a){return cf(Oce(e.day))(function(t){return cf(Uce(e.hour))(function(r){return cf(kce(e.minute))(function(u){return cf(Bce(e.second))(function(i){return cf(Hce(e.millisecond))(function(l){return Jce(new cl(Nv(n)(a)(t),new Fc(r,u,i,l)))})})})})})})})},HO=function(e){var n=zP("Failed to obtain current time. This should never happen.");return In(n)(Pce)(BO(aF(e)))},sf=kO(HO)(xO),Db=function(e){var n=Ih(Wce);if(n instanceof T)return n.value0;if(n instanceof G)return d_(kO(HO)(PO));throw new Error("Failed pattern match at Utils.DateTime (line 63, column 3 - line 65, column 76): "+[n.constructor.name])},du=function(e){return cf(qce(LO({just:T.create,nothing:G.value})(e))(aF))(BO)};var rF=q(la),$ce=U(oe),JO=ee(Ve);var qO=Nn(jn),WO=Pn(qO)(Mn(Gn)),$O=Ln(An),zO=xn($O),VO=kn(Un),QO=On(VO);var oF=function(){function e(){}return e.value=new e,e}(),uF=function(){function e(){}return e.value=new e,e}(),iF=function(){function e(){}return e.value=new e,e}();var zce={to:function(e){if(e instanceof Re)return oF.value;if(e instanceof ce&&e.value0 instanceof Re)return uF.value;if(e instanceof ce&&e.value0 instanceof ce)return iF.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 oF)return new Re(Oe.value);if(e instanceof uF)return new ce(new Re(Oe.value));if(e instanceof iF)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Vce=function(e){if(e instanceof oF)return"stuffed";if(e instanceof uF)return"satisfied";if(e instanceof iF)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 Qce=ka(Ze)(oe)({parse:Sn(Vce)(Cn(zce)(WO(WO(qO)($O))(zO))(QO(QO(VO)))(zO)),diagnosticName:"ClientAppetite"}),KO=function(e){return JO(In(rF(G.value))(function(){var n=$ce(rF);return function(a){return n(Qce(a))}}())(fe(e.clientAppetite)))(function(n){return JO(T8(e.inquiryMode))(function(a){return rF({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:fe(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:fe(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var YO=ee(Ve),xp=La(),lF=tt(he),XO=H({reflectSymbol:function(){return"description"}})(he),gb=H({reflectSymbol:function(){return"id"}})(on),cF=H({reflectSymbol:function(){return"name"}})(he),ZO=xp(gb(cF(H({reflectSymbol:function(){return"slug"}})(he)(tn)))),eU=xa(ZO),Kce=af(xp(H({reflectSymbol:function(){return"advisingConfig"}})(tt(xp(H({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(tt(Sa))(H({reflectSymbol:function(){return"clientAppetite"}})(lF)(H({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(tt(on))(H({reflectSymbol:function(){return"inquiryMode"}})(he)(H({reflectSymbol:function(){return"packages"}})(xa(xp(H({reflectSymbol:function(){return"activeForSale"}})(Sa)(XO(gb(cF(H({reflectSymbol:function(){return"numMinutes"}})(on)(H({reflectSymbol:function(){return"packageCategories"}})(eU)(H({reflectSymbol:function(){return"refundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"totalPriceCents"}})(Eh)(tn)))))))))))(H({reflectSymbol:function(){return"pricePerHourCents"}})(Eh)(H({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(on)(H({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"themes"}})(xa(xp(H({reflectSymbol:function(){return"active"}})(Sa)(H({reflectSymbol:function(){return"category"}})(ZO)(XO(H({reflectSymbol:function(){return"durationMinutes"}})(on)(gb(H({reflectSymbol:function(){return"priceCents"}})(Eh)(H({reflectSymbol:function(){return"title"}})(he)(tn))))))))))(tn))))))))))))(H({reflectSymbol:function(){return"entity"}})(xp(H({reflectSymbol:function(){return"bio"}})(he)(gb(H({reflectSymbol:function(){return"imageUrl"}})(lF)(cF(H({reflectSymbol:function(){return"organizationId"}})(on)(H({reflectSymbol:function(){return"organizationName"}})(he)(H({reflectSymbol:function(){return"shortEducation"}})(lF)(H({reflectSymbol:function(){return"tags"}})(eU)(tn))))))))))(tn)))),sF=q(la),vF=U(oe),Sh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ch=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Yce=function(e){return YO(Kce("ServiceProviderPresenter")(e))(function(n){return YO(In(sF(G.value))(function(){var a=vF(sF);return function(t){return a(KO(t))}}())(fe(n.advisingConfig)))(function(a){return sF({entity:n.entity,advisingConfig:a})})})},nU=ka(Ze)(oe)({parse:function(e){return e.type==="Sem::User"?vF(Sh.create)(p8(e.presenter)):e.type==="ServiceProviders::Individual"?vF(Ch.create)(Yce(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var aU=Nn(jn),tU=Pn(aU)(Mn(Gn)),rU=Ln(An),oU=xn(rU),uU=kn(Un),iU=On(uU),Hs=function(){function e(){}return e.value=new e,e}(),Wc=function(){function e(){}return e.value=new e,e}(),Js=function(){function e(){}return e.value=new e,e}(),Xce={to:function(e){if(e instanceof Re)return Hs.value;if(e instanceof ce&&e.value0 instanceof Re)return Wc.value;if(e instanceof ce&&e.value0 instanceof ce)return Js.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 Hs)return new Re(Oe.value);if(e instanceof Wc)return new ce(new Re(Oe.value));if(e instanceof Js)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},lU={eq:function(e){return function(n){return e instanceof Hs&&n instanceof Hs||e instanceof Wc&&n instanceof Wc||e instanceof Js&&n instanceof Js}}},Rb=function(e){if(e instanceof Hs)return"ready";if(e instanceof Wc)return"live";if(e instanceof Js)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var Fh=function(){return Zn(Ze)({parse:Sn(Rb)(Cn(Xce)(tU(tU(aU)(rU))(oU))(iU(iU(uU)))(oU)),default:Hs.value,diagnosticName:"livestream poll status"})}(),fF=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}};var cU=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:fe(e.undergrad.college),major:fe(e.undergrad.major),year:fe(e.undergrad.year)},gradCollege:fe(e.gradCollege),workExperience:fe(e.workExperience),admissionsStory:fe(e.admissionsStory),pictureUrl:fe(e.pictureUrl),allStreamsUrl:fe(e.allStreamsUrl)}};var Zce=He(na),ese=ni(),sU=_e(oe),vU=Nn(jn),fU=Pn(vU)(Mn(Gn)),_U=Ln(An),pU=xn(_U),dU=kn(Un),mU=On(dU),hU=Zn(Ze),DU=Rs(),gU=Ta(Ve),nse=_e(ze),ase=U(oe),tse=ee(Ve),Nu=function(){function e(){}return e.value=new e,e}(),ao=function(){function e(){}return e.value=new e,e}(),Ar=function(){function e(){}return e.value=new e,e}();var ac=an,rse=te(ac);var ose={to:function(e){if(e instanceof Re)return Nu.value;if(e instanceof ce&&e.value0 instanceof Re)return ao.value;if(e instanceof ce&&e.value0 instanceof ce)return Ar.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 Nu)return new Re(Oe.value);if(e instanceof ao)return new ce(new Re(Oe.value));if(e instanceof Ar)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},vf={eq:function(e){return function(n){return e instanceof Nu&&n instanceof Nu||e instanceof ao&&n instanceof ao||e instanceof Ar&&n instanceof Ar}}},Gh={eq:function(e){return function(n){return e===n}}},RU={compare:function(e){return function(n){return Zce(e)(n)}},Eq0:function(){return Gh}};var ff=function(e){return ese({livestream_conference_id:rse(e.id),livestream_conference_presenter_name:Ue("")(sU(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:Ue("")(e.partnerType)})},yU=function(){var e=function(n){if(n instanceof Nu)return"waiting_room";if(n instanceof ao)return"on_air";if(n instanceof Ar)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Sn(e)(Cn(ose)(fU(fU(vU)(_U))(pU))(mU(mU(dU)))(pU))}(),bU=function(){return hU({parse:yU,default:Nu.value,diagnosticName:"livestream status"})}(),use=hU({parse:du,default:nt(lp),diagnosticName:"livestream scheduled start time"}),Mh=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:sU(fe(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:DU(n.id),slug:DU(n.slug)}}),scheduledStartTime:use(e.scheduledStartTime),onAirTime:gU(du)(fe(e.onAirTime)),streamStatus:bU(e.streamStatus),watchUrl:fe(e.watchUrl),streamingStartTime:gU(du)(fe(e.streamingStartTime)),polls:nse(e.polls)(function(n){return{poll:fF(n.poll),status:Fh(n.status)}}),presenter:ase(cU)(fe(e.presenter)),partnerType:fe(e.partnerType),guestPresenter:tse(fe(e.guestPresenter))(nU),zoomJoinUrl:fe(e.zoomJoinUrl),zoomStartUrl:fe(e.zoomStartUrl)}};var wU=Nn(jn),EU=Ln(An),IU=kn(Un),Pi=function(){function e(){}return e.value=new e,e}(),Pp=function(){function e(){}return e.value=new e,e}(),ise={to:function(e){if(e instanceof Re)return Pi.value;if(e instanceof ce)return Pp.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 Pi)return new Re(Oe.value);if(e instanceof Pp)return new ce(Oe.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},yb={eq:function(e){return function(n){return e instanceof Pi&&n instanceof Pi||e instanceof Pp&&n instanceof Pp}}};var Ah=function(e){if(e instanceof Pp)return"anonymous-all-schools";if(e instanceof Pi)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},bb=function(){return Zn(Ze)({parse:Sn(Ah)(Cn(ise)(Pn(wU)(Mn(Gn))(wU)(EU))(On(IU)(IU))(xn(EU))),diagnosticName:"Profile.PublishScope",default:Pp.value})}();var Rl=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}(),bl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var _F=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:fe(e.description)}},M_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:du(e.time)}},TU=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:fe(e.fullName),publishScope:bb(e.publishScope)}},pF=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}},ji="overlay-visibility-test";var SU=Nn(jn),wb=Pn(SU)(Mn(Gn)),CU=Ln(An),Eb=xn(CU),FU=kn(Un),Ib=On(FU),qs=function(){function e(){}return e.value=new e,e}(),_f=function(){function e(){}return e.value=new e,e}(),A_=function(){function e(){}return e.value=new e,e}(),pf=function(){function e(){}return e.value=new e,e}(),df=function(){function e(){}return e.value=new e,e}(),lse={to:function(e){if(e instanceof Re)return qs.value;if(e instanceof ce&&e.value0 instanceof Re)return _f.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return A_.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return pf.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce)return df.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 qs)return new Re(Oe.value);if(e instanceof _f)return new ce(new Re(Oe.value));if(e instanceof A_)return new ce(new ce(new Re(Oe.value)));if(e instanceof pf)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof df)return new ce(new ce(new ce(new ce(Oe.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},GU=function(e){if(e instanceof qs)return"love-this";if(e instanceof _f)return"helpful";if(e instanceof A_)return"not-helpful";if(e instanceof pf)return"writing-down";if(e instanceof df)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},MU=function(e){return{authorTag:e.authorTag,kind:GU(e.kind)}},cse=function(){return Zn(Ze)({parse:Sn(GU)(Cn(lse)(wb(wb(wb(wb(SU)(CU))(Eb))(Eb))(Eb))(Ib(Ib(Ib(Ib(FU)))))(Eb)),default:qs.value,diagnosticName:"Livestream Reaction Kind"})}(),AU=function(e){return{authorTag:e.authorTag,kind:cse(e.kind)}};var LU=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function xU(e,n){let a=typeof CV!="undefined"&&CV.apiEndpoint||typeof global!="undefined"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function PU(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 m=0,p;(p=r.headers[m])!=null;m++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var g=function(E){return function(){u(new Error(E))}};return l.onerror=g(a),l.ontimeout=g(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 b=E.indexOf(":");return t(E.substring(0,b))(E.substring(b+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,b,I){try{l.abort()}catch(L){return b(L)}return I()}}}var Tb="application/json",jU="application/x-www-form-urlencoded";var NU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Sb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HU=function(e){return e instanceof dF?new T(jU):e instanceof Sb?new T(Tb):G.value};var JU=function(){return Sb.create}();var qU=ba();var Cb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jp=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}(),WU=function(e){if(e instanceof Cb||e instanceof Fb)return qU(e.value0);if(e instanceof jp)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var mF=function(e){if(e instanceof Cb)return"Accept";if(e instanceof Fb)return"Content-Type";if(e instanceof jp)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var $U=ln(_n),hF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Gb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ab=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zU=function(e){if(e instanceof hF)return"arraybuffer";if(e instanceof DF)return"blob";if(e instanceof gF)return"document";if(e instanceof Gb||e instanceof Mb)return"text";if(e instanceof Ab)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},VU=function(e){return e instanceof Gb?new T(Tb):G.value},QU=function(){return new Mb($U)}();var KU=function(){return new Ab($U)}();var YU=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 vse=ba();var Np=function(e){return vse(jR(e))};function XU(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var Lb=function(e){return XU(Ie.create,Te.create,e)};function ZU(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function e7(e,n,a){try{return n(ZU(encodeURIComponent(a)))}catch(t){return e(t)}}function n7(e,n,a){try{return n(ZU(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var xb=function(){return bv(e7)(cn(G.value))(T.create)}();var Pb=function(){return bv(n7)(cn(G.value))(T.create)}();var _se=Jn(Dr),a7=U(oe),pse=io(Ku)(la);var dse=function(e){return e};var t7=function(){var e=function(t){if(t.value1 instanceof G)return Pb(t.value0);if(t.value1 instanceof T)return _se(a7(function(r){return function(u){return r+("="+u)}})(Pb(t.value0)))(Pb(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=a7(hr("&")),a=pse(e);return function(t){return n(a(dse(t)))}}();var yF=function(){function e(){}return e.value=new e,e}(),L_=function(){function e(){}return e.value=new e,e}(),bF=function(){function e(){}return e.value=new e,e}(),x_=function(){function e(){}return e.value=new e,e}(),jb=function(){function e(){}return e.value=new e,e}(),Lh=function(){function e(){}return e.value=new e,e}(),wF=function(){function e(){}return e.value=new e,e}(),EF=function(){function e(){}return e.value=new e,e}(),IF=function(){function e(){}return e.value=new e,e}(),TF=function(){function e(){}return e.value=new e,e}(),SF=function(){function e(){}return e.value=new e,e}(),CF=function(){function e(){}return e.value=new e,e}(),FF=function(){function e(){}return e.value=new e,e}(),GF=function(){function e(){}return e.value=new e,e}(),MF=function(){function e(){}return e.value=new e,e}(),Nb=function(){function e(){}return e.value=new e,e}();var mse=function(e){return e},hse={show:function(e){if(e instanceof yF)return"OPTIONS";if(e instanceof L_)return"GET";if(e instanceof bF)return"HEAD";if(e instanceof x_)return"POST";if(e instanceof jb)return"PUT";if(e instanceof Lh)return"DELETE";if(e instanceof wF)return"TRACE";if(e instanceof EF)return"CONNECT";if(e instanceof IF)return"PROPFIND";if(e instanceof TF)return"PROPPATCH";if(e instanceof SF)return"MKCOL";if(e instanceof CF)return"COPY";if(e instanceof FF)return"MOVE";if(e instanceof GF)return"LOCK";if(e instanceof MF)return"UNLOCK";if(e instanceof Nb)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var r7=jt(te(hse))(mse);var o7={eq:function(e){return function(n){return e instanceof yF&&n instanceof yF||e instanceof L_&&n instanceof L_||e instanceof bF&&n instanceof bF||e instanceof x_&&n instanceof x_||e instanceof jb&&n instanceof jb||e instanceof Lh&&n instanceof Lh||e instanceof wF&&n instanceof wF||e instanceof EF&&n instanceof EF||e instanceof IF&&n instanceof IF||e instanceof TF&&n instanceof TF||e instanceof SF&&n instanceof SF||e instanceof CF&&n instanceof CF||e instanceof FF&&n instanceof FF||e instanceof GF&&n instanceof GF||e instanceof MF&&n instanceof MF||e instanceof Nb&&n instanceof Nb}}};var u7=function(e){return Uv(function(n){return function(){var t=e(function(r){return n(Ie.create(r))()},function(r){return n(Te.create(r))()});return function(r){return Uv(function(u){return function(){return t(r,function(l){return u(Ie.create(l))()},function(l){return u(Te.create(l))()}),yS}})}}})};var AF=q(nl(ar)),Dse=K0(ar),P_=Ts(ar),i7=ia(UR(JR)(ar)),gse=ps(wc(ar)),Ob=U(oe),Rse=wu(Be)(at),yse=De(xt),bse=Ta(Ve),wse=U(ze),Ese=_e(Ca),Ise=Cv($r),Tse=q(Qn);var Ub=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kb=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}(),Bb=function(){function e(){}return e.value=new e,e}(),Hb=function(){function e(){}return e.value=new e,e}(),Jb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),l7=function(e){return function(n){var a=function(p){return p===""?AF(_4):jt(function(g){return Dse(Nm.create(g))})(AF)(Lb(p))},t=function(){if(n.responseFormat instanceof hF)return P_("ArrayBuffer");if(n.responseFormat instanceof DF)return P_("Blob");if(n.responseFormat instanceof gF)return function(p){return i7(P_("Document")(p))(i7(P_("XMLDocument")(p))(P_("HTMLDocument")(p)))};if(n.responseFormat instanceof Gb)return gse(function(p){return n.responseFormat.value0(a(p))})(P_("String"));if(n.responseFormat instanceof Mb)return P_("String");if(n.responseFormat instanceof Ab)return cn(n.responseFormat.value0(AF(de)));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 NU)return new Te(p.value0(Gr));if(p instanceof OU)return new Te(Gr(p.value0));if(p instanceof UU)return new Te(Gr(p.value0));if(p instanceof kU)return new Te(Gr(p.value0));if(p instanceof BU)return new Te(Gr(p.value0));if(p instanceof dF)return Dc("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(Ob(Gr)(t7(p.value0)));if(p instanceof Sb)return new Te(Gr(Hy(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(g){return p instanceof T&&!Rse(cv(yse)(mF)(p.value0))(g)?t_(g)(p.value0):g}},i=function(p){return u(Ob(Fb.create)(bse(HU)(p)))(u(Ob(Cb.create)(VU(n.responseFormat)))(n.headers))},l=function(p){return{method:r7(n.method),url:n.url,headers:wse(function(g){return{field:mF(g),value:WU(g)}})(i(n.content)),content:p,responseType:zU(n.responseFormat),username:Ia(n.username),password:Ia(n.password),withCredentials:n.withCredentials,timeout:Ue(0)(Ob(function(g){return g})(n.timeout))}},s=function(p){return Ese(Ise(u7(PU(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",YU.create,l(p)))))(function(g){if(g instanceof Te){var E=Np(t(g.value0.body));if(E instanceof Ie)return new Ie(new kb(sj(E.value0),g.value0));if(E instanceof Te)return new Te({headers:g.value0.headers,status:g.value0.status,statusText:g.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(g instanceof Ie)return new Ie(function(){var b=W0(g.value0),I=b==="AffjaxTimeoutErrorMessageIdent";if(I)return Bb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?Hb.value:new Jb(g.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[g.constructor.name])})};if(n.content instanceof G)return s(Ia(G.value));if(n.content instanceof T){var m=r(n.content.value0);if(m instanceof Te)return s(Ia(new T(m.value0)));if(m instanceof Ie)return Tse(new Ie(new Ub(m.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[m.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Op=function(){return{method:new Ie(L_.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:KU,timeout:G.value}}();var c7={eq:function(e){return function(n){return e===n}}};var LF={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var s7=l7(LF);function M7(e){return Buffer.from(e).toString("base64")}function A7(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var NF=typeof btoa=="function";function L7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Qc||!Qc.key)return Qc||console.error("Pusher config is missing in global context"),new fve;let t={auth:{headers:{"X-CSRF-Token":Qc.authToken}},authEndpoint:Qc.authPath,cluster:Qc.cluster};return Qc.dev&&Object.assign(t,{wsHost:Qc.dev.wsHost,wsPort:Qc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new V7.default(Qc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),Q7=e=>{let n=sve().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),vve()}};function fve(){typeof document!="undefined"&&(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 _ve(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function _ve(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 $b=function(e){return e};var mve=function(e){return e},Y7=function(e){var n=He(e),a=mve(e.Eq0());return{compare:function(t){return function(r){return hx(n(t)(r))}},Eq0:function(){return a}}};var zb=function(e){return function(){console.error(e)}};var o6=function(e){var n=gn(e);return function(a){return n(zb(a))}};var Cve=q(_t),u6=ee(fr),Fve=U(Bn),Gve=o6(Cr),kF=function(e){var n=function(t){var r=e(t);return VS(r.view(r.init.value0)(cn(Cve(de))))},a=function(t){return function(r){return function(u){return function(){var l=u6(u6(pu)(function(){var m=Fve(pb);return function(p){return m(lf(p))}}()))(fb(r))();if(l instanceof G)return Gve("Element #"+(r+" not found"))();if(l instanceof T){var s=XS(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(N3),renderToString:n,hydrate:a(O3)}};var jh="";function l6(e){var n=e.split(` `);return n.reduce(function(a,t){var r=Lve(t)||Pve(t)||Ove(t)||Hve(t)||kve(t);return r&&a.push(r),a},[])}var Mve=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ave=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Lve(e){var n=Mve.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=Ave.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]||jh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var xve=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Pve(e){var n=xve.exec(e);return n?{file:n[2],methodName:n[1]||jh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var jve=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Nve=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Ove(e){var n=jve.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=Nve.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||jh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Uve=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function kve(e){var n=Uve.exec(e);return n?{file:n[3],methodName:n[1]||jh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var Bve=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Hve(e){var n=Bve.exec(e);return n?{file:n[2],methodName:n[1]||jh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function c6({skipFrames:e,prefix:n}){let a=new Error().stack,r=l6(a)[e],u=s6(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=s6(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var s6=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var Jve=q(Rn),qve=ln(_n),Vb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Wve={map:function(e){return function(n){return new Vb(function(a){return n.value0(function(t){return a(e(t))})})}}},$ve=U(Wve);var v6=function(e){return YS(c6(e))},Ws=function(e){return new Vb(function(n){return n(e)})},N_=function(e){return function(n){return new Vb(function(a){return Ps(e)(n)(a)})}},f6=function(e){return function(n){return Ps(e)(function(a){return{init:Jve(de),update:cn(ds),view:cn(cn(n.value0(qve)))}})(de)}},_6=function(e){var n=v6({skipFrames:3,prefix:"WithHook"});return function(a){return f6(n)($ve(a)(e))}};var Hp=function(e){var n=v6({skipFrames:3,prefix:"HooksComponent"});return f6(n)(e)},Kc=function(){return function(e){return function(n){return new Vb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},zve=Kc(),O_=function(e){return function(){return zve}};$a();var p6=class extends Fa.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},d6=p6;var Vve=Et();var m6=function(e){return"ref:"+Ft(e)(Wa.value)},h6=function(e){var n=m6(e);return function(a){return Vve(Sc(n)(a))}},D6=function(e){var n=m6(e);return function(a){return QR(n)(a)}};var Qve=Fi(),g6=nn(Ke)(qn),R6=q(Rn),Kve=Gi(Fy(sl)),y6={reflectSymbol:function(){return"deps"}},Yve=h6(y6),Xve=D6(y6),Zve=ln(_n);var efe=function(e){var n=Qve(e);return function(){return function(){return n(d6)}}},nfe=efe(Qe)()(),afe=function(e){var n=yo(e);return function(a){return function(t){return function(r){return function(u){return N_(a)(function(i){return t({init:g6(Za(u(r)))(function(){return R6(r)}),update:function(l){return function(s){return g6(Za(u(s)))(function(){return R6(s)})}},view:function(l){return function(s){return nfe({componentDidUpdate:Kve(s)(function(m){var p=n(Yve(m))(r);return p?new T(r):G.value}),deps:Xve(r)})(i(de))}}})})}}}}};var Jp=function(e){var n=afe(e);return function(a){return function(t){return n("UseEffectPrime")(Zve)(a)(t)}}};var b6=q(Rn),tfe=ln(_n);var rfe=function(e){return function(n){return function(a){return N_(e)(function(t){return n({init:b6(a),update:function(r){return function(u){return b6(u)}},view:Qf(t)})})}}},El=function(e){return rfe("UseState")(tfe)(e)};var BF=function(){return Kc()(El(G.value))(function(e){return Ws(new sn(e.value0,Sy(e.value0)(e.value1)))})}();var w6=nn(Ke)(qn),ofe=fu(Le),ufe=ln(_n),E6=q(Rn),Nh=function(e){return function(n){return N_("UseSubscription")(function(a){return{init:w6(ofe(ufe)(e))(function(){return E6(de)}),update:function(t){return function(r){return w6(Za(n(r)))(function(){return E6(de)})}},view:function(t){return function(r){return a(de)}}}})}};var Qb=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var HF=el(Zr(at)),cfe=ln(_n),sfe=fl()(),Kb=function(e){var n=ei(e);return function(a){return Pt(n(a))}},F6=function(e){if(HF(Kb("http://"))(HF(Kb("https://"))(HF(Kb("//"))(Kb("blob:"))))(e))return e;if(je)return Qb+Ue(e)(ei("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},si=function(){return function(){return function(e){return function(n){var a=function(r){return cfe},t=a(n)(X0("src")(F6(n.src))(n));return sfe(e)(t)}}}};var M6=q(Rn),vfe=Zn(Qy),ffe=ee(tu);var _fe={init:M6(de),update:function(e){return function(n){return M6(de)}},view:function(e){return function(n){return ta}}},JF=function(e){var n=Lv(e);return function(a){return kF(vfe({parse:function(t){return ffe(n(t))(function(r){return In(new Ie("Component construction failed"))(Te.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:_fe}))}};var Me=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bn=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Ife=JSON.stringify;var Sfe=gr(Be)(It),Cfe=Bo(_t)(Qu),Ffe=_e(tC);var Gfe={show:function(e){return e}},Mfe=te(Gfe);var Zb=he;var Afe=function(e){var n=af(e);return function(a){return function(t){return function(r){var u=Sfe(["Pusher event ",t," over channel ",Mfe(a)]),i=function(l){return Cfe(n(u)(l))(r)()};return function(){return Q7({channel:a,event:t,handler:i})}}}}},Ni=function(e){var n=Afe(e);return function(a){var t=a.Monad0(),r=ee(t.Bind1()),u=gn(a),i=q(t.Applicative0());return function(l){return function(s){return function(m){return r(u(n(l)(s)(m)))(function(p){return i(u(p))})}}}}},Lfe=Ni(v_),ew=function(e){var n=Lfe(e);return function(a){return function(t){return Ffe(n(a)(t))(cn(de))}}};var K6=Vc($c),Ou=tc(K6),Lr=ee(ra),Uh=tc(Vc(K6)),Y6=q(Qn),xfe=_e(oe),kh=La(),X6=H({reflectSymbol:function(){return"pollId"}})(on),Pfe=H({reflectSymbol:function(){return"status"}})(he)(tn),jfe=gt(xa(kh(X6(Pfe)))),Z6=U(ze),e5=U(Ca),Nfe=H({reflectSymbol:function(){return"id"}}),Ofe=Nfe(on),n5=kh(H({reflectSymbol:function(){return"author"}})(kh(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(Ofe(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))),Ufe=Bp(n5);var kfe=tt(he);var Bfe=Bp(xa(kh(X6(H({reflectSymbol:function(){return"responses"}})(kh(H({reflectSymbol:function(){return"answered"}})(on)(H({reflectSymbol:function(){return"optionCounts"}})(xa(on))(H({reflectSymbol:function(){return"seen"}})(on)(H({reflectSymbol:function(){return"skipped"}})(on)(tn))))))(tn))))),Hfe=Bp(kfe),Jfe=Bp(xa(n5));var VF=Uh("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Lr(e({id:n.id,status:Rb(a)}))(zc(function(t){return Y6(Ue([])(xfe(jfe(t))(Z6(function(r){return{pollId:r.pollId,status:Fh(r.status)}}))))}))}}});var QF=Uh("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Lr(e({id:n.id,options:a}))(lr)}}}),a5=Ou("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Lr(e({conference_id:n}))(lr)}}),t5=Ou("livestreams_conferences_status_complete_path")(function(e){return function(n){return Lr(e({conference_id:n}))(lr)}}),r5=Ou("livestreams_cta_save_referral_path")(function(e){return function(n){return Lr(e(n))(lr)}}),o5=Ou("livestreams_polls_report_shown_path")(function(e){return function(n){return Lr(e({id:n.id}))(lr)}}),u5=Uh("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Lr(e({stream_id:n,visible:a.visible}))(lr)}}}),i5=Uh("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Lr(e({conference_id:n,current_time_minutes:a}))(lr)}}}),l5=Ou("livestreams_questions_visibility_path")(function(e){return function(n){return Lr(e({question_id:n.questionId,is_public:n.isPublic}))(lr)}}),c5=Ou("livestreams_questions_post_path")(function(e){return function(n){return Lr(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(zc(function(a){return e5(M_)(Ufe("Livestream question")(a))}))}}),s5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),v5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),f5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),_5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(lr)}}),nw=Ou("livestreams_register_path")(function(e){return function(n){return Lr(e({from_conference_id:Ia(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(lr)}});var p5=Uh("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Lr(e({conference_id:n,reaction:MU(a)}))(lr)}}}),d5=Ou("livestreams_polls_responses_path")(function(e){return function(n){return Lr(e({conference_id:n}))(zc(Bfe("livestream poll responses")))}}),m5=Ou("livestreams_conferences_download_url_path")(function(e){return function(n){return Lr(e({conference_id:n}))(zc(function(a){return e5(fe)(Hfe("Livestream download URL")(a))}))}}),aw=tc($c)("livestreams_dismiss_network_settings_modal_path")(function(e){return Lr(e({}))(lr)});var h5=Ou("livestreams_conferences_ban_user_path")(function(e){return function(n){return Lr(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(lr)}}),tw=Ou("livestreams_questions_all_path")(function(e){return function(n){return Lr(e({conference_id:n}))(zc(function(a){return Lr(Jfe("Livestream questions")(a))(function(t){return Y6(Z6(M_)(t))})}))}});var YF=function(){function e(){}return e.value=new e,e}(),XF=function(){function e(){}return e.value=new e,e}(),ZF=function(){function e(){}return e.value=new e,e}(),eG=function(){function e(){}return e.value=new e,e}(),nG=function(){function e(){}return e.value=new e,e}(),aG=function(){function e(){}return e.value=new e,e}(),tG=function(){function e(){}return e.value=new e,e}(),rG=function(){function e(){}return e.value=new e,e}(),oG=function(){function e(){}return e.value=new e,e}(),uG=function(){function e(){}return e.value=new e,e}(),iG=function(){function e(){}return e.value=new e,e}(),lG=function(){function e(){}return e.value=new e,e}(),cG=function(){function e(){}return e.value=new e,e}(),sG=function(){function e(){}return e.value=new e,e}(),Jt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vG=function(){function e(){}return e.value=new e,e}();var ow=function(e){if(e instanceof Jt&&e.value0 instanceof YF)return"architecture";if(e instanceof Jt&&e.value0 instanceof ZF)return"chemistry";if(e instanceof Jt&&e.value0 instanceof XF)return"business";if(e instanceof Jt&&e.value0 instanceof eG)return"computer-science";if(e instanceof Jt&&e.value0 instanceof nG)return"criminal-justice-and-corrections";if(e instanceof Jt&&e.value0 instanceof aG)return"economics";if(e instanceof Jt&&e.value0 instanceof tG)return"engineering";if(e instanceof Jt&&e.value0 instanceof rG)return"english";if(e instanceof Jt&&e.value0 instanceof oG)return"film";if(e instanceof Jt&&e.value0 instanceof uG)return"finance";if(e instanceof Jt&&e.value0 instanceof iG)return"history";if(e instanceof Jt&&e.value0 instanceof lG)return"political-science";if(e instanceof Jt&&e.value0 instanceof cG)return"pre-med";if(e instanceof Jt&&e.value0 instanceof sG)return"psychology";if(e instanceof vG)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var uw=function(){function e(){}return e.value=new e,e}(),Vfe=function(){function e(){}return e.value=new e,e}(),Qfe=function(){function e(){}return e.value=new e,e}();var D5=function(e){if(e instanceof uw)return G.value;if(e instanceof Qfe)return new T("open");if(e instanceof Vfe)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 Ade=rr(Zr(at)),Lde=function(e){return e},en=Gr(Xu),xde=function(e){return Ade(i_)(e)},g5=function(e){var n=xde(e);return n?e:""},Zt=function(e){return Lde(Gr(e))};var Pde=ZS(t4),R5=$l()(),wr=function(e){return Pde(e)},$n=function(e){var n=mO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(R5(r)({className:a,"aria-label":t}))(u)}}}}}}},y5=function(e){var n=$n(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},cr=function(e){var n=DO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(R5(r)({className:a,"aria-label":t}))(u)}}}}}}};var I5=Et();var lw=function(e){return function(n){var a=function(){var u=Tc("?")(n);return u?"&":"?"}(),t=I5(xb(e.value)),r=I5(xb(e.key));return n+(a+(r+("="+t)))}};var ume=function(){function e(){}return e.value=new e,e}(),ime=function(){function e(){}return e.value=new e,e}(),lme=function(){function e(){}return e.value=new e,e}(),cme=function(){function e(){}return e.value=new e,e}(),sme=function(){function e(){}return e.value=new e,e}(),vme=function(){function e(){}return e.value=new e,e}(),fme=function(){function e(){}return e.value=new e,e}(),_me=function(){function e(){}return e.value=new e,e}(),pme=function(){function e(){}return e.value=new e,e}(),dme=function(){function e(){}return e.value=new e,e}(),mme=function(){function e(){}return e.value=new e,e}(),hme=function(){function e(){}return e.value=new e,e}(),Dme=function(){function e(){}return e.value=new e,e}(),gme=function(){function e(){}return e.value=new e,e}(),Rme=function(){function e(){}return e.value=new e,e}(),yme=function(){function e(){}return e.value=new e,e}(),bme=function(){function e(){}return e.value=new e,e}(),wme=function(){function e(){}return e.value=new e,e}(),Eme=function(){function e(){}return e.value=new e,e}(),Ime=function(){function e(){}return e.value=new e,e}(),Tme=function(){function e(){}return e.value=new e,e}(),Sme=function(){function e(){}return e.value=new e,e}(),Cme=function(){function e(){}return e.value=new e,e}(),Fme=function(){function e(){}return e.value=new e,e}(),Gme=function(){function e(){}return e.value=new e,e}(),Mme=function(){function e(){}return e.value=new e,e}(),Ame=function(){function e(){}return e.value=new e,e}(),Lme=function(){function e(){}return e.value=new e,e}(),xme=function(){function e(){}return e.value=new e,e}(),Pme=function(){function e(){}return e.value=new e,e}(),jme=function(){function e(){}return e.value=new e,e}(),Nme=function(){function e(){}return e.value=new e,e}(),Ome=function(){function e(){}return e.value=new e,e}(),Ume=function(){function e(){}return e.value=new e,e}(),kme=function(){function e(){}return e.value=new e,e}(),Bme=function(){function e(){}return e.value=new e,e}(),Hme=function(){function e(){}return e.value=new e,e}(),Jme=function(){function e(){}return e.value=new e,e}(),qme=function(){function e(){}return e.value=new e,e}(),Wme=function(){function e(){}return e.value=new e,e}(),$me=function(){function e(){}return e.value=new e,e}(),zme=function(){function e(){}return e.value=new e,e}(),Vme=function(){function e(){}return e.value=new e,e}(),Qme=function(){function e(){}return e.value=new e,e}(),Kme=function(){function e(){}return e.value=new e,e}(),Yme=function(){function e(){}return e.value=new e,e}(),Xme=function(){function e(){}return e.value=new e,e}(),Zme=function(){function e(){}return e.value=new e,e}(),ehe=function(){function e(){}return e.value=new e,e}(),nhe=function(){function e(){}return e.value=new e,e}(),ahe=function(){function e(){}return e.value=new e,e}(),the=function(){function e(){}return e.value=new e,e}(),rhe=function(){function e(){}return e.value=new e,e}(),ohe=function(){function e(){}return e.value=new e,e}(),uhe=function(){function e(){}return e.value=new e,e}(),ihe=function(){function e(){}return e.value=new e,e}();var ca=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Uu=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var T5=function(e){if(e instanceof ca&&e.value0 instanceof ume)return"AcceptanceRate";if(e instanceof ca&&e.value0 instanceof ime)return"AcceptanceRateMen";if(e instanceof ca&&e.value0 instanceof lme)return"AcceptanceRateWomen";if(e instanceof ca&&e.value0 instanceof cme)return"Address";if(e instanceof ca&&e.value0 instanceof sme)return"AdmissionChances";if(e instanceof ca&&e.value0 instanceof vme)return"AdmissionDifficulty";if(e instanceof ca&&e.value0 instanceof fme)return"AdmissionsNotificationDate";if(e instanceof ca&&e.value0 instanceof _me)return"AdmissionsWebsite";if(e instanceof ca&&e.value0 instanceof pme)return"AppDeadlineIsRolling";if(e instanceof ca&&e.value0 instanceof dme)return"ApplicationEffort";if(e instanceof ca&&e.value0 instanceof mme)return"ApplicationRound";if(e instanceof ca&&e.value0 instanceof hme)return"BasketballConference";if(e instanceof ca&&e.value0 instanceof Dme)return"CampusSetting";if(e instanceof ca&&e.value0 instanceof gme)return"City";if(e instanceof ca&&e.value0 instanceof Rme)return"ClassRank";if(e instanceof ca&&e.value0 instanceof yme)return"CoEdSingleSex";if(e instanceof ca&&e.value0 instanceof bme)return"CollegeType";if(e instanceof ca&&e.value0 instanceof wme)return"CommuterCollege";if(e instanceof ca&&e.value0 instanceof Eme)return"Diversity";if(e instanceof ca&&e.value0 instanceof Ime)return"DropoutRate";if(e instanceof ca&&e.value0 instanceof Sme)return"FinancialAidWebsite";if(e instanceof ca&&e.value0 instanceof Cme)return"FirstYearEnrollment";if(e instanceof ca&&e.value0 instanceof Fme)return"FootballConference";if(e instanceof ca&&e.value0 instanceof Gme)return"FourYearGraduationRate";if(e instanceof ca&&e.value0 instanceof Mme)return"HasDivisionOneBasketball";if(e instanceof ca&&e.value0 instanceof Ame)return"HasDivisionOneFootball";if(e instanceof ca&&e.value0 instanceof Lme)return"HasMedicalSchool";if(e instanceof ca&&e.value0 instanceof xme)return"HasStudyAbroad";if(e instanceof ca&&e.value0 instanceof Pme)return"HBCU";if(e instanceof ca&&e.value0 instanceof jme)return"InListStatus";if(e instanceof ca&&e.value0 instanceof Nme)return"MainWebsite";if(e instanceof ca&&e.value0 instanceof Tme)return"Majors";if(e instanceof ca&&e.value0 instanceof Ome)return"Name";if(e instanceof ca&&e.value0 instanceof Ume)return"NetCostEstimate";if(e instanceof ca&&e.value0 instanceof kme)return"Notes";if(e instanceof ca&&e.value0 instanceof Bme)return"PercentInternationalStudents";if(e instanceof ca&&e.value0 instanceof Hme)return"Phone";if(e instanceof ca&&e.value0 instanceof Jme)return"Photo";if(e instanceof ca&&e.value0 instanceof qme)return"Prestige";if(e instanceof ca&&e.value0 instanceof Wme)return"ProgramLength";if(e instanceof ca&&e.value0 instanceof $me)return"PublicPrivate";if(e instanceof ca&&e.value0 instanceof zme)return"RecommendationLetters";if(e instanceof ca&&e.value0 instanceof Vme)return"Region";if(e instanceof ca&&e.value0 instanceof Qme)return"ReligiousAffiliation";if(e instanceof ca&&e.value0 instanceof Kme)return"SatActDeadline";if(e instanceof ca&&e.value0 instanceof Yme)return"SatActTestPolicy";if(e instanceof ca&&e.value0 instanceof Xme)return"SatSubjectTestDeadline";if(e instanceof ca&&e.value0 instanceof Zme)return"SixYearGraduationRate";if(e instanceof ca&&e.value0 instanceof ehe)return"State";if(e instanceof ca&&e.value0 instanceof nhe)return"StudentFacultyRatio";if(e instanceof ca&&e.value0 instanceof ahe)return"SubmissionDeadline";if(e instanceof ca&&e.value0 instanceof the)return"TOEFLPolicy";if(e instanceof ca&&e.value0 instanceof rhe)return"TotalUndergrads";if(e instanceof ca&&e.value0 instanceof ohe)return"TuitionInState";if(e instanceof ca&&e.value0 instanceof uhe)return"TuitionOutOfState";if(e instanceof ca&&e.value0 instanceof ihe)return"YieldRate";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof YF)return"RankingArchitecture";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof XF)return"RankingBusiness";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof ZF)return"RankingChemistry";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof eG)return"RankingComputerScience";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof nG)return"RankingCriminalJusticeAndCorrections";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof aG)return"RankingEconomics";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof tG)return"RankingEngineering";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof rG)return"RankingEnglish";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof oG)return"RankingFilm";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof uG)return"RankingFinance";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof iG)return"RankingHistory";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof lG)return"RankingPoliticalScience";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof cG)return"RankingPreMed";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof sG)return"RankingPsychology";if(e instanceof Uu&&e.value0 instanceof vG)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var lhe=function(){function e(){}return e.value=new e,e}(),che=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),she=function(){function e(){}return e.value=new e,e}();var S5=function(e){if(e instanceof lhe)return"filters";if(e instanceof che)return"filter:"+T5(e.value0);if(e instanceof she)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 33, column 26 - line 36, column 39): "+[e.constructor.name])};function C5(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var vhe=ni();var $s=function(e){var n=gn(e);return function(a){return function(t){return n(function(){return C5(a,t)})}}},zs=function(e){var n=$s(e);return function(){return function(a){return function(t){return n(a)(vhe(t))}}}};var Bh=function(){function e(){}return e.value=new e,e}(),mf=function(){function e(){}return e.value=new e,e}(),Hh=function(){function e(){}return e.value=new e,e}(),khe=function(){function e(){}return e.value=new e,e}(),M5=function(e){if(e instanceof Bh)return"modal-sm";if(e instanceof mf)return"";if(e instanceof Hh)return"modal-lg";if(e instanceof khe)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 a9=Wu(n9()),t9=a9.default;var yDe=Fi(),r9=function(e){var n=yDe(e);return function(){return function(){return n(t9)}}};function gG(e){return function(){return function(n){return e(n)()}}}function RG(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function yG(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var o9="message";var u9="hashchange";var i9="popstate";var l9="keyup",c9="keydown";var s9="mouseup";var v9="mousemove";var f9=gn(Le),_9=U(Bn),bDe=Ta(fr),$h=function(){var e=function(t){return function(r){return function(u){return f9(function(){var l=r(),s=gG(function(m){return u(m)})();return RG(t)(s)(!1)(l)(),f9(yG(t)(s)(!1)(l))})}}},n=function(t){return e(t)(_9(SO)(pu))},a=function(t){return e(t)(_9(bO)(bDe(lf)(pu)))};return{hashchange:n(u9),mousemove:n(v9),mouseup:n(s9),popstate:n(i9),resize:n("resize"),message:n(o9),keydown:a(c9),keyup:a(l9),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var pw=function(){return Je};var dw=Se(Qe),bG=co(),wDe=r9(Qe)()(),wG=Xt(Qe)()(),EDe=Xt(ye)()(),IDe=Se(ye),TDe=$n(re)()(),SDe=er(Qn),CDe=gn(Le),p9=pw(),rc=function(){return function(e){var n=dw("modal-backdrop fade show")(ta),a=bG(e),t=a.id+"-description",r=gl(a.footer),u=gl(a.header),i=a.id+"-label",l={style:Ba(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 72, column 11 - line 74, column 26): "+[u.constructor.name])}(),"aria-describedby":t},s=Ba(a.size)(mf.value),m=hr(" ")([function(){var g=Ba(a.scrollable)(!0);return g?"modal-dialog-scrollable":""}(),function(){var g=Ba(a.centered)(!0);return g?"modal-dialog-centered":""}(),M5(s),Ba(a.dialogClass)("")]),p=wDe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(dw("modal fade show d-block")(wG("modal-dialog "+m)(l)(EDe("modal-content "+Ba(a.contentClass)(""))({style:Ba(a.contentStyle)(vt({}))})([ha(u)(wG("modal-header "+Ba(a.headerClass)(""))({id:i})),wG("modal-body "+Ba(a.bodyClass)(""))({id:t})(a.body),ha(r)(dw("modal-footer "+Ba(a.footerClass)("")))]))));return Fe([p,n])}},EG=rc(),oc=function(){return function(e){var n=bG(e),a=IDe("d-flex w-100 justify-content-between align-items-center")([dw("mr-4")(Ba(n.title)(ta)),TDe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Ba(n.dismissButtonClass)("text-body"))(Zt("Close"))({type:"button",onClick:wr(function(r){return n.onDismiss})})("")]),t=function(r){return SDe(r.key==="Escape")(CDe(n.onDismiss))};return _6(Nh($h.keyup)(t))(function(r){var u=Ba(n.bodyScrollable)(!1);return EG(u?function(){var i=bG(p9(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}}():p9({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:Fe([a,n.body])}))})}},Wp=function(e){var n=ch(e);return function(a){return function(t){return function(r){return EG({id:t.id,bodyClass:a,body:Fe(n(r))})}}}};var FDe=co(),GDe=ln(_n),MDe=Xv(ye)()(),ADe=$n(Qe)()(),LDe=eo()();var mw="login",IG=function(){return function(e){var n=FDe(e),a=function(){var u=Ba(n.auth0ActiveTab)(mw);return u}(),t=Ue({path:"",token:""})(qb("login_path")),r=function(u){return function(i){return In(GDe)(function(l){return lw(function(s){return{key:u,value:s}}(l))})(gl(i))}};return MDe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(lw({key:"screen_hint",value:a})(t.path))),target:function(){var u=Ba(n.openInNewTab)(!1);return u?"_blank":""}()})([ADe(Ba(n.className)("btn btn-primary px-4"))(en)({type:"submit",disabled:Ba(n.disabled)(!1)})(Ba(n.content)(Xe(Ba(n.text)("Log in")))),LDe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var B_=function(e){return function(n){return function(){return n[e]}}},xDe=B_("URL"),PDe=B_("documentURI"),jDe=B_("origin"),NDe=B_("compatMode"),ODe=B_("characterSet"),UDe=B_("contentType");var kDe=B_("documentElement");var hw=function(e){return function(n){return n[e]}},HDe=hw("namespaceURI"),JDe=hw("prefix"),qDe=hw("localName"),WDe=hw("tagName");function TG(e){return function(){return e.id}}function SG(e){return function(){return e.classList}}function CG(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 FG=Je;var m9=Fn("Element");var uc=function(e){return function(n){return function(){return n[e]}}};var zDe=uc("baseURI"),VDe=uc("ownerDocument"),h9=uc("parentNode"),QDe=uc("parentElement");var KDe=uc("childNodes"),YDe=uc("firstChild"),XDe=uc("lastChild"),ZDe=uc("previousSibling"),ege=uc("nextSibling"),nge=uc("nodeValue");var age=uc("textContent");function GG(e){return function(n){return function(){return e.isEqualNode(n)}}}var oge=U(Bn);var D9=function(){var e=oge(fe);return function(n){return e(h9(n))}}();var J_=function(){function e(){}return e.value=new e,e}(),g9=function(){function e(){}return e.value=new e,e}(),R9=function(){function e(){}return e.value=new e,e}(),zh=function(){function e(){}return e.value=new e,e}(),y9=function(){function e(){}return e.value=new e,e}(),b9=function(){function e(){}return e.value=new e,e}(),w9=function(){function e(){}return e.value=new e,e}();var Dw=function(e){if(e instanceof J_)return G.value;if(e instanceof g9)return new T("for-you");if(e instanceof R9)return new T("chancing");if(e instanceof zh)return new T("finances");if(e instanceof y9)return new T("majors");if(e instanceof b9)return new T("admission-requirements");if(e instanceof w9)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 MG=_e(oe);var AG=k0(It),cge=ba(),sge=hi(oe),LG=function(e){return"/schools/"+e.slug},xG="/schools/hub";var E9=function(e){return function(n){var a=MG(D5(n.whatificator))(function(l){return"simulator="+l}),t=MG(n.mobileOverlay)(function(l){return"overlay="+S5(l)}),r=hr("&")(Jo([t,a])),u=MG(n.focusedSchool)(function(l){return AG("/")(Jo([new T(cge(l.slug)),Dw(l.tab)]))}),i=function(){return e.knownSeoState instanceof T&&n.seoView?AG("/")(Jo([new T(LG({slug:e.knownSeoState.value0.slug})),u])):AG("/")(Jo([new T(xG),new T(In(e.basePath)(ow)(n.ranking)),sge(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var I9="/profile";var fge=ba();var PG=function(e){return function(n){return hr("/")(Jo([new T("/schools"),new T(fge(n)),Dw(e)]))}},T9=I9,S9="/livestreams/upcoming";var _ge=function(e){return E9({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:uw.value})};var gw=function(e){return function(n){return _ge(new T({tab:e,slug:n}))}};var C9=function(){function e(){}return e.value=new e,e}(),F9=function(){function e(){}return e.value=new e,e}(),Rw=function(){function e(){}return e.value=new e,e}(),yw=function(){function e(){}return e.value=new e,e}(),G9=function(){function e(){}return e.value=new e,e}(),M9=function(){function e(){}return e.value=new e,e}(),A9=function(){function e(){}return e.value=new e,e}(),L9=function(e){if(e instanceof C9)return"avatar-xxs";if(e instanceof F9)return"avatar-xs";if(e instanceof Rw)return"avatar-sm";if(e instanceof yw)return"";if(e instanceof G9)return"avatar-lg";if(e instanceof M9)return"avatar-xl";if(e instanceof A9)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 x9={show:ba()};var pge=Number.MAX_SAFE_INTEGER;var NG=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if(je)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 Fge=De(yb);var j9={show:function(e){return e}};var N9=function(e){return Fge(e.publishScope)(Pi.value)};var $p=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var qG=te(x9);var Gge=te(f8),O9=te(q4),Mge=te(j9);var Age="/messages";var Lge=function(e){return function(n){return e+("/"+function(){if(n instanceof $p)return"admission-officer/"+Gge(n.value0);if(n instanceof OG)return"school/"+O9(n.value0);if(n instanceof UG)return"student/"+Mge(n.value0);if(n instanceof kG)return"high-school/"+qG(n.value0);if(n instanceof BG)return"service-provider/"+qG(n.value0);if(n instanceof HG)return"parent/"+qG(n.value0);if(n instanceof JG)return"recruiter/"+O9(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},WG=Lge(Age);var xge=tc(Vc($c)),Pge=ee(ra),U9=_e(oe),k9=ba(),jge=lt(Ca);var B9=xge("network_connections_invite_school_path")(function(e){return function(n){return Pge(e({school_id:n.schoolId,message:Ia(n.introMessage),sem_user_id:Ia(U9(n.semUserId)(k9)),livestream_id:Ia(U9(n.livestreamId)(k9))}))(lr)}}),H9=function(e){return function(n){return jge(B9({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var J9=function(e){return function(n){return function(a){return B9({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};$a();function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;Y9+=1;var a=Y9;function t(r){if(r===0)X9(a),e();else{var u=Q9(function(){t(r-1)});zG.set(a,u)}}return t(n),a}Oi.cancel=function(e){var n=zG.get(e);return X9(n),K9(n)};function W_(e,n){return e?e.contains(n):!1}function Qh(e){return e instanceof HTMLElement?e:Ci.findDOMNode(e)}var tk=Wu(ak());$a();function YG(e,n){typeof e=="function"?e(n):Er(e)==="object"&&e&&"current"in e&&(e.current=n)}function Pw(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=Array(n);a1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Oi(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Ot(function(){return function(){n()}},[]),[a,n]};$a();var $ge=Yc()?Zm:Ot,Bw=$ge;var gk=[Il,Qs,gf,kw],tM=!1,Rk=!0;function Hw(e){return e===gf||e===kw}var yk=function(e,n){var a=Ks(aM),t=Wt(a,2),r=t[0],u=t[1],i=Dk(),l=Wt(i,2),s=l[0],m=l[1];function p(){u(Il,!0)}return Bw(function(){if(r!==aM&&r!==kw){var g=gk.indexOf(r),E=gk[g+1],b=n(r);b===tM?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),Ot(function(){return function(){m()}},[]),[p,r]};$a();$a();var bk=function(e){var n=st(),a=st(e);a.current=e;var t=Xm(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(eM,t),i.removeEventListener(ZG,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(eM,t),i.addEventListener(ZG,t),n.current=i)}return Ot(function(){return function(){r(n.current)}},[]),[u,r]};function rM(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,m=s===void 0?!0:s,p=t.motionDeadline,g=t.motionLeaveImmediately,E=t.onAppearPrepare,b=t.onEnterPrepare,I=t.onLeavePrepare,L=t.onAppearStart,N=t.onEnterStart,z=t.onLeaveStart,$=t.onAppearActive,ne=t.onEnterActive,ue=t.onLeaveActive,Z=t.onAppearEnd,Y=t.onEnterEnd,X=t.onLeaveEnd,ve=t.onVisibleChanged,xe=Ks(),ke=Wt(xe,2),rn=ke[0],wn=ke[1],dn=Ks(Df),mn=Wt(dn,2),yn=mn[0],Kn=mn[1],zn=Ks(null),Wn=Wt(zn,2),ja=Wn[0],Ma=Wn[1],sa=st(!1),At=st(null);function qe(){return a()}var pa=st(!1);function Qa(it){var J=qe();if(!(it&&!it.deadline&&it.target!==J)){var K=pa.current,O;yn===Kh&&K?O=Z==null?void 0:Z(J,it):yn===Yh&&K?O=Y==null?void 0:Y(J,it):yn===Xh&&K&&(O=X==null?void 0:X(J,it)),yn!==Df&&K&&O!==!1&&(Kn(Df,!0),Ma(null,!0))}}var Tn=bk(Qa),Dn=Wt(Tn,1),We=Dn[0],ea=eh(function(){var it,J,K;switch(yn){case Kh:return it={},ku(it,Il,E),ku(it,Qs,L),ku(it,gf,$),it;case Yh:return J={},ku(J,Il,b),ku(J,Qs,N),ku(J,gf,ne),J;case Xh:return K={},ku(K,Il,I),ku(K,Qs,z),ku(K,gf,ue),K;default:return{}}},[yn]),va=yk(yn,function(it){if(it===Il){var J=ea[Il];return J?J(qe()):tM}if(vn in ea){var K;Ma(((K=ea[vn])===null||K===void 0?void 0:K.call(ea,qe(),null))||null)}return vn===gf&&(We(qe()),p>0&&(clearTimeout(At.current),At.current=setTimeout(function(){Qa({deadline:!0})},p))),Rk}),Aa=Wt(va,2),dt=Aa[0],vn=Aa[1],oa=Hw(vn);pa.current=oa,Bw(function(){wn(n);var it=sa.current;if(sa.current=!0,!!e){var J;!it&&n&&l&&(J=Kh),it&&n&&u&&(J=Yh),(it&&!n&&m||!it&&g&&!n&&m)&&(J=Xh),J&&(Kn(J),dt())}},[n]),Ot(function(){(yn===Kh&&!l||yn===Yh&&!u||yn===Xh&&!m)&&Kn(Df)},[l,u,m]),Ot(function(){return function(){sa.current=!1,clearTimeout(At.current)}},[]);var St=st(!1);Ot(function(){rn&&(St.current=!0),rn!==void 0&&yn===Df&&((St.current||rn)&&(ve==null||ve(rn)),St.current=!0)},[rn,yn]);var Da=ja;return ea[Il]&&vn===Qs&&(Da=Ea({transition:"none"},Da)),[yn,vn,Da,rn!=null?rn:n]}$a();var zge=function(e){Qp(a,e);var n=Kp(a);function a(){return zp(this,a),n.apply(this,arguments)}return Vp(a,[{key:"render",value:function(){return this.props.children}}]),a}(h_),wk=zge;function Vge(e){var n=e;Er(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=Si(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,m=s===void 0?!0:s,p=r.forceRender,g=r.children,E=r.motionName,b=r.leavedClassName,I=r.eventProps,L=a(r),N=st(),z=st();function $(){try{return N.current instanceof HTMLElement?N.current:Qh(z.current)}catch{return null}}var ne=rM(L,l,$,r),ue=Wt(ne,4),Z=ue[0],Y=ue[1],X=ue[2],ve=ue[3],xe=st(ve);ve&&(xe.current=!0);var ke=Xm(function(zn){N.current=zn,YG(u,zn)},[u]),rn,wn=Ea(Ea({},I),{},{visible:l});if(!g)rn=null;else if(Z===Df||!a(r))ve?rn=g(Ea({},wn),ke):!m&&xe.current?rn=g(Ea(Ea({},wn),{},{className:b}),ke):p?rn=g(Ea(Ea({},wn),{},{style:{display:"none"}}),ke):rn=null;else{var dn,mn;Y===Il?mn="prepare":Hw(Y)?mn="active":Y===Qs&&(mn="start"),rn=g(Ea(Ea({},wn),{},{className:(0,Ek.default)(nM(E,Z),(dn={},ku(dn,nM(E,"".concat(Z,"-").concat(mn)),mn),ku(dn,E,typeof E=="string"),dn)),style:X}),ke)}if(ES(rn)&&jw(rn)){var yn=rn,Kn=yn.ref;Kn||(rn=Ym(rn,{ref:ke}))}return pt(wk,{ref:z},rn)});return t.displayName="CSSMotion",t}var Jw=Vge(Uw);$a();var qw="add",Ww="keep",$w="remove",zw="removed";function Qge(e){var n;return e&&Er(e)==="object"&&"key"in e?n=e:n={key:e},Ea(Ea({},n),{},{key:String(n.key)})}function Vw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Qge)}function Ik(){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=Vw(e),i=Vw(n);u.forEach(function(m){for(var p=!1,g=t;g1});return s.forEach(function(m){a=a.filter(function(p){var g=p.key,E=p.status;return g!==m||E!==$w}),a.forEach(function(p){p.key===m&&(p.status=Ww)})}),a}var Kge=["component","children","onVisibleChanged","onAllRemoved"],Yge=["status"],Xge=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Zge(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jw,a=function(t){Qp(u,t);var r=Kp(u);function u(){var i;zp(this,u);for(var l=arguments.length,s=new Array(l),m=0;m=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function wRe(e,n,a,t){var r=Ha.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)),Ha.mix(r,u)}function mM(e){var n,a,t;if(!Ha.isWindow(e)&&e.nodeType!==9)n=Ha.offset(e),a=Ha.outerWidth(e),t=Ha.outerHeight(e);else{var r=Ha.getWindow(e);n={left:Ha.getWindowScrollLeft(r),top:Ha.getWindowScrollTop(r)},a=Ha.viewportWidth(r),t=Ha.viewportHeight(r)}return n.width=a,n.height=t,n}function qk(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 e1(e,n,a,t,r){var u=qk(n,a[1]),i=qk(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 Wk(e,n,a){return e.lefta.right}function $k(e,n,a){return e.topa.bottom}function ERe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function t1(e,n,a){var t=a.target||n,r=mM(t),u=!TRe(t,a.overflow&&a.overflow.alwaysByViewport);return Qk(e,r,a,u)}t1.__getOffsetParent=pM;t1.__getVisibleRectForElement=dM;function Kk(e,n,a){var t,r,u=Ha.getDocument(e),i=u.defaultView||u.parentWindow,l=Ha.getWindowScrollLeft(i),s=Ha.getWindowScrollTop(i),m=Ha.viewportWidth(i),p=Ha.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var g={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+m&&r>=0&&r<=s+p,b=[a.points[0],"cc"];return Qk(e,g,Fk(Fk({},a),{},{points:b}),E)}var xq=Wu(wq());var Eq=function(){if(typeof Map!="undefined")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(){!jM||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ZEe?(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(){!jM||!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=XEe.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}(),Iq=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),Cq=typeof WeakMap!="undefined"?new WeakMap:new Eq,Fq=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=eIe.getInstance(),t=new sIe(n,a,this);Cq.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Fq.prototype[e]=function(){var n;return(n=Cq.get(this))[e].apply(n,arguments)}});var vIe=function(){return typeof c1.ResizeObserver!="undefined"?c1.ResizeObserver:Fq}(),Gq=vIe;function Mq(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 Aq(e,n){e!==document.activeElement&&W_(n,e)&&typeof e.focus=="function"&&e.focus()}function NM(e,n){var a=null,t=null;function r(i){var l=Wt(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var m=s.getBoundingClientRect(),p=m.width,g=m.height,E=Math.floor(p),b=Math.floor(g);(a!==E||t!==b)&&Promise.resolve().then(function(){n({width:E,height:b})}),a=E,t=b}}var u=new Gq(r);return e&&u.observe(e),function(){u.disconnect()}}$a();var Lq=function(e,n){var a=Fa.useRef(!1),t=Fa.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 Pq(e){return typeof e!="function"?null:e()}function jq(e){return Er(e)!=="object"||!e?null:e}var fIe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,m=n.monitorBufferTime,p=m===void 0?0:m,g=Fa.useRef({}),E=Fa.useRef(),b=Fa.Children.only(t),I=Fa.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=Lq(function(){var Y=I.current,X=Y.disabled,ve=Y.target,xe=Y.align,ke=Y.onAlign;if(!X&&ve){var rn=E.current,wn,dn=Pq(ve),mn=jq(ve);g.current.element=dn,g.current.point=mn,g.current.align=xe;var yn=document,Kn=yn.activeElement;return dn&&Sk(dn)?wn=t1(rn,dn,xe):mn&&(wn=Kk(rn,mn,xe)),Aq(Kn,rn),ke&&wn&&ke(rn,wn),!0}return!1},p),N=Wt(L,2),z=N[0],$=N[1],ne=Fa.useRef({cancel:function(){}}),ue=Fa.useRef({cancel:function(){}});Fa.useEffect(function(){var Y=Pq(u),X=jq(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=NM(E.current,z)),(g.current.element!==Y||!Mq(g.current.point,X)||!(0,xq.default)(g.current.align,i))&&(z(),ne.current.element!==Y&&(ne.current.cancel(),ne.current.element=Y,ne.current.cancel=NM(Y,z)))}),Fa.useEffect(function(){r?$():z()},[r]);var Z=Fa.useRef(null);return Fa.useEffect(function(){s?Z.current||(Z.current=hf(window,"resize",z)):Z.current&&(Z.current.remove(),Z.current=null)},[s]),Fa.useEffect(function(){return function(){ne.current.cancel(),ue.current.cancel(),Z.current&&Z.current.remove(),$()}},[]),Fa.useImperativeHandle(a,function(){return{forceAlign:function(){return z(!0)}}}),Fa.isValidElement(b)&&(b=Fa.cloneElement(b,{ref:Pw(b.ref,E)})),b},Nq=Fa.forwardRef(fIe);Nq.displayName="Align";var Oq=Nq;var Uq=Oq;$a();var _Ie=Yc()?Zm:Ot,OM=_Ie;var zq=Wu($_());function f1(e,n){this.v=e,this.k=n}function Mo(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Mo=function(i,l,s,m){function p(g,E){Mo(i,g,function(b){return this._invoke(g,E,b)})}l?r?r(i,l,{value:s,enumerable:!m,configurable:!m,writable:!m}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Mo(e,n,a,t)}function _D(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(b,I,L,N){var z=I&&I.prototype instanceof l?I:l,$=Object.create(z.prototype);return Mo($,"_invoke",function(ne,ue,Z){var Y,X,ve,xe=0,ke=Z||[],rn=!1,wn={p:0,n:0,v:e,a:dn,f:dn.bind(e,4),d:function(yn,Kn){return Y=yn,X=0,ve=e,wn.n=Kn,i}};function dn(mn,yn){for(X=mn,ve=yn,n=0;!rn&&xe&&!Kn&&n3?(Kn=ja===yn)&&(ve=zn[(X=zn[4])?5:(X=3,3)],zn[4]=zn[5]=e):zn[0]<=Wn&&((Kn=mn<2&&Wnyn||yn>ja)&&(zn[4]=mn,zn[5]=yn,wn.n=ja,X=0))}if(Kn||mn>1)return i;throw rn=!0,yn}return function(mn,yn,Kn){if(xe>1)throw TypeError("Generator is already running");for(rn&&yn===1&&dn(yn,Kn),X=yn,ve=Kn;(n=X<2?e:ve)||!rn;){Y||(X?X<3?(X>1&&(wn.n=-1),dn(X,ve)):wn.n=ve:wn.v=ve);try{if(xe=2,Y){if(X||(mn="next"),n=Y[mn]){if(!(n=n.call(Y,ve)))throw TypeError("iterator result is not an object");if(!n.done)return n;ve=n.value,X<2&&(X=0)}else X===1&&(n=Y.return)&&n.call(Y),X<2&&(ve=TypeError("The iterator does not provide a '"+mn+"' method"),X=1);Y=e}else if((n=(rn=wn.n<0)?ve:ne.call(ue,wn))!==i)break}catch(zn){Y=e,X=1,ve=zn}finally{xe=1}}return{value:n,done:rn}}}(b,L,N),!0),$}var i={};function l(){}function s(){}function m(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(Mo(n={},t,function(){return this}),n),g=m.prototype=l.prototype=Object.create(p);function E(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,m):(b.__proto__=m,Mo(b,r,"GeneratorFunction")),b.prototype=Object.create(g),b}return s.prototype=m,Mo(g,"constructor",m),Mo(m,"constructor",s),s.displayName="GeneratorFunction",Mo(m,r,"GeneratorFunction"),Mo(g),Mo(g,r,"Generator"),Mo(g,t,function(){return this}),Mo(g,"toString",function(){return"[object Generator]"}),(_D=function(){return{w:u,m:E}})()}function id(e,n){function a(r,u,i,l){try{var s=e[r](u),m=s.value;return m instanceof f1?n.resolve(m.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(m).then(function(p){s.value=p,i(s)},function(p){return a("throw",p,i,l)})}catch(p){l(p)}}var t;this.next||(Mo(id.prototype),Mo(id.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Mo(this,"_invoke",function(r,u,i){function l(){return new n(function(s,m){a(r,i,s,m)})}return t=t?t.then(l,l):l()},!0)}function _1(e,n,a,t,r){return new id(_D().w(e,n,a,t),r||Promise)}function kq(e,n,a,t,r){var u=_1(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function Bq(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 UM(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(Er(e)+" is not iterable")}function pD(){"use strict";var e=_D(),n=e.m(pD),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(m){l||(l={stop:function(){return s(m.a,2)},catch:function(){return m.v},abrupt:function(g,E){return s(m.a,r[g],E)},delegateYield:function(g,E,b){return l.resultName=E,s(m.d,UM(g),b)},finish:function(g){return s(m.f,g)}},s=function(g,E,b){m.p=l.prev,m.n=l.next;try{return g(E,b)}finally{l.next=m.n}}),l.resultName&&(l[l.resultName]=m.v,l.resultName=void 0),l.sent=m.v,l.next=m.n;try{return i.call(this,l)}finally{m.p=l.prev,m.n=l.next}}}return(pD=function(){return{wrap:function(s,m,p,g){return e.w(u(s),m,p,g&&g.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,m){return new f1(s,m)},AsyncIterator:id,async:function(s,m,p,g,E){return(t(m)?_1:kq)(u(s),m,p,g,E)},keys:Bq,values:UM}})()}function Hq(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(m){return void a(m)}l.done?n(s):Promise.resolve(s).then(t,r)}function Jq(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){Hq(u,t,r,i,l,"next",s)}function l(s){Hq(u,t,r,i,l,"throw",s)}i(void 0)})}}$a();var qq=["measure","alignPre","align",null,"motion"],Wq=function(e,n){var a=Ks(null),t=Wt(a,2),r=t[0],u=t[1],i=st();function l(p){u(p,!0)}function s(){Oi.cancel(i.current)}function m(p){s(),i.current=Oi(function(){l(function(g){switch(r){case"align":return"motion";case"motion":return"stable";default:}return g}),p==null||p()})}return Ot(function(){l("measure")},[e]),Ot(function(){switch(r){case"measure":n();break;default:}r&&(i.current=Oi(Jq(pD().mark(function p(){var g,E;return pD().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:g=qq.indexOf(r),E=qq[g+1],E&&g!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Ot(function(){return function(){s()}},[]),[r,m]};$a();var $q=function(e){var n=ql({width:0,height:0}),a=Wt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=eh(function(){var l={};if(e){var s=t.width,m=t.height;e.indexOf("height")!==-1&&m?l.height=m:e.indexOf("minHeight")!==-1&&m&&(l.minHeight=m),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var Vq=Si(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,m=e.destroyPopupOnHide,p=e.forceRender,g=e.align,E=e.point,b=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,N=e.onMouseEnter,z=e.onMouseLeave,$=e.onMouseDown,ne=e.onTouchStart,ue=e.onClick,Z=st(),Y=st(),X=ql(),ve=Wt(X,2),xe=ve[0],ke=ve[1],rn=$q(s),wn=Wt(rn,2),dn=wn[0],mn=wn[1];function yn(){s&&mn(b())}var Kn=Wq(a,yn),zn=Wt(Kn,2),Wn=zn[0],ja=zn[1],Ma=ql(0),sa=Wt(Ma,2),At=sa[0],qe=sa[1],pa=st();OM(function(){Wn==="alignPre"&&qe(0)},[Wn]);function Qa(){return E||b}function Tn(){var vn;(vn=Z.current)===null||vn===void 0||vn.forceAlign()}function Dn(vn,oa){var St=I(oa);xe!==St&&ke(St),qe(function(Da){return Da+1}),Wn==="align"&&(L==null||L(vn,oa))}OM(function(){Wn==="align"&&(At<2?Tn():ja(function(){var vn;(vn=pa.current)===null||vn===void 0||vn.call(pa)}))},[At]);var We=Ea({},Qw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var oa=We[vn];We[vn]=function(St,Da){return ja(),oa==null?void 0:oa(St,Da)}});function ea(){return new Promise(function(vn){pa.current=vn})}Ot(function(){!We.motionName&&Wn==="motion"&&ja()},[We.motionName,Wn]),As(n,function(){return{forceAlign:Tn,getElement:function(){return Y.current}}});var va=Ea(Ea({},dn),{},{zIndex:l,opacity:Wn==="motion"||Wn==="stable"||!a?void 0:0,pointerEvents:!a&&Wn!=="stable"?"none":void 0},u),Aa=!0;(g==null?void 0:g.points)&&(Wn==="align"||Wn==="stable")&&(Aa=!1);var dt=i;return m_.count(i)>1&&(dt=pt("div",{className:"".concat(t,"-content")},i)),pt(Yp,Xo({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},We,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:m,forceRender:p}),function(vn,oa){var St=vn.className,Da=vn.style,it=(0,zq.default)(t,r,xe,St);return pt(Uq,{target:Qa(),key:"popup",ref:Z,monitorWindowResize:!0,disabled:Aa,align:g,onAlign:Dn},pt("div",{ref:oa,className:it,onMouseEnter:N,onMouseLeave:z,onMouseDownCapture:$,onTouchStartCapture:ne,onClick:ue,style:Ea(Ea({},Da),va)},dt))})});Vq.displayName="PopupInner";var Qq=Vq;$a();var Kq=Wu($_()),Yq=Si(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,m=i.popupMotion,p=m===void 0?{}:m,g=i.popupRender,E=e.onClick,b=st();As(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var I=Ea({zIndex:r},s),L=u;return m_.count(u)>1&&(L=pt("div",{className:"".concat(a,"-content")},u)),g&&(L=g(L)),pt(Yp,Xo({visible:t,ref:b,removeOnLeave:!0},p),function(N,z){var $=N.className,ne=N.style,ue=(0,Kq.default)(a,l,$);return pt("div",{ref:z,className:ue,onClick:E,style:Ea(Ea({},ne),I)},L)})});Yq.displayName="MobilePopupInner";var Xq=Yq;var pIe=["visible","mobile"],Zq=Si(function(e,n){var a=e.visible,t=e.mobile,r=q_(e,pIe),u=ql(a),i=Wt(u,2),l=i[0],s=i[1],m=ql(!1),p=Wt(m,2),g=p[0],E=p[1],b=Ea(Ea({},r),{},{visible:l});Ot(function(){s(a),a&&t&&E(vk())},[a,t]);var I=g?pt(Xq,Xo({},b,{mobile:t,ref:n})):pt(Qq,Xo({},b,{ref:n}));return pt("div",null,pt(oM,b),I)});Zq.displayName="Popup";var eW=Zq;$a();var dIe=bS(null),kM=dIe;function BM(){}function mIe(){return""}function hIe(e){return e?e.ownerDocument:window.document}var DIe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function gIe(e){var n=function(a){Qp(r,a);var t=Kp(r);function r(u){var i;zp(this,r),i=t.call(this,u),i.popupRef=my(),i.triggerRef=my(),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 m=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,m,m?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 m;s.relatedTarget&&!s.relatedTarget.setTimeout&&W_((m=i.popupRef.current)===null||m===void 0?void 0:m.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 m;if(i.preClickTime&&i.preTouchTime?m=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?m=i.preClickTime:i.preTouchTime&&(m=i.preTouchTime),Math.abs(m-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 m=s.target,p=i.getRootDomNode(),g=i.getPopupDomNode();(!W_(p,m)||i.isContextMenuOnly())&&!W_(g,m)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var m=Qh(i.triggerRef.current);if(m)return m}catch{}return Ci.findDOMNode(ww(i))},i.getPopupClassNameFromAlign=function(s){var m=[],p=i.props,g=p.popupPlacement,E=p.builtinPlacements,b=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return g&&E&&m.push(uk(E,b,s,I)),L&&m.push(L(s)),m.join(" ")},i.getComponent=function(){var s=i.props,m=s.prefixCls,p=s.destroyPopupOnHide,g=s.popupClassName,E=s.onPopupAlign,b=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,N=s.popupStyle,z=s.mask,$=s.maskAnimation,ne=s.maskTransitionName,ue=s.maskMotion,Z=s.zIndex,Y=s.popup,X=s.stretch,ve=s.alignPoint,xe=s.mobile,ke=s.forceRender,rn=s.onPopupClick,wn=i.state,dn=wn.popupVisible,mn=wn.point,yn=i.getPopupAlign(),Kn={};return i.isMouseEnterToShow()&&(Kn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Kn.onMouseLeave=i.onPopupMouseLeave),Kn.onMouseDown=i.onPopupMouseDown,Kn.onTouchStart=i.onPopupMouseDown,pt(eW,Xo({prefixCls:m,destroyPopupOnHide:p,visible:dn,point:ve&&mn,className:g,align:yn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},Kn,{stretch:X,getRootDomNode:i.getRootDomNode,style:N,mask:z,zIndex:Z,transitionName:L,maskAnimation:$,maskTransitionName:ne,maskMotion:ue,ref:i.popupRef,motion:b,mobile:xe,forceRender:ke,onClick:rn}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){Oi.cancel(i.attachId);var m=i.props,p=m.getPopupContainer,g=m.getDocument,E=i.getRootDomNode(),b;p?(E||p.length===0)&&(b=p(E)):b=g(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Oi(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,m=s(i.getRootDomNode()).createElement("div");m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.width="100%",i.portalContainer=m}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var m=i.props.alignPoint;!m||!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},DIe.forEach(function(s){i["fire".concat(s)]=function(m){i.fireEvents(s,m)}}),i}return Vp(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=hf(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=hf(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=hf(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=hf(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Oi.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,m=i.builtinPlacements;return l&&m?ok(m,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,m=this.state.popupVisible;this.clearDelayTimer(),m!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:m}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var m=this,p=l*1e3;if(this.clearDelayTimer(),p){var g=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){m.setPopupVisible(i,g),m.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 m=this.props[i];m&&m(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,m=l.forceRender,p=l.alignPoint,g=l.className,E=l.autoDestroy,b=m_.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,nW.default)(b&&b.props&&b.props.className,g);L&&(I.className=L);var N=Ea({},I);jw(b)&&(N.ref=Pw(this.triggerRef,b.ref));var z=Ym(b,N),$;return(i||this.popupRef.current||m)&&($=pt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&($=null),pt(kM.Provider,{value:this.triggerContextValue},z,$)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,m={};return s!==void 0&&l.popupVisible!==s&&(m.popupVisible=s,m.prevPopupVisible=l.popupVisible),m}}]),r}(h_);return n.contextType=kM,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:mIe,getDocument:hIe,onPopupVisibleChange:BM,afterPopupVisibleChange:BM,onPopupAlign:BM,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 aW=gIe(rk);var Tl={adjustX:1,adjustY:1},Sl=[0,0],tW={left:{points:["cr","cl"],overflow:Tl,offset:[-4,0],targetOffset:Sl},right:{points:["cl","cr"],overflow:Tl,offset:[4,0],targetOffset:Sl},top:{points:["bc","tc"],overflow:Tl,offset:[0,-4],targetOffset:Sl},bottom:{points:["tc","bc"],overflow:Tl,offset:[0,4],targetOffset:Sl},topLeft:{points:["bl","tl"],overflow:Tl,offset:[0,-4],targetOffset:Sl},leftTop:{points:["tr","tl"],overflow:Tl,offset:[-4,0],targetOffset:Sl},topRight:{points:["br","tr"],overflow:Tl,offset:[0,-4],targetOffset:Sl},rightTop:{points:["tl","tr"],overflow:Tl,offset:[4,0],targetOffset:Sl},bottomRight:{points:["tr","br"],overflow:Tl,offset:[0,4],targetOffset:Sl},rightBottom:{points:["bl","br"],overflow:Tl,offset:[4,0],targetOffset:Sl},bottomLeft:{points:["tl","bl"],overflow:Tl,offset:[0,4],targetOffset:Sl},leftBottom:{points:["br","bl"],overflow:Tl,offset:[-4,0],targetOffset:Sl}};$a();var rW=Wu($_());function p1(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 pt("div",{className:(0,rW.default)("".concat(r,"-content"),l),style:s},n!==!1&&pt("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),pt("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var RIe=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,m=s===void 0?.1:s,p=n.overlayStyle,g=n.prefixCls,E=g===void 0?"rc-tooltip":g,b=n.children,I=n.onVisibleChange,L=n.afterVisibleChange,N=n.transitionName,z=n.animation,$=n.motion,ne=n.placement,ue=ne===void 0?"right":ne,Z=n.align,Y=Z===void 0?{}:Z,X=n.destroyTooltipOnHide,ve=X===void 0?!1:X,xe=n.defaultVisible,ke=n.getTooltipContainer,rn=n.overlayInnerStyle,wn=n.arrowContent,dn=n.overlay,mn=n.id,yn=n.showArrow,Kn=q_(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),zn=st(null);As(a,function(){return zn.current});var Wn=Ea({},Kn);"visible"in n&&(Wn.popupVisible=n.visible);var ja=function(){return pt(p1,{showArrow:yn,arrowContent:wn,key:"content",prefixCls:E,id:mn,overlayInnerStyle:rn},dn)},Ma=!1,sa=!1;if(typeof ve=="boolean")Ma=ve;else if(ve&&Er(ve)==="object"){var At=ve.keepParent;Ma=At===!0,sa=At===!1}return pt(aW,Xo({popupClassName:t,prefixCls:E,popup:ja,action:u,builtinPlacements:tW,popupPlacement:ue,ref:zn,popupAlign:Y,getPopupContainer:ke,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:N,popupAnimation:z,popupMotion:$,defaultPopupVisible:xe,destroyPopupOnHide:Ma,autoDestroy:sa,mouseLeaveDelay:m,popupStyle:p,mouseEnterDelay:l},Wn),b)},oW=Si(RIe);var uW=oW;var lW=e=>Fa.createElement(uW,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?()=>document.querySelector(e.tooltipContainerSelector)||document.body:void 0}));if(typeof window!="undefined"&&typeof global=="undefined")try{Promise.resolve().then(()=>Wu(iW())).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 wIe=Fi();var cW="click";var d1="top",ld=function(e){var n=wIe(e);return function(){return function(){return n(lW)}}};var sW="right";var vW=e=>()=>e.preventDefault&&e.preventDefault();var HM=function(){return vW};var EIe=La();var JM=ee(Ve),qM=gt(EIe(H({reflectSymbol:function(){return"value"}})(he)(tn))),WM=q(la);var m1=function(e){return Ue("")(JM(qM(Gr(e.target)))(function(n){return WM(n.value)}))},$M=function(e){return Ue("")(JM(qM(Gr(e.target)))(function(n){return WM(n.value)}))},Ys=function(e){return Ue("")(JM(qM(Gr(e.target)))(function(n){return WM(n.value)}))};var fW="/network/connections";var _W=15;var IIe=ld(Qe)()(),TIe=za(ye),SIe=function(){return"You\u2019ve hit the "+(te(an)(_W)+`-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. `)}(),CIe=Io(Qe)("text-decoration-underline")(cr(re)()()("text-dark")(en)({href:fW})("Manage my connections")),pW=function(e){return function(n){return IIe({placement:e,trigger:cW,overlay:TIe("")([Xe(SIe),CIe]),overlayStyle:vt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var dW=ee(Ve),cd=function(e){var n=dW(e.guestPresenter)(function(a){if(a instanceof Sh)return new T(a.value0);if(a instanceof Ch)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return dW(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var FIe=function(){function e(){}return e.value=new e,e}(),GIe=function(){function e(){}return e.value=new e,e}(),zM=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}(),mW=function(e){if(e instanceof FIe)return"account_settings_page";if(e instanceof GIe)return"preference_survey";if(e instanceof zM)return"livestream_registration";if(e instanceof MIe)return"chancing_wizard_network_step";if(e instanceof AIe)return"main_profile_page";if(e instanceof LIe)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 NIe=Vc($c),VM=tc(NIe),QM=ee(ra);var OIe=co(),hW=_e(oe);var DW=VM("profile_visibility_path")(function(e){return function(n){return QM(e({visibility:{publish_scope:Ah(n)}}))(lr)}}),gW=function(){return VM("profile_network_settings_path")(function(e){return function(n){return function(a){return QM(e({network_settings:{publish_scope:Ah(a.publishScope),publish_context:mW(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Ia(hW(gl(a.livestreamConference))(function(t){return{school_name:Ia(hW(cd(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(lr)}(OIe(n))}})},RW=VM("profile_name_path")(function(e){return function(n){return QM(e({name:n}))(lr)}});var UIe=oc(),kIe=no(re),BIe=Yt(re),KM=Kt(re),YM=_l(re),Rf=Se(ye),sd=$n(re)()(),HIe=nn(Ke),XM=Yn(ma),K_=Se(Qe),yW=si()(),JIe=Yv(re),qIe=gr(Be)(It),bW=eo()(),ZM=Yn(ii),WIe=yp()(),wW=Se(re),$Ie=Ly(ye),eA=Oy(re),zIe=za(re),VIe=ld(Qe)()(),QIe=Kt(ye),KIe=cr(re)()(),YIe=rt(re),Y_=q(Rn),EW=HIe(qn),XIe=pw(),dD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IW=function(){function e(){}return e.value=new e,e}(),TW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),SW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mD=function(){function e(){}return e.value=new e,e}(),nA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GW=function(e){return function(n){var a=function(m){return UIe({id:"invite-school-modal",body:m,title:kIe("my-0")(function(){return e.stage instanceof Xy?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new bn(mD.value)),size:Hh.value})},t=_8(e.context),r=Fe([BIe("mt-3")("Review your message before you send it"),KM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),YM("mt-4")("Your message"),Lp(e.message),Rf("d-flex mt-4 justify-content-start")([sd("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(en)({onClick:wr(function(m){return function(){return n(new bn(new nA({introMessage:e.message})))(),n(new Me(new dD(wC.value)))()}})})("Send"),sd("btn btn-lg btn-outline-primary ml-3 text-nowrap")(en)({onClick:XM(n)(new Me(new dD(gh.value)))})("No, I need to edit something")])]),u=Fe([Rf("text-center")([K_("")(yW("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),JIe("mt-4")("Connection request sent!"),KM("mx-md-4")(qIe(["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."])),sd("btn btn-lg btn-outline-secondary mt-4")(en)({onClick:XM(n)(new bn(mD.value))})("Close")])]),i=sd("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(en)({onClick:XM(n)(new bn(mD.value))})("Cancel"),l=function(){var m=gC(e.message)&&function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!ml(e.firstName)&&!ml(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 241, column 15 - line 245, 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 234, column 13 - line 237, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Fe([ga(Mt(e.profile.fullName))(Fe([YM("mt-md-4")("Your preferred name"),Rf("form-row mx-1")([bW("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:ZM(n)(function(g){return Me.create(CW.create(Ys(g)))}),placeholder:"First name"}),bW("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:ZM(n)(function(g){return Me.create(FW.create(Ys(g)))}),placeholder:"Last name"})])])),YM("mt-md-4")("Your message"),WIe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:ZM(n)(function(g){return Me.create(SW.create(m1(g)))}),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! `}),K_("mt-2")(i8(e.message)),wW("mt-3 mt-md-4 small")("The ideal connection message should include:"),$Ie("small")([eA("")("Your name, where you\u2019re from, and a bit about who you are"),eA("")("What you\u2019re interested in studying along with one or two insightful questions"),eA("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),Rf("d-flex mt-4 justify-content-start")([pW(d1)(K_("")(sd("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(en)({onClick:wr(function(g){return function(){return function(){if(e.profile.fullName instanceof T)return de;if(e.profile.fullName instanceof G)return n(new Me(new TW({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 217, column 23 - line 221, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Me(new dD(bC.value)))()}}),disabled:!m||p,style:vt({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=Rf("mx-md-7")([K_("border border-success rounded p-4 my-4")(Rf("row align-items-center")([K_("col-12 col-md-auto text-center text-md-left")(yW("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),K_("col text-center text-md-left")(zIe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),Rf("d-flex flex-nowrap align-items-center")([wW("mr-4")("Publish your profile to join the CollegeVine Network"),VIe({placement:sW,overlay:QIe("")([Xe(` 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 `),KIe("")(en)({href:T9})("your profile"),Xe(".")]),overlayStyle:vt({width:"15rem"})})(YIe("cursor-default text-secondary fe fe-info large")(""))]),KM("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."),Rf("d-flex mt-4 justify-content-start justify-content-md-center")([sd("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(en)({onClick:wr(function(m){return function(){return n(new Me(IW.value))(),n(new Me(new dD(gh.value)))()}})})("Publish profile"),i])]);return K_("t--network-sem-user-modal")(function(){if(e.stage instanceof Xy)return a(s);if(e.stage instanceof gh)return a(l);if(e.stage instanceof bC)return a(r);if(e.stage instanceof wC)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 96, column 5 - line 100, column 38): "+[e.stage.constructor.name])}())}},MW=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof dD)return Y_({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 IW)return EW(Za(DW(Pi.value)))(function(){return Y_({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:Pi.value}})});if(n.value0 instanceof TW)return EW(Za(RW(n.value0.value0)))(function(){return Y_({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(NG(n.value0.value0))}})});if(n.value0 instanceof SW)return Y_({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 CW)return Y_({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 FW)return Y_({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 75, column 31 - line 89, column 39): "+[n.value0.constructor.name])}if(n instanceof bn)return Y_(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 74, column 1 - line 74, column 55): "+[e.constructor.name,n.constructor.name])}},ZIe=function(e){var n=N9(e);return n?gh.value:Xy.value},AW=function(e){return{firstName:"",lastName:"",message:"",profile:XIe(e.profile),stage:ZIe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var h1=De(nr(xt)),eTe=co(),nTe=Se(Qe),aTe=si()(),aA=za(re),tA=Xt(Qe)()(),tTe=rt(re),rTe=Kc(),oTe=O_(Ke)(),uTe=gn(Le),iTe=$n(ye)()(),lTe=HM(),cTe=Ta(fr),vd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LW=function(){function e(){}return e.value=new e,e}(),sTe=function(){function e(){}return e.value=new e,e}(),vTe={eq:function(e){return function(n){return e instanceof vd&&n instanceof vd?e.value0.url===n.value0.url:e instanceof hD&&n instanceof hD?h1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&h1(e.value0.textColorClass)(n.value0.textColorClass):e instanceof rA&&n instanceof rA?h1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof oA&&n instanceof oA?h1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},fTe=Jp(vTe),xW=function(){return function(e){var n=eTe(e),a=function(){var r=Ba(n.shape)(LW.value);if(r instanceof LW)return"rounded-circle";if(r instanceof sTe)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 nTe("avatar "+(L9(Ba(n.size)(yw.value))+(" "+Ba(n.className)(""))))(function(){if(r instanceof vd)return aTe("avatar-img img-fluid "+(a+(" "+Ba(n.borderClassName)(""))))({src:r.value0.url,alt:g5(Ba(n.ariaLabel)(en))});if(r instanceof hD)return aA("avatar-title font-weight-bold fw-bold "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+(Ue("")(r.value0.textColorClass)+(" "+Ba(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof rA)return tA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)(en)})(tTe(r.value0.iconClass)(""));if(r instanceof oA)return tA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)(en)})(aA("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 Hp(rTe(El(n.source))(function(r){return oTe(fTe(n.source)(function(u){return uTe(r.value1(u))}))(function(){return Ws(Fe([t(r.value0),function(){return r.value0 instanceof vd?ha(gl(n.hideAvatar))(function(u){return tA("hq-only-menu-item")({style:vt({marginTop:"-50px",marginLeft:"200px"})})(iTe("btn btn-sm btn-warning mb-4 t--hide-avatar")(en)({onClick:wr(function(i){return function(){return lTe(i)(),cTe(r.value1)(u)()}})})([aA("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Hide")]))}):ta}()]))})}))}};var _Te=xW();var PW=function(e){return function(n){return _Te({source:function(){if(e.avatarUrl instanceof T)return new vd({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new hD({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 uA=U(oe),pTe=Ye(Gx(Uf));var jW=function(e){var n=function(a){return Ue("")(uA(Tu)(jm(0)(a)))};return jc(function(){var a=Qo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":Ue("?")(pTe(uA(n)(r_(a)))(uA(n)(B0(a))))}())},NW=function(e){return dh(e.firstName+(" "+e.lastName))};var iA=no(re),dTe=cr(re)()(),mTe=cr(ye)()(),OW=rt(re),hTe=$n(ye)()(),DTe=Gi(Wv(sl)),gTe=_e(oe),RTe=ee(Ve),lA=Se(re),D1=Se(ye),UW=Se(Qe),yTe=Ep(re),kW=$l()(),bTe=_l(re),wTe=Kt(re),fd=q(Rn),BW=nn(Ke),ETe=BW(qn),ITe=wa(Le),TTe=BW(ra),STe=q(Qn),CTe=ut(Mr(Ca)),HW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WW=function(){var e=function(a){return function(t){return function(r){var u=iA("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=iA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,dTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(en)({href:WG(new $p(t.semUser.id))})("View Message")],s=NW(t.semUser),m=jW(s),p=iA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),g=[p,mTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(en)({href:WG(new $p(t.semUser.id))})([OW("fe fe-message-square mr-2 large")(""),Xe("Send a message to "+t.semUser.firstName)])],E=function(L){return hTe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(en)({onClick:DTe(r)(gTe(RTe(a.currentUser)(function(N){return N.profile}))(JW.create)),disabled:L.isDisabled})([OW("fe fe-message-square mr-2 large")(""),Xe("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),lA("mt-4 text-secondary small")("Invitation pending")];return D1("t--livestream-details-guest-presenter-sem-user mb-4")([ha(a.currentUser)(function(L){return ga(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(UW("card")(D1("card-body")(function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof tf)return g;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Kl&&t.semUser.connection.value0.initiator instanceof ks||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Bs&&t.semUser.connection.value0.initiator instanceof ks)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Kl&&t.semUser.connection.value0.initiator instanceof Us)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Bs&&t.semUser.connection.value0.initiator instanceof Us||t.semUser.connection instanceof G)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])}())))}),yTe("text-uppercase text-secondary")("Your guest presenter"),D1("row align-items-center mt-4")([UW("col-auto")(PW(kW(t.semUser)({initials:m}))(Rw.value)),D1("col")([bTe("mb-1")(s),lA("text-secondary small")(t.semUser.school.name),lA("text-secondary small")(t.semUser.title)]),ha(t.semUser.bio)(function(L){return wTe("mt-4 mb-2 ml-2")(L)})]),ha(t.modal)(function(L){return GW(L.value0)(function(N){return r(DD.create(N))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof DD&&r.value0 instanceof bn){if(r.value0.value0 instanceof mD)return fd({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof nA)return ETe(ITe(TTe(J9(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return STe(new qW({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return fd(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 DD&&r.value0 instanceof Me)return CTe(DD.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new HW(u))}})(MW(t.modal.value0.value0)(new Me(r.value0.value0)));if(r instanceof DD&&r.value0 instanceof Me)return fd(t);if(r instanceof JW)return fd({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new HW(AW({schoolName:a.semUser.school.name,context:yC.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof qW)return fd({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:ks.value,introMessage:r.value0.introMessage,status:Kl.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 Ps("Livestream Guest Presenter SEM user")(function(a){return{init:fd(kW(a)({modal:G.value})),view:e(a),update:n(a)}})}();var FTe=za(ye),GTe=rt(re),gD=Se(ye),$W=Ep(re),MTe=U(ze),cA=Se(Qe),ATe=fl()(),LTe=no(re),zW=function(e){return function(n){var a=function(i){return FTe("badge badge-light bg-light text-dark mr-3")([GTe("fe fe-tag mr-2")(""),Xe(i.name)])},t=function(i){return function(l){return gD("mb-3")([$W("text-secondary text-uppercase mb-2")(i),l])}},r=gD("mt-4")([ha(fe(n.entity.shortEducation))(function(i){return t("Education")(Xe(i))}),t("Bio")(Lp(n.entity.bio)),eF(Yu(n.entity.tags))(t("Specialties")(Fe(MTe(a)(n.entity.tags))))]),u=gD("row")([ha(fe(n.entity.imageUrl))(function(i){return cA("p-0 m-0")(cA("col-auto my-auto")(cA("avatar avatar-md")(ATe("avatar-img rounded-circle")({src:i}))))}),gD("col-auto my-auto")([$W("text-uppercase text-secondary mb-2")("Advisor"),LTe("m-0")(n.entity.name)])]);return gD("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var RD=function(e){return function(n){return function(a){return function(t){if(n instanceof Sh)return WW({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Ch)return zW(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 xTe=cr(ye)()(),PTe=rt(re),_d=Se(re),ki=Se(Qe),Bi=Se(ye),VW=no(re),QW=fl()(),KW=_e(ze),jTe=za(re),YW=_e(oe),NTe=Kt(ye),XW=Io(re),ZW=cr(re)()(),OTe=te(an),yD=U(oe),UTe=wp(ye)()(),kTe=te(ac),bD=function(e){var n=function(a){return function(t){return xTe("mr-3")(en)({href:t,target:"_blank"})([Xe(a),PTe("fe fe-external-link ml-1")("")])}};return Fe([_d("text-uppercase text-muted small mb-2")("School information"),ki("card shadow-none")(Bi("card-body")([VW("mb-1")(e.name),_d("text-uppercase small text-secondary")(e.cityState),Bi("mt-3 d-none d-md-block")([n("Stats")(gw(J_.value)(e.slug)),n("Cost")(gw(zh.value)(e.slug)),n("Map")(gw(J_.value)(e.slug))]),Bi("mt-3 d-md-none")([n("Stats")(PG(J_.value)(e.slug)),n("Cost")(PG(zh.value)(e.slug))])]))])},BTe=function(e){var n=function(i){return QW("avatar-img rounded-circle")({src:i})},a=hr(" ")(KW(Qo(" ")(e.fullName))(li(1))),t=jTe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return Ue("")(YW(i)(function(l){return" '"+l}))},u=function(i){return function(l){return NTe("")([XW("")(i+": "),Xe(l)])}};return Fe([_d("text-uppercase text-muted small mb-2")("Your host"),Bi("row align-items-center mb-4 pr-4")([ki("col-auto")(ki("avatar")(In(t)(n)(e.pictureUrl))),ki("col")(Bi("row align-items-center justify-content-between")([_d("col-12 col-md-auto x-large")(e.fullName),ki("col-12 col-md-auto")(ha(e.allStreamsUrl)(function(i){return ZW("t--host-streams")(en)({href:i})("See all "+(OTe(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Fe(Jo([yD(u("Undergrad College"))(YW(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),yD(u("Major"))(e.undergrad.major),yD(u("Graduate College"))(e.gradCollege),yD(u("Work Experience"))(e.workExperience),yD(u("My Admissions Story"))(e.admissionsStory)]))])},HTe=function(e){return Fe([_d("text-uppercase text-muted small mb-2")("Description"),Bi("")([ki("col-6 col-md-4 float-right")(QW("img-fluid rounded")({src:e.imageUrl})),Bi("")(KW(Qo(` `)(e.description))(function(n){return UTe("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},JTe=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+kTe(e.conference.id));return ki("card mt-3")(ki("card-body py-3")(Bi("row align-items-center")([ki("col-12 col-md-auto mb-3 mb-md-0")(_d("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Bi("col-12 col-md mb-3 mb-md-0")([Xe("This livestream was part of the "),XW("")("\u{1F3AA} Student panel college fair"),Xe(". Recordings for all 100+ Q&A panels are available.")]),ki("col-12 col-md-auto")(ZW("btn btn-sm btn-outline-primary px-3")(en)({href:n})("See all recordings"))])))},g1=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 52, column 16 - line 56, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Fe([ga(e.conference.collegeFair)(JTe(e)),ki("card")(Bi("card-body")([VW("text-center mb-4")("About this livestream"),Bi("row")([Bi(n)([ha(e.conference.school)(function(a){return ki("d-md-none")(bD(a))}),HTe(e.conference)]),Bi(n)([ha(e.conference.guestPresenter)(function(a){return RD(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ha(e.conference.school)(function(a){return ki("d-none d-md-block")(bD(a))}),ha(e.conference.presenter)(BTe)])])]))])};var e$=nn(Ke),qTe=e$(qn),WTe=wa(Le),$Te=Nt($r),n$=q(Qn),R1=q(Rn),zTe=e$(ra),y1=q(la),a$=Se(re),b1=_l(re),w1=Qv(ye),E1=$v(ye),yf=js(ye),Cl=zv(re),I1=Vv(ye),T1=_e(ze),bf=Vl(re),S1=Vl(Qe),C1=$n(re)()(),F1=Yn(ma),VTe=Di(Ua),QTe=U(ze),KTe=Ye(sv(sv(cR))),YTe=Di(oi),XTe=Di(RU),ZTe=te(ac),eSe=Yt(re),nSe=Se(ye),G1=function(){function e(){}return e.value=new e,e}(),t$=function(){function e(){}return e.value=new e,e}(),wD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),r$=function(){function e(){}return e.value=new e,e}(),o$=function(){function e(){}return e.value=new e,e}(),u$=function(e){return function(n){return function(a){var t=function(u){return qTe(WTe($Te(u)(function(i){return n$(o$.value)})))(function(){return R1({ctas:n.ctas,stage:t$.value,error:G.value})})},r=function(u){if(u instanceof Rl)return _5({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof yl)return v5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof bl)return f5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof wl)return s5({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 wD)return t(zTe(r(a.value0))(function(){return n$(r$.value)}));if(a instanceof r$)return R1({ctas:n.ctas,error:n.error,stage:G1.value});if(a instanceof o$)return R1({ctas:n.ctas,stage:G1.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])}}},i$=function(e){return R1({stage:G1.value,error:G.value,ctas:e})},aSe=function(){return Yo(qo(Be)([Yl.value,new yt(" "),Xl.value,new yt(", "),ec.value,new yt(":"),Li.value,new yt(" "),nc.value]))}(),l$=function(e){return function(n){if(e.ctas.length===0)return ta;var a=function(L){return L instanceof wl?y1(L.value0):G.value},t=function(L){return L instanceof yl?y1(L.value0):G.value},r=function(L){return L instanceof bl?y1(L.value0):G.value},u=function(L){return L instanceof Rl?y1(L.value0):G.value},i=function(){if(e.stage instanceof G1)return ta;if(e.stage instanceof t$)return a$("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?ta:Fe([b1("")("Referrals"),w1("table table-sm mb-0")([E1("")([yf("")([Cl("")("Title"),Cl("")("Actions")])]),I1("")(T1(L)(function(N){return yf("t--cta t--cta-referral")([bf("pt-3")(N.title),S1("text-nowrap")(C1("btn btn-white btn-sm px-4 t--open")(en)({onClick:F1(n)(new wD(new wl(N)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?ta:Fe([b1("")("General"),w1("table table-sm mb-0")([E1("")([yf("")([Cl("")("Title"),Cl("")("URL"),Cl("")("Link Text"),Cl("")("Actions")])]),I1("")(T1(Iv(VTe(function(N){return N.title}))(L))(function(N){return yf("t--cta t--cta-general")([bf("pt-3")(function(){var z=Pt(N.autoDisplayMinutesFromStart);return z?"\u23F0 ":""}()+N.title),bf("pt-3")(N.url),bf("pt-3")(N.buttonText),S1("text-nowrap")(C1("btn btn-white btn-sm px-4 t--open")(en)({onClick:F1(n)(new wD(new yl(N)))})("Launch CTA"))])}))])])},m=function(L){return L.length===0?ta:Fe([b1("")("Featured Service Providers"),w1("table table-sm mb-0")([E1("")([yf("")([Cl("")("Advisors"),Cl("")("Link Text"),Cl("")("Actions")])]),I1("")(T1(L)(function(N){return yf("t--cta t--cta-featured-sp")([bf("pt-3")(hr(", ")(QTe(function(z){return z.name})(N.providers))),bf("pt-3")(N.linkText),S1("text-nowrap")(C1("btn btn-white btn-sm px-4 t--open")(en)({onClick:F1(n)(new wD(new bl(N)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?ta:Fe([b1("")("Upcoming events"),w1("table table-sm mb-0")([E1("")([yf("")([Cl("")("Livestream"),Cl("")("Date & Time"),Cl("")("Actions")])]),I1("")(T1(Iv(KTe(YTe(function(N){return N.startTime}))(XTe(function(N){return N.conferenceId})))(L))(function(N){return yf("t--cta t--cta-stream-"+ZTe(N.conferenceId))([bf("pt-3")(N.title),bf("pt-3")(aSe(N.startTime)+(" "+G_)),S1("text-nowrap")(C1("btn btn-white btn-sm px-4 t--open")(en)({onClick:F1(n)(new wD(new Rl(N)))})("Launch CTA"))])}))])])},g=Hr(a)(e.ctas),E=Hr(t)(e.ctas),b=Hr(r)(e.ctas),I=Hr(u)(e.ctas);return Fe([eSe("")("Calls to action"),nSe("t--ctas position-relative")([ha(e.error)(function(L){return a$("alert alert-danger")(L)}),p(I),s(E),m(b),l(g),i])])}};var c$=tc(Vc($c)),s$=ee(ra),tSe=OF(he),pd=function(){function e(){}return e.value=new e,e}(),ED=function(){function e(){}return e.value=new e,e}(),ID=function(){function e(){}return e.value=new e,e}(),v$={eq:function(e){return function(n){return e instanceof pd&&n instanceof pd||e instanceof ED&&n instanceof ED||e instanceof ID&&n instanceof ID}}},f$=c$("profile_validate_username_path")(function(e){return function(n){return s$(e({username:n}))(zc(function(a){return tSe("username validation result")(a)(function(t){return t==="available"?new T(pd.value):t==="taken"?new T(ED.value):t==="invalid"?new T(ID.value):G.value})}))}}),_$=c$("profile_set_username_path")(function(e){return function(n){return s$(e({username:n}))(lr)}});var rSe=De(nr(hs()(pc(pc(ms)()({reflectSymbol:function(){return"username"}})(xt))()({reflectSymbol:function(){return"result"}})(v$)))),sA=Se(ye),p$=Se(Qe),oSe=Kt(re),uSe=si()(),TD=Se(re),iSe=eo()(),lSe=Yn(ii),d$=$n(re)()(),cSe=Yn(ma),sSe=Gi(Wv(sl)),vA=nn(Ke)(qn),vSe=er(Rn),fA=wa(Le),fSe=hi(Ca),X_=q(Rn),_Se=U(Ca),pSe=ee(ra),dSe=Cv($r),m$=q(Qn),h$=function(){function e(){}return e.value=new e,e}(),D$=function(){function e(){}return e.value=new e,e}(),g$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),R$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),y$=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}(),b$=function(){function e(){}return e.value=new e,e}(),w$=function(){function e(){}return e.value=new e,e}(),_A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pA=function(){function e(){}return e.value=new e,e}(),E$=function(e){return function(n){var a=e.username!==""&&Mt(e.updating)&&rSe(e.validated)(new T({username:e.username,result:pd.value}));return Fe([sA("row")([p$("col col-md-6")(oSe("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),p$("col-6 d-none d-md-block")(uSe("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),TD("")("Your username:"),sA("input-group")([iSe("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:lSe(n)(function(t){return Me.create(g$.create(Ys(t)))})})]),sA("d-flex mt-3")([d$("btn btn-light mr-3")(en)({onClick:cSe(n)(new bn(pA.value))})("Cancel"),d$("btn btn-primary t--submit-username")(en)({type:"button",disabled:!a,onClick:sSe(n)(function(){return a?new T(new Me(b$.value)):G.value}())})("Save")]),ha(e.validated)(function(t){if(t.result instanceof pd)return ta;if(t.result instanceof ED)return TD("small text-danger")("Sorry, this username is already taken");if(t.result instanceof ID)return TD("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])}),ha(e.updating)(function(t){if(t instanceof h$)return TD("text-success")("Updating your username...");if(t instanceof D$)return TD("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])})])}},I$=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof g$)return vA(vSe(n.value0.value0!=="")(fA(fSe(Qt(100))(new Me(new R$(n.value0.value0))))))(function(){return X_({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof R$){if(n.value0.value0===e.username)return vA(fA(_Se(function(){var a=y$.create(n.value0.value0);return function(t){return Me.create(a(t))}}())(f$(n.value0.value0))))(function(){return X_({username:e.username,validated:G.value,updating:G.value})});if(je)return X_(e)}if(n.value0 instanceof y$)return X_({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof b$)return vA(fA(pSe(dSe(_$(e.username)))(function(a){if(a instanceof Te)return m$(new bn(new _A(e.username)));if(a instanceof Ie)return m$(new Me(w$.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return X_({username:e.username,validated:G.value,updating:new T(h$.value)})});if(n.value0 instanceof w$)return X_({username:e.username,validated:e.validated,updating:new T(D$.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 bn)return X_(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])}},T$=function(e){return{username:e,validated:G.value,updating:G.value}};var mSe=co(),hSe=ld(Qe)()(),DSe=za(ye),gSe=rt(re),RSe=function(e){var n=ch(e);return function(){return function(a){return function(t){var r=mSe(a);return hSe({placement:d1,overlay:Fe(n(t)),overlayStyle:Ba(r.overlayStyle)(vt({width:"15rem"}))})(DSe("d-inline-flex align-items-center text-secondary "+r.className)([gSe("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),Xe(r.anchorText)]))}}}},M1=function(e){var n=RSe(e)();return function(a){return n({className:a,anchorText:""})}};var S$=Nn(jn),SD=Pn(S$)(Mn(Gn)),C$=Ln(An),CD=xn(C$),F$=kn(Un),FD=On(F$),ySe=U(oe),dd=function(){function e(){}return e.value=new e,e}(),md=function(){function e(){}return e.value=new e,e}(),hd=function(){function e(){}return e.value=new e,e}(),Dd=function(){function e(){}return e.value=new e,e}(),gd=function(){function e(){}return e.value=new e,e}(),Z_=function(){function e(){}return e.value=new e,e}(),bSe={to:function(e){if(e instanceof Re)return dd.value;if(e instanceof ce&&e.value0 instanceof Re)return md.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return hd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return Dd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof Re)return gd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof ce)return Z_.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 dd)return new Re(Oe.value);if(e instanceof md)return new ce(new Re(Oe.value));if(e instanceof hd)return new ce(new ce(new Re(Oe.value)));if(e instanceof Dd)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof gd)return new ce(new ce(new ce(new ce(new Re(Oe.value)))));if(e instanceof Z_)return new ce(new ce(new ce(new ce(new ce(Oe.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},G$=Cn(bSe)(SD(SD(SD(SD(SD(S$)(C$))(CD))(CD))(CD))(CD))(FD(FD(FD(FD(FD(F$))))))(CD);var wSe={eq:function(e){return function(n){return e instanceof dd&&n instanceof dd||e instanceof md&&n instanceof md||e instanceof hd&&n instanceof hd||e instanceof Dd&&n instanceof Dd||e instanceof gd&&n instanceof gd||e instanceof Z_&&n instanceof Z_}}},A1=function(e){if(e instanceof dd)return"student";if(e instanceof md)return"transfer_student";if(e instanceof hd)return"counselor";if(e instanceof Dd)return"iec";if(e instanceof gd)return"parent";if(e instanceof Z_)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},M$=function(){var e=Sn(A1)(G$);return Zn(Ze)({parse:function(n){return n==="unknown"?new T(G.value):ySe(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})}(),A$=function(e){if(e instanceof dd)return"Student";if(e instanceof md)return"Transfer Student";if(e instanceof hd)return"High School Counselor";if(e instanceof Dd)return"Independent Educational Counselor (IEC)";if(e instanceof gd)return"Parent";if(e instanceof Z_)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},L$=function(){return Sv(wSe)(Z_.value)(G$)}();function x$(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var ESe=q(_t),ISe=Th(!1);var L1=function(e){if(Ih(ISe))return ESe(de);if(je)return x$;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var dA=U(ur);var mA=ee(tu),TSe=q(gc),SSe=Uo(Hx);var P$=function(e){return e},j$=function(e){return function(n){return dA(function(a){return a.result})(e({substring:n,position:0}))}};var es={map:function(e){return function(n){var a=dA(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},e0=function(e){return function(n){return new Ie({pos:n.position,error:e})}},n0={apply:function(e){return function(n){return function(a){return mA(e(a))(function(t){return mA(n(t.suffix))(function(r){return TSe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return es}};var Xs={bind:function(e){return function(n){return function(a){return mA(e(a))(function(t){return P$(n(t.result))(t.suffix)})}}},Apply0:function(){return n0}};var Zs={pure:function(e){return function(n){return new Te({result:e,suffix:n})}},Apply0:function(){return n0}};var CSe={Applicative0:function(){return Zs},Bind1:function(){return Xs}},N$={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof tr)return new tr({state:t.result.value0,str:t.suffix});if(t.result instanceof zt)return new zt({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 SSe(function(r){return dA(a)(P$(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return CSe}};var a0={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Ie){if(a.position===t.value0.pos)return n(a);if(je)return new Ie({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return es}},FSe={empty:e0("No alternative"),Alt0:function(){return a0}},O$={Applicative0:function(){return Zs},Plus1:function(){return FSe}};var U$=ia(a0),hA=ee(Xs),DA=q(Zs),GSe=U(es);var MSe=Ro(n0),ASe=Jn(n0);var gA=function(e){return function(n){return U$(e)(e0(n))}},RA=function(e){return function(n){var a=e(n);return a instanceof Ie?new Ie({pos:n.position,error:a.value0.error}):a}},ns=function(e){return U$(hA(e)(function(n){return DA(de)}))(DA(de))};var k$=function(e){return function(n){return new Zu(e,n)}};var LSe=function(e){return function(n){var a=e(n);if(a instanceof Te){var t=n.position65535;return t?e(n):q$(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])})}(),wf=function(e){return RA(J$(NSe)(function(n){var a=e(n);return a?q$(n):e0("Character "+(W$(n)+" did not satisfy predicate"))}))},Hi=function(e){return gA(wf(function(n){return n===e}))("Could not match character "+W$(e))};var OSe=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}},USe=Et(),yA=U(es),kSe=gr(Am)(It),BSe=U(eS),Ao=nn(Ke)(Xs),mu=lt(es),ev=q(Zs),vi=ia(a0);var Rd=Ro(n0),Ef=ee(Xs),z$=gr(Jr)(It);var xr=function(e){return USe(ub(e))},bA=function(e){return yA(function(){var n=BSe(Tu);return function(a){return kSe(n(a))}}())(B$(wf(e)))},V$=function(e){return Ao(mu(e))(function(){return Ao(mu(x1(e)))(function(){return ev(de)})})},x1=function(e){return vi(V$(e))(ev(de))},Q$=function(e){return Ao(mu(wf(e)))(function(){return Ao(mu(x1(wf(e))))(function(){return ev(de)})})},HSe=Hi(xr(0));var K$=Hi(` `),Y$=function(e){return e===" "||e===" "},JSe=wf(Y$),wA=Q$(Y$),qSe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},as=function(e){return function(n){return function(a){return a>=e&&a<=n}}},WSe=as(xr(33))(xr(126)),$Se=wf(WSe),EA=function(e){return function(n){return Tc(Tu(n))(e)}},P1=function(e){return as(xr(1))(xr(8))(e)||as(xr(14))(xr(31))(e)||EA("\v\f\x7F")(e)},zSe=function(e){return as(xr(33))(xr(39))(e)||as(xr(42))(xr(91))(e)||as(xr(93))(xr(126))(e)||P1(e)},VSe=function(e){return as(xr(33))(xr(90))(e)||as(xr(94))(xr(126))(e)||P1(e)},QSe=wf(P1),KSe=function(e){return EA(Tu(xr(33)))(e)||as(xr(35))(xr(91))(e)||as(xr(93))(xr(126))(e)||P1(e)};var X$=Hi("\r"),Z$=mu(Rd(X$)(K$)),yd=function(){var e=V$(Rd(Z$)(wA)),n=Rd(wA)(ns(Rd(Z$)(wA)));return vi(n)(e)}(),ez=function(){var e=Ao(mu(Hi("\\")))(function(){return vi($Se)(vi(JSe)(vi(K$)(vi(X$)(vi(QSe)(HSe)))))});return Ef(e)(function(n){return ev("\\"+Tu(n))})}(),YSe=vi(bA(KSe))(ez),XSe=function(){var e=Ao(mu(Hi('"')))(function(){return Ef(t0(Rd(ns(yd))(YSe)))(function(n){return Ao(mu(ns(yd)))(function(){return Ao(mu(Hi('"')))(function(){return ev(n)})})})});return yA(function(n){return'"'+(z$(n)+'"')})(e)}(),nz=OSe("comment","Text.Email.Parser",function(){return Ao(mu(Hi("(")))(function(){return Ao(x1(vi(Q$(zSe))(vi(mu(ez))(vi(nz(155))(yd)))))(function(){return Ao(mu(Hi(")")))(function(){return ev(de)})})})}),ZSe=nz(152),j1=x1(vi(ZSe)(yd)),eCe=Ao(ns(j1))(function(){return Ao(mu(Hi("[")))(function(){return Ef(t0(Rd(ns(yd))(bA(VSe))))(function(e){return Ao(ns(yd))(function(){return Ao(mu(Hi("]")))(function(){return Ao(ns(j1))(function(){return ev("["+(z$(e)+"]"))})})})})})}),nCe=function(){var e=function(n){return qSe(n)||EA("!#$%&'*+/=?^_`{|}~-")(n)};return bA(e)}(),az=function(){var e=Ao(mu(ns(j1)))(function(){return Ef(vi(nCe)(XSe))(function(a){return Ao(mu(ns(j1)))(function(){return ev(a)})})}),n=H$(e)(Hi("."));return yA(Ol(Am)(It)("."))(n)}(),aCe=vi(az)(eCe),tCe=az,IA=Ef(tCe)(function(e){return Ef(Hi("@"))(function(){return Ef(aCe)(function(n){return Ef($$)(function(){return ev({localPart:e,domainPart:n})})})})});var oCe=function(e){return j$(IA)(e)},uCe=function(){var e=Bt(ko)(te(hv()()(Dv({reflectSymbol:function(){return"error"}})(gv({reflectSymbol:function(){return"pos"}})(an))(Gt))));return function(n){return e(oCe(n))}}(),GD=function(e){var n=uCe(e);if(n instanceof Ie)return!1;if(n instanceof Te)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var TA=Io(re),N1=eo()(),iCe=Yn(ii),tz=jy(ye)()(),rz=_e(oe),oz=Gi(Fy(sl)),uz=U(oe),O1=Ny(re)()(),iz=_e(ze),MD=Se(ye),lCe=IG(),SA=te(an),cCe=RR(Be)(at),sCe=Xv(ye)()(),r0=Se(Qe),lz=$n(re)()(),vCe=Yn(ma),fCe=te(ac),AD=q(Rn),cz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_z=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bd=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(g){return function(E){return function(b){return function(I){return function(L){return Fe([TA("")(g),N1("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:iCe(t)(function(N){return I(Ys(N))})})])}}}}}},u=[TA("")("I'm a..."),tz("form-control")({name:"livestream_public_registration_form[i_am_a]",value:Ue("")(rz(a.persona)(A1)),onChange:oz(t)(function(p){return uz(_z.create)(M$($M(p)))})})([ga(Mt(a.persona))(O1("")({value:""})("Select one...")),Fe(iz(L$)(function(p){return O1("")({value:A1(p)})(A$(p))}))])],i=MD("d-flex align-items-center")([Xe("Already have an account? "),lCe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:mw,openInNewTab:!1})]),l=[TA("")("Graduation year"),tz("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:Ue("")(rz(a.gradYear)(SA)),onChange:oz(t)(function(p){return uz(fz.create)(bc($M(p)))})})([ga(Mt(a.gradYear))(O1("")({value:""})("Select one...")),Fe(iz(n.allowedGradYears)(function(p){return O1("")({value:SA(p)})(SA(p))}))])],s=Ue({path:"",token:""})(qb("livestreams_register_path")),m=cCe([GD(a.email),a.firstName!=="",a.lastName!=="",Pt(a.gradYear),Pt(a.persona)]);return Fe([i,sCe("")({action:s.path,method:"POST"})([r0("row")(r0("col")(r("email")("Email")("Your email")(a.email)(cz.create)({autoFocus:e.autoFocus}))),r0("row mt-3")(r0("col")(r("first_name")("First name")("Your first name")(a.firstName)(sz.create)({autoFocus:!1}))),r0("row mt-3")(r0("col")(r("last_name")("Last name")("Your last name")(a.lastName)(vz.create)({autoFocus:!1}))),MD("row mt-3")([MD("col-6")(l),MD("col-6")(u)]),r0("row mt-3")(MD("col-12")([lz("btn btn-primary w-100 mt-3 t--register")(en)({type:"submit",disabled:!m,onClick:vCe(L1)(de)})("Register"),ha(e.cancelButton)(function(p){return lz("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(en)({type:"button",onClick:wr(function(g){return p.click})})(p.text)})])),N1("")({type:"hidden",name:"authenticity_token",value:s.token}),N1("")({type:"hidden",name:"register_for_conference_id",value:fCe(n.conference.id)}),N1("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},wd=function(e){return function(n){if(n instanceof cz)return AD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof sz)return AD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof vz)return AD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof fz)return AD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof _z)return AD({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])}},Ed=function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}}();var pz=Se(ye),_Ce=M1(re),pCe=cr(re)()(),Id=function(e){return Fe([pz("")([Xe(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),_Ce("")(` 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. `)]),pz("")([Xe(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),pCe("")(Zt("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),Xe(".")])])};var CA={eq:function(e){return function(n){return e===n}}};var nv=nn(Ke)(qn),dCe=fu(Le),dz=La(),mCe=Ni(dz(H({reflectSymbol:function(){return"author"}})(dz(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(H({reflectSymbol:function(){return"id"}})(on)(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))))(Le),Td=wa(Le),U1=q(Qn),Pr=q(Rn),FA=oc(),hCe=Kt(ye),GA=za(re),MA=Io(re),DCe=rt(re),o0=Se(ye),Sd=Se(Qe),k1=$n(re)()(),Cd=Yn(ma),LD=Se(re),mz=Yt(re),hz=_e(ze),gCe=Xt(ye)()(),RCe=za(ye),Dz=ee(Ve),yCe=yp()(),bCe=Yn(ii),wCe=Gi(Wv(sl)),ECe=Kv(ye),ICe=eo()(),TCe=M1(re),SCe=De(nr(xt)),CCe=_e(oe),gz=Ho(Y7(bu(oi))),FCe=yo(CA),Rz=U(Ca),GCe=Ye(Lt),MCe=Ul(Be)(CA),yz=ut(Mr(Ca)),bz=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}(),Ez=function(){function e(){}return e.value=new e,e}(),u0=function(){function e(){}return e.value=new e,e}(),B1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),H1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),J1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Iz=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}(),AA=function(){function e(){}return e.value=new e,e}(),LA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Sz=function(){function e(){}return e.value=new e,e}(),Cz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xA=function(){function e(){}return e.value=new e,e}(),q1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),W1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fz=function(){function e(){}return e.value=new e,e}(),Fd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xD=function(){function e(){}return e.value=new e,e}();var Gz=function(e){return nv(dCe(function(n){return Me.create(LA.create(M_(n)))})(mCe(e.pusher.dataChannel)("question")))(function(){return nv(Td(U1(new Me(Sz.value))))(function(){return Pr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:u0.value})})})},Mz=function(e){if(e.user instanceof G)return new T(new Me(xA.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new Me(Fz.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])},ACe=function(){return Yo(qo(Be)([ec.value,new yt(":"),Li.value,new yt(" "),nc.value]))}(),Az=function(e){return function(n){return function(a){var t=function(s){return a(Me.create(s))},r=function(s){return FA({id:"question-modal",onDismiss:t(xD.value),body:Fe([hCe("")([GA("")("By: "),MA("")("@"+s.author.username)]),DCe("")(s.text),Ql(""),o0("row align-items-center mb-3")([Sd("col-4")(k1("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())(en)({onClick:Cd(t)(new W1(wz.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),LD("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."}())]),o0("row align-items-center")([Sd("col-4")(k1("btn w-100 btn-danger")(en)({onClick:Cd(t)(new W1(Ez.value))})("Ban this user")),o0("col")([Xe("This user will not be able to ask any more questions "),MA("")("in this livestream. "),GA("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Fe([k1("btn btn-outline-primary px-4")(en)({onClick:Cd(t)(xD.value)})("Never mind, close this dialog")])})},u=function(s){return FA({id:"questions-registration-form-modal",onDismiss:t(xD.value),title:mz("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Fe([bd({cancelButton:G.value,autoFocus:!0})(e)(s)(function(m){return t(q1.create(m))}),Sd("small mt-3")(Id(e))])})},i=function(s){return FA({id:"questions-username-modal",onDismiss:t(xD.value),title:mz("")("Please select a user name"),body:E$(s)(function(m){return t(Fd.create(m))}),bodyClass:"t--username-modal"})},l=function(s){var m=function(g){return function(E){return function(b){return Fe([LD("ml-2 badge badge-"+E)(g),ha(b)(function(I){return LD("ml-2 text-secondary")(ACe(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?m("CollegeVine")("success")(s.time):s.isPublic?m("Question")("warning")(G.value):ta};return Fe([Sd("position-relative h-100")(Sd("d-flex flex-column position-absolute-fullsize")(o0("d-flex flex-column flex-grow-1 min-height-0")([o0("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(hz(n.questions)(function(s){return gCe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:Cd(t)(new W1(new bz(s)))})([RCe("small d-inline-flex align-items-center")([MA("")("@"+s.author.username),l(s),Xe(":")]),GA("ml-1")(s.text)])})),o0("")([ha(Dz(e.user)(function(s){return s.username}))(function(s){return LD("small text-secondary mt-2")("@"+s)}),yCe("form-control t--question-text")({onChange:bCe(t)(function(s){return Iz.create(m1(s))}),onClick:wCe(a)(Mz(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ga(e.isPrivilegedUser)(Sd("form-check my-2")(ECe("form-check-label d-flex align-items-center t--broadcast-checkbox")([ICe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:Cd(t)(Tz.value)}),LD("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Send to all viewers")]))),o0("d-flex justify-content-end align-items-center")([TCe("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. `),k1("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(en)({onClick:Cd(t)(AA.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof u0)return ta;if(n.modal instanceof H1)return u(n.modal.value0);if(n.modal instanceof B1)return r(n.modal.value0);if(n.modal instanceof J1)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])}()])}}},LCe=function(e){return function(n){return SCe(CCe(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},Lz=function(e){return function(n){return function(a){if(a instanceof bn)return Pr(n);if(a instanceof Me){if(a.value0 instanceof Iz){var t=Mz(e);if(t instanceof T)return nv(Td(U1(t.value0)))(function(){return Pr(n)});if(t instanceof G)return Pr({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 Tz)return Pr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof AA)return nv(Td(U1(new Me(xA.value))))(function(){return Pr(n)});if(a.value0 instanceof LA)return Pr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:gz(function(l){return $b(function(s){return s.time}(l))})(wo(LCe(e))(lo(a.value0.value0)(wo(function(){var l=FCe(a.value0.value0.id);return function(s){return l(function(m){return m.id}(s))}}())(n.questions))))});if(a.value0 instanceof Sz)return nv(Td(Rz(function(l){return Me.create(Cz.create(l))})(tw(e.conference.id))))(function(){return Pr(n)});if(a.value0 instanceof Cz){var u=hz(a.value0.value0)(function(l){return l.id});return Pr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:gz(function(l){return $b(function(s){return s.time}(l))})(GCe(a.value0.value0)(wo(function(l){return MCe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof xA)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new H1(Ed)});var i=function(l){if(a.value0 instanceof q1)return Pr(n);if(a.value0 instanceof Fz)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new J1(T$(Ue("")(Dz(e.user)(function(m){return m.username}))))});if(a.value0 instanceof Fd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof _A)return nv(Td(U1(new bn(a.value0.value0.value0.value0))))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:u0.value})});if(a.value0 instanceof Fd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof pA)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:u0.value});var s=function(m){if(a.value0 instanceof Fd&&je)return Pr(n);if(a.value0 instanceof xD)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:u0.value});if(a.value0 instanceof W1){if(e.isPrivilegedUser){if(a.value0.value0 instanceof bz)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new B1(a.value0.value0.value0)});var p=function(g){var E=function(b){return Pr(n)};return a.value0.value0 instanceof Ez&&n.modal instanceof B1?nv(Za(h5({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:u0.value})}):E(!0)};return a.value0.value0 instanceof wz&&n.modal instanceof B1?nv(Za(l5({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:u0.value})}):p(!0)}if(je)return Pr(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 Fd&&n.modal instanceof J1?yz(function(m){return Me.create(Fd.create(m))})(function(m){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new J1(m)}})(I$(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof q1&&n.modal instanceof H1?yz(function(l){return Me.create(q1.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new H1(l)}})(wd(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof AA&&e.user instanceof T?nv(Td(Rz(function(r){return Me.create(LA.create(r))})(c5({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Pr({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 $1,xCe=new Uint8Array(16);function PA(){if(!$1&&($1=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!$1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $1(xCe)}var xz=/^(?:[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 PCe(e){return typeof e=="string"&&xz.test(e)}var jA=PCe;var Zo=[];for(z1=0;z1<256;++z1)Zo.push((z1+256).toString(16).substr(1));var z1;function jCe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(Zo[e[n+0]]+Zo[e[n+1]]+Zo[e[n+2]]+Zo[e[n+3]]+"-"+Zo[e[n+4]]+Zo[e[n+5]]+"-"+Zo[e[n+6]]+Zo[e[n+7]]+"-"+Zo[e[n+8]]+Zo[e[n+9]]+"-"+Zo[e[n+10]]+Zo[e[n+11]]+Zo[e[n+12]]+Zo[e[n+13]]+Zo[e[n+14]]+Zo[e[n+15]]).toLowerCase();if(!jA(a))throw TypeError("Stringified UUID is invalid");return a}var Pz=jCe;function NCe(e,n,a){e=e||{};var t=e.random||(e.rng||PA)();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 Pz(t)}var NA=NCe;var jz=NA;var OCe=function(e){return e},OA=function(e){return e};var UA=ee(fr)(jz)(function(){var e=q(_t);return function(n){return e(OCe(n))}}());var Gd=wa(Le),Nz=nn(Ke),UCe=Nz(ra),kCe=Ye(ty),BCe=U(Ca),PD=gn(Le),HCe=rt(re),JCe=si()(),Oz=Xt(Qe)()(),Uz=im(oi),qCe=Xr(vr),WCe=Hn(Pu),$Ce=te(lN),kz=te(Bf),zCe=U(ze),ts=Nz(qn),VCe=fu(Le),QCe=Ni(La()(H({reflectSymbol:function(){return"authorTag"}})(he)(H({reflectSymbol:function(){return"kind"}})(he)(tn))))(Le),V1=U(Bn),If=q(Rn),Bz=nt(lp),Hz=um(oi),KCe=q(Qn),kA=Mc(op),YCe=Se(ye),XCe=_e(ze),ZCe=$n(ye)()(),eFe=Yn(ma),nFe=za(re),Q1=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}(),jD=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}(),Jz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HA=function(e){return Gd(UCe(Qt(kCe(e)(10)))(function(){return BCe(BA.create)(PD(ci))}))},qz=50,Wz=function(e){var n=function(r){return HCe("text-white fe fe-"+r)("")},a=function(){if(e instanceof qs)return n("heart");if(e instanceof _f)return n("thumbs-up");if(e instanceof A_)return n("thumbs-down");if(e instanceof pf)return n("file-text");if(e instanceof df)return JCe("")({src:"/img/icons/smile-white.svg",style:vt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 152, column 12 - line 157, column 108): "+[e.constructor.name])}(),t=function(){if(e instanceof qs)return"#F0747B";if(e instanceof _f)return"#008CFD";if(e instanceof A_)return"#6E84A3";if(e instanceof pf)return"#18A668";if(e instanceof df)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 159, column 23 - line 164, column 34): "+[e.constructor.name])}();return Oz("d-flex justify-content-center align-items-center rounded-circle")({style:vt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},$z=6,zz=function(){return $z*1e3}(),Vz=function(e){return function(n){var a=function(t){if(Uz(t.removeAt)(e.currentTime))return ta;var r=Tt(qCe(WCe(ll(py(t.startDecayAt))))(10)),u=function(){var p=r<=3;if(p)return"linear";var g=r<=7;return g?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=Uz(t.startDecayAt)(e.currentTime),m=$z+(r-5)/10;return Oz("position-absolute mb-4 mt-2")({key:$Ce(t.startDecayAt),style:vt({right:kz(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:kz(m)+"s",transitionTimingFunction:u})})(Wz(t.reaction.kind))};return Fe(zCe(a)(e.reactions))}},Qz=function(e){return ts(VCe(function(n){return new jD(AU(n),G.value)})(QCe(e.pusher.dataChannel)("reaction")))(function(){return ts(Gd(PD(V1(function(n){return Jz.create(OA(n))})(UA))))(function(){return ts(Gd(PD(V1(BA.create)(ci))))(function(){return If({authorTag:"",currentTime:Bz,coolDownUntil:Bz,reactions:[]})})})})},Kz=800,Yz=function(e){return function(n){return function(a){if(a instanceof Q1&&a.value1 instanceof G)return ts(Gd(PD(V1(function(){var t=Q1.create(a.value0);return function(r){return t(T.create(r))}}())(ci))))(function(){return If(n)});if(a instanceof Q1&&a.value1 instanceof T){if(Hz(n.coolDownUntil)(a.value1.value0))return ts(Gd(KCe(new jD({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return If(n)});if(je)return ts(Za(p5(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return ts(HA(Kz))(function(){return If({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:Ue(a.value1.value0)(kA(Kz)(a.value1.value0))})})})}if(a instanceof jD&&a.value1 instanceof G)return ts(Gd(PD(V1(function(){var t=jD.create(a.value0);return function(r){return t(T.create(r))}}())(ci))))(function(){return If(n)});if(a instanceof jD&&a.value1 instanceof T)return ts(HA(qz))(function(){return ts(HA(zz))(function(){var t={reaction:a.value0,startDecayAt:Ue(a.value1.value0)(kA(qz)(a.value1.value0)),removeAt:Ue(a.value1.value0)(kA(zz)(a.value1.value0))};return If({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:t_(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof Jz)return If({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof BA)return If({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:wo(function(t){return Hz(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 170, column 22 - line 213, column 8): "+[a.constructor.name])}}},Xz=function(e){return function(n){var a=function(t){if(t instanceof qs)return"love this";if(t instanceof _f)return"helpful";if(t instanceof A_)return"not helpful";if(t instanceof pf)return"taking notes";if(t instanceof df)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 138, column 13 - line 143, column 30): "+[t.constructor.name])};return YCe("d-flex justify-content-end my-2")(XCe([qs.value,df.value,_f.value,pf.value])(function(t){return ZCe("btn bg-light d-flex align-items-center p-0 ml-3")(Zt(a(t)))({onClick:eFe(n)(new Q1(t,G.value)),style:vt({borderRadius:"1em"})})([Wz(t),nFe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var Zz=nn(Ke),aFe=ee(ra),JA=gn(Le),K1=q(Qn),Y1=Kt(re),X1=te(an),ND=Zz(qn),OD=wa(Le),Fl=q(Rn),eV=Nt($r),nV=Ro(Km),aV=U(Ca),tFe=Bo(Rn)(Qu),rFe=ui(Fs),tV=Se(re),oFe=rc(),uFe=Yt(re),rV=$n(re)()(),qA=Yn(ma),oV=Se(Qe),iFe=$n(ye)()(),lFe=rt(re),cFe=Se(ye),uV=function(){function e(){}return e.value=new e,e}(),iV=function(){function e(){}return e.value=new e,e}(),lV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cV=function(){function e(){}return e.value=new e,e}(),sV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vV=function(){function e(){}return e.value=new e,e}(),fV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_V=function(){function e(){}return e.value=new e,e}(),pV=function(){function e(){}return e.value=new e,e}(),$A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Z1=function(){function e(){}return e.value=new e,e}(),dV=Zz(ra)(Qt(1e3))(function(){return aFe(JA(ci))(function(e){return K1(new $A(e))})}),sFe=function(e){return{header:"Go on-air?",body:Fe([Y1("")("Are you sure you want to go on-air?"),Y1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(X1(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:cV.value}},mV=function(e){return function(n){return function(a){return function(t){return ND(OD(dV))(function(){return Fl({confirmation:n.confirmation,network:uV.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},hV=function(e){return function(n){return function(a){if(a instanceof cV)return ND(OD(eV(nV(a5(e.conference.id))(aV(sV.create)(JA(ci))))(function(l){return K1(new zA("Error opening the stream. Please try again."))})))(function(){return Fl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:iV.value})});if(a instanceof sV)return mV(e)(n)(a.value0)(ao.value);if(a instanceof vV)return ND(OD(eV(nV(t5(e.conference.id))(aV(fV.create)(JA(ci))))(function(l){return K1(new zA("Error closing the stream. Please try again."))})))(function(){return Fl(n)});if(a instanceof fV)return mV(e)(n)(a.value0)(Ar.value);if(a instanceof WA)return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof _V)return ND(tFe(n.confirmation)(function(l){return OD(K1(l.confirmMsg))}))(function(){return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof pV)return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof zA)return Fl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new lV(a.value0)});var t=function(l){if(a instanceof $A||a instanceof Z1)return Fl(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 $A){if(n.transition instanceof T){var r=rFe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Eo(r)|0,i=u>0;return i?ND(OD(dV))(function(){return Fl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):Fl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},DV=function(e){return Fl({streamStatus:e.streamStatus,transition:G.value,network:uV.value,confirmation:G.value})},vFe=function(){return{header:"End the stream?",body:Fe([Y1("")("Are you sure you want to end the stream?"),Y1("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:vV.value}}(),gV=function(e){return function(n){return function(a){var t=function(){return n.network instanceof iV?tV("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):ta}(),r=function(m){return oFe({id:"stream-controls-confirmation-modal",header:uFe("my-0")(m.header),bodyClass:"p-5",body:m.body,footerClass:"p-4",footer:Fe([rV("btn btn-primary px-4")(en)({onClick:qA(a)(_V.value)})(m.confirmText),rV("btn btn-outline-primary px-4")(en)({onClick:qA(a)(pV.value)})(m.cancelText)])})},u=function(m){return function(p){return function(g){return function(E){return function(b){return oV("col-auto pr-0")(iFe("btn btn-"+(m+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(en)({onClick:qA(a)(b)})([lFe("fe mr-2 fe-"+p)(""),Xe(g)]))}}}}},i=function(){if(n.streamStatus instanceof Nu)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new WA(sFe(e)));var m=function(p){if(n.streamStatus instanceof ao)return Fe([u("lg")("radio")("ON AIR")("success")(Z1.value),u("sm")("x-circle")("End stream")("outline-danger")(new WA(vFe))]);if(n.streamStatus instanceof Ar)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(Z1.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 ao&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(Z1.value):m(!0)}(),l=function(m){return tV("alert small m-0 flex-grow-1 alert-"+m)},s=function(){if(n.network instanceof lV)return l("danger")(n.network.value0);if(n.streamStatus instanceof Nu)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var m=function(p){if(n.streamStatus instanceof ao)return l("light")(` We're live. The audience should see your video with a `+(X1(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var g=function(E){if(n.streamStatus instanceof Ar)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 Ar&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(X1(n.transition.value0.secondsLeft)+" seconds.")):g(!0)};return n.streamStatus instanceof ao&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(X1(n.transition.value0.secondsLeft)+" seconds...")):m(!0)}();return cFe("position-relative row align-items-center t--stream-controls")([i,oV("col")(s),t,ha(n.confirmation)(r)])}}};var fFe=Mc(jv),RV=ui(jv),yV=sO(),_Fe=oc(),pFe=Yt(re),dFe=Se(re),bV=Kt(re),mFe=$n(re)()(),hFe=Yn(ma),wV=wa(Le),EV=nn(Ke),IV=U(Ca),TV=gn(Le),SV=EV(qn),DFe=uu(Be)(ct),VA=q(Rn),QA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KA=function(){function e(){}return e.value=new e,e}(),gFe=[30,15,5,0],FV=function(e){return Ue(e.conference.scheduledStartTime)(fFe(Tt(e.conference.duration))(e.conference.scheduledStartTime))},GV=function(e){return function(n){return function(a){if(!n.modal)return ta;if(n.now instanceof G)return ta;if(n.now instanceof T){var t=FV(e),r=RV(t)(n.now.value0),u=function(){if(r<1)return" ended "+yV({from:t,to:n.now.value0,format:vb("ago")});if(je)return" ends "+yV({from:n.now.value0,to:t,format:vb("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 69, column 7 - line 71, column 105): "+[])}();return _Fe({id:"stream-end-warning-modal",onDismiss:a(KA.value),body:Fe([pFe("mb-0")("Host-only warning"),dFe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),bV("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),bV("")(` You have `+(xi(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. `)),mFe("btn btn-primary px-4")(en)({onClick:hFe(a)(KA.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])}}},RFe=wV(EV(ra)(Qt(60100))(function(){return IV(QA.create)(TV(sf))})),MV=function(e){return function(n){return function(a){if(a instanceof QA)return SV(RFe)(function(){var t=RV(FV(e))(a.value0),r=DFe(Eo(t))(gFe);return VA({now:new T(a.value0),modal:n.modal||r})});if(a instanceof KA)return VA({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])}}},AV=function(){return SV(wV(IV(QA.create)(TV(sf))))(function(){return VA({modal:!1,now:G.value})})}();var LV=nn(Ke),yFe=LV(ra),xV=q(Qn),bFe=LV(qn),wFe=wa(Le),EFe=Nt($r),eE=q(Rn),IFe=De(Gh),PV=qo(Be),YA=Se(ye),nE=rt(re),TFe=$n(re)()(),jV=Yn(ma),SFe=cr(re)()(),CFe=$n(Qe)()(),FFe=rc(),NV=Se(Qe),GFe=Io(re),MFe=xc(re)()(),AFe=za(re),OV=function(){function e(){}return e.value=new e,e}(),UV=function(){function e(){}return e.value=new e,e}(),XA=function(){function e(){}return e.value=new e,e}(),kV=function(){function e(){}return e.value=new e,e}(),BV=function(){function e(){}return e.value=new e,e}(),HV=function(){function e(){}return e.value=new e,e}(),JV=function(){function e(){}return e.value=new e,e}(),LFe=function(){function e(){}return e.value=new e,e}(),qV=function(e){return function(n){return function(a){var t=yFe(nw({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return xV(new Me(HV.value))});if(a instanceof BV)return bFe(wFe(EFe(t)(function(r){return xV(new Me(JV.value))})))(function(){return eE({cta:n.cta,stage:UV.value})});if(a instanceof HV)return eE({cta:n.cta,stage:kV.value});if(a instanceof JV)return eE({cta:n.cta,stage:XA.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 136, column 24 - line 146, column 44): "+[a.constructor.name])}}},WV=function(e){return function(n){return IFe(e.cta.conferenceId)(n.conferenceId)}},$V=function(e){return eE({cta:e,stage:OV.value})},xFe=function(){return Yo(PV([Zl.value,new yt(", "),Yl.value,new yt(" "),Xl.value,new yt(" at "),ec.value,new yt(":"),Li.value,new yt(" "),nc.value]))}(),PFe=function(){return Yo(PV([Zl.value]))}(),zV=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof XA?YA("text-danger small mt-2")([nE("fe fe-x-circle mr-2")(""),Xe("Something went wrong. Please try again.")]):ta}(),r=function(m){return a(Me.create(m))},u=function(){if(e.user instanceof T)return TFe("btn btn-primary px-4 t--register-one-click")(Zt("Register for this livestream"))({onClick:jV(r)(BV.value)})("Register (one-click)");if(e.user instanceof G)return SFe("btn btn-primary px-4 t--register-new-tab")(Zt("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 OV||n.stage instanceof XA)return u;if(n.stage instanceof UV)return YA("text-secondary")([nE("fe fe-refresh-cw mr-2")(""),Xe("Hold on tight...")]);if(n.stage instanceof kV)return YA("text-success")([nE("fe fe-check-circle mr-2")(""),Xe("You\u2019ve registered \u2013\xA0see you "+(PFe(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(m){return a(bn.create(m))},s=CFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:jV(l)(LFe.value)})(nE("fe fe-x")(""));return FFe({id:"livestream-event-cta-modal",body:Fe([NV("row justify-content-end mt-n3")(s),GFe("")("Join us for our upcoming livestream:"),MFe("mt-3")({id:ji})(n.cta.title),AFe("small")(xFe(n.cta.startTime)+(" "+G_)),NV("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:Bh.value})}}};var jFe=rc(),aE=Se(ye),NFe=Uy(re)()(),tE=Se(Qe),OFe=$n(Qe)()(),VV=Yn(ma),UFe=rt(re),kFe=_e(ze),BFe=fl()(),HFe=no(re),JFe=Kt(re),qFe=cr(re)()(),WFe=nn(Ke),$Fe=WFe(qn),zFe=wa(Le),VFe=gn(Le),QFe=zs(Cr)(),KFe=te(an),QV=q(Rn),YFe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KV=function(){function e(){}return e.value=new e,e}(),YV=function(e){return function(n){var a=function(){var i=Ur(e.cta.providers);return i===1?mf.value:i===2?mf.value:Hh.value}(),t=function(i){return n(Me.create(i))},r=function(i){return n(bn.create(i))},u=function(){var i=Ur(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 jFe({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Fe([aE("row no-gutters g-0 mb-4")([aE("col text-center")([NFe("mb-2")({id:ji})("The admissions process is hard - advisors are here to help!"),Xe("Schedule a free consultation to get your questions answered")]),tE("col-auto text-right")(OFe("btn btn-link p-0 m-0 text-white")(Zt("Close"))({onClick:VV(r)(KV.value)})(UFe("fe fe-x")("")))]),aE("row text-center")(kFe(e.cta.providers)(function(i){return aE(u)([tE("row mb-3")(tE("col-auto mx-auto")(tE("avatar avatar-xl")(BFe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),HFe("mb-2")(i.name),JFe("mb-3")(i.location),qFe("btn btn-primary btn-sm px-3 py-1")(en)({target:"_blank",href:i.linkUrl,onClick:VV(t)(new YFe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},XV=function(e){return function(n){return $Fe(zFe(VFe(function(){return QFe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:KFe(e.cta.id),livestream_cta_url:n.value0})(),new bn(KV.value)})))(function(){return QV(e)})}},ZV=function(e){return function(n){return e.cta.id===n.id}},eQ=function(e){return QV({cta:e})};var XFe=cr(re)()(),nQ=Yn(ma),ZFe=$n(Qe)()(),eGe=rt(re),nGe=rc(),aQ=Se(Qe),aGe=xc(re)()(),tGe=nn(Ke),rGe=tGe(qn),oGe=wa(Le),uGe=gn(Le),iGe=zs(Cr)(),lGe=te(an),tQ=q(Rn),cGe=function(){function e(){}return e.value=new e,e}(),rQ=function(){function e(){}return e.value=new e,e}(),oQ=function(e){return function(n){var a=function(i){return n(Me.create(i))},t=XFe("btn btn-primary px-4 t--register-new-tab")(en)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:nQ(a)(cGe.value)})(e.cta.buttonText),r=function(i){return n(bn.create(i))},u=ZFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:nQ(r)(rQ.value)})(eGe("fe fe-x")(""));return nGe({id:"general-cta-modal",body:Fe([aQ("row justify-content-end mt-n3")(u),aGe("mt-3")({id:ji})(e.cta.title),aQ("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:Bh.value})}},uQ=function(e){return function(n){return rGe(oGe(uGe(function(){return iGe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:lGe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new bn(rQ.value)})))(function(){return tQ(e)})}},iQ=function(e){return function(n){return e.cta.id===n.id}},lQ=function(e){return tQ({cta:e})};var ZA=nn(Ke),fi=ZA(Ve),_i=qr(uo),Md=q(la),cQ=rr(Zr(at)),UD=ia(oo),av=q(Rn),sGe=ZA(qn),vGe=wa(Le),fGe=ZA(ra),_Ge=q(Qn),eL=Se(ye),pGe=Kv(re),dGe=eo()(),mGe=Yn(ii),hGe=$n(Qe)()(),sQ=Yn(ma),DGe=rt(re),gGe=rc(),nL=Se(Qe),RGe=xc(re)()(),yGe=Kt(re),bGe=$n(re)()(),vQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_Q=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hQ=function(){function e(){}return e.value=new e,e}(),DQ=function(){function e(){}return e.value=new e,e}(),gQ=function(e){return function(n){return e.cta.id===n.id}},RQ=function(e){return function(n){var a=fi(_i(n.cta.requireReferredUserLastName))(function(){return fi(_i(n.referredUserLastName===""))(function(){return Md("Please enter the other person\u2019s last name")})}),t=fi(_i(n.cta.requireReferredUserFirstName))(function(){return fi(_i(n.referredUserFirstName===""))(function(){return Md("Please enter the other person\u2019s first name")})}),r=fi(_i(cQ(GD)(n.referredUserEmail)))(function(){return Md("Please enter a valid email address")}),u=fi(_i(Mt(e.user)))(function(){return fi(_i(n.cta.requireAnonymousUserLastName))(function(){return fi(_i(n.anonymousUserLastName===""))(function(){return Md("Please enter your last name")})})}),i=fi(_i(Mt(e.user)))(function(){return fi(_i(n.cta.requireAnonymousUserFirstName))(function(){return fi(_i(n.anonymousUserFirstName===""))(function(){return Md("Please enter your first name")})})}),l=fi(_i(Mt(e.user)))(function(){return fi(_i(n.cta.requireAnonymousUserEmail))(function(){return fi(_i(cQ(GD)(n.anonymousUserEmail)))(function(){return Md("Please enter a valid email address")})})});return UD(i)(UD(u)(UD(l)(UD(t)(UD(a)(r)))))}},yQ=function(e){return function(n){return function(a){if(a instanceof vQ)return av({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 fQ)return av({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 _Q)return av({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 pQ)return av({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 dQ)return av({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 mQ)return av({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 hQ){var t=Mt(RQ(e)(n));return t?sGe(vGe(fGe(r5({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return _Ge(new bn(DQ.value))})))(function(){return av(n)}):av({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])}}},bQ=function(e){return function(n){return function(a){var t=RQ(e)(n),r=function(E){return function(b){return function(I){return function(L){return function(N){return eL(E)([pGe("mb-2")(I),dGe("form-control "+b)({type:"text",value:L,onChange:mGe(a)(function(z){return Me.create(N(Ys(z)))})})])}}}}},u=ga(Mt(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(_Q.create)),i=ga(Mt(e.user))(Fe([ga(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(vQ.create)),ga(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(fQ.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(mQ.create),s=Fe([ga(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(pQ.create)),ga(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(dQ.create))]),m=function(E){return a(Me.create(E))},p=function(E){return a(bn.create(E))},g=hGe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(Zt("Close"))({onClick:sQ(p)(DQ.value)})(DGe("fe fe-x")(""));return gGe({id:"referral-cta-modal",body:Fe([nL("row justify-content-end mt-n3")(g),RGe("mt-3")({id:ji})(n.cta.title),ha(n.cta.description)(yGe("")),eL("row")([i,u,s,l]),eL("row")([nL("col-auto my-auto")(bGe("btn btn-primary t--save")(en)({onClick:sQ(m)(hQ.value)})("Save")),nL("col my-auto text-danger")(ga(n.validationActive)(ha(t)(Xe)))])]),bodyClass:"t--cta-active",size:mf.value})}}},wQ=function(e){return av({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var wGe=wa(Le),EGe=q(Qn),Tf=ut(Mr(Ca)),rE=nn(Ke)(qn),kD=q(Rn),BD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iE=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}(),IGe=function(){function e(){}return e.value=new e,e}(),EQ=function(e){return function(n){return function(a){var t=function(r){return a(Me.create(r))};if(n instanceof BD)return zV(e)(n.value0)(function(r){return t(oE.create(r))});if(n instanceof HD)return YV(n.value0)(function(r){return t(uE.create(r))});if(n instanceof JD)return oQ(n.value0)(function(r){return t(iE.create(r))});if(n instanceof qD)return bQ(e)(n.value0)(function(r){return t(lE.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},IQ=function(e){return function(n){return function(a){var t=wGe(EGe(new bn(IGe.value)));if(n instanceof BD&&a instanceof oE){if(a.value0 instanceof Me)return Tf(function(r){return Me.create(oE.create(r))})(BD.create)(qV(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return rE(t)(function(){return kD(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 HD&&a instanceof uE){if(a.value0 instanceof Me)return Tf(function(r){return Me.create(uE.create(r))})(HD.create)(XV(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return rE(t)(function(){return kD(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 JD&&a instanceof iE){if(a.value0 instanceof Me)return Tf(function(r){return Me.create(iE.create(r))})(JD.create)(uQ(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return rE(t)(function(){return kD(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 qD&&a instanceof lE){if(a.value0 instanceof Me)return Tf(function(r){return Me.create(lE.create(r))})(qD.create)(yQ(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return rE(t)(function(){return kD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return kD(n)}}},TQ=function(e){return function(n){return e instanceof BD&&n instanceof Rl?WV(e.value0)(n.value0):e instanceof JD&&n instanceof yl?iQ(e.value0)(n.value0):e instanceof HD&&n instanceof bl?ZV(e.value0)(n.value0):e instanceof qD&&n instanceof wl?gQ(e.value0)(n.value0):!1}},SQ=function(e){if(e instanceof Rl)return Tf(function(n){return Me.create(oE.create(n))})(BD.create)($V(e.value0));if(e instanceof bl)return Tf(function(n){return Me.create(uE.create(n))})(HD.create)(eQ(e.value0));if(e instanceof yl)return Tf(function(n){return Me.create(iE.create(n))})(JD.create)(lQ(e.value0));if(e instanceof wl)return Tf(function(n){return Me.create(lE.create(n))})(qD.create)(wQ(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var CQ=Yt(re),cE=Se(ye),TGe=Io(re),SGe=xc(re)()(),FQ=kl(Ev),CGe=Kv(ye),FGe=eo()(),aL=uu(Be)(ct),tL=Yn(ma),GQ=$n(re)()(),GGe=Wp(Qe),MGe=gn(Le),AGe=$s(Cr),LGe=ni(),xGe=te(an),i0=q(Rn),PGe=Sv(ct),l0=nn(Ke)(qn),jGe=Nt($r),rL=q(Qn),NGe=Bo(Qn)(Be),OGe=er(Qn),MQ=wa(Le),UGe=ut(Mr(Ca)),Ad=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uL=function(){function e(){}return e.value=new e,e}(),AQ=function(){function e(){}return e.value=new e,e}(),iL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LQ=function(e){return function(n){return function(a){var t=Fe([CQ("text-center")("The host just asked a poll question!"),CQ("text-center")("To participate in live polls, please introduce yourself:"),bd({cancelButton:new T({text:"Not now",click:a(new Ad({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(iL.create(i))}),cE("small mt-3")([Id(e),cE("mt-2")([Xe("After submitting, you\u2019ll be able to answer all "),TGe("")("future"),Xe(" poll questions in this stream!")])])]),r=Fe([SGe("font-weight-bold fw-bold")({id:ji})(n.poll.question),cE("d-flex flex-column ml-4")(FQ(function(i){return function(l){return CGe("form-check-label mb-2")([FGe("form-check-input mt-2 t--option")({checked:aL(i)(n.selected),onChange:tL(a)(new oL(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Xe(l)])}})(n.poll.options)),cE("d-flex justify-content-start mt-6")([GQ("btn btn-primary px-4 mr-3 t--submit")(en)({onClick:tL(a)(uL.value),disabled:Yu(n.selected)})("Submit answer"),GQ("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(en)({onClick:tL(a)(AQ.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 GGe(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])}())}}},xQ=function(e){return function(n){return function(a){var t=function(r){return MGe(AGe("Livestream: Poll Response")(Cs(ff(e.conference))(LGe({livestream_poll_id:xGe(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 Ad)return i0(n);if(a instanceof oL&&n.poll.multiSelect)return i0({poll:n.poll,registration:n.registration,selected:function(){var r=aL(a.value0)(n.selected);return r?PGe(a.value0)(n.selected):lo(a.value0)(n.selected)}()});if(a instanceof oL)return i0({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof uL&&Yu(n.selected))return i0(n);if(a instanceof uL)return l0(Za(jGe(QF(n.poll)(n.selected))(function(r){return Ai(hl)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return rL(de)})})))(function(){return l0(Za(NGe(FQ(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return OGe(aL(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return l0(MQ(rL(new Ad({keepShowingPolls:!0}))))(function(){return i0(n)})})});if(a instanceof AQ)return l0(Za(QF(n.poll)([])))(function(){return l0(Za(t({skipped:!0,option:""})))(function(){return l0(MQ(rL(new Ad({keepShowingPolls:!0}))))(function(){return i0(n)})})});if(a instanceof iL)return UGe(iL.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(wd(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])}}},PQ=function(e){return l0(Za(o5(e)))(function(){return i0({poll:e,selected:[],registration:Ed})})};var jQ=nn(Ke),kGe=jQ(ra),BGe=ee(ra),NQ=gn(Le),HGe=Bo(Qn)(Qu),JGe=$s(Cr),OQ=ni(),qGe=te(x0),WGe=te(ac),sE=te(an),Gl=q(Rn),UQ=Mr(Ca),kQ=ut(UQ),BQ=ee(qn),HQ=Bt(UQ),Sf=jQ(qn),$Ge=De(ct),Cf=q(la),WD=Ip(Le),$D=U(oe),zGe=U($u),zD=bs(Be),lL=La(),JQ=Ni(lL(H({reflectSymbol:function(){return"poll_id"}})(on)(tn)))(Le),VGe=fu(Le),QGe=De(nr(Gh)),KGe=Ni(lL(H({reflectSymbol:function(){return"conference_id"}})(on)(tn)))(Le),cL=De(nr(ct)),sL=Ni(lL(H({reflectSymbol:function(){return"id"}})(on)(tn)))(Le),VD=function(){function e(){}return e.value=new e,e}(),Ld=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xd=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}(),fE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Pd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qQ=function(e){return function(n){return function(a){if(n.stage instanceof VD)return ta;if(n.stage instanceof Ld)return LQ(e)(n.stage.value0)(function(t){return a(xd.create(t))});if(n.stage instanceof QD)return EQ(e)(n.stage.value0)(function(t){return a(vE.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},YGe=function(e){return function(n){return e instanceof QD?TQ(e.value0)(n):!1}},XGe=function(){return function(e){return function(n){return function(a){return kGe(Qt(100))(function(){return BGe(NQ(hb(ji)))(function(t){return HGe(t)(function(r){return NQ(function(){var i=CG(HC(r))(),l=MO({x:i.left+1,y:i.top+1})(),s=TG(HC(l))();return JGe(n)(Cs(OQ(a))(Cs(ff(e.conference))(OQ({livestream_popup_visible:qGe(s===ji)}))))()})})})})}}}},WQ=XGe(),ZGe=function(e){var n=function(){return WQ(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof Rl)return a({livestream_cta_target_conference_id:WGe(t.value0.conferenceId)});if(t instanceof bl)return a({livestream_cta_id:sE(t.value0.id)});if(t instanceof yl)return a({livestream_cta_id:sE(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof wl)return a({livestream_cta_id:sE(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])}},$Q=function(e){return function(n){return function(a){if(a instanceof xd&&a.value0 instanceof Ad)return Gl({stage:VD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof xd)return Gl(n);if(a instanceof vE){if(a.value0 instanceof bn)return Gl({showPolls:n.showPolls,stage:VD.value});var u=function(s){return Gl(n)};return a.value0 instanceof Me&&n.stage instanceof QD?kQ(vE.create)(function(s){return{showPolls:n.showPolls,stage:new QD(s)}})(IQ(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof fE&&n.showPolls)return BQ(HQ(xd.create)(PQ(a.value0)))(function(p){return Sf(Za(WQ(e)("Livestream: Poll Popup Shown")({livestream_poll_id:sE(a.value0.id)})))(function(){return Gl({showPolls:n.showPolls,stage:new Ld(p)})})});if(a instanceof fE)return Gl(n);var s=function(p){if(a instanceof vL||a instanceof Pd&&YGe(n.stage)(a.value0))return Gl(n);if(a instanceof Pd)return Sf(Za(ZGe(e)(a.value0)))(function(){return BQ(HQ(vE.create)(SQ(a.value0)))(function(g){return Gl({showPolls:n.showPolls,stage:new QD(g)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof vL){if(n.stage instanceof Ld){var m=n.stage.value0.poll.id===a.value0.pollId;return m?Gl({showPolls:n.showPolls,stage:VD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof fE){if(n.stage instanceof Ld){var i=n.stage.value0.poll.id===a.value0.id;return i?Gl(n):u(!0)}return u(!0)}return u(!0)};return a instanceof xd&&n.stage instanceof Ld?kQ(xd.create)(function(r){return{showPolls:n.showPolls,stage:new Ld(r)}})(xQ(e)(n.stage.value0)(a.value0)):t(!0)}}},zQ=function(e){var n=function(u){return u instanceof wl?Cf(u.value0.id):G.value},a=function(u){return u instanceof bl?Cf(u.value0.id):G.value},t=function(u){return u instanceof yl?Cf(u.value0.id):G.value},r=function(u){return u instanceof Rl?Cf(u.value0.conferenceId):G.value};return Sf(WD(function(u){return $D(zGe(fE.create)(function(i){return i.poll}))(zD(function(){var i=$Ge(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(JQ(e.pusher.dataChannel)("show-poll")))(function(){return Sf(VGe(function(u){return new vL({pollId:u.poll_id})})(JQ(e.pusher.dataChannel)("hide-poll")))(function(){return Sf(WD(function(u){return $D(Pd.create)(zD(function(){var i=QGe(Cf(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(KGe(e.pusher.dataChannel)("show-event-cta")))(function(){return Sf(WD(function(u){return $D(Pd.create)(zD(function(){var i=cL(Cf(u.id));return function(l){return i(t(l))}}())(e.ctas))})(sL(e.pusher.dataChannel)("show-general-cta")))(function(){return Sf(WD(function(u){return $D(Pd.create)(zD(function(){var i=cL(Cf(u.id));return function(l){return i(a(l))}}())(e.ctas))})(sL(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return Sf(WD(function(u){return $D(Pd.create)(zD(function(){var i=cL(Cf(u.id));return function(l){return i(n(l))}}())(e.ctas))})(sL(e.pusher.dataChannel)("show-referral-cta")))(function(){return Gl({stage:VD.value,showPolls:!0})})})})})})})};var eMe=oc(),fL=Se(ye),nMe=Yt(Qe),aMe=za(ye),tMe=rt(re),VQ=si()(),QQ=Yt(re),rMe=Kt(re),_E=$n(re)()(),oMe=nn(Ke),_L=Yn(ma),KQ=oMe(qn),uMe=gW(),pL=q(Rn),YQ=ee(Ve),iMe=dv(zj),lMe=ui(fS),cMe=De(yb),sMe=De(_c),vMe=$l()(),XQ=function(){function e(){}return e.value=new e,e}(),dL=function(){function e(){}return e.value=new e,e}(),ZQ=function(){function e(){}return e.value=new e,e}(),mL=function(){function e(){}return e.value=new e,e}(),hL=function(){function e(){}return e.value=new e,e}(),pE=function(e){return function(n){return eMe({id:"network-settings-modal",onDismiss:n(new bn(hL.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof XQ)return fL("text-center")([ga(e.confirmConferenceRegistration)(nMe("mb-4")(aMe("badge badge-soft-primary bg-primary-soft")([tMe("fe fe-check mr-1")(""),Xe("You\u2019re registered!")]))),VQ("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),QQ("")("Connect with colleges when you attend or register for their livestreams?"),rMe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),fL("mx-md-6 mt-4")([_E("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(en)({onClick:wr(function(a){return function(){return n(new Me(ZQ.value))(),n(new Me(mL.value))()}})})("Yes, always connect"),_E("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(en)({onClick:_L(n)(new Me(mL.value))})("Only connect with "+e.school.name),_E("btn btn-link mt-3")(en)({onClick:_L(n)(new bn(hL.value))})("Close")])]);if(e.modalView instanceof dL)return fL("text-center")([VQ("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),QQ("")("Connection request sent!"),_E("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(en)({onClick:_L(n)(new bn(hL.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 74, column 13 - line 107, column 12): "+[e.modalView.constructor.name])}()})}},dE=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof ZQ)return KQ(Za(uMe({publishScope:Pi.value,publishContext:zM.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return pL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:dL.value})});if(n.value0 instanceof mL)return KQ(Za(H9(e.school.id)(e.conference.id)))(function(){return pL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:dL.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 31 - line 63, column 44): "+[n.value0.constructor.name])}if(n instanceof bn)return pL(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 50, column 1 - line 50, column 55): "+[e.constructor.name,n.constructor.name])}},mE=function(e){return function(n){var a=Ue(!1)(YQ(e.dismissedNetworkSettingsModalAt)(function(r){return new T(iMe(lMe(Db(de))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,cMe(r.publishScope)(Pi.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return Ue(!1)(YQ(e.profile)(function(r){return new T(WT(sMe(!0))(t(r)))}))}},hE=function(e){return vMe(e)({modalView:XQ.value})};var KD=function(){function e(){}return e.value=new e,e}(),jd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),YD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DE=function(){function e(){}return e.value=new e,e}();var eK=nn(Ke),nK=eK(qn),DL=wa(Le),fMe=eK(ra),gL=q(Qn),gE=q(Rn),aK=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof KD&&t instanceof YD?nK(DL(fMe(Qt(a.delay))(function(){return gL(e(DE.value))})))(function(){return gE(n({delay:a.delay,throttleState:new jd(t.value0)}))}):a.throttleState instanceof jd&&t instanceof YD?gE(n({delay:a.delay,throttleState:new jd(t.value0)})):a.throttleState instanceof jd&&t instanceof DE?nK(DL(gL(a.throttleState.value0)))(function(){return gE(n({delay:a.delay,throttleState:KD.value}))}):gE(n(a))}}}},tK=function(e){return function(n){return DL(gL(e(new YD(n))))}},rK=function(e){return{throttleState:KD.value,delay:e}};var RE=Se(re),yE=Se(ye),_Me=Yt(re),tv=te(an),pMe=kr(vr),oK=Se(Qe),dMe=Xt(re)()(),mMe=Io(re),hMe=za(re),DMe=js(Qe),gMe=xy(ye)()(),uK=Pc(na),bE=$n(re)()(),RL=Yn(ma),iK=uu(Be)(ct),lK=js(ye),wE=Vl(re),RMe=Vl(Qe),yMe=Vl(ye),bMe=Qv(ye),wMe=$v(ye),Nd=zv(re),EMe=Vv(ye),EE=_e(ze),IMe=Ho(na),XD=nn(Ke)(qn),yL=wa(Le),TMe=Nt($r),cK=q(Qn),Ff=q(Rn),bL=U(Ca),SMe=De(lU),sK=_u(na)(Be),CMe=Ye(Lt),FMe=Em(na),GMe=Sv(ct),MMe=fu(Le),AMe=ew(Le),IE=function(){function e(){}return e.value=new e,e}(),vK=function(){function e(){}return e.value=new e,e}(),fK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_K=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pK=function(){function e(){}return e.value=new e,e}(),dK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mK=function(){function e(){}return e.value=new e,e}(),EL=function(){function e(){}return e.value=new e,e}(),hK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DK=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return ta;var t=function(){if(n.stage instanceof IE)return ta;if(n.stage instanceof vK)return RE("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=yE("d-flex flex-nowrap align-items-baseline")([_Me("")("Polls"),RE("text-muted ml-3 small")("Polls will be shown to viewers "+(tv(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(m){return function(p){var g=function(E){return function(b){var I=function(){if(m===0)return"0%";if(je)return tv(pMe(100*b|0)(m))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): "+[])}();return yE("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([RE("col-7 d-flex justify-content-end")(E),oK("col-4")(oK("progress")(dMe("progress-bar")({style:vt({width:I})})(""))),yE("col-1")([mMe("")(tv(b)),hMe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return DMe("t--poll-responses-"+tv(s.id))(gMe("py-0")({colSpan:6})(ER(g)(s.options)(p.optionCounts)))}}},i=function(s){var m=Ue(s.status)(uK(s.poll.id)(n.statuses)),p=bE("btn btn-white btn-sm px-4 t--open")(en)({onClick:RL(a)(new fK(s.poll))})("Launch poll");if(m instanceof Hs)return p;if(m instanceof Wc)return Fe([bE("btn btn-success btn-sm px-4 mr-3")(en)({disabled:!0})("Poll LIVE"),bE("btn btn-danger btn-sm px-4 t--close")(en)({onClick:RL(a)(new _K(s.poll))})("Close poll")]);if(m instanceof Js)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[m.constructor.name])},l=function(s){var m=iK(s.poll.id)(n.expandedResponses),p=uK(s.poll.id)(n.responses),g=In(0)(function(I){return I.answered})(p),E=In(0)(function(I){return I.seen})(p),b=In(0)(function(I){return I.skipped})(p);return Fe([lK("t--poll t--poll-"+tv(s.poll.id))([wE("pt-3")(function(){var I=Pt(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""}()+s.poll.question),RMe("text-nowrap")(i(s)),wE("t--shown")(tv(E)),yMe("t--answers")([Xe(tv(g)),bE("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return m?"up":"down t--expand-responses"}()))(Zt(function(){return m?"Collapse responses":"Expand responses"}()))({onClick:RL(a)(new dK(s.poll.id))})("")]),wE("t--skipped")(tv(b)),wE("t--pending")(tv((E-g|0)-b|0))]),ga(m)(ha(p)(u(s.poll)(g)))])};return Fe([r,yE("t--polls position-relative")([ha(n.error)(function(s){return RE("alert alert-danger")(s)}),bMe("table table-sm mb-0")([wMe("")([lK("")([Nd("")("Question"),Nd("")("Actions"),Nd("")("# saw poll"),Nd("")("# answered"),Nd("")("# skipped"),Nd("")("# not responded")])]),EMe("")(EE(IMe(function(s){return-function(m){return m.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},gK=function(e){return function(n){var a=function(t){return XD(yL(TMe(t)(function(r){return cK(pK.value)})))(function(){return Ff({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:vK.value,error:G.value})})};return function(t){if(t instanceof fK)return a(bL(wL.create)(VF(t.value0)(Wc.value)));if(t instanceof _K)return a(bL(wL.create)(VF(t.value0)(Js.value)));if(t instanceof wL){var r=EE(wo(function(){var u=SMe(Wc.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return Ff({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:sK(EE(t.value0)(function(u){return new sn(u.pollId,u.status)})),expandedResponses:CMe(n.expandedResponses)(FMe(r)),stage:IE.value})}if(t instanceof pK)return Ff({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:IE.value,error:new T("That didn't work for some reason, try again")});if(t instanceof dK)return Ff({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=iK(t.value0)(n.expandedResponses);return u?GMe(t.value0)(n.expandedResponses):lo(t.value0)(n.expandedResponses)}()});if(t instanceof mK)return XD(tK(IL.create)(EL.value))(function(){return Ff(n)});if(t instanceof EL)return XD(yL(bL(hK.create)(d5(e.conference.id))))(function(){return Ff(n)});if(t instanceof hK)return Ff({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:sK(EE(t.value0)(function(u){return new sn(u.pollId,u.responses)}))});if(t instanceof IL)return aK(IL.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])}}},RK=function(e){return XD(MMe(cn(mK.value))(AMe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return XD(yL(cK(EL.value)))(function(){return Ff({statuses:Mi,responses:Mi,expandedResponses:[],responseThrottle:rK(500),stage:IE.value,error:G.value})})})};var yK=si()(),bK=Se(ye),wK=Yt(re),EK=no(re),IK=yK("img-fluid mb-6")({src:"/img/cv-logo-lilac-on-dark.svg",style:vt({width:"5em"})}),TE=function(e){return bK(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},ZD=function(e){return TE("")([wK("text-center")(e)])},TL=TE("t--splashscreen-intro")([Se(Qe)("text-center mt-7")(EK("")("The recording will load in a moment.")),IK]),SE=TE("px-4 px-md-6 t--splashscreen-intro")([yK("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),TK=TE("t--splashscreen-complete")([bK("text-center mt-7")([EK("")("The event is now over."),wK("")("Thank you for attending!"),_l(re)("")("A recording will be available to watch shortly.")]),IK]);var CE=e=>e.play();var Gf=Wu(SK());$a();var CK=e=>{let[n,a]=Fa.useState(),[t,r]=Fa.useState(),u=Fa.useRef();return u.current=e,Ot(()=>{if(!t)return Gf.default.isSupported()?a(LMe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},LMe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new Gf.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(Gf.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case Gf.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(Gf.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(Gf.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(Gf.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 xMe=Lc();var FK=function(){return function(){return xMe(CK)}};$a();var ic={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var tg=Wu(jK()),NK=4,vAe=({trackColor:e,background:n})=>({props:a,children:t})=>Fa.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${NK}px`,borderRadius:`${NK*2}px`,background:n||e})}),...t),fAe=({horizontal:e})=>({props:n,isDragged:a})=>Fa.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Fa.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?ic.SECONDARY:ic.WHITE,stroke:ic.SECONDARY}),Fa.createElement("path",{stroke:a?ic.WHITE:ic.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Fa.createElement("path",{stroke:a?ic.WHITE:ic.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),OK=e=>Fa.createElement("div",{"aria-label":e.ariaLabel},Fa.createElement(tg.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:vAe({trackColor:e.trackColor||ic.GRAY_300,background:e.fillBefore?(0,tg.getTrackBackground)({values:[e.value],colors:[ic.PRIMARY,ic.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:fAe({horizontal:!0})}));var _Ae=Lc(),UK={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return Z0}};var kK=function(e){return function(){return function(){return _Ae(OK)}}};var pAe=Xt(Qe)()(),dAe=kK(UK)()(),mAe=Yn(ii),hAe=$n(Qe)()(),DAe=Yn(ma),BK=Se(ye),gAe=za(re),AE=wa(Le),GL=q(Qn),HK=nn(Ke),RAe=nt(lp),rs=q(Rn),yAe=qv(Le),ML=gn(Le),bAe=U(oe),wAe=Mc(op),EAe=HK(ra),Mf=HK(qn),IAe=er(Rn),TAe=ee(ra),SAe=hc(oi),CAe=er(_t),AL=function(){function e(){}return e.value=new e,e}(),LL=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}(),JK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WK=function(){function e(){}return e.value=new e,e}(),FAe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$K=function(e){return function(n){if(e.videoState instanceof G)return ta;if(e.videoState instanceof T){var a=pAe("")({style:vt({minWidth:"6rem",width:"6rem"})})(dAe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:mAe(n)(function(i){return Me.create(LL.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if(je)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=hAe("btn large px-3 py-1 mr-3 text-white fe "+t)(Zt("Mute the video"))({onClick:DAe(n)(new Me(AL.value))})(ta),u=BK("d-flex align-items-center text-white px-3")([Xe("LIVE"),gAe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return BK("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([ga(e.config.liveIndicator)(u),ga(e.config.mute)(r),ga(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])}},zK=function(e){return Me.create(xL.create(e))},VK=function(e){return AE(GL(new bn(new FAe(function(n){return function(){return e(n)(),new Me(new xL(n))}}))))},LE=function(){return new Me(new PL(!0))}(),QK=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:RAe}},KK=2e3,YK=function(e){return function(n){if(n instanceof bn)return rs(e);if(n instanceof Me){var a=yAe(ML(function(){var i=ci();return bAe(function(l){return Me.create(qK.create(l))})(wAe(KK)(i))})),t=EAe(Qt(KK))(function(){return GL(new Me(WK.value))}),r=function(u){if(n.value0 instanceof AL)return rs(e);var i=function(l){if(n.value0 instanceof LL)return rs(e);if(n.value0 instanceof xL)return Mf(AE(ML(function(){var m=$C(n.value0.value0)(),p=qC(n.value0.value0)();return new Me(new JK({muted:m,volume:p}))})))(function(){return rs(e)});if(n.value0 instanceof JK)return rs({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof PL)return Mf(IAe(n.value0.value0)(a))(function(){return Mf(AE(t))(function(){return rs({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof qK)return rs({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof WK)return Mf(AE(TAe(ML(ci))(function(s){var m=SAe(s)(e.visibilityExpiration);return m?GL(new Me(new PL(!1))):t})))(function(){return rs(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 LL&&e.videoState instanceof T?Mf(a)(function(){return Mf(VK(function(l){return function(){return CAe(n.value0.value0>0)(F_(!1)(l))(),WC(n.value0.value0)(l)()}}))(function(){return rs({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 AL&&e.videoState instanceof T?Mf(a)(function(){return Mf(VK(F_(!e.videoState.value0.muted)))(function(){return rs({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])}},XK=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 ZK=e=>n=>a=>()=>e.then(a,n),eY=e=>e instanceof Error,nY=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var GAe=q(nl(ar)),MAe=K0(ar),AAe=ln(_n),aY=ia(UR(JR)(ar)),LAe=Ts(ar),xAe=U(Fm(Rc)),PAe=Um(ar),jAe=aR(Bn),NAe=Va(SN);var OAe=function(e){var n=function(a){if(eY(a))return GAe(a);if(je)return MAe(new Nm(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return jt(function(a){return Iu("Promise failed: "+nY(e))})(AAe)(Np(aY(n(e))(aY(LAe("Error")(e))(xAe(Iu)(PAe(e))))))},xE=function(e){return Uv(function(n){return jAe(NAe)(ZK(e)(function(a){return n(Ie.create(OAe(a)))()})(function(a){return n(Te.create(a))()}))})};var UAe=ee(Ve),kAe=Se(Qe),rg=ee(fr),jL=ys(_t)(Qu),s0=Yn(ma),tY=Rp(re)()(),BAe=FK()(),HAe=q(_t),rY=Yn(ii),oY=Xt(Qe)()(),JAe=$n(ye)()(),qAe=rt(re),WAe=Se(ye),uY=nn(Ke),$Ae=zs(Le)(),zAe=wu(Be)(at),VAe=De(nr(ct)),Od=uY(ra),QAe=vc(Qn),KAe=Rr(_p),ho=q(Qn),iY=gn(Le),lY=Nt($r),cY=tm(ra),to=q(Rn),Do=uY(qn),Bu=wa(Le),sY=U(Ca),vY=qv(Le),fY=U(Bn),YAe=ut(Mr(Ca)),XAe=U(oe),ZAe=_e(oe),_Y=Ye(Wj),pY=function(){function e(){}return e.value=new e,e}(),dY=function(){function e(){}return e.value=new e,e}(),og=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mY=function(){function e(){}return e.value=new e,e}(),Ud=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hY=function(){function e(){}return e.value=new e,e}(),DY=function(){function e(){}return e.value=new e,e}(),gY=function(){function e(){}return e.value=new e,e}(),NL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OL=function(){function e(){}return e.value=new e,e}(),PE=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}(),NE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RY=function(){function e(){}return e.value=new e,e}(),UL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kL=function(){function e(){}return e.value=new e,e}(),yY=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}(),v0=function(){function e(){}return e.value=new e,e}(),os=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ug=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HL=function(e){var n=e.Monad0(),a=ee(n.Bind1()),t=gn(e),r=q(n.Applicative0());return function(u){return function(i){return function(l){return a(t(hb(u.videoId)))(function(s){return In(r(i.whenNotFound))(l)(UAe(s)(IO))})}}}},wY=HL(Cr),JL=HL(Le),EY=function(e){var n=HL(e);return function(a){return n(a)({whenNotFound:de})}},eLe=EY(Cr),nLe=EY(Le),UE=function(e){return function(n){return function(a){var t=function(){var I=kAe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof mY)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof hY)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof og)return I(e.introScreen);if(n.stage instanceof Ud)return ta;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 og?n.stage.value0.reset:!1}(),u=wr(function(I){return rg(mb(I))(jL(function(L){return a(new Me(new BL({time:L})))}))}),i=wr(function(I){return rg(mb(I))(jL(function(L){return a(new Me(new OE({playing:!0,time:L})))}))}),l=function(I){return a(bn.create(I))},s=wr(function(I){return rg(mb(I))(jL(function(L){return l(new UL(L))}))}),m=s0(l)(RY.value),p=Fe([tY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s})(""),ga(!r)(BAe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(DY.value),onError:function(I,L){return de},onCriticalFail:rY(l)(function(I){var L=I==="networkError";return L?OL.value:new PE("HLS player crashed")}),onReady:l(new jE({autoPlay:e.autoPlay})),onInitialPts:rY(l)(function(I){return new bY(I.initPTS)})}))]),g=function(){return n.stage instanceof Ud&&n.stage.value0.unmuteOverlay?oY("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:vt({pointerEvents:"none"})})(JAe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(en)({onClick:s0(l)(yY.value),style:vt({pointerEvents:"all"})})([Xe("click for sound"),qAe("fe fe-volume-2 ml-2")("")])):ta}(),E=function(I){return oY("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:s0(l)(new os(LE)),onMouseDown:s0(l)(new os(LE)),onTouchStart:s0(l)(new os(LE))})($K(I)(function(L){return l(os.create(L))}))},b=tY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),playsInline:!0,onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:s0(l)(new jE({autoPlay:e.autoPlay})),onError:s0(l)(OL.value),src:function(){return r?"":e.watchUrl}()})("");return WAe("position-relative w-100")([function(){if(n.support instanceof pY)return p;if(n.support instanceof dY)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 163, column 7 - line 165, column 40): "+[n.support.constructor.name])}(),ha(n.customControls)(E),ga(n.allowSound)(g),t])}}},aLe=function(e){var n=gn(e.MonadEffect0());return function(a){return n(function(){return eLe(a)(F_(!1))(),kL.value})}},tLe=aLe(NO),qL=function(e){return $Ae("Livestream: Error")({livestream_error_message:e})},IY=function(e){return wY(e)({whenNotFound:!1})(JC)},rLe=function(e){return gn(e)(function(){var a=rg(rg(pu)(KC))(QC)();return zAe(function(t){return VAe(qy(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},TY=rLe(Le),oLe=function(e){var n=function(t){return Od(QAe(e.allowSound)(KAe(Iu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return Od(xE(CE(t)))(function(){return ho(new NE({unmuteOverlay:!1}))})})},a=function(t){return Od(iY(F_(!0)(t)))(function(){return Od(xE(CE(t)))(function(){return ho(new NE({unmuteOverlay:!0}))})})};return JL(e)({whenNotFound:new PE("